diff --git a/CMake/macros.cmake b/CMake/macros.cmake index 95799a2c1fd..6a337505c00 100644 --- a/CMake/macros.cmake +++ b/CMake/macros.cmake @@ -42,14 +42,40 @@ MACRO(SETUP_LIBDIRS) if(COMMAND cmake_policy) CMAKE_POLICY(SET CMP0003 NEW) endif(COMMAND cmake_policy) - LINK_DIRECTORIES(${PYTHON_LIBPATH} ${SDL_LIBPATH} ${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${ICONV_LIBPATH} ${OPENEXR_LIBPATH} ${QUICKTIME_LIBPATH} ${FFMPEG_LIBPATH}) + + LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH} ${LIBSAMPLERATE_LIBPATH}) + + IF(WITH_PYTHON) + LINK_DIRECTORIES(${PYTHON_LIBPATH}) + ENDIF(WITH_PYTHON) IF(WITH_INTERNATIONAL) + LINK_DIRECTORIES(${ICONV_LIBPATH}) LINK_DIRECTORIES(${GETTEXT_LIBPATH}) - LINK_DIRECTORIES(${FREETYPE_LIBPATH}) ENDIF(WITH_INTERNATIONAL) + IF(WITH_SDL) + LINK_DIRECTORIES(${SDL_LIBPATH}) + ENDIF(WITH_SDL) + IF(WITH_FFMPEG) + LINK_DIRECTORIES(${FFMPEG_LIBPATH}) + ENDIF(WITH_FFMPEG) + IF(WITH_OPENEXR) + LINK_DIRECTORIES(${OPENEXR_LIBPATH}) + ENDIF(WITH_OPENEXR) + IF(WITH_QUICKTIME) + LINK_DIRECTORIES(${QUICKTIME_LIBPATH}) + ENDIF(WITH_QUICKTIME) IF(WITH_OPENAL) LINK_DIRECTORIES(${OPENAL_LIBPATH}) ENDIF(WITH_OPENAL) + IF(WITH_JACK) + LINK_DIRECTORIES(${JACK_LIBPATH}) + ENDIF(WITH_JACK) + IF(WITH_SNDFILE) + LINK_DIRECTORIES(${SNDFILE_LIBPATH}) + ENDIF(WITH_SNDFILE) + IF(WITH_FFTW3) + LINK_DIRECTORIES(${FFTW3_LIBPATH}) + ENDIF(WITH_FFTW3) IF(WIN32) LINK_DIRECTORIES(${PTHREADS_LIBPATH}) @@ -59,14 +85,48 @@ ENDMACRO(SETUP_LIBDIRS) MACRO(SETUP_LIBLINKS target) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ") - TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS}) + #TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIBRARY} ${LLIBS}) + + TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS}) + + # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions + IF(WIN32) + TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d) + TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB}) + ELSE(WIN32) + TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB}) + ENDIF(WIN32) + + TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${LLIBS}) + TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB}) + + # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions + + IF(WIN32) + TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d) + TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB}) + ELSE(WIN32) + TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB}) + ENDIF(WIN32) + IF(WITH_INTERNATIONAL) - TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIB}) TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB}) ENDIF(WITH_INTERNATIONAL) IF(WITH_OPENAL) - TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIB}) + TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY}) ENDIF(WITH_OPENAL) + IF(WITH_FFTW3) + TARGET_LINK_LIBRARIES(${target} ${FFTW3_LIB}) + ENDIF(WITH_FFTW3) + IF(WITH_JACK) + TARGET_LINK_LIBRARIES(${target} ${JACK_LIB}) + ENDIF(WITH_JACK) + IF(WITH_SNDFILE) + TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB}) + ENDIF(WITH_SNDFILE) + IF(WITH_SDL) + TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY}) + ENDIF(WITH_SDL) IF(WIN32) TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB}) ENDIF(WIN32) @@ -83,3 +143,4 @@ MACRO(SETUP_LIBLINKS TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB}) ENDIF(WIN32) ENDMACRO(SETUP_LIBLINKS) + diff --git a/CMakeLists.txt b/CMakeLists.txt index 41f2311af98..c881dec03db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,11 +34,11 @@ IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! Remove the CMakeCache.txt file and try again from another folder, e.g.: - rm CMakeCache.txt - cd .. - mkdir cmake-make - cd cmake-make - cmake -G \"Unix Makefiles\" ../blender + rm CMakeCache.txt + cd .. + mkdir cmake-make + cd cmake-make + cmake -G \"Unix Makefiles\" ../blender ") ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) @@ -53,23 +53,30 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) #----------------------------------------------------------------------------- # Set default config options -OPTION(WITH_PLAYER "Build Player" OFF) -OPTION(WITH_GAMEENGINE "Enable Game Engine" ON) -OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON) -OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) -OPTION(WITH_VERSE "Enable Verse (http://verse.blender.org)" OFF) -OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON) -OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF) -OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) -OPTION(WITH_DDS "Enable DDS Support" ON) -OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) -OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) -OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) -OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) -OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF) +OPTION(WITH_PLAYER "Build Player" OFF) +OPTION(WITH_GAMEENGINE "Enable Game Engine" ON) +OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON) +OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) +OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON) +OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF) +OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) +OPTION(WITH_DDS "Enable DDS Support" ON) +OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) +OPTION(WITH_PYTHON "Enable Embedded Python API" ON) +OPTION(WITH_SDL "Enable SDL for sound and joystick support" ON) +OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF) +OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) +OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) +OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF) +OPTION(WITH_FFTW3 "Enable FFTW3 support" OFF) +OPTION(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF) +OPTION(WITH_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF) +OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF) +# OPTION(WITH_BUILDINFO "Include extra build details" ON) +OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON) IF(NOT WITH_GAMEENGINE AND WITH_PLAYER) - MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE") + MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE") ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER) # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g: @@ -87,392 +94,486 @@ INCLUDE(CMake/macros.cmake) #----------------------------------------------------------------------------- #Platform specifics -IF(UNIX) - INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake) - IF(OPENAL_FOUND) - SET(WITH_OPENAL ON) - SET(OPENAL_LIB ${OPENAL_LIBRARY}) - SET(OPENAL_INC ${OPENAL_INCLUDE_DIR}) - ELSE(OPENAL_FOUND) - SET(WITH_OPENAL OFF) - ENDIF(OPENAL_FOUND) +IF(UNIX AND NOT APPLE) + IF(WITH_OPENAL) + FIND_PACKAGE(OpenAL) + IF(OPENAL_FOUND) + SET(WITH_OPENAL ON) + ELSE(OPENAL_FOUND) + SET(WITH_OPENAL OFF) + ENDIF(OPENAL_FOUND) + ENDIF(WITH_OPENAL) - FIND_LIBRARY(ALUT_LIBRARY - NAMES alut - PATHS - /usr/local/lib - /usr/lib - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - ) - IF(ALUT_LIBRARY) - SET(OPENAL_LIB ${OPENAL_LIB} ${ALUT_LIBRARY}) - ENDIF(ALUT_LIBRARY) + IF(WITH_JACK) + SET(JACK /usr) + SET(JACK_INC ${JACK}/include/jack) + SET(JACK_LIB jack) + SET(JACK_LIBPATH ${JACK}/lib) + ENDIF(WITH_JACK) - FIND_LIBRARY(INTL_LIBRARY - NAMES intl - PATHS - /usr/local/lib - /usr/lib - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - ) - FIND_LIBRARY(ICONV_LIBRARY - NAMES iconv - PATHS - /usr/local/lib - /usr/lib - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - ) - IF(INTL_LIBRARY AND ICONV_LIBRARY) - SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY}) - ENDIF(INTL_LIBRARY AND ICONV_LIBRARY) + IF(WITH_SNDFILE) + SET(SNDFILE /usr) + SET(SNDFILE_INC ${SNDFILE}/include) + SET(SNDFILE_LIB sndfile) + SET(SNDFILE_LIBPATH ${SNDFILE}/lib) + ENDIF(WITH_SNDFILE) + + FIND_LIBRARY(INTL_LIBRARY + NAMES intl + PATHS + /sw/lib + ) + FIND_LIBRARY(ICONV_LIBRARY + NAMES iconv + PATHS + /sw/lib + ) - FIND_PATH(FREETYPE_INC - freetype - PATHS - /usr/local/include/freetype2 - /usr/include/freetype2 - /sw/include/freetype2 - /opt/local/include/freetype2 - /opt/csw/include/freetype2 - /opt/include/freetype2 - NO_DEFAULT_PATH - ) - SET(FREETYPE_LIB freetype) + IF(INTL_LIBRARY AND ICONV_LIBRARY) + SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY}) + ENDIF(INTL_LIBRARY AND ICONV_LIBRARY) - INCLUDE(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake) - SET(PYTHON_INC "${PYTHON_INCLUDE_PATH}" CACHE STRING "") - SET(PYTHON_LIB "${PYTHON_LIBRARIES}" CACHE STRING "") - INCLUDE(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake) - SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") - SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") + FIND_PACKAGE(Freetype) + # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use - INCLUDE(${CMAKE_ROOT}/Modules/FindSDL.cmake) - SET(SDL_INC ${SDL_INCLUDE_DIR}) - SET(SDL_LIB ${SDL_LIBRARY}) + # No way to set py31. remove for now. + # FIND_PACKAGE(PythonLibs) + SET(PYTHON /usr) + SET(PYTHON_VERSION 3.1) + SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "") + # SET(PYTHON_BINARY python) # not used yet + SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "") + SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "") + + # FIND_PACKAGE(PythonInterp) # not used yet + # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") + + SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") - FIND_PATH(OPENEXR_INC - ImfXdr.h - PATHS - /usr/local/include/OpenEXR - /usr/include/OpenEXR - /sw/include/OpenEXR - /opt/local/include/OpenEXR - /opt/csw/include/OpenEXR - /opt/include/OpenEXR - ) - SET(OPENEXR_LIB Half IlmImf Iex Imath) + IF(WITH_SDL) + FIND_PACKAGE(SDL) + # UNSET(SDLMAIN_LIBRARY CACHE) + IF(NOT SDL_FOUND) + SET(WITH_SDL OFF) + ENDIF(NOT SDL_FOUND) + ENDIF(WITH_SDL) - SET(FFMPEG /usr) - SET(FFMPEG_INC ${FFMPEG}/include) - SET(FFMPEG_LIB avformat avcodec avutil) - SET(FFMPEG_LIBPATH ${FFMPEG}/lib) + FIND_PATH(OPENEXR_INC + ImfXdr.h + PATHS + /usr/local/include/OpenEXR + /usr/include/OpenEXR + /sw/include/OpenEXR + /opt/local/include/OpenEXR + /opt/csw/include/OpenEXR + /opt/include/OpenEXR + ) + SET(OPENEXR_LIB Half IlmImf Iex Imath) - SET(JPEG_LIB jpeg) + SET(FFMPEG /usr) + SET(FFMPEG_INC ${FFMPEG}/include) + SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale) + SET(FFMPEG_LIBPATH ${FFMPEG}/lib) + + IF(WITH_FFTW3) + SET(FFTW3 /usr) + SET(FFTW3_INC ${FFTW3}/include) + SET(FFTW3_LIB fftw3) + SET(FFTW3_LIBPATH ${FFTW3}/lib) + ENDIF(WITH_FFTW3) - SET(PNG_LIB png) + SET(LIBSAMPLERATE /usr) + SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) + SET(LIBSAMPLERATE_LIB samplerate) + SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) - SET(ZLIB_LIB z) + FIND_PACKAGE(JPEG REQUIRED) - SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++") + FIND_PACKAGE(PNG REQUIRED) - IF(WITH_OPENMP) - SET(LLIBS "${LLIBS} -lgomp") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") - ENDIF(WITH_OPENMP) + FIND_PACKAGE(ZLIB REQUIRED) + + # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too + SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11") + + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + # BSD's dont use libdl.so + SET(LLIBS "${LLIBS} -ldl") + ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + + IF(WITH_OPENMP) + SET(LLIBS "${LLIBS} -lgomp") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") + ENDIF(WITH_OPENMP) - SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts") + SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts") - SET(PLATFORM_LINKFLAGS "-pthread") + SET(PLATFORM_LINKFLAGS "-pthread") - INCLUDE_DIRECTORIES(/usr/include /usr/local/include) -ENDIF(UNIX) + # Better warnings + SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement") + SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + + INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) +ENDIF(UNIX AND NOT APPLE) IF(WIN32) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) + # this file is included anyway when building under Windows with cl.exe + # INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows) + SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows) - # Setup 64bit and 64bit windows systems - IF(CMAKE_CL_64) - message("64 bit compiler detected.") - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64) - ENDIF(CMAKE_CL_64) + # Setup 64bit and 64bit windows systems + IF(CMAKE_CL_64) + message("64 bit compiler detected.") + SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64) + ENDIF(CMAKE_CL_64) - SET(PYTHON ${LIBDIR}/python) - SET(PYTHON_VERSION 2.5) - SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") - SET(PYTHON_BINARY python) - SET(PYTHON_LIB python25) - SET(PYTHON_LIBPATH ${PYTHON}/lib) + SET(PYTHON ${LIBDIR}/python) + SET(PYTHON_VERSION 3.1) + SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") + # SET(PYTHON_BINARY python) # not used yet + SET(PYTHON_LIB python31) + SET(PYTHON_LIBPATH ${PYTHON}/lib) - #SET(WITH_OPENAL ON) - SET(OPENAL ${LIBDIR}/openal) - SET(OPENAL_INC ${OPENAL}/include ${OPENAL}/include/AL) - SET(OPENAL_LIB openal_static) - SET(OPENAL_LIBPATH ${OPENAL}/lib) + IF(CMAKE_CL_64) + SET(WITH_OPENAL OFF) + ELSE(CMAKE_CL_64) + #SET(WITH_OPENAL ON) + SET(OPENAL ${LIBDIR}/openal) + SET(OPENAL_INCLUDE_DIR ${OPENAL}/include) + SET(OPENAL_LIBRARY wrap_oal) + SET(OPENAL_LIBPATH ${OPENAL}/lib) + ENDIF(CMAKE_CL_64) - IF(CMAKE_CL_64) - SET(PNG_LIB libpng) - ELSE(CMAKE_CL_64) - SET(PNG_LIB libpng_st) - ENDIF(CMAKE_CL_64) - SET(JPEG_LIB libjpeg) + IF(WITH_JACK) + SET(JACK ${LIBDIR}/jack) + SET(JACK_INC ${JACK}/include/jack ${JACK}/include) + SET(JACK_LIB libjack) + SET(JACK_LIBPATH ${JACK}/lib) + ENDIF(WITH_JACK) - SET(ZLIB ${LIBDIR}/zlib) - SET(ZLIB_INC ${ZLIB}/include) - IF(CMAKE_CL_64) - SET(ZLIB_LIB zlib) - ELSE(CMAKE_CL_64) - SET(ZLIB_LIB libz) - ENDIF(CMAKE_CL_64) - SET(ZLIB_LIBPATH ${ZLIB}/lib) + IF(WITH_SNDFILE) + SET(SNDFILE ${LIBDIR}/sndfile) + SET(SNDFILE_INC ${SNDFILE}/include) + SET(SNDFILE_LIB libsndfile-1) + SET(SNDFILE_LIBPATH ${SNDFILE}/lib) + ENDIF(WITH_SNDFILE) + + IF(CMAKE_CL_64) + SET(PNG_LIBRARIES libpng) + ELSE(CMAKE_CL_64) + SET(PNG_LIBRARIES libpng_st) + ENDIF(CMAKE_CL_64) + SET(JPEG_LIBRARY libjpeg) + + SET(ZLIB ${LIBDIR}/zlib) + SET(ZLIB_INC ${ZLIB}/include) + IF(CMAKE_CL_64) + SET(ZLIB_LIBRARIES libz) + ELSE(CMAKE_CL_64) + SET(ZLIB_LIBRARIES zlib) + ENDIF(CMAKE_CL_64) + SET(ZLIB_LIBPATH ${ZLIB}/lib) - SET(PTHREADS ${LIBDIR}/pthreads) - SET(PTHREADS_INC ${PTHREADS}/include) - SET(PTHREADS_LIB pthreadVC2) - SET(PTHREADS_LIBPATH ${PTHREADS}/lib) + SET(PTHREADS ${LIBDIR}/pthreads) + SET(PTHREADS_INC ${PTHREADS}/include) + SET(PTHREADS_LIB pthreadVC2) + SET(PTHREADS_LIBPATH ${PTHREADS}/lib) - SET(ICONV ${LIBDIR}/iconv) - SET(ICONV_INC ${ICONV}/include) - SET(ICONV_LIB iconv) - SET(ICONV_LIBPATH ${ICONV}/lib) + SET(ICONV ${LIBDIR}/iconv) + SET(ICONV_INC ${ICONV}/include) + SET(ICONV_LIB iconv) + SET(ICONV_LIBPATH ${ICONV}/lib) - SET(GETTEXT ${LIBDIR}/gettext) - SET(GETTEXT_INC ${GETTEXT}/include) - IF(CMAKE_CL_64) - SET(GETTEXT_LIB gettextlib) - ELSE(CMAKE_CL_64) - SET(GETTEXT_LIB gnu_gettext) - ENDIF(CMAKE_CL_64) - SET(GETTEXT_LIBPATH ${GETTEXT}/lib) + IF(WITH_FFTW3) + SET(FFTW3 ${LIBDIR}/fftw3) + SET(FFTW3_INC ${FFTW3}/include) + SET(FFTW3_LIB libfftw) + SET(FFTW3_LIBPATH ${FFTW3}/lib) + ENDIF(WITH_FFTW3) + + SET(GETTEXT ${LIBDIR}/gettext) + SET(GETTEXT_INC ${GETTEXT}/include) + IF(CMAKE_CL_64) + SET(GETTEXT_LIB gettext) + ELSE(CMAKE_CL_64) + SET(GETTEXT_LIB gnu_gettext) + ENDIF(CMAKE_CL_64) + SET(GETTEXT_LIBPATH ${GETTEXT}/lib) - SET(FREETYPE ${LIBDIR}/freetype) - SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2) - SET(FREETYPE_LIBPATH ${FREETYPE}/lib) - SET(FREETYPE_LIB freetype2ST) + SET(FREETYPE ${LIBDIR}/freetype) + SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) + SET(FREETYPE_LIBPATH ${FREETYPE}/lib) + SET(FREETYPE_LIBRARY freetype2ST) - SET(OPENEXR ${LIBDIR}/openexr) - SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath) - SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) - IF (MSVC80) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005) - ELSE (MSVC80) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc) - ENDIF(MSVC80) - IF (MSVC90) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008) - ENDIF(MSVC90) + SET(OPENEXR ${LIBDIR}/openexr) + SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath) + SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) + IF (MSVC80) + SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005) + ELSE (MSVC80) + SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc) + ENDIF(MSVC80) + IF (MSVC90) + SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008) + ENDIF(MSVC90) - SET(QUICKTIME ${LIBDIR}/QTDevWin) - SET(QUICKTIME_INC ${QUICKTIME}/CIncludes) - SET(QUICKTIME_LIB qtmlClient) - SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries) + SET(QUICKTIME ${LIBDIR}/QTDevWin) + SET(QUICKTIME_INC ${QUICKTIME}/CIncludes) + SET(QUICKTIME_LIB qtmlClient) + SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries) - SET(FFMPEG ${LIBDIR}/ffmpeg) - SET(FFMPEG_INC ${FFMPEG}/include) - SET(FFMPEG_LIB avcodec-51 avformat-52 avdevice-52 avutil-49 swscale-0) - SET(FFMPEG_LIBPATH ${FFMPEG}/lib) + SET(FFMPEG ${LIBDIR}/ffmpeg) + SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc) + SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0) + SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - IF(CMAKE_CL_64) - SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 ) - ELSE(CMAKE_CL_64) - SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm) - ENDIF(CMAKE_CL_64) + SET(LIBSAMPLERATE ${LIBDIR}/samplerate) + SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) + SET(LIBSAMPLERATE_LIB libsamplerate) + SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) + + IF(CMAKE_CL_64) + SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 ) + ELSE(CMAKE_CL_64) + SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm) + ENDIF(CMAKE_CL_64) + + SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + + IF(WITH_OPENMP) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ") + ENDIF(WITH_OPENMP) + + SET(SDL ${LIBDIR}/sdl) + SET(SDL_INCLUDE_DIR ${SDL}/include) + SET(SDL_LIBRARY SDL) + SET(SDL_LIBPATH ${SDL}/lib) + + SET(PNG "${LIBDIR}/png") + SET(PNG_INC "${PNG}/include") + SET(PNG_LIBPATH ${PNG}/lib) + + SET(JPEG "${LIBDIR}/jpeg") + SET(JPEG_INC "${JPEG}/include") + SET(JPEG_LIBPATH ${JPEG}/lib) + + SET(TIFF ${LIBDIR}/tiff) + SET(TIFF_INC ${TIFF}/include) - IF(WITH_OPENAL) - SET(LLIBS ${LLIBS} dxguid) - ENDIF(WITH_OPENAL) + SET(WINTAB_INC ${LIBDIR}/wintab/include) - SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) - - IF(WITH_OPENMP) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ") - ENDIF(WITH_OPENMP) - - SET(SDL ${LIBDIR}/sdl) - SET(SDL_INC ${SDL}/include) - SET(SDL_LIB SDL) - SET(SDL_LIBPATH ${SDL}/lib) - - SET(PNG "${LIBDIR}/png") - SET(PNG_INC "${PNG}/include") - SET(PNG_LIBPATH ${PNG}/lib) - - SET(JPEG "${LIBDIR}/jpeg") - SET(JPEG_INC "${JPEG}/include") - SET(JPEG_LIBPATH ${JPEG}/lib) - - SET(TIFF ${LIBDIR}/tiff) - SET(TIFF_INC ${TIFF}/include) + IF(CMAKE_CL_64) + SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ") + ELSE(CMAKE_CL_64) + SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ") + ENDIF(CMAKE_CL_64) - SET(WINTAB_INC ${LIBDIR}/wintab/include) - - IF(CMAKE_CL_64) - SET(PLATFORM_LINKFLAGS "/MANIFEST:NO /MANIFESTUAC:NO /MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ") - ELSE(CMAKE_CL_64) - SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ") - ENDIF(CMAKE_CL_64) - SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ") + SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ") ENDIF(WIN32) IF(APPLE) - IF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386) - ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc) - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386) + IF(CMAKE_OSX_ARCHITECTURES MATCHES i386) + SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386) + ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386) + SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc) + ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake) - IF(OPENAL_FOUND) - SET(WITH_OPENAL ON) - SET(OPENAL_LIB ${OPENAL_LIBRARY}) - SET(OPENAL_INC ${OPENAL_INCLUDE_DIR}) - ELSE(OPENAL_FOUND) - SET(WITH_OPENAL OFF) - ENDIF(OPENAL_FOUND) + IF(WITH_OPENAL) + FIND_PACKAGE(OpenAL) + IF(OPENAL_FOUND) + SET(WITH_OPENAL ON) + ELSE(OPENAL_FOUND) + SET(WITH_OPENAL OFF) + ENDIF(OPENAL_FOUND) + ENDIF(WITH_OPENAL) - SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/) - SET(PYTHON_VERSION 2.3) - SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "") - SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") - SET(PYTHON_LIB "") - SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "") - SET(PYTHON_LINKFLAGS "-u __dummy -u _PyMac_Error -framework System -framework Python") + IF(WITH_JACK) + SET(JACK /usr) + SET(JACK_INC ${JACK}/include/jack) + SET(JACK_LIB jack) + SET(JACK_LIBPATH ${JACK}/lib) + ENDIF(WITH_JACK) - SET(GETTEXT ${LIBDIR}/gettext) - SET(GETTEXT_INC "${GETTEXT}/include") - SET(GETTEXT_LIB intl iconv) - SET(GETTEXT_LIBPATH ${GETTEXT}/lib) + IF(WITH_SNDFILE) + SET(SNDFILE ${LIBDIR}/sndfile) + SET(SNDFILE_INC ${SNDFILE}/include) + SET(SNDFILE_LIB sndfile) + SET(SNDFILE_LIBPATH ${SNDFILE}/lib) + ENDIF(WITH_SNDFILE) - SET(PNG_LIB png) - SET(JPEG_LIB jpeg) + SET(PYTHON_VERSION 3.1) - SET(ZLIB /usr) - SET(ZLIB_INC "${ZLIB}/include") - SET(ZLIB_LIB z) + IF(PYTHON_VERSION MATCHES 3.1) + # we use precompiled libraries for py 3.1 and up by default - SET(FREETYPE ${LIBDIR}/freetype) - SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2) - SET(FREETYPE_LIBPATH ${FREETYPE}/lib) - SET(FREETYPE_LIB freetype) + SET(PYTHON ${LIBDIR}/python) + SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "") + # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet + SET(PYTHON_LIB python${PYTHON_VERSION}) + SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "") + # SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled + ELSE(PYTHON_VERSION MATCHES 3.1) + # otherwise, use custom system framework - SET(OPENEXR ${LIBDIR}/openexr) - SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include) - IF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) - ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(OPENEXR_LIB Iex Half IlmImf Imath) - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib) + SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/) + SET(PYTHON_VERSION 2.5) + SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "") + # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet + SET(PYTHON_LIB "") + SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "") + SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python") + ENDIF(PYTHON_VERSION MATCHES 3.1) - SET(LLIBS stdc++ SystemStubs) + SET(GETTEXT ${LIBDIR}/gettext) + SET(GETTEXT_INC "${GETTEXT}/include") + SET(GETTEXT_LIB intl iconv) + SET(GETTEXT_LIBPATH ${GETTEXT}/lib) + + IF(WITH_FFTW3) + SET(FFTW3 ${LIBDIR}/fftw3) + SET(FFTW3_INC ${FFTW3}/include) + SET(FFTW3_LIB libfftw) + SET(FFTW3_LIBPATH ${FFTW3}/lib) + ENDIF(WITH_FFTW3) - SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") - SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime") + SET(PNG_LIBRARIES png) + SET(JPEG_LIBRARY jpeg) - IF(WITH_OPENMP) - SET(LLIBS "${LLIBS} -lgomp ") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ") - ENDIF(WITH_OPENMP) + SET(ZLIB /usr) + SET(ZLIB_INC "${ZLIB}/include") + SET(ZLIB_LIBRARIES z) - SET(SDL ${LIBDIR}/sdl) - SET(SDL_INC ${SDL}/include) - SET(SDL_LIB SDL) - SET(SDL_LIBPATH ${SDL}/lib) + SET(FREETYPE ${LIBDIR}/freetype) + SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) + SET(FREETYPE_LIBPATH ${FREETYPE}/lib) + SET(FREETYPE_LIBRARY freetype) - SET(PNG "${LIBDIR}/png") - SET(PNG_INC "${PNG}/include") - SET(PNG_LIBPATH ${PNG}/lib) + SET(OPENEXR ${LIBDIR}/openexr) + SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include) + SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) + SET(OPENEXR_LIBPATH ${OPENEXR}/lib) - SET(JPEG "${LIBDIR}/jpeg") - SET(JPEG_INC "${JPEG}/include") - SET(JPEG_LIBPATH ${JPEG}/lib) + SET(FFMPEG ${LIBDIR}/ffmpeg) + SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg) + SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore) + SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - SET(TIFF ${LIBDIR}/tiff) - SET(TIFF_INC ${TIFF}/include) + SET(LIBSAMPLERATE ${LIBDIR}/samplerate) + SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) + SET(LIBSAMPLERATE_LIB samplerate) + SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) - SET(EXETYPE MACOSX_BUNDLE) + SET(LLIBS stdc++ SystemStubs) + + SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") + SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime") + + IF(WITH_OPENMP) + SET(LLIBS "${LLIBS} -lgomp ") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ") + ENDIF(WITH_OPENMP) + + SET(SDL ${LIBDIR}/sdl) + SET(SDL_INCLUDE_DIR ${SDL}/include) + SET(SDL_LIBRARY SDL) + SET(SDL_LIBPATH ${SDL}/lib) + + SET(PNG "${LIBDIR}/png") + SET(PNG_INC "${PNG}/include") + SET(PNG_LIBPATH ${PNG}/lib) + + SET(JPEG "${LIBDIR}/jpeg") + SET(JPEG_INC "${JPEG}/include") + SET(JPEG_LIBPATH ${JPEG}/lib) + + SET(TIFF ${LIBDIR}/tiff) + SET(TIFF_INC ${TIFF}/include) + + SET(EXETYPE MACOSX_BUNDLE) ENDIF(APPLE) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc) - SET(BINRELOC_INC ${BINRELOC}/include) + SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc) + SET(BINRELOC_INC ${BINRELOC}/include) ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + +# TODO - buildinfo +# IF(UNIX) +# IF(WITH_BUILDINFO) +# EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE) +# EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME) +# EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV) +# SET(BUILD_TYPE ${CMAKE_BUILD_TYPE}) +# ENDIF(WITH_BUILDINFO) +# ENDIF(UNIX) + #----------------------------------------------------------------------------- # Common. -SET(VERSE_INC ${CMAKE_SOURCE_DIR}/extern/verse/dist) - -SET(FTGL ${CMAKE_SOURCE_DIR}/extern/bFTGL) -SET(FTGL_INC ${FTGL}/include) -SET(FTGL_LIB extern_ftgl) +set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg) +set(OPENJPEG_INC ${OPENJPEG}) +set(OPENJPEG_LIb extern_libopenjpeg) #----------------------------------------------------------------------------- # Blender WebPlugin IF(WITH_WEBPLUGIN) - SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path") - SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none") + SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path") + SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none") - SET(WITH_PLAYER ON) + SET(WITH_PLAYER ON) ENDIF(WITH_WEBPLUGIN) #----------------------------------------------------------------------------- # Configure OpenGL. -INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake) +FIND_PACKAGE(OpenGL) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) +# UNSET(OPENGL_LIBRARIES CACHE) # not compat with older cmake +# UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake + #----------------------------------------------------------------------------- # Extra compile flags -IF(WITH_GAMEENGINE) - SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DGAMEBLENDER ") -ENDIF(WITH_GAMEENGINE) -IF(WITH_BULLET) - SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DWITH_BULLET ") -ENDIF(WITH_BULLET) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}") + +# better not define flags here but this is a debugging option thats off by default. +IF(WITH_CXX_GUARDEDALLOC) + SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}") +ENDIF(WITH_CXX_GUARDEDALLOC) #----------------------------------------------------------------------------- # Libraries FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "") -SUBDIRS( - intern - extern - source -) +ADD_SUBDIRECTORY(intern) +ADD_SUBDIRECTORY(extern) +ADD_SUBDIRECTORY(source) #----------------------------------------------------------------------------- # Blender Application -SUBDIRS(source/creator) +ADD_SUBDIRECTORY(source/creator) #----------------------------------------------------------------------------- # Blender Player IF(WITH_PLAYER) - SUBDIRS(blenderplayer) + ADD_SUBDIRECTORY(source/blenderplayer) ENDIF(WITH_PLAYER) + diff --git a/Makefile b/Makefile index b983779fb31..7c883c41741 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # $Id$ # # ***** BEGIN GPL LICENSE BLOCK ***** @@ -21,7 +23,7 @@ # # The Original Code is: revision 1.1 # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # @@ -31,12 +33,11 @@ # If the user wants to override some of the build # vars they can put it in the file user-def.mk which # will get included if it exists (please do not commit -# user-def.mk to cvs). - +# user-def.mk to the revision control server). sinclude user-def.mk -# To build without openAL, uncomment the following line, or set it as -# an environment variable, or put it uncommented in user-def.mk: +# To build without openAL, set it as an environment variable, +# or put it uncommented in user-def.mk: # export NAN_NO_OPENAL=true export NANBLENDERHOME=$(shell pwd) @@ -44,13 +45,9 @@ MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory SOURCEDIR = ifeq ($(FREE_WINDOWS),true) - DIRS ?= dlltool extern intern source -endif - -DIRS ?= extern intern source - -ifneq ($(INTERNATIONAL),false) - DIRS += po + DIRS ?= dlltool extern intern source po +else + DIRS ?= extern intern source po endif include source/nan_subdirs.mk diff --git a/SConstruct b/SConstruct index 021d5f7c1f9..83ec6c1b718 100644 --- a/SConstruct +++ b/SConstruct @@ -29,6 +29,14 @@ # Set up some custom actions and target/argument handling # Then read all SConscripts and build +import platform as pltfrm + +# Need a better way to do this. Automagical maybe is not the best thing, maybe it is. +if pltfrm.architecture()[0] == '64bit': + bitness = 64 +else: + bitness = 32 + import sys import os import os.path @@ -52,13 +60,10 @@ B = tools.Blender platform = sys.platform quickie = None quickdebug = None -nsis_build = None ##### BEGIN SETUP ##### -B.possible_types = ['core', 'common', 'blender', 'intern', - 'international', 'game', 'game2', - 'player', 'player2', 'system'] +B.possible_types = ['core', 'player', 'intern', 'extern'] B.binarykind = ['blender' , 'blenderplayer'] ################################## @@ -67,15 +72,15 @@ B.binarykind = ['blender' , 'blenderplayer'] # XX cheating for BF_FANCY, we check for BF_FANCY before args are validated use_color = ARGUMENTS.get('BF_FANCY', '1') if platform=='win32': - use_color = None + use_color = None if not use_color=='1': - B.bc.disable() - + B.bc.disable() + #on defaut white Os X terminal, some colors are totally unlegible if platform=='darwin': - B.bc.OKGREEN = '\033[34m' - B.bc.WARNING = '\033[36m' + B.bc.OKGREEN = '\033[34m' + B.bc.WARNING = '\033[36m' # arguments print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC @@ -98,252 +103,261 @@ quickie = B.arguments.get('BF_QUICK', None) quickdebug = B.arguments.get('BF_QUICKDEBUG', None) if quickdebug: - B.quickdebug=string.split(quickdebug, ',') + B.quickdebug=string.split(quickdebug, ',') else: - B.quickdebug=[] + B.quickdebug=[] if quickie: - B.quickie=string.split(quickie,',') + B.quickie=string.split(quickie,',') else: - B.quickie=[] - + B.quickie=[] + toolset = B.arguments.get('BF_TOOLSET', None) if toolset: - print "Using " + toolset - if toolset=='mstoolkit': - env = BlenderEnvironment(ENV = os.environ) - env.Tool('mstoolkit', ['tools']) - else: - env = BlenderEnvironment(tools=[toolset], ENV = os.environ) - if env: - btools.SetupSpawn(env) + print "Using " + toolset + if toolset=='mstoolkit': + env = BlenderEnvironment(ENV = os.environ) + env.Tool('mstoolkit', ['tools']) + else: + env = BlenderEnvironment(tools=[toolset], ENV = os.environ) + # xxx commented out, as was supressing warnings under mingw.. + #if env: + # btools.SetupSpawn(env) else: - env = BlenderEnvironment(ENV = os.environ) + env = BlenderEnvironment(ENV = os.environ) if not env: - print "Could not create a build environment" - Exit() + print "Could not create a build environment" + Exit() cc = B.arguments.get('CC', None) cxx = B.arguments.get('CXX', None) if cc: - env['CC'] = cc + env['CC'] = cc if cxx: - env['CXX'] = cxx + env['CXX'] = cxx if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32': - platform = 'win32-vc' + if bitness == 64: + platform = 'win64-vc' + else: + platform = 'win32-vc' elif env['CC'] in ['gcc'] and sys.platform=='win32': - platform = 'win32-mingw' + platform = 'win32-mingw' env.SConscriptChdir(0) crossbuild = B.arguments.get('BF_CROSS', None) -if crossbuild and platform!='win32': - platform = 'linuxcross' +if crossbuild and platform not in ('win32-vc', 'win64-vc'): + platform = 'linuxcross' env['OURPLATFORM'] = platform configfile = 'config'+os.sep+platform+'-config.py' if os.path.exists(configfile): - print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile + print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile else: - print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC + print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC if crossbuild and env['PLATFORM'] != 'win32': - print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC - env.Tool('crossmingw', ['tools']) - # todo: determine proper libs/includes etc. - # Needed for gui programs, console programs should do without it - env.Append(LINKFLAGS=['-mwindows']) + print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC + env.Tool('crossmingw', ['tools']) + # todo: determine proper libs/includes etc. + # Needed for gui programs, console programs should do without it + env.Append(LINKFLAGS=['-mwindows']) userconfig = B.arguments.get('BF_CONFIG', 'user-config.py') # first read platform config. B.arguments will override optfiles = [configfile] if os.path.exists(userconfig): - print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig - optfiles += [userconfig] + print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig + optfiles += [userconfig] else: - print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC + print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC opts = btools.read_opts(optfiles, B.arguments) opts.Update(env) if not env['BF_FANCY']: - B.bc.disable() + B.bc.disable() SetOption('num_jobs', int(env['BF_NUMJOBS'])) print "Build with %d parallel jobs" % (GetOption('num_jobs')) # disable elbeem (fluidsim) compilation? if env['BF_NO_ELBEEM'] == 1: - env['CPPFLAGS'].append('-DDISABLE_ELBEEM') - env['CXXFLAGS'].append('-DDISABLE_ELBEEM') - env['CCFLAGS'].append('-DDISABLE_ELBEEM') + env['CPPFLAGS'].append('-DDISABLE_ELBEEM') + env['CXXFLAGS'].append('-DDISABLE_ELBEEM') + env['CCFLAGS'].append('-DDISABLE_ELBEEM') if env['WITH_BF_OPENMP'] == 1: - if env['OURPLATFORM']=='win32-vc': - env['CCFLAGS'].append('/openmp') - env['CPPFLAGS'].append('/openmp') - env['CXXFLAGS'].append('/openmp') - else: - if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case - env.Append(LINKFLAGS=['-openmp', '-static-intel']) - env['CCFLAGS'].append('-openmp') - env['CPPFLAGS'].append('-openmp') - env['CXXFLAGS'].append('-openmp') - else: - env.Append(CCFLAGS=['-fopenmp']) - env.Append(CPPFLAGS=['-fopenmp']) - env.Append(CXXFLAGS=['-fopenmp']) - # env.Append(LINKFLAGS=['-fprofile-generate']) + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + env['CCFLAGS'].append('/openmp') + env['CPPFLAGS'].append('/openmp') + env['CXXFLAGS'].append('/openmp') + else: + if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case + env.Append(LINKFLAGS=['-openmp', '-static-intel']) + env['CCFLAGS'].append('-openmp') + env['CPPFLAGS'].append('-openmp') + env['CXXFLAGS'].append('-openmp') + else: + env.Append(CCFLAGS=['-fopenmp']) + env.Append(CPPFLAGS=['-fopenmp']) + env.Append(CXXFLAGS=['-fopenmp']) #check for additional debug libnames if env.has_key('BF_DEBUG_LIBS'): - B.quickdebug += env['BF_DEBUG_LIBS'] + B.quickdebug += env['BF_DEBUG_LIBS'] printdebug = B.arguments.get('BF_LISTDEBUG', 0) # see if this linux distro has libalut if env['OURPLATFORM'] == 'linux2' : - if env['WITH_BF_OPENAL']: - mylib_test_source_file = """ - #include "AL/alut.h" - int main(int argc, char **argv) - { - alutGetMajorVersion(); - return 0; - } - """ + if env['WITH_BF_OPENAL']: + mylib_test_source_file = """ + #include "AL/alut.h" + int main(int argc, char **argv) + { + alutGetMajorVersion(); + return 0; + } + """ - def CheckFreeAlut(context,env): - context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC ) - env['LIBS'] = 'alut' - result = context.TryLink(mylib_test_source_file, '.c') - context.Result(result) - return result + def CheckFreeAlut(context,env): + context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC ) + env['LIBS'] = 'alut' + result = context.TryLink(mylib_test_source_file, '.c') + context.Result(result) + return result - env2 = env.Copy( LIBPATH = env['BF_OPENAL'] ) - sconf_temp = mkdtemp() - conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' ) - if conf.CheckFreeAlut( env2 ): - env['BF_OPENAL_LIB'] += ' alut' - del env2 - root = '' - for root, dirs, files in os.walk(sconf_temp, topdown=False): - for name in files: - os.remove(os.path.join(root, name)) - for name in dirs: - os.rmdir(os.path.join(root, name)) - if root: os.rmdir(root) + env2 = env.Clone( LIBPATH = env['BF_OPENAL'] ) + sconf_temp = mkdtemp() + conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' ) + if conf.CheckFreeAlut( env2 ): + env['BF_OPENAL_LIB'] += ' alut' + del env2 + root = '' + for root, dirs, files in os.walk(sconf_temp, topdown=False): + for name in files: + os.remove(os.path.join(root, name)) + for name in dirs: + os.rmdir(os.path.join(root, name)) + if root: os.rmdir(root) if len(B.quickdebug) > 0 and printdebug != 0: - print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC - for l in B.quickdebug: - print "\t" + l + print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC + for l in B.quickdebug: + print "\t" + l # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS if env['WITH_BF_STATICCXX']: - if 'stdc++' in env['LLIBS']: - env['LLIBS'] = env['LLIBS'].replace('stdc++', ' ') - else: - print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform' + if 'stdc++' in env['LLIBS']: + env['LLIBS'].remove('stdc++') + else: + print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform' # check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline if 'blenderplayer' in B.targets: - env['WITH_BF_PLAYER'] = True + env['WITH_BF_PLAYER'] = True if 'blendernogame' in B.targets: - env['WITH_BF_GAMEENGINE'] = False + env['WITH_BF_GAMEENGINE'] = False if 'blenderlite' in B.targets: - env['WITH_BF_GAMEENGINE'] = False - env['WITH_BF_OPENAL'] = False - env['WITH_BF_OPENEXR'] = False - env['WITH_BF_ICONV'] = False - env['WITH_BF_INTERNATIONAL'] = False - env['WITH_BF_OPENJPEG'] = False - env['WITH_BF_FFMPEG'] = False - env['WITH_BF_QUICKTIME'] = False - env['WITH_BF_YAFRAY'] = False - env['WITH_BF_REDCODE'] = False - env['WITH_BF_FTGL'] = False - env['WITH_BF_DDS'] = False - env['WITH_BF_ZLIB'] = False - env['WITH_BF_SDL'] = False - env['WITH_BF_JPEG'] = False - env['WITH_BF_PNG'] = False - env['WITH_BF_ODE'] = False - env['WITH_BF_BULLET'] = False - env['WITH_BF_BINRELOC'] = False - env['BF_BUILDINFO'] = False - env['BF_NO_ELBEEM'] = True - env['WITH_BF_PYTHON'] = False + target_env_defs = {} + target_env_defs['WITH_BF_GAMEENGINE'] = False + target_env_defs['WITH_BF_OPENAL'] = False + target_env_defs['WITH_BF_OPENEXR'] = False + target_env_defs['WITH_BF_ICONV'] = False + target_env_defs['WITH_BF_INTERNATIONAL'] = False + target_env_defs['WITH_BF_OPENJPEG'] = False + target_env_defs['WITH_BF_FFMPEG'] = False + target_env_defs['WITH_BF_QUICKTIME'] = False + target_env_defs['WITH_BF_REDCODE'] = False + target_env_defs['WITH_BF_DDS'] = False + target_env_defs['WITH_BF_ZLIB'] = False + target_env_defs['WITH_BF_SDL'] = False + target_env_defs['WITH_BF_JPEG'] = False + target_env_defs['WITH_BF_PNG'] = False + target_env_defs['WITH_BF_BULLET'] = False + target_env_defs['WITH_BF_BINRELOC'] = False + target_env_defs['BF_BUILDINFO'] = False + target_env_defs['BF_NO_ELBEEM'] = True + target_env_defs['WITH_BF_PYTHON'] = False + + # Merge blenderlite, let command line to override + for k,v in target_env_defs.iteritems(): + if k not in B.arguments: + env[k] = v + +if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'): + env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup') + env['PLATFORM_LINKFLAGS'].append('/ENTRY:main') # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir -#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep) B.root_build_dir = env['BF_BUILDDIR'] B.doc_build_dir = env['BF_DOCDIR'] if not B.root_build_dir[-1]==os.sep: - B.root_build_dir += os.sep + B.root_build_dir += os.sep if not B.doc_build_dir[-1]==os.sep: - B.doc_build_dir += os.sep - + B.doc_build_dir += os.sep + # We do a shortcut for clean when no quicklist is given: just delete # builddir without reading in SConscripts do_clean = None if 'clean' in B.targets: - do_clean = True + do_clean = True if not quickie and do_clean: - if os.path.exists(B.doc_build_dir): - print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC - dirs = os.listdir(B.doc_build_dir) - for entry in dirs: - if os.path.isdir(B.doc_build_dir + entry) == 1: - print "clean dir %s"%(B.doc_build_dir+entry) - shutil.rmtree(B.doc_build_dir+entry) - else: # remove file - print "remove file %s"%(B.doc_build_dir+entry) - os.remove(B.root_build_dir+entry) - if os.path.exists(B.root_build_dir): - print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC - dirs = os.listdir(B.root_build_dir) - for dir in dirs: - if os.path.isdir(B.root_build_dir + dir) == 1: - print "clean dir %s"%(B.root_build_dir+dir) - shutil.rmtree(B.root_build_dir+dir) - for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak', - 'extern/xvidcore/build/generic/platform.inc']: - if os.path.exists(confile): - print "clean file %s"%confile - os.remove(confile) - - if platform in ('win32-vc', 'win32-mingw'): - makesdnafile = B.root_build_dir+'makesdna.exe' - else: - makesdnafile = B.root_build_dir+'makesdna' - if os.path.exists(makesdnafile): - print "removing", makesdnafile - os.remove(makesdnafile) - print B.bc.OKGREEN+'...done'+B.bc.ENDC - else: - print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC - Exit() + if os.path.exists(B.doc_build_dir): + print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC + dirs = os.listdir(B.doc_build_dir) + for entry in dirs: + if os.path.isdir(B.doc_build_dir + entry) == 1: + print "clean dir %s"%(B.doc_build_dir+entry) + shutil.rmtree(B.doc_build_dir+entry) + else: # remove file + print "remove file %s"%(B.doc_build_dir+entry) + os.remove(B.root_build_dir+entry) + if os.path.exists(B.root_build_dir): + print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC + dirs = os.listdir(B.root_build_dir) + for entry in dirs: + if os.path.isdir(B.root_build_dir + entry) == 1: + print "clean dir %s"%(B.root_build_dir+entry) + shutil.rmtree(B.root_build_dir+entry) + else: # remove file + print "remove file %s"%(B.root_build_dir+entry) + os.remove(B.root_build_dir+entry) + for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak', + 'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']: + if os.path.exists(confile): + print "clean file %s"%confile + if os.path.isdir(confile): + for root, dirs, files in os.walk(confile): + for name in files: + os.remove(os.path.join(root, name)) + else: + os.remove(confile) + print B.bc.OKGREEN+'...done'+B.bc.ENDC + else: + print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC + Exit() if not os.path.isdir ( B.root_build_dir): - os.makedirs ( B.root_build_dir ) - os.makedirs ( B.root_build_dir + 'source' ) - os.makedirs ( B.root_build_dir + 'intern' ) - os.makedirs ( B.root_build_dir + 'extern' ) - os.makedirs ( B.root_build_dir + 'lib' ) - os.makedirs ( B.root_build_dir + 'bin' ) + os.makedirs ( B.root_build_dir ) + os.makedirs ( B.root_build_dir + 'source' ) + os.makedirs ( B.root_build_dir + 'intern' ) + os.makedirs ( B.root_build_dir + 'extern' ) + os.makedirs ( B.root_build_dir + 'lib' ) + os.makedirs ( B.root_build_dir + 'bin' ) if not os.path.isdir(B.doc_build_dir): - os.makedirs ( B.doc_build_dir ) + os.makedirs ( B.doc_build_dir ) Help(opts.GenerateHelpText(env)) @@ -351,10 +365,10 @@ Help(opts.GenerateHelpText(env)) # commands, do 'scons BF_QUIET=0' bf_quietoutput = B.arguments.get('BF_QUIET', '1') if env['BF_QUIET']: - B.set_quiet_output(env) + B.set_quiet_output(env) else: - if toolset=='msvc': - B.msvc_hack(env) + if toolset=='msvc': + B.msvc_hack(env) print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir env.SConsignFile(B.root_build_dir+'scons-signatures') @@ -376,23 +390,23 @@ SConscript(B.root_build_dir+'/source/SConscript') # libraries to give as objects to linking phase mainlist = [] for tp in B.possible_types: - if not tp == 'player' and not tp == 'player2': - mainlist += B.create_blender_liblist(env, tp) + if not tp == 'player': + mainlist += B.create_blender_liblist(env, tp) if B.arguments.get('BF_PRIORITYLIST', '0')=='1': - B.propose_priorities() + B.propose_priorities() dobj = B.buildinfo(env, "dynamic") + B.resources thestatlibs, thelibincs = B.setup_staticlibs(env) thesyslibs = B.setup_syslibs(env) if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']: - env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') + env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender') if env['WITH_BF_PLAYER']: - playerlist = B.create_blender_liblist(env, 'player') - env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') - - + playerlist = B.create_blender_liblist(env, 'player') + playerlist += B.create_blender_liblist(env, 'intern') + playerlist += B.create_blender_liblist(env, 'extern') + env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') ##### Now define some targets @@ -400,22 +414,19 @@ if env['WITH_BF_PLAYER']: #------------ INSTALL #-- binaries - blenderinstall = [] if env['OURPLATFORM']=='darwin': - for prg in B.program_list: - bundle = '%s.app' % prg[0] - bundledir = os.path.dirname(bundle) - for dp, dn, df in os.walk(bundle): - if 'CVS' in dn: - dn.remove('CVS') - if '.svn' in dn: - dn.remove('.svn') - dir=env['BF_INSTALLDIR']+dp[len(bundledir):] - source=[dp+os.sep+f for f in df] - blenderinstall.append(env.Install(dir=dir,source=source)) + for prg in B.program_list: + bundle = '%s.app' % prg[0] + bundledir = os.path.dirname(bundle) + for dp, dn, df in os.walk(bundle): + if '.svn' in dn: + dn.remove('.svn') + dir=env['BF_INSTALLDIR']+dp[len(bundledir):] + source=[dp+os.sep+f for f in df] + blenderinstall.append(env.Install(dir=dir,source=source)) else: - blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list) + blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list) #-- .blender #- dont do .blender and scripts for darwin, it is already in the bundle @@ -424,30 +435,38 @@ dottargetlist = [] scriptinstall = [] if env['OURPLATFORM']!='darwin': - for dp, dn, df in os.walk('bin/.blender'): - if 'CVS' in dn: - dn.remove('CVS') - if '.svn' in dn: - dn.remove('.svn') - for f in df: - dotblendlist.append(dp+os.sep+f) - dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f) + for dp, dn, df in os.walk('bin/.blender'): + if '.svn' in dn: + dn.remove('.svn') + + for f in df: + if not env['WITH_BF_INTERNATIONAL']: + if 'locale' in dp: + continue + if f == '.Blanguages': + continue + if not env['WITH_BF_FREETYPE']: + if f.endswith('.ttf'): + continue + + dotblendlist.append(os.path.join(dp, f)) + dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f) - dotblenderinstall = [] - for targetdir,srcfile in zip(dottargetlist, dotblendlist): - td, tf = os.path.split(targetdir) - dotblenderinstall.append(env.Install(dir=td, source=srcfile)) - - #-- .blender/scripts - scriptpath='release/scripts' - for dp, dn, df in os.walk(scriptpath): - if 'CVS' in dn: - dn.remove('CVS') - if '.svn' in dn: - dn.remove('.svn') - dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):] - source=[dp+os.sep+f for f in df] - scriptinstall.append(env.Install(dir=dir,source=source)) + dotblenderinstall = [] + for targetdir,srcfile in zip(dottargetlist, dotblendlist): + td, tf = os.path.split(targetdir) + dotblenderinstall.append(env.Install(dir=td, source=srcfile)) + + if env['WITH_BF_PYTHON']: + #-- .blender/scripts, .blender/ui, .blender/io + scriptpaths=['release/scripts', 'release/ui', 'release/io'] + for scriptpath in scriptpaths: + for dp, dn, df in os.walk(scriptpath): + if '.svn' in dn: + dn.remove('.svn') + dir=env['BF_INSTALLDIR']+'/.blender/'+os.path.basename(scriptpath)+dp[len(scriptpath):] + source=[dp+os.sep+f for f in df] + scriptinstall.append(env.Install(dir=dir,source=source)) #-- icons if env['OURPLATFORM']=='linux2': @@ -455,12 +474,9 @@ if env['OURPLATFORM']=='linux2': icontargetlist = [] for tp, tn, tf in os.walk('release/freedesktop/icons'): - if 'CVS' in tn: - tn.remove('CVS') if '.svn' in tn: tn.remove('.svn') for f in tf: - print ">>>", env['BF_INSTALLDIR'], tp, f iconlist.append(tp+os.sep+f) icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f) @@ -469,18 +485,22 @@ if env['OURPLATFORM']=='linux2': td, tf = os.path.split(targetdir) iconinstall.append(env.Install(dir=td, source=srcfile)) +# dlls for linuxcross +# TODO - add more libs, for now this lets blenderlite run +if env['OURPLATFORM']=='linuxcross': + dir=env['BF_INSTALLDIR'] + source = ['../lib/windows/pthreads/lib/pthreadGC2.dll'] + scriptinstall.append(env.Install(dir=dir, source=source)) + #-- plugins pluglist = [] plugtargetlist = [] for tp, tn, tf in os.walk('release/plugins'): - if 'CVS' in tn: - tn.remove('CVS') - if '.svn' in tn: - tn.remove('.svn') - for f in tf: - print ">>>", env['BF_INSTALLDIR'], tp, f - pluglist.append(tp+os.sep+f) - plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f) + if '.svn' in tn: + tn.remove('.svn') + for f in tf: + pluglist.append(tp+os.sep+f) + plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f) # header files for plugins pluglist.append('source/blender/blenpluginapi/documentation.h') @@ -500,59 +520,69 @@ plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'incl plugininstall = [] for targetdir,srcfile in zip(plugtargetlist, pluglist): - td, tf = os.path.split(targetdir) - plugininstall.append(env.Install(dir=td, source=srcfile)) + td, tf = os.path.split(targetdir) + plugininstall.append(env.Install(dir=td, source=srcfile)) textlist = [] texttargetlist = [] for tp, tn, tf in os.walk('release/text'): - if 'CVS' in tn: - tn.remove('CVS') - if '.svn' in tn: - tn.remove('.svn') - for f in tf: - textlist.append(tp+os.sep+f) + if '.svn' in tn: + tn.remove('.svn') + for f in tf: + textlist.append(tp+os.sep+f) textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist) if env['OURPLATFORM']=='darwin': - allinstall = [blenderinstall, plugininstall, textinstall] + allinstall = [blenderinstall, plugininstall, textinstall] elif env['OURPLATFORM']=='linux2': - allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall] + allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall] else: - allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall] + allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall] -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): - dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll', - '${LCGDIR}/png/lib/libpng.dll', - '#release/windows/extra/python25.zip', - '#release/windows/extra/zlib.pyd', - '${LCGDIR}/sdl/lib/SDL.dll', - '${LCGDIR}/zlib/lib/zlib.dll', - '${LCGDIR}/tiff/lib/libtiff.dll'] - if env['BF_DEBUG']: - dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}_d.dll') - else: - dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll') - if env['OURPLATFORM'] == 'win32-mingw': - dllsources += ['${LCGDIR}/pthreads/lib/pthreadGC2.dll'] - else: - dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll'] - if env['WITH_BF_ICONV']: - dllsources += ['${LCGDIR}/iconv/lib/iconv.dll'] - if env['WITH_BF_FFMPEG']: - dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll', - '${LCGDIR}/ffmpeg/lib/avformat-52.dll', - '${LCGDIR}/ffmpeg/lib/avdevice-52.dll', - '${LCGDIR}/ffmpeg/lib/avutil-49.dll', - '${LCGDIR}/ffmpeg/lib/libfaad-0.dll', - '${LCGDIR}/ffmpeg/lib/libfaac-0.dll', - '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll', - '${LCGDIR}/ffmpeg/lib/libx264-59.dll', - '${LCGDIR}/ffmpeg/lib/xvidcore.dll', - '${LCGDIR}/ffmpeg/lib/swscale-0.dll'] - windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) - allinstall += windlls +if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'): + if env['OURPLATFORM'] == 'win64-vc': + dllsources = [] + else: + dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll', + '${BF_PNG_LIBPATH}/libpng.dll', + '${BF_ZLIB_LIBPATH}/zlib.dll', + '${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll'] + dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll'] + if env['WITH_BF_SDL']: + if env['OURPLATFORM'] == 'win64-vc': + pass # we link statically already to SDL on win64 + else: + dllsources.append('${BF_SDL_LIBPATH}/SDL.dll') + if env['WITH_BF_PYTHON']: + ver = env["BF_PYTHON_VERSION"].replace(".", "") + + dllsources.append('${LCGDIR}/release/python' + ver + '.zip') + dllsources.append('${LCGDIR}/release/zlib.pyd') + if env['BF_DEBUG']: + dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}_d.dll') + else: + dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}.dll') + if env['WITH_BF_ICONV']: + if env['OURPLATFORM'] == 'win64-vc': + pass # we link statically to iconv on win64 + else: + dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll'] + if env['WITH_BF_OPENAL']: + dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll') + dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll') + if env['WITH_BF_SNDFILE']: + dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll') + if env['WITH_BF_FFMPEG']: + dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll', + '${LCGDIR}/ffmpeg/lib/avformat-52.dll', + '${LCGDIR}/ffmpeg/lib/avdevice-52.dll', + '${LCGDIR}/ffmpeg/lib/avutil-50.dll', + '${LCGDIR}/ffmpeg/lib/swscale-0.dll'] + if env['WITH_BF_JACK']: + dllsources += ['${LCGDIR}/jack/lib/libjack.dll'] + windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) + allinstall += windlls installtarget = env.Alias('install', allinstall) bininstalltarget = env.Alias('install-bin', blenderinstall) @@ -566,12 +596,12 @@ if 'blender' in B.targets: Depends(blenderexe,installtarget) if env['WITH_BF_PLAYER']: - blenderplayer = env.Alias('blenderplayer', B.program_list) - Depends(blenderplayer,installtarget) + blenderplayer = env.Alias('blenderplayer', B.program_list) + Depends(blenderplayer,installtarget) if not env['WITH_BF_GAMEENGINE']: - blendernogame = env.Alias('blendernogame', B.program_list) - Depends(blendernogame,installtarget) + blendernogame = env.Alias('blendernogame', B.program_list) + Depends(blendernogame,installtarget) if 'blenderlite' in B.targets: blenderlite = env.Alias('blenderlite', B.program_list) @@ -582,16 +612,17 @@ Depends(nsiscmd, allinstall) Default(B.program_list) if not env['WITHOUT_BF_INSTALL']: - Default(installtarget) - -#------------ RELEASE -# TODO: zipup the installation - -#------------ BLENDERPLAYER -# TODO: build stubs and link into blenderplayer + Default(installtarget) #------------ EPYDOC if env['WITH_BF_DOCS']: - SConscript('source/blender/python/api2_2x/doc/SConscript') - SConscript('source/gameengine/PyDoc/SConscript') + try: import epydoc + except: epydoc = None + + if epydoc: + SConscript('source/blender/python/api2_2x/doc/SConscript') + SConscript('source/gameengine/PyDoc/SConscript') + else: + print "No epydoc install detected, Python API and Gameengine API Docs will not be generated " + diff --git a/blenderplayer/CMakeLists.txt b/blenderplayer/CMakeLists.txt deleted file mode 100644 index f02650f7ea0..00000000000 --- a/blenderplayer/CMakeLists.txt +++ /dev/null @@ -1,135 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -MESSAGE(STATUS "Configuring blenderplayer") - -SETUP_LIBDIRS() - -IF(WITH_QUICKTIME) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_QUICKTIME) - -IF(LINUX) - ADD_DEFINITIONS(-DWITH_BINRELOC) - INCLUDE_DIRECTORIES(${BINRELOC_INC}) -endif(LINUX) - -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c - COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/ - DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna -) - -IF(WIN32) - ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc) -ELSE(WIN32) - ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c) -ENDIF(WIN32) - -ADD_DEPENDENCIES(blenderplayer makesdna) - -FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) - -SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc) - -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") - -IF(UNIX) - # Sort libraries - SET(BLENDER_SORTED_LIBS - gp_ghost - gp_common - bf_string - bf_ghost - bf_blenkernel - verse - bf_blenkernel - bf_decimation - bf_blenloader - bf_blenpluginapi - bf_blroutines - bf_converter - bf_sumo - bf_ketsji - extern_solid - extern_qhull - bf_bullet - bf_common - bf_dummy - bf_logic - bf_rasterizer - bf_oglrasterizer - bf_expressions - bf_scenegraph - bf_IK - bf_moto - bf_soundsystem - bf_kernel - bf_nodes - bf_gpu - bf_imbuf - bf_avi - kx_network - bf_ngnetwork - bf_loopbacknetwork - extern_bullet - bf_guardedalloc - bf_memutil - bf_bmfont - bf_blenlib - bf_cineon - bf_openexr - bf_dds - bf_ftfont - extern_ftgl - bf_readblenfile - blenkernel_blc - bf_quicktime - extern_binreloc - extern_glew - ) - - FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) - SET(REMLIB ${SORTLIB}) - FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS}) - IF(${SEARCHLIB} STREQUAL ${SORTLIB}) - SET(REMLIB "") - ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB}) - ENDFOREACH(SEARCHLIB) - IF(REMLIB) - MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured") - LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) - ENDIF(REMLIB) - ENDFOREACH(SORTLIB) - - TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS}) -ELSE(UNIX) - TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS}) -ENDIF(UNIX) - -SETUP_LIBLINKS(blenderplayer) diff --git a/config/darwin-config.py b/config/darwin-config.py index 547d655b531..92f70d716fc 100644 --- a/config/darwin-config.py +++ b/config/darwin-config.py @@ -1,17 +1,8 @@ -# -# Note : if you want to alter this file -# copy it as a whole in the upper folder -# as user-config.py -# dont create a new file with only some -# vars changed. - import commands # IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs USE_SDK=True -BF_PYTHON_VERSION = '2.3' - cmd = 'uname -p' MAC_PROC=commands.getoutput(cmd) cmd = 'uname -r' @@ -29,6 +20,8 @@ else : LCGDIR = '#../lib/darwin-8.x.i386' LIBDIR = '${LCGDIR}' +BF_PYTHON_VERSION = '3.1' + if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3': MAC_MIN_VERS = '10.3' MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk' @@ -39,46 +32,53 @@ else: # enable ffmpeg support WITH_BF_FFMPEG = True # -DWITH_FFMPEG -BF_FFMPEG = "#extern/ffmpeg" -BF_FFMPEG_INC = '${BF_FFMPEG}/include' -if USE_SDK==True: - BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS -#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' -#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a' - -WITH_BF_VERSE = False -BF_VERSE = "#extern/verse/dist" -BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist" -BF_VERSE_INCLUDE = BF_VERSE -BF_VERSE_LIBS = "libverse" - -# python.org libs install in /library we want to use that for 2.5 -# -# if you want py2.5 on leopard without installing -# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/' -# BEWARE: in that case it will work only on leopard - -if BF_PYTHON_VERSION=='2.3': - BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/' +FFMPEG_PRECOMPILED = False +if FFMPEG_PRECOMPILED: + # use precompiled ffmpeg in /lib + BF_FFMPEG = LIBDIR + '/ffmpeg' + BF_FFMPEG_INC = "#extern/ffmpeg" + BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' + BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore' else: - BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/' + # use ffmpeg in extern + BF_FFMPEG = "#extern/ffmpeg" + BF_FFMPEG_INC = '${BF_FFMPEG}' + if USE_SDK==True: + BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS + BF_XVIDCORE_CONFIG = '--disable-assembly' # currently causes errors, even with yasm installed + BF_X264_CONFIG = '--disable-pthread' -BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}' -BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}' -BF_PYTHON_LIB = '' -BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config' -BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python' -if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4': - BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS +if BF_PYTHON_VERSION=='3.1': + # python 3.1 uses precompiled libraries in bf svn /lib by default + + BF_PYTHON = LIBDIR + '/python' + BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' + # BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' + BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' + BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}' + # BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System'] +else: + # python 2.5 etc. uses built-in framework + + # python.org libs install in /library we want to use that for 2.5 + # + # if you want py2.5 on leopard without installing + # change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/' + # BEWARE: in that case it will work only on leopard + + BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/' + + BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}' + BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}' + BF_PYTHON_LIB = '' + BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config' + BF_PYTHON_LINKFLAGS = ['-u','_PyMac_Error','-framework','System','-framework','Python'] + if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4': + BF_PYTHON_LINKFLAGS = ['-u', '__dummy']+BF_PYTHON_LINKFLAGS BF_QUIET = '1' WITH_BF_OPENMP = '0' -# Note : should be true, but openal simply dont work on intel -if MAC_PROC == 'i386': - WITH_BF_OPENAL = False -else: - WITH_BF_OPENAL = True #different lib must be used following version of gcc # for gcc 3.3 #BF_OPENAL = LIBDIR + '/openal' @@ -100,15 +100,30 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' +BF_LIBSAMPLERATE = LIBDIR + '/samplerate' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'samplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + +# TODO - set proper paths here (add precompiled to lib/ ? ) +WITH_BF_JACK = False +BF_JACK = '/usr' +BF_JACK_INC = '${BF_JACK}/include/jack' +BF_JACK_LIB = 'jack' +BF_JACK_LIBPATH = '${BF_JACK}/lib' + +WITH_BF_SNDFILE = False +BF_SNDFILE = LIBDIR + '/sndfile' +BF_SNDFILE_INC = '${BF_SNDFILE}/include' +BF_SNDFILE_LIB = 'sndfile' +BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib' + WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix) BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags) BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer BF_SDL_LIBPATH = '${BF_SDL}/lib' -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = True WITH_BF_STATICOPENEXR = False BF_OPENEXR = '${LCGDIR}/openexr' @@ -147,29 +162,19 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'intl' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = '#extern/bFTGL' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - WITH_BF_GAMEENGINE=True -WITH_BF_PLAYER=True - -WITH_BF_ODE = False -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = '${BF_ODE}/include' -BF_ODE_LIB = '${BF_ODE}/lib/libode.a' +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' - -WITH_BF_YAFRAY = True +WITH_BF_FFTW3 = False +BF_FFTW3 = LIBDIR + '/fftw3' +BF_FFTW3_INC = '${BF_FFTW3}/include' +BF_FFTW3_LIB = 'libfftw3' +BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib' #WITH_BF_NSPR = True #BF_NSPR = $(LIBDIR)/nspr @@ -206,28 +211,28 @@ BF_ICONV_LIB = 'iconv' WITH_BF_STATICOPENGL = True BF_OPENGL_LIB = 'GL GLU' BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries' -BF_OPENGL_LINKFLAGS = '-framework OpenGL' +BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL'] CFLAGS = ['-pipe','-fPIC','-funsigned-char'] CPPFLAGS = ['-fpascal-strings'] CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings'] CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings'] -PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime' +PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','QuickTime'] #note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4 -LLIBS = 'stdc++ SystemStubs' +LLIBS = ['stdc++', 'SystemStubs'] # some flags shuffling for different Os versions if MAC_MIN_VERS == '10.3': CFLAGS = ['-fuse-cxa-atexit']+CFLAGS CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS - PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS - LLIBS = LLIBS + ' crt3.o' + PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit']+PLATFORM_LINKFLAGS + LLIBS.append('crt3.o') if USE_SDK==True: SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS] - PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS + PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS, '-Wl,-syslibroot,' + MACOSX_SDK]+PLATFORM_LINKFLAGS CCFLAGS=SDK_FLAGS+CCFLAGS CXXFLAGS=SDK_FLAGS+CXXFLAGS @@ -260,11 +265,12 @@ CC_WARN = ['-Wall', '-Wno-long-double'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) -BF_PROFILE_FLAGS = ' -pg -g ' +BF_PROFILE_CCFLAGS = ['-pg', '-g '] +BF_PROFILE_LINKFLAGS = ['-pg'] BF_PROFILE = False BF_DEBUG = False -BF_DEBUG_FLAGS = '-g' +BF_DEBUG_CCFLAGS = ['-g'] BF_BUILDDIR='../build/darwin' BF_INSTALLDIR='../install/darwin' diff --git a/config/irix6-config.py b/config/irix6-config.py new file mode 100644 index 00000000000..d38665f282a --- /dev/null +++ b/config/irix6-config.py @@ -0,0 +1,209 @@ +import os + +LCGDIR = os.getcwd()+"/../lib/irix-6.5-mips" +LIBDIR = LCGDIR + +BF_PYTHON = LCGDIR+'/python' +BF_PYTHON_VERSION = '2.5' +WITH_BF_STATICPYTHON = 'true' +BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' +BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' +BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a' +BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic'] +BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python2.5/config/libpython${BF_PYTHON_VERSION}.a' + +WITH_BF_OPENAL = 'true' +WITH_BF_STATICOPENAL = 'true' +BF_OPENAL = LCGDIR+'/openal' +BF_OPENAL_INC = '${BF_OPENAL}/include' +BF_OPENAL_LIB = 'openal' +BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' +BF_OPENAL_LIBPATH = LIBDIR + '/lib' + +BF_CXX = '/usr' +WITH_BF_STATICCXX = 'false' +BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' + +BF_LIBSAMPLERATE = LCGDIR+'/samplerate' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'samplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + +WITH_BF_SDL = 'true' +BF_SDL = LCGDIR+'/sdl' #$(shell sdl-config --prefix) +BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) +BF_SDL_LIB = 'SDL audio iconv charset' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer +BF_SDL_LIBPATH = '${BF_SDL}/lib' + +WITH_BF_OPENEXR = 'false' +WITH_BF_STATICOPENEXR = 'false' +BF_OPENEXR = '/usr' +# when compiling with your own openexr lib you might need to set... +# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include' + +BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR' +BF_OPENEXR_LIB = 'Half IlmImf Iex Imath ' +BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a' +# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib' + + +WITH_BF_DDS = 'false' + +WITH_BF_JPEG = 'false' +BF_JPEG = LCGDIR+'/jpeg' +BF_JPEG_INC = '${BF_JPEG}/include' +BF_JPEG_LIB = 'jpeg' +BF_JPEG_LIBPATH = '${BF_JPEG}/lib' + +WITH_BF_PNG = 'false' +BF_PNG = LCGDIR+"/png" +BF_PNG_INC = '${BF_PNG}/include' +BF_PNG_LIB = 'png' +BF_PNG_LIBPATH = '${BF_PNG}/lib' + +BF_TIFF = '/usr/nekoware' +BF_TIFF_INC = '${BF_TIFF}/include' + +WITH_BF_ZLIB = 'true' +BF_ZLIB = LCGDIR+"/zlib" +BF_ZLIB_INC = '${BF_ZLIB}/include' +BF_ZLIB_LIB = 'z' +BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' + +WITH_BF_INTERNATIONAL = 'true' + +BF_GETTEXT = LCGDIR+'/gettext' +BF_GETTEXT_INC = '${BF_GETTEXT}/include' +BF_GETTEXT_LIB = 'gettextpo intl' +BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' + +WITH_BF_GAMEENGINE='false' +WITH_BF_PLAYER = 'false' + +WITH_BF_BULLET = 'true' +BF_BULLET = '#extern/bullet2/src' +BF_BULLET_INC = '${BF_BULLET}' +BF_BULLET_LIB = 'extern_bullet' + +#WITH_BF_NSPR = 'true' +#BF_NSPR = $(LIBDIR)/nspr +#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr +#BF_NSPR_LIB = + +# Uncomment the following line to use Mozilla inplace of netscape +#CPPFLAGS += -DMOZ_NOT_NET +# Location of MOZILLA/Netscape header files... +#BF_MOZILLA = $(LIBDIR)/mozilla +#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl +#BF_MOZILLA_LIB = +# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB +# if this is not set. +# +# Be paranoid regarding library creation (do not update archives) +#BF_PARANOID = 'true' + +# enable freetype2 support for text objects +BF_FREETYPE = LCGDIR+'/freetype' +BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' +BF_FREETYPE_LIB = 'freetype' +BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib' + +WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME +BF_QUICKTIME = '/usr/local' +BF_QUICKTIME_INC = '${BF_QUICKTIME}/include' + +WITH_BF_ICONV = 'true' +BF_ICONV = LIBDIR + "/iconv" +BF_ICONV_INC = '${BF_ICONV}/include' +BF_ICONV_LIB = 'iconv charset' +BF_ICONV_LIBPATH = '${BF_ICONV}/lib' + +WITH_BF_BINRELOC = 'false' + +# enable ffmpeg support +WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG +# Uncomment the following two lines to use system's ffmpeg +BF_FFMPEG = LCGDIR+'/ffmpeg' +BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice faad faac vorbis x264 ogg mp3lame z' +BF_FFMPEG_INC = '${BF_FFMPEG}/include' +BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' + +# enable ogg, vorbis and theora in ffmpeg +WITH_BF_OGG = 'false' # -DWITH_OGG +BF_OGG = '/usr' +BF_OGG_INC = '${BF_OGG}/include' +BF_OGG_LIB = 'ogg vorbis theoraenc theoradec' + +WITH_BF_OPENJPEG = 'false' +BF_OPENJPEG = '#extern/libopenjpeg' +BF_OPENJPEG_LIB = '' +BF_OPENJPEG_INC = '${BF_OPENJPEG}' +BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib' + +WITH_BF_REDCODE = 'false' +BF_REDCODE = '#extern/libredcode' +BF_REDCODE_LIB = '' +BF_REDCODE_INC = '${BF_REDCODE}/include' +BF_REDCODE_LIBPATH='${BF_REDCODE}/lib' + +# Mesa Libs should go here if your using them as well.... +WITH_BF_STATICOPENGL = 'false' +BF_OPENGL = '/usr' +BF_OPENGL_INC = '${BF_OPENGL}/include' +BF_OPENGL_LIB = 'GL GLU X11 Xi Xext' +BF_OPENGL_LIBPATH = '/usr/X11R6/lib' +BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a' + + +CC = 'c99' +CXX = 'CC' + + +CCFLAGS = ['-pipe','-fPIC', '-n32'] + +CPPFLAGS = ['-DXP_UNIX'] +CXXFLAGS = ['-pipe','-fPIC', '-n32'] +REL_CFLAGS = ['-O2'] +REL_CCFLAGS = ['-O2'] +##BF_DEPEND = 'true' +## +##AR = ar +##ARFLAGS = ruv +##ARFLAGSQUIET = ru +## +C_WARN = '-no_prelink -ptused' + +CC_WARN = '-no_prelink -ptused' + +##FIX_STUBS_WARNINGS = -Wno-unused + +LLIBS = 'c m dl pthread dmedia movie' +##LOPTS = --dynamic +##DYNLDFLAGS = -shared $(LDFLAGS) + +BF_PROFILE_FLAGS = ['-pg','-g'] +BF_PROFILE = 'false' + +BF_DEBUG = 'false' +BF_DEBUG_FLAGS = '-g' + +BF_BUILDDIR = '../build/irix6' +BF_INSTALLDIR='../install/irix6' +BF_DOCDIR='../install/doc' + +#Link against pthread +LDIRS = [] +LDIRS.append(BF_FREETYPE_LIBPATH) +LDIRS.append(BF_PNG_LIBPATH) +LDIRS.append(BF_ZLIB_LIBPATH) +LDIRS.append(BF_SDL_LIBPATH) +LDIRS.append(BF_OPENAL_LIBPATH) +LDIRS.append(BF_ICONV_LIBPATH) + +PLATFORM_LINKFLAGS = [] +for x in LDIRS: + PLATFORM_LINKFLAGS.append("-L"+x) + +PLATFORM_LINKFLAGS += ['-L${LCGDIR}/jpeg/lib' , '-L/usr/lib32', '-n32', '-v', '-no_prelink'] +print PLATFORM_LINKFLAGS +LINKFLAGS= PLATFORM_LINKFLAGS diff --git a/config/linux2-config.py b/config/linux2-config.py index ca07bf10ab8..757b8210e49 100644 --- a/config/linux2-config.py +++ b/config/linux2-config.py @@ -1,11 +1,9 @@ LCGDIR = '../lib/linux2' LIBDIR = "${LCGDIR}" -WITH_BF_VERSE = False -BF_VERSE_INCLUDE = "#extern/verse/dist" - BF_PYTHON = '/usr' -BF_PYTHON_VERSION = '2.5' +BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' +BF_PYTHON_VERSION = '3.1' WITH_BF_STATICPYTHON = False BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' @@ -20,23 +18,32 @@ BF_OPENAL_INC = '${BF_OPENAL}/include' BF_OPENAL_LIB = 'openal' BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' -# some distros have a separate libalut -# if you get linker complaints, you need to uncomment the line below -# BF_OPENAL_LIB = 'openal alut' -# BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a' - BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' +BF_LIBSAMPLERATE = '/usr' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'samplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + +WITH_BF_JACK = False +BF_JACK = '/usr' +BF_JACK_INC = '${BF_JACK}/include/jack' +BF_JACK_LIB = 'jack' +BF_JACK_LIBPATH = '${BF_JACK}/lib' + +WITH_BF_SNDFILE = False +BF_SNDFILE = '/usr' +BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile' +BF_SNDFILE_LIB = 'sndfile' +BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib' + WITH_BF_SDL = True BF_SDL = '/usr' #$(shell sdl-config --prefix) BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = True WITH_BF_STATICOPENEXR = False BF_OPENEXR = '/usr' @@ -76,46 +83,14 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'gettextlib' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = '#extern/bFTGL' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - -WITH_BF_GAMEENGINE=False - -WITH_BF_ODE = False -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = BF_ODE + '/include' -BF_ODE_LIB = BF_ODE + '/lib/libode.a' +WITH_BF_GAMEENGINE = True +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' - -WITH_BF_YAFRAY = True - -#WITH_BF_NSPR = True -#BF_NSPR = $(LIBDIR)/nspr -#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr -#BF_NSPR_LIB = - -# Uncomment the following line to use Mozilla inplace of netscape -#CPPFLAGS += -DMOZ_NOT_NET -# Location of MOZILLA/Netscape header files... -#BF_MOZILLA = $(LIBDIR)/mozilla -#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl -#BF_MOZILLA_LIB = -# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB -# if this is not set. -# -# Be paranoid regarding library creation (do not update archives) -#BF_PARANOID = True - # enable freetype2 support for text objects BF_FREETYPE = '/usr' BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' @@ -139,26 +114,33 @@ BF_FFMPEG = '#extern/ffmpeg' BF_FFMPEG_LIB = '' # Uncomment the following two lines to use system's ffmpeg # BF_FFMPEG = '/usr' -# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil' -BF_FFMPEG_INC = '${BF_FFMPEG}/include' +# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice' +BF_FFMPEG_INC = '${BF_FFMPEG}' BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' # enable ogg, vorbis and theora in ffmpeg WITH_BF_OGG = False # -DWITH_OGG BF_OGG = '/usr' BF_OGG_INC = '${BF_OGG}/include' -BF_OGG_LIB = 'ogg vorbis theoraenc theoradec' +BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec' WITH_BF_OPENJPEG = True BF_OPENJPEG = '#extern/libopenjpeg' BF_OPENJPEG_LIB = '' -BF_OPENJPEG_INC = '${BF_OPENJPEG}/include' +BF_OPENJPEG_INC = '${BF_OPENJPEG}' BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib' +WITH_BF_FFTW3 = False +BF_FFTW3 = LIBDIR + '/usr' +BF_FFTW3_INC = '${BF_FFTW3}/include' +BF_FFTW3_LIB = 'fftw3' +BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib' + WITH_BF_REDCODE = False BF_REDCODE = '#extern/libredcode' BF_REDCODE_LIB = '' -BF_REDCODE_INC = '${BF_REDCODE}/include' +# BF_REDCODE_INC = '${BF_REDCODE}/include' +BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now. BF_REDCODE_LIBPATH='${BF_REDCODE}/lib' # Mesa Libs should go here if your using them as well.... @@ -188,20 +170,22 @@ REL_CCFLAGS = ['-O2'] ##ARFLAGSQUIET = ru ## C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement'] - CC_WARN = ['-Wall'] +CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare'] + ##FIX_STUBS_WARNINGS = -Wno-unused -LLIBS = 'util c m dl pthread stdc++' +LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) -BF_PROFILE_FLAGS = ['-pg','-g'] BF_PROFILE = False +BF_PROFILE_CCFLAGS = ['-pg','-g'] +BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_FLAGS = '-g' +BF_DEBUG_CCFLAGS = ['-g'] BF_BUILDDIR = '../build/linux2' BF_INSTALLDIR='../install/linux2' diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py index c10e9d76cb5..a7ce2dc2908 100644 --- a/config/linuxcross-config.py +++ b/config/linuxcross-config.py @@ -1,11 +1,6 @@ -LCGDIR = '../lib/windows' +LCGDIR = '#../lib/windows' LIBDIR = '${LCGDIR}' -WITH_BF_VERSE = False -BF_VERSE_INCLUDE = "#extern/verse/dist" - -WITH_BF_YAFRAY = True - BF_PYTHON = LIBDIR + '/python' BF_PYTHON_VERSION = '2.5' BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' @@ -27,6 +22,11 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' +BF_LIBSAMPLERATE = LIBDIR + '/samplerate' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'samplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' BF_SDL_INC = '${BF_SDL}/include' @@ -38,9 +38,6 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include' BF_PTHREADS_LIB = 'pthreadGC2' BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib' -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = True WITH_BF_STATICOPENEXR = False BF_OPENEXR = LIBDIR + '/gcc/openexr' @@ -80,26 +77,16 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'gnu_gettext' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = LIBDIR + '/ftgl' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - WITH_BF_GAMEENGINE = False - -WITH_BF_ODE = True -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = BF_ODE + '/include' -BF_ODE_LIB = BF_ODE + '/lib/libode.a' +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' +BF_WINTAB = LIBDIR + '/wintab' +BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE' # enable freetype2 support for text objects BF_FREETYPE = LIBDIR + '/gcc/freetype' @@ -144,7 +131,11 @@ CC_WARN = [ '-Wall' ] LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ] BF_DEBUG = False -BF_DEBUG_FLAGS= '' +BF_DEBUG_CCFLAGS= [] + +BF_PROFILE = False +BF_PROFILE_CCFLAGS = ['-pg','-g'] +BF_PROFILE_LINKFLAGS = ['-pg'] BF_BUILDDIR = '../build/linuxcross' BF_INSTALLDIR='../install/linuxcross' diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py index 0a4f75e3bcc..95649321c07 100644 --- a/config/openbsd3-config.py +++ b/config/openbsd3-config.py @@ -16,15 +16,17 @@ WITH_BF_OPENAL = False #BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' #BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' +BF_LIBSAMPLERATE = '/usr/local' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'samplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + WITH_BF_SDL = True BF_SDL = '/usr/local' #$(shell sdl-config --prefix) BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer BF_SDL_LIBPATH = '${BF_SDL}/lib' -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = False WITH_BF_STATICOPENEXR = False BF_OPENEXR = '/usr/local' @@ -62,29 +64,14 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'intl iconv' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = '#extern/bFTGL' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - WITH_BF_GAMEENGINE=False - -WITH_BF_ODE = False -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = '${BF_ODE}/include' -BF_ODE_LIB = '${BF_ODE}/lib/libode.a' +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' - -WITH_BF_YAFRAY = True - #WITH_BF_NSPR = True #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr @@ -151,15 +138,16 @@ CC_WARN = ['-Wall'] ##FIX_STUBS_WARNINGS = -Wno-unused -LLIBS = 'm stdc++ pthread util' +LLIBS = ['m', 'stdc++', 'pthread', 'util'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) -BF_PROFILE_FLAGS = ' -pg -g ' BF_PROFILE = False +BF_PROFILE_CCFLAGS = ['-pg','-g'] +BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_FLAGS = '-g' +BF_DEBUG_CCFLAGS = ['-g'] BF_BUILDDIR='../build/openbsd3' BF_INSTALLDIR='../install/openbsd3' diff --git a/config/sunos5-config.py b/config/sunos5-config.py index 2343ce69060..8af30e4f4f3 100644 --- a/config/sunos5-config.py +++ b/config/sunos5-config.py @@ -22,15 +22,17 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' +BF_LIBSAMPLERATE = '/usr/local' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'samplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + WITH_BF_SDL = True BF_SDL = '/usr/local' #$(shell sdl-config --prefix) BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) BF_SDL_LIBPATH = '${BF_SDL}/lib' BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = True WITH_BF_STATICOPENEXR = False BF_OPENEXR = '/usr/local' @@ -70,29 +72,14 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'gettextlib' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = '#extern/bFTGL' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - WITH_BF_GAMEENGINE=False - -WITH_BF_ODE = False -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = BF_ODE + '/include' -BF_ODE_LIB = BF_ODE + '/lib/libode.a' +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' - -WITH_BF_YAFRAY = True - #WITH_BF_NSPR = True #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr @@ -127,11 +114,11 @@ BF_ICONV_LIB = 'iconv' BF_ICONV_LIBPATH = '${BF_ICONV}/lib' # enable ffmpeg support -WITH_BF_FFMPEG = False # -DWITH_FFMPEG +WITH_BF_FFMPEG = True # -DWITH_FFMPEG BF_FFMPEG = '/usr/local' BF_FFMPEG_INC = '${BF_FFMPEG}/include' BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' -BF_FFMPEG_LIB = 'avformat avcodec avutil' +BF_FFMPEG_LIB = 'avformat avcodec avutil avdevice' # Mesa Libs should go here if your using them as well.... WITH_BF_STATICOPENGL = False @@ -165,19 +152,20 @@ CC_WARN = ['-Wall'] ##FIX_STUBS_WARNINGS = -Wno-unused -LLIBS = 'c m dl pthread stdc++' +LLIBS = ['c', 'm', 'dl', 'pthread', 'stdc++'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) -BF_PROFILE_FLAGS = ['-pg','-g'] +BF_PROFILE_CCFLAGS = ['-pg', '-g '] +BF_PROFILE_LINKFLAGS = ['-pg'] BF_PROFILE = False BF_DEBUG = False -BF_DEBUG_FLAGS = '' +BF_DEBUG_CCFLAGS = [] BF_BUILDDIR = '../build/sunos5' BF_INSTALLDIR='../install/sunos5' BF_DOCDIR='../install/doc' -PLATFORM_LINKFLAGS = [''] +PLATFORM_LINKFLAGS = [] diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py index bdeca1ddc91..e3834c41a81 100644 --- a/config/win32-mingw-config.py +++ b/config/win32-mingw-config.py @@ -1,29 +1,42 @@ LCGDIR = '#../lib/windows' LIBDIR = "${LCGDIR}" -WITH_BF_VERSE = False -BF_VERSE_INCLUDE = "#extern/verse/dist" - BF_PYTHON = LIBDIR + '/python' -BF_PYTHON_VERSION = '2.5' +BF_PYTHON_VERSION = '3.1' +WITH_BF_STATICPYTHON = False BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' BF_PYTHON_BINARY = 'python' -BF_PYTHON_LIB = 'python25' +BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}' BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' +BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a' WITH_BF_OPENAL = True -WITH_BF_STATICOPENAL = False BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include' -BF_OPENAL_LIB = 'dxguid openal_static' +BF_OPENAL_LIB = 'wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' -# Warning, this static lib configuration is untested! users of this OS please confirm. -BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' WITH_BF_FFMPEG = False -BF_FFMPEG_LIB = 'avformat swscale avcodec avutil xvidcore x264' -BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib' -BF_FFMPEG_INC = LIBDIR + '/gcc/ffmpeg/include' +BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0' +BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib' +BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include' + +BF_LIBSAMPLERATE = LIBDIR + '/samplerate' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'libsamplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + +WITH_BF_JACK = False +BF_JACK = LIBDIR + '/jack' +BF_JACK_INC = '${BF_JACK}/include' +BF_JACK_LIB = 'libjack' +BF_JACK_LIBPATH = '${BF_JACK}/lib' + +WITH_BF_SNDFILE = False +BF_SNDFILE = LIBDIR + '/sndfile' +BF_SNDFILE_INC = '${BF_SNDFILE}/include' +BF_SNDFILE_LIB = 'libsndfile-1' +BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib' WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' @@ -36,9 +49,6 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include' BF_PTHREADS_LIB = 'pthreadGC2' BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib' -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = True WITH_BF_STATICOPENEXR = False BF_OPENEXR = LIBDIR + '/gcc/openexr' @@ -64,6 +74,8 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib' BF_TIFF = LIBDIR + '/tiff' BF_TIFF_INC = '${BF_TIFF}/include' +BF_TIFF_LIB = 'libtiff' +BF_TIFF_LIBPATH = '${BF_TIFF}/lib' WITH_BF_ZLIB = True BF_ZLIB = LIBDIR + '/zlib' @@ -77,46 +89,17 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'gnu_gettext' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = LIBDIR + '/ftgl' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - WITH_BF_GAMEENGINE = False - -WITH_BF_ODE = True -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = BF_ODE + '/include' -BF_ODE_LIB = BF_ODE + '/lib/libode.a' +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' - BF_WINTAB = LIBDIR + '/wintab' BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE' -WITH_BF_YAFRAY = True - -#WITH_BF_NSPR = True -#BF_NSPR = $(LIBDIR)/nspr -#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr -#BF_NSPR_LIB = - -# Uncomment the following line to use Mozilla inplace of netscape -#CPPFLAGS += -DMOZ_NOT_NET -# Location of MOZILLA/Netscape header files... -#BF_MOZILLA = $(LIBDIR)/mozilla -#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl -#BF_MOZILLA_LIB = -# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB -# if this is not set. - # enable freetype2 support for text objects BF_FREETYPE = LIBDIR + '/gcc/freetype' BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' @@ -160,11 +143,13 @@ CC_WARN = [ '-Wall' ] LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++'] BF_DEBUG = False -BF_DEBUG_FLAGS= '-g' +BF_DEBUG_CCFLAGS= ['-g'] -BF_PROFILE_FLAGS = ['-pg','-g'] +BF_PROFILE_CCFLAGS = ['-pg', '-g'] +BF_PROFILE_LINKFLAGS = ['-pg'] +BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS BF_PROFILE = False BF_BUILDDIR = '..\\build\\win32-mingw' BF_INSTALLDIR='..\\install\\win32-mingw' -BF_DOCDIR = '..\\install\\doc' \ No newline at end of file +BF_DOCDIR = '..\\install\\doc' diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index 6cc09748a10..1e993565e98 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -1,36 +1,25 @@ LCGDIR = '#../lib/windows' LIBDIR = '${LCGDIR}' -WITH_BF_VERSE = False -BF_VERSE_INCLUDE = "#extern/verse/dist" - # enable ffmpeg support WITH_BF_FFMPEG = True # -DWITH_FFMPEG BF_FFMPEG = LIBDIR +'/ffmpeg' -BF_FFMPEG_INC = '${BF_FFMPEG}/include' +BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc' BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' -BF_FFMPEG_LIB = 'avformat-52.lib avcodec-51.lib avdevice-52.lib avutil-49.lib swscale-0.lib' +BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib' BF_PYTHON = LIBDIR + '/python' -BF_PYTHON_VERSION = '2.5' +BF_PYTHON_VERSION = '3.1' BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' BF_PYTHON_BINARY = 'python' -BF_PYTHON_LIB = 'python25' +BF_PYTHON_LIB = 'python31' BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' WITH_BF_OPENAL = True -WITH_BF_STATICOPENAL = False BF_OPENAL = LIBDIR + '/openal' -BF_OPENAL_INC = '${BF_OPENAL}/include ${BF_OPENAL}/include/AL ' -BF_OPENAL_LIB = 'dxguid openal_static' +BF_OPENAL_INC = '${BF_OPENAL}/include ' +BF_OPENAL_LIB = 'wrap_oal' BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' -# Warning, this static lib configuration is untested! users of this OS please confirm. -BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' - -# TODO - are these useful on win32? -# BF_CXX = '/usr' -# WITH_BF_STATICCXX = False -# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' WITH_BF_ICONV = True BF_ICONV = LIBDIR + '/iconv' @@ -38,6 +27,23 @@ BF_ICONV_INC = '${BF_ICONV}/include' BF_ICONV_LIB = 'iconv' BF_ICONV_LIBPATH = '${BF_ICONV}/lib' +BF_LIBSAMPLERATE = LIBDIR + '/samplerate' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'libsamplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + +WITH_BF_JACK = False +BF_JACK = LIBDIR + '/jack' +BF_JACK_INC = '${BF_JACK}/include' +BF_JACK_LIB = 'libjack' +BF_JACK_LIBPATH = '${BF_JACK}/lib' + +WITH_BF_SNDFILE = False +BF_SNDFILE = LIBDIR + '/sndfile' +BF_SNDFILE_INC = '${BF_SNDFILE}/include' +BF_SNDFILE_LIB = 'libsndfile-1' +BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib' + WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' BF_SDL_INC = '${BF_SDL}/include' @@ -49,9 +55,6 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include' BF_PTHREADS_LIB = 'pthreadVC2' BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib' -WITH_BF_FMOD = False -BF_FMOD = LIBDIR + '/fmod' - WITH_BF_OPENEXR = True WITH_BF_STATICOPENEXR = False BF_OPENEXR = LIBDIR + '/openexr' @@ -77,6 +80,8 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib' BF_TIFF = LIBDIR + '/tiff' BF_TIFF_INC = '${BF_TIFF}/include' +BF_TIFF_LIB = 'libtiff' +BF_TIFF_LIBPATH = '${BF_TIFF}/lib' WITH_BF_ZLIB = True BF_ZLIB = LIBDIR + '/zlib' @@ -91,52 +96,19 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include' BF_GETTEXT_LIB = 'gnu_gettext' BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' -WITH_BF_FTGL = True -BF_FTGL = LIBDIR + '/ftgl' -BF_FTGL_INC = '${BF_FTGL}/include' -BF_FTGL_LIB = 'extern_ftgl' - WITH_BF_GAMEENGINE = True -WITH_BF_PLAYER = True - -WITH_BF_ODE = True -BF_ODE = LIBDIR + '/ode' -BF_ODE_INC = BF_ODE + '/include' -BF_ODE_LIB = BF_ODE + '/lib/libode.a' +WITH_BF_PLAYER = False WITH_BF_BULLET = True BF_BULLET = '#extern/bullet2/src' BF_BULLET_INC = '${BF_BULLET}' BF_BULLET_LIB = 'extern_bullet' -BF_SOLID = '#extern/solid' -BF_SOLID_INC = '${BF_SOLID}' -BF_SOLID_LIB = 'extern_solid' - BF_WINTAB = LIBDIR + '/wintab' BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE' -WITH_BF_YAFRAY = True - WITH_BF_BINRELOC = False -#WITH_BF_NSPR = True -#BF_NSPR = $(LIBDIR)/nspr -#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr -#BF_NSPR_LIB = - -# Uncomment the following line to use Mozilla inplace of netscape -#CPPFLAGS += -DMOZ_NOT_NET -# Location of MOZILLA/Netscape header files... -#BF_MOZILLA = $(LIBDIR)/mozilla -#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl -#BF_MOZILLA_LIB = -# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB -# if this is not set. -# -# Be paranoid regarding library creation (do not update archives) -#BF_PARANOID = True - # enable freetype2 support for text objects BF_WITH_FREETYPE = True BF_FREETYPE = LIBDIR + '/freetype' @@ -150,6 +122,21 @@ BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes' BF_QUICKTIME_LIB = 'qtmlClient' BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries' +WITH_BF_OPENJPEG = True +BF_OPENJPEG = '#extern/libopenjpeg' +BF_OPENJPEG_LIB = '' +BF_OPENJPEG_INC = '${BF_OPENJPEG}' +BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib' + +WITH_BF_FFTW3 = False +BF_FFTW3 = LIBDIR + '/fftw3' +BF_FFTW3_INC = '${BF_FFTW3}/include' +BF_FFTW3_LIB = 'libfftw' +BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib' + +WITH_BF_REDCODE = False +BF_REDCODE_INC = '#extern' + WITH_BF_STATICOPENGL = False BF_OPENGL_INC = '${BF_OPENGL}/include' BF_OPENGL_LIBINC = '${BF_OPENGL}/lib' @@ -160,7 +147,9 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a' CC = 'cl.exe' CXX = 'cl.exe' -CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT'] +CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267'] +CXXFLAGS = ['/EHsc'] +BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE'] BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr'] @@ -173,21 +162,14 @@ C_WARN = [] CC_WARN = [] CXX_WARN = [] -LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid' +LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid'] -PLATFORM_LINKFLAGS = ''' - /SUBSYSTEM:CONSOLE - /MACHINE:IX86 - /ENTRY:mainCRTStartup - /INCREMENTAL:NO - /NODEFAULTLIB:"msvcprt.lib" - /NODEFAULTLIB:"glut32.lib" - /NODEFAULTLIB:"libc.lib" - /NODEFAULTLIB:"libcd.lib" - /NODEFAULTLIB:"libcpd.lib" - /NODEFAULTLIB:"libcp.lib" - /LARGEADDRESSAWARE - ''' +PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"', '/LARGEADDRESSAWARE'] + +# # Todo +# BF_PROFILE_CCFLAGS = ['-pg', '-g '] +# BF_PROFILE_LINKFLAGS = ['-pg'] +# BF_PROFILE = False BF_BUILDDIR = '..\\build\\win32-vc' BF_INSTALLDIR='..\\install\\win32-vc' diff --git a/config/win64-vc-config.py b/config/win64-vc-config.py new file mode 100644 index 00000000000..ce2fd8cd405 --- /dev/null +++ b/config/win64-vc-config.py @@ -0,0 +1,203 @@ +LCGDIR = '#../lib/win64' +LIBDIR = '${LCGDIR}' + +# enable ffmpeg support +WITH_BF_FFMPEG = False # -DWITH_FFMPEG +BF_FFMPEG = LIBDIR +'/ffmpeg' +BF_FFMPEG_INC = '${BF_FFMPEG}/include' +BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' +BF_FFMPEG_LIB = 'avformat-52.lib avcodec-51.lib avdevice-52.lib avutil-49.lib swscale-0.lib' + +BF_PYTHON = LIBDIR + '/python' +BF_PYTHON_VERSION = '3.1' +BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' +BF_PYTHON_BINARY = 'python' +BF_PYTHON_LIB = 'python31' +BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' + +WITH_BF_OPENAL = False +BF_OPENAL = LIBDIR + '/openal' +BF_OPENAL_INC = '${BF_OPENAL}/include ' +BF_OPENAL_LIB = 'wrap_oal' +BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' + +# TODO - are these useful on win32? +# BF_CXX = '/usr' +# WITH_BF_STATICCXX = False +# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' + +WITH_BF_ICONV = True +BF_ICONV = LIBDIR + '/iconv' +BF_ICONV_INC = '${BF_ICONV}/include' +BF_ICONV_LIB = 'iconv' +BF_ICONV_LIBPATH = '${BF_ICONV}/lib' + +BF_LIBSAMPLERATE = LIBDIR + '/samplerate' +BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' +BF_LIBSAMPLERATE_LIB = 'libsamplerate' +BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' + +WITH_BF_SDL = True +BF_SDL = LIBDIR + '/sdl' +BF_SDL_INC = '${BF_SDL}/include' +BF_SDL_LIB = 'SDL.lib' +BF_SDL_LIBPATH = '${BF_SDL}/lib' + +BF_PTHREADS = LIBDIR + '/pthreads' +BF_PTHREADS_INC = '${BF_PTHREADS}/include' +BF_PTHREADS_LIB = 'pthreadVC2' +BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib' + +WITH_BF_FMOD = False +BF_FMOD = LIBDIR + '/fmod' + +WITH_BF_OPENEXR = True +WITH_BF_STATICOPENEXR = False +BF_OPENEXR = LIBDIR + '/openexr' +BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath ' +BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread ' +BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008' +# Warning, this static lib configuration is untested! users of this OS please confirm. +BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a' + +WITH_BF_DDS = True + +WITH_BF_JPEG = True +BF_JPEG = LIBDIR + '/jpeg' +BF_JPEG_INC = '${BF_JPEG}/include' +BF_JPEG_LIB = 'libjpeg' +BF_JPEG_LIBPATH = '${BF_JPEG}/lib' + +WITH_BF_PNG = True +BF_PNG = LIBDIR + '/png' +BF_PNG_INC = '${BF_PNG}/include' +BF_PNG_LIB = 'libpng' +BF_PNG_LIBPATH = '${BF_PNG}/lib' + +BF_TIFF = LIBDIR + '/tiff' +BF_TIFF_INC = '${BF_TIFF}/include' +BF_TIFF_LIB = 'libtiff' +BF_TIFF_LIBPATH = '${BF_TIFF}/lib' + +WITH_BF_ZLIB = True +BF_ZLIB = LIBDIR + '/zlib' +BF_ZLIB_INC = '${BF_ZLIB}/include' +BF_ZLIB_LIB = 'libz' +BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' + +WITH_BF_INTERNATIONAL = False + +BF_GETTEXT = LIBDIR + '/gettext' +BF_GETTEXT_INC = '${BF_GETTEXT}/include' +BF_GETTEXT_LIB = 'gettext' +BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' + +WITH_BF_GAMEENGINE = True +WITH_BF_PLAYER = False + +WITH_BF_BULLET = True +BF_BULLET = '#extern/bullet2/src' +BF_BULLET_INC = '${BF_BULLET}' +BF_BULLET_LIB = 'extern_bullet' + +BF_WINTAB = LIBDIR + '/wintab' +BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE' + +WITH_BF_BINRELOC = False + +#WITH_BF_NSPR = True +#BF_NSPR = $(LIBDIR)/nspr +#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr +#BF_NSPR_LIB = + +# Uncomment the following line to use Mozilla inplace of netscape +#CPPFLAGS += -DMOZ_NOT_NET +# Location of MOZILLA/Netscape header files... +#BF_MOZILLA = $(LIBDIR)/mozilla +#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl +#BF_MOZILLA_LIB = +# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB +# if this is not set. +# +# Be paranoid regarding library creation (do not update archives) +#BF_PARANOID = True + +# enable freetype2 support for text objects +BF_WITH_FREETYPE = True +BF_FREETYPE = LIBDIR + '/freetype' +BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' +BF_FREETYPE_LIB = 'freetype2ST' +BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib' + +WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME +BF_QUICKTIME = LIBDIR + '/QTDevWin' +BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes' +BF_QUICKTIME_LIB = 'qtmlClient' +BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries' + +WITH_BF_OPENJPEG = False +BF_OPENJPEG = '#extern/libopenjpeg' +BF_OPENJPEG_LIB = '' +BF_OPENJPEG_INC = '${BF_OPENJPEG}' +BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib' + +WITH_BF_FFTW3 = True +BF_FFTW3 = LIBDIR + '/fftw3' +BF_FFTW3_INC = '${BF_FFTW3}/include' +BF_FFTW3_LIB = 'libfftw' +BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib' + +WITH_BF_REDCODE = False +BF_REDCODE_INC = '#extern' + +WITH_BF_STATICOPENGL = False +BF_OPENGL_INC = '${BF_OPENGL}/include' +BF_OPENGL_LIBINC = '${BF_OPENGL}/lib' +BF_OPENGL_LIB = 'opengl32 glu32' +BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a', + '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a', + '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ] +CC = 'cl.exe' +CXX = 'cl.exe' + +CFLAGS = [] +CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267'] +CXXFLAGS = ['/EHsc'] +BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE2'] + +BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr'] + +CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE'] +REL_CFLAGS = ['-O2', '-DNDEBUG'] +REL_CCFLAGS = ['-O2', '-DNDEBUG'] +REL_CXXFLAGS = ['-O2', '-DNDEBUG'] + +C_WARN = [] +CC_WARN = [] +CXX_WARN = [] + +LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid'] + +WITH_BF_DOCS=False + +BF_DEBUG=False +BF_BSC=False + +if BF_DEBUG: + BF_NUMJOBS=1 +else: + BF_NUMJOBS=6 + +PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"'] + +BF_BUILDDIR = '..\\build\\blender25-win64-vc' +BF_INSTALLDIR='..\\install\\blender25-win64-vc' +BF_DOCDIR='..\\install\\blender25-win64-vc\\doc' + + + +######################### MERGE WITH ABOVE ################################ + + + + diff --git a/doc/blender-scons.txt b/doc/blender-scons.txt index f7ea7767441..016ba39fd09 100644 --- a/doc/blender-scons.txt +++ b/doc/blender-scons.txt @@ -26,8 +26,9 @@ $Id$ ---------------- To build Blender with the SCons scripts you need a full Python - install, version 2.4 or later (http://www.python.org) and a SCons - installation, version v1.1.0 (http://www.scons.org). + install, version 2.4 or later (http://www.python.org). We already provide + a scons-local installation, which can be found in the scons/ subdirectory. + This document uses the scons-local installation for its examples. Check from the page http://www.blender.org/development/building-blender/getting-dependencies/ @@ -38,9 +39,14 @@ $Id$ In the base directory of the sources (from now on called $BLENDERHOME) you'll see a file named SConstruct. This is the entry point for the SCons build system. In a terminal, change to this directory. To just - build, issue the command 'scons': + build, start the SCons entry script on Windows (will be used for the remainder + of this document): - % scons + % python scons\scons.py + + On a Unix-compatible system it would be + + % python ./scons/scons.py This will start the build process with default values. Depending on your platform you may see colour in your output (non-Windows @@ -49,8 +55,9 @@ $Id$ build are configured. The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to - finally copy all needed files to get a proper setup. These - variabbles have default values for every platform in + finally copy all needed files to get a proper setup. The BF_DOCDIR is + used to generate Blender Python documentation files to. These + variables have default values for every platform in $BLENDERHOME/config/(platform)-config.py. After the build successfully completes, you can find everything you need in BF_INSTALLDIR. @@ -59,7 +66,7 @@ $Id$ As an extra dependency, you need the MoreInfo plugin too. The creation of the installer is tied into the build process and can be triggered with: - % scons nsis + % python scons\scons.py nsis Configuring the build @@ -76,20 +83,21 @@ $Id$ (TBD: add cygwin, solaris and freebsd support) These files you will normally not change. If you need to override - a default value, make a copy of the proper configuration to - $BLENDERHOME/user-config.py. This file you can modify to your - likings. Any value set here will override the ones from the - (platform)-config.py. + a default value, make a file called $BLENDERHOME/user-config.py, and copy + settings from the config/(platform)-config.py that you want to change. Don't + copy the entire file (unless explicitely stated in the configuration file), + because you may not get updated options you don't change yourself, which may + result in build errors. You can use BF_CONFIG argument to override the default user-config.py check. This is just like the user-config.py, but just with another name: - % scons BF_CONFIG=myownsettings + % python scons\scons.py BF_CONFIG=myownsettings If you want to quickly test a new setting, you can give the option also on the command-line: - % scons BF_BUILDDIR=../mybuilddir WITH_BF_OPENEXR=0 + % python scons\scons.py BF_BUILDDIR=../mybuilddir WITH_BF_OPENEXR=0 This command sets the build directory to BF_BUILDDIR and disables OpenEXR support. @@ -97,7 +105,7 @@ $Id$ If you need to know what can be set through the command-line, run scons with -h: - % scons -h + % python scons\scons.py -h This command will print a long list with settable options and what every option means. Many of the default values will be empty, and @@ -118,11 +126,11 @@ $Id$ you need to see the full command-line for compiles, then you can change that behaviour. Also the use of colours can be changed: - % scons BF_FANCY=0 + % python scons\scons.py BF_FANCY=0 This will disable the use of colours. - % scons BF_QUIET=0 + % python scons\scons.py BF_QUIET=0 This will give the old, noisy output. Every command-line per compile is printed out in its full glory. This is very useful when @@ -133,11 +141,11 @@ $Id$ Compiling Only Some Libraries ----------------------------- - Scons now has support for specifying a list of libraries that are + Our implementation now has support for specifying a list of libraries that are exclusively compiled, ignoring all other libraries. This is invoked with the BF_QUICK arguments; for example: - % scons BF_QUICK=src,bf_blenkernel + % python scons\scons.py BF_QUICK=src,bf_blenkernel Note that this not the same as passing a list of folders as in the makefile's "quicky" command. In Scons, all of Blender's code modules @@ -157,7 +165,7 @@ $Id$ BF_QUICKDEBUG is similar to BF_QUICK: - % scons BF_QUICKDEBUG=src,bf_blenkernel,some-other-lib + % python scons\scons.py BF_QUICKDEBUG=src,bf_blenkernel,some-other-lib To use BF_DEBUG_LIBS, put something like the following in you user-config.py: @@ -184,14 +192,8 @@ $Id$ On Windows with all of the three toolset installed you need to specify what toolset to use - % scons BF_TOOLSET=msvc - % scons BF_TOOLSET=mingw - - If you have only the toolkit installed, you will also need to give - BF_TOOLSET=mstoolkit on the command-line, to make sure everything is - setup properly. Currently there is no good mechanism to automatically - determine wether the found 'cl.exe' is from the toolkit or from a - complete install. + % python scons\scons.py BF_TOOLSET=msvc + % python scons\scons.py BF_TOOLSET=mingw LINUX and OS X @@ -204,30 +206,26 @@ $Id$ Build Blender with the defaults: - % scons + % python scons\scons.py Build Blender, but disable OpenEXR support: - % scons WITH_BF_OPENEXR=0 + % python scons\scons.py WITH_BF_OPENEXR=0 Build Blender, enable debug symbols: - % scons BF_DEBUG=1 + % python scons\scons.py BF_DEBUG=1 Build Blender, install to different directory: - % scons BF_INSTALLDIR=/tmp/testbuild + % python scons\scons.py BF_INSTALLDIR=../myown/installdir - Build Blender in /tmp/obj and install to /usr/local: + Build Blender in ../myown/builddir and install to ../myown/installdir: - % scons BF_BUILDDIR=/tmp/obj BF_INSTALLDIR=/usr/local + % python scons\scons.py BF_BUILDDIR=../myown/builddir BF_INSTALLDIR=../myown/installdir Clean BF_BUILDDIR: - % scons clean - - Clean out the installed files: - - % scons -c + % python scons\scons.py clean /Nathan Letwory (jesterKing) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index ee5cab31e09..44e47aaf88d 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -24,25 +24,19 @@ # # ***** END GPL LICENSE BLOCK ***** -IF(WITH_GAMEENGINE) - SUBDIRS(qhull solid) -ENDIF(WITH_GAMEENGINE) - IF(WITH_BULLET) - SUBDIRS(bullet2) + ADD_SUBDIRECTORY(bullet2) ENDIF(WITH_BULLET) -IF(WITH_INTERNATIONAL) - SUBDIRS(bFTGL) -ENDIF(WITH_INTERNATIONAL) - -IF(WITH_VERSE) - SUBDIRS(verse) -ENDIF(WITH_VERSE) - IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SUBDIRS(binreloc) + ADD_SUBDIRECTORY(binreloc) ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") -SUBDIRS(glew) +ADD_SUBDIRECTORY(glew) +IF(WITH_OPENJPEG) + ADD_SUBDIRECTORY(libopenjpeg) +ENDIF(WITH_OPENJPEG) + +ADD_SUBDIRECTORY(lzo) +ADD_SUBDIRECTORY(lzma) diff --git a/extern/Makefile b/extern/Makefile index 26ee25b608f..b81fbd2b91a 100644 --- a/extern/Makefile +++ b/extern/Makefile @@ -30,38 +30,31 @@ include nan_definitions.mk SOURCEDIR = extern DIR = $(OCGDIR)/extern -DIRS = qhull/src solid glew/src +DIRS = glew/src -ifeq ($(WITH_FREETYPE2), true) - DIRS += bFTGL/src -endif - -ifeq ($(WITH_FFMPEG), true) -ifeq ($(NAN_FFMPEG), $(LCGDIR)/ffmpeg) - DIRS += ffmpeg -endif -ifeq ($(NAN_FFMPEG), $(LCGDIR)/gcc/ffmpeg) - DIRS += ffmpeg -endif -endif - -ifeq ($(WITH_VERSE), true) - DIRS += verse -endif - -ifneq ($(NAN_NO_KETSJI), true) - DIRS += bullet2 -endif +# Cloth requires it +#ifneq ($(NAN_NO_KETSJI), true) +DIRS += bullet2 +#endif ifeq ($(WITH_BINRELOC), true) DIRS += binreloc endif -TARGET = -ifneq ($(OS),irix) - TARGET=solid +ifeq ($(WITH_OPENJPEG), true) + DIRS += libopenjpeg endif +ifeq ($(WITH_LZO), true) + DIRS += lzo/minilzo +endif + +ifeq ($(WITH_LZMA), true) + DIRS += lzma +endif + +TARGET = solid + all:: @[ -d $(OCGDIR)/extern ] || mkdir -p $(OCGDIR)/extern @for i in $(DIRS); do \ diff --git a/extern/SConscript b/extern/SConscript index 4c892e1956d..20604d87e45 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -4,19 +4,9 @@ Import('env') SConscript(['glew/SConscript']) -if env['WITH_BF_GAMEENGINE']: - SConscript(['qhull/SConscript', - 'solid/SConscript']) - if env['WITH_BF_BULLET']: SConscript(['bullet2/src/SConscript']) -if env['WITH_BF_INTERNATIONAL']: - SConscript(['bFTGL/SConscript']) - -if env['WITH_BF_VERSE']: - SConscript(['verse/dist/SConstruct']) - if env['WITH_BF_FFMPEG'] and env['BF_FFMPEG_LIB'] == '': SConscript(['x264/SConscript']) SConscript(['libmp3lame/SConscript']) @@ -32,5 +22,5 @@ if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '': if env['OURPLATFORM'] == 'linux2': SConscript(['binreloc/SConscript']); -# FFTW not needed atm - dg -# SConscript(['fftw/SConscript']) +SConscript(['lzo/SConscript']) +SConscript(['lzma/SConscript']) diff --git a/extern/bFTGL/CMakeLists.txt b/extern/bFTGL/CMakeLists.txt deleted file mode 100644 index 529dc74a4d2..00000000000 --- a/extern/bFTGL/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -SET(INC include src ${FREETYPE_INC}) - -FILE(GLOB SRC src/*.cpp) -ADD_DEFINITIONS(-DFTGL_LIBRARY_STATIC) -BLENDERLIB(extern_ftgl "${SRC}" "${INC}") -#, libtype=['international','player'], priority=[5, 210]) diff --git a/extern/bFTGL/COPYING.txt b/extern/bFTGL/COPYING.txt deleted file mode 100644 index 92b8903ff3f..00000000000 --- a/extern/bFTGL/COPYING.txt +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/extern/bFTGL/README.txt b/extern/bFTGL/README.txt deleted file mode 100644 index a679d86c22e..00000000000 --- a/extern/bFTGL/README.txt +++ /dev/null @@ -1,51 +0,0 @@ -FTGL 2.0.11 -16 August 2004 - -DESCRIPTION: - -FTGL is a free open source library to enable developers to use arbitrary -fonts in their OpenGL (www.opengl.org) applications. -Unlike other OpenGL font libraries FTGL uses standard font file formats -so doesn't need a preprocessing step to convert the high quality font data -into a lesser quality, proprietary format. -FTGL uses the Freetype (www.freetype.org) font library to open and 'decode' -the fonts. It then takes that output and stores it in a format most efficient -for OpenGL rendering. - -Rendering modes supported are -- Bit maps -- Antialiased Pix maps -- Texture maps -- Outlines -- Polygon meshes -- Extruded polygon meshes - -FTGL is designed to be used in commercial quality software. It has been -written with performance, robustness and simplicity in mind. - -USAGE: - - FTGLPixmapFont font( "Fonts:Arial"); - - font.FaceSize( 72); - - font.render( "Hello World!"); - -This library was inspired by gltt, Copyright (C) 1998-1999 Stephane Rehel -(http://gltt.sourceforge.net) -Bezier curve code contributed by Jed Soane. -Demo, Linux port, extrusion code and gltt maintainance by Gerard Lanois -Linux port by Matthias Kretz -Windows port by Andrew Ellerton & Max Rheiner -Bug fixes by Robert Osfield, Marcelo E. Magallon, Markku Rontu, Mark A. Fox, -Patrick Rogers -Containers and optimisations by Sebastien Barre -Autoconf Marcelo E. Magallon. - - -Please contact me if you have any suggestions, feature requests, or problems. - -Henry Maddocks -ftgl@opengl.geek.nz -http://homepages.paradise.net.nz/henryj/ - diff --git a/extern/bFTGL/SConscript b/extern/bFTGL/SConscript deleted file mode 100644 index f377c61f01d..00000000000 --- a/extern/bFTGL/SConscript +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/python -import sys -import os - -Import('env') - -incs = 'include src ' + env['BF_FREETYPE_INC'] + ' ' + env['BF_OPENGL_INC'] -defs = '' - -sources = env.Glob('src/*.cpp') - -env.BlenderLib ( 'extern_ftgl', sources, Split(incs), Split(defs), libtype=['international','player'], priority=[5, 210]) diff --git a/extern/bFTGL/cleanup b/extern/bFTGL/cleanup deleted file mode 100755 index c6d24edb287..00000000000 --- a/extern/bFTGL/cleanup +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -fx -# script to get rid of the grabage that MAC OSX drops in all the directories - -find . -name .DS_Store -print -exec rm {} \; diff --git a/extern/bFTGL/include/FTBBox.h b/extern/bFTGL/include/FTBBox.h deleted file mode 100644 index 7ff530166ca..00000000000 --- a/extern/bFTGL/include/FTBBox.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef __FTBBox__ -#define __FTBBox__ - -#include -#include FT_FREETYPE_H -//#include FT_GLYPH_H -#include FT_OUTLINE_H - -#include "FTGL.h" -#include "FTPoint.h" - - -/** - * FTBBox is a convenience class for handling bounding boxes. - */ -class FTGL_EXPORT FTBBox -{ - public: - /** - * Default constructor. Bounding box is set to zero. - */ - FTBBox() - : lowerX(0.0f), - lowerY(0.0f), - lowerZ(0.0f), - upperX(0.0f), - upperY(0.0f), - upperZ(0.0f) - {} - - /** - * Constructor. - */ - FTBBox( float lx, float ly, float lz, float ux, float uy, float uz) - : lowerX(lx), - lowerY(ly), - lowerZ(lz), - upperX(ux), - upperY(uy), - upperZ(uz) - {} - - /** - * Constructor. Extracts a bounding box from a freetype glyph. Uses - * the control box for the glyph. FT_Glyph_Get_CBox() - * - * @param glyph A freetype glyph - */ - FTBBox( FT_GlyphSlot glyph) - : lowerX(0.0f), - lowerY(0.0f), - lowerZ(0.0f), - upperX(0.0f), - upperY(0.0f), - upperZ(0.0f) - { - FT_BBox bbox; - FT_Outline_Get_CBox( &(glyph->outline), &bbox); - - lowerX = static_cast( bbox.xMin) / 64.0f; - lowerY = static_cast( bbox.yMin) / 64.0f; - lowerZ = 0.0f; - upperX = static_cast( bbox.xMax) / 64.0f; - upperY = static_cast( bbox.yMax) / 64.0f; - upperZ = 0.0f; - - } - - /** - * Destructor - */ - ~FTBBox() - {} - - - /** - * Move the Bounding Box by a vector. - * - * @param distance The distance to move the bbox in 3D space. - */ - FTBBox& Move( FTPoint distance) - { - lowerX += distance.x; - lowerY += distance.y; - lowerZ += distance.z; - upperX += distance.x; - upperY += distance.y; - upperZ += distance.z; - return *this; - } - - FTBBox& operator += ( const FTBBox& bbox) - { - lowerX = bbox.lowerX < lowerX? bbox.lowerX: lowerX; - lowerY = bbox.lowerY < lowerY? bbox.lowerY: lowerY; - lowerZ = bbox.lowerZ < lowerZ? bbox.lowerZ: lowerZ; - upperX = bbox.upperX > upperX? bbox.upperX: upperX; - upperY = bbox.upperY > upperY? bbox.upperY: upperY; - upperZ = bbox.upperZ > upperZ? bbox.upperZ: upperZ; - - return *this; - } - - void SetDepth( float depth) - { - upperZ = lowerZ + depth; - } - - - /** - * The bounds of the box - */ - // Make these ftPoints & private - float lowerX, lowerY, lowerZ, upperX, upperY, upperZ; - protected: - - - private: - -}; - - -#endif // __FTBBox__ - diff --git a/extern/bFTGL/include/FTBitmapGlyph.h b/extern/bFTGL/include/FTBitmapGlyph.h deleted file mode 100644 index 89154a97fac..00000000000 --- a/extern/bFTGL/include/FTBitmapGlyph.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef __FTBitmapGlyph__ -#define __FTBitmapGlyph__ - - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - - -/** - * FTBitmapGlyph is a specialisation of FTGlyph for creating bitmaps. - * - * It provides the interface between Freetype glyphs and their openGL - * Renderable counterparts. This is an abstract class and derived classes - * must implement the Render function. - * - * @see FTGlyphContainer - * - */ -class FTGL_EXPORT FTBitmapGlyph : public FTGlyph -{ - public: - /** - * Constructor - * - * @param glyph The Freetype glyph to be processed - */ - FTBitmapGlyph( FT_GlyphSlot glyph); - - /** - * Destructor - */ - virtual ~FTBitmapGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - private: - /** - * The width of the glyph 'image' - */ - unsigned int destWidth; - - /** - * The height of the glyph 'image' - */ - unsigned int destHeight; - - /** - * The pitch of the glyph 'image' - */ - unsigned int destPitch; - - /** - * Vector from the pen position to the topleft corner of the bitmap - */ - FTPoint pos; - - /** - * Pointer to the 'image' data - */ - unsigned char* data; - -}; - - -#endif // __FTBitmapGlyph__ - diff --git a/extern/bFTGL/include/FTBufferGlyph.h b/extern/bFTGL/include/FTBufferGlyph.h deleted file mode 100644 index 9795f4de5d4..00000000000 --- a/extern/bFTGL/include/FTBufferGlyph.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef __FTBufferGlyph__ -#define __FTBufferGlyph__ - - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - - -/** - * FTBufferGlyph is a specialisation of FTGlyph for creating pixmaps. - * - * @see FTGlyphContainer - * - */ -class FTGL_EXPORT FTBufferGlyph : public FTGlyph -{ - public: - /** - * Constructor - * - * @param glyph The Freetype glyph to be processed - */ - FTBufferGlyph( FT_GlyphSlot glyph, unsigned char* clientBuffer); - - /** - * Destructor - */ - virtual ~FTBufferGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - // attributes - - private: - /** - * The width of the glyph 'image' - */ - int destWidth; - - /** - * The height of the glyph 'image' - */ - int destHeight; - - /** - * The pitch of the glyph 'image' - */ - unsigned int destPitch; - - /** - * Vector from the pen position to the topleft corner of the pixmap - */ - FTPoint pos; - - /** - * Pointer to the 'image' data - */ - unsigned char* data; - - - unsigned char* buffer; - -}; - - -#endif // __FTBufferGlyph__ diff --git a/extern/bFTGL/include/FTCharToGlyphIndexMap.h b/extern/bFTGL/include/FTCharToGlyphIndexMap.h deleted file mode 100644 index 6e40d3c9574..00000000000 --- a/extern/bFTGL/include/FTCharToGlyphIndexMap.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef __FTCharToGlyphIndexMap__ -#define __FTCharToGlyphIndexMap__ - -#include - -#include "FTGL.h" - -/** - * Provides a non-STL alternative to the STL map - * which maps character codes to glyph indices inside FTCharmap. - * - * Implementation: - * - NumberOfBuckets buckets are considered. - * - Each bucket has BucketSize entries. - * - When the glyph index for the character code C has to be stored, the - * bucket this character belongs to is found using 'C div BucketSize'. - * If this bucket has not been allocated yet, do it now. - * The entry in the bucked is found using 'C mod BucketSize'. - * If it is set to IndexNotFound, then the glyph entry has not been set. - * - Try to mimic the calls made to the STL map API. - * - * Caveats: - * - The glyph index is now a signed long instead of unsigned long, so - * the special value IndexNotFound (= -1) can be used to specify that the - * glyph index has not been stored yet. - */ -class FTGL_EXPORT FTCharToGlyphIndexMap -{ - public: - - typedef unsigned long CharacterCode; - typedef signed long GlyphIndex; - - enum - { - NumberOfBuckets = 256, - BucketSize = 256, - IndexNotFound = -1 - }; - - FTCharToGlyphIndexMap() - { - this->Indices = 0; - } - - virtual ~FTCharToGlyphIndexMap() - { - if( this->Indices) - { - // Free all buckets - this->clear(); - - // Free main structure - delete [] this->Indices; - this->Indices = 0; - } - } - - void clear() - { - if(this->Indices) - { - for( int i = 0; i < FTCharToGlyphIndexMap::NumberOfBuckets; i++) - { - if( this->Indices[i]) - { - delete [] this->Indices[i]; - this->Indices[i] = 0; - } - } - } - } - - const GlyphIndex find( CharacterCode c) - { - if( !this->Indices) - { - return 0; - } - - // Find position of char code in buckets - div_t pos = div( c, FTCharToGlyphIndexMap::BucketSize); - - if( !this->Indices[pos.quot]) - { - return 0; - } - - const FTCharToGlyphIndexMap::GlyphIndex *ptr = &this->Indices[pos.quot][pos.rem]; - if( *ptr == FTCharToGlyphIndexMap::IndexNotFound) - { - return 0; - } - - return *ptr; - } - - void insert( CharacterCode c, GlyphIndex g) - { - if( !this->Indices) - { - this->Indices = new GlyphIndex* [FTCharToGlyphIndexMap::NumberOfBuckets]; - for( int i = 0; i < FTCharToGlyphIndexMap::NumberOfBuckets; i++) - { - this->Indices[i] = 0; - } - } - - // Find position of char code in buckets - div_t pos = div(c, FTCharToGlyphIndexMap::BucketSize); - - // Allocate bucket if does not exist yet - if( !this->Indices[pos.quot]) - { - this->Indices[pos.quot] = new GlyphIndex [FTCharToGlyphIndexMap::BucketSize]; - for( int i = 0; i < FTCharToGlyphIndexMap::BucketSize; i++) - { - this->Indices[pos.quot][i] = FTCharToGlyphIndexMap::IndexNotFound; - } - } - - this->Indices[pos.quot][pos.rem] = g; - } - - private: - GlyphIndex** Indices; -}; - - -#endif // __FTCharToGlyphIndexMap__ diff --git a/extern/bFTGL/include/FTCharmap.h b/extern/bFTGL/include/FTCharmap.h deleted file mode 100644 index 74ca6f2cacb..00000000000 --- a/extern/bFTGL/include/FTCharmap.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef __FTCharmap__ -#define __FTCharmap__ - - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTCharToGlyphIndexMap.h" - -#include "FTGL.h" - - -/** - * FTCharmap takes care of specifying the encoding for a font and mapping - * character codes to glyph indices. - * - * It doesn't preprocess all indices, only on an as needed basis. This may - * seem like a performance penalty but it is quicker than using the 'raw' - * freetype calls and will save significant amounts of memory when dealing - * with unicode encoding - * - * @see "Freetype 2 Documentation" - * - */ - -class FTFace; - -class FTGL_EXPORT FTCharmap -{ - public: - /** - * Constructor - */ - FTCharmap( FTFace* face); - - /** - * Destructor - */ - virtual ~FTCharmap(); - - /** - * Queries for the current character map code. - * - * @return The current character map code. - */ - FT_Encoding Encoding() const { return ftEncoding;} - - /** - * Sets the character map for the face. - * Valid encodings as at Freetype 2.0.4 - * ft_encoding_none - * ft_encoding_symbol - * ft_encoding_unicode - * ft_encoding_latin_2 - * ft_encoding_sjis - * ft_encoding_gb2312 - * ft_encoding_big5 - * ft_encoding_wansung - * ft_encoding_johab - * ft_encoding_adobe_standard - * ft_encoding_adobe_expert - * ft_encoding_adobe_custom - * ft_encoding_apple_roman - * - * @param encoding the Freetype encoding symbol. See above. - * @return true if charmap was valid and set - * correctly. If the requested encoding is - * unavailable it will be set to ft_encoding_none. - */ - bool CharMap( FT_Encoding encoding); - - /** - * Get the FTGlyphContainer index of the input character. - * - * @param characterCode The character code of the requested glyph in - * the current encoding eg apple roman. - * @return The FTGlyphContainer index for the character or zero - * if it wasn't found - */ - unsigned int GlyphListIndex( const unsigned int characterCode); - - /** - * Get the font glyph index of the input character. - * - * @param characterCode The character code of the requested glyph in - * the current encoding eg apple roman. - * @return The glyph index for the character. - */ - unsigned int FontIndex( const unsigned int characterCode); - - /** - * Set the FTGlyphContainer index of the character code. - * - * @param characterCode The character code of the requested glyph in - * the current encoding eg apple roman. - * @param containerIndex The index into the FTGlyphContainer of the - * character code. - */ - void InsertIndex( const unsigned int characterCode, const unsigned int containerIndex); - - /** - * Queries for errors. - * - * @return The current error code. Zero means no error. - */ - FT_Error Error() const { return err;} - - private: - /** - * Current character map code. - */ - FT_Encoding ftEncoding; - - /** - * The current Freetype face. - */ - const FT_Face ftFace; - - /** - * A structure that maps glyph indices to character codes - * - * < character code, face glyph index> - */ - typedef FTCharToGlyphIndexMap CharacterMap; - CharacterMap charMap; - - /** - * Current error code. - */ - FT_Error err; - -}; - - -#endif // __FTCharmap__ diff --git a/extern/bFTGL/include/FTContour.h b/extern/bFTGL/include/FTContour.h deleted file mode 100644 index 895d9edeff8..00000000000 --- a/extern/bFTGL/include/FTContour.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __FTContour__ -#define __FTContour__ - -#include "FTPoint.h" -#include "FTVector.h" -#include "FTGL.h" - - -/** - * FTContour class is a container of points that describe a vector font - * outline. It is used as a container for the output of the bezier curve - * evaluator in FTVectoriser. - * - * @see FTOutlineGlyph - * @see FTPolyGlyph - * @see FTPoint - */ -class FTGL_EXPORT FTContour -{ - public: - /** - * Constructor - * - * @param contour - * @param pointTags - * @param numberOfPoints - */ - FTContour( FT_Vector* contour, char* pointTags, unsigned int numberOfPoints); - - /** - * Destructor - */ - ~FTContour() - { - pointList.clear(); - } - - /** - * Return a point at index. - * - * @param index of the point in the curve. - * @return const point reference - */ - const FTPoint& Point( unsigned int index) const { return pointList[index];} - - /** - * How many points define this contour - * - * @return the number of points in this contour - */ - size_t PointCount() const { return pointList.size();} - - private: - /** - * Add a point to this contour. This function tests for duplicate - * points. - * - * @param point The point to be added to the contour. - */ - inline void AddPoint( FTPoint point); - - inline void AddPoint( float x, float y); - - /** - * De Casteljau (bezier) algorithm contributed by Jed Soane - * Evaluates a quadratic or conic (second degree) curve - */ - inline void evaluateQuadraticCurve(); - - /** - * De Casteljau (bezier) algorithm contributed by Jed Soane - * Evaluates a cubic (third degree) curve - */ - inline void evaluateCubicCurve(); - - /** - * The list of points in this contour - */ - typedef FTVector PointVector; - PointVector pointList; - - /** - * 2D array storing values of de Casteljau algorithm. - */ - float controlPoints[4][2]; -}; - -#endif // __FTContour__ diff --git a/extern/bFTGL/include/FTExtrdGlyph.h b/extern/bFTGL/include/FTExtrdGlyph.h deleted file mode 100644 index 01e7c9e1d76..00000000000 --- a/extern/bFTGL/include/FTExtrdGlyph.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __FTExtrdGlyph__ -#define __FTExtrdGlyph__ - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - -class FTVectoriser; - -/** - * FTExtrdGlyph is a specialisation of FTGlyph for creating tessellated - * extruded polygon glyphs. - * - * @see FTGlyphContainer - * @see FTVectoriser - * - */ -class FTGL_EXPORT FTExtrdGlyph : public FTGlyph -{ - public: - /** - * Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline. - * - * @param glyph The Freetype glyph to be processed - * @param depth The distance along the z axis to extrude the glyph - */ - FTExtrdGlyph( FT_GlyphSlot glyph, float depth); - - /** - * Destructor - */ - virtual ~FTExtrdGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - private: - /** - * Calculate the normal vector to 2 points. This is 2D and ignores - * the z component. The normal will be normalised - * - * @param a - * @param b - * @return - */ - FTPoint GetNormal( const FTPoint &a, const FTPoint &b); - - - /** - * OpenGL display list - */ - GLuint glList; - - /** - * Distance to extrude the glyph - */ - float depth; - -}; - - -#endif // __FTExtrdGlyph__ - diff --git a/extern/bFTGL/include/FTFace.h b/extern/bFTGL/include/FTFace.h deleted file mode 100644 index 26bb3966462..00000000000 --- a/extern/bFTGL/include/FTFace.h +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef __FTFace__ -#define __FTFace__ - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTPoint.h" -#include "FTSize.h" - -/** - * FTFace class provides an abstraction layer for the Freetype Face. - * - * @see "Freetype 2 Documentation" - * - */ -class FTGL_EXPORT FTFace -{ - public: - /** - * Opens and reads a face file. Error is set. - * - * @param filename font file name. - */ - FTFace( const char* filename); - - /** - * Read face data from an in-memory buffer. Error is set. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes ); - - /** - * Destructor - * - * Disposes of the current Freetype Face. - */ - virtual ~FTFace(); - - /** - * Attach auxilliary file to font (e.g., font metrics). - * - * @param filename auxilliary font file name. - * @return true if file has opened - * successfully. - */ - bool Attach( const char* filename); - - /** - * Attach auxilliary data to font (e.g., font metrics) from memory - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - * @return true if file has opened - * successfully. - */ - bool Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Disposes of the face - */ - void Close(); - - /** - * Get the freetype face object.. - * - * @return pointer to an FT_Face. - */ - FT_Face* Face() const { return ftFace;} - - /** - * Sets the char size for the current face. - * - * This doesn't guarantee that the size was set correctly. Clients - * should check errors. - * - * @param size the face size in points (1/72 inch) - * @param res the resolution of the target device. - * @return FTSize object - */ - const FTSize& Size( const unsigned int size, const unsigned int res); - - unsigned int UnitsPerEM() const; - - /** - * Get the number of character maps in this face. - * - * @return character map count. - */ - unsigned int CharMapCount(); - - /** - * Get a list of character maps in this face. - * - * @return pointer to the first encoding. - */ - FT_Encoding* CharMapList(); - - /** - * Gets the kerning vector between two glyphs - */ - FTPoint KernAdvance( unsigned int index1, unsigned int index2); - - /** - * Loads and creates a Freetype glyph. - */ - FT_GlyphSlot Glyph( unsigned int index, FT_Int load_flags); - - /** - * Gets the number of glyphs in the current face. - */ - unsigned int GlyphCount() const { return numGlyphs;} - - /** - * Queries for errors. - * - * @return The current error code. - */ - FT_Error Error() const { return err; } - - private: - /** - * The Freetype face - */ - FT_Face* ftFace; - - /** - * The size object associated with this face - */ - FTSize charSize; - - /** - * The number of glyphs in this face - */ - int numGlyphs; - - FT_Encoding* fontEncodingList; - - /** - * Current error code. Zero means no error. - */ - FT_Error err; -}; - - -#endif // __FTFace__ diff --git a/extern/bFTGL/include/FTFont.h b/extern/bFTGL/include/FTFont.h deleted file mode 100644 index 5b3d9e46f68..00000000000 --- a/extern/bFTGL/include/FTFont.h +++ /dev/null @@ -1,260 +0,0 @@ -#ifndef __FTFont__ -#define __FTFont__ - -#include -#include FT_FREETYPE_H - -#include "FTFace.h" -#include "FTGL.h" - -class FTGlyphContainer; -class FTGlyph; - - -/** - * FTFont is the public interface for the FTGL library. - * - * Specific font classes are derived from this class. It uses the helper - * classes FTFace and FTSize to access the Freetype library. This class - * is abstract and deriving classes must implement the protected - * MakeGlyph function to create glyphs of the - * appropriate type. - * - * It is good practice after using these functions to test the error - * code returned. FT_Error Error() - * - * @see FTFace - * @see FTSize - * @see FTGlyphContainer - * @see FTGlyph - */ -class FTGL_EXPORT FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * The buffer is owned by the client and is NOT copied by FTGL. The - * pointer must be valid while using FTGL. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - virtual ~FTFont(); - - /** - * Attach auxilliary file to font e.g font metrics. - * - * Note: not all font formats implement this function. - * - * @param filename auxilliary font file name. - * @return true if file has been attached - * successfully. - */ - bool Attach( const char* filename); - - /** - * Attach auxilliary data to font e.g font metrics, from memory - * - * Note: not all font formats implement this function. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - * @return true if file has been attached - * successfully. - */ - bool Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Set the character map for the face. - * - * @param encoding Freetype enumerate for char map code. - * @return true if charmap was valid and - * set correctly - */ - bool CharMap( FT_Encoding encoding ); - - /** - * Get the number of character maps in this face. - * - * @return character map count. - */ - unsigned int CharMapCount(); - - /** - * Get a list of character maps in this face. - * - * @return pointer to the first encoding. - */ - FT_Encoding* CharMapList(); - - /** - * Set the char size for the current face. - * - * @param size the face size in points (1/72 inch) - * @param res the resolution of the target device. - * @return true if size was set correctly - */ - virtual bool FaceSize( const unsigned int size, const unsigned int res = 72); - - /** - * Get the current face size in points. - * - * @return face size - */ - unsigned int FaceSize() const; - - /** - * Set the extrusion distance for the font. Only implemented by - * FTGLExtrdFont - * - * @param d The extrusion distance. - */ - virtual void Depth( float d){} - - /** - * Get the global ascender height for the face. - * - * @return Ascender height - */ - float Ascender() const; - - /** - * Gets the global descender height for the face. - * - * @return Descender height - */ - float Descender() const; - - /** - * Get the bounding box for a string. - * - * @param string a char string - * @param llx lower left near x coord - * @param lly lower left near y coord - * @param llz lower left near z coord - * @param urx upper right far x coord - * @param ury upper right far y coord - * @param urz upper right far z coord - */ - void BBox( const char* string, float& llx, float& lly, float& llz, float& urx, float& ury, float& urz); - - /** - * Get the bounding box for a string. - * - * @param string a wchar_t string - * @param llx lower left near x coord - * @param lly lower left near y coord - * @param llz lower left near z coord - * @param urx upper right far x coord - * @param ury upper right far y coord - * @param urz upper right far z coord - */ - void BBox( const wchar_t* string, float& llx, float& lly, float& llz, float& urx, float& ury, float& urz); - - /** - * Get the advance width for a string. - * - * @param string a wchar_t string - * @return advance width - */ - float Advance( const wchar_t* string); - - /** - * Get the advance width for a string. - * - * @param string a char string - * @return advance width - */ - float Advance( const char* string); - - /** - * Render a string of characters - * - * @param string 'C' style string to be output. - */ - virtual void Render( const char* string ); - - /** - * Render a string of characters - * - * @param string wchar_t string to be output. - */ - virtual void Render( const wchar_t* string ); - - /** - * Queries the Font for errors. - * - * @return The current error code. - */ - FT_Error Error() const { return err;} - - protected: - /** - * Construct a glyph of the correct type. - * - * Clients must overide the function and return their specialised - * FTGlyph. - * - * @param g The glyph index NOT the char code. - * @return An FT****Glyph or null on failure. - */ - virtual FTGlyph* MakeGlyph( unsigned int g) = 0; - - /** - * Current face object - */ - FTFace face; - - /** - * Current size object - */ - FTSize charSize; - - /** - * Current error code. Zero means no error. - */ - FT_Error err; - - private: - /** - * Render a character - * This function does an implicit conversion on it's arguments. - * - * @param chr current character - * @param nextChr next character - */ - inline void DoRender( const unsigned int chr, const unsigned int nextChr); - - /** - * Check that the glyph at chr exist. If not load it. - * - * @param chr character index - */ - inline void CheckGlyph( const unsigned int chr); - - /** - * An object that holds a list of glyphs - */ - FTGlyphContainer* glyphList; - - /** - * Current pen or cursor position; - */ - FTPoint pen; -}; - - -#endif // __FTFont__ - diff --git a/extern/bFTGL/include/FTGL.h b/extern/bFTGL/include/FTGL.h deleted file mode 100644 index 2b76de8b8bd..00000000000 --- a/extern/bFTGL/include/FTGL.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef __FTGL__ -#define __FTGL__ - - -typedef double FTGL_DOUBLE; -typedef float FTGL_FLOAT; - -// Fixes for deprecated identifiers in 2.1.5 -#ifndef FT_OPEN_MEMORY - #define FT_OPEN_MEMORY (FT_Open_Flags)1 -#endif - -#ifndef FT_RENDER_MODE_MONO - #define FT_RENDER_MODE_MONO ft_render_mode_mono -#endif - -#ifndef FT_RENDER_MODE_NORMAL - #define FT_RENDER_MODE_NORMAL ft_render_mode_normal -#endif - - -#ifdef WIN32 - - // Under windows avoid including is overrated. - // Sure, it can be avoided and "name space pollution" can be - // avoided, but why? It really doesn't make that much difference - // these days. - #define WIN32_LEAN_AND_MEAN - #include - - #ifndef __gl_h_ - #include - #include - #endif - -#else - - // Non windows platforms - don't require nonsense as seen above :-) - #ifndef __gl_h_ - #ifdef __APPLE_CC__ - #include - #include - #else - #include - #if defined (__sun__) && !defined (__sparc__) - #include - #else - #include - #endif - #endif - - #endif - - // Required for compatibility with glext.h style function definitions of - // OpenGL extensions, such as in src/osg/Point.cpp. - #ifndef APIENTRY - #define APIENTRY - #endif -#endif - -// Compiler-specific conditional compilation -#ifdef _MSC_VER // MS Visual C++ - - // Disable various warning. - // 4786: template name too long - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) - #pragma warning( disable : 4786 ) - - // The following definitions control how symbols are exported. - // If the target is a static library ensure that FTGL_LIBRARY_STATIC - // is defined. If building a dynamic library (ie DLL) ensure the - // FTGL_LIBRARY macro is defined, as it will mark symbols for - // export. If compiling a project to _use_ the _dynamic_ library - // version of the library, no definition is required. - #ifdef FTGL_LIBRARY_STATIC // static lib - no special export required - # define FTGL_EXPORT - #elif FTGL_LIBRARY // dynamic lib - must export/import symbols appropriately. - # define FTGL_EXPORT __declspec(dllexport) - #else - # define FTGL_EXPORT __declspec(dllimport) - #endif - -#else - // Compiler that is not MS Visual C++. - // Ensure that the export symbol is defined (and blank) - #define FTGL_EXPORT -#endif - - -// lifted from glext.h, to remove dependancy on glext.h -#ifndef GL_EXT_texture_object - #define GL_TEXTURE_PRIORITY_EXT 0x8066 - #define GL_TEXTURE_RESIDENT_EXT 0x8067 - #define GL_TEXTURE_1D_BINDING_EXT 0x8068 - #define GL_TEXTURE_2D_BINDING_EXT 0x8069 - #define GL_TEXTURE_3D_BINDING_EXT 0x806A -#endif - -#endif // __FTGL__ diff --git a/extern/bFTGL/include/FTGLBitmapFont.h b/extern/bFTGL/include/FTGLBitmapFont.h deleted file mode 100644 index 12feae00cb6..00000000000 --- a/extern/bFTGL/include/FTGLBitmapFont.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef __FTGLBitmapFont__ -#define __FTGLBitmapFont__ - -#include "FTFont.h" -#include "FTGL.h" - - -class FTGlyph; - -/** - * FTGLBitmapFont is a specialisation of the FTFont class for handling - * Bitmap fonts - * - * @see FTFont - */ -class FTGL_EXPORT FTGLBitmapFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLBitmapFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLBitmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - ~FTGLBitmapFont(); - - /** - * Renders a string of characters - * - * @param string 'C' style string to be output. - */ - void Render( const char* string); - - /** - * Renders a string of characters - * - * @param string 'C' style wide string to be output. - */ - void Render( const wchar_t* string); - - // attributes - - private: - /** - * Construct a FTBitmapGlyph. - * - * @param g The glyph index NOT the char code. - * @return An FTBitmapGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int g); - -}; -#endif // __FTGLBitmapFont__ diff --git a/extern/bFTGL/include/FTGLBufferFont.h b/extern/bFTGL/include/FTGLBufferFont.h deleted file mode 100644 index 2f74b5cdef9..00000000000 --- a/extern/bFTGL/include/FTGLBufferFont.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef __FTGLBufferFont__ -#define __FTGLBufferFont__ - - -#include "FTFont.h" -#include "FTGL.h" - - -class FTGlyph; - - -/** - * FTGLBufferFont is a specialisation of the FTFont class for handling - * Pixmap (Grey Scale) fonts - * - * @see FTFont - */ -class FTGL_EXPORT FTGLBufferFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLBufferFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - - void SetClientBuffer( unsigned char* b) - { - buffer = b; - } - - - /** - * Destructor - */ - ~FTGLBufferFont(); - - /** - * Renders a string of characters - * - * @param string 'C' style string to be output. - */ - void Render( const char* string); - - /** - * Renders a string of characters - * - * @param string wchar_t string to be output. - */ - void Render( const wchar_t* string); - - private: - /** - * Construct a FTBufferGlyph. - * - * @param g The glyph index NOT the char code. - * @return An FTBufferGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int g); - - unsigned char* buffer; -}; - - -#endif // __FTGLBufferFont__ - diff --git a/extern/bFTGL/include/FTGLExtrdFont.h b/extern/bFTGL/include/FTGLExtrdFont.h deleted file mode 100644 index dc784bbb5b0..00000000000 --- a/extern/bFTGL/include/FTGLExtrdFont.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __FTGLExtrdFont__ -#define __FTGLExtrdFont__ - -#include "FTFont.h" -#include "FTGL.h" - -class FTGlyph; - -/** - * FTGLExtrdFont is a specialisation of the FTFont class for handling - * extruded Polygon fonts - * - * @see FTFont - * @see FTGLPolygonFont - */ -class FTGL_EXPORT FTGLExtrdFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLExtrdFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - ~FTGLExtrdFont(); - - void Depth( float d) { depth = d;} - - private: - /** - * Construct a FTPolyGlyph. - * - * @param glyphIndex The glyph index NOT the char code. - * @return An FTExtrdGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int glyphIndex); - - float depth; -}; - - -#endif // __FTGLExtrdFont__ - diff --git a/extern/bFTGL/include/FTGLOutlineFont.h b/extern/bFTGL/include/FTGLOutlineFont.h deleted file mode 100644 index a7f4b23092d..00000000000 --- a/extern/bFTGL/include/FTGLOutlineFont.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef __FTGLOutlineFont__ -#define __FTGLOutlineFont__ - - -#include "FTFont.h" -#include "FTGL.h" - -class FTGlyph; - - -/** - * FTGLOutlineFont is a specialisation of the FTFont class for handling - * Vector Outline fonts - * - * @see FTFont - */ -class FTGL_EXPORT FTGLOutlineFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLOutlineFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLOutlineFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - ~FTGLOutlineFont(); - - /** - * Renders a string of characters - * - * @param string 'C' style string to be output. - */ - void Render( const char* string); - - /** - * Renders a string of characters - * - * @param string wchar_t string to be output. - */ - void Render( const wchar_t* string); - - private: - /** - * Construct a FTOutlineGlyph. - * - * @param g The glyph index NOT the char code. - * @return An FTOutlineGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int g); - -}; -#endif // __FTGLOutlineFont__ diff --git a/extern/bFTGL/include/FTGLPixmapFont.h b/extern/bFTGL/include/FTGLPixmapFont.h deleted file mode 100644 index f781ddf68dd..00000000000 --- a/extern/bFTGL/include/FTGLPixmapFont.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __FTGLPixmapFont__ -#define __FTGLPixmapFont__ - - -#include "FTFont.h" -#include "FTGL.h" - - -class FTGlyph; - - -/** - * FTGLPixmapFont is a specialisation of the FTFont class for handling - * Pixmap (Grey Scale) fonts - * - * @see FTFont - */ -class FTGL_EXPORT FTGLPixmapFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLPixmapFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLPixmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - ~FTGLPixmapFont(); - - /** - * Renders a string of characters - * - * @param string 'C' style string to be output. - */ - void Render( const char* string); - - /** - * Renders a string of characters - * - * @param string wchar_t string to be output. - */ - void Render( const wchar_t* string); - - private: - /** - * Construct a FTPixmapGlyph. - * - * @param g The glyph index NOT the char code. - * @return An FTPixmapGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int g); - -}; - - -#endif // __FTGLPixmapFont__ - diff --git a/extern/bFTGL/include/FTGLPolygonFont.h b/extern/bFTGL/include/FTGLPolygonFont.h deleted file mode 100644 index 54e624a1893..00000000000 --- a/extern/bFTGL/include/FTGLPolygonFont.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __FTGLPolygonFont__ -#define __FTGLPolygonFont__ - - -#include "FTFont.h" -#include "FTGL.h" - -class FTGlyph; - - -/** - * FTGLPolygonFont is a specialisation of the FTFont class for handling - * tesselated Polygon Mesh fonts - * - * @see FTFont - */ -class FTGL_EXPORT FTGLPolygonFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLPolygonFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLPolygonFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - ~FTGLPolygonFont(); - - private: - /** - * Construct a FTPolyGlyph. - * - * @param g The glyph index NOT the char code. - * @return An FTPolyGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int g); - -}; - - -#endif // __FTGLPolygonFont__ - diff --git a/extern/bFTGL/include/FTGLTextureFont.h b/extern/bFTGL/include/FTGLTextureFont.h deleted file mode 100644 index f0575143f4b..00000000000 --- a/extern/bFTGL/include/FTGLTextureFont.h +++ /dev/null @@ -1,151 +0,0 @@ -#ifndef __FTGLTextureFont__ -#define __FTGLTextureFont__ - -#include "FTFont.h" -#include "FTVector.h" -#include "FTGL.h" - -class FTTextureGlyph; - - -/** - * FTGLTextureFont is a specialisation of the FTFont class for handling - * Texture mapped fonts - * - * @see FTFont - */ -class FTGL_EXPORT FTGLTextureFont : public FTFont -{ - public: - /** - * Open and read a font file. Sets Error flag. - * - * @param fontname font file name. - */ - FTGLTextureFont( const char* fontname); - - /** - * Open and read a font from a buffer in memory. Sets Error flag. - * - * @param pBufferBytes the in-memory buffer - * @param bufferSizeInBytes the length of the buffer in bytes - */ - FTGLTextureFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes); - - /** - * Destructor - */ - virtual ~FTGLTextureFont(); - - /** - * Set the char size for the current face. - * - * @param size the face size in points (1/72 inch) - * @param res the resolution of the target device. - * @return true if size was set correctly - */ - virtual bool FaceSize( const unsigned int size, const unsigned int res = 72); - - /** - * Renders a string of characters - * - * @param string 'C' style string to be output. - */ - virtual void Render( const char* string); - - /** - * Renders a string of characters - * - * @param string wchar_t string to be output. - */ - virtual void Render( const wchar_t* string); - - - private: - /** - * Construct a FTTextureGlyph. - * - * @param glyphIndex The glyph index NOT the char code. - * @return An FTTextureGlyph or null on failure. - */ - inline virtual FTGlyph* MakeGlyph( unsigned int glyphIndex); - - /** - * Get the size of a block of memory required to layout the glyphs - * - * Calculates a width and height based on the glyph sizes and the - * number of glyphs. It over estimates. - */ - inline void CalculateTextureSize(); - - /** - * Creates a 'blank' OpenGL texture object. - * - * The format is GL_ALPHA and the params are - * GL_TEXTURE_WRAP_S = GL_CLAMP - * GL_TEXTURE_WRAP_T = GL_CLAMP - * GL_TEXTURE_MAG_FILTER = GL_LINEAR - * GL_TEXTURE_MIN_FILTER = GL_LINEAR - * Note that mipmapping is NOT used - */ - inline GLuint CreateTexture(); - - /** - * The maximum texture dimension on this OpenGL implemetation - */ - GLsizei maxTextSize; - - /** - * The minimum texture width required to hold the glyphs - */ - GLsizei textureWidth; - - /** - * The minimum texture height required to hold the glyphs - */ - GLsizei textureHeight; - - /** - *An array of texture ids - */ - FTVector textureIDList; - - /** - * The max height for glyphs in the current font - */ - int glyphHeight; - - /** - * The max width for glyphs in the current font - */ - int glyphWidth; - - /** - * A value to be added to the height and width to ensure that - * glyphs don't overlap in the texture - */ - unsigned int padding; - - /** - * - */ - unsigned int numGlyphs; - - /** - */ - unsigned int remGlyphs; - - /** - */ - int xOffset; - - /** - */ - int yOffset; - -}; - - -#endif // __FTGLTextureFont__ - - diff --git a/extern/bFTGL/include/FTGlyph.h b/extern/bFTGL/include/FTGlyph.h deleted file mode 100644 index c38d51e728e..00000000000 --- a/extern/bFTGL/include/FTGlyph.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef __FTGlyph__ -#define __FTGlyph__ - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTBBox.h" -#include "FTPoint.h" -#include "FTGL.h" - - -/** - * FTGlyph is the base class for FTGL glyphs. - * - * It provides the interface between Freetype glyphs and their openGL - * renderable counterparts. This is an abstract class and derived classes - * must implement the render function. - * - * @see FTGlyphContainer - * @see FTBBox - * @see FTPoint - * - */ -class FTGL_EXPORT FTGlyph -{ - public: - /** - * Constructor - */ - FTGlyph( FT_GlyphSlot glyph); - - /** - * Destructor - */ - virtual ~FTGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen) = 0; - - /** - * Return the advance width for this glyph. - * - * @return advance width. - */ - float Advance() const { return advance;} - - /** - * Return the bounding box for this glyph. - * - * @return bounding box. - */ - const FTBBox& BBox() const { return bBox;} - - /** - * Queries for errors. - * - * @return The current error code. - */ - FT_Error Error() const { return err;} - - protected: - /** - * The advance distance for this glyph - */ - float advance; - - /** - * The bounding box of this glyph. - */ - FTBBox bBox; - - /** - * Current error code. Zero means no error. - */ - FT_Error err; - - private: - -}; - - -#endif // __FTGlyph__ - diff --git a/extern/bFTGL/include/FTGlyphContainer.h b/extern/bFTGL/include/FTGlyphContainer.h deleted file mode 100644 index de668b61dbd..00000000000 --- a/extern/bFTGL/include/FTGlyphContainer.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef __FTGlyphContainer__ -#define __FTGlyphContainer__ - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTBBox.h" -#include "FTPoint.h" -#include "FTVector.h" - -class FTFace; -class FTGlyph; -class FTCharmap; - -/** - * FTGlyphContainer holds the post processed FTGlyph objects. - * - * @see FTGlyph - */ -class FTGL_EXPORT FTGlyphContainer -{ - typedef FTVector GlyphVector; - public: - /** - * Constructor - * - * @param face The Freetype face - */ - FTGlyphContainer( FTFace* face); - - /** - * Destructor - */ - ~FTGlyphContainer(); - - /** - * Sets the character map for the face. - * - * @param encoding the Freetype encoding symbol. See above. - * @return true if charmap was valid - * and set correctly - */ - bool CharMap( FT_Encoding encoding); - - /** - * Get the font index of the input character. - * - * @param characterCode The character code of the requested glyph in the - * current encoding eg apple roman. - * @return The font index for the character. - */ - unsigned int FontIndex( const unsigned int characterCode ) const; - - /** - * Adds a glyph to this glyph list. - * - * @param glyph The FTGlyph to be inserted into the container - * @param characterCode The char code of the glyph NOT the glyph index. - */ - void Add( FTGlyph* glyph, const unsigned int characterCode); - - /** - * Get a glyph from the glyph list - * - * @param characterCode The char code of the glyph NOT the glyph index - * @return An FTGlyph or null is it hasn't been - * loaded. - */ - const FTGlyph* const Glyph( const unsigned int characterCode) const; - - /** - * Get the bounding box for a character. - * @param characterCode The char code of the glyph NOT the glyph index - */ - FTBBox BBox( const unsigned int characterCode) const; - - /** - * Returns the kerned advance width for a glyph. - * - * @param characterCode glyph index of the character - * @param nextCharacterCode the next glyph in a string - * @return advance width - */ - float Advance( const unsigned int characterCode, const unsigned int nextCharacterCode); - - /** - * Renders a character - * @param characterCode the glyph to be Rendered - * @param nextCharacterCode the next glyph in the string. Used for kerning. - * @param penPosition the position to Render the glyph - * @return The distance to advance the pen position after Rendering - */ - FTPoint Render( const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition); - - /** - * Queries the Font for errors. - * - * @return The current error code. - */ - FT_Error Error() const { return err;} - - private: - /** - * The FTGL face - */ - FTFace* face; - - /** - * The Character Map object associated with the current face - */ - FTCharmap* charMap; - - /** - * A structure to hold the glyphs - */ - GlyphVector glyphs; - - /** - * Current error code. Zero means no error. - */ - FT_Error err; -}; - - -#endif // __FTGlyphContainer__ diff --git a/extern/bFTGL/include/FTLibrary.h b/extern/bFTGL/include/FTLibrary.h deleted file mode 100644 index 1e5ed6b1a08..00000000000 --- a/extern/bFTGL/include/FTLibrary.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef __FTLibrary__ -#define __FTLibrary__ - -#include -#include FT_FREETYPE_H -//#include FT_CACHE_H - -#include "FTGL.h" - - -/** - * FTLibrary class is the global accessor for the Freetype library. - * - * This class encapsulates the Freetype Library. This is a singleton class - * and ensures that only one FT_Library is in existence at any one time. - * All constructors are private therefore clients cannot create or - * instantiate this class themselves and must access it's methods via the - * static FTLibrary::Instance() function. - * - * Just because this class returns a valid FTLibrary object - * doesn't mean that the Freetype Library has been successfully initialised. - * Clients should check for errors. You can initialse the library AND check - * for errors using the following code... - * err = FTLibrary::Instance().Error(); - * - * @see "Freetype 2 Documentation" - * - */ -class FTGL_EXPORT FTLibrary -{ - public: - /** - * Global acces point to the single FTLibrary object. - * - * @return The global FTLibrary object. - */ - static FTLibrary& Instance(); - - /** - * Gets a pointer to the native Freetype library. - * - * @return A handle to a FreeType library instance. - */ - const FT_Library* const GetLibrary() const { return library;} - - /** - * Queries the library for errors. - * - * @return The current error code. - */ - FT_Error Error() const { return err;} - - /** - * Destructor - * - * Disposes of the Freetype library - */ - ~FTLibrary(); - - private: - /** - * Default constructors. - * - * Made private to stop clients creating there own FTLibrary - * objects. - */ - FTLibrary(); - FTLibrary( const FT_Library&){} - FTLibrary& operator=( const FT_Library&) { return *this; } - - /** - * Initialises the Freetype library - * - * Even though this function indicates success via the return value, - * clients can't see this so must check the error codes. This function - * is only ever called by the default c_stor - * - * @return true if the Freetype library was - * successfully initialised, false - * otherwise. - */ - bool Initialise(); - - /** - * Freetype library handle. - */ - FT_Library* library; -// FTC_Manager* manager; - - /** - * Current error code. Zero means no error. - */ - FT_Error err; - -}; - -#endif // __FTLibrary__ diff --git a/extern/bFTGL/include/FTList.h b/extern/bFTGL/include/FTList.h deleted file mode 100644 index 34992168103..00000000000 --- a/extern/bFTGL/include/FTList.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef __FTList__ -#define __FTList__ - -#include "FTGL.h" - -/** -* Provides a non-STL alternative to the STL list - */ -template -class FTGL_EXPORT FTList -{ - public: - typedef FT_LIST_ITEM_TYPE value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - - /** - * Constructor - */ - FTList() - : listSize(0), - tail(0) - { - tail = NULL; - head = new Node; - } - - /** - * Destructor - */ - ~FTList() - { - Node* next; - - for( Node *walk = head; walk; walk = next) - { - next = walk->next; - delete walk; - } - } - - /** - * Get the number of items in the list - */ - size_type size() const - { - return listSize; - } - - /** - * Add an item to the end of the list - */ - void push_back( const value_type& item) - { - Node* node = new Node( item); - - if( head->next == NULL) - { - head->next = node; - } - - if( tail) - { - tail->next = node; - } - tail = node; - ++listSize; - } - - /** - * Get the item at the front of the list - */ - reference front() const - { - return head->next->payload; - } - - /** - * Get the item at the end of the list - */ - reference back() const - { - return tail->payload; - } - - private: - struct Node - { - Node() - : next(NULL) - {} - - Node( const value_type& item) - : next(NULL) - { - payload = item; - } - - Node* next; - - value_type payload; - }; - - size_type listSize; - - Node* head; - Node* tail; -}; - -#endif // __FTList__ - diff --git a/extern/bFTGL/include/FTOutlineGlyph.h b/extern/bFTGL/include/FTOutlineGlyph.h deleted file mode 100644 index 7dd0ba042b9..00000000000 --- a/extern/bFTGL/include/FTOutlineGlyph.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __FTOutlineGlyph__ -#define __FTOutlineGlyph__ - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - -class FTVectoriser; - - -/** - * FTOutlineGlyph is a specialisation of FTGlyph for creating outlines. - * - * @see FTGlyphContainer - * @see FTVectoriser - * - */ -class FTGL_EXPORT FTOutlineGlyph : public FTGlyph -{ - public: - /** - * Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline. - * - * @param glyph The Freetype glyph to be processed - */ - FTOutlineGlyph( FT_GlyphSlot glyph); - - /** - * Destructor - */ - virtual ~FTOutlineGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - private: - /** - * OpenGL display list - */ - GLuint glList; - -}; - - -#endif // __FTOutlineGlyph__ - diff --git a/extern/bFTGL/include/FTPixmapGlyph.h b/extern/bFTGL/include/FTPixmapGlyph.h deleted file mode 100644 index 9d43d6c58b3..00000000000 --- a/extern/bFTGL/include/FTPixmapGlyph.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __FTPixmapGlyph__ -#define __FTPixmapGlyph__ - - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - - -/** - * FTPixmapGlyph is a specialisation of FTGlyph for creating pixmaps. - * - * @see FTGlyphContainer - * - */ -class FTGL_EXPORT FTPixmapGlyph : public FTGlyph -{ - public: - /** - * Constructor - * - * @param glyph The Freetype glyph to be processed - */ - FTPixmapGlyph( FT_GlyphSlot glyph); - - /** - * Destructor - */ - virtual ~FTPixmapGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - // attributes - - private: - /** - * The width of the glyph 'image' - */ - int destWidth; - - /** - * The height of the glyph 'image' - */ - int destHeight; - - /** - * Vector from the pen position to the topleft corner of the pixmap - */ - FTPoint pos; - - /** - * Pointer to the 'image' data - */ - unsigned char* data; - -}; - - -#endif // __FTPixmapGlyph__ diff --git a/extern/bFTGL/include/FTPoint.h b/extern/bFTGL/include/FTPoint.h deleted file mode 100644 index bb1772c4c18..00000000000 --- a/extern/bFTGL/include/FTPoint.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef __FTPoint__ -#define __FTPoint__ - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" - -/** - * FTPoint class is a basic 3 dimensional point or vector. - */ -class FTGL_EXPORT FTPoint -{ - public: - /** - * Default constructor. Point is set to zero. - */ - FTPoint() - : x(0), y(0), z(0) - {} - - /** - * Constructor. - * - * @param X - * @param Y - * @param Z - */ - FTPoint( const FTGL_DOUBLE X, const FTGL_DOUBLE Y, const FTGL_DOUBLE Z) - : x(X), y(Y), z(Z) - {} - - /** - * Constructor. This converts an FT_Vector to an FT_Point - * - * @param ft_vector A freetype vector - */ - FTPoint( const FT_Vector& ft_vector) - : x(ft_vector.x), y(ft_vector.y), z(0) - {} - - /** - * Operator += - * - * @param point - * @return this plus point. - */ - FTPoint& operator += ( const FTPoint& point) - { - x += point.x; - y += point.y; - z += point.z; - - return *this; - } - - /** - * Operator == Tests for eqaulity - * - * @param a - * @param b - * @return - */ - friend bool operator == ( const FTPoint &a, const FTPoint &b); - - /** - * Operator != Tests for non equality - * - * @param a - * @param b - * @return - */ - friend bool operator != ( const FTPoint &a, const FTPoint &b); - - /** - * The point data - */ - FTGL_DOUBLE x, y, z; // FIXME make private - - private: -}; - -#endif // __FTPoint__ - diff --git a/extern/bFTGL/include/FTPolyGlyph.h b/extern/bFTGL/include/FTPolyGlyph.h deleted file mode 100644 index c8faeffceb6..00000000000 --- a/extern/bFTGL/include/FTPolyGlyph.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __FTPolyGlyph__ -#define __FTPolyGlyph__ - - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - -class FTVectoriser; - -/** - * FTPolyGlyph is a specialisation of FTGlyph for creating tessellated - * polygon glyphs. - * - * @see FTGlyphContainer - * @see FTVectoriser - * - */ -class FTGL_EXPORT FTPolyGlyph : public FTGlyph -{ - public: - /** - * Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline. - * - * @param glyph The Freetype glyph to be processed - */ - FTPolyGlyph( FT_GlyphSlot glyph); - - /** - * Destructor - */ - virtual ~FTPolyGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - private: - /** - * OpenGL display list - */ - GLuint glList; - -}; - - -#endif // __FTPolyGlyph__ - diff --git a/extern/bFTGL/include/FTSize.h b/extern/bFTGL/include/FTSize.h deleted file mode 100644 index 31f6bb66db1..00000000000 --- a/extern/bFTGL/include/FTSize.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef __FTSize__ -#define __FTSize__ - - -#include -#include FT_FREETYPE_H - -#include "FTGL.h" - - - -/** - * FTSize class provides an abstraction layer for the Freetype Size. - * - * @see "Freetype 2 Documentation" - * - */ -class FTGL_EXPORT FTSize -{ - public: - /** - * Default Constructor - */ - FTSize(); - - /** - * Destructor - */ - virtual ~FTSize(); - - /** - * Sets the char size for the current face. - * - * This doesn't guarantee that the size was set correctly. Clients - * should check errors. - * - * @param face Parent face for this size object - * @param point_size the face size in points (1/72 inch) - * @param x_resolution the horizontal resolution of the target device. - * @param y_resolution the vertical resolution of the target device. - * @return true if the size has been set. Clients should check Error() for more information if this function returns false() - */ - bool CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution); - - /** - * get the char size for the current face. - * - * @return The char size in points - */ - unsigned int CharSize() const; - - /** - * Gets the global ascender height for the face in pixels. - * - * @return Ascender height - */ - float Ascender() const; - - /** - * Gets the global descender height for the face in pixels. - * - * @return Ascender height - */ - float Descender() const; - - /** - * Gets the global face height for the face. - * - * If the face is scalable this returns the height of the global - * bounding box which ensures that any glyph will be less than or - * equal to this height. If the font isn't scalable there is no - * guarantee that glyphs will not be taller than this value. - * - * @return height in pixels. - */ - float Height() const; - - /** - * Gets the global face width for the face. - * - * If the face is scalable this returns the width of the global - * bounding box which ensures that any glyph will be less than or - * equal to this width. If the font isn't scalable this value is - * the max_advance for the face. - * - * @return width in pixels. - */ - float Width() const; - - /** - * Gets the underline position for the face. - * - * @return underline position in pixels - */ - float Underline() const; - - unsigned int XPixelsPerEm() const; - - unsigned int YPixelsPerEm() const; - - /** - * Queries for errors. - * - * @return The current error code. - */ - FT_Error Error() const { return err; } - - private: - /** - * The current Freetype face that this FTSize object relates to. - */ - FT_Face* ftFace; - - /** - * The Freetype size. - */ - FT_Size ftSize; - - /** - * The size in points. - */ - unsigned int size; - - /** - * Current error code. Zero means no error. - */ - FT_Error err; - -}; - -#endif // __FTSize__ - diff --git a/extern/bFTGL/include/FTTextureGlyph.h b/extern/bFTGL/include/FTTextureGlyph.h deleted file mode 100644 index 389e6f778da..00000000000 --- a/extern/bFTGL/include/FTTextureGlyph.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef __FTTextureGlyph__ -#define __FTTextureGlyph__ - - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H - -#include "FTGL.h" -#include "FTGlyph.h" - - -/** - * FTTextureGlyph is a specialisation of FTGlyph for creating texture - * glyphs. - * - * @see FTGlyphContainer - * - */ -class FTGL_EXPORT FTTextureGlyph : public FTGlyph -{ - public: - /** - * Constructor - * - * @param glyph The Freetype glyph to be processed - * @param id The id of the texture that this glyph will be - * drawn in - * @param xOffset The x offset into the parent texture to draw - * this glyph - * @param yOffset The y offset into the parent texture to draw - * this glyph - * @param width The width of the parent texture - * @param height The height (number of rows) of the parent texture - */ - FTTextureGlyph( FT_GlyphSlot glyph, int id, int xOffset, int yOffset, GLsizei width, GLsizei height); - - /** - * Destructor - */ - virtual ~FTTextureGlyph(); - - /** - * Renders this glyph at the current pen position. - * - * @param pen The current pen position. - * @return The advance distance for this glyph. - */ - virtual float Render( const FTPoint& pen); - - private: - /** - * The width of the glyph 'image' - */ - int destWidth; - - /** - * The height of the glyph 'image' - */ - int destHeight; - - /** - * Vector from the pen position to the topleft corner of the pixmap - */ - FTPoint pos; - - /** - * The texture co-ords of this glyph within the texture. - */ - FTPoint uv[2]; - - /** - * The texture index that this glyph is contained in. - */ - int glTextureID; - - /** - * The texture index of the currently active texture - * - * We call glGetIntegerv( GL_TEXTURE_2D_BINDING, activeTextureID); - * to get the currently active texture to try to reduce the number - * of texture bind operations - */ - GLint activeTextureID; - -}; - - -#endif // __FTTextureGlyph__ diff --git a/extern/bFTGL/include/FTVector.h b/extern/bFTGL/include/FTVector.h deleted file mode 100644 index 6147f522c08..00000000000 --- a/extern/bFTGL/include/FTVector.h +++ /dev/null @@ -1,190 +0,0 @@ -#ifndef __FTVector__ -#define __FTVector__ - -#include "FTGL.h" - -/** - * Provides a non-STL alternative to the STL vector - */ -template -class FTGL_EXPORT FTVector -{ - public: - typedef FT_VECTOR_ITEM_TYPE value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef value_type* iterator; - typedef const value_type* const_iterator; - typedef size_t size_type; - - FTVector() - { - Capacity = Size = 0; - Items = 0; - } - - - virtual ~FTVector() - { - clear(); - } - - FTVector& operator =(const FTVector& v) - { - reserve(v.capacity()); - - iterator ptr = begin(); - const_iterator vbegin = v.begin(); - const_iterator vend = v.end(); - - while( vbegin != vend) - { - *ptr++ = *vbegin++; - } - - Size = v.size(); - return *this; - } - - size_type size() const - { - return Size; - } - - size_type capacity() const - { - return Capacity; - } - - iterator begin() - { - return Items; - } - - const_iterator begin() const - { - return Items; - } - - iterator end() - { - return begin() + size(); - } - - const_iterator end() const - { - return begin() + size(); - } - - bool empty() const - { - return size() == 0; - } - - reference operator [](size_type pos) - { - return( *(begin() + pos)); - } - - const_reference operator []( size_type pos) const - { - return( *(begin() + pos)); - } - - void clear() - { - if( Capacity) - { - delete [] Items; - Capacity = Size = 0; - Items = 0; - } - } - - void reserve( size_type n) - { - if( capacity() < n) - { - expand(n); - } - } - - void push_back(const value_type& x) - { - if( size() == capacity()) - { - expand(); - } - - ( *this)[size()] = x; - ++Size; - } - - void resize(size_type n, value_type x) - { - if( n == size()) - { - return; - } - - reserve(n); - iterator begin, end; - - if( n >= Size) - { - begin = this->end(); - end = this->begin() + n; - } - else - { - begin = this->begin() + n; - end = this->end(); - } - - while( begin != end) - { - *begin++ = x; - } - - Size = n; - } - - - private: - void expand(size_type capacity_hint = 0) - { - size_type new_capacity =( capacity() == 0) ? 256 : capacity()* 2; - if( capacity_hint) - { - while( new_capacity < capacity_hint) - { - new_capacity *= 2; - } - } - - value_type *new_items = new value_type[new_capacity]; - - iterator begin = this->begin(); - iterator end = this->end(); - value_type *ptr = new_items; - - while( begin != end) - { - *ptr++ = *begin++; - } - - if( Capacity) - { - delete [] Items; - } - - Items = new_items; - Capacity = new_capacity; - } - - size_type Capacity; - size_type Size; - value_type* Items; -}; - -#endif // __FTVector__ diff --git a/extern/bFTGL/include/FTVectoriser.h b/extern/bFTGL/include/FTVectoriser.h deleted file mode 100644 index 7150560ce07..00000000000 --- a/extern/bFTGL/include/FTVectoriser.h +++ /dev/null @@ -1,275 +0,0 @@ -#ifndef __FTVectoriser__ -#define __FTVectoriser__ - - -#include "FTContour.h" -#include "FTList.h" -#include "FTPoint.h" -#include "FTVector.h" -#include "FTGL.h" - - -#ifndef CALLBACK -#define CALLBACK -#endif - - -/** - * FTTesselation captures points that are output by OpenGL's gluTesselator. - */ -class FTGL_EXPORT FTTesselation -{ - public: - /** - * Default constructor - */ - FTTesselation( GLenum m) - : meshType(m) - { - pointList.reserve( 128); - } - - /** - * Destructor - */ - ~FTTesselation() - { - pointList.clear(); - } - - /** - * Add a point to the mesh. - */ - void AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z) - { - pointList.push_back( FTPoint( x, y, z)); - } - - /** - * The number of points in this mesh - */ - size_t PointCount() const { return pointList.size();} - - /** - * - */ - const FTPoint& Point( unsigned int index) const { return pointList[index];} - - /** - * Return the OpenGL polygon type. - */ - GLenum PolygonType() const { return meshType;} - - private: - /** - * Points generated by gluTesselator. - */ - typedef FTVector PointVector; - PointVector pointList; - - /** - * OpenGL primitive type from gluTesselator. - */ - GLenum meshType; -}; - - -/** - * FTMesh is a container of FTTesselation's that make up a polygon glyph - */ -class FTGL_EXPORT FTMesh -{ - typedef FTVector TesselationVector; - typedef FTList PointList; - - public: - /** - * Default constructor - */ - FTMesh(); - - /** - * Destructor - */ - ~FTMesh(); - - /** - * - */ - void AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z); - - /** - * - */ - FTGL_DOUBLE* Combine( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z); - - /** - * - */ - void Begin( GLenum meshType); - - /** - * - */ - void End(); - - /** - * - */ - void Error( GLenum e) { err = e;} - - /** - * - */ - unsigned int TesselationCount() const { return tesselationList.size();} - - /** - * - */ - const FTTesselation* const Tesselation( unsigned int index) const; - - /** - * - */ - const PointList& TempPointList() const { return tempPointList;} - - /** - * Get the GL ERROR returned by the glu tesselator - */ - GLenum Error() const { return err;} - - private: - /** - * The current sub mesh that we are constructing. - */ - FTTesselation* currentTesselation; - - /** - * Holds each sub mesh that comprises this glyph. - */ - TesselationVector tesselationList; - - /** - * Holds extra points created by gluTesselator. See ftglCombine. - */ - PointList tempPointList; - - /** - * GL ERROR returned by the glu tesselator - */ - GLenum err; - -}; - -const FTGL_DOUBLE FTGL_FRONT_FACING = 1.0; -const FTGL_DOUBLE FTGL_BACK_FACING = -1.0; - -/** - * FTVectoriser class is a helper class that converts font outlines into - * point data. - * - * @see FTExtrdGlyph - * @see FTOutlineGlyph - * @see FTPolyGlyph - * @see FTContour - * @see FTPoint - * - */ -class FTGL_EXPORT FTVectoriser -{ - public: - /** - * Constructor - * - * @param glyph The freetype glyph to be processed - */ - FTVectoriser( const FT_GlyphSlot glyph); - - /** - * Destructor - */ - virtual ~FTVectoriser(); - - /** - * Build an FTMesh from the vector outline data. - * - * @param zNormal The direction of the z axis of the normal - * for this mesh - */ - void MakeMesh( FTGL_DOUBLE zNormal = FTGL_FRONT_FACING); - - /** - * Get the current mesh. - */ - const FTMesh* const GetMesh() const { return mesh;} - - /** - * Get the total count of points in this outline - * - * @return the number of points - */ - size_t PointCount(); - - /** - * Get the count of contours in this outline - * - * @return the number of contours - */ - size_t ContourCount() const { return ftContourCount;} - - /** - * Return a contour at index - * - * @return the number of contours - */ - const FTContour* const Contour( unsigned int index) const; - - /** - * Get the number of points in a specific contour in this outline - * - * @param c The contour index - * @return the number of points in contour[c] - */ - size_t ContourSize( int c) const { return contourList[c]->PointCount();} - - /** - * Get the flag for the tesselation rule for this outline - * - * @return The contour flag - */ - int ContourFlag() const { return contourFlag;} - - private: - /** - * Process the freetype outline data into contours of points - */ - void ProcessContours(); - - /** - * The list of contours in the glyph - */ - FTContour** contourList; - - /** - * A Mesh for tesselations - */ - FTMesh* mesh; - - /** - * The number of contours reported by Freetype - */ - short ftContourCount; - - /** - * A flag indicating the tesselation rule for the glyph - */ - int contourFlag; - - /** - * A Freetype outline - */ - FT_Outline outline; -}; - - -#endif // __FTVectoriser__ diff --git a/extern/bFTGL/license.txt b/extern/bFTGL/license.txt deleted file mode 100644 index b9fd0dbb580..00000000000 --- a/extern/bFTGL/license.txt +++ /dev/null @@ -1,27 +0,0 @@ -FTGL - -Herewith is a license. I've also chucked in a gnu (see COPYING.txt) license -for those that are that way inclined. Basically I want you to use this -software and if you think this license is preventing you from doing so -let me know. - -Copyright (C) 2001-3 Henry Maddocks - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/extern/bFTGL/make/msvc_7_0/ftgl_static_lib.vcproj b/extern/bFTGL/make/msvc_7_0/ftgl_static_lib.vcproj deleted file mode 100644 index a2dcf685ed2..00000000000 --- a/extern/bFTGL/make/msvc_7_0/ftgl_static_lib.vcproj +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extern/bFTGL/src/FTBitmapGlyph.cpp b/extern/bFTGL/src/FTBitmapGlyph.cpp deleted file mode 100644 index 5db33f10c79..00000000000 --- a/extern/bFTGL/src/FTBitmapGlyph.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include - -#include "FTBitmapGlyph.h" - -FTBitmapGlyph::FTBitmapGlyph( FT_GlyphSlot glyph) -: FTGlyph( glyph), - destWidth(0), - destHeight(0), - data(0) -{ - err = FT_Render_Glyph( glyph, FT_RENDER_MODE_MONO); - if( err || ft_glyph_format_bitmap != glyph->format) - { - return; - } - - FT_Bitmap bitmap = glyph->bitmap; - - unsigned int srcWidth = bitmap.width; - unsigned int srcHeight = bitmap.rows; - unsigned int srcPitch = bitmap.pitch; - - destWidth = srcWidth; - destHeight = srcHeight; - destPitch = srcPitch; - - if( destWidth && destHeight) - { - data = new unsigned char[destPitch * destHeight]; - unsigned char* dest = data + (( destHeight - 1) * destPitch); - - unsigned char* src = bitmap.buffer; - - for( unsigned int y = 0; y < srcHeight; ++y) - { - memcpy( dest, src, srcPitch); - dest -= destPitch; - src += srcPitch; - } - } - - pos.x = glyph->bitmap_left; - pos.y = static_cast(srcHeight) - glyph->bitmap_top; -} - - -FTBitmapGlyph::~FTBitmapGlyph() -{ - delete [] data; -} - - -float FTBitmapGlyph::Render( const FTPoint& pen) -{ - if( data) - { - glBitmap( 0, 0, 0.0, 0.0, pen.x + pos.x, pen.y - pos.y, (const GLubyte*)0 ); - - glPixelStorei( GL_UNPACK_ROW_LENGTH, destPitch * 8); - glBitmap( destWidth, destHeight, 0.0f, 0.0, 0.0, 0.0, (const GLubyte*)data); - - glBitmap( 0, 0, 0.0, 0.0, -pen.x - pos.x, -pen.y + pos.y, (const GLubyte*)0 ); - } - - return advance; -} diff --git a/extern/bFTGL/src/FTBufferGlyph.cpp b/extern/bFTGL/src/FTBufferGlyph.cpp deleted file mode 100644 index 27310103152..00000000000 --- a/extern/bFTGL/src/FTBufferGlyph.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "FTBufferGlyph.h" - -FTBufferGlyph::FTBufferGlyph( FT_GlyphSlot glyph, unsigned char* b) -: FTGlyph( glyph), - destWidth(0), - destHeight(0), - data(0), - buffer(b) -{ - err = FT_Render_Glyph( glyph, FT_RENDER_MODE_NORMAL); - if( err || ft_glyph_format_bitmap != glyph->format) - { - return; - } - - FT_Bitmap bitmap = glyph->bitmap; - - unsigned int srcWidth = bitmap.width; - unsigned int srcHeight = bitmap.rows; - unsigned int srcPitch = bitmap.pitch; - - destWidth = srcWidth; - destHeight = srcHeight; - destPitch = srcPitch; - - if( destWidth && destHeight) - { - data = new unsigned char[destPitch * destHeight]; - unsigned char* dest = data + (( destHeight - 1) * destPitch); - - unsigned char* src = bitmap.buffer; - - for( unsigned int y = 0; y < srcHeight; ++y) - { - memcpy( dest, src, srcPitch); - dest -= destPitch; - src += srcPitch; - } - } - - pos.x = glyph->bitmap_left; - pos.y = srcHeight - glyph->bitmap_top; -} - - -FTBufferGlyph::~FTBufferGlyph() -{ - delete [] data; -} - - -float FTBufferGlyph::Render( const FTPoint& pen) -{ - if( data && buffer) - { - } - - return advance; -} diff --git a/extern/bFTGL/src/FTCharmap.cpp b/extern/bFTGL/src/FTCharmap.cpp deleted file mode 100644 index 00e8cfceca5..00000000000 --- a/extern/bFTGL/src/FTCharmap.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "FTFace.h" -#include "FTCharmap.h" - - -FTCharmap::FTCharmap( FTFace* face) -: ftFace( *(face->Face())), - err(0) -{ - if( !ftFace->charmap) - { - err = FT_Set_Charmap( ftFace, ftFace->charmaps[0]); - } - - ftEncoding = ftFace->charmap->encoding; -} - - -FTCharmap::~FTCharmap() -{ - charMap.clear(); -} - - -bool FTCharmap::CharMap( FT_Encoding encoding) -{ - if( ftEncoding == encoding) - { - return true; - } - - err = FT_Select_Charmap( ftFace, encoding ); - - if( !err) - { - ftEncoding = encoding; - } - else - { - ftEncoding = ft_encoding_none; - } - - charMap.clear(); - return !err; -} - - -unsigned int FTCharmap::GlyphListIndex( const unsigned int characterCode ) -{ - return charMap.find( characterCode); -} - - -unsigned int FTCharmap::FontIndex( const unsigned int characterCode ) -{ - return FT_Get_Char_Index( ftFace, characterCode); -} - - -void FTCharmap::InsertIndex( const unsigned int characterCode, const unsigned int containerIndex) -{ - charMap.insert( characterCode, containerIndex); -} diff --git a/extern/bFTGL/src/FTContour.cpp b/extern/bFTGL/src/FTContour.cpp deleted file mode 100644 index 6b0cf8a23e1..00000000000 --- a/extern/bFTGL/src/FTContour.cpp +++ /dev/null @@ -1,149 +0,0 @@ -#include "FTContour.h" - -static const float BEZIER_STEP_SIZE = 0.2f; - - -void FTContour::AddPoint( FTPoint point) -{ - if( pointList.empty() || point != pointList[pointList.size() - 1]) - { - pointList.push_back( point); - } -} - - -void FTContour::AddPoint( float x, float y) -{ - AddPoint( FTPoint( x, y, 0.0f)); -} - - -void FTContour::evaluateQuadraticCurve() -{ - for( unsigned int i = 0; i <= ( 1.0f / BEZIER_STEP_SIZE); i++) - { - float bezierValues[2][2]; - - float t = static_cast(i) * BEZIER_STEP_SIZE; - - bezierValues[0][0] = (1.0f - t) * controlPoints[0][0] + t * controlPoints[1][0]; - bezierValues[0][1] = (1.0f - t) * controlPoints[0][1] + t * controlPoints[1][1]; - - bezierValues[1][0] = (1.0f - t) * controlPoints[1][0] + t * controlPoints[2][0]; - bezierValues[1][1] = (1.0f - t) * controlPoints[1][1] + t * controlPoints[2][1]; - - bezierValues[0][0] = (1.0f - t) * bezierValues[0][0] + t * bezierValues[1][0]; - bezierValues[0][1] = (1.0f - t) * bezierValues[0][1] + t * bezierValues[1][1]; - - AddPoint( bezierValues[0][0], bezierValues[0][1]); - } -} - -void FTContour::evaluateCubicCurve() -{ - for( unsigned int i = 0; i <= ( 1.0f / BEZIER_STEP_SIZE); i++) - { - float bezierValues[3][2]; - - float t = static_cast(i) * BEZIER_STEP_SIZE; - - bezierValues[0][0] = (1.0f - t) * controlPoints[0][0] + t * controlPoints[1][0]; - bezierValues[0][1] = (1.0f - t) * controlPoints[0][1] + t * controlPoints[1][1]; - - bezierValues[1][0] = (1.0f - t) * controlPoints[1][0] + t * controlPoints[2][0]; - bezierValues[1][1] = (1.0f - t) * controlPoints[1][1] + t * controlPoints[2][1]; - - bezierValues[2][0] = (1.0f - t) * controlPoints[2][0] + t * controlPoints[3][0]; - bezierValues[2][1] = (1.0f - t) * controlPoints[2][1] + t * controlPoints[3][1]; - - bezierValues[0][0] = (1.0f - t) * bezierValues[0][0] + t * bezierValues[1][0]; - bezierValues[0][1] = (1.0f - t) * bezierValues[0][1] + t * bezierValues[1][1]; - - bezierValues[1][0] = (1.0f - t) * bezierValues[1][0] + t * bezierValues[2][0]; - bezierValues[1][1] = (1.0f - t) * bezierValues[1][1] + t * bezierValues[2][1]; - - bezierValues[0][0] = (1.0f - t) * bezierValues[0][0] + t * bezierValues[1][0]; - bezierValues[0][1] = (1.0f - t) * bezierValues[0][1] + t * bezierValues[1][1]; - - AddPoint( bezierValues[0][0], bezierValues[0][1]); - } -} - - -FTContour::FTContour( FT_Vector* contour, char* pointTags, unsigned int numberOfPoints) -{ - for( unsigned int pointIndex = 0; pointIndex < numberOfPoints; ++ pointIndex) - { - char pointTag = pointTags[pointIndex]; - - if( pointTag == FT_Curve_Tag_On || numberOfPoints < 2) - { - AddPoint( contour[pointIndex].x, contour[pointIndex].y); - continue; - } - - FTPoint controlPoint( contour[pointIndex]); - FTPoint previousPoint = ( 0 == pointIndex) - ? FTPoint( contour[numberOfPoints - 1]) - : pointList[pointList.size() - 1]; - - FTPoint nextPoint = ( pointIndex == numberOfPoints - 1) - ? pointList[0] - : FTPoint( contour[pointIndex + 1]); - - if( pointTag == FT_Curve_Tag_Conic) - { - char nextPointTag = ( pointIndex == numberOfPoints - 1) - ? pointTags[0] - : pointTags[pointIndex + 1]; - - while( nextPointTag == FT_Curve_Tag_Conic) - { - nextPoint = FTPoint( static_cast( controlPoint.x + nextPoint.x) * 0.5f, - static_cast( controlPoint.y + nextPoint.y) * 0.5f, - 0); - - controlPoints[0][0] = previousPoint.x; controlPoints[0][1] = previousPoint.y; - controlPoints[1][0] = controlPoint.x; controlPoints[1][1] = controlPoint.y; - controlPoints[2][0] = nextPoint.x; controlPoints[2][1] = nextPoint.y; - - evaluateQuadraticCurve(); - ++pointIndex; - - previousPoint = nextPoint; - controlPoint = FTPoint( contour[pointIndex]); - nextPoint = ( pointIndex == numberOfPoints - 1) - ? pointList[0] - : FTPoint( contour[pointIndex + 1]); - nextPointTag = ( pointIndex == numberOfPoints - 1) - ? pointTags[0] - : pointTags[pointIndex + 1]; - } - - controlPoints[0][0] = previousPoint.x; controlPoints[0][1] = previousPoint.y; - controlPoints[1][0] = controlPoint.x; controlPoints[1][1] = controlPoint.y; - controlPoints[2][0] = nextPoint.x; controlPoints[2][1] = nextPoint.y; - - evaluateQuadraticCurve(); - continue; - } - - if( pointTag == FT_Curve_Tag_Cubic) - { - FTPoint controlPoint2 = nextPoint; - - FTPoint nextPoint = ( pointIndex == numberOfPoints - 2) - ? pointList[0] - : FTPoint( contour[pointIndex + 2]); - - controlPoints[0][0] = previousPoint.x; controlPoints[0][1] = previousPoint.y; - controlPoints[1][0] = controlPoint.x; controlPoints[1][1] = controlPoint.y; - controlPoints[2][0] = controlPoint2.x; controlPoints[2][1] = controlPoint2.y; - controlPoints[3][0] = nextPoint.x; controlPoints[3][1] = nextPoint.y; - - evaluateCubicCurve(); - ++pointIndex; - continue; - } - } -} diff --git a/extern/bFTGL/src/FTExtrdGlyph.cpp b/extern/bFTGL/src/FTExtrdGlyph.cpp deleted file mode 100644 index 0b120e68709..00000000000 --- a/extern/bFTGL/src/FTExtrdGlyph.cpp +++ /dev/null @@ -1,141 +0,0 @@ -#include - -#include "FTExtrdGlyph.h" -#include "FTVectoriser.h" - - -FTExtrdGlyph::FTExtrdGlyph( FT_GlyphSlot glyph, float d) -: FTGlyph( glyph), - glList(0), - depth(d) -{ - bBox.SetDepth( -depth); - - if( ft_glyph_format_outline != glyph->format) - { - err = 0x14; // Invalid_Outline - return; - } - - FTVectoriser vectoriser( glyph); - if ( ( vectoriser.ContourCount() < 1) || ( vectoriser.PointCount() < 3)) - { - return; - } - - unsigned int tesselationIndex; - glList = glGenLists(1); - glNewList( glList, GL_COMPILE); - - vectoriser.MakeMesh( 1.0); - glNormal3d(0.0, 0.0, 1.0); - - const FTMesh* mesh = vectoriser.GetMesh(); - for( tesselationIndex = 0; tesselationIndex < mesh->TesselationCount(); ++tesselationIndex) - { - const FTTesselation* subMesh = mesh->Tesselation( tesselationIndex); - unsigned int polyonType = subMesh->PolygonType(); - - glBegin( polyonType); - for( unsigned int pointIndex = 0; pointIndex < subMesh->PointCount(); ++pointIndex) - { - glVertex3f( subMesh->Point( pointIndex).x / 64.0f, - subMesh->Point( pointIndex).y / 64.0f, - 0.0f); - } - glEnd(); - } - - vectoriser.MakeMesh( -1.0); - glNormal3d(0.0, 0.0, -1.0); - - mesh = vectoriser.GetMesh(); - for( tesselationIndex = 0; tesselationIndex < mesh->TesselationCount(); ++tesselationIndex) - { - const FTTesselation* subMesh = mesh->Tesselation( tesselationIndex); - unsigned int polyonType = subMesh->PolygonType(); - - glBegin( polyonType); - for( unsigned int pointIndex = 0; pointIndex < subMesh->PointCount(); ++pointIndex) - { - glVertex3f( subMesh->Point( pointIndex).x / 64.0f, - subMesh->Point( pointIndex).y / 64.0f, - -depth); - } - glEnd(); - } - - int contourFlag = vectoriser.ContourFlag(); - - for( size_t c = 0; c < vectoriser.ContourCount(); ++c) - { - const FTContour* contour = vectoriser.Contour(c); - unsigned int numberOfPoints = contour->PointCount(); - - glBegin( GL_QUAD_STRIP); - for( unsigned int j = 0; j <= numberOfPoints; ++j) - { - unsigned int index = ( j == numberOfPoints) ? 0 : j; - unsigned int nextIndex = ( index == numberOfPoints - 1) ? 0 : index + 1; - - FTPoint normal = GetNormal( contour->Point(index), contour->Point(nextIndex)); - glNormal3f( normal.x, normal.y, 0.0f); - - if( contourFlag & ft_outline_reverse_fill) - { - glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, 0.0f); - glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, -depth); - } - else - { - glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, -depth); - glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, 0.0f); - } - } - glEnd(); - } - - glEndList(); -} - - -FTExtrdGlyph::~FTExtrdGlyph() -{ - glDeleteLists( glList, 1); -} - - -float FTExtrdGlyph::Render( const FTPoint& pen) -{ - if( glList) - { - glTranslatef( pen.x, pen.y, 0); - glCallList( glList); - glTranslatef( -pen.x, -pen.y, 0); - } - - return advance; -} - - -FTPoint FTExtrdGlyph::GetNormal( const FTPoint &a, const FTPoint &b) -{ - float vectorX = a.x - b.x; - float vectorY = a.y - b.y; - - float length = sqrt( vectorX * vectorX + vectorY * vectorY ); - - if( length > 0.0f) - { - length = 1 / length; - } - else - { - length = 0.0f; - } - - return FTPoint( -vectorY * length, - vectorX * length, - 0.0f); -} - diff --git a/extern/bFTGL/src/FTFace.cpp b/extern/bFTGL/src/FTFace.cpp deleted file mode 100644 index 0385e234d6c..00000000000 --- a/extern/bFTGL/src/FTFace.cpp +++ /dev/null @@ -1,154 +0,0 @@ -#include "FTFace.h" -#include "FTLibrary.h" - -#include FT_TRUETYPE_TABLES_H - -FTFace::FTFace( const char* filename) -: numGlyphs(0), - fontEncodingList(0), - err(0) -{ - const FT_Long DEFAULT_FACE_INDEX = 0; - ftFace = new FT_Face; - - err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, DEFAULT_FACE_INDEX, ftFace); - - if( err) - { - delete ftFace; - ftFace = 0; - } - else - { - numGlyphs = (*ftFace)->num_glyphs; - } -} - - -FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: numGlyphs(0), - err(0) -{ - const FT_Long DEFAULT_FACE_INDEX = 0; - ftFace = new FT_Face; - - err = FT_New_Memory_Face( *FTLibrary::Instance().GetLibrary(), (FT_Byte *)pBufferBytes, bufferSizeInBytes, DEFAULT_FACE_INDEX, ftFace); - - if( err) - { - delete ftFace; - ftFace = 0; - } - else - { - numGlyphs = (*ftFace)->num_glyphs; - } -} - - -FTFace::~FTFace() -{ - Close(); -} - - -bool FTFace::Attach( const char* filename) -{ - err = FT_Attach_File( *ftFace, filename); - return !err; -} - - -bool FTFace::Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -{ - FT_Open_Args open; - - open.flags = FT_OPEN_MEMORY; - open.memory_base = (FT_Byte *)pBufferBytes; - open.memory_size = bufferSizeInBytes; - - err = FT_Attach_Stream( *ftFace, &open); - return !err; -} - - -void FTFace::Close() -{ - if( ftFace) - { - FT_Done_Face( *ftFace); - delete ftFace; - ftFace = 0; - } -} - - -const FTSize& FTFace::Size( const unsigned int size, const unsigned int res) -{ - charSize.CharSize( ftFace, size, res, res); - err = charSize.Error(); - - return charSize; -} - - -unsigned int FTFace::CharMapCount() -{ - return (*ftFace)->num_charmaps; -} - - -FT_Encoding* FTFace::CharMapList() -{ - if( 0 == fontEncodingList) - { - fontEncodingList = new FT_Encoding[CharMapCount()]; - for( size_t encodingIndex = 0; encodingIndex < CharMapCount(); ++encodingIndex) - { - fontEncodingList[encodingIndex] = (*ftFace)->charmaps[encodingIndex]->encoding; - } - } - - return fontEncodingList; -} - - -unsigned int FTFace::UnitsPerEM() const -{ - return (*ftFace)->units_per_EM; -} - - -FTPoint FTFace::KernAdvance( unsigned int index1, unsigned int index2) -{ - float x, y; - x = y = 0.0f; - - if( FT_HAS_KERNING((*ftFace)) && index1 && index2) - { - FT_Vector kernAdvance; - kernAdvance.x = kernAdvance.y = 0; - - err = FT_Get_Kerning( *ftFace, index1, index2, ft_kerning_unfitted, &kernAdvance); - if( !err) - { - x = static_cast( kernAdvance.x) / 64.0f; - y = static_cast( kernAdvance.y) / 64.0f; - } - } - - return FTPoint( x, y, 0.0); -} - - -FT_GlyphSlot FTFace::Glyph( unsigned int index, FT_Int load_flags) -{ - err = FT_Load_Glyph( *ftFace, index, load_flags); - if( err) - { - return NULL; - } - - return (*ftFace)->glyph; -} - diff --git a/extern/bFTGL/src/FTFont.cpp b/extern/bFTGL/src/FTFont.cpp deleted file mode 100644 index c06d883104b..00000000000 --- a/extern/bFTGL/src/FTFont.cpp +++ /dev/null @@ -1,271 +0,0 @@ -#include "FTFace.h" -#include "FTFont.h" -#include "FTGlyphContainer.h" -#include "FTBBox.h" - - -FTFont::FTFont( const char* fontname) -: face( fontname), - glyphList(0) -{ - err = face.Error(); - if( err == 0) - { - glyphList = new FTGlyphContainer( &face); - } -} - - -FTFont::FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: face( pBufferBytes, bufferSizeInBytes), - glyphList(0) -{ - err = face.Error(); - if( err == 0) - { - glyphList = new FTGlyphContainer( &face); - } -} - - -FTFont::~FTFont() -{ - delete glyphList; -} - - -bool FTFont::Attach( const char* filename) -{ - if( face.Attach( filename)) - { - err = 0; - return true; - } - else - { - err = face.Error(); - return false; - } -} - - -bool FTFont::Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -{ - if( face.Attach( pBufferBytes, bufferSizeInBytes)) - { - err = 0; - return true; - } - else - { - err = face.Error(); - return false; - } -} - - -bool FTFont::FaceSize( const unsigned int size, const unsigned int res ) -{ - charSize = face.Size( size, res); - - if( face.Error()) - { - return false; - } - - if( glyphList != NULL) - { - delete glyphList; - } - - glyphList = new FTGlyphContainer( &face); - return true; -} - - -unsigned int FTFont::FaceSize() const -{ - return charSize.CharSize(); -} - - -bool FTFont::CharMap( FT_Encoding encoding) -{ - bool result = glyphList->CharMap( encoding); - err = glyphList->Error(); - return result; -} - - -unsigned int FTFont::CharMapCount() -{ - return face.CharMapCount(); -} - - -FT_Encoding* FTFont::CharMapList() -{ - return face.CharMapList(); -} - - -float FTFont::Ascender() const -{ - return charSize.Ascender(); -} - - -float FTFont::Descender() const -{ - return charSize.Descender(); -} - - -void FTFont::BBox( const char* string, - float& llx, float& lly, float& llz, float& urx, float& ury, float& urz) -{ - FTBBox totalBBox; - - if((NULL != string) && ('\0' != *string)) - { - const unsigned char* c = (unsigned char*)string; - - CheckGlyph( *c); - - totalBBox = glyphList->BBox( *c); - float advance = glyphList->Advance( *c, *(c + 1)); - ++c; - - while( *c) - { - CheckGlyph( *c); - FTBBox tempBBox = glyphList->BBox( *c); - tempBBox.Move( FTPoint( advance, 0.0f, 0.0f)); - totalBBox += tempBBox; - advance += glyphList->Advance( *c, *(c + 1)); - ++c; - } - } - - llx = totalBBox.lowerX; - lly = totalBBox.lowerY; - llz = totalBBox.lowerZ; - urx = totalBBox.upperX; - ury = totalBBox.upperY; - urz = totalBBox.upperZ; -} - - -void FTFont::BBox( const wchar_t* string, - float& llx, float& lly, float& llz, float& urx, float& ury, float& urz) -{ - FTBBox totalBBox; - - if((NULL != string) && ('\0' != *string)) - { - const wchar_t* c = string; - - CheckGlyph( *c); - - totalBBox = glyphList->BBox( *c); - float advance = glyphList->Advance( *c, *(c + 1)); - ++c; - - while( *c) - { - CheckGlyph( *c); - FTBBox tempBBox = glyphList->BBox( *c); - tempBBox.Move( FTPoint( advance, 0.0f, 0.0f)); - totalBBox += tempBBox; - advance += glyphList->Advance( *c, *(c + 1)); - ++c; - } - } - - llx = totalBBox.lowerX; - lly = totalBBox.lowerY; - llz = totalBBox.lowerZ; - urx = totalBBox.upperX; - ury = totalBBox.upperY; - urz = totalBBox.upperZ; -} - - -float FTFont::Advance( const wchar_t* string) -{ - const wchar_t* c = string; - float width = 0.0f; - - while( *c) - { - CheckGlyph( *c); - width += glyphList->Advance( *c, *(c + 1)); - ++c; - } - - return width; -} - - -float FTFont::Advance( const char* string) -{ - const unsigned char* c = (unsigned char*)string; - float width = 0.0f; - - while( *c) - { - CheckGlyph( *c); - width += glyphList->Advance( *c, *(c + 1)); - ++c; - } - - return width; -} - - -void FTFont::Render( const char* string ) -{ - const unsigned char* c = (unsigned char*)string; - pen.x = 0; pen.y = 0; - - while( *c) - { - DoRender( *c, *(c + 1)); - ++c; - } -} - - -void FTFont::Render( const wchar_t* string ) -{ - const wchar_t* c = string; - pen.x = 0; pen.y = 0; - - while( *c) - { - DoRender( *c, *(c + 1)); - ++c; - } -} - - -void FTFont::DoRender( const unsigned int chr, const unsigned int nextChr) -{ - CheckGlyph( chr); - - FTPoint kernAdvance = glyphList->Render( chr, nextChr, pen); - - pen.x += kernAdvance.x; - pen.y += kernAdvance.y; -} - - -void FTFont::CheckGlyph( const unsigned int characterCode) -{ - if( NULL == glyphList->Glyph( characterCode)) - { - unsigned int glyphIndex = glyphList->FontIndex( characterCode); - glyphList->Add( MakeGlyph( glyphIndex), characterCode); - } -} - diff --git a/extern/bFTGL/src/FTGLBitmapFont.cpp b/extern/bFTGL/src/FTGLBitmapFont.cpp deleted file mode 100644 index 7e982a608da..00000000000 --- a/extern/bFTGL/src/FTGLBitmapFont.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "FTGLBitmapFont.h" -#include "FTBitmapGlyph.h" - - -FTGLBitmapFont::FTGLBitmapFont( const char* fontname) -: FTFont( fontname) -{} - - -FTGLBitmapFont::FTGLBitmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes) -{} - - -FTGLBitmapFont::~FTGLBitmapFont() -{} - - -FTGlyph* FTGLBitmapFont::MakeGlyph( unsigned int g) -{ - FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_DEFAULT); - - if( ftGlyph) - { - FTBitmapGlyph* tempGlyph = new FTBitmapGlyph( ftGlyph); - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - -void FTGLBitmapFont::Render( const char* string) -{ - glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT); - glPushAttrib( GL_ENABLE_BIT); - - glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei( GL_UNPACK_ALIGNMENT, 1); - - glDisable( GL_BLEND); - - FTFont::Render( string); - - glPopAttrib(); - glPopClientAttrib(); -} - - -void FTGLBitmapFont::Render( const wchar_t* string) -{ - glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT); - glPushAttrib( GL_ENABLE_BIT); - - glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei( GL_UNPACK_ALIGNMENT, 1); - - glDisable( GL_BLEND); - - FTFont::Render( string); - - glPopAttrib(); - glPopClientAttrib(); -} - diff --git a/extern/bFTGL/src/FTGLBufferFont.cpp b/extern/bFTGL/src/FTGLBufferFont.cpp deleted file mode 100644 index b8af0fcb05f..00000000000 --- a/extern/bFTGL/src/FTGLBufferFont.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "FTGLBufferFont.h" -#include "FTBufferGlyph.h" - - -FTGLBufferFont::FTGLBufferFont( const char* fontname) -: FTFont( fontname), - buffer(0) -{} - - -FTGLBufferFont::FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes), - buffer(0) -{} - - -FTGLBufferFont::~FTGLBufferFont() -{} - - -FTGlyph* FTGLBufferFont::MakeGlyph( unsigned int g) -{ - FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING); - - if( ftGlyph) - { - FTBufferGlyph* tempGlyph = new FTBufferGlyph( ftGlyph, buffer); - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - -void FTGLBufferFont::Render( const char* string) -{ - if( NULL != buffer) - { - FTFont::Render( string); - } -} - - -void FTGLBufferFont::Render( const wchar_t* string) -{ - if( NULL != buffer) - { - FTFont::Render( string); - } -} - - diff --git a/extern/bFTGL/src/FTGLExtrdFont.cpp b/extern/bFTGL/src/FTGLExtrdFont.cpp deleted file mode 100644 index 37d89333a60..00000000000 --- a/extern/bFTGL/src/FTGLExtrdFont.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "FTGLExtrdFont.h" -#include "FTExtrdGlyph.h" - - -FTGLExtrdFont::FTGLExtrdFont( const char* fontname) -: FTFont( fontname), - depth( 0.0f) -{} - - -FTGLExtrdFont::FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes), - depth( 0.0f) -{} - - -FTGLExtrdFont::~FTGLExtrdFont() -{} - - -FTGlyph* FTGLExtrdFont::MakeGlyph( unsigned int glyphIndex) -{ - FT_GlyphSlot ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING); - - if( ftGlyph) - { - FTExtrdGlyph* tempGlyph = new FTExtrdGlyph( ftGlyph, depth); - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - diff --git a/extern/bFTGL/src/FTGLOutlineFont.cpp b/extern/bFTGL/src/FTGLOutlineFont.cpp deleted file mode 100644 index b9fd187e862..00000000000 --- a/extern/bFTGL/src/FTGLOutlineFont.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "FTGLOutlineFont.h" -#include "FTOutlineGlyph.h" - - -FTGLOutlineFont::FTGLOutlineFont( const char* fontname) -: FTFont( fontname) -{} - - -FTGLOutlineFont::FTGLOutlineFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes) -{} - - -FTGLOutlineFont::~FTGLOutlineFont() -{} - - -FTGlyph* FTGLOutlineFont::MakeGlyph( unsigned int g) -{ - FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING); - - if( ftGlyph) - { - FTOutlineGlyph* tempGlyph = new FTOutlineGlyph( ftGlyph); - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - -void FTGLOutlineFont::Render( const char* string) -{ - glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT); - - glDisable( GL_TEXTURE_2D); - - glEnable( GL_LINE_SMOOTH); - glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE); - glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE - - FTFont::Render( string); - - glPopAttrib(); -} - - -void FTGLOutlineFont::Render( const wchar_t* string) -{ - glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT); - - glDisable( GL_TEXTURE_2D); - - glEnable( GL_LINE_SMOOTH); - glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE); - glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE - - FTFont::Render( string); - - glPopAttrib(); -} - diff --git a/extern/bFTGL/src/FTGLPixmapFont.cpp b/extern/bFTGL/src/FTGLPixmapFont.cpp deleted file mode 100644 index 2654b85e31e..00000000000 --- a/extern/bFTGL/src/FTGLPixmapFont.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "FTGLPixmapFont.h" -#include "FTPixmapGlyph.h" - - -FTGLPixmapFont::FTGLPixmapFont( const char* fontname) -: FTFont( fontname) -{} - - -FTGLPixmapFont::FTGLPixmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes) -{} - - -FTGLPixmapFont::~FTGLPixmapFont() -{} - - -FTGlyph* FTGLPixmapFont::MakeGlyph( unsigned int g) -{ - FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); - - if( ftGlyph) - { - FTPixmapGlyph* tempGlyph = new FTPixmapGlyph( ftGlyph); - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - -void FTGLPixmapFont::Render( const char* string) -{ - glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT); - glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT); - - glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glDisable( GL_TEXTURE_2D); - - FTFont::Render( string); - - glPopClientAttrib(); - glPopAttrib(); -} - - -void FTGLPixmapFont::Render( const wchar_t* string) -{ - //glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT); - // glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT); - - glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glDisable( GL_TEXTURE_2D); - - FTFont::Render( string); - - glDisable(GL_BLEND); - // glPopClientAttrib(); - // glPopAttrib(); -} - - diff --git a/extern/bFTGL/src/FTGLPolygonFont.cpp b/extern/bFTGL/src/FTGLPolygonFont.cpp deleted file mode 100644 index 2d4dfa1f26a..00000000000 --- a/extern/bFTGL/src/FTGLPolygonFont.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "FTGLPolygonFont.h" -#include "FTPolyGlyph.h" - - -FTGLPolygonFont::FTGLPolygonFont( const char* fontname) -: FTFont( fontname) -{} - - -FTGLPolygonFont::FTGLPolygonFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes) -{} - - -FTGLPolygonFont::~FTGLPolygonFont() -{} - - -FTGlyph* FTGLPolygonFont::MakeGlyph( unsigned int g) -{ - FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING); - - if( ftGlyph) - { - FTPolyGlyph* tempGlyph = new FTPolyGlyph( ftGlyph); - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - diff --git a/extern/bFTGL/src/FTGLTextureFont.cpp b/extern/bFTGL/src/FTGLTextureFont.cpp deleted file mode 100644 index 92f14be50f2..00000000000 --- a/extern/bFTGL/src/FTGLTextureFont.cpp +++ /dev/null @@ -1,178 +0,0 @@ -#include // For memset - -#include "FTGLTextureFont.h" -#include "FTTextureGlyph.h" - - -inline GLuint NextPowerOf2( GLuint in) -{ - in -= 1; - - in |= in >> 16; - in |= in >> 8; - in |= in >> 4; - in |= in >> 2; - in |= in >> 1; - - return in + 1; -} - - -FTGLTextureFont::FTGLTextureFont( const char* fontname) -: FTFont( fontname), - maxTextSize(0), - textureWidth(0), - textureHeight(0), - glyphHeight(0), - glyphWidth(0), - padding(3), - xOffset(0), - yOffset(0) -{ - remGlyphs = numGlyphs = face.GlyphCount(); -} - - -FTGLTextureFont::FTGLTextureFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes) -: FTFont( pBufferBytes, bufferSizeInBytes), - maxTextSize(0), - textureWidth(0), - textureHeight(0), - glyphHeight(0), - glyphWidth(0), - padding(3), - xOffset(0), - yOffset(0) -{ - remGlyphs = numGlyphs = face.GlyphCount(); -} - - -FTGLTextureFont::~FTGLTextureFont() -{ - glDeleteTextures( textureIDList.size(), (const GLuint*)&textureIDList[0]); -} - - -FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int glyphIndex) -{ - FT_GlyphSlot ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); - - if( ftGlyph) - { - glyphHeight = static_cast( charSize.Height()); - glyphWidth = static_cast( charSize.Width()); - - if( textureIDList.empty()) - { - textureIDList.push_back( CreateTexture()); - xOffset = yOffset = padding; - } - - if( xOffset > ( textureWidth - glyphWidth)) - { - xOffset = padding; - yOffset += glyphHeight; - - if( yOffset > ( textureHeight - glyphHeight)) - { - textureIDList.push_back( CreateTexture()); - yOffset = padding; - } - } - - FTTextureGlyph* tempGlyph = new FTTextureGlyph( ftGlyph, textureIDList[textureIDList.size() - 1], - xOffset, yOffset, textureWidth, textureHeight); - xOffset += static_cast( tempGlyph->BBox().upperX - tempGlyph->BBox().lowerX + padding); - - --remGlyphs; - return tempGlyph; - } - - err = face.Error(); - return NULL; -} - - -void FTGLTextureFont::CalculateTextureSize() -{ - if( !maxTextSize) - { - glGetIntegerv( GL_MAX_TEXTURE_SIZE, (GLint*)&maxTextSize); - } - - textureWidth = NextPowerOf2( (remGlyphs * glyphWidth) + ( padding * 2)); - if( textureWidth > maxTextSize) - { - textureWidth = maxTextSize; - } - - int h = static_cast( (textureWidth - ( padding * 2)) / glyphWidth); - - textureHeight = NextPowerOf2( (( numGlyphs / h) + 1) * glyphHeight); - textureHeight = textureHeight > maxTextSize ? maxTextSize : textureHeight; -} - - -GLuint FTGLTextureFont::CreateTexture() -{ - CalculateTextureSize(); - - int totalMemory = textureWidth * textureHeight; - unsigned char* textureMemory = new unsigned char[totalMemory]; - memset( textureMemory, 0, totalMemory); - - GLuint textID; - glGenTextures( 1, (GLuint*)&textID); - - glBindTexture( GL_TEXTURE_2D, textID); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - - glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA, textureWidth, textureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, textureMemory); - - delete [] textureMemory; - - return textID; -} - - -bool FTGLTextureFont::FaceSize( const unsigned int size, const unsigned int res) -{ - if( !textureIDList.empty()) - { - glDeleteTextures( textureIDList.size(), (const GLuint*)&textureIDList[0]); - remGlyphs = numGlyphs = face.GlyphCount(); - } - - return FTFont::FaceSize( size, res); -} - - -void FTGLTextureFont::Render( const char* string) -{ -// glPushAttrib( GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT); - - glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE - - FTFont::Render( string); - -// glPopAttrib(); -} - - -void FTGLTextureFont::Render( const wchar_t* string) -{ -// glPushAttrib( GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT); - - glEnable(GL_BLEND); - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE - - FTFont::Render( string); - -// glPopAttrib(); -} - diff --git a/extern/bFTGL/src/FTGlyph.cpp b/extern/bFTGL/src/FTGlyph.cpp deleted file mode 100644 index c68632949c2..00000000000 --- a/extern/bFTGL/src/FTGlyph.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "FTGlyph.h" - - -FTGlyph::FTGlyph( FT_GlyphSlot glyph) -: advance(0.0f), - err(0) -{ - if( glyph) - { - bBox = FTBBox( glyph); - advance = static_cast( glyph->advance.x) / 64.0f; - } -} - - -FTGlyph::~FTGlyph() -{} diff --git a/extern/bFTGL/src/FTGlyphContainer.cpp b/extern/bFTGL/src/FTGlyphContainer.cpp deleted file mode 100644 index 2c1881bbfff..00000000000 --- a/extern/bFTGL/src/FTGlyphContainer.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#include "FTGlyphContainer.h" -#include "FTGlyph.h" -#include "FTFace.h" -#include "FTCharmap.h" - - -FTGlyphContainer::FTGlyphContainer( FTFace* f) -: face(f), - err(0) -{ - glyphs.push_back( NULL); - charMap = new FTCharmap( face); -} - - -FTGlyphContainer::~FTGlyphContainer() -{ - GlyphVector::iterator glyphIterator; - for( glyphIterator = glyphs.begin(); glyphIterator != glyphs.end(); ++glyphIterator) - { - delete *glyphIterator; - } - - glyphs.clear(); - delete charMap; -} - - -bool FTGlyphContainer::CharMap( FT_Encoding encoding) -{ - bool result = charMap->CharMap( encoding); - err = charMap->Error(); - return result; -} - - -unsigned int FTGlyphContainer::FontIndex( const unsigned int characterCode) const -{ - return charMap->FontIndex( characterCode); -} - - -void FTGlyphContainer::Add( FTGlyph* tempGlyph, const unsigned int characterCode) -{ - charMap->InsertIndex( characterCode, glyphs.size()); - glyphs.push_back( tempGlyph); -} - - -const FTGlyph* const FTGlyphContainer::Glyph( const unsigned int characterCode) const -{ - signed int index = charMap->GlyphListIndex( characterCode); - return glyphs[index]; -} - - -FTBBox FTGlyphContainer::BBox( const unsigned int characterCode) const -{ - return glyphs[charMap->GlyphListIndex( characterCode)]->BBox(); -} - - -float FTGlyphContainer::Advance( const unsigned int characterCode, const unsigned int nextCharacterCode) -{ - unsigned int left = charMap->FontIndex( characterCode); - unsigned int right = charMap->FontIndex( nextCharacterCode); - - float width = face->KernAdvance( left, right).x; - width += glyphs[charMap->GlyphListIndex( characterCode)]->Advance(); - - return width; -} - - -FTPoint FTGlyphContainer::Render( const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition) -{ - FTPoint kernAdvance; - float advance = 0; - - unsigned int left = charMap->FontIndex( characterCode); - unsigned int right = charMap->FontIndex( nextCharacterCode); - - kernAdvance = face->KernAdvance( left, right); - - if( !face->Error()) - { - advance = glyphs[charMap->GlyphListIndex( characterCode)]->Render( penPosition); - } - - kernAdvance.x = advance + kernAdvance.x; -// kernAdvance.y = advance.y + kernAdvance.y; - return kernAdvance; -} diff --git a/extern/bFTGL/src/FTLibrary.cpp b/extern/bFTGL/src/FTLibrary.cpp deleted file mode 100644 index 29ab5ae2693..00000000000 --- a/extern/bFTGL/src/FTLibrary.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "FTLibrary.h" - - -FTLibrary& FTLibrary::Instance() -{ - static FTLibrary ftlib; - return ftlib; -} - - -FTLibrary::~FTLibrary() -{ - if( library != 0) - { - FT_Done_FreeType( *library); - - delete library; - library= 0; - } - -// if( manager != 0) -// { -// FTC_Manager_Done( manager ); -// -// delete manager; -// manager= 0; -// } -} - - -FTLibrary::FTLibrary() -: library(0), - err(0) -{ - Initialise(); -} - - -bool FTLibrary::Initialise() -{ - if( library != 0) - return true; - - library = new FT_Library; - - err = FT_Init_FreeType( library); - if( err) - { - delete library; - library = 0; - return false; - } - -// FTC_Manager* manager; -// -// if( FTC_Manager_New( lib, 0, 0, 0, my_face_requester, 0, manager ) -// { -// delete manager; -// manager= 0; -// return false; -// } - - return true; -} diff --git a/extern/bFTGL/src/FTOutlineGlyph.cpp b/extern/bFTGL/src/FTOutlineGlyph.cpp deleted file mode 100644 index 340c7804140..00000000000 --- a/extern/bFTGL/src/FTOutlineGlyph.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "FTOutlineGlyph.h" -#include "FTVectoriser.h" - - -FTOutlineGlyph::FTOutlineGlyph( FT_GlyphSlot glyph) -: FTGlyph( glyph), - glList(0) -{ - if( ft_glyph_format_outline != glyph->format) - { - err = 0x14; // Invalid_Outline - return; - } - - FTVectoriser vectoriser( glyph); - - size_t numContours = vectoriser.ContourCount(); - if ( ( numContours < 1) || ( vectoriser.PointCount() < 3)) - { - return; - } - - glList = glGenLists(1); - glNewList( glList, GL_COMPILE); - for( unsigned int c = 0; c < numContours; ++c) - { - const FTContour* contour = vectoriser.Contour(c); - - glBegin( GL_LINE_LOOP); - for( unsigned int p = 0; p < contour->PointCount(); ++p) - { - glVertex2f( contour->Point(p).x / 64.0f, contour->Point(p).y / 64.0f); - } - glEnd(); - } - glEndList(); -} - - -FTOutlineGlyph::~FTOutlineGlyph() -{ - glDeleteLists( glList, 1); -} - - -float FTOutlineGlyph::Render( const FTPoint& pen) -{ - if( glList) - { - glTranslatef( pen.x, pen.y, 0); - glCallList( glList); - glTranslatef( -pen.x, -pen.y, 0); - } - - return advance; -} - diff --git a/extern/bFTGL/src/FTPixmapGlyph.cpp b/extern/bFTGL/src/FTPixmapGlyph.cpp deleted file mode 100644 index b051a06b6e3..00000000000 --- a/extern/bFTGL/src/FTPixmapGlyph.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include "FTPixmapGlyph.h" - -FTPixmapGlyph::FTPixmapGlyph( FT_GlyphSlot glyph) -: FTGlyph( glyph), - destWidth(0), - destHeight(0), - data(0) -{ - err = FT_Render_Glyph( glyph, FT_RENDER_MODE_NORMAL); - if( err || ft_glyph_format_bitmap != glyph->format) - { - return; - } - - FT_Bitmap bitmap = glyph->bitmap; - - //check the pixel mode - //ft_pixel_mode_grays - - int srcWidth = bitmap.width; - int srcHeight = bitmap.rows; - - // FIXME What about dest alignment? - destWidth = srcWidth; - destHeight = srcHeight; - - if( destWidth && destHeight) - { - data = new unsigned char[destWidth * destHeight * 4]; - - // Get the current glColor. - float ftglColour[4]; -// glGetFloatv( GL_CURRENT_COLOR, ftglColour); - ftglColour[0] = ftglColour[1] = ftglColour[2] = ftglColour[3] = 1.0; - - unsigned char redComponent = static_cast( ftglColour[0] * 255.0f); - unsigned char greenComponent = static_cast( ftglColour[1] * 255.0f); - unsigned char blueComponent = static_cast( ftglColour[2] * 255.0f); - - unsigned char* src = bitmap.buffer; - - unsigned char* dest = data + ((destHeight - 1) * destWidth) * 4; - size_t destStep = destWidth * 4 * 2; - - if( ftglColour[3] == 1.0f) - { - for( int y = 0; y < srcHeight; ++y) - { - for( int x = 0; x < srcWidth; ++x) - { - *dest++ = redComponent; - *dest++ = greenComponent; - *dest++ = blueComponent; - *dest++ = *src++; - } - dest -= destStep; - } - } - else - { - for( int y = 0; y < srcHeight; ++y) - { - for( int x = 0; x < srcWidth; ++x) - { - *dest++ = redComponent; - *dest++ = greenComponent; - *dest++ = blueComponent; - *dest++ = static_cast(ftglColour[3] * *src++); - } - dest -= destStep; - } - } - - destHeight = srcHeight; - } - - pos.x = glyph->bitmap_left; - pos.y = srcHeight - glyph->bitmap_top; -} - - -FTPixmapGlyph::~FTPixmapGlyph() -{ - delete [] data; -} - -#include -float FTPixmapGlyph::Render( const FTPoint& pen) -{ - if( data) - { - float dx, dy; - - dx= floor( (pen.x + pos.x ) ); - dy= ( (pen.y - pos.y ) ); - - // Move the glyph origin - glBitmap( 0, 0, 0.0f, 0.0f, dx, dy, (const GLubyte*)0); - - glPixelStorei( GL_UNPACK_ROW_LENGTH, 0); - - glDrawPixels( destWidth, destHeight, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)data); - - // Restore the glyph origin - glBitmap( 0, 0, 0.0f, 0.0f, -dx, -dy, (const GLubyte*)0); - } - - return advance; -} diff --git a/extern/bFTGL/src/FTPoint.cpp b/extern/bFTGL/src/FTPoint.cpp deleted file mode 100644 index e4678bc9564..00000000000 --- a/extern/bFTGL/src/FTPoint.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "FTPoint.h" - - -bool operator == ( const FTPoint &a, const FTPoint &b) -{ - return((a.x == b.x) && (a.y == b.y) && (a.z == b.z)); -} - -bool operator != ( const FTPoint &a, const FTPoint &b) -{ - return((a.x != b.x) || (a.y != b.y) || (a.z != b.z)); -} - - diff --git a/extern/bFTGL/src/FTPolyGlyph.cpp b/extern/bFTGL/src/FTPolyGlyph.cpp deleted file mode 100644 index 7e0d695493c..00000000000 --- a/extern/bFTGL/src/FTPolyGlyph.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "FTPolyGlyph.h" -#include "FTVectoriser.h" - - -FTPolyGlyph::FTPolyGlyph( FT_GlyphSlot glyph) -: FTGlyph( glyph), - glList(0) -{ - if( ft_glyph_format_outline != glyph->format) - { - err = 0x14; // Invalid_Outline - return; - } - - FTVectoriser vectoriser( glyph); - - if(( vectoriser.ContourCount() < 1) || ( vectoriser.PointCount() < 3)) - { - return; - } - - vectoriser.MakeMesh( 1.0); - - glList = glGenLists( 1); - glNewList( glList, GL_COMPILE); - - const FTMesh* mesh = vectoriser.GetMesh(); - for( unsigned int index = 0; index < mesh->TesselationCount(); ++index) - { - const FTTesselation* subMesh = mesh->Tesselation( index); - unsigned int polyonType = subMesh->PolygonType(); - - glBegin( polyonType); - for( unsigned int x = 0; x < subMesh->PointCount(); ++x) - { - glVertex3f( subMesh->Point(x).x / 64.0f, - subMesh->Point(x).y / 64.0f, - 0.0f); - } - glEnd(); - } - glEndList(); -} - - -FTPolyGlyph::~FTPolyGlyph() -{ - glDeleteLists( glList, 1); -} - - -float FTPolyGlyph::Render( const FTPoint& pen) -{ - if( glList) - { - glTranslatef( pen.x, pen.y, 0); - glCallList( glList); - glTranslatef( -pen.x, -pen.y, 0); - } - - return advance; -} diff --git a/extern/bFTGL/src/FTSize.cpp b/extern/bFTGL/src/FTSize.cpp deleted file mode 100644 index 5fb8ffba157..00000000000 --- a/extern/bFTGL/src/FTSize.cpp +++ /dev/null @@ -1,105 +0,0 @@ -#include "FTSize.h" - - -FTSize::FTSize() -: ftFace(0), - ftSize(0), - size(0), - err(0) -{} - - -FTSize::~FTSize() -{} - - -bool FTSize::CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution ) -{ - err = FT_Set_Char_Size( *face, 0L, point_size * 64, x_resolution, y_resolution); - - if( !err) - { - ftFace = face; - size = point_size; - ftSize = (*ftFace)->size; - } - else - { - ftFace = 0; - size = 0; - ftSize = 0; - } - - return !err; -} - - -unsigned int FTSize::CharSize() const -{ - return size; -} - - -float FTSize::Ascender() const -{ - return ftSize == 0 ? 0.0f : static_cast( ftSize->metrics.ascender) / 64.0f; -} - - -float FTSize::Descender() const -{ - return ftSize == 0 ? 0.0f : static_cast( ftSize->metrics.descender) / 64.0f; -} - - -float FTSize::Height() const -{ - if( 0 == ftSize) - { - return 0.0f; - } - - if( FT_IS_SCALABLE((*ftFace))) - { - return ( (*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin) * ( (float)ftSize->metrics.y_ppem / (float)(*ftFace)->units_per_EM); - } - else - { - return static_cast( ftSize->metrics.height) / 64.0f; - } -} - - -float FTSize::Width() const -{ - if( 0 == ftSize) - { - return 0.0f; - } - - if( FT_IS_SCALABLE((*ftFace))) - { - return ( (*ftFace)->bbox.xMax - (*ftFace)->bbox.xMin) * ( static_cast(ftSize->metrics.x_ppem) / static_cast((*ftFace)->units_per_EM)); - } - else - { - return static_cast( ftSize->metrics.max_advance) / 64.0f; - } -} - - -float FTSize::Underline() const -{ - return 0.0f; -} - -unsigned int FTSize::XPixelsPerEm() const -{ - return ftSize == 0 ? 0 : ftSize->metrics.x_ppem; -} - -unsigned int FTSize::YPixelsPerEm() const -{ - return ftSize == 0 ? 0 : ftSize->metrics.y_ppem; -} - diff --git a/extern/bFTGL/src/FTTextureGlyph.cpp b/extern/bFTGL/src/FTTextureGlyph.cpp deleted file mode 100644 index b8267dcce89..00000000000 --- a/extern/bFTGL/src/FTTextureGlyph.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include "FTTextureGlyph.h" - - -FTTextureGlyph::FTTextureGlyph( FT_GlyphSlot glyph, int id, int xOffset, int yOffset, GLsizei width, GLsizei height) -: FTGlyph( glyph), - destWidth(0), - destHeight(0), - glTextureID(id), - activeTextureID(0) -{ - err = FT_Render_Glyph( glyph, FT_RENDER_MODE_NORMAL); - if( err || glyph->format != ft_glyph_format_bitmap) - { - return; - } - - FT_Bitmap bitmap = glyph->bitmap; - - destWidth = bitmap.width; - destHeight = bitmap.rows; - - if( destWidth && destHeight) - { - glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT); - glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei( GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei( GL_UNPACK_ALIGNMENT, 1); - - glBindTexture( GL_TEXTURE_2D, glTextureID); - glTexSubImage2D( GL_TEXTURE_2D, 0, xOffset, yOffset, destWidth, destHeight, GL_ALPHA, GL_UNSIGNED_BYTE, bitmap.buffer); - - glPopClientAttrib(); - } - - -// 0 -// +----+ -// | | -// | | -// | | -// +----+ -// 1 - - uv[0].x = static_cast(xOffset) / static_cast(width); - uv[0].y = static_cast(yOffset) / static_cast(height); - uv[1].x = static_cast( xOffset + destWidth) / static_cast(width); - uv[1].y = static_cast( yOffset + destHeight) / static_cast(height); - - pos.x = glyph->bitmap_left; - pos.y = glyph->bitmap_top; -} - - -FTTextureGlyph::~FTTextureGlyph() -{} - -#include - -float FTTextureGlyph::Render( const FTPoint& pen) -{ - float dx; - - glGetIntegerv( GL_TEXTURE_2D_BINDING_EXT, &activeTextureID); - if( activeTextureID != glTextureID) - { - glBindTexture( GL_TEXTURE_2D, (GLuint)glTextureID); - } - - dx= floor( (pen.x + pos.x ) ); - - glBegin( GL_QUADS); - glTexCoord2f( uv[0].x, uv[0].y); - glVertex2f( dx, pen.y + pos.y); - - glTexCoord2f( uv[0].x, uv[1].y); - glVertex2f( dx, pen.y + pos.y - destHeight); - - glTexCoord2f( uv[1].x, uv[1].y); - glVertex2f( dx + destWidth, pen.y + pos.y - destHeight); - - glTexCoord2f( uv[1].x, uv[0].y); - glVertex2f( dx + destWidth, pen.y + pos.y); - glEnd(); - - return advance; -} - diff --git a/extern/bFTGL/src/FTVectoriser.cpp b/extern/bFTGL/src/FTVectoriser.cpp deleted file mode 100644 index 82dcb0c0f51..00000000000 --- a/extern/bFTGL/src/FTVectoriser.cpp +++ /dev/null @@ -1,229 +0,0 @@ -#include "FTVectoriser.h" -#include "FTGL.h" - -#ifndef CALLBACK -#define CALLBACK -#endif - -#if defined(__APPLE_CC__) - #if __APPLE_CC__ >= 5465 - typedef GLvoid (*GLUTesselatorFunction)(); - #else - typedef GLvoid (*GLUTesselatorFunction)(...); - #endif -#elif defined( __mips ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __sun ) || defined (__CYGWIN__) - typedef GLvoid (*GLUTesselatorFunction)(); -#elif defined ( WIN32) - typedef GLvoid (CALLBACK *GLUTesselatorFunction)( ); -#else - #error "Error - need to define type GLUTesselatorFunction for this platform/compiler" -#endif - - -void CALLBACK ftglError( GLenum errCode, FTMesh* mesh) -{ - mesh->Error( errCode); -} - - -void CALLBACK ftglVertex( void* data, FTMesh* mesh) -{ - FTGL_DOUBLE* vertex = static_cast(data); - mesh->AddPoint( vertex[0], vertex[1], vertex[2]); -} - - -void CALLBACK ftglCombine( FTGL_DOUBLE coords[3], void* vertex_data[4], GLfloat weight[4], void** outData, FTMesh* mesh) -{ - FTGL_DOUBLE* vertex = static_cast(coords); - *outData = mesh->Combine( vertex[0], vertex[1], vertex[2]); -} - - -void CALLBACK ftglBegin( GLenum type, FTMesh* mesh) -{ - mesh->Begin( type); -} - - -void CALLBACK ftglEnd( FTMesh* mesh) -{ - mesh->End(); -} - - -FTMesh::FTMesh() -: currentTesselation(0), - err(0) -{ - tesselationList.reserve( 16); -} - - -FTMesh::~FTMesh() -{ - for( size_t t = 0; t < tesselationList.size(); ++t) - { - delete tesselationList[t]; - } - - tesselationList.clear(); -} - - -void FTMesh::AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z) -{ - currentTesselation->AddPoint( x, y, z); -} - - -FTGL_DOUBLE* FTMesh::Combine( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z) -{ - tempPointList.push_back( FTPoint( x, y,z)); - return &tempPointList.back().x; -} - - -void FTMesh::Begin( GLenum meshType) -{ - currentTesselation = new FTTesselation( meshType); -} - - -void FTMesh::End() -{ - tesselationList.push_back( currentTesselation); -} - - -const FTTesselation* const FTMesh::Tesselation( unsigned int index) const -{ - return ( index < tesselationList.size()) ? tesselationList[index] : NULL; -} - - -FTVectoriser::FTVectoriser( const FT_GlyphSlot glyph) -: contourList(0), - mesh(0), - ftContourCount(0), - contourFlag(0) -{ - if( glyph) - { - outline = glyph->outline; - - ftContourCount = outline.n_contours;; - contourList = 0; - contourFlag = outline.flags; - - ProcessContours(); - } -} - - -FTVectoriser::~FTVectoriser() -{ - for( size_t c = 0; c < ContourCount(); ++c) - { - delete contourList[c]; - } - - delete [] contourList; - delete mesh; -} - - -void FTVectoriser::ProcessContours() -{ - short contourLength = 0; - short startIndex = 0; - short endIndex = 0; - - contourList = new FTContour*[ftContourCount]; - - for( short contourIndex = 0; contourIndex < ftContourCount; ++contourIndex) - { - FT_Vector* pointList = &outline.points[startIndex]; - char* tagList = &outline.tags[startIndex]; - - endIndex = outline.contours[contourIndex]; - contourLength = ( endIndex - startIndex) + 1; - - FTContour* contour = new FTContour( pointList, tagList, contourLength); - - contourList[contourIndex] = contour; - - startIndex = endIndex + 1; - } -} - - -size_t FTVectoriser::PointCount() -{ - size_t s = 0; - for( size_t c = 0; c < ContourCount(); ++c) - { - s += contourList[c]->PointCount(); - } - - return s; -} - - -const FTContour* const FTVectoriser::Contour( unsigned int index) const -{ - return ( index < ContourCount()) ? contourList[index] : NULL; -} - - -void FTVectoriser::MakeMesh( FTGL_DOUBLE zNormal) -{ - if( mesh) - { - delete mesh; - } - - mesh = new FTMesh; - - GLUtesselator* tobj = gluNewTess(); - - gluTessCallback( tobj, GLU_TESS_BEGIN_DATA, (GLUTesselatorFunction)ftglBegin); - gluTessCallback( tobj, GLU_TESS_VERTEX_DATA, (GLUTesselatorFunction)ftglVertex); - gluTessCallback( tobj, GLU_TESS_COMBINE_DATA, (GLUTesselatorFunction)ftglCombine); - gluTessCallback( tobj, GLU_TESS_END_DATA, (GLUTesselatorFunction)ftglEnd); - gluTessCallback( tobj, GLU_TESS_ERROR_DATA, (GLUTesselatorFunction)ftglError); - - if( contourFlag & ft_outline_even_odd_fill) // ft_outline_reverse_fill - { - gluTessProperty( tobj, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD); - } - else - { - gluTessProperty( tobj, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO); - } - - - gluTessProperty( tobj, GLU_TESS_TOLERANCE, 0); - gluTessNormal( tobj, 0.0f, 0.0f, zNormal); - gluTessBeginPolygon( tobj, mesh); - - for( size_t c = 0; c < ContourCount(); ++c) - { - const FTContour* contour = contourList[c]; - - gluTessBeginContour( tobj); - - for( size_t p = 0; p < contour->PointCount(); ++p) - { - FTGL_DOUBLE* d = const_cast(&contour->Point(p).x); - gluTessVertex( tobj, d, d); - } - - gluTessEndContour( tobj); - } - - gluTessEndPolygon( tobj); - - gluDeleteTess( tobj); -} - diff --git a/extern/bFTGL/src/Makefile b/extern/bFTGL/src/Makefile deleted file mode 100644 index 17c6016ad03..00000000000 --- a/extern/bFTGL/src/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = ftgl -DIR = $(OCGDIR)/extern/$(LIBNAME) - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CSRCS = -CCSRCS = FTBitmapGlyph.cpp FTCharmap.cpp FTContour.cpp FTExtrdGlyph.cpp \ - FTFace.cpp FTFont.cpp FTGLBitmapFont.cpp FTGLExtrdFont.cpp \ - FTGLOutlineFont.cpp FTGLPixmapFont.cpp FTGLPolygonFont.cpp \ - FTGLTextureFont.cpp FTGlyph.cpp FTGlyphContainer.cpp FTLibrary.cpp \ - FTOutlineGlyph.cpp FTPixmapGlyph.cpp FTPoint.cpp FTPolyGlyph.cpp \ - FTSize.cpp FTTextureGlyph.cpp FTVectoriser.cpp - -include nan_compile.mk -CPPFLAGS += -I../include -CPPFLAGS += -I$(NAN_FREETYPE)/include -I$(NAN_FREETYPE)/include/freetype2 -CPPFLAGS += -I$(OPENGL_HEADERS) - -install: all debug - @[ -d $(NAN_FTGL) ] || mkdir -p $(NAN_FTGL) - @[ -d $(NAN_FTGL)/include ] || mkdir -p $(NAN_FTGL)/include - @[ -d $(NAN_FTGL)/lib ] || mkdir -p $(NAN_FTGL)/lib - @[ -d $(NAN_FTGL)/lib/debug ] || mkdir -p $(NAN_FTGL)/lib/debug - @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/lib$(LIBNAME).a $(NAN_FTGL)/lib/ -# @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/debug/lib$(LIBNAME).a $(NAN_FTGL)/lib/debug/ -ifeq ($(OS),darwin) - ranlib $(NAN_FTGL)/lib/lib$(LIBNAME).a -endif - @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh ../include/*.h $(NAN_FTGL)/include/ - diff --git a/extern/bFTGL/win32_vcpp/README_WIN32.txt b/extern/bFTGL/win32_vcpp/README_WIN32.txt deleted file mode 100644 index bc92bbb9591..00000000000 --- a/extern/bFTGL/win32_vcpp/README_WIN32.txt +++ /dev/null @@ -1,206 +0,0 @@ -FTGL 1.31 - -NOTES FOR COMPILING ON WINDOWS - -14 Feb 2002 - -Ellers, ellers@iinet.net.au - - - - - -SUPPORTED COMPILERS - - - -I have rebuilt the FTGL project files for Visual C++ (version 6). There are - -presently no other compilers or environments supported but feel free to - -contribute them. - - - - - -QUICK GUIDE: COMPILING FTGL - - - - - Start up MSVC++ with ftgl.dsw. - - - Tell MSVC++ where FreeType is. You'll need to do something like this: - - - - * select Project>Settings - - * select ftgl_static (for a start) - - * select "All Configurations" - - * go to the tab C++ > PreProcessor - - * Set additional include directories appropriately. For me it is: - - D:\cots\freetype-2.0.5\include - - * repeat for all configurations of ftgl_dll - - - - - -QUICK GUIDE: COMPILING/RUNNING SUPPLIED DEMO PROGRAM - - - - - The program expects the first argument to be the name of a truetype file. - - I copied timesbi.ttf from the windows directory to C:\TEMP and then edit - - the settings of the project: - - - - * select Project>Settings - - * select Demo project - - * select panel Debug>General - - * set Program Arguments to be "C:\TEMP\timesbi.ttf" - - - - - -QUICK GUIDE: COMPILING YOUR PROGRAM TO USE FTGL - - - - - Choose dynamic or static library linkage - - * if you want to link to a static FTGL library ensure that - - FTGL_LIBRARY_STATIC is defined in the preprocessor section - - - - - -CONFIGURATION / CODE GENERATION / C LIBRARIES - - - -FTGL can be built in various configurations (inspired by Freetype and libpng): - - - - - static library (.lib) - - - dynamic library (.dll) - - - -MSVC++ requires selection of "code generation" option, which seems to be - -mostly to do with which version of the Standard C library is linked with the - -library. - - - -The following modes are supported: - - - - - static/dynamic - - - single threaded (ST) or multithreaded (MT) - - NOTE: the multithreaded DLL (MD) mode was NOT included, as freetype itself - - doesn't support that mode so I figure there's no point yet. - - - debug/release (debug has _d suffix) - - - -So the static multithreaded release library is: - - - - ftgl_static_MT.lib - - - -The same library built in DEBUG mode: - - - - ftgl_static_MT_d.lib - - - -If you're not sure which one is appropriate (and if you're a novice don't - -been too put off...) start with making the decision about debug or release. - -This should be easy because if you're building the debug version of your - -app its probably a good idea to link with the debug version of FTGL (but - -not compulsory). Once thats done, you may get errors like: - - - - LIBCMTD.lib(crt0init.obj) : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library - - - -This will happen, for example, when you link a glut app with an FTGL library - -compiled with different codegen options than the GLUT library. - - - -MSVC++ "sort of" - -requires that all libs be linked with the same codegen option. GLUT is built - -in XXX mode, so if you're linking with GLUT, you can get rid of the warning - -by linking with the XXX version of FTGL. The various versions are particularly - -useful if you're doing std C stuff, like printf etc. - - - - - - - -FAQ - - - -Q: "But... do I HAVE to use all these DIFFERENT build modes, like multi- - - threaded, debug single threaded, etc?" - - - -A: No. Sometimes library makers only generate one style anyway. It depends - - on your needs. Unless you're linking with standard C stuff (e.g. printf) - - then it probably won't make a great deal of difference. If you get - - warnings about "default lib libcmt.lib conflicts" etc, then you can make - - use of the different libraries. - - - diff --git a/extern/bFTGL/win32_vcpp/ftgl.dsw b/extern/bFTGL/win32_vcpp/ftgl.dsw deleted file mode 100644 index 17b8fbe6f12..00000000000 --- a/extern/bFTGL/win32_vcpp/ftgl.dsw +++ /dev/null @@ -1,92 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "ftgl_demo"=".\ftgl_demo\ftgl_demo.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name ftgl_dll - End Project Dependency - Begin Project Dependency - Project_Dep_Name ftgl_static_lib - End Project Dependency -}}} - -############################################################################### - -Project: "ftgl_demo_2"=".\ftgl_demo\ftgl_demo_2.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name ftgl_dll - End Project Dependency - Begin Project Dependency - Project_Dep_Name ftgl_static_lib - End Project Dependency -}}} - -############################################################################### - -Project: "ftgl_dll"=".\ftgl_dll\ftgl_dll.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ftgl_static_lib"=".\ftgl_static_lib\ftgl_static_lib.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "unit_tests"=".\unit_tests\unit_tests.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name ftgl_static_lib - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/extern/bFTGL/win32_vcpp/ftgl_dll/ftgl_dll.dsp b/extern/bFTGL/win32_vcpp/ftgl_dll/ftgl_dll.dsp deleted file mode 100644 index 7e297df9111..00000000000 --- a/extern/bFTGL/win32_vcpp/ftgl_dll/ftgl_dll.dsp +++ /dev/null @@ -1,357 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ftgl_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=ftgl_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ftgl_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ftgl_dll.mak" CFG="ftgl_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ftgl_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "ftgl_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "ftgl_dll - Win32 Release MT" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "ftgl_dll - Win32 Debug MT" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ftgl_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release_ST" -# PROP BASE Intermediate_Dir "Release_ST" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../Build" -# PROP Intermediate_Dir "Release_ST" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "../Build" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204.lib /nologo /dll /machine:I386 /out:"../Build/ftgl_dynamic_MT.dll" /libpath:"D:\cots\freetype-2.0.5\objs" - -!ELSEIF "$(CFG)" == "ftgl_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug_ST" -# PROP BASE Intermediate_Dir "Debug_ST" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../Build" -# PROP Intermediate_Dir "Debug_ST" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "../Build" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204_D.lib /nologo /dll /pdb:"Debug_ST/ftgl_dynamic_ST_d.pdb" /debug /machine:I386 /out:"../Build/ftgl_dynamic_MT_d.dll" /pdbtype:sept /libpath:"D:\cots\freetype-2.0.5\objs" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "ftgl_dll - Win32 Release MT" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release_MT" -# PROP BASE Intermediate_Dir "Release_MT" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../Build" -# PROP Intermediate_Dir "Release_MT" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "../Build" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204MT.lib /nologo /dll /machine:I386 /out:"../Build/ftgl_dynamic_MTD.dll" /libpath:"D:\cots\freetype-2.0.5\objs" - -!ELSEIF "$(CFG)" == "ftgl_dll - Win32 Debug MT" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug_MT" -# PROP BASE Intermediate_Dir "Debug_MT" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../Build" -# PROP Intermediate_Dir "Debug_MT" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "../Build" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204MT_D.lib /nologo /dll /pdb:"Debug_ST/ftgl_dynamic_MT_d.pdb" /debug /machine:I386 /out:"../Build/ftgl_dynamic_MTD_d.dll" /pdbtype:sept /libpath:"D:\cots\freetype-2.0.5\objs" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "ftgl_dll - Win32 Release" -# Name "ftgl_dll - Win32 Debug" -# Name "ftgl_dll - Win32 Release MT" -# Name "ftgl_dll - Win32 Debug MT" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\src\FTBitmapGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTCharmap.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTContour.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTExtrdGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTFace.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLBitmapFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLExtrdFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLOutlineFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLPixmapFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLPolygonFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLTextureFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGlyphContainer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTLibrary.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTOutlineGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTPixmapGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTPoint.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTPolyGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTSize.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTTextureGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTVectoriser.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\FTBBox.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTBitmapGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTCharmap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTCharToGlyphIndexMap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTContour.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTExtrdGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTFace.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGL.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLBitmapFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLExtrdFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLOutlineFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLPixmapFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLPolygonFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLTextureFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGlyphContainer.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTLibrary.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTList.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTOutlineGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTPixmapGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTPoint.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTPolyGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTSize.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTTextureGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTVector.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTVectoriser.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/extern/bFTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.dsp b/extern/bFTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.dsp deleted file mode 100644 index bc2c77cb0b6..00000000000 --- a/extern/bFTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.dsp +++ /dev/null @@ -1,342 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ftgl_static_lib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=ftgl_static_lib - Win32 Debug MT -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ftgl_static_lib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ftgl_static_lib.mak" CFG="ftgl_static_lib - Win32 Debug MT" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ftgl_static_lib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "ftgl_static_lib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "ftgl_static_lib - Win32 Debug MT" (based on "Win32 (x86) Static Library") -!MESSAGE "ftgl_static_lib - Win32 Release MT" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ftgl_static_lib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release_ST" -# PROP BASE Intermediate_Dir "Release_ST" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release_ST" -# PROP Intermediate_Dir "Release_ST" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\freetype\include" /I "..\..\include" /I "..\..\..\..\..\lib\windows\freetype\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Build\ftgl_static_ST.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying lib to lib\windows\ftgl\lib XCOPY /Y ..\Build\*lib ..\..\..\..\..\lib\windows\ftgl\lib -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ftgl_static_lib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug_ST" -# PROP BASE Intermediate_Dir "Debug_ST" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug_ST" -# PROP Intermediate_Dir "Debug_ST" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Build\ftgl_static_MT_d.lib" - -!ELSEIF "$(CFG)" == "ftgl_static_lib - Win32 Debug MT" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug_MT" -# PROP BASE Intermediate_Dir "Debug_MT" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug_MT" -# PROP Intermediate_Dir "Debug_MT" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Build\ftgl_static_MTD_d.lib" - -!ELSEIF "$(CFG)" == "ftgl_static_lib - Win32 Release MT" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release_MT" -# PROP BASE Intermediate_Dir "Release_MT" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release_MT" -# PROP Intermediate_Dir "Release_MT" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\Build\ftgl_static_MTD.lib" - -!ENDIF - -# Begin Target - -# Name "ftgl_static_lib - Win32 Release" -# Name "ftgl_static_lib - Win32 Debug" -# Name "ftgl_static_lib - Win32 Debug MT" -# Name "ftgl_static_lib - Win32 Release MT" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\src\FTBitmapGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTCharmap.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTContour.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTExtrdGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTFace.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLBitmapFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLExtrdFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLOutlineFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLPixmapFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLPolygonFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGLTextureFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTGlyphContainer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTLibrary.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTOutlineGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTPixmapGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTPoint.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTPolyGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTSize.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTTextureGlyph.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\FTVectoriser.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\FTBBox.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTBitmapGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTCharmap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTCharToGlyphIndexMap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTContour.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTExtrdGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTFace.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGL.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLBitmapFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLExtrdFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLOutlineFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLPixmapFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLPolygonFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGLTextureFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTGlyphContainer.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTLibrary.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTList.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTOutlineGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTPixmapGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTPoint.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTPolyGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTSize.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTTextureGlyph.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTVector.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\FTVectoriser.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/bFTGL/win32_vcpp/unit_tests/unit_tests.dsp b/extern/bFTGL/win32_vcpp/unit_tests/unit_tests.dsp deleted file mode 100644 index f68dfe9b2d8..00000000000 --- a/extern/bFTGL/win32_vcpp/unit_tests/unit_tests.dsp +++ /dev/null @@ -1,168 +0,0 @@ -# Microsoft Developer Studio Project File - Name="unit_tests" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=unit_tests - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "unit_tests.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "unit_tests.mak" CFG="unit_tests - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "unit_tests - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "unit_tests - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "unit_tests - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(MIC_COTS_CPPUNIT_DIR)/include" /I "../../include" /I "../../extras" /I "D:\cots\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "FTGL_LIBRARY_STATIC" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 freetype204MT.lib ftgl_static_MT.lib cppunit.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Build" /libpath:"D:\cots\freetype-2.0.5\objs" /libpath:"D:\cots\cppunit-1.9.8\lib" - -!ELSEIF "$(CFG)" == "unit_tests - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(MIC_COTS_CPPUNIT_DIR)/include" /I "../../include" /I "../../extras" /I "D:\cots\freetype-2.0.5\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "FTGL_LIBRARY_STATIC" /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 freetype204MT_D.lib ftgl_static_MT_d.lib cppunitd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Build" /libpath:"D:\cots\freetype-2.0.5\objs" /libpath:"D:\cots\cppunit-1.9.8\lib" - -!ENDIF - -# Begin Target - -# Name "unit_tests - Win32 Release" -# Name "unit_tests - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\test\FTBBox-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTCharmap-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTContour-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTFace-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTFont-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTGlyphContainer-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTLibrary-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTList-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTMesh-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTPoint-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTSize-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTTesselation-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTVector-Test.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\test\FTVectoriser-Test.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\test\HPGCalc_afm.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\test\HPGCalc_pfb.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\test\TestMain.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\test\Fontdefs.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/binreloc/CMakeLists.txt b/extern/binreloc/CMakeLists.txt index 78dc65d8112..7bdc93fc978 100644 --- a/extern/binreloc/CMakeLists.txt +++ b/extern/binreloc/CMakeLists.txt @@ -18,8 +18,8 @@ # All rights reserved. # -SET(INC ./include ${WINTAB_INC}) -ADD_DEFINITIONS(-DWITH_BINRELOC) +SET(INC ./include ) +ADD_DEFINITIONS(-DENABLE_BINRELOC) FILE(GLOB SRC *.c) BLENDERLIB(extern_binreloc "${SRC}" "${INC}") diff --git a/extern/binreloc/Makefile b/extern/binreloc/Makefile index dbd093500a1..21343ab4803 100644 --- a/extern/binreloc/Makefile +++ b/extern/binreloc/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # ***** BEGIN GPL LICENSE BLOCK ***** # @@ -25,13 +27,12 @@ DIR = $(OCGDIR)/extern/$(LIBNAME) include nan_definitions.mk -CPPFLAGS += -I./include +CPPFLAGS += -DENABLE_BINRELOC -I./include include nan_compile.mk - -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(DIR) ] || mkdir $(DIR) @[ -d $(DIR)/include ] || mkdir $(DIR)/include @../../intern/tools/cpifdiff.sh include/*.h $(DIR)/include/ diff --git a/extern/binreloc/SConscript b/extern/binreloc/SConscript index 2747702985d..331b70a4ebc 100644 --- a/extern/binreloc/SConscript +++ b/extern/binreloc/SConscript @@ -9,5 +9,5 @@ cflags = [] sources = ['binreloc.c'] incs = 'include' -env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[36, 226], compileflags = cflags) +env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[36,225], compileflags = cflags) diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt index edb6b9c525f..2e2d8920781 100644 --- a/extern/bullet2/CMakeLists.txt +++ b/extern/bullet2/CMakeLists.txt @@ -27,16 +27,16 @@ SET(INC . src) FILE(GLOB SRC - src/LinearMath/*.cpp - src/BulletCollision/BroadphaseCollision/*.cpp - src/BulletCollision/CollisionShapes/*.cpp - src/BulletCollision/NarrowPhaseCollision/*.cpp - src/BulletCollision/Gimpact/*.cpp - src/BulletCollision//CollisionDispatch/*.cpp - src/BulletDynamics/ConstraintSolver/*.cpp - src/BulletDynamics/Vehicle/*.cpp - src/BulletDynamics/Dynamics/*.cpp - src/BulletSoftBody/*.cpp + src/LinearMath/*.cpp + src/BulletCollision/BroadphaseCollision/*.cpp + src/BulletCollision/CollisionShapes/*.cpp + src/BulletCollision/NarrowPhaseCollision/*.cpp + src/BulletCollision/Gimpact/*.cpp + src/BulletCollision//CollisionDispatch/*.cpp + src/BulletDynamics/ConstraintSolver/*.cpp + src/BulletDynamics/Vehicle/*.cpp + src/BulletDynamics/Dynamics/*.cpp + src/BulletSoftBody/*.cpp ) ADD_DEFINITIONS(-D_LIB) diff --git a/extern/bullet2/Makefile b/extern/bullet2/Makefile index f3abb86e404..d974569e63d 100644 --- a/extern/bullet2/Makefile +++ b/extern/bullet2/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -48,7 +50,7 @@ include nan_subdirs.mk CP = $(NANBLENDERHOME)/intern/tools/cpifdiff.sh -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_BULLET2) ] || mkdir -p $(NAN_BULLET2) @[ -d $(NAN_BULLET2)/include ] || mkdir -p $(NAN_BULLET2)/include @for i in $(BULLETDIRS); do \ diff --git a/extern/bullet2/make/msvc_9_0/Bullet.vcproj b/extern/bullet2/make/msvc_9_0/Bullet.vcproj new file mode 100644 index 00000000000..9c8f9668f56 --- /dev/null +++ b/extern/bullet2/make/msvc_9_0/Bullet.vcproj @@ -0,0 +1,1525 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h index 8074aed3038..a4a8a70524e 100644 --- a/extern/bullet2/src/Bullet-C-Api.h +++ b/extern/bullet2/src/Bullet-C-Api.h @@ -38,37 +38,37 @@ typedef plReal plQuaternion[4]; extern "C" { #endif -/* Particular physics SDK */ +/** Particular physics SDK (C-API) */ PL_DECLARE_HANDLE(plPhysicsSdkHandle); -/* Dynamics world, belonging to some physics SDK */ +/** Dynamics world, belonging to some physics SDK (C-API)*/ PL_DECLARE_HANDLE(plDynamicsWorldHandle); -/* Rigid Body that can be part of a Dynamics World */ +/** Rigid Body that can be part of a Dynamics World (C-API)*/ PL_DECLARE_HANDLE(plRigidBodyHandle); -/* Collision Shape/Geometry, property of a Rigid Body */ +/** Collision Shape/Geometry, property of a Rigid Body (C-API)*/ PL_DECLARE_HANDLE(plCollisionShapeHandle); -/* Constraint for Rigid Bodies */ +/** Constraint for Rigid Bodies (C-API)*/ PL_DECLARE_HANDLE(plConstraintHandle); -/* Triangle Mesh interface */ +/** Triangle Mesh interface (C-API)*/ PL_DECLARE_HANDLE(plMeshInterfaceHandle); -/* Broadphase Scene/Proxy Handles */ +/** Broadphase Scene/Proxy Handles (C-API)*/ PL_DECLARE_HANDLE(plCollisionBroadphaseHandle); PL_DECLARE_HANDLE(plBroadphaseProxyHandle); PL_DECLARE_HANDLE(plCollisionWorldHandle); -/* +/** Create and Delete a Physics SDK */ extern plPhysicsSdkHandle plNewBulletSdk(); //this could be also another sdk, like ODE, PhysX etc. extern void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk); -/* Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */ +/** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */ typedef void(*btBroadphaseCallback)(void* clientData, void* object1,void* object2); diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp index d7eea33ea41..77763305b1b 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp @@ -19,10 +19,9 @@ // 3. This notice may not be removed or altered from any source distribution. #include "btAxisSweep3.h" -#include -btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache) -:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache) +btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator) +:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache,disableRaycastAccelerator) { // 1 handle is reserved as sentinel btAssert(maxHandles > 1 && maxHandles < 32767); @@ -30,8 +29,8 @@ btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAab } -bt32BitAxisSweep3::bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache ) -:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache) +bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache , bool disableRaycastAccelerator) +:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache,disableRaycastAccelerator) { // 1 handle is reserved as sentinel btAssert(maxHandles > 1 && maxHandles < 2147483647); diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h index d0ad09a385a..cad21b4cad2 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h @@ -19,12 +19,12 @@ #ifndef AXIS_SWEEP_3_H #define AXIS_SWEEP_3_H -#include "LinearMath/btPoint3.h" #include "LinearMath/btVector3.h" #include "btOverlappingPairCache.h" #include "btBroadphaseInterface.h" #include "btBroadphaseProxy.h" #include "btOverlappingPairCallback.h" +#include "btDbvtBroadphase.h" //#define DEBUG_BROADPHASE 1 #define USE_OVERLAP_TEST_ON_REMOVES 1 @@ -42,6 +42,7 @@ protected: public: + BT_DECLARE_ALIGNED_ALLOCATOR(); class Edge { @@ -61,8 +62,7 @@ public: // indexes into the edge arrays BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3]; // 6 * 2 = 12 // BP_FP_INT_TYPE m_uniqueId; - BP_FP_INT_TYPE m_pad; - + btBroadphaseProxy* m_dbvtProxy;//for faster raycast //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;} @@ -71,8 +71,8 @@ public: protected: - btPoint3 m_worldAabbMin; // overall system bounds - btPoint3 m_worldAabbMax; // overall system bounds + btVector3 m_worldAabbMin; // overall system bounds + btVector3 m_worldAabbMax; // overall system bounds btVector3 m_quantize; // scaling factor for quantization @@ -94,6 +94,12 @@ protected: int m_invalidPair; + ///additional dynamic aabb structure, used to accelerate ray cast queries. + ///can be disabled using a optional argument in the constructor + btDbvtBroadphase* m_raycastAccelerator; + btOverlappingPairCache* m_nullPairCache; + + // allocation/deallocation BP_FP_INT_TYPE allocHandle(); void freeHandle(BP_FP_INT_TYPE handle); @@ -108,7 +114,7 @@ protected: //Overlap* AddOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB); //void RemoveOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB); - void quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const; + void sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); void sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); @@ -117,7 +123,7 @@ protected: public: - btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0); + btAxisSweep3Internal(const btVector3& worldAabbMin,const btVector3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0,bool disableRaycastAccelerator = false); virtual ~btAxisSweep3Internal(); @@ -128,17 +134,26 @@ public: virtual void calculateOverlappingPairs(btDispatcher* dispatcher); - BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy); + BP_FP_INT_TYPE addHandle(const btVector3& aabbMin,const btVector3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy); void removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher); - void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher); + void updateHandle(BP_FP_INT_TYPE handle, const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher); SIMD_FORCE_INLINE Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;} + virtual void resetPool(btDispatcher* dispatcher); + void processAllOverlappingPairs(btOverlapCallback* callback); //Broadphase Interface virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy); virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher); + virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const; + + virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0)); + + void quantize(BP_FP_INT_TYPE* out, const btVector3& point, int isMax) const; + ///unQuantize should be conservative: aabbMin/aabbMax should be larger then 'getAabb' result + void unQuantize(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const; bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); @@ -206,7 +221,7 @@ void btAxisSweep3::debugPrintAxis(int axis, bool checkCardinalit } if (checkCardinality) - assert(numEdges == m_numHandles*2+1); + btAssert(numEdges == m_numHandles*2+1); } #endif //DEBUG_BROADPHASE @@ -217,7 +232,12 @@ btBroadphaseProxy* btAxisSweep3Internal::createProxy( const btV BP_FP_INT_TYPE handleId = addHandle(aabbMin,aabbMax, userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,multiSapProxy); Handle* handle = getHandle(handleId); - + + if (m_raycastAccelerator) + { + btBroadphaseProxy* rayProxy = m_raycastAccelerator->createProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,0); + handle->m_dbvtProxy = rayProxy; + } return handle; } @@ -227,6 +247,8 @@ template void btAxisSweep3Internal::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) { Handle* handle = static_cast(proxy); + if (m_raycastAccelerator) + m_raycastAccelerator->destroyProxy(handle->m_dbvtProxy,dispatcher); removeHandle(static_cast(handle->m_uniqueId), dispatcher); } @@ -234,22 +256,80 @@ template void btAxisSweep3Internal::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher) { Handle* handle = static_cast(proxy); + handle->m_aabbMin = aabbMin; + handle->m_aabbMax = aabbMax; updateHandle(static_cast(handle->m_uniqueId), aabbMin, aabbMax,dispatcher); + if (m_raycastAccelerator) + m_raycastAccelerator->setAabb(handle->m_dbvtProxy,aabbMin,aabbMax,dispatcher); } +template +void btAxisSweep3Internal::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax) +{ + if (m_raycastAccelerator) + { + m_raycastAccelerator->rayTest(rayFrom,rayTo,rayCallback,aabbMin,aabbMax); + } else + { + //choose axis? + BP_FP_INT_TYPE axis = 0; + //for each proxy + for (BP_FP_INT_TYPE i=1;i +void btAxisSweep3Internal::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const +{ + Handle* pHandle = static_cast(proxy); + aabbMin = pHandle->m_aabbMin; + aabbMax = pHandle->m_aabbMax; +} + + +template +void btAxisSweep3Internal::unQuantize(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const +{ + Handle* pHandle = static_cast(proxy); + + unsigned short vecInMin[3]; + unsigned short vecInMax[3]; + + vecInMin[0] = m_pEdges[0][pHandle->m_minEdges[0]].m_pos ; + vecInMax[0] = m_pEdges[0][pHandle->m_maxEdges[0]].m_pos +1 ; + vecInMin[1] = m_pEdges[1][pHandle->m_minEdges[1]].m_pos ; + vecInMax[1] = m_pEdges[1][pHandle->m_maxEdges[1]].m_pos +1 ; + vecInMin[2] = m_pEdges[2][pHandle->m_minEdges[2]].m_pos ; + vecInMax[2] = m_pEdges[2][pHandle->m_maxEdges[2]].m_pos +1 ; + + aabbMin.setValue((btScalar)(vecInMin[0]) / (m_quantize.getX()),(btScalar)(vecInMin[1]) / (m_quantize.getY()),(btScalar)(vecInMin[2]) / (m_quantize.getZ())); + aabbMin += m_worldAabbMin; + + aabbMax.setValue((btScalar)(vecInMax[0]) / (m_quantize.getX()),(btScalar)(vecInMax[1]) / (m_quantize.getY()),(btScalar)(vecInMax[2]) / (m_quantize.getZ())); + aabbMax += m_worldAabbMin; +} + - template -btAxisSweep3Internal::btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE userMaxHandles, btOverlappingPairCache* pairCache ) +btAxisSweep3Internal::btAxisSweep3Internal(const btVector3& worldAabbMin,const btVector3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE userMaxHandles, btOverlappingPairCache* pairCache , bool disableRaycastAccelerator) :m_bpHandleMask(handleMask), m_handleSentinel(handleSentinel), m_pairCache(pairCache), m_userPairCallback(0), m_ownsPairCache(false), -m_invalidPair(0) +m_invalidPair(0), +m_raycastAccelerator(0) { BP_FP_INT_TYPE maxHandles = static_cast(userMaxHandles+1);//need to add one sentinel handle @@ -260,7 +340,14 @@ m_invalidPair(0) m_ownsPairCache = true; } - //assert(bounds.HasVolume()); + if (!disableRaycastAccelerator) + { + m_nullPairCache = new (btAlignedAlloc(sizeof(btNullPairCache),16)) btNullPairCache(); + m_raycastAccelerator = new (btAlignedAlloc(sizeof(btDbvtBroadphase),16)) btDbvtBroadphase(m_nullPairCache);//m_pairCache); + m_raycastAccelerator->m_deferedcollide = true;//don't add/remove pairs + } + + //btAssert(bounds.HasVolume()); // init bounds m_worldAabbMin = worldAabbMin; @@ -320,7 +407,14 @@ m_invalidPair(0) template btAxisSweep3Internal::~btAxisSweep3Internal() { - + if (m_raycastAccelerator) + { + m_nullPairCache->~btOverlappingPairCache(); + btAlignedFree(m_nullPairCache); + m_raycastAccelerator->~btDbvtBroadphase(); + btAlignedFree (m_raycastAccelerator); + } + for (int i = 2; i >= 0; i--) { btAlignedFree(m_pEdgesRawPtr[i]); @@ -335,27 +429,31 @@ btAxisSweep3Internal::~btAxisSweep3Internal() } template -void btAxisSweep3Internal::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const +void btAxisSweep3Internal::quantize(BP_FP_INT_TYPE* out, const btVector3& point, int isMax) const { - btPoint3 clampedPoint(point); - - - +#ifdef OLD_CLAMPING_METHOD + ///problem with this clamping method is that the floating point during quantization might still go outside the range [(0|isMax) .. (m_handleSentinel&m_bpHandleMask]|isMax] + ///see http://code.google.com/p/bullet/issues/detail?id=87 + btVector3 clampedPoint(point); clampedPoint.setMax(m_worldAabbMin); clampedPoint.setMin(m_worldAabbMax); - btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize; out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & m_bpHandleMask) | isMax); out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & m_bpHandleMask) | isMax); out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & m_bpHandleMask) | isMax); - +#else + btVector3 v = (point - m_worldAabbMin) * m_quantize; + out[0]=(v[0]<=0)?(BP_FP_INT_TYPE)isMax:(v[0]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[0]&m_bpHandleMask)|isMax); + out[1]=(v[1]<=0)?(BP_FP_INT_TYPE)isMax:(v[1]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[1]&m_bpHandleMask)|isMax); + out[2]=(v[2]<=0)?(BP_FP_INT_TYPE)isMax:(v[2]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[2]&m_bpHandleMask)|isMax); +#endif //OLD_CLAMPING_METHOD } template BP_FP_INT_TYPE btAxisSweep3Internal::allocHandle() { - assert(m_firstFreeHandle); + btAssert(m_firstFreeHandle); BP_FP_INT_TYPE handle = m_firstFreeHandle; m_firstFreeHandle = getHandle(handle)->GetNextFree(); @@ -367,7 +465,7 @@ BP_FP_INT_TYPE btAxisSweep3Internal::allocHandle() template void btAxisSweep3Internal::freeHandle(BP_FP_INT_TYPE handle) { - assert(handle > 0 && handle < m_maxHandles); + btAssert(handle > 0 && handle < m_maxHandles); getHandle(handle)->SetNextFree(m_firstFreeHandle); m_firstFreeHandle = handle; @@ -377,7 +475,7 @@ void btAxisSweep3Internal::freeHandle(BP_FP_INT_TYPE handle) template -BP_FP_INT_TYPE btAxisSweep3Internal::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy) +BP_FP_INT_TYPE btAxisSweep3Internal::addHandle(const btVector3& aabbMin,const btVector3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy) { // quantize the bounds BP_FP_INT_TYPE min[3], max[3]; @@ -440,7 +538,7 @@ void btAxisSweep3Internal::removeHandle(BP_FP_INT_TYPE handle,bt //explicitly remove the pairs containing the proxy //we could do it also in the sortMinUp (passing true) - //todo: compare performance + ///@todo: compare performance if (!m_pairCache->hasDeferredRemoval()) { m_pairCache->removeOverlappingPairsContainingProxy(pHandle,dispatcher); @@ -489,6 +587,21 @@ void btAxisSweep3Internal::removeHandle(BP_FP_INT_TYPE handle,bt } +template +void btAxisSweep3Internal::resetPool(btDispatcher* dispatcher) +{ + if (m_numHandles == 0) + { + m_firstFreeHandle = 1; + { + for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < m_maxHandles; i++) + m_pHandles[i].SetNextFree(static_cast(i + 1)); + m_pHandles[m_maxHandles - 1].SetNextFree(0); + } + } +} + + extern int gOverlappingPairs; //#include @@ -529,6 +642,7 @@ void btAxisSweep3Internal::calculateOverlappingPairs(btDispatche if (!isDuplicate) { + ///important to use an AABB test that is consistent with the broadphase bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1); if (hasOverlap) @@ -574,10 +688,6 @@ void btAxisSweep3Internal::calculateOverlappingPairs(btDispatche //printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size()); } - - - - } @@ -616,10 +726,10 @@ bool btAxisSweep3Internal::testOverlap2D(const Handle* pHandleA, } template -void btAxisSweep3Internal::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher) +void btAxisSweep3Internal::updateHandle(BP_FP_INT_TYPE handle, const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher) { -// assert(bounds.IsFinite()); - //assert(bounds.HasVolume()); +// btAssert(bounds.IsFinite()); + //btAssert(bounds.HasVolume()); Handle* pHandle = getHandle(handle); @@ -895,7 +1005,7 @@ class btAxisSweep3 : public btAxisSweep3Internal { public: - btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0); + btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false); }; @@ -906,7 +1016,7 @@ class bt32BitAxisSweep3 : public btAxisSweep3Internal { public: - bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0); + bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false); }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h index 200ac365329..b7bbaf512ae 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h @@ -21,8 +21,22 @@ subject to the following restrictions: struct btDispatcherInfo; class btDispatcher; #include "btBroadphaseProxy.h" + class btOverlappingPairCache; + + +struct btBroadphaseRayCallback +{ + ///added some cached data to accelerate ray-AABB tests + btVector3 m_rayDirectionInverse; + unsigned int m_signs[3]; + btScalar m_lambda_max; + + virtual ~btBroadphaseRayCallback() {} + virtual bool process(const btBroadphaseProxy* proxy) = 0; +}; + #include "LinearMath/btVector3.h" ///The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs. @@ -36,7 +50,10 @@ public: virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy) =0; virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0; virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0; - + virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const =0; + + virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0)) = 0; + ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0; @@ -47,6 +64,9 @@ public: ///will add some transform later virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const =0; + ///reset broadphase internal structures, to ensure determinism/reproducability + virtual void resetPool(btDispatcher* dispatcher) {}; + virtual void printStats() = 0; }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h index a074a0b150b..be261ec4080 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h @@ -17,20 +17,24 @@ subject to the following restrictions: #define BROADPHASE_PROXY_H #include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE +#include "LinearMath/btVector3.h" #include "LinearMath/btAlignedAllocator.h" /// btDispatcher uses these types /// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave /// to facilitate type checking +/// CUSTOM_POLYHEDRAL_SHAPE_TYPE,CUSTOM_CONVEX_SHAPE_TYPE and CUSTOM_CONCAVE_SHAPE_TYPE can be used to extend Bullet without modifying source code enum BroadphaseNativeTypes { -// polyhedral convex shapes + // polyhedral convex shapes BOX_SHAPE_PROXYTYPE, TRIANGLE_SHAPE_PROXYTYPE, TETRAHEDRAL_SHAPE_PROXYTYPE, CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE, CONVEX_HULL_SHAPE_PROXYTYPE, + CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE, + CUSTOM_POLYHEDRAL_SHAPE_TYPE, //implicit convex shapes IMPLICIT_CONVEX_SHAPES_START_HERE, SPHERE_SHAPE_PROXYTYPE, @@ -42,6 +46,7 @@ IMPLICIT_CONVEX_SHAPES_START_HERE, UNIFORM_SCALING_SHAPE_PROXYTYPE, MINKOWSKI_SUM_SHAPE_PROXYTYPE, MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE, + CUSTOM_CONVEX_SHAPE_TYPE, //concave shapes CONCAVE_SHAPES_START_HERE, //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy! @@ -58,13 +63,18 @@ CONCAVE_SHAPES_START_HERE, EMPTY_SHAPE_PROXYTYPE, STATIC_PLANE_PROXYTYPE, + CUSTOM_CONCAVE_SHAPE_TYPE, CONCAVE_SHAPES_END_HERE, COMPOUND_SHAPE_PROXYTYPE, SOFTBODY_SHAPE_PROXYTYPE, + HFFLUID_SHAPE_PROXYTYPE, + HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE, + INVALID_SHAPE_PROXYTYPE, MAX_BROADPHASE_COLLISION_TYPES + }; @@ -83,20 +93,20 @@ BT_DECLARE_ALIGNED_ALLOCATOR(); KinematicFilter = 4, DebrisFilter = 8, SensorTrigger = 16, + CharacterFilter = 32, AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger }; //Usually the client btCollisionObject or Rigidbody class void* m_clientObject; - short int m_collisionFilterGroup; short int m_collisionFilterMask; - void* m_multiSapParentProxy; - - int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc. + btVector3 m_aabbMin; + btVector3 m_aabbMax; + SIMD_FORCE_INLINE int getUid() const { return m_uniqueId; @@ -107,10 +117,12 @@ BT_DECLARE_ALIGNED_ALLOCATOR(); { } - btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0) + btBroadphaseProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0) :m_clientObject(userPtr), m_collisionFilterGroup(collisionFilterGroup), - m_collisionFilterMask(collisionFilterMask) + m_collisionFilterMask(collisionFilterMask), + m_aabbMin(aabbMin), + m_aabbMax(aabbMax) { m_multiSapParentProxy = multiSapParentProxy; } @@ -159,7 +171,7 @@ ATTRIBUTE_ALIGNED16(struct) btBroadphasePair m_pProxy0(0), m_pProxy1(0), m_algorithm(0), - m_userInfo(0) + m_internalInfo1(0) { } @@ -169,14 +181,14 @@ BT_DECLARE_ALIGNED_ALLOCATOR(); : m_pProxy0(other.m_pProxy0), m_pProxy1(other.m_pProxy1), m_algorithm(other.m_algorithm), - m_userInfo(other.m_userInfo) + m_internalInfo1(other.m_internalInfo1) { } btBroadphasePair(btBroadphaseProxy& proxy0,btBroadphaseProxy& proxy1) { //keep them sorted, so the std::set operations work - if (&proxy0 < &proxy1) + if (proxy0.m_uniqueId < proxy1.m_uniqueId) { m_pProxy0 = &proxy0; m_pProxy1 = &proxy1; @@ -188,7 +200,7 @@ BT_DECLARE_ALIGNED_ALLOCATOR(); } m_algorithm = 0; - m_userInfo = 0; + m_internalInfo1 = 0; } @@ -196,7 +208,7 @@ BT_DECLARE_ALIGNED_ALLOCATOR(); btBroadphaseProxy* m_pProxy1; mutable btCollisionAlgorithm* m_algorithm; - mutable void* m_userInfo; + union { void* m_internalInfo1; int m_internalTmpValue;};//don't use this data, it will be removed in future version. }; @@ -217,8 +229,13 @@ class btBroadphasePairSortPredicate bool operator() ( const btBroadphasePair& a, const btBroadphasePair& b ) { - return a.m_pProxy0 > b.m_pProxy0 || - (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 > b.m_pProxy1) || + const int uidA0 = a.m_pProxy0 ? a.m_pProxy0->m_uniqueId : -1; + const int uidB0 = b.m_pProxy0 ? b.m_pProxy0->m_uniqueId : -1; + const int uidA1 = a.m_pProxy1 ? a.m_pProxy1->m_uniqueId : -1; + const int uidB1 = b.m_pProxy1 ? b.m_pProxy1->m_uniqueId : -1; + + return uidA0 > uidB0 || + (a.m_pProxy0 == b.m_pProxy0 && uidA1 > uidB1) || (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 == b.m_pProxy1 && a.m_algorithm > b.m_algorithm); } }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp index 7c41c8d8f71..a6e36b47049 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp @@ -23,188 +23,188 @@ typedef btAlignedObjectArray tConstNodeArray; // struct btDbvtNodeEnumerator : btDbvt::ICollide { -tConstNodeArray nodes; -void Process(const btDbvtNode* n) { nodes.push_back(n); } + tConstNodeArray nodes; + void Process(const btDbvtNode* n) { nodes.push_back(n); } }; // static DBVT_INLINE int indexof(const btDbvtNode* node) { -return(node->parent->childs[1]==node); + return(node->parent->childs[1]==node); } // static DBVT_INLINE btDbvtVolume merge( const btDbvtVolume& a, - const btDbvtVolume& b) + const btDbvtVolume& b) { -#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE -DBVT_ALIGN char locals[sizeof(btDbvtAabbMm)]; -btDbvtVolume& res=*(btDbvtVolume*)locals; +#if (DBVT_MERGE_IMPL==DBVT_IMPL_SSE) + ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtAabbMm)]); + btDbvtVolume& res=*(btDbvtVolume*)locals; #else -btDbvtVolume res; + btDbvtVolume res; #endif -Merge(a,b,res); -return(res); + Merge(a,b,res); + return(res); } // volume+edge lengths static DBVT_INLINE btScalar size(const btDbvtVolume& a) { -const btVector3 edges=a.Lengths(); -return( edges.x()*edges.y()*edges.z()+ + const btVector3 edges=a.Lengths(); + return( edges.x()*edges.y()*edges.z()+ edges.x()+edges.y()+edges.z()); } // static void getmaxdepth(const btDbvtNode* node,int depth,int& maxdepth) { -if(node->isinternal()) + if(node->isinternal()) { - getmaxdepth(node->childs[0],depth+1,maxdepth); - getmaxdepth(node->childs[0],depth+1,maxdepth); + getmaxdepth(node->childs[0],depth+1,maxdepth); + getmaxdepth(node->childs[0],depth+1,maxdepth); } else maxdepth=btMax(maxdepth,depth); } // static DBVT_INLINE void deletenode( btDbvt* pdbvt, - btDbvtNode* node) + btDbvtNode* node) { -btAlignedFree(pdbvt->m_free); -pdbvt->m_free=node; + btAlignedFree(pdbvt->m_free); + pdbvt->m_free=node; } - + // static void recursedeletenode( btDbvt* pdbvt, - btDbvtNode* node) + btDbvtNode* node) { -if(!node->isleaf()) + if(!node->isleaf()) { - recursedeletenode(pdbvt,node->childs[0]); - recursedeletenode(pdbvt,node->childs[1]); + recursedeletenode(pdbvt,node->childs[0]); + recursedeletenode(pdbvt,node->childs[1]); } -if(node==pdbvt->m_root) pdbvt->m_root=0; -deletenode(pdbvt,node); + if(node==pdbvt->m_root) pdbvt->m_root=0; + deletenode(pdbvt,node); } // static DBVT_INLINE btDbvtNode* createnode( btDbvt* pdbvt, - btDbvtNode* parent, - void* data) + btDbvtNode* parent, + void* data) { -btDbvtNode* node; -if(pdbvt->m_free) + btDbvtNode* node; + if(pdbvt->m_free) { node=pdbvt->m_free;pdbvt->m_free=0; } else { node=new(btAlignedAlloc(sizeof(btDbvtNode),16)) btDbvtNode(); } -node->parent = parent; -node->data = data; -node->childs[1] = 0; -return(node); + node->parent = parent; + node->data = data; + node->childs[1] = 0; + return(node); } // static DBVT_INLINE btDbvtNode* createnode( btDbvt* pdbvt, - btDbvtNode* parent, - const btDbvtVolume& volume, - void* data) + btDbvtNode* parent, + const btDbvtVolume& volume, + void* data) { -btDbvtNode* node=createnode(pdbvt,parent,data); -node->volume=volume; -return(node); + btDbvtNode* node=createnode(pdbvt,parent,data); + node->volume=volume; + return(node); } // static DBVT_INLINE btDbvtNode* createnode( btDbvt* pdbvt, - btDbvtNode* parent, - const btDbvtVolume& volume0, - const btDbvtVolume& volume1, - void* data) + btDbvtNode* parent, + const btDbvtVolume& volume0, + const btDbvtVolume& volume1, + void* data) { -btDbvtNode* node=createnode(pdbvt,parent,data); -Merge(volume0,volume1,node->volume); -return(node); + btDbvtNode* node=createnode(pdbvt,parent,data); + Merge(volume0,volume1,node->volume); + return(node); } // static void insertleaf( btDbvt* pdbvt, - btDbvtNode* root, - btDbvtNode* leaf) + btDbvtNode* root, + btDbvtNode* leaf) { -if(!pdbvt->m_root) + if(!pdbvt->m_root) { - pdbvt->m_root = leaf; - leaf->parent = 0; + pdbvt->m_root = leaf; + leaf->parent = 0; } else { - if(!root->isleaf()) + if(!root->isleaf()) { - do { - root=root->childs[Select( leaf->volume, - root->childs[0]->volume, - root->childs[1]->volume)]; + do { + root=root->childs[Select( leaf->volume, + root->childs[0]->volume, + root->childs[1]->volume)]; } while(!root->isleaf()); } - btDbvtNode* prev=root->parent; - btDbvtNode* node=createnode(pdbvt,prev,leaf->volume,root->volume,0); - if(prev) + btDbvtNode* prev=root->parent; + btDbvtNode* node=createnode(pdbvt,prev,leaf->volume,root->volume,0); + if(prev) { - prev->childs[indexof(root)] = node; - node->childs[0] = root;root->parent=node; - node->childs[1] = leaf;leaf->parent=node; - do { - if(!prev->volume.Contain(node->volume)) - Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume); + prev->childs[indexof(root)] = node; + node->childs[0] = root;root->parent=node; + node->childs[1] = leaf;leaf->parent=node; + do { + if(!prev->volume.Contain(node->volume)) + Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume); else - break; - node=prev; + break; + node=prev; } while(0!=(prev=node->parent)); } else { - node->childs[0] = root;root->parent=node; - node->childs[1] = leaf;leaf->parent=node; - pdbvt->m_root = node; + node->childs[0] = root;root->parent=node; + node->childs[1] = leaf;leaf->parent=node; + pdbvt->m_root = node; } } } - + // static btDbvtNode* removeleaf( btDbvt* pdbvt, - btDbvtNode* leaf) + btDbvtNode* leaf) { -if(leaf==pdbvt->m_root) + if(leaf==pdbvt->m_root) { - pdbvt->m_root=0; - return(0); + pdbvt->m_root=0; + return(0); } else { - btDbvtNode* parent=leaf->parent; - btDbvtNode* prev=parent->parent; - btDbvtNode* sibling=parent->childs[1-indexof(leaf)]; - if(prev) + btDbvtNode* parent=leaf->parent; + btDbvtNode* prev=parent->parent; + btDbvtNode* sibling=parent->childs[1-indexof(leaf)]; + if(prev) { - prev->childs[indexof(parent)]=sibling; - sibling->parent=prev; - deletenode(pdbvt,parent); - while(prev) + prev->childs[indexof(parent)]=sibling; + sibling->parent=prev; + deletenode(pdbvt,parent); + while(prev) { - const btDbvtVolume pb=prev->volume; - Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume); - if(NotEqual(pb,prev->volume)) + const btDbvtVolume pb=prev->volume; + Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume); + if(NotEqual(pb,prev->volume)) { - prev=prev->parent; + prev=prev->parent; } else break; } - return(prev?prev:pdbvt->m_root); + return(prev?prev:pdbvt->m_root); } else { - pdbvt->m_root=sibling; - sibling->parent=0; - deletenode(pdbvt,parent); - return(pdbvt->m_root); + pdbvt->m_root=sibling; + sibling->parent=0; + deletenode(pdbvt,parent); + return(pdbvt->m_root); } } } @@ -215,33 +215,33 @@ static void fetchleaves(btDbvt* pdbvt, tNodeArray& leaves, int depth=-1) { -if(root->isinternal()&&depth) + if(root->isinternal()&&depth) { - fetchleaves(pdbvt,root->childs[0],leaves,depth-1); - fetchleaves(pdbvt,root->childs[1],leaves,depth-1); - deletenode(pdbvt,root); + fetchleaves(pdbvt,root->childs[0],leaves,depth-1); + fetchleaves(pdbvt,root->childs[1],leaves,depth-1); + deletenode(pdbvt,root); } else { - leaves.push_back(root); + leaves.push_back(root); } } // static void split( const tNodeArray& leaves, - tNodeArray& left, - tNodeArray& right, - const btVector3& org, - const btVector3& axis) + tNodeArray& left, + tNodeArray& right, + const btVector3& org, + const btVector3& axis) { -left.resize(0); -right.resize(0); -for(int i=0,ni=leaves.size();ivolume.Center()-org)<0) - left.push_back(leaves[i]); + if(dot(axis,leaves[i]->volume.Center()-org)<0) + left.push_back(leaves[i]); else - right.push_back(leaves[i]); + right.push_back(leaves[i]); } } @@ -249,49 +249,49 @@ for(int i=0,ni=leaves.size();ivolume; + ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtVolume)]); + btDbvtVolume& volume=*(btDbvtVolume*)locals; + volume=leaves[0]->volume; #else -btDbvtVolume volume=leaves[0]->volume; + btDbvtVolume volume=leaves[0]->volume; #endif -for(int i=1,ni=leaves.size();ivolume,volume); + Merge(volume,leaves[i]->volume,volume); } -return(volume); + return(volume); } // static void bottomup( btDbvt* pdbvt, - tNodeArray& leaves) + tNodeArray& leaves) { -while(leaves.size()>1) + while(leaves.size()>1) { - btScalar minsize=SIMD_INFINITY; - int minidx[2]={-1,-1}; - for(int i=0;ivolume,leaves[j]->volume)); - if(szvolume,leaves[j]->volume)); + if(szvolume,n[1]->volume,0); - p->childs[0] = n[0]; - p->childs[1] = n[1]; - n[0]->parent = p; - n[1]->parent = p; - leaves[minidx[0]] = p; - leaves.swap(minidx[1],leaves.size()-1); - leaves.pop_back(); + btDbvtNode* n[] = {leaves[minidx[0]],leaves[minidx[1]]}; + btDbvtNode* p = createnode(pdbvt,0,n[0]->volume,n[1]->volume,0); + p->childs[0] = n[0]; + p->childs[1] = n[1]; + n[0]->parent = p; + n[1]->parent = p; + leaves[minidx[0]] = p; + leaves.swap(minidx[1],leaves.size()-1); + leaves.pop_back(); } } @@ -300,175 +300,181 @@ static btDbvtNode* topdown(btDbvt* pdbvt, tNodeArray& leaves, int bu_treshold) { -static const btVector3 axis[]={btVector3(1,0,0), - btVector3(0,1,0), - btVector3(0,0,1)}; -if(leaves.size()>1) + static const btVector3 axis[]={btVector3(1,0,0), + btVector3(0,1,0), + btVector3(0,0,1)}; + if(leaves.size()>1) { - if(leaves.size()>bu_treshold) + if(leaves.size()>bu_treshold) { - const btDbvtVolume vol=bounds(leaves); - const btVector3 org=vol.Center(); - tNodeArray sets[2]; - int bestaxis=-1; - int bestmidp=leaves.size(); - int splitcount[3][2]={{0,0},{0,0},{0,0}}; - int i; - for( i=0;ivolume.Center()-org; - for(int j=0;j<3;++j) + const btVector3 x=leaves[i]->volume.Center()-org; + for(int j=0;j<3;++j) { - ++splitcount[j][dot(x,axis[j])>0?1:0]; + ++splitcount[j][dot(x,axis[j])>0?1:0]; } } - for( i=0;i<3;++i) + for( i=0;i<3;++i) { - if((splitcount[i][0]>0)&&(splitcount[i][1]>0)) + if((splitcount[i][0]>0)&&(splitcount[i][1]>0)) { - const int midp=(int)btFabs(btScalar(splitcount[i][0]-splitcount[i][1])); - if(midp=0) + if(bestaxis>=0) { - sets[0].reserve(splitcount[bestaxis][0]); - sets[1].reserve(splitcount[bestaxis][1]); - split(leaves,sets[0],sets[1],org,axis[bestaxis]); + sets[0].reserve(splitcount[bestaxis][0]); + sets[1].reserve(splitcount[bestaxis][1]); + split(leaves,sets[0],sets[1],org,axis[bestaxis]); } else { - sets[0].reserve(leaves.size()/2+1); - sets[1].reserve(leaves.size()/2); - for(int i=0,ni=leaves.size();ichilds[0]=topdown(pdbvt,sets[0],bu_treshold); - node->childs[1]=topdown(pdbvt,sets[1],bu_treshold); - node->childs[0]->parent=node; - node->childs[1]->parent=node; - return(node); + btDbvtNode* node=createnode(pdbvt,0,vol,0); + node->childs[0]=topdown(pdbvt,sets[0],bu_treshold); + node->childs[1]=topdown(pdbvt,sets[1],bu_treshold); + node->childs[0]->parent=node; + node->childs[1]->parent=node; + return(node); } else { - bottomup(pdbvt,leaves); - return(leaves[0]); + bottomup(pdbvt,leaves); + return(leaves[0]); } } -return(leaves[0]); + return(leaves[0]); } // static DBVT_INLINE btDbvtNode* sort(btDbvtNode* n,btDbvtNode*& r) { -btDbvtNode* p=n->parent; -btAssert(n->isinternal()); -if(p>n) + btDbvtNode* p=n->parent; + btAssert(n->isinternal()); + if(p>n) { - const int i=indexof(n); - const int j=1-i; - btDbvtNode* s=p->childs[j]; - btDbvtNode* q=p->parent; - btAssert(n==p->childs[i]); - if(q) q->childs[indexof(p)]=n; else r=n; - s->parent=n; - p->parent=n; - n->parent=q; - p->childs[0]=n->childs[0]; - p->childs[1]=n->childs[1]; - n->childs[0]->parent=p; - n->childs[1]->parent=p; - n->childs[i]=p; - n->childs[j]=s; - btSwap(p->volume,n->volume); - return(p); + const int i=indexof(n); + const int j=1-i; + btDbvtNode* s=p->childs[j]; + btDbvtNode* q=p->parent; + btAssert(n==p->childs[i]); + if(q) q->childs[indexof(p)]=n; else r=n; + s->parent=n; + p->parent=n; + n->parent=q; + p->childs[0]=n->childs[0]; + p->childs[1]=n->childs[1]; + n->childs[0]->parent=p; + n->childs[1]->parent=p; + n->childs[i]=p; + n->childs[j]=s; + btSwap(p->volume,n->volume); + return(p); } -return(n); + return(n); } -// +#if 0 static DBVT_INLINE btDbvtNode* walkup(btDbvtNode* n,int count) { -while(n&&(count--)) n=n->parent; -return(n); + while(n&&(count--)) n=n->parent; + return(n); } +#endif // // Api // // - btDbvt::btDbvt() +btDbvt::btDbvt() { -m_root = 0; -m_free = 0; -m_lkhd = -1; -m_leaves = 0; -m_opath = 0; + m_root = 0; + m_free = 0; + m_lkhd = -1; + m_leaves = 0; + m_opath = 0; } // - btDbvt::~btDbvt() +btDbvt::~btDbvt() { -clear(); + clear(); } // void btDbvt::clear() { -if(m_root) recursedeletenode(this,m_root); -btAlignedFree(m_free); -m_free=0; + if(m_root) + recursedeletenode(this,m_root); + btAlignedFree(m_free); + m_free=0; + m_lkhd = -1; + m_stkStack.clear(); + m_opath = 0; + } // void btDbvt::optimizeBottomUp() { -if(m_root) + if(m_root) { - tNodeArray leaves; - leaves.reserve(m_leaves); - fetchleaves(this,m_root,leaves); - bottomup(this,leaves); - m_root=leaves[0]; + tNodeArray leaves; + leaves.reserve(m_leaves); + fetchleaves(this,m_root,leaves); + bottomup(this,leaves); + m_root=leaves[0]; } } // void btDbvt::optimizeTopDown(int bu_treshold) { -if(m_root) + if(m_root) { - tNodeArray leaves; - leaves.reserve(m_leaves); - fetchleaves(this,m_root,leaves); - m_root=topdown(this,leaves,bu_treshold); + tNodeArray leaves; + leaves.reserve(m_leaves); + fetchleaves(this,m_root,leaves); + m_root=topdown(this,leaves,bu_treshold); } } // void btDbvt::optimizeIncremental(int passes) { -if(passes<0) passes=m_leaves; -if(m_root&&(passes>0)) + if(passes<0) passes=m_leaves; + if(m_root&&(passes>0)) { - do { - btDbvtNode* node=m_root; - unsigned bit=0; - while(node->isinternal()) + do { + btDbvtNode* node=m_root; + unsigned bit=0; + while(node->isinternal()) { - node=sort(node,m_root)->childs[(m_opath>>bit)&1]; - bit=(bit+1)&(sizeof(unsigned)*8-1); + node=sort(node,m_root)->childs[(m_opath>>bit)&1]; + bit=(bit+1)&(sizeof(unsigned)*8-1); } - update(node); - ++m_opath; + update(node); + ++m_opath; } while(--passes); } } @@ -476,104 +482,104 @@ if(m_root&&(passes>0)) // btDbvtNode* btDbvt::insert(const btDbvtVolume& volume,void* data) { -btDbvtNode* leaf=createnode(this,0,volume,data); -insertleaf(this,m_root,leaf); -++m_leaves; -return(leaf); + btDbvtNode* leaf=createnode(this,0,volume,data); + insertleaf(this,m_root,leaf); + ++m_leaves; + return(leaf); } // void btDbvt::update(btDbvtNode* leaf,int lookahead) { -btDbvtNode* root=removeleaf(this,leaf); -if(root) + btDbvtNode* root=removeleaf(this,leaf); + if(root) { - if(lookahead>=0) + if(lookahead>=0) { - for(int i=0;(iparent;++i) + for(int i=0;(iparent;++i) { - root=root->parent; + root=root->parent; } } else root=m_root; } -insertleaf(this,root,leaf); + insertleaf(this,root,leaf); } // -void btDbvt::update(btDbvtNode* leaf,const btDbvtVolume& volume) +void btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume) { -btDbvtNode* root=removeleaf(this,leaf); -if(root) + btDbvtNode* root=removeleaf(this,leaf); + if(root) { - if(m_lkhd>=0) + if(m_lkhd>=0) { - for(int i=0;(iparent;++i) + for(int i=0;(iparent;++i) { - root=root->parent; + root=root->parent; } } else root=m_root; } -leaf->volume=volume; -insertleaf(this,root,leaf); + leaf->volume=volume; + insertleaf(this,root,leaf); } // -bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity,btScalar margin) +bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity,btScalar margin) { -if(leaf->volume.Contain(volume)) return(false); -volume.Expand(btVector3(margin,margin,margin)); -volume.SignedExpand(velocity); -update(leaf,volume); -return(true); + if(leaf->volume.Contain(volume)) return(false); + volume.Expand(btVector3(margin,margin,margin)); + volume.SignedExpand(velocity); + update(leaf,volume); + return(true); } // -bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity) +bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity) { -if(leaf->volume.Contain(volume)) return(false); -volume.SignedExpand(velocity); -update(leaf,volume); -return(true); + if(leaf->volume.Contain(volume)) return(false); + volume.SignedExpand(velocity); + update(leaf,volume); + return(true); } // -bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume volume,btScalar margin) +bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,btScalar margin) { -if(leaf->volume.Contain(volume)) return(false); -volume.Expand(btVector3(margin,margin,margin)); -update(leaf,volume); -return(true); + if(leaf->volume.Contain(volume)) return(false); + volume.Expand(btVector3(margin,margin,margin)); + update(leaf,volume); + return(true); } // void btDbvt::remove(btDbvtNode* leaf) { -removeleaf(this,leaf); -deletenode(this,leaf); ---m_leaves; + removeleaf(this,leaf); + deletenode(this,leaf); + --m_leaves; } // void btDbvt::write(IWriter* iwriter) const { -btDbvtNodeEnumerator nodes; -nodes.nodes.reserve(m_leaves*2); -enumNodes(m_root,nodes); -iwriter->Prepare(m_root,nodes.nodes.size()); -for(int i=0;iPrepare(m_root,nodes.nodes.size()); + for(int i=0;iparent) p=nodes.nodes.findLinearSearch(n->parent); - if(n->isinternal()) + const btDbvtNode* n=nodes.nodes[i]; + int p=-1; + if(n->parent) p=nodes.nodes.findLinearSearch(n->parent); + if(n->isinternal()) { - const int c0=nodes.nodes.findLinearSearch(n->childs[0]); - const int c1=nodes.nodes.findLinearSearch(n->childs[1]); - iwriter->WriteNode(n,i,p,c0,c1); + const int c0=nodes.nodes.findLinearSearch(n->childs[0]); + const int c1=nodes.nodes.findLinearSearch(n->childs[1]); + iwriter->WriteNode(n,i,p,c0,c1); } else { - iwriter->WriteLeaf(n,i,p); + iwriter->WriteLeaf(n,i,p); } } } @@ -581,29 +587,29 @@ for(int i=0;i stack; - stack.reserve(m_leaves); - stack.push_back(sStkCLN(m_root,0)); - do { - const int i=stack.size()-1; - const sStkCLN e=stack[i]; - btDbvtNode* n=createnode(&dest,e.parent,e.node->volume,e.node->data); - stack.pop_back(); - if(e.parent!=0) - e.parent->childs[i&1]=n; + btAlignedObjectArray stack; + stack.reserve(m_leaves); + stack.push_back(sStkCLN(m_root,0)); + do { + const int i=stack.size()-1; + const sStkCLN e=stack[i]; + btDbvtNode* n=createnode(&dest,e.parent,e.node->volume,e.node->data); + stack.pop_back(); + if(e.parent!=0) + e.parent->childs[i&1]=n; else - dest.m_root=n; - if(e.node->isinternal()) + dest.m_root=n; + if(e.node->isinternal()) { - stack.push_back(sStkCLN(e.node->childs[0],n)); - stack.push_back(sStkCLN(e.node->childs[1],n)); + stack.push_back(sStkCLN(e.node->childs[0],n)); + stack.push_back(sStkCLN(e.node->childs[1],n)); } else { - iclone->CloneLeaf(n); + iclone->CloneLeaf(n); } } while(stack.size()>0); } @@ -612,31 +618,31 @@ if(m_root!=0) // int btDbvt::maxdepth(const btDbvtNode* node) { -int depth=0; -if(node) getmaxdepth(node,1,depth); -return(depth); + int depth=0; + if(node) getmaxdepth(node,1,depth); + return(depth); } // int btDbvt::countLeaves(const btDbvtNode* node) { -if(node->isinternal()) - return(countLeaves(node->childs[0])+countLeaves(node->childs[1])); + if(node->isinternal()) + return(countLeaves(node->childs[0])+countLeaves(node->childs[1])); else - return(1); + return(1); } // void btDbvt::extractLeaves(const btDbvtNode* node,btAlignedObjectArray& leaves) { -if(node->isinternal()) + if(node->isinternal()) { - extractLeaves(node->childs[0],leaves); - extractLeaves(node->childs[1],leaves); + extractLeaves(node->childs[0],leaves); + extractLeaves(node->childs[1],leaves); } else { - leaves.push_back(node); + leaves.push_back(node); } } @@ -657,19 +663,19 @@ q6600,2.4ghz /W3 /nologo /c /Wp64 /Zi /errorReport:prompt Benchmarking dbvt... - World scale: 100.000000 - Extents base: 1.000000 - Extents range: 4.000000 - Leaves: 8192 - sizeof(btDbvtVolume): 32 bytes - sizeof(btDbvtNode): 44 bytes +World scale: 100.000000 +Extents base: 1.000000 +Extents range: 4.000000 +Leaves: 8192 +sizeof(btDbvtVolume): 32 bytes +sizeof(btDbvtNode): 44 bytes [1] btDbvtVolume intersections: 3499 ms (-1%) [2] btDbvtVolume merges: 1934 ms (0%) [3] btDbvt::collideTT: 5485 ms (-21%) [4] btDbvt::collideTT self: 2814 ms (-20%) [5] btDbvt::collideTT xform: 7379 ms (-1%) [6] btDbvt::collideTT xform,self: 7270 ms (-2%) -[7] btDbvt::collideRAY: 6314 ms (0%),(332143 r/s) +[7] btDbvt::rayTest: 6314 ms (0%),(332143 r/s) [8] insert/remove: 2093 ms (0%),(1001983 ir/s) [9] updates (teleport): 1879 ms (-3%),(1116100 u/s) [10] updates (jitter): 1244 ms (-4%),(1685813 u/s) @@ -684,606 +690,606 @@ Benchmarking dbvt... struct btDbvtBenchmark { -struct NilPolicy : btDbvt::ICollide + struct NilPolicy : btDbvt::ICollide { - NilPolicy() : m_pcount(0),m_depth(-SIMD_INFINITY),m_checksort(true) {} - void Process(const btDbvtNode*,const btDbvtNode*) { ++m_pcount; } - void Process(const btDbvtNode*) { ++m_pcount; } - void Process(const btDbvtNode*,btScalar depth) + NilPolicy() : m_pcount(0),m_depth(-SIMD_INFINITY),m_checksort(true) {} + void Process(const btDbvtNode*,const btDbvtNode*) { ++m_pcount; } + void Process(const btDbvtNode*) { ++m_pcount; } + void Process(const btDbvtNode*,btScalar depth) { - ++m_pcount; - if(m_checksort) + ++m_pcount; + if(m_checksort) { if(depth>=m_depth) m_depth=depth; else printf("wrong depth: %f (should be >= %f)\r\n",depth,m_depth); } } - int m_pcount; - btScalar m_depth; - bool m_checksort; + int m_pcount; + btScalar m_depth; + bool m_checksort; }; -struct P14 : btDbvt::ICollide + struct P14 : btDbvt::ICollide { - struct Node + struct Node { - const btDbvtNode* leaf; - btScalar depth; + const btDbvtNode* leaf; + btScalar depth; }; - void Process(const btDbvtNode* leaf,btScalar depth) + void Process(const btDbvtNode* leaf,btScalar depth) { - Node n; - n.leaf = leaf; - n.depth = depth; + Node n; + n.leaf = leaf; + n.depth = depth; } - static int sortfnc(const Node& a,const Node& b) + static int sortfnc(const Node& a,const Node& b) { - if(a.depthb.depth) return(-1); - return(0); + if(a.depthb.depth) return(-1); + return(0); } - btAlignedObjectArray m_nodes; + btAlignedObjectArray m_nodes; }; -struct P15 : btDbvt::ICollide + struct P15 : btDbvt::ICollide { - struct Node + struct Node { - const btDbvtNode* leaf; - btScalar depth; + const btDbvtNode* leaf; + btScalar depth; }; - void Process(const btDbvtNode* leaf) + void Process(const btDbvtNode* leaf) { - Node n; - n.leaf = leaf; - n.depth = dot(leaf->volume.Center(),m_axis); + Node n; + n.leaf = leaf; + n.depth = dot(leaf->volume.Center(),m_axis); } - static int sortfnc(const Node& a,const Node& b) + static int sortfnc(const Node& a,const Node& b) { - if(a.depthb.depth) return(-1); - return(0); + if(a.depthb.depth) return(-1); + return(0); } - btAlignedObjectArray m_nodes; - btVector3 m_axis; + btAlignedObjectArray m_nodes; + btVector3 m_axis; }; -static btScalar RandUnit() + static btScalar RandUnit() { - return(rand()/(btScalar)RAND_MAX); + return(rand()/(btScalar)RAND_MAX); } -static btVector3 RandVector3() + static btVector3 RandVector3() { - return(btVector3(RandUnit(),RandUnit(),RandUnit())); + return(btVector3(RandUnit(),RandUnit(),RandUnit())); } -static btVector3 RandVector3(btScalar cs) + static btVector3 RandVector3(btScalar cs) { - return(RandVector3()*cs-btVector3(cs,cs,cs)/2); + return(RandVector3()*cs-btVector3(cs,cs,cs)/2); } -static btDbvtVolume RandVolume(btScalar cs,btScalar eb,btScalar es) + static btDbvtVolume RandVolume(btScalar cs,btScalar eb,btScalar es) { - return(btDbvtVolume::FromCE(RandVector3(cs),btVector3(eb,eb,eb)+RandVector3()*es)); + return(btDbvtVolume::FromCE(RandVector3(cs),btVector3(eb,eb,eb)+RandVector3()*es)); } -static btTransform RandTransform(btScalar cs) + static btTransform RandTransform(btScalar cs) { - btTransform t; - t.setOrigin(RandVector3(cs)); - t.setRotation(btQuaternion(RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2).normalized()); - return(t); + btTransform t; + t.setOrigin(RandVector3(cs)); + t.setRotation(btQuaternion(RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2).normalized()); + return(t); } -static void RandTree(btScalar cs,btScalar eb,btScalar es,int leaves,btDbvt& dbvt) + static void RandTree(btScalar cs,btScalar eb,btScalar es,int leaves,btDbvt& dbvt) { - dbvt.clear(); - for(int i=0;i volumes; - btAlignedObjectArray results; - volumes.resize(cfgLeaves); - results.resize(cfgLeaves); - for(int i=0;i volumes; + btAlignedObjectArray results; + volumes.resize(cfgLeaves); + results.resize(cfgLeaves); + for(int i=0;i volumes; - btAlignedObjectArray results; - volumes.resize(cfgLeaves); - results.resize(cfgLeaves); - for(int i=0;i volumes; + btAlignedObjectArray results; + volumes.resize(cfgLeaves); + results.resize(cfgLeaves); + for(int i=0;i transforms; - btDbvtBenchmark::NilPolicy policy; - transforms.resize(cfgBenchmark5_Iterations); - for(int i=0;i transforms; + btDbvtBenchmark::NilPolicy policy; + transforms.resize(cfgBenchmark5_Iterations); + for(int i=0;i transforms; - btDbvtBenchmark::NilPolicy policy; - transforms.resize(cfgBenchmark6_Iterations); - for(int i=0;i transforms; + btDbvtBenchmark::NilPolicy policy; + transforms.resize(cfgBenchmark6_Iterations); + for(int i=0;i rayorg; - btAlignedObjectArray raydir; - btDbvtBenchmark::NilPolicy policy; - rayorg.resize(cfgBenchmark7_Iterations); - raydir.resize(cfgBenchmark7_Iterations); - for(int i=0;i rayorg; + btAlignedObjectArray raydir; + btDbvtBenchmark::NilPolicy policy; + rayorg.resize(cfgBenchmark7_Iterations); + raydir.resize(cfgBenchmark7_Iterations); + for(int i=0;i leaves; - btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt); - dbvt.optimizeTopDown(); - dbvt.extractLeaves(dbvt.m_root,leaves); - printf("[9] updates (teleport): "); - wallclock.reset(); - for(int i=0;i leaves; + btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt); + dbvt.optimizeTopDown(); + dbvt.extractLeaves(dbvt.m_root,leaves); + printf("[9] updates (teleport): "); + wallclock.reset(); + for(int i=0;i(leaves[rand()%cfgLeaves]), - btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale)); + dbvt.update(const_cast(leaves[rand()%cfgLeaves]), + btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale)); } } - const int time=(int)wallclock.getTimeMilliseconds(); - const int up=cfgBenchmark9_Passes*cfgBenchmark9_Iterations; - printf("%u ms (%i%%),(%u u/s)\r\n",time,(time-cfgBenchmark9_Reference)*100/time,up*1000/time); + const int time=(int)wallclock.getTimeMilliseconds(); + const int up=cfgBenchmark9_Passes*cfgBenchmark9_Iterations; + printf("%u ms (%i%%),(%u u/s)\r\n",time,(time-cfgBenchmark9_Reference)*100/time,up*1000/time); } -if(cfgBenchmark10_Enable) + if(cfgBenchmark10_Enable) {// Benchmark 10 - srand(380843); - btDbvt dbvt; - btAlignedObjectArray leaves; - btAlignedObjectArray vectors; - vectors.resize(cfgBenchmark10_Iterations); - for(int i=0;i leaves; + btAlignedObjectArray vectors; + vectors.resize(cfgBenchmark10_Iterations); + for(int i=0;i(leaves[rand()%cfgLeaves]); - btDbvtVolume v=btDbvtVolume::FromMM(l->volume.Mins()+d,l->volume.Maxs()+d); - dbvt.update(l,v); + const btVector3& d=vectors[j]; + btDbvtNode* l=const_cast(leaves[rand()%cfgLeaves]); + btDbvtVolume v=btDbvtVolume::FromMM(l->volume.Mins()+d,l->volume.Maxs()+d); + dbvt.update(l,v); } } - const int time=(int)wallclock.getTimeMilliseconds(); - const int up=cfgBenchmark10_Passes*cfgBenchmark10_Iterations; - printf("%u ms (%i%%),(%u u/s)\r\n",time,(time-cfgBenchmark10_Reference)*100/time,up*1000/time); + const int time=(int)wallclock.getTimeMilliseconds(); + const int up=cfgBenchmark10_Passes*cfgBenchmark10_Iterations; + printf("%u ms (%i%%),(%u u/s)\r\n",time,(time-cfgBenchmark10_Reference)*100/time,up*1000/time); } -if(cfgBenchmark11_Enable) + if(cfgBenchmark11_Enable) {// Benchmark 11 - srand(380843); - btDbvt dbvt; - btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt); - dbvt.optimizeTopDown(); - printf("[11] optimize (incremental): "); - wallclock.reset(); - for(int i=0;i volumes; - btAlignedObjectArray results; - volumes.resize(cfgLeaves); - results.resize(cfgLeaves); - for(int i=0;i volumes; + btAlignedObjectArray results; + volumes.resize(cfgLeaves); + results.resize(cfgLeaves); + for(int i=0;i vectors; - btDbvtBenchmark::NilPolicy policy; - vectors.resize(cfgBenchmark13_Iterations); - for(int i=0;i vectors; + btDbvtBenchmark::NilPolicy policy; + vectors.resize(cfgBenchmark13_Iterations); + for(int i=0;i vectors; - btDbvtBenchmark::P14 policy; - vectors.resize(cfgBenchmark14_Iterations); - for(int i=0;i vectors; + btDbvtBenchmark::P14 policy; + vectors.resize(cfgBenchmark14_Iterations); + for(int i=0;i vectors; - btDbvtBenchmark::P15 policy; - vectors.resize(cfgBenchmark15_Iterations); - for(int i=0;i vectors; + btDbvtBenchmark::P15 policy; + vectors.resize(cfgBenchmark15_Iterations); + for(int i=0;i batch; - btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt); - dbvt.optimizeTopDown(); - batch.reserve(cfgBenchmark16_BatchCount); - printf("[16] insert/remove batch(%u): ",cfgBenchmark16_BatchCount); - wallclock.reset(); - for(int i=0;i batch; + btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt); + dbvt.optimizeTopDown(); + batch.reserve(cfgBenchmark16_BatchCount); + printf("[16] insert/remove batch(%u): ",cfgBenchmark16_BatchCount); + wallclock.reset(); + for(int i=0;i volumes; - btAlignedObjectArray results; - btAlignedObjectArray indices; - volumes.resize(cfgLeaves); - results.resize(cfgLeaves); - indices.resize(cfgLeaves); - for(int i=0;i volumes; + btAlignedObjectArray results; + btAlignedObjectArray indices; + volumes.resize(cfgLeaves); + results.resize(cfgLeaves); + indices.resize(cfgLeaves); + for(int i=0;i= 1400) - #define DBVT_USE_TEMPLATE 1 - #else - #define DBVT_USE_TEMPLATE 0 +#ifdef WIN32 +#if (defined (_MSC_VER) && _MSC_VER >= 1400) +#define DBVT_USE_TEMPLATE 1 +#else +#define DBVT_USE_TEMPLATE 0 #endif #else #define DBVT_USE_TEMPLATE 0 @@ -52,16 +53,11 @@ subject to the following restrictions: // Inlining #define DBVT_INLINE SIMD_FORCE_INLINE -// Align -#ifdef WIN32 -#define DBVT_ALIGN __declspec(align(16)) -#else -#define DBVT_ALIGN -#endif // Specific methods implementation -#ifdef WIN32_AVOID_SSE_WHEN_EMBEDDED_INSIDE_BLENDER //there is always some weird compiler that breaks SSE builds +//SSE gives errors on a MSVC 7.1 +#ifdef BT_USE_SSE #define DBVT_SELECT_IMPL DBVT_IMPL_SSE #define DBVT_MERGE_IMPL DBVT_IMPL_SSE #define DBVT_INT0_IMPL DBVT_IMPL_SSE @@ -86,7 +82,7 @@ subject to the following restrictions: #define DBVT_VIRTUAL_DTOR(a) #define DBVT_PREFIX template #define DBVT_IPOLICY T& policy -#define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)0; +#define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)1;(void)typechecker; #else #define DBVT_VIRTUAL_DTOR(a) virtual ~a() {} #define DBVT_VIRTUAL virtual @@ -133,46 +129,41 @@ subject to the following restrictions: /* btDbvtAabbMm */ struct btDbvtAabbMm { -DBVT_INLINE btVector3 Center() const { return((mi+mx)/2); } -DBVT_INLINE btVector3 Lengths() const { return(mx-mi); } -DBVT_INLINE btVector3 Extents() const { return((mx-mi)/2); } -DBVT_INLINE const btVector3& Mins() const { return(mi); } -DBVT_INLINE const btVector3& Maxs() const { return(mx); } -static inline btDbvtAabbMm FromCE(const btVector3& c,const btVector3& e); -static inline btDbvtAabbMm FromCR(const btVector3& c,btScalar r); -static inline btDbvtAabbMm FromMM(const btVector3& mi,const btVector3& mx); -static inline btDbvtAabbMm FromPoints(const btVector3* pts,int n); -static inline btDbvtAabbMm FromPoints(const btVector3** ppts,int n); -DBVT_INLINE void Expand(const btVector3& e); -DBVT_INLINE void SignedExpand(const btVector3& e); -DBVT_INLINE bool Contain(const btDbvtAabbMm& a) const; -DBVT_INLINE int Classify(const btVector3& n,btScalar o,int s) const; -DBVT_INLINE btScalar ProjectMinimum(const btVector3& v,unsigned signs) const; -DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, - const btDbvtAabbMm& b); -DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, - const btDbvtAabbMm& b, - const btTransform& xform); -DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, - const btVector3& b); -DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, - const btVector3& org, - const btVector3& invdir, - const unsigned* signs); -DBVT_INLINE friend btScalar Proximity( const btDbvtAabbMm& a, - const btDbvtAabbMm& b); -DBVT_INLINE friend int Select( const btDbvtAabbMm& o, - const btDbvtAabbMm& a, - const btDbvtAabbMm& b); -DBVT_INLINE friend void Merge( const btDbvtAabbMm& a, - const btDbvtAabbMm& b, - btDbvtAabbMm& r); -DBVT_INLINE friend bool NotEqual( const btDbvtAabbMm& a, - const btDbvtAabbMm& b); + DBVT_INLINE btVector3 Center() const { return((mi+mx)/2); } + DBVT_INLINE btVector3 Lengths() const { return(mx-mi); } + DBVT_INLINE btVector3 Extents() const { return((mx-mi)/2); } + DBVT_INLINE const btVector3& Mins() const { return(mi); } + DBVT_INLINE const btVector3& Maxs() const { return(mx); } + static inline btDbvtAabbMm FromCE(const btVector3& c,const btVector3& e); + static inline btDbvtAabbMm FromCR(const btVector3& c,btScalar r); + static inline btDbvtAabbMm FromMM(const btVector3& mi,const btVector3& mx); + static inline btDbvtAabbMm FromPoints(const btVector3* pts,int n); + static inline btDbvtAabbMm FromPoints(const btVector3** ppts,int n); + DBVT_INLINE void Expand(const btVector3& e); + DBVT_INLINE void SignedExpand(const btVector3& e); + DBVT_INLINE bool Contain(const btDbvtAabbMm& a) const; + DBVT_INLINE int Classify(const btVector3& n,btScalar o,int s) const; + DBVT_INLINE btScalar ProjectMinimum(const btVector3& v,unsigned signs) const; + DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, + const btDbvtAabbMm& b); + + DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a, + const btVector3& b); + + DBVT_INLINE friend btScalar Proximity( const btDbvtAabbMm& a, + const btDbvtAabbMm& b); + DBVT_INLINE friend int Select( const btDbvtAabbMm& o, + const btDbvtAabbMm& a, + const btDbvtAabbMm& b); + DBVT_INLINE friend void Merge( const btDbvtAabbMm& a, + const btDbvtAabbMm& b, + btDbvtAabbMm& r); + DBVT_INLINE friend bool NotEqual( const btDbvtAabbMm& a, + const btDbvtAabbMm& b); private: -DBVT_INLINE void AddSpan(const btVector3& d,btScalar& smi,btScalar& smx) const; + DBVT_INLINE void AddSpan(const btVector3& d,btScalar& smi,btScalar& smx) const; private: -btVector3 mi,mx; + btVector3 mi,mx; }; // Types @@ -185,88 +176,94 @@ struct btDbvtNode btDbvtNode* parent; DBVT_INLINE bool isleaf() const { return(childs[1]==0); } DBVT_INLINE bool isinternal() const { return(!isleaf()); } - union { - btDbvtNode* childs[2]; - void* data; - int dataAsInt; - }; + union + { + btDbvtNode* childs[2]; + void* data; + int dataAsInt; + }; }; ///The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes (aabb tree). ///This btDbvt is used for soft body collision detection and for the btDbvtBroadphase. It has a fast insert, remove and update of nodes. ///Unlike the btQuantizedBvh, nodes can be dynamically moved around, which allows for change in topology of the underlying data structure. struct btDbvt - { +{ /* Stack element */ struct sStkNN - { + { const btDbvtNode* a; const btDbvtNode* b; sStkNN() {} sStkNN(const btDbvtNode* na,const btDbvtNode* nb) : a(na),b(nb) {} - }; + }; struct sStkNP - { + { const btDbvtNode* node; int mask; sStkNP(const btDbvtNode* n,unsigned m) : node(n),mask(m) {} - }; + }; struct sStkNPS - { + { const btDbvtNode* node; int mask; btScalar value; sStkNPS() {} sStkNPS(const btDbvtNode* n,unsigned m,btScalar v) : node(n),mask(m),value(v) {} - }; + }; struct sStkCLN - { + { const btDbvtNode* node; btDbvtNode* parent; sStkCLN(const btDbvtNode* n,btDbvtNode* p) : node(n),parent(p) {} - }; + }; // Policies/Interfaces - + /* ICollide */ struct ICollide - { + { DBVT_VIRTUAL_DTOR(ICollide) - DBVT_VIRTUAL void Process(const btDbvtNode*,const btDbvtNode*) {} + DBVT_VIRTUAL void Process(const btDbvtNode*,const btDbvtNode*) {} DBVT_VIRTUAL void Process(const btDbvtNode*) {} DBVT_VIRTUAL void Process(const btDbvtNode* n,btScalar) { Process(n); } DBVT_VIRTUAL bool Descent(const btDbvtNode*) { return(true); } DBVT_VIRTUAL bool AllLeaves(const btDbvtNode*) { return(true); } - }; + }; /* IWriter */ struct IWriter - { + { virtual ~IWriter() {} virtual void Prepare(const btDbvtNode* root,int numnodes)=0; virtual void WriteNode(const btDbvtNode*,int index,int parent,int child0,int child1)=0; virtual void WriteLeaf(const btDbvtNode*,int index,int parent)=0; - }; + }; /* IClone */ struct IClone - { + { virtual ~IClone() {} virtual void CloneLeaf(btDbvtNode*) {} - }; - + }; + // Constants enum { - SIMPLE_STACKSIZE = 64, - DOUBLE_STACKSIZE = SIMPLE_STACKSIZE*2 - }; - + SIMPLE_STACKSIZE = 64, + DOUBLE_STACKSIZE = SIMPLE_STACKSIZE*2 + }; + // Fields btDbvtNode* m_root; btDbvtNode* m_free; int m_lkhd; int m_leaves; unsigned m_opath; + + + btAlignedObjectArray m_stkStack; + + // Methods - btDbvt(); - ~btDbvt(); + btDbvt(); + ~btDbvt(); void clear(); bool empty() const { return(0==m_root); } void optimizeBottomUp(); @@ -274,95 +271,118 @@ struct btDbvt void optimizeIncremental(int passes); btDbvtNode* insert(const btDbvtVolume& box,void* data); void update(btDbvtNode* leaf,int lookahead=-1); - void update(btDbvtNode* leaf,const btDbvtVolume& volume); - bool update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity,btScalar margin); - bool update(btDbvtNode* leaf,btDbvtVolume volume,const btVector3& velocity); - bool update(btDbvtNode* leaf,btDbvtVolume volume,btScalar margin); + void update(btDbvtNode* leaf,btDbvtVolume& volume); + bool update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity,btScalar margin); + bool update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity); + bool update(btDbvtNode* leaf,btDbvtVolume& volume,btScalar margin); void remove(btDbvtNode* leaf); void write(IWriter* iwriter) const; void clone(btDbvt& dest,IClone* iclone=0) const; static int maxdepth(const btDbvtNode* node); static int countLeaves(const btDbvtNode* node); static void extractLeaves(const btDbvtNode* node,btAlignedObjectArray& leaves); - #if DBVT_ENABLE_BENCHMARK +#if DBVT_ENABLE_BENCHMARK static void benchmark(); - #else +#else static void benchmark(){} - #endif +#endif // DBVT_IPOLICY must support ICollide policy/interface DBVT_PREFIX - static void enumNodes( const btDbvtNode* root, - DBVT_IPOLICY); + static void enumNodes( const btDbvtNode* root, + DBVT_IPOLICY); DBVT_PREFIX - static void enumLeaves( const btDbvtNode* root, - DBVT_IPOLICY); + static void enumLeaves( const btDbvtNode* root, + DBVT_IPOLICY); DBVT_PREFIX - static void collideTT( const btDbvtNode* root0, - const btDbvtNode* root1, - DBVT_IPOLICY); + void collideTT( const btDbvtNode* root0, + const btDbvtNode* root1, + DBVT_IPOLICY); + DBVT_PREFIX - static void collideTT( const btDbvtNode* root0, - const btDbvtNode* root1, - const btTransform& xform, - DBVT_IPOLICY); + void collideTTpersistentStack( const btDbvtNode* root0, + const btDbvtNode* root1, + DBVT_IPOLICY); +#if 0 DBVT_PREFIX - static void collideTT( const btDbvtNode* root0, - const btTransform& xform0, - const btDbvtNode* root1, - const btTransform& xform1, - DBVT_IPOLICY); + void collideTT( const btDbvtNode* root0, + const btDbvtNode* root1, + const btTransform& xform, + DBVT_IPOLICY); DBVT_PREFIX - static void collideTV( const btDbvtNode* root, - const btDbvtVolume& volume, - DBVT_IPOLICY); + void collideTT( const btDbvtNode* root0, + const btTransform& xform0, + const btDbvtNode* root1, + const btTransform& xform1, + DBVT_IPOLICY); +#endif + DBVT_PREFIX - static void collideRAY( const btDbvtNode* root, - const btVector3& origin, - const btVector3& direction, - DBVT_IPOLICY); + void collideTV( const btDbvtNode* root, + const btDbvtVolume& volume, + DBVT_IPOLICY); + ///rayTest is a re-entrant ray test, and can be called in parallel as long as the btAlignedAlloc is thread-safe (uses locking etc) + ///rayTest is slower than rayTestInternal, because it builds a local stack, using memory allocations, and it recomputes signs/rayDirectionInverses each time DBVT_PREFIX - static void collideKDOP(const btDbvtNode* root, - const btVector3* normals, - const btScalar* offsets, - int count, - DBVT_IPOLICY); + static void rayTest( const btDbvtNode* root, + const btVector3& rayFrom, + const btVector3& rayTo, + DBVT_IPOLICY); + ///rayTestInternal is faster than rayTest, because it uses a persistent stack (to reduce dynamic memory allocations to a minimum) and it uses precomputed signs/rayInverseDirections + ///rayTestInternal is used by btDbvtBroadphase to accelerate world ray casts DBVT_PREFIX - static void collideOCL( const btDbvtNode* root, - const btVector3* normals, - const btScalar* offsets, - const btVector3& sortaxis, - int count, - DBVT_IPOLICY, - bool fullsort=true); + void rayTestInternal( const btDbvtNode* root, + const btVector3& rayFrom, + const btVector3& rayTo, + const btVector3& rayDirectionInverse, + unsigned int signs[3], + btScalar lambda_max, + const btVector3& aabbMin, + const btVector3& aabbMax, + DBVT_IPOLICY) const; + DBVT_PREFIX - static void collideTU( const btDbvtNode* root, - DBVT_IPOLICY); + static void collideKDOP(const btDbvtNode* root, + const btVector3* normals, + const btScalar* offsets, + int count, + DBVT_IPOLICY); + DBVT_PREFIX + static void collideOCL( const btDbvtNode* root, + const btVector3* normals, + const btScalar* offsets, + const btVector3& sortaxis, + int count, + DBVT_IPOLICY, + bool fullsort=true); + DBVT_PREFIX + static void collideTU( const btDbvtNode* root, + DBVT_IPOLICY); // Helpers static DBVT_INLINE int nearest(const int* i,const btDbvt::sStkNPS* a,btScalar v,int l,int h) - { + { int m=0; while(l>1; if(a[i[m]].value>=v) l=m+1; else h=m; - } - return(h); } + return(h); + } static DBVT_INLINE int allocate( btAlignedObjectArray& ifree, - btAlignedObjectArray& stock, - const sStkNPS& value) - { + btAlignedObjectArray& stock, + const sStkNPS& value) + { int i; if(ifree.size()>0) - { i=ifree[ifree.size()-1];ifree.pop_back();stock[i]=value; } - else - { i=stock.size();stock.push_back(value); } + { i=ifree[ifree.size()-1];ifree.pop_back();stock[i]=value; } + else + { i=stock.size();stock.push_back(value); } return(i); - } + } // - private: - btDbvt(const btDbvt&) {} - }; +private: + btDbvt(const btDbvt&) {} +}; // // Inline's @@ -371,69 +391,69 @@ struct btDbvt // inline btDbvtAabbMm btDbvtAabbMm::FromCE(const btVector3& c,const btVector3& e) { -btDbvtAabbMm box; -box.mi=c-e;box.mx=c+e; -return(box); + btDbvtAabbMm box; + box.mi=c-e;box.mx=c+e; + return(box); } - + // inline btDbvtAabbMm btDbvtAabbMm::FromCR(const btVector3& c,btScalar r) { -return(FromCE(c,btVector3(r,r,r))); + return(FromCE(c,btVector3(r,r,r))); } - + // inline btDbvtAabbMm btDbvtAabbMm::FromMM(const btVector3& mi,const btVector3& mx) { -btDbvtAabbMm box; -box.mi=mi;box.mx=mx; -return(box); + btDbvtAabbMm box; + box.mi=mi;box.mx=mx; + return(box); } - + // inline btDbvtAabbMm btDbvtAabbMm::FromPoints(const btVector3* pts,int n) { -btDbvtAabbMm box; -box.mi=box.mx=pts[0]; -for(int i=1;i0) mx.setX(mx.x()+e[0]); else mi.setX(mi.x()+e[0]); -if(e.y()>0) mx.setY(mx.y()+e[1]); else mi.setY(mi.y()+e[1]); -if(e.z()>0) mx.setZ(mx.z()+e[2]); else mi.setZ(mi.z()+e[2]); + if(e.x()>0) mx.setX(mx.x()+e[0]); else mi.setX(mi.x()+e[0]); + if(e.y()>0) mx.setY(mx.y()+e[1]); else mi.setY(mi.y()+e[1]); + if(e.z()>0) mx.setZ(mx.z()+e[2]); else mi.setZ(mi.z()+e[2]); } - + // DBVT_INLINE bool btDbvtAabbMm::Contain(const btDbvtAabbMm& a) const { -return( (mi.x()<=a.mi.x())&& + return( (mi.x()<=a.mi.x())&& (mi.y()<=a.mi.y())&& (mi.z()<=a.mi.z())&& (mx.x()>=a.mx.x())&& @@ -444,64 +464,64 @@ return( (mi.x()<=a.mi.x())&& // DBVT_INLINE int btDbvtAabbMm::Classify(const btVector3& n,btScalar o,int s) const { -btVector3 pi,px; -switch(s) + btVector3 pi,px; + switch(s) { case (0+0+0): px=btVector3(mi.x(),mi.y(),mi.z()); - pi=btVector3(mx.x(),mx.y(),mx.z());break; + pi=btVector3(mx.x(),mx.y(),mx.z());break; case (1+0+0): px=btVector3(mx.x(),mi.y(),mi.z()); - pi=btVector3(mi.x(),mx.y(),mx.z());break; + pi=btVector3(mi.x(),mx.y(),mx.z());break; case (0+2+0): px=btVector3(mi.x(),mx.y(),mi.z()); - pi=btVector3(mx.x(),mi.y(),mx.z());break; + pi=btVector3(mx.x(),mi.y(),mx.z());break; case (1+2+0): px=btVector3(mx.x(),mx.y(),mi.z()); - pi=btVector3(mi.x(),mi.y(),mx.z());break; + pi=btVector3(mi.x(),mi.y(),mx.z());break; case (0+0+4): px=btVector3(mi.x(),mi.y(),mx.z()); - pi=btVector3(mx.x(),mx.y(),mi.z());break; + pi=btVector3(mx.x(),mx.y(),mi.z());break; case (1+0+4): px=btVector3(mx.x(),mi.y(),mx.z()); - pi=btVector3(mi.x(),mx.y(),mi.z());break; + pi=btVector3(mi.x(),mx.y(),mi.z());break; case (0+2+4): px=btVector3(mi.x(),mx.y(),mx.z()); - pi=btVector3(mx.x(),mi.y(),mi.z());break; + pi=btVector3(mx.x(),mi.y(),mi.z());break; case (1+2+4): px=btVector3(mx.x(),mx.y(),mx.z()); - pi=btVector3(mi.x(),mi.y(),mi.z());break; + pi=btVector3(mi.x(),mi.y(),mi.z());break; } -if((dot(n,px)+o)<0) return(-1); -if((dot(n,pi)+o)>=0) return(+1); -return(0); + if((dot(n,px)+o)<0) return(-1); + if((dot(n,pi)+o)>=0) return(+1); + return(0); } // DBVT_INLINE btScalar btDbvtAabbMm::ProjectMinimum(const btVector3& v,unsigned signs) const { -const btVector3* b[]={&mx,&mi}; -const btVector3 p( b[(signs>>0)&1]->x(), - b[(signs>>1)&1]->y(), - b[(signs>>2)&1]->z()); -return(dot(p,v)); + const btVector3* b[]={&mx,&mi}; + const btVector3 p( b[(signs>>0)&1]->x(), + b[(signs>>1)&1]->y(), + b[(signs>>2)&1]->z()); + return(dot(p,v)); } // DBVT_INLINE void btDbvtAabbMm::AddSpan(const btVector3& d,btScalar& smi,btScalar& smx) const { -for(int i=0;i<3;++i) + for(int i=0;i<3;++i) { - if(d[i]<0) + if(d[i]<0) { smi+=mx[i]*d[i];smx+=mi[i]*d[i]; } else { smi+=mi[i]*d[i];smx+=mx[i]*d[i]; } } } - + // DBVT_INLINE bool Intersect( const btDbvtAabbMm& a, - const btDbvtAabbMm& b) + const btDbvtAabbMm& b) { #if DBVT_INT0_IMPL == DBVT_IMPL_SSE -const __m128 rt(_mm_or_ps( _mm_cmplt_ps(_mm_load_ps(b.mx),_mm_load_ps(a.mi)), - _mm_cmplt_ps(_mm_load_ps(a.mx),_mm_load_ps(b.mi)))); -const __int32* pu((const __int32*)&rt); -return((pu[0]|pu[1]|pu[2])==0); + const __m128 rt(_mm_or_ps( _mm_cmplt_ps(_mm_load_ps(b.mx),_mm_load_ps(a.mi)), + _mm_cmplt_ps(_mm_load_ps(a.mx),_mm_load_ps(b.mi)))); + const __int32* pu((const __int32*)&rt); + return((pu[0]|pu[1]|pu[2])==0); #else -return( (a.mi.x()<=b.mx.x())&& + return( (a.mi.x()<=b.mx.x())&& (a.mx.x()>=b.mi.x())&& (a.mi.y()<=b.mx.y())&& (a.mx.y()>=b.mi.y())&& @@ -510,27 +530,13 @@ return( (a.mi.x()<=b.mx.x())&& #endif } -// -DBVT_INLINE bool Intersect( const btDbvtAabbMm& a, - const btDbvtAabbMm& b, - const btTransform& xform) -{ -const btVector3 d0=xform*b.Center()-a.Center(); -const btVector3 d1=d0*xform.getBasis(); -btScalar s0[2]={0,0}; -btScalar s1[2]={dot(xform.getOrigin(),d0),s1[0]}; -a.AddSpan(d0,s0[0],s0[1]); -b.AddSpan(d1,s1[0],s1[1]); -if(s0[0]>(s1[1])) return(false); -if(s0[1]<(s1[0])) return(false); -return(true); -} + // DBVT_INLINE bool Intersect( const btDbvtAabbMm& a, - const btVector3& b) + const btVector3& b) { -return( (b.x()>=a.mi.x())&& + return( (b.x()>=a.mi.x())&& (b.y()>=a.mi.y())&& (b.z()>=a.mi.z())&& (b.x()<=a.mx.x())&& @@ -538,55 +544,40 @@ return( (b.x()>=a.mi.x())&& (b.z()<=a.mx.z())); } -// -DBVT_INLINE bool Intersect( const btDbvtAabbMm& a, - const btVector3& org, - const btVector3& invdir, - const unsigned* signs) -{ -#if 0 -const btVector3 b0((a.mi-org)*invdir); -const btVector3 b1((a.mx-org)*invdir); -const btVector3 tmin(btMin(b0[0],b1[0]),btMin(b0[1],b1[1]),btMin(b0[2],b1[2])); -const btVector3 tmax(btMax(b0[0],b1[0]),btMax(b0[1],b1[1]),btMax(b0[2],b1[2])); -const btScalar tin=btMax(tmin[0],btMax(tmin[1],tmin[2])); -const btScalar tout=btMin(tmax[0],btMin(tmax[1],tmax[2])); -return(tinx()-org[0])*invdir[0]; -btScalar txmax=(bounds[1-signs[0]]->x()-org[0])*invdir[0]; -const btScalar tymin=(bounds[ signs[1]]->y()-org[1])*invdir[1]; -const btScalar tymax=(bounds[1-signs[1]]->y()-org[1])*invdir[1]; -if((txmin>tymax)||(tymin>txmax)) return(false); -if(tymin>txmin) txmin=tymin; -if(tymaxz()-org[2])*invdir[2]; -const btScalar tzmax=(bounds[1-signs[2]]->z()-org[2])*invdir[2]; -if((txmin>tzmax)||(tzmin>txmax)) return(false); -if(tzmin>txmin) txmin=tzmin; -if(tzmax0); -#endif -} - + + + + +////////////////////////////////////// + + // DBVT_INLINE btScalar Proximity( const btDbvtAabbMm& a, - const btDbvtAabbMm& b) + const btDbvtAabbMm& b) { -const btVector3 d=(a.mi+a.mx)-(b.mi+b.mx); -return(btFabs(d.x())+btFabs(d.y())+btFabs(d.z())); + const btVector3 d=(a.mi+a.mx)-(b.mi+b.mx); + return(btFabs(d.x())+btFabs(d.y())+btFabs(d.z())); } + + // DBVT_INLINE int Select( const btDbvtAabbMm& o, - const btDbvtAabbMm& a, - const btDbvtAabbMm& b) + const btDbvtAabbMm& a, + const btDbvtAabbMm& b) { #if DBVT_SELECT_IMPL == DBVT_IMPL_SSE -static DBVT_ALIGN const unsigned __int32 mask[]={0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff}; - // TODO: the intrinsic version is 11% slower - #if DBVT_USE_INTRINSIC_SSE + static ATTRIBUTE_ALIGNED16(const unsigned __int32) mask[]={0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff}; + ///@todo: the intrinsic version is 11% slower +#if DBVT_USE_INTRINSIC_SSE + + union btSSEUnion ///NOTE: if we use more intrinsics, move btSSEUnion into the LinearMath directory + { + __m128 ssereg; + float floats[4]; + int ints[4]; + }; + __m128 omi(_mm_load_ps(o.mi)); omi=_mm_add_ps(omi,_mm_load_ps(o.mx)); __m128 ami(_mm_load_ps(a.mi)); @@ -600,74 +591,78 @@ static DBVT_ALIGN const unsigned __int32 mask[]={0x7fffffff,0x7fffffff,0x7ffffff __m128 t0(_mm_movehl_ps(ami,ami)); ami=_mm_add_ps(ami,t0); ami=_mm_add_ss(ami,_mm_shuffle_ps(ami,ami,1)); - __m128 t1(_mm_movehl_ps(bmi,bmi)); + __m128 t1(_mm_movehl_ps(bmi,bmi)); bmi=_mm_add_ps(bmi,t1); bmi=_mm_add_ss(bmi,_mm_shuffle_ps(bmi,bmi,1)); - return(_mm_cmple_ss(bmi,ami).m128_u32[0]&1); - #else - DBVT_ALIGN __int32 r[1]; + + btSSEUnion tmp; + tmp.ssereg = _mm_cmple_ss(bmi,ami); + return tmp.ints[0]&1; + +#else + ATTRIBUTE_ALIGNED16(__int32 r[1]); __asm - { + { mov eax,o - mov ecx,a - mov edx,b - movaps xmm0,[eax] + mov ecx,a + mov edx,b + movaps xmm0,[eax] movaps xmm5,mask - addps xmm0,[eax+16] + addps xmm0,[eax+16] movaps xmm1,[ecx] movaps xmm2,[edx] addps xmm1,[ecx+16] addps xmm2,[edx+16] subps xmm1,xmm0 - subps xmm2,xmm0 - andps xmm1,xmm5 - andps xmm2,xmm5 - movhlps xmm3,xmm1 - movhlps xmm4,xmm2 - addps xmm1,xmm3 - addps xmm2,xmm4 - pshufd xmm3,xmm1,1 - pshufd xmm4,xmm2,1 - addss xmm1,xmm3 - addss xmm2,xmm4 - cmpless xmm2,xmm1 - movss r,xmm2 - } + subps xmm2,xmm0 + andps xmm1,xmm5 + andps xmm2,xmm5 + movhlps xmm3,xmm1 + movhlps xmm4,xmm2 + addps xmm1,xmm3 + addps xmm2,xmm4 + pshufd xmm3,xmm1,1 + pshufd xmm4,xmm2,1 + addss xmm1,xmm3 + addss xmm2,xmm4 + cmpless xmm2,xmm1 + movss r,xmm2 + } return(r[0]&1); - #endif +#endif #else -return(Proximity(o,a)b.mx[i]) r.mx[i]=a.mx[i]; else r.mx[i]=b.mx[i]; + if(a.mi[i]b.mx[i]) r.mx[i]=a.mx[i]; else r.mx[i]=b.mx[i]; } #endif } // DBVT_INLINE bool NotEqual( const btDbvtAabbMm& a, - const btDbvtAabbMm& b) + const btDbvtAabbMm& b) { -return( (a.mi.x()!=b.mi.x())|| + return( (a.mi.x()!=b.mi.x())|| (a.mi.y()!=b.mi.y())|| (a.mi.z()!=b.mi.z())|| (a.mx.x()!=b.mx.x())|| @@ -682,235 +677,383 @@ return( (a.mi.x()!=b.mi.x())|| // DBVT_PREFIX inline void btDbvt::enumNodes( const btDbvtNode* root, - DBVT_IPOLICY) + DBVT_IPOLICY) { -DBVT_CHECKTYPE -policy.Process(root); -if(root->isinternal()) + DBVT_CHECKTYPE + policy.Process(root); + if(root->isinternal()) { - enumNodes(root->childs[0],policy); - enumNodes(root->childs[1],policy); + enumNodes(root->childs[0],policy); + enumNodes(root->childs[1],policy); } } // DBVT_PREFIX inline void btDbvt::enumLeaves( const btDbvtNode* root, - DBVT_IPOLICY) + DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root->isinternal()) - { - enumLeaves(root->childs[0],policy); - enumLeaves(root->childs[1],policy); - } - else - { - policy.Process(root); - } + DBVT_CHECKTYPE + if(root->isinternal()) + { + enumLeaves(root->childs[0],policy); + enumLeaves(root->childs[1],policy); + } + else + { + policy.Process(root); + } } // DBVT_PREFIX inline void btDbvt::collideTT( const btDbvtNode* root0, - const btDbvtNode* root1, - DBVT_IPOLICY) + const btDbvtNode* root1, + DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root0&&root1) - { - btAlignedObjectArray stack; - int depth=1; - int treshold=DOUBLE_STACKSIZE-4; - stack.resize(DOUBLE_STACKSIZE); - stack[0]=sStkNN(root0,root1); - do { - sStkNN p=stack[--depth]; - if(depth>treshold) - { - stack.resize(stack.size()*2); - treshold=stack.size()-4; - } - if(p.a==p.b) - { - if(p.a->isinternal()) + DBVT_CHECKTYPE + if(root0&&root1) + { + int depth=1; + int treshold=DOUBLE_STACKSIZE-4; + btAlignedObjectArray stkStack; + stkStack.resize(DOUBLE_STACKSIZE); + stkStack[0]=sStkNN(root0,root1); + do { + sStkNN p=stkStack[--depth]; + if(depth>treshold) { - stack[depth++]=sStkNN(p.a->childs[0],p.a->childs[0]); - stack[depth++]=sStkNN(p.a->childs[1],p.a->childs[1]); - stack[depth++]=sStkNN(p.a->childs[0],p.a->childs[1]); + stkStack.resize(stkStack.size()*2); + treshold=stkStack.size()-4; } - } - else if(Intersect(p.a->volume,p.b->volume)) - { - if(p.a->isinternal()) + if(p.a==p.b) { - if(p.b->isinternal()) + if(p.a->isinternal()) { - stack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]); - stack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]); - stack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]); - stack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]); + stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[0]); + stkStack[depth++]=sStkNN(p.a->childs[1],p.a->childs[1]); + stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[1]); + } + } + else if(Intersect(p.a->volume,p.b->volume)) + { + if(p.a->isinternal()) + { + if(p.b->isinternal()) + { + stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]); + stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]); + stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]); + stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]); + } + else + { + stkStack[depth++]=sStkNN(p.a->childs[0],p.b); + stkStack[depth++]=sStkNN(p.a->childs[1],p.b); + } } else { - stack[depth++]=sStkNN(p.a->childs[0],p.b); - stack[depth++]=sStkNN(p.a->childs[1],p.b); + if(p.b->isinternal()) + { + stkStack[depth++]=sStkNN(p.a,p.b->childs[0]); + stkStack[depth++]=sStkNN(p.a,p.b->childs[1]); + } + else + { + policy.Process(p.a,p.b); + } } } - else - { - if(p.b->isinternal()) - { - stack[depth++]=sStkNN(p.a,p.b->childs[0]); - stack[depth++]=sStkNN(p.a,p.b->childs[1]); - } - else - { - policy.Process(p.a,p.b); - } - } - } - } while(depth); - } + } while(depth); + } } + + +DBVT_PREFIX +inline void btDbvt::collideTTpersistentStack( const btDbvtNode* root0, + const btDbvtNode* root1, + DBVT_IPOLICY) +{ + DBVT_CHECKTYPE + if(root0&&root1) + { + int depth=1; + int treshold=DOUBLE_STACKSIZE-4; + + m_stkStack.resize(DOUBLE_STACKSIZE); + m_stkStack[0]=sStkNN(root0,root1); + do { + sStkNN p=m_stkStack[--depth]; + if(depth>treshold) + { + m_stkStack.resize(m_stkStack.size()*2); + treshold=m_stkStack.size()-4; + } + if(p.a==p.b) + { + if(p.a->isinternal()) + { + m_stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[0]); + m_stkStack[depth++]=sStkNN(p.a->childs[1],p.a->childs[1]); + m_stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[1]); + } + } + else if(Intersect(p.a->volume,p.b->volume)) + { + if(p.a->isinternal()) + { + if(p.b->isinternal()) + { + m_stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]); + m_stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]); + m_stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]); + m_stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]); + } + else + { + m_stkStack[depth++]=sStkNN(p.a->childs[0],p.b); + m_stkStack[depth++]=sStkNN(p.a->childs[1],p.b); + } + } + else + { + if(p.b->isinternal()) + { + m_stkStack[depth++]=sStkNN(p.a,p.b->childs[0]); + m_stkStack[depth++]=sStkNN(p.a,p.b->childs[1]); + } + else + { + policy.Process(p.a,p.b); + } + } + } + } while(depth); + } +} + +#if 0 // DBVT_PREFIX inline void btDbvt::collideTT( const btDbvtNode* root0, - const btDbvtNode* root1, - const btTransform& xform, - DBVT_IPOLICY) + const btDbvtNode* root1, + const btTransform& xform, + DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root0&&root1) - { - btAlignedObjectArray stack; - int depth=1; - int treshold=DOUBLE_STACKSIZE-4; - stack.resize(DOUBLE_STACKSIZE); - stack[0]=sStkNN(root0,root1); - do { - sStkNN p=stack[--depth]; - if(Intersect(p.a->volume,p.b->volume,xform)) - { - if(depth>treshold) + DBVT_CHECKTYPE + if(root0&&root1) + { + int depth=1; + int treshold=DOUBLE_STACKSIZE-4; + btAlignedObjectArray stkStack; + stkStack.resize(DOUBLE_STACKSIZE); + stkStack[0]=sStkNN(root0,root1); + do { + sStkNN p=stkStack[--depth]; + if(Intersect(p.a->volume,p.b->volume,xform)) { - stack.resize(stack.size()*2); - treshold=stack.size()-4; - } - if(p.a->isinternal()) - { - if(p.b->isinternal()) - { - stack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]); - stack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]); - stack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]); - stack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]); + if(depth>treshold) + { + stkStack.resize(stkStack.size()*2); + treshold=stkStack.size()-4; + } + if(p.a->isinternal()) + { + if(p.b->isinternal()) + { + stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]); + stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]); + stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]); + stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]); + } + else + { + stkStack[depth++]=sStkNN(p.a->childs[0],p.b); + stkStack[depth++]=sStkNN(p.a->childs[1],p.b); + } } else { - stack[depth++]=sStkNN(p.a->childs[0],p.b); - stack[depth++]=sStkNN(p.a->childs[1],p.b); + if(p.b->isinternal()) + { + stkStack[depth++]=sStkNN(p.a,p.b->childs[0]); + stkStack[depth++]=sStkNN(p.a,p.b->childs[1]); + } + else + { + policy.Process(p.a,p.b); + } } } - else - { - if(p.b->isinternal()) - { - stack[depth++]=sStkNN(p.a,p.b->childs[0]); - stack[depth++]=sStkNN(p.a,p.b->childs[1]); - } - else - { - policy.Process(p.a,p.b); - } - } - } - } while(depth); - } + } while(depth); + } } - // DBVT_PREFIX inline void btDbvt::collideTT( const btDbvtNode* root0, - const btTransform& xform0, - const btDbvtNode* root1, - const btTransform& xform1, - DBVT_IPOLICY) + const btTransform& xform0, + const btDbvtNode* root1, + const btTransform& xform1, + DBVT_IPOLICY) { -const btTransform xform=xform0.inverse()*xform1; -collideTT(root0,root1,xform,policy); + const btTransform xform=xform0.inverse()*xform1; + collideTT(root0,root1,xform,policy); } +#endif // DBVT_PREFIX inline void btDbvt::collideTV( const btDbvtNode* root, - const btDbvtVolume& vol, - DBVT_IPOLICY) + const btDbvtVolume& vol, + DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root) - { - ATTRIBUTE_ALIGNED16(btDbvtVolume) volume(vol); - btAlignedObjectArray stack; - stack.reserve(SIMPLE_STACKSIZE); - stack.push_back(root); - do { - const btDbvtNode* n=stack[stack.size()-1]; - stack.pop_back(); - if(Intersect(n->volume,volume)) - { - if(n->isinternal()) + DBVT_CHECKTYPE + if(root) + { + ATTRIBUTE_ALIGNED16(btDbvtVolume) volume(vol); + btAlignedObjectArray stack; + stack.resize(0); + stack.reserve(SIMPLE_STACKSIZE); + stack.push_back(root); + do { + const btDbvtNode* n=stack[stack.size()-1]; + stack.pop_back(); + if(Intersect(n->volume,volume)) { - stack.push_back(n->childs[0]); - stack.push_back(n->childs[1]); + if(n->isinternal()) + { + stack.push_back(n->childs[0]); + stack.push_back(n->childs[1]); + } + else + { + policy.Process(n); + } + } + } while(stack.size()>0); + } +} + +DBVT_PREFIX +inline void btDbvt::rayTestInternal( const btDbvtNode* root, + const btVector3& rayFrom, + const btVector3& rayTo, + const btVector3& rayDirectionInverse, + unsigned int signs[3], + btScalar lambda_max, + const btVector3& aabbMin, + const btVector3& aabbMax, + DBVT_IPOLICY) const +{ + DBVT_CHECKTYPE + if(root) + { + btVector3 resultNormal; + + int depth=1; + int treshold=DOUBLE_STACKSIZE-2; + btAlignedObjectArray stack; + stack.resize(DOUBLE_STACKSIZE); + stack[0]=root; + btVector3 bounds[2]; + do + { + const btDbvtNode* node=stack[--depth]; + bounds[0] = node->volume.Mins()+aabbMin; + bounds[1] = node->volume.Maxs()+aabbMax; + btScalar tmin=1.f,lambda_min=0.f; + unsigned int result1=false; + result1 = btRayAabb2(rayFrom,rayDirectionInverse,signs,bounds,tmin,lambda_min,lambda_max); + if(result1) + { + if(node->isinternal()) + { + if(depth>treshold) + { + stack.resize(stack.size()*2); + treshold=stack.size()-2; + } + stack[depth++]=node->childs[0]; + stack[depth++]=node->childs[1]; } else { - policy.Process(n); + policy.Process(node); } } - } while(stack.size()>0); + } while(depth); } } // DBVT_PREFIX -inline void btDbvt::collideRAY( const btDbvtNode* root, - const btVector3& origin, - const btVector3& direction, - DBVT_IPOLICY) +inline void btDbvt::rayTest( const btDbvtNode* root, + const btVector3& rayFrom, + const btVector3& rayTo, + DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root) - { - const btVector3 normal=direction.normalized(); - const btVector3 invdir( 1/normal.x(), - 1/normal.y(), - 1/normal.z()); - const unsigned signs[]={ direction.x()<0, - direction.y()<0, - direction.z()<0}; - btAlignedObjectArray stack; - stack.reserve(SIMPLE_STACKSIZE); - stack.push_back(root); - do { - const btDbvtNode* node=stack[stack.size()-1]; - stack.pop_back(); - if(Intersect(node->volume,origin,invdir,signs)) - { - if(node->isinternal()) + DBVT_CHECKTYPE + if(root) + { + btVector3 rayDir = (rayTo-rayFrom); + rayDir.normalize (); + + ///what about division by zero? --> just set rayDirection[i] to INF/1e30 + btVector3 rayDirectionInverse; + rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[0]; + rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[1]; + rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[2]; + unsigned int signs[3] = { rayDirectionInverse[0] < 0.0, rayDirectionInverse[1] < 0.0, rayDirectionInverse[2] < 0.0}; + + btScalar lambda_max = rayDir.dot(rayTo-rayFrom); + + btVector3 resultNormal; + + btAlignedObjectArray stack; + + int depth=1; + int treshold=DOUBLE_STACKSIZE-2; + + stack.resize(DOUBLE_STACKSIZE); + stack[0]=root; + btVector3 bounds[2]; + do { + const btDbvtNode* node=stack[--depth]; + + bounds[0] = node->volume.Mins(); + bounds[1] = node->volume.Maxs(); + + btScalar tmin=1.f,lambda_min=0.f; + unsigned int result1 = btRayAabb2(rayFrom,rayDirectionInverse,signs,bounds,tmin,lambda_min,lambda_max); + +#ifdef COMPARE_BTRAY_AABB2 + btScalar param=1.f; + bool result2 = btRayAabb(rayFrom,rayTo,node->volume.Mins(),node->volume.Maxs(),param,resultNormal); + btAssert(result1 == result2); +#endif //TEST_BTRAY_AABB2 + + if(result1) { - stack.push_back(node->childs[0]); - stack.push_back(node->childs[1]); + if(node->isinternal()) + { + if(depth>treshold) + { + stack.resize(stack.size()*2); + treshold=stack.size()-2; + } + stack[depth++]=node->childs[0]; + stack[depth++]=node->childs[1]; + } + else + { + policy.Process(node); + } } - else - { - policy.Process(node); - } - } - } while(stack.size()); - } + } while(depth); + + } } // @@ -921,174 +1064,174 @@ inline void btDbvt::collideKDOP(const btDbvtNode* root, int count, DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root) - { - const int inside=(1< stack; - int signs[sizeof(unsigned)*8]; - btAssert(count=0)?1:0)+ + const int inside=(1< stack; + int signs[sizeof(unsigned)*8]; + btAssert(count=0)?1:0)+ ((normals[i].y()>=0)?2:0)+ ((normals[i].z()>=0)?4:0); - } - stack.reserve(SIMPLE_STACKSIZE); - stack.push_back(sStkNP(root,0)); - do { - sStkNP se=stack[stack.size()-1]; - bool out=false; - stack.pop_back(); - for(int i=0,j=1;(!out)&&(ivolume.Classify(normals[i],offsets[i],signs[i]); - switch(side) - { - case -1: out=true;break; - case +1: se.mask|=j;break; - } - } } - if(!out) - { - if((se.mask!=inside)&&(se.node->isinternal())) + stack.reserve(SIMPLE_STACKSIZE); + stack.push_back(sStkNP(root,0)); + do { + sStkNP se=stack[stack.size()-1]; + bool out=false; + stack.pop_back(); + for(int i=0,j=1;(!out)&&(ichilds[0],se.mask)); - stack.push_back(sStkNP(se.node->childs[1],se.mask)); - } - else - { - if(policy.AllLeaves(se.node)) enumLeaves(se.node,policy); - } - } - } while(stack.size()); - } -} - -// -DBVT_PREFIX -inline void btDbvt::collideOCL( const btDbvtNode* root, - const btVector3* normals, - const btScalar* offsets, - const btVector3& sortaxis, - int count, - DBVT_IPOLICY, - bool fsort) -{ -DBVT_CHECKTYPE -if(root) - { - const unsigned srtsgns=(sortaxis[0]>=0?1:0)+ - (sortaxis[1]>=0?2:0)+ - (sortaxis[2]>=0?4:0); - const int inside=(1< stock; - btAlignedObjectArray ifree; - btAlignedObjectArray stack; - int signs[sizeof(unsigned)*8]; - btAssert(count=0)?1:0)+ - ((normals[i].y()>=0)?2:0)+ - ((normals[i].z()>=0)?4:0); - } - stock.reserve(SIMPLE_STACKSIZE); - stack.reserve(SIMPLE_STACKSIZE); - ifree.reserve(SIMPLE_STACKSIZE); - stack.push_back(allocate(ifree,stock,sStkNPS(root,0,root->volume.ProjectMinimum(sortaxis,srtsgns)))); - do { - const int id=stack[stack.size()-1]; - sStkNPS se=stock[id]; - stack.pop_back();ifree.push_back(id); - if(se.mask!=inside) - { - bool out=false; - for(int i=0,j=1;(!out)&&(ivolume.Classify(normals[i],offsets[i],signs[i]); - switch(side) + const int side=se.node->volume.Classify(normals[i],offsets[i],signs[i]); + switch(side) { case -1: out=true;break; case +1: se.mask|=j;break; } } } - if(out) continue; - } - if(policy.Descent(se.node)) - { - if(se.node->isinternal()) + if(!out) { - const btDbvtNode* pns[]={ se.node->childs[0],se.node->childs[1]}; - sStkNPS nes[]={ sStkNPS(pns[0],se.mask,pns[0]->volume.ProjectMinimum(sortaxis,srtsgns)), - sStkNPS(pns[1],se.mask,pns[1]->volume.ProjectMinimum(sortaxis,srtsgns))}; - const int q=nes[0].value0)) + if((se.mask!=inside)&&(se.node->isinternal())) { - /* Insert 0 */ - j=nearest(&stack[0],&stock[0],nes[q].value,0,stack.size()); - stack.push_back(0); - #if DBVT_USE_MEMMOVE - memmove(&stack[j+1],&stack[j],sizeof(int)*(stack.size()-j-1)); - #else - for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1]; - #endif - stack[j]=allocate(ifree,stock,nes[q]); - /* Insert 1 */ - j=nearest(&stack[0],&stock[0],nes[1-q].value,j,stack.size()); - stack.push_back(0); - #if DBVT_USE_MEMMOVE - memmove(&stack[j+1],&stack[j],sizeof(int)*(stack.size()-j-1)); - #else - for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1]; - #endif - stack[j]=allocate(ifree,stock,nes[1-q]); + stack.push_back(sStkNP(se.node->childs[0],se.mask)); + stack.push_back(sStkNP(se.node->childs[1],se.mask)); } else { - stack.push_back(allocate(ifree,stock,nes[q])); - stack.push_back(allocate(ifree,stock,nes[1-q])); + if(policy.AllLeaves(se.node)) enumLeaves(se.node,policy); } } - else - { - policy.Process(se.node,se.value); - } + } while(stack.size()); + } +} + +// +DBVT_PREFIX +inline void btDbvt::collideOCL( const btDbvtNode* root, + const btVector3* normals, + const btScalar* offsets, + const btVector3& sortaxis, + int count, + DBVT_IPOLICY, + bool fsort) +{ + DBVT_CHECKTYPE + if(root) + { + const unsigned srtsgns=(sortaxis[0]>=0?1:0)+ + (sortaxis[1]>=0?2:0)+ + (sortaxis[2]>=0?4:0); + const int inside=(1< stock; + btAlignedObjectArray ifree; + btAlignedObjectArray stack; + int signs[sizeof(unsigned)*8]; + btAssert(count=0)?1:0)+ + ((normals[i].y()>=0)?2:0)+ + ((normals[i].z()>=0)?4:0); } - } while(stack.size()); - } + stock.reserve(SIMPLE_STACKSIZE); + stack.reserve(SIMPLE_STACKSIZE); + ifree.reserve(SIMPLE_STACKSIZE); + stack.push_back(allocate(ifree,stock,sStkNPS(root,0,root->volume.ProjectMinimum(sortaxis,srtsgns)))); + do { + const int id=stack[stack.size()-1]; + sStkNPS se=stock[id]; + stack.pop_back();ifree.push_back(id); + if(se.mask!=inside) + { + bool out=false; + for(int i=0,j=1;(!out)&&(ivolume.Classify(normals[i],offsets[i],signs[i]); + switch(side) + { + case -1: out=true;break; + case +1: se.mask|=j;break; + } + } + } + if(out) continue; + } + if(policy.Descent(se.node)) + { + if(se.node->isinternal()) + { + const btDbvtNode* pns[]={ se.node->childs[0],se.node->childs[1]}; + sStkNPS nes[]={ sStkNPS(pns[0],se.mask,pns[0]->volume.ProjectMinimum(sortaxis,srtsgns)), + sStkNPS(pns[1],se.mask,pns[1]->volume.ProjectMinimum(sortaxis,srtsgns))}; + const int q=nes[0].value0)) + { + /* Insert 0 */ + j=nearest(&stack[0],&stock[0],nes[q].value,0,stack.size()); + stack.push_back(0); +#if DBVT_USE_MEMMOVE + memmove(&stack[j+1],&stack[j],sizeof(int)*(stack.size()-j-1)); +#else + for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1]; +#endif + stack[j]=allocate(ifree,stock,nes[q]); + /* Insert 1 */ + j=nearest(&stack[0],&stock[0],nes[1-q].value,j,stack.size()); + stack.push_back(0); +#if DBVT_USE_MEMMOVE + memmove(&stack[j+1],&stack[j],sizeof(int)*(stack.size()-j-1)); +#else + for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1]; +#endif + stack[j]=allocate(ifree,stock,nes[1-q]); + } + else + { + stack.push_back(allocate(ifree,stock,nes[q])); + stack.push_back(allocate(ifree,stock,nes[1-q])); + } + } + else + { + policy.Process(se.node,se.value); + } + } + } while(stack.size()); + } } // DBVT_PREFIX inline void btDbvt::collideTU( const btDbvtNode* root, - DBVT_IPOLICY) + DBVT_IPOLICY) { -DBVT_CHECKTYPE -if(root) - { - btAlignedObjectArray stack; - stack.reserve(SIMPLE_STACKSIZE); - stack.push_back(root); - do { - const btDbvtNode* n=stack[stack.size()-1]; - stack.pop_back(); - if(policy.Descent(n)) - { - if(n->isinternal()) - { stack.push_back(n->childs[0]);stack.push_back(n->childs[1]); } - else - { policy.Process(n); } - } - } while(stack.size()>0); - } + DBVT_CHECKTYPE + if(root) + { + btAlignedObjectArray stack; + stack.reserve(SIMPLE_STACKSIZE); + stack.push_back(root); + do { + const btDbvtNode* n=stack[stack.size()-1]; + stack.pop_back(); + if(policy.Descent(n)) + { + if(n->isinternal()) + { stack.push_back(n->childs[0]);stack.push_back(n->childs[1]); } + else + { policy.Process(n); } + } + } while(stack.size()>0); + } } // diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp index e00fc6aa5e3..f231717af17 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp @@ -26,19 +26,19 @@ subject to the following restrictions: #if DBVT_BP_PROFILE struct ProfileScope - { +{ __forceinline ProfileScope(btClock& clock,unsigned long& value) : - m_clock(&clock),m_value(&value),m_base(clock.getTimeMicroseconds()) - { - } + m_clock(&clock),m_value(&value),m_base(clock.getTimeMicroseconds()) + { + } __forceinline ~ProfileScope() - { + { (*m_value)+=m_clock->getTimeMicroseconds()-m_base; - } + } btClock* m_clock; unsigned long* m_value; unsigned long m_base; - }; +}; #define SPC(_value_) ProfileScope spc_scope(m_clock,_value_) #else #define SPC(_value_) @@ -52,35 +52,35 @@ struct ProfileScope template static inline void listappend(T* item,T*& list) { -item->links[0]=0; -item->links[1]=list; -if(list) list->links[0]=item; -list=item; + item->links[0]=0; + item->links[1]=list; + if(list) list->links[0]=item; + list=item; } // template static inline void listremove(T* item,T*& list) { -if(item->links[0]) item->links[0]->links[1]=item->links[1]; else list=item->links[1]; -if(item->links[1]) item->links[1]->links[0]=item->links[0]; + if(item->links[0]) item->links[0]->links[1]=item->links[1]; else list=item->links[1]; + if(item->links[1]) item->links[1]->links[0]=item->links[0]; } // template static inline int listcount(T* root) { -int n=0; -while(root) { ++n;root=root->links[1]; } -return(n); + int n=0; + while(root) { ++n;root=root->links[1]; } + return(n); } // template static inline void clear(T& value) { -static const struct ZeroDummy : T {} zerodummy; -value=zerodummy; + static const struct ZeroDummy : T {} zerodummy; + value=zerodummy; } // @@ -90,25 +90,26 @@ value=zerodummy; /* Tree collider */ struct btDbvtTreeCollider : btDbvt::ICollide { -btDbvtBroadphase* pbp; -btDbvtProxy* proxy; - btDbvtTreeCollider(btDbvtBroadphase* p) : pbp(p) {} -void Process(const btDbvtNode* na,const btDbvtNode* nb) + btDbvtBroadphase* pbp; + btDbvtProxy* proxy; + btDbvtTreeCollider(btDbvtBroadphase* p) : pbp(p) {} + void Process(const btDbvtNode* na,const btDbvtNode* nb) { - if(na!=nb) + if(na!=nb) { - btDbvtProxy* pa=(btDbvtProxy*)na->data; - btDbvtProxy* pb=(btDbvtProxy*)nb->data; - #if DBVT_BP_SORTPAIRS - if(pa>pb) btSwap(pa,pb); - #endif - pbp->m_paircache->addOverlappingPair(pa,pb); - ++pbp->m_newpairs; + btDbvtProxy* pa=(btDbvtProxy*)na->data; + btDbvtProxy* pb=(btDbvtProxy*)nb->data; +#if DBVT_BP_SORTPAIRS + if(pa->m_uniqueId>pb->m_uniqueId) + btSwap(pa,pb); +#endif + pbp->m_paircache->addOverlappingPair(pa,pb); + ++pbp->m_newpairs; } } -void Process(const btDbvtNode* n) + void Process(const btDbvtNode* n) { - Process(n,proxy->leaf); + Process(n,proxy->leaf); } }; @@ -119,147 +120,197 @@ void Process(const btDbvtNode* n) // btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache* paircache) { -m_deferedcollide = false; -m_needcleanup = true; -m_releasepaircache = (paircache!=0)?false:true; -m_prediction = 1/(btScalar)2; -m_stageCurrent = 0; -m_fixedleft = 0; -m_fupdates = 1; -m_dupdates = 0; -m_cupdates = 10; -m_newpairs = 1; -m_updates_call = 0; -m_updates_done = 0; -m_updates_ratio = 0; -m_paircache = paircache? - paircache : - new(btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache(); -m_gid = 0; -m_pid = 0; -m_cid = 0; -for(int i=0;i<=STAGECOUNT;++i) + m_deferedcollide = false; + m_needcleanup = true; + m_releasepaircache = (paircache!=0)?false:true; + m_prediction = 1/(btScalar)2; + m_stageCurrent = 0; + m_fixedleft = 0; + m_fupdates = 1; + m_dupdates = 0; + m_cupdates = 10; + m_newpairs = 1; + m_updates_call = 0; + m_updates_done = 0; + m_updates_ratio = 0; + m_paircache = paircache? paircache : new(btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache(); + m_gid = 0; + m_pid = 0; + m_cid = 0; + for(int i=0;i<=STAGECOUNT;++i) { - m_stageRoots[i]=0; + m_stageRoots[i]=0; } #if DBVT_BP_PROFILE -clear(m_profiling); + clear(m_profiling); #endif } // btDbvtBroadphase::~btDbvtBroadphase() { -if(m_releasepaircache) -{ - m_paircache->~btOverlappingPairCache(); - btAlignedFree(m_paircache); -} + if(m_releasepaircache) + { + m_paircache->~btOverlappingPairCache(); + btAlignedFree(m_paircache); + } } // btBroadphaseProxy* btDbvtBroadphase::createProxy( const btVector3& aabbMin, - const btVector3& aabbMax, - int /*shapeType*/, - void* userPtr, - short int collisionFilterGroup, - short int collisionFilterMask, - btDispatcher* /*dispatcher*/, - void* /*multiSapProxy*/) + const btVector3& aabbMax, + int /*shapeType*/, + void* userPtr, + short int collisionFilterGroup, + short int collisionFilterMask, + btDispatcher* /*dispatcher*/, + void* /*multiSapProxy*/) { -btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( userPtr, - collisionFilterGroup, - collisionFilterMask); -proxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax); -proxy->stage = m_stageCurrent; -proxy->m_uniqueId = ++m_gid; -proxy->leaf = m_sets[0].insert(proxy->aabb,proxy); -listappend(proxy,m_stageRoots[m_stageCurrent]); -if(!m_deferedcollide) + btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( aabbMin,aabbMax,userPtr, + collisionFilterGroup, + collisionFilterMask); + + btDbvtAabbMm aabb = btDbvtVolume::FromMM(aabbMin,aabbMax); + + //bproxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax); + proxy->stage = m_stageCurrent; + proxy->m_uniqueId = ++m_gid; + proxy->leaf = m_sets[0].insert(aabb,proxy); + listappend(proxy,m_stageRoots[m_stageCurrent]); + if(!m_deferedcollide) { - btDbvtTreeCollider collider(this); - collider.proxy=proxy; - btDbvt::collideTV(m_sets[0].m_root,proxy->aabb,collider); - btDbvt::collideTV(m_sets[1].m_root,proxy->aabb,collider); + btDbvtTreeCollider collider(this); + collider.proxy=proxy; + m_sets[0].collideTV(m_sets[0].m_root,aabb,collider); + m_sets[1].collideTV(m_sets[1].m_root,aabb,collider); } -return(proxy); + return(proxy); } // void btDbvtBroadphase::destroyProxy( btBroadphaseProxy* absproxy, - btDispatcher* dispatcher) + btDispatcher* dispatcher) { -btDbvtProxy* proxy=(btDbvtProxy*)absproxy; -if(proxy->stage==STAGECOUNT) - m_sets[1].remove(proxy->leaf); + btDbvtProxy* proxy=(btDbvtProxy*)absproxy; + if(proxy->stage==STAGECOUNT) + m_sets[1].remove(proxy->leaf); else - m_sets[0].remove(proxy->leaf); -listremove(proxy,m_stageRoots[proxy->stage]); -m_paircache->removeOverlappingPairsContainingProxy(proxy,dispatcher); -btAlignedFree(proxy); -m_needcleanup=true; + m_sets[0].remove(proxy->leaf); + listremove(proxy,m_stageRoots[proxy->stage]); + m_paircache->removeOverlappingPairsContainingProxy(proxy,dispatcher); + btAlignedFree(proxy); + m_needcleanup=true; +} + +void btDbvtBroadphase::getAabb(btBroadphaseProxy* absproxy,btVector3& aabbMin, btVector3& aabbMax ) const +{ + btDbvtProxy* proxy=(btDbvtProxy*)absproxy; + aabbMin = proxy->m_aabbMin; + aabbMax = proxy->m_aabbMax; +} + +struct BroadphaseRayTester : btDbvt::ICollide +{ + btBroadphaseRayCallback& m_rayCallback; + BroadphaseRayTester(btBroadphaseRayCallback& orgCallback) + :m_rayCallback(orgCallback) + { + } + void Process(const btDbvtNode* leaf) + { + btDbvtProxy* proxy=(btDbvtProxy*)leaf->data; + m_rayCallback.process(proxy); + } +}; + +void btDbvtBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax) +{ + BroadphaseRayTester callback(rayCallback); + + m_sets[0].rayTestInternal( m_sets[0].m_root, + rayFrom, + rayTo, + rayCallback.m_rayDirectionInverse, + rayCallback.m_signs, + rayCallback.m_lambda_max, + aabbMin, + aabbMax, + callback); + + m_sets[1].rayTestInternal( m_sets[1].m_root, + rayFrom, + rayTo, + rayCallback.m_rayDirectionInverse, + rayCallback.m_signs, + rayCallback.m_lambda_max, + aabbMin, + aabbMax, + callback); + } // void btDbvtBroadphase::setAabb( btBroadphaseProxy* absproxy, - const btVector3& aabbMin, - const btVector3& aabbMax, - btDispatcher* /*dispatcher*/) + const btVector3& aabbMin, + const btVector3& aabbMax, + btDispatcher* /*dispatcher*/) { -btDbvtProxy* proxy=(btDbvtProxy*)absproxy; -ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax); + btDbvtProxy* proxy=(btDbvtProxy*)absproxy; + ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax); #if DBVT_BP_PREVENTFALSEUPDATE -if(NotEqual(aabb,proxy->leaf->volume)) + if(NotEqual(aabb,proxy->leaf->volume)) #endif { - bool docollide=false; - if(proxy->stage==STAGECOUNT) + bool docollide=false; + if(proxy->stage==STAGECOUNT) {/* fixed -> dynamic set */ - m_sets[1].remove(proxy->leaf); - proxy->leaf=m_sets[0].insert(aabb,proxy); - docollide=true; + m_sets[1].remove(proxy->leaf); + proxy->leaf=m_sets[0].insert(aabb,proxy); + docollide=true; } else {/* dynamic set */ - ++m_updates_call; - if(Intersect(proxy->leaf->volume,aabb)) + ++m_updates_call; + if(Intersect(proxy->leaf->volume,aabb)) {/* Moving */ - const btVector3 delta=aabbMin-proxy->aabb.Mins(); - btVector3 velocity(aabb.Extents()*m_prediction); - if(delta[0]<0) velocity[0]=-velocity[0]; - if(delta[1]<0) velocity[1]=-velocity[1]; - if(delta[2]<0) velocity[2]=-velocity[2]; - if ( - #ifdef DBVT_BP_MARGIN - m_sets[0].update(proxy->leaf,aabb,velocity,DBVT_BP_MARGIN) - #else - m_sets[0].update(proxy->leaf,aabb,velocity) - #endif - ) + + const btVector3 delta=aabbMin-proxy->m_aabbMin; + btVector3 velocity(((proxy->m_aabbMax-proxy->m_aabbMin)/2)*m_prediction); + if(delta[0]<0) velocity[0]=-velocity[0]; + if(delta[1]<0) velocity[1]=-velocity[1]; + if(delta[2]<0) velocity[2]=-velocity[2]; + if ( +#ifdef DBVT_BP_MARGIN + m_sets[0].update(proxy->leaf,aabb,velocity,DBVT_BP_MARGIN) +#else + m_sets[0].update(proxy->leaf,aabb,velocity) +#endif + ) { - ++m_updates_done; - docollide=true; + ++m_updates_done; + docollide=true; } } else {/* Teleporting */ - m_sets[0].update(proxy->leaf,aabb); - ++m_updates_done; - docollide=true; + m_sets[0].update(proxy->leaf,aabb); + ++m_updates_done; + docollide=true; } } - listremove(proxy,m_stageRoots[proxy->stage]); - proxy->aabb = aabb; - proxy->stage = m_stageCurrent; - listappend(proxy,m_stageRoots[m_stageCurrent]); - if(docollide) + listremove(proxy,m_stageRoots[proxy->stage]); + proxy->m_aabbMin = aabbMin; + proxy->m_aabbMax = aabbMax; + proxy->stage = m_stageCurrent; + listappend(proxy,m_stageRoots[m_stageCurrent]); + if(docollide) { - m_needcleanup=true; - if(!m_deferedcollide) + m_needcleanup=true; + if(!m_deferedcollide) { - btDbvtTreeCollider collider(this); - btDbvt::collideTT(m_sets[1].m_root,proxy->leaf,collider); - btDbvt::collideTT(m_sets[0].m_root,proxy->leaf,collider); + btDbvtTreeCollider collider(this); + m_sets[1].collideTTpersistentStack(m_sets[1].m_root,proxy->leaf,collider); + m_sets[0].collideTTpersistentStack(m_sets[0].m_root,proxy->leaf,collider); } } } @@ -268,132 +319,226 @@ if(NotEqual(aabb,proxy->leaf->volume)) // void btDbvtBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) { -collide(dispatcher); + collide(dispatcher); #if DBVT_BP_PROFILE -if(0==(m_pid%DBVT_BP_PROFILING_RATE)) + if(0==(m_pid%DBVT_BP_PROFILING_RATE)) { - printf("fixed(%u) dynamics(%u) pairs(%u)\r\n",m_sets[1].m_leaves,m_sets[0].m_leaves,m_paircache->getNumOverlappingPairs()); - unsigned int total=m_profiling.m_total; - if(total<=0) total=1; - printf("ddcollide: %u%% (%uus)\r\n",(50+m_profiling.m_ddcollide*100)/total,m_profiling.m_ddcollide/DBVT_BP_PROFILING_RATE); - printf("fdcollide: %u%% (%uus)\r\n",(50+m_profiling.m_fdcollide*100)/total,m_profiling.m_fdcollide/DBVT_BP_PROFILING_RATE); - printf("cleanup: %u%% (%uus)\r\n",(50+m_profiling.m_cleanup*100)/total,m_profiling.m_cleanup/DBVT_BP_PROFILING_RATE); - printf("total: %uus\r\n",total/DBVT_BP_PROFILING_RATE); - const unsigned long sum=m_profiling.m_ddcollide+ - m_profiling.m_fdcollide+ - m_profiling.m_cleanup; - printf("leaked: %u%% (%uus)\r\n",100-((50+sum*100)/total),(total-sum)/DBVT_BP_PROFILING_RATE); - printf("job counts: %u%%\r\n",(m_profiling.m_jobcount*100)/((m_sets[0].m_leaves+m_sets[1].m_leaves)*DBVT_BP_PROFILING_RATE)); - clear(m_profiling); - m_clock.reset(); + printf("fixed(%u) dynamics(%u) pairs(%u)\r\n",m_sets[1].m_leaves,m_sets[0].m_leaves,m_paircache->getNumOverlappingPairs()); + unsigned int total=m_profiling.m_total; + if(total<=0) total=1; + printf("ddcollide: %u%% (%uus)\r\n",(50+m_profiling.m_ddcollide*100)/total,m_profiling.m_ddcollide/DBVT_BP_PROFILING_RATE); + printf("fdcollide: %u%% (%uus)\r\n",(50+m_profiling.m_fdcollide*100)/total,m_profiling.m_fdcollide/DBVT_BP_PROFILING_RATE); + printf("cleanup: %u%% (%uus)\r\n",(50+m_profiling.m_cleanup*100)/total,m_profiling.m_cleanup/DBVT_BP_PROFILING_RATE); + printf("total: %uus\r\n",total/DBVT_BP_PROFILING_RATE); + const unsigned long sum=m_profiling.m_ddcollide+ + m_profiling.m_fdcollide+ + m_profiling.m_cleanup; + printf("leaked: %u%% (%uus)\r\n",100-((50+sum*100)/total),(total-sum)/DBVT_BP_PROFILING_RATE); + printf("job counts: %u%%\r\n",(m_profiling.m_jobcount*100)/((m_sets[0].m_leaves+m_sets[1].m_leaves)*DBVT_BP_PROFILING_RATE)); + clear(m_profiling); + m_clock.reset(); } #endif + + performDeferredRemoval(dispatcher); + +} + +void btDbvtBroadphase::performDeferredRemoval(btDispatcher* dispatcher) +{ + + if (m_paircache->hasDeferredRemoval()) + { + + btBroadphasePairArray& overlappingPairArray = m_paircache->getOverlappingPairArray(); + + //perform a sort, to find duplicates and to sort 'invalid' pairs to the end + overlappingPairArray.quickSort(btBroadphasePairSortPredicate()); + + int invalidPair = 0; + + + int i; + + btBroadphasePair previousPair; + previousPair.m_pProxy0 = 0; + previousPair.m_pProxy1 = 0; + previousPair.m_algorithm = 0; + + + for (i=0;ileaf->volume,pb->leaf->volume); + + if (hasOverlap) + { + needsRemoval = false; + } else + { + needsRemoval = true; + } + } else + { + //remove duplicate + needsRemoval = true; + //should have no algorithm + btAssert(!pair.m_algorithm); + } + + if (needsRemoval) + { + m_paircache->cleanOverlappingPair(pair,dispatcher); + + pair.m_pProxy0 = 0; + pair.m_pProxy1 = 0; + invalidPair++; + } + + } + + //perform a sort, to sort 'invalid' pairs to the end + overlappingPairArray.quickSort(btBroadphasePairSortPredicate()); + overlappingPairArray.resize(overlappingPairArray.size() - invalidPair); + } } // void btDbvtBroadphase::collide(btDispatcher* dispatcher) { -SPC(m_profiling.m_total); -/* optimize */ -m_sets[0].optimizeIncremental(1+(m_sets[0].m_leaves*m_dupdates)/100); -if(m_fixedleft) + /*printf("---------------------------------------------------------\n"); + printf("m_sets[0].m_leaves=%d\n",m_sets[0].m_leaves); + printf("m_sets[1].m_leaves=%d\n",m_sets[1].m_leaves); + printf("numPairs = %d\n",getOverlappingPairCache()->getNumOverlappingPairs()); { - const int count=1+(m_sets[1].m_leaves*m_fupdates)/100; - m_sets[1].optimizeIncremental(1+(m_sets[1].m_leaves*m_fupdates)/100); - m_fixedleft=btMax(0,m_fixedleft-count); + int i; + for (i=0;igetNumOverlappingPairs();i++) + { + printf("pair[%d]=(%d,%d),",i,getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy0->getUid(), + getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy1->getUid()); + } + printf("\n"); } -/* dynamic -> fixed set */ -m_stageCurrent=(m_stageCurrent+1)%STAGECOUNT; -btDbvtProxy* current=m_stageRoots[m_stageCurrent]; -if(current) +*/ + + + + SPC(m_profiling.m_total); + /* optimize */ + m_sets[0].optimizeIncremental(1+(m_sets[0].m_leaves*m_dupdates)/100); + if(m_fixedleft) { - btDbvtTreeCollider collider(this); - do { - btDbvtProxy* next=current->links[1]; - listremove(current,m_stageRoots[current->stage]); - listappend(current,m_stageRoots[STAGECOUNT]); - #if DBVT_BP_ACCURATESLEEPING - m_paircache->removeOverlappingPairsContainingProxy(current,dispatcher); - collider.proxy=current; - btDbvt::collideTV(m_sets[0].m_root,current->aabb,collider); - btDbvt::collideTV(m_sets[1].m_root,current->aabb,collider); - #endif - m_sets[0].remove(current->leaf); - current->leaf = m_sets[1].insert(current->aabb,current); - current->stage = STAGECOUNT; - current = next; + const int count=1+(m_sets[1].m_leaves*m_fupdates)/100; + m_sets[1].optimizeIncremental(1+(m_sets[1].m_leaves*m_fupdates)/100); + m_fixedleft=btMax(0,m_fixedleft-count); + } + /* dynamic -> fixed set */ + m_stageCurrent=(m_stageCurrent+1)%STAGECOUNT; + btDbvtProxy* current=m_stageRoots[m_stageCurrent]; + if(current) + { + btDbvtTreeCollider collider(this); + do { + btDbvtProxy* next=current->links[1]; + listremove(current,m_stageRoots[current->stage]); + listappend(current,m_stageRoots[STAGECOUNT]); +#if DBVT_BP_ACCURATESLEEPING + m_paircache->removeOverlappingPairsContainingProxy(current,dispatcher); + collider.proxy=current; + btDbvt::collideTV(m_sets[0].m_root,current->aabb,collider); + btDbvt::collideTV(m_sets[1].m_root,current->aabb,collider); +#endif + m_sets[0].remove(current->leaf); + ATTRIBUTE_ALIGNED16(btDbvtVolume) curAabb=btDbvtVolume::FromMM(current->m_aabbMin,current->m_aabbMax); + current->leaf = m_sets[1].insert(curAabb,current); + current->stage = STAGECOUNT; + current = next; } while(current); - m_fixedleft=m_sets[1].m_leaves; - m_needcleanup=true; + m_fixedleft=m_sets[1].m_leaves; + m_needcleanup=true; } -/* collide dynamics */ + /* collide dynamics */ { - btDbvtTreeCollider collider(this); - if(m_deferedcollide) + btDbvtTreeCollider collider(this); + if(m_deferedcollide) { - SPC(m_profiling.m_fdcollide); - btDbvt::collideTT(m_sets[0].m_root,m_sets[1].m_root,collider); + SPC(m_profiling.m_fdcollide); + m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[1].m_root,collider); } - if(m_deferedcollide) + if(m_deferedcollide) { - SPC(m_profiling.m_ddcollide); - btDbvt::collideTT(m_sets[0].m_root,m_sets[0].m_root,collider); + SPC(m_profiling.m_ddcollide); + m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[0].m_root,collider); } } -/* clean up */ -if(m_needcleanup) + /* clean up */ + if(m_needcleanup) { - SPC(m_profiling.m_cleanup); - btBroadphasePairArray& pairs=m_paircache->getOverlappingPairArray(); - if(pairs.size()>0) + SPC(m_profiling.m_cleanup); + btBroadphasePairArray& pairs=m_paircache->getOverlappingPairArray(); + if(pairs.size()>0) { - const int ci=pairs.size(); - int ni=btMin(ci,btMax(m_newpairs,(ci*m_cupdates)/100)); - for(int i=0;i(m_newpairs,(pairs.size()*m_cupdates)/100)); + for(int i=0;ileaf->volume,pb->leaf->volume)) + btBroadphasePair& p=pairs[(m_cid+i)%pairs.size()]; + btDbvtProxy* pa=(btDbvtProxy*)p.m_pProxy0; + btDbvtProxy* pb=(btDbvtProxy*)p.m_pProxy1; + if(!Intersect(pa->leaf->volume,pb->leaf->volume)) { - #if DBVT_BP_SORTPAIRS - if(pa>pb) btSwap(pa,pb); - #endif - m_paircache->removeOverlappingPair(pa,pb,dispatcher); - --ni;--i; +#if DBVT_BP_SORTPAIRS + if(pa->m_uniqueId>pb->m_uniqueId) + btSwap(pa,pb); +#endif + m_paircache->removeOverlappingPair(pa,pb,dispatcher); + --ni;--i; } } - if(pairs.size()>0) m_cid=(m_cid+ni)%pairs.size(); else m_cid=0; + if(pairs.size()>0) m_cid=(m_cid+ni)%pairs.size(); else m_cid=0; } } -++m_pid; -m_newpairs=1; -m_needcleanup=false; -if(m_updates_call>0) + ++m_pid; + m_newpairs=1; + m_needcleanup=false; + if(m_updates_call>0) { m_updates_ratio=m_updates_done/(btScalar)m_updates_call; } else { m_updates_ratio=0; } -m_updates_done/=2; -m_updates_call/=2; + m_updates_done/=2; + m_updates_call/=2; } // void btDbvtBroadphase::optimize() { -m_sets[0].optimizeTopDown(); -m_sets[1].optimizeTopDown(); + m_sets[0].optimizeTopDown(); + m_sets[1].optimizeTopDown(); } // btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache() { -return(m_paircache); + return(m_paircache); } // const btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache() const { -return(m_paircache); + return(m_paircache); } // @@ -402,16 +547,49 @@ void btDbvtBroadphase::getBroadphaseAabb(btVector3& aabbMin,btVector3& aab ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds; -if(!m_sets[0].empty()) - if(!m_sets[1].empty()) Merge( m_sets[0].m_root->volume, - m_sets[1].m_root->volume,bounds); - else - bounds=m_sets[0].m_root->volume; -else if(!m_sets[1].empty()) bounds=m_sets[1].m_root->volume; - else - bounds=btDbvtVolume::FromCR(btVector3(0,0,0),0); -aabbMin=bounds.Mins(); -aabbMax=bounds.Maxs(); + if(!m_sets[0].empty()) + if(!m_sets[1].empty()) Merge( m_sets[0].m_root->volume, + m_sets[1].m_root->volume,bounds); + else + bounds=m_sets[0].m_root->volume; + else if(!m_sets[1].empty()) bounds=m_sets[1].m_root->volume; + else + bounds=btDbvtVolume::FromCR(btVector3(0,0,0),0); + aabbMin=bounds.Mins(); + aabbMax=bounds.Maxs(); +} + +void btDbvtBroadphase::resetPool(btDispatcher* dispatcher) +{ + + int totalObjects = m_sets[0].m_leaves + m_sets[1].m_leaves; + if (!totalObjects) + { + //reset internal dynamic tree data structures + m_sets[0].clear(); + m_sets[1].clear(); + + m_deferedcollide = false; + m_needcleanup = true; + m_prediction = 1/(btScalar)2; + m_stageCurrent = 0; + m_fixedleft = 0; + m_fupdates = 1; + m_dupdates = 0; + m_cupdates = 10; + m_newpairs = 1; + m_updates_call = 0; + m_updates_done = 0; + m_updates_ratio = 0; + + m_gid = 0; + m_pid = 0; + m_cid = 0; + for(int i=0;i<=STAGECOUNT;++i) + { + m_stageRoots[i]=0; + } + } } // @@ -422,9 +600,9 @@ void btDbvtBroadphase::printStats() #if DBVT_BP_ENABLE_BENCHMARK struct btBroadphaseBenchmark - { +{ struct Experiment - { + { const char* name; int object_count; int update_count; @@ -432,109 +610,109 @@ struct btBroadphaseBenchmark int iterations; btScalar speed; btScalar amplitude; - }; + }; struct Object - { + { btVector3 center; btVector3 extents; btBroadphaseProxy* proxy; btScalar time; void update(btScalar speed,btScalar amplitude,btBroadphaseInterface* pbi) - { + { time += speed; center[0] = btCos(time*(btScalar)2.17)*amplitude+ - btSin(time)*amplitude/2; + btSin(time)*amplitude/2; center[1] = btCos(time*(btScalar)1.38)*amplitude+ - btSin(time)*amplitude; + btSin(time)*amplitude; center[2] = btSin(time*(btScalar)0.777)*amplitude; pbi->setAabb(proxy,center-extents,center+extents,0); - } - }; + } + }; static int UnsignedRand(int range=RAND_MAX-1) { return(rand()%(range+1)); } static btScalar UnitRand() { return(UnsignedRand(16384)/(btScalar)16384); } static void OutputTime(const char* name,btClock& c,unsigned count=0) - { + { const unsigned long us=c.getTimeMicroseconds(); const unsigned long ms=(us+500)/1000; const btScalar sec=us/(btScalar)(1000*1000); if(count>0) printf("%s : %u us (%u ms), %.2f/s\r\n",name,us,ms,count/sec); - else + else printf("%s : %u us (%u ms)\r\n",name,us,ms); - } - }; + } +}; void btDbvtBroadphase::benchmark(btBroadphaseInterface* pbi) { -static const btBroadphaseBenchmark::Experiment experiments[]= + static const btBroadphaseBenchmark::Experiment experiments[]= { - {"1024o.10%",1024,10,0,8192,(btScalar)0.005,(btScalar)100}, - /*{"4096o.10%",4096,10,0,8192,(btScalar)0.005,(btScalar)100}, - {"8192o.10%",8192,10,0,8192,(btScalar)0.005,(btScalar)100},*/ + {"1024o.10%",1024,10,0,8192,(btScalar)0.005,(btScalar)100}, + /*{"4096o.10%",4096,10,0,8192,(btScalar)0.005,(btScalar)100}, + {"8192o.10%",8192,10,0,8192,(btScalar)0.005,(btScalar)100},*/ }; -static const int nexperiments=sizeof(experiments)/sizeof(experiments[0]); -btAlignedObjectArray objects; -btClock wallclock; -/* Begin */ -for(int iexp=0;iexp objects; + btClock wallclock; + /* Begin */ + for(int iexp=0;iexpcenter[0]=btBroadphaseBenchmark::UnitRand()*50; - po->center[1]=btBroadphaseBenchmark::UnitRand()*50; - po->center[2]=btBroadphaseBenchmark::UnitRand()*50; - po->extents[0]=btBroadphaseBenchmark::UnitRand()*2+2; - po->extents[1]=btBroadphaseBenchmark::UnitRand()*2+2; - po->extents[2]=btBroadphaseBenchmark::UnitRand()*2+2; - po->time=btBroadphaseBenchmark::UnitRand()*2000; - po->proxy=pbi->createProxy(po->center-po->extents,po->center+po->extents,0,po,1,1,0,0); - objects.push_back(po); + btBroadphaseBenchmark::Object* po=new btBroadphaseBenchmark::Object(); + po->center[0]=btBroadphaseBenchmark::UnitRand()*50; + po->center[1]=btBroadphaseBenchmark::UnitRand()*50; + po->center[2]=btBroadphaseBenchmark::UnitRand()*50; + po->extents[0]=btBroadphaseBenchmark::UnitRand()*2+2; + po->extents[1]=btBroadphaseBenchmark::UnitRand()*2+2; + po->extents[2]=btBroadphaseBenchmark::UnitRand()*2+2; + po->time=btBroadphaseBenchmark::UnitRand()*2000; + po->proxy=pbi->createProxy(po->center-po->extents,po->center+po->extents,0,po,1,1,0,0); + objects.push_back(po); } - btBroadphaseBenchmark::OutputTime("\tInitialization",wallclock); - /* First update */ - wallclock.reset(); - for(int i=0;iupdate(speed,amplitude,pbi); + objects[i]->update(speed,amplitude,pbi); } - btBroadphaseBenchmark::OutputTime("\tFirst update",wallclock); - /* Updates */ - wallclock.reset(); - for(int i=0;iupdate(speed,amplitude,pbi); + objects[j]->update(speed,amplitude,pbi); } - pbi->calculateOverlappingPairs(0); + pbi->calculateOverlappingPairs(0); } - btBroadphaseBenchmark::OutputTime("\tUpdate",wallclock,experiment.iterations); - /* Clean up */ - wallclock.reset(); - for(int i=0;idestroyProxy(objects[i]->proxy,0); - delete objects[i]; + pbi->destroyProxy(objects[i]->proxy,0); + delete objects[i]; } - objects.resize(0); - btBroadphaseBenchmark::OutputTime("\tRelease",wallclock); + objects.resize(0); + btBroadphaseBenchmark::OutputTime("\tRelease",wallclock); } } @@ -546,3 +724,4 @@ void btDbvtBroadphase::benchmark(btBroadphaseInterface*) #if DBVT_BP_PROFILE #undef SPC #endif + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h index 1f16043a7a8..fe70bc39c43 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h @@ -24,15 +24,15 @@ subject to the following restrictions: // #define DBVT_BP_PROFILE 0 -#define DBVT_BP_SORTPAIRS 1 +//#define DBVT_BP_SORTPAIRS 1 #define DBVT_BP_PREVENTFALSEUPDATE 0 #define DBVT_BP_ACCURATESLEEPING 0 #define DBVT_BP_ENABLE_BENCHMARK 0 #define DBVT_BP_MARGIN (btScalar)0.05 #if DBVT_BP_PROFILE - #define DBVT_BP_PROFILING_RATE 256 - #include "LinearMath/btQuickprof.h" +#define DBVT_BP_PROFILING_RATE 256 +#include "LinearMath/btQuickprof.h" #endif // @@ -40,16 +40,16 @@ subject to the following restrictions: // struct btDbvtProxy : btBroadphaseProxy { -/* Fields */ -btDbvtAabbMm aabb; -btDbvtNode* leaf; -btDbvtProxy* links[2]; -int stage; -/* ctor */ -btDbvtProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) : - btBroadphaseProxy(userPtr,collisionFilterGroup,collisionFilterMask) + /* Fields */ + //btDbvtAabbMm aabb; + btDbvtNode* leaf; + btDbvtProxy* links[2]; + int stage; + /* ctor */ + btDbvtProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) : + btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask) { - links[0]=links[1]=0; + links[0]=links[1]=0; } }; @@ -60,57 +60,67 @@ typedef btAlignedObjectArray btDbvtProxyArray; ///This is a very fast broadphase, especially for very dynamic worlds where many objects are moving. Its insert/add and remove of objects is generally faster than the sweep and prune broadphases btAxisSweep3 and bt32BitAxisSweep3. struct btDbvtBroadphase : btBroadphaseInterface { -/* Config */ -enum { + /* Config */ + enum { DYNAMIC_SET = 0, /* Dynamic set index */ FIXED_SET = 1, /* Fixed set index */ STAGECOUNT = 2 /* Number of stages */ - }; -/* Fields */ -btDbvt m_sets[2]; // Dbvt sets -btDbvtProxy* m_stageRoots[STAGECOUNT+1]; // Stages list -btOverlappingPairCache* m_paircache; // Pair cache -btScalar m_prediction; // Velocity prediction -int m_stageCurrent; // Current stage -int m_fupdates; // % of fixed updates per frame -int m_dupdates; // % of dynamic updates per frame -int m_cupdates; // % of cleanup updates per frame -int m_newpairs; // Number of pairs created -int m_fixedleft; // Fixed optimization left -unsigned m_updates_call; // Number of updates call -unsigned m_updates_done; // Number of updates done -btScalar m_updates_ratio; // m_updates_done/m_updates_call -int m_pid; // Parse id -int m_cid; // Cleanup index -int m_gid; // Gen id -bool m_releasepaircache; // Release pair cache on delete -bool m_deferedcollide; // Defere dynamic/static collision to collide call -bool m_needcleanup; // Need to run cleanup? + }; + /* Fields */ + btDbvt m_sets[2]; // Dbvt sets + btDbvtProxy* m_stageRoots[STAGECOUNT+1]; // Stages list + btOverlappingPairCache* m_paircache; // Pair cache + btScalar m_prediction; // Velocity prediction + int m_stageCurrent; // Current stage + int m_fupdates; // % of fixed updates per frame + int m_dupdates; // % of dynamic updates per frame + int m_cupdates; // % of cleanup updates per frame + int m_newpairs; // Number of pairs created + int m_fixedleft; // Fixed optimization left + unsigned m_updates_call; // Number of updates call + unsigned m_updates_done; // Number of updates done + btScalar m_updates_ratio; // m_updates_done/m_updates_call + int m_pid; // Parse id + int m_cid; // Cleanup index + int m_gid; // Gen id + bool m_releasepaircache; // Release pair cache on delete + bool m_deferedcollide; // Defere dynamic/static collision to collide call + bool m_needcleanup; // Need to run cleanup? #if DBVT_BP_PROFILE -btClock m_clock; -struct { + btClock m_clock; + struct { unsigned long m_total; unsigned long m_ddcollide; unsigned long m_fdcollide; unsigned long m_cleanup; unsigned long m_jobcount; - } m_profiling; + } m_profiling; #endif -/* Methods */ -btDbvtBroadphase(btOverlappingPairCache* paircache=0); -~btDbvtBroadphase(); -void collide(btDispatcher* dispatcher); -void optimize(); -/* btBroadphaseInterface Implementation */ -btBroadphaseProxy* createProxy(const btVector3& aabbMin,const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy); -void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); -void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher); -void calculateOverlappingPairs(btDispatcher* dispatcher); -btOverlappingPairCache* getOverlappingPairCache(); -const btOverlappingPairCache* getOverlappingPairCache() const; -void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const; -void printStats(); -static void benchmark(btBroadphaseInterface*); + /* Methods */ + btDbvtBroadphase(btOverlappingPairCache* paircache=0); + ~btDbvtBroadphase(); + void collide(btDispatcher* dispatcher); + void optimize(); + /* btBroadphaseInterface Implementation */ + btBroadphaseProxy* createProxy(const btVector3& aabbMin,const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy); + void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); + void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher); + virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0)); + + virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const; + void calculateOverlappingPairs(btDispatcher* dispatcher); + btOverlappingPairCache* getOverlappingPairCache(); + const btOverlappingPairCache* getOverlappingPairCache() const; + void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const; + void printStats(); + static void benchmark(btBroadphaseInterface*); + + + void performDeferredRemoval(btDispatcher* dispatcher); + + ///reset broadphase internal structures, to ensure determinism/reproducability + virtual void resetPool(btDispatcher* dispatcher); + }; #endif diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h index 6db71a0170e..ee57aa96151 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h @@ -46,22 +46,25 @@ struct btDispatcherInfo m_enableSPU(true), m_useEpa(true), m_allowedCcdPenetration(btScalar(0.04)), + m_useConvexConservativeDistanceUtil(true), + m_convexConservativeDistanceThreshold(0.0f), m_stackAllocator(0) { } btScalar m_timeStep; - int m_stepCount; - int m_dispatchFunc; + int m_stepCount; + int m_dispatchFunc; mutable btScalar m_timeOfImpact; - bool m_useContinuous; + bool m_useContinuous; class btIDebugDraw* m_debugDraw; - bool m_enableSatConvex; - bool m_enableSPU; - bool m_useEpa; + bool m_enableSatConvex; + bool m_enableSPU; + bool m_useEpa; btScalar m_allowedCcdPenetration; + bool m_useConvexConservativeDistanceUtil; + btScalar m_convexConservativeDistanceThreshold; btStackAlloc* m_stackAllocator; - }; ///The btDispatcher interface class can be used in combination with broadphase to dispatch calculations for overlapping pairs. diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp index 3f866ab7c5f..6712f528e97 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp @@ -149,6 +149,22 @@ amin.getZ() >= bmin.getZ() && amax.getZ() <= bmax.getZ(); +void btMultiSapBroadphase::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const +{ + btMultiSapProxy* multiProxy = static_cast(proxy); + aabbMin = multiProxy->m_aabbMin; + aabbMax = multiProxy->m_aabbMax; +} + +void btMultiSapBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin,const btVector3& aabbMax) +{ + for (int i=0;i void btMultiSapBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher) @@ -208,7 +224,9 @@ void btMultiSapBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aab - m_optimizedAabbTree->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax); + if (m_optimizedAabbTree) + m_optimizedAabbTree->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax); + int i; for ( i=0;im_bridgeProxies.size();i++) @@ -464,3 +482,8 @@ void btMultiSapBroadphase::printStats() */ } + +void btMultiSapBroadphase::resetPool(btDispatcher* dispatcher) +{ + // not yet +} diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h index a0c002de856..91c504eee22 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h @@ -26,6 +26,7 @@ class btSimpleBroadphase; typedef btAlignedObjectArray btSapBroadphaseArray; +///The btMultiSapBroadphase is a research project, not recommended to use in production. Use btAxisSweep3 or btDbvtBroadphase instead. ///The btMultiSapBroadphase is a broadphase that contains multiple SAP broadphases. ///The user can add SAP broadphases that cover the world. A btBroadphaseProxy can be in multiple child broadphases at the same time. ///A btQuantizedBvh acceleration structures finds overlapping SAPs for each btBroadphaseProxy. @@ -72,7 +73,7 @@ public: short int m_collisionFilterMask; */ btMultiSapProxy(const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask) - :btBroadphaseProxy(userPtr,collisionFilterGroup,collisionFilterMask), + :btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask), m_aabbMin(aabbMin), m_aabbMax(aabbMax), m_shapeType(shapeType) @@ -108,6 +109,9 @@ public: virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy); virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher); + virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const; + + virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin=btVector3(0,0,0),const btVector3& aabbMax=btVector3(0,0,0)); void addToChildBroadphase(btMultiSapProxy* parentMultiSapProxy, btBroadphaseProxy* childProxy, btBroadphaseInterface* childBroadphase); @@ -139,6 +143,9 @@ public: void quicksort (btBroadphasePairArray& a, int lo, int hi); + ///reset broadphase internal structures, to ensure determinism/reproducability + virtual void resetPool(btDispatcher* dispatcher); + }; #endif //BT_MULTI_SAP_BROADPHASE diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp index ff65cdde79f..b209bcb9a20 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp @@ -19,6 +19,7 @@ subject to the following restrictions: #include "btDispatcher.h" #include "btCollisionAlgorithm.h" +#include "LinearMath/btAabbUtil2.h" #include @@ -33,7 +34,8 @@ int gFindPairs =0; btHashedOverlappingPairCache::btHashedOverlappingPairCache(): m_overlapFilterCallback(0), - m_blockedForChanges(false) + m_blockedForChanges(false), + m_ghostPairCallback(0) { int initialAllocatedSize= 2; m_overlappingPairArray.reserve(initialAllocatedSize); @@ -45,7 +47,6 @@ btHashedOverlappingPairCache::btHashedOverlappingPairCache(): btHashedOverlappingPairCache::~btHashedOverlappingPairCache() { - //todo/test: show we erase/delete data, or is it automatic } @@ -135,7 +136,8 @@ void btHashedOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroad btBroadphasePair* btHashedOverlappingPairCache::findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) { gFindPairs++; - if(proxy0>proxy1) btSwap(proxy0,proxy1); + if(proxy0->m_uniqueId>proxy1->m_uniqueId) + btSwap(proxy0,proxy1); int proxyId1 = proxy0->getUid(); int proxyId2 = proxy1->getUid(); @@ -211,7 +213,8 @@ void btHashedOverlappingPairCache::growTables() btBroadphasePair* btHashedOverlappingPairCache::internalAddPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) { - if(proxy0>proxy1) btSwap(proxy0,proxy1); + if(proxy0->m_uniqueId>proxy1->m_uniqueId) + btSwap(proxy0,proxy1); int proxyId1 = proxy0->getUid(); int proxyId2 = proxy1->getUid(); @@ -238,6 +241,11 @@ btBroadphasePair* btHashedOverlappingPairCache::internalAddPair(btBroadphaseProx int count = m_overlappingPairArray.size(); int oldCapacity = m_overlappingPairArray.capacity(); void* mem = &m_overlappingPairArray.expand(); + + //this is where we add an actual pair, so also call the 'ghost' + if (m_ghostPairCallback) + m_ghostPairCallback->addOverlappingPair(proxy0,proxy1); + int newCapacity = m_overlappingPairArray.capacity(); if (oldCapacity < newCapacity) @@ -251,7 +259,7 @@ btBroadphasePair* btHashedOverlappingPairCache::internalAddPair(btBroadphaseProx // pair->m_pProxy0 = proxy0; // pair->m_pProxy1 = proxy1; pair->m_algorithm = 0; - pair->m_userInfo = 0; + pair->m_internalTmpValue = 0; m_next[count] = m_hashTable[hash]; @@ -265,7 +273,8 @@ btBroadphasePair* btHashedOverlappingPairCache::internalAddPair(btBroadphaseProx void* btHashedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1,btDispatcher* dispatcher) { gRemovePairs++; - if(proxy0>proxy1) btSwap(proxy0,proxy1); + if(proxy0->m_uniqueId>proxy1->m_uniqueId) + btSwap(proxy0,proxy1); int proxyId1 = proxy0->getUid(); int proxyId2 = proxy1->getUid(); @@ -282,7 +291,7 @@ void* btHashedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* pro cleanOverlappingPair(*pair,dispatcher); - void* userData = pair->m_userInfo; + void* userData = pair->m_internalInfo1; btAssert(pair->m_pProxy0->getUid() == proxyId1); btAssert(pair->m_pProxy1->getUid() == proxyId2); @@ -317,6 +326,9 @@ void* btHashedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* pro int lastPairIndex = m_overlappingPairArray.size() - 1; + if (m_ghostPairCallback) + m_ghostPairCallback->removeOverlappingPair(proxy0, proxy1,dispatcher); + // If the removed pair is the last pair, we are done. if (lastPairIndex == pairIndex) { @@ -384,6 +396,35 @@ void btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* } } +void btHashedOverlappingPairCache::sortOverlappingPairs(btDispatcher* dispatcher) +{ + ///need to keep hashmap in sync with pair address, so rebuild all + btBroadphasePairArray tmpPairs; + int i; + for (i=0;iremoveOverlappingPair(proxy0, proxy1,dispatcher); m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.capacity()-1); m_overlappingPairArray.pop_back(); @@ -419,15 +462,19 @@ void* btSortedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* pro btBroadphasePair* btSortedOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) { //don't add overlap with own - assert(proxy0 != proxy1); + btAssert(proxy0 != proxy1); if (!needsBroadphaseCollision(proxy0,proxy1)) return 0; void* mem = &m_overlappingPairArray.expand(); btBroadphasePair* pair = new (mem) btBroadphasePair(*proxy0,*proxy1); + gOverlappingPairs++; gAddedPairs++; + + if (m_ghostPairCallback) + m_ghostPairCallback->addOverlappingPair(proxy0, proxy1); return pair; } @@ -446,7 +493,7 @@ btBroadphasePair* btSortedOverlappingPairCache::addOverlappingPair(btBroadphaseP if (findIndex < m_overlappingPairArray.size()) { - //assert(it != m_overlappingPairSet.end()); + //btAssert(it != m_overlappingPairSet.end()); btBroadphasePair* pair = &m_overlappingPairArray[findIndex]; return pair; } @@ -476,8 +523,9 @@ void btSortedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* if (callback->processOverlap(*pair)) { cleanOverlappingPair(*pair,dispatcher); - - m_overlappingPairArray.swap(i,m_overlappingPairArray.capacity()-1); + pair->m_pProxy0 = 0; + pair->m_pProxy1 = 0; + m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); m_overlappingPairArray.pop_back(); gOverlappingPairs--; } else @@ -493,7 +541,8 @@ void btSortedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* btSortedOverlappingPairCache::btSortedOverlappingPairCache(): m_blockedForChanges(false), m_hasDeferredRemoval(true), - m_overlapFilterCallback(0) + m_overlapFilterCallback(0), + m_ghostPairCallback(0) { int initialAllocatedSize= 2; m_overlappingPairArray.reserve(initialAllocatedSize); @@ -501,7 +550,6 @@ btSortedOverlappingPairCache::btSortedOverlappingPairCache(): btSortedOverlappingPairCache::~btSortedOverlappingPairCache() { - //todo/test: show we erase/delete data, or is it automatic } void btSortedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher) @@ -577,3 +625,9 @@ void btSortedOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroad processAllOverlappingPairs(&removeCallback,dispatcher); } + +void btSortedOverlappingPairCache::sortOverlappingPairs(btDispatcher* dispatcher) +{ + //should already be sorted +} + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h index 66679bd218a..eda45c47b5b 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h @@ -21,7 +21,6 @@ subject to the following restrictions: #include "btBroadphaseProxy.h" #include "btOverlappingPairCallback.h" -#include "LinearMath/btPoint3.h" #include "LinearMath/btAlignedObjectArray.h" class btDispatcher; @@ -83,6 +82,11 @@ public: virtual bool hasDeferredRemoval() = 0; + virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)=0; + + virtual void sortOverlappingPairs(btDispatcher* dispatcher) = 0; + + }; /// Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com @@ -253,10 +257,19 @@ private: return false; } -public: + virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback) + { + m_ghostPairCallback = ghostPairCallback; + } + + virtual void sortOverlappingPairs(btDispatcher* dispatcher); + + +protected: btAlignedObjectArray m_hashTable; btAlignedObjectArray m_next; + btOverlappingPairCallback* m_ghostPairCallback; }; @@ -280,6 +293,8 @@ class btSortedOverlappingPairCache : public btOverlappingPairCache //if set, use the callback instead of the built in filter in needBroadphaseCollision btOverlapFilterCallback* m_overlapFilterCallback; + btOverlappingPairCallback* m_ghostPairCallback; + public: btSortedOverlappingPairCache(); @@ -355,12 +370,19 @@ class btSortedOverlappingPairCache : public btOverlappingPairCache return m_hasDeferredRemoval; } + virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback) + { + m_ghostPairCallback = ghostPairCallback; + } + + virtual void sortOverlappingPairs(btDispatcher* dispatcher); + }; -///btNullPairCache skips add/removal of overlapping pairs. Userful for benchmarking and testing. +///btNullPairCache skips add/removal of overlapping pairs. Userful for benchmarking and unit testing. class btNullPairCache : public btOverlappingPairCache { @@ -414,6 +436,11 @@ public: return true; } + virtual void setInternalGhostPairCallback(btOverlappingPairCallback* /* ghostPairCallback */) + { + + } + virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/) { return 0; @@ -427,6 +454,10 @@ public: virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* /*proxy0*/,btDispatcher* /*dispatcher*/) { } + + virtual void sortOverlappingPairs(btDispatcher* dispatcher) + { + } }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp index a30bd1fd9e1..8bef8f0d43e 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp @@ -18,14 +18,18 @@ subject to the following restrictions: #include "LinearMath/btAabbUtil2.h" #include "LinearMath/btIDebugDraw.h" +#define RAYAABB2 -btQuantizedBvh::btQuantizedBvh() : m_useQuantization(false), +btQuantizedBvh::btQuantizedBvh() : + m_bulletVersion(BT_BULLET_VERSION), + m_useQuantization(false), //m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIENDLY) m_traversalMode(TRAVERSAL_STACKLESS) //m_traversalMode(TRAVERSAL_RECURSIVE) ,m_subtreeHeaderCount(0) //PCK: add this line -{ - +{ + m_bvhAabbMin.setValue(-SIMD_INFINITY,-SIMD_INFINITY,-SIMD_INFINITY); + m_bvhAabbMax.setValue(SIMD_INFINITY,SIMD_INFINITY,SIMD_INFINITY); } @@ -119,7 +123,7 @@ void btQuantizedBvh::buildTree (int startIndex,int endIndex) int numIndices =endIndex-startIndex; int curIndex = m_curNodeIndex; - assert(numIndices>0); + btAssert(numIndices>0); if (numIndices==1) { @@ -140,8 +144,11 @@ void btQuantizedBvh::buildTree (int startIndex,int endIndex) int internalNodeIndex = m_curNodeIndex; - setInternalNodeAabbMax(m_curNodeIndex,m_bvhAabbMin); - setInternalNodeAabbMin(m_curNodeIndex,m_bvhAabbMax); + //set the min aabb to 'inf' or a max value, and set the max aabb to a -inf/minimum value. + //the aabb will be expanded during buildTree/mergeInternalNodeAabb with actual node values + setInternalNodeAabbMin(m_curNodeIndex,m_bvhAabbMax);//can't use btVector3(SIMD_INFINITY,SIMD_INFINITY,SIMD_INFINITY)) because of quantization + setInternalNodeAabbMax(m_curNodeIndex,m_bvhAabbMin);//can't use btVector3(-SIMD_INFINITY,-SIMD_INFINITY,-SIMD_INFINITY)) because of quantization + for (i=startIndex;im_aabbMinOrg,rootNode->m_aabbMaxOrg); @@ -434,6 +445,96 @@ void btQuantizedBvh::walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantize +void btQuantizedBvh::walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const +{ + btAssert(!m_useQuantization); + + const btOptimizedBvhNode* rootNode = &m_contiguousNodes[0]; + int escapeIndex, curIndex = 0; + int walkIterations = 0; + bool isLeafNode; + //PCK: unsigned instead of bool + unsigned aabbOverlap=0; + unsigned rayBoxOverlap=0; + btScalar lambda_max = 1.0; + + /* Quick pruning by quantized box */ + btVector3 rayAabbMin = raySource; + btVector3 rayAabbMax = raySource; + rayAabbMin.setMin(rayTarget); + rayAabbMax.setMax(rayTarget); + + /* Add box cast extents to bounding box */ + rayAabbMin += aabbMin; + rayAabbMax += aabbMax; + +#ifdef RAYAABB2 + btVector3 rayDir = (rayTarget-raySource); + rayDir.normalize (); + lambda_max = rayDir.dot(rayTarget-raySource); + ///what about division by zero? --> just set rayDirection[i] to 1.0 + btVector3 rayDirectionInverse; + rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[0]; + rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[1]; + rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[2]; + unsigned int sign[3] = { rayDirectionInverse[0] < 0.0, rayDirectionInverse[1] < 0.0, rayDirectionInverse[2] < 0.0}; +#endif + + btVector3 bounds[2]; + + while (curIndex < m_curNodeIndex) + { + btScalar param = 1.0; + //catch bugs in tree data + btAssert (walkIterations < m_curNodeIndex); + + walkIterations++; + + bounds[0] = rootNode->m_aabbMinOrg; + bounds[1] = rootNode->m_aabbMaxOrg; + /* Add box cast extents */ + bounds[0] += aabbMin; + bounds[1] += aabbMax; + + aabbOverlap = TestAabbAgainstAabb2(rayAabbMin,rayAabbMax,rootNode->m_aabbMinOrg,rootNode->m_aabbMaxOrg); + //perhaps profile if it is worth doing the aabbOverlap test first + +#ifdef RAYAABB2 + ///careful with this check: need to check division by zero (above) and fix the unQuantize method + ///thanks Joerg/hiker for the reproduction case! + ///http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1858 + rayBoxOverlap = aabbOverlap ? btRayAabb2 (raySource, rayDirectionInverse, sign, bounds, param, 0.0f, lambda_max) : false; + +#else + btVector3 normal; + rayBoxOverlap = btRayAabb(raySource, rayTarget,bounds[0],bounds[1],param, normal); +#endif + + isLeafNode = rootNode->m_escapeIndex == -1; + + //PCK: unsigned instead of bool + if (isLeafNode && (rayBoxOverlap != 0)) + { + nodeCallback->processNode(rootNode->m_subPart,rootNode->m_triangleIndex); + } + + //PCK: unsigned instead of bool + if ((rayBoxOverlap != 0) || isLeafNode) + { + rootNode++; + curIndex++; + } else + { + escapeIndex = rootNode->m_escapeIndex; + rootNode += escapeIndex; + curIndex += escapeIndex; + } + } + if (maxIterations < walkIterations) + maxIterations = walkIterations; + +} + void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const @@ -454,9 +555,8 @@ void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* unsigned rayBoxOverlap = 0; btScalar lambda_max = 1.0; -#define RAYAABB2 + #ifdef RAYAABB2 - btVector3 rayFrom = raySource; btVector3 rayDirection = (rayTarget-raySource); rayDirection.normalize (); lambda_max = rayDirection.dot(rayTarget-raySource); @@ -502,7 +602,7 @@ void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* #endif//VISUALLY_ANALYZE_BVH //catch bugs in tree data - assert (walkIterations < subTreeSize); + btAssert (walkIterations < subTreeSize); walkIterations++; //PCK: unsigned instead of bool @@ -533,7 +633,9 @@ void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* ///thanks Joerg/hiker for the reproduction case! ///http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1858 + //BT_PROFILE("btRayAabb2"); rayBoxOverlap = btRayAabb2 (raySource, rayDirection, sign, bounds, param, 0.0f, lambda_max); + #else rayBoxOverlap = true;//btRayAabb(raySource, rayTarget, bounds[0], bounds[1], param, normal); #endif @@ -597,7 +699,7 @@ void btQuantizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallb #endif//VISUALLY_ANALYZE_BVH //catch bugs in tree data - assert (walkIterations < subTreeSize); + btAssert (walkIterations < subTreeSize); walkIterations++; //PCK: unsigned instead of bool @@ -652,30 +754,25 @@ void btQuantizedBvh::walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallba void btQuantizedBvh::reportRayOverlappingNodex (btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget) const { - bool fast_path = m_useQuantization && m_traversalMode == TRAVERSAL_STACKLESS; - if (fast_path) - { - walkStacklessQuantizedTreeAgainstRay(nodeCallback, raySource, rayTarget, btVector3(0, 0, 0), btVector3(0, 0, 0), 0, m_curNodeIndex); - } else { - /* Otherwise fallback to AABB overlap test */ - btVector3 aabbMin = raySource; - btVector3 aabbMax = raySource; - aabbMin.setMin(rayTarget); - aabbMax.setMax(rayTarget); - reportAabbOverlappingNodex(nodeCallback,aabbMin,aabbMax); - } + reportBoxCastOverlappingNodex(nodeCallback,raySource,rayTarget,btVector3(0,0,0),btVector3(0,0,0)); } void btQuantizedBvh::reportBoxCastOverlappingNodex(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin,const btVector3& aabbMax) const { - bool fast_path = m_useQuantization && m_traversalMode == TRAVERSAL_STACKLESS; - if (fast_path) + //always use stackless + + if (m_useQuantization) { walkStacklessQuantizedTreeAgainstRay(nodeCallback, raySource, rayTarget, aabbMin, aabbMax, 0, m_curNodeIndex); - } else { - /* Slow path: - Construct the bounding box for the entire box cast and send that down the tree */ + } + else + { + walkStacklessTreeAgainstRay(nodeCallback, raySource, rayTarget, aabbMin, aabbMax, 0, m_curNodeIndex); + } + /* + { + //recursive traversal btVector3 qaabbMin = raySource; btVector3 qaabbMax = raySource; qaabbMin.setMin(rayTarget); @@ -684,6 +781,8 @@ void btQuantizedBvh::reportBoxCastOverlappingNodex(btNodeOverlapCallback* nodeCa qaabbMax += aabbMax; reportAabbOverlappingNodex(nodeCallback,qaabbMin,qaabbMax); } + */ + } @@ -716,17 +815,19 @@ void btQuantizedBvh::assignInternalNodeFromLeafNode(int internalNode,int leafNod //PCK: include #include +#if 0 //PCK: consts static const unsigned BVH_ALIGNMENT = 16; static const unsigned BVH_ALIGNMENT_MASK = BVH_ALIGNMENT-1; static const unsigned BVH_ALIGNMENT_BLOCKS = 2; - +#endif unsigned int btQuantizedBvh::getAlignmentSerializationPadding() { - return BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT; + // I changed this to 0 since the extra padding is not needed or used. + return 0;//BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT; } unsigned btQuantizedBvh::calculateSerializeBufferSize() @@ -742,7 +843,7 @@ unsigned btQuantizedBvh::calculateSerializeBufferSize() bool btQuantizedBvh::serialize(void *o_alignedDataBuffer, unsigned /*i_dataBufferSize */, bool i_swapEndian) { - assert(m_subtreeHeaderCount == m_SubtreeHeaders.size()); + btAssert(m_subtreeHeaderCount == m_SubtreeHeaders.size()); m_subtreeHeaderCount = m_SubtreeHeaders.size(); /* if (i_dataBufferSize < calculateSerializeBufferSize() || o_alignedDataBuffer == NULL || (((unsigned)o_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0)) @@ -829,6 +930,11 @@ bool btQuantizedBvh::serialize(void *o_alignedDataBuffer, unsigned /*i_dataBuffe } } nodeData += sizeof(btQuantizedBvhNode) * nodeCount; + + // this clears the pointer in the member variable it doesn't really do anything to the data + // it does call the destructor on the contained objects, but they are all classes with no destructor defined + // so the memory (which is not freed) is left alone + targetBvh->m_quantizedContiguousNodes.initializeFromBuffer(NULL, 0, 0); } else { @@ -859,6 +965,11 @@ bool btQuantizedBvh::serialize(void *o_alignedDataBuffer, unsigned /*i_dataBuffe } } nodeData += sizeof(btOptimizedBvhNode) * nodeCount; + + // this clears the pointer in the member variable it doesn't really do anything to the data + // it does call the destructor on the contained objects, but they are all classes with no destructor defined + // so the memory (which is not freed) is left alone + targetBvh->m_contiguousNodes.initializeFromBuffer(NULL, 0, 0); } sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; @@ -896,12 +1007,23 @@ bool btQuantizedBvh::serialize(void *o_alignedDataBuffer, unsigned /*i_dataBuffe targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = (m_SubtreeHeaders[i].m_rootNodeIndex); targetBvh->m_SubtreeHeaders[i].m_subtreeSize = (m_SubtreeHeaders[i].m_subtreeSize); - targetBvh->m_SubtreeHeaders[i] = m_SubtreeHeaders[i]; + + // need to clear padding in destination buffer + targetBvh->m_SubtreeHeaders[i].m_padding[0] = 0; + targetBvh->m_SubtreeHeaders[i].m_padding[1] = 0; + targetBvh->m_SubtreeHeaders[i].m_padding[2] = 0; } } - nodeData += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount; + // this clears the pointer in the member variable it doesn't really do anything to the data + // it does call the destructor on the contained objects, but they are all classes with no destructor defined + // so the memory (which is not freed) is left alone + targetBvh->m_SubtreeHeaders.initializeFromBuffer(NULL, 0, 0); + + // this wipes the virtual function table pointer at the start of the buffer for the class + *((void**)o_alignedDataBuffer) = NULL; + return true; } @@ -1015,11 +1137,12 @@ btQuantizedBvh *btQuantizedBvh::deSerializeInPlace(void *i_alignedDataBuffer, un btQuantizedBvh::btQuantizedBvh(btQuantizedBvh &self, bool /* ownsMemory */) : m_bvhAabbMin(self.m_bvhAabbMin), m_bvhAabbMax(self.m_bvhAabbMax), -m_bvhQuantization(self.m_bvhQuantization) +m_bvhQuantization(self.m_bvhQuantization), +m_bulletVersion(BT_BULLET_VERSION) { - } + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h index 8a149b533fa..ced457b6036 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h @@ -158,41 +158,43 @@ typedef btAlignedObjectArray BvhSubtreeInfoArray; ///It is recommended to use quantization for better performance and lower memory requirements. ATTRIBUTE_ALIGNED16(class) btQuantizedBvh { -protected: - - NodeArray m_leafNodes; - NodeArray m_contiguousNodes; - - QuantizedNodeArray m_quantizedLeafNodes; - - QuantizedNodeArray m_quantizedContiguousNodes; - - int m_curNodeIndex; - - - //quantization data - bool m_useQuantization; - btVector3 m_bvhAabbMin; - btVector3 m_bvhAabbMax; - btVector3 m_bvhQuantization; public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - enum btTraversalMode { TRAVERSAL_STACKLESS = 0, TRAVERSAL_STACKLESS_CACHE_FRIENDLY, TRAVERSAL_RECURSIVE }; + protected: - btTraversalMode m_traversalMode; + + btVector3 m_bvhAabbMin; + btVector3 m_bvhAabbMax; + btVector3 m_bvhQuantization; + + int m_bulletVersion; //for serialization versioning. It could also be used to detect endianess. + + int m_curNodeIndex; + //quantization data + bool m_useQuantization; + + + + NodeArray m_leafNodes; + NodeArray m_contiguousNodes; + QuantizedNodeArray m_quantizedLeafNodes; + QuantizedNodeArray m_quantizedContiguousNodes; + btTraversalMode m_traversalMode; BvhSubtreeInfoArray m_SubtreeHeaders; //This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray int m_subtreeHeaderCount; + + + ///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!) ///this might be refactored into a virtual, it is usually not calculated at run-time @@ -296,6 +298,7 @@ protected: void walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const; void walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const; + void walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const; ///tree traversal designed for small-memory processors like PS3 SPU void walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const; @@ -307,30 +310,14 @@ protected: void walkRecursiveQuantizedTreeAgainstQuantizedTree(const btQuantizedBvhNode* treeNodeA,const btQuantizedBvhNode* treeNodeB,btNodeOverlapCallback* nodeCallback) const; -#define USE_BANCHLESS 1 -#ifdef USE_BANCHLESS - //This block replaces the block below and uses no branches, and replaces the 8 bit return with a 32 bit return for improved performance (~3x on XBox 360) - SIMD_FORCE_INLINE unsigned testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const - { - return static_cast(btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0]) - & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2]) - & (aabbMin1[1] <= aabbMax2[1]) & (aabbMax1[1] >= aabbMin2[1])), - 1, 0)); - } -#else - SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const - { - bool overlap = true; - overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; - overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; - overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; - return overlap; - } -#endif //USE_BANCHLESS + void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex); public: + + BT_DECLARE_ALIGNED_ALLOCATOR(); + btQuantizedBvh(); virtual ~btQuantizedBvh(); @@ -363,7 +350,7 @@ public: btVector3 v = (point - m_bvhAabbMin) * m_bvhQuantization; ///Make sure rounding is done in a way that unQuantize(quantizeWithClamp(...)) is conservative ///end-points always set the first bit, so that they are sorted properly (so that neighbouring AABBs overlap properly) - ///todo: double-check this + ///@todo: double-check this if (isMax) { out[0] = (unsigned short) (((unsigned short)(v.getX()+btScalar(1.)) | 1)); diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp index a57952ffa06..caed63db005 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp @@ -55,6 +55,7 @@ btSimpleBroadphase::btSimpleBroadphase(int maxProxies, btOverlappingPairCache* o m_maxHandles = maxProxies; m_numHandles = 0; m_firstFreeHandle = 0; + m_LastHandleIndex = -1; { @@ -88,7 +89,7 @@ btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& aabbMin, btAssert(0); return 0; //should never happen, but don't let the game crash ;-) } - assert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]); + btAssert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]); int newHandleIndex = allocHandle(); btSimpleBroadphaseProxy* proxy = new (&m_pHandles[newHandleIndex])btSimpleBroadphaseProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy); @@ -137,14 +138,32 @@ void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg,btDispatcher* } +void btSimpleBroadphase::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const +{ + const btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy); + aabbMin = sbp->m_aabbMin; + aabbMax = sbp->m_aabbMax; +} + void btSimpleBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* /*dispatcher*/) { btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy); - sbp->m_min = aabbMin; - sbp->m_max = aabbMax; + sbp->m_aabbMin = aabbMin; + sbp->m_aabbMax = aabbMax; } - +void btSimpleBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin,const btVector3& aabbMax) +{ + for (int i=0; i <= m_LastHandleIndex; i++) + { + btSimpleBroadphaseProxy* proxy = &m_pHandles[i]; + if(!proxy->m_clientObject) + { + continue; + } + rayCallback.process(proxy); + } +} @@ -154,9 +173,9 @@ void btSimpleBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbM bool btSimpleBroadphase::aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1) { - return proxy0->m_min[0] <= proxy1->m_max[0] && proxy1->m_min[0] <= proxy0->m_max[0] && - proxy0->m_min[1] <= proxy1->m_max[1] && proxy1->m_min[1] <= proxy0->m_max[1] && - proxy0->m_min[2] <= proxy1->m_max[2] && proxy1->m_min[2] <= proxy0->m_max[2]; + return proxy0->m_aabbMin[0] <= proxy1->m_aabbMax[0] && proxy1->m_aabbMin[0] <= proxy0->m_aabbMax[0] && + proxy0->m_aabbMin[1] <= proxy1->m_aabbMax[1] && proxy1->m_aabbMin[1] <= proxy0->m_aabbMax[1] && + proxy0->m_aabbMin[2] <= proxy1->m_aabbMax[2] && proxy1->m_aabbMin[2] <= proxy0->m_aabbMax[2]; } @@ -176,18 +195,25 @@ void btSimpleBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) { //first check for new overlapping pairs int i,j; - if (m_numHandles >= 0) { - - for (i=0;im_clientObject) + { + continue; + } + new_largest_index = i; + for (j=i+1; j <= m_LastHandleIndex; j++) { btSimpleBroadphaseProxy* proxy1 = &m_pHandles[j]; btAssert(proxy0 != proxy1); + if(!proxy1->m_clientObject) + { + continue; + } btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0); btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1); @@ -211,6 +237,8 @@ void btSimpleBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) } } + m_LastHandleIndex = new_largest_index; + if (m_ownsPairCache && m_pairCache->hasDeferredRemoval()) { @@ -296,5 +324,7 @@ bool btSimpleBroadphase::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseP return aabbOverlap(p0,p1); } - - +void btSimpleBroadphase::resetPool(btDispatcher* dispatcher) +{ + //not yet +} diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h index e2ebb825725..cc7613bf6a0 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h @@ -22,8 +22,6 @@ subject to the following restrictions: struct btSimpleBroadphaseProxy : public btBroadphaseProxy { - btVector3 m_min; - btVector3 m_max; int m_nextFree; // int m_handleId; @@ -31,9 +29,8 @@ struct btSimpleBroadphaseProxy : public btBroadphaseProxy btSimpleBroadphaseProxy() {}; - btSimpleBroadphaseProxy(const btPoint3& minpt,const btPoint3& maxpt,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,void* multiSapProxy) - :btBroadphaseProxy(userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy), - m_min(minpt),m_max(maxpt) + btSimpleBroadphaseProxy(const btVector3& minpt,const btVector3& maxpt,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,void* multiSapProxy) + :btBroadphaseProxy(minpt,maxpt,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy) { (void)shapeType; } @@ -56,6 +53,7 @@ protected: int m_numHandles; // number of active handles int m_maxHandles; // max number of handles + int m_LastHandleIndex; btSimpleBroadphaseProxy* m_pHandles; // handles pool @@ -68,6 +66,10 @@ protected: int freeHandle = m_firstFreeHandle; m_firstFreeHandle = m_pHandles[freeHandle].GetNextFree(); m_numHandles++; + if(freeHandle > m_LastHandleIndex) + { + m_LastHandleIndex = freeHandle; + } return freeHandle; } @@ -75,10 +77,15 @@ protected: { int handle = int(proxy-m_pHandles); btAssert(handle >= 0 && handle < m_maxHandles); - + if(handle == m_LastHandleIndex) + { + m_LastHandleIndex--; + } proxy->SetNextFree(m_firstFreeHandle); m_firstFreeHandle = handle; + proxy->m_clientObject = 0; + m_numHandles--; } @@ -95,6 +102,15 @@ protected: return proxy0; } + inline const btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy) const + { + const btSimpleBroadphaseProxy* proxy0 = static_cast(proxy); + return proxy0; + } + + ///reset broadphase internal structures, to ensure determinism/reproducability + virtual void resetPool(btDispatcher* dispatcher); + void validate(); @@ -117,6 +133,9 @@ public: virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher); + virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const; + + virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0),const btVector3& aabbMax=btVector3(0,0,0)); btOverlappingPairCache* getOverlappingPairCache() { diff --git a/extern/bullet2/src/BulletCollision/CMakeLists.txt b/extern/bullet2/src/BulletCollision/CMakeLists.txt index d77ca6444c7..ddc806a3e6a 100644 --- a/extern/bullet2/src/BulletCollision/CMakeLists.txt +++ b/extern/bullet2/src/BulletCollision/CMakeLists.txt @@ -1,153 +1,234 @@ - -INCLUDE_DIRECTORIES( -${BULLET_PHYSICS_SOURCE_DIR}/src } +INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) + +SET(BulletCollision_SRCS + BroadphaseCollision/btAxisSweep3.cpp + BroadphaseCollision/btBroadphaseProxy.cpp + BroadphaseCollision/btCollisionAlgorithm.cpp + BroadphaseCollision/btDispatcher.cpp + BroadphaseCollision/btDbvtBroadphase.cpp + BroadphaseCollision/btDbvt.cpp + BroadphaseCollision/btMultiSapBroadphase.cpp + BroadphaseCollision/btOverlappingPairCache.cpp + BroadphaseCollision/btQuantizedBvh.cpp + BroadphaseCollision/btSimpleBroadphase.cpp + CollisionDispatch/btActivatingCollisionAlgorithm.cpp + CollisionDispatch/btCollisionDispatcher.cpp + CollisionDispatch/btCollisionObject.cpp + CollisionDispatch/btCollisionWorld.cpp + CollisionDispatch/btCompoundCollisionAlgorithm.cpp + CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp + CollisionDispatch/btDefaultCollisionConfiguration.cpp + CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp + CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp + CollisionDispatch/btBoxBoxDetector.cpp + CollisionDispatch/btGhostObject.cpp + CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp + CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp + CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp + CollisionDispatch/btConvexConvexAlgorithm.cpp + CollisionDispatch/btEmptyCollisionAlgorithm.cpp + CollisionDispatch/btManifoldResult.cpp + CollisionDispatch/btSimulationIslandManager.cpp + CollisionDispatch/btUnionFind.cpp + CollisionDispatch/SphereTriangleDetector.cpp + CollisionShapes/btBoxShape.cpp + CollisionShapes/btBvhTriangleMeshShape.cpp + CollisionShapes/btCapsuleShape.cpp + CollisionShapes/btCollisionShape.cpp + CollisionShapes/btCompoundShape.cpp + CollisionShapes/btConcaveShape.cpp + CollisionShapes/btConeShape.cpp + CollisionShapes/btConvexHullShape.cpp + CollisionShapes/btConvexPointCloudShape.cpp + CollisionShapes/btConvexShape.cpp + CollisionShapes/btConvexInternalShape.cpp + CollisionShapes/btConvexTriangleMeshShape.cpp + CollisionShapes/btCylinderShape.cpp + CollisionShapes/btEmptyShape.cpp + CollisionShapes/btHeightfieldTerrainShape.cpp + CollisionShapes/btMinkowskiSumShape.cpp + CollisionShapes/btMultimaterialTriangleMeshShape.cpp + CollisionShapes/btMultiSphereShape.cpp + CollisionShapes/btOptimizedBvh.cpp + CollisionShapes/btPolyhedralConvexShape.cpp + CollisionShapes/btScaledBvhTriangleMeshShape.cpp + CollisionShapes/btTetrahedronShape.cpp + CollisionShapes/btSphereShape.cpp + CollisionShapes/btShapeHull.cpp + CollisionShapes/btStaticPlaneShape.cpp + CollisionShapes/btStridingMeshInterface.cpp + CollisionShapes/btTriangleCallback.cpp + CollisionShapes/btTriangleBuffer.cpp + CollisionShapes/btTriangleIndexVertexArray.cpp + CollisionShapes/btTriangleIndexVertexMaterialArray.cpp + CollisionShapes/btTriangleMesh.cpp + CollisionShapes/btTriangleMeshShape.cpp + CollisionShapes/btUniformScalingShape.cpp + Gimpact/btContactProcessing.cpp + Gimpact/btGImpactShape.cpp + Gimpact/gim_contact.cpp + Gimpact/btGImpactBvh.cpp + Gimpact/btGenericPoolAllocator.cpp + Gimpact/gim_memory.cpp + Gimpact/btGImpactCollisionAlgorithm.cpp + Gimpact/btTriangleShapeEx.cpp + Gimpact/gim_tri_collision.cpp + Gimpact/btGImpactQuantizedBvh.cpp + Gimpact/gim_box_set.cpp + NarrowPhaseCollision/btContinuousConvexCollision.cpp + NarrowPhaseCollision/btGjkEpa2.cpp + NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp + NarrowPhaseCollision/btConvexCast.cpp + NarrowPhaseCollision/btGjkConvexCast.cpp + NarrowPhaseCollision/btGjkPairDetector.cpp + NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp + NarrowPhaseCollision/btPersistentManifold.cpp + NarrowPhaseCollision/btRaycastCallback.cpp + NarrowPhaseCollision/btSubSimplexConvexCast.cpp + NarrowPhaseCollision/btVoronoiSimplexSolver.cpp ) - -ADD_LIBRARY(LibBulletCollision - BroadphaseCollision/btAxisSweep3.cpp - BroadphaseCollision/btAxisSweep3.h - BroadphaseCollision/btBroadphaseProxy.cpp - BroadphaseCollision/btBroadphaseProxy.h - BroadphaseCollision/btCollisionAlgorithm.cpp - BroadphaseCollision/btCollisionAlgorithm.h - BroadphaseCollision/btDispatcher.cpp - BroadphaseCollision/btDispatcher.h - BroadphaseCollision/btDbvtBroadphase.cpp - BroadphaseCollision/btDbvtBroadphase.h - BroadphaseCollision/btDbvt.cpp - BroadphaseCollision/btDbvt.h - BroadphaseCollision/btMultiSapBroadphase.cpp - BroadphaseCollision/btMultiSapBroadphase.h - BroadphaseCollision/btOverlappingPairCache.cpp - BroadphaseCollision/btOverlappingPairCache.h - BroadphaseCollision/btOverlappingPairCallback.h - BroadphaseCollision/btQuantizedBvh.cpp - BroadphaseCollision/btQuantizedBvh.h - BroadphaseCollision/btSimpleBroadphase.cpp - BroadphaseCollision/btSimpleBroadphase.h - CollisionDispatch/btCollisionDispatcher.cpp - CollisionDispatch/btCollisionDispatcher.h - CollisionDispatch/btCollisionObject.cpp - CollisionDispatch/btCollisionObject.h - CollisionDispatch/btCollisionWorld.cpp - CollisionDispatch/btCollisionWorld.h - CollisionDispatch/btCompoundCollisionAlgorithm.cpp - CollisionDispatch/btCompoundCollisionAlgorithm.h - CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp - CollisionDispatch/btConvexConcaveCollisionAlgorithm.h - CollisionDispatch/btDefaultCollisionConfiguration.cpp - CollisionDispatch/btDefaultCollisionConfiguration.h - CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp - CollisionDispatch/btSphereSphereCollisionAlgorithm.h - CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp - CollisionDispatch/btBoxBoxCollisionAlgorithm.h - CollisionDispatch/btBoxBoxDetector.cpp - CollisionDispatch/btBoxBoxDetector.h - CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp - CollisionDispatch/btSphereBoxCollisionAlgorithm.h - CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp - CollisionDispatch/btConvexPlaneCollisionAlgorithm.h - CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp - CollisionDispatch/btSphereTriangleCollisionAlgorithm.h - CollisionDispatch/btConvexConvexAlgorithm.cpp - CollisionDispatch/btConvexConvexAlgorithm.h - CollisionDispatch/btEmptyCollisionAlgorithm.cpp - CollisionDispatch/btEmptyCollisionAlgorithm.h - CollisionDispatch/btManifoldResult.cpp - CollisionDispatch/btManifoldResult.h - CollisionDispatch/btSimulationIslandManager.cpp - CollisionDispatch/btSimulationIslandManager.h - CollisionDispatch/btUnionFind.cpp - CollisionDispatch/btUnionFind.h - CollisionDispatch/SphereTriangleDetector.cpp - CollisionDispatch/SphereTriangleDetector.h - CollisionShapes/btBoxShape.cpp - CollisionShapes/btBoxShape.h - CollisionShapes/btBvhTriangleMeshShape.cpp - CollisionShapes/btBvhTriangleMeshShape.h - CollisionShapes/btCapsuleShape.cpp - CollisionShapes/btCapsuleShape.h - CollisionShapes/btCollisionShape.cpp - CollisionShapes/btCollisionShape.h - CollisionShapes/btCompoundShape.cpp - CollisionShapes/btCompoundShape.h - CollisionShapes/btConcaveShape.cpp - CollisionShapes/btConcaveShape.h - CollisionShapes/btConeShape.cpp - CollisionShapes/btConeShape.h - CollisionShapes/btConvexHullShape.cpp - CollisionShapes/btConvexHullShape.h - CollisionShapes/btConvexShape.cpp - CollisionShapes/btConvexShape.h - CollisionShapes/btConvexInternalShape.cpp - CollisionShapes/btConvexInternalShape.h - CollisionShapes/btConvexTriangleMeshShape.cpp - CollisionShapes/btConvexTriangleMeshShape.h - CollisionShapes/btCylinderShape.cpp - CollisionShapes/btCylinderShape.h - CollisionShapes/btEmptyShape.cpp - CollisionShapes/btEmptyShape.h - CollisionShapes/btHeightfieldTerrainShape.cpp - CollisionShapes/btHeightfieldTerrainShape.h - CollisionShapes/btMinkowskiSumShape.cpp - CollisionShapes/btMinkowskiSumShape.h - CollisionShapes/btMaterial.h - CollisionShapes/btMultimaterialTriangleMeshShape.cpp - CollisionShapes/btMultimaterialTriangleMeshShape.h - CollisionShapes/btMultiSphereShape.cpp - CollisionShapes/btMultiSphereShape.h - CollisionShapes/btOptimizedBvh.cpp - CollisionShapes/btOptimizedBvh.h - CollisionShapes/btPolyhedralConvexShape.cpp - CollisionShapes/btPolyhedralConvexShape.h - CollisionShapes/btScaledBvhTriangleMeshShape.cpp - CollisionShapes/btScaledBvhTriangleMeshShape.h - CollisionShapes/btTetrahedronShape.cpp - CollisionShapes/btTetrahedronShape.h - CollisionShapes/btSphereShape.cpp - CollisionShapes/btSphereShape.h - CollisionShapes/btShapeHull.h - CollisionShapes/btShapeHull.cpp - CollisionShapes/btStaticPlaneShape.cpp - CollisionShapes/btStaticPlaneShape.h - CollisionShapes/btStridingMeshInterface.cpp - CollisionShapes/btStridingMeshInterface.h - CollisionShapes/btTriangleCallback.cpp - CollisionShapes/btTriangleCallback.h - CollisionShapes/btTriangleBuffer.cpp - CollisionShapes/btTriangleBuffer.h - CollisionShapes/btTriangleIndexVertexArray.cpp - CollisionShapes/btTriangleIndexVertexArray.h - CollisionShapes/btTriangleIndexVertexMaterialArray.h - CollisionShapes/btTriangleIndexVertexMaterialArray.cpp - CollisionShapes/btTriangleMesh.cpp - CollisionShapes/btTriangleMesh.h - CollisionShapes/btTriangleMeshShape.cpp - CollisionShapes/btTriangleMeshShape.h - CollisionShapes/btUniformScalingShape.cpp - CollisionShapes/btUniformScalingShape.h - NarrowPhaseCollision/btContinuousConvexCollision.cpp - NarrowPhaseCollision/btContinuousConvexCollision.h - NarrowPhaseCollision/btGjkEpa.cpp - NarrowPhaseCollision/btGjkEpa.h - NarrowPhaseCollision/btGjkEpa2.cpp - NarrowPhaseCollision/btGjkEpa2.h - NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp - NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h - NarrowPhaseCollision/btConvexCast.cpp - NarrowPhaseCollision/btConvexCast.h - NarrowPhaseCollision/btGjkConvexCast.cpp - NarrowPhaseCollision/btGjkConvexCast.h - NarrowPhaseCollision/btGjkPairDetector.cpp - NarrowPhaseCollision/btGjkPairDetector.h - NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp - NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h - NarrowPhaseCollision/btPersistentManifold.cpp - NarrowPhaseCollision/btPersistentManifold.h - NarrowPhaseCollision/btRaycastCallback.cpp - NarrowPhaseCollision/btRaycastCallback.h - NarrowPhaseCollision/btSubSimplexConvexCast.cpp - NarrowPhaseCollision/btSubSimplexConvexCast.h - NarrowPhaseCollision/btVoronoiSimplexSolver.cpp - NarrowPhaseCollision/btVoronoiSimplexSolver.h + +SET(Root_HDRS + ../btBulletCollisionCommon.h ) +SET(BroadphaseCollision_HDRS + BroadphaseCollision/btAxisSweep3.h + BroadphaseCollision/btBroadphaseInterface.h + BroadphaseCollision/btBroadphaseProxy.h + BroadphaseCollision/btCollisionAlgorithm.h + BroadphaseCollision/btDispatcher.h + BroadphaseCollision/btDbvtBroadphase.h + BroadphaseCollision/btDbvt.h + BroadphaseCollision/btMultiSapBroadphase.h + BroadphaseCollision/btOverlappingPairCache.h + BroadphaseCollision/btOverlappingPairCallback.h + BroadphaseCollision/btQuantizedBvh.h + BroadphaseCollision/btSimpleBroadphase.h +) +SET(CollisionDispatch_HDRS + CollisionDispatch/btActivatingCollisionAlgorithm.h + CollisionDispatch/btCollisionConfiguration.h + CollisionDispatch/btCollisionCreateFunc.h + CollisionDispatch/btCollisionDispatcher.h + CollisionDispatch/btCollisionObject.h + CollisionDispatch/btCollisionWorld.h + CollisionDispatch/btCompoundCollisionAlgorithm.h + CollisionDispatch/btConvexConcaveCollisionAlgorithm.h + CollisionDispatch/btDefaultCollisionConfiguration.h + CollisionDispatch/btSphereSphereCollisionAlgorithm.h + CollisionDispatch/btBoxBoxCollisionAlgorithm.h + CollisionDispatch/btBoxBoxDetector.h + CollisionDispatch/btGhostObject.h + CollisionDispatch/btSphereBoxCollisionAlgorithm.h + CollisionDispatch/btConvexPlaneCollisionAlgorithm.h + CollisionDispatch/btSphereTriangleCollisionAlgorithm.h + CollisionDispatch/btConvexConvexAlgorithm.h + CollisionDispatch/btEmptyCollisionAlgorithm.h + CollisionDispatch/btManifoldResult.h + CollisionDispatch/btSimulationIslandManager.h + CollisionDispatch/btUnionFind.h + CollisionDispatch/SphereTriangleDetector.h +) +SET(CollisionShapes_HDRS + CollisionShapes/btBoxShape.h + CollisionShapes/btBvhTriangleMeshShape.h + CollisionShapes/btCapsuleShape.h + CollisionShapes/btCollisionMargin + CollisionShapes/btCollisionShape.h + CollisionShapes/btCompoundShape.h + CollisionShapes/btConcaveShape.h + CollisionShapes/btConeShape.h + CollisionShapes/btConvexHullShape.h + CollisionShapes/btConvexPointCloudShape.h + CollisionShapes/btConvexShape.h + CollisionShapes/btConvexInternalShape.h + CollisionShapes/btConvexTriangleMeshShape.h + CollisionShapes/btCylinderShape.h + CollisionShapes/btEmptyShape.h + CollisionShapes/btHeightfieldTerrainShape.h + CollisionShapes/btMinkowskiSumShape.h + CollisionShapes/btMaterial.h + CollisionShapes/btMultimaterialTriangleMeshShape.h + CollisionShapes/btMultiSphereShape.h + CollisionShapes/btOptimizedBvh.h + CollisionShapes/btPolyhedralConvexShape.h + CollisionShapes/btScaledBvhTriangleMeshShape.h + CollisionShapes/btTetrahedronShape.h + CollisionShapes/btSphereShape.h + CollisionShapes/btShapeHull.h + CollisionShapes/btStaticPlaneShape.h + CollisionShapes/btStridingMeshInterface.h + CollisionShapes/btTriangleCallback.h + CollisionShapes/btTriangleBuffer.h + CollisionShapes/btTriangleIndexVertexArray.h + CollisionShapes/btTriangleIndexVertexMaterialArray.h + CollisionShapes/btTriangleMesh.h + CollisionShapes/btTriangleMeshShape.h + CollisionShapes/btUniformScalingShape.h +) +SET(Gimpact_HDRS + Gimpact/btGImpactShape.h + Gimpact/gim_contact.h + Gimpact/btGImpactBvh.h + Gimpact/btGenericPoolAllocator.h + Gimpact/gim_memory.h + Gimpact/btGImpactCollisionAlgorithm.h + Gimpact/btTriangleShapeEx.h + Gimpact/gim_tri_collision.h + Gimpact/btGImpactQuantizedBvh.h + Gimpact/gim_box_set.h +) +SET(NarrowPhaseCollision_HDRS + NarrowPhaseCollision/btContinuousConvexCollision.h + NarrowPhaseCollision/btConvexCast.h + NarrowPhaseCollision/btConvexPenetrationDepthSolver.h + NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h + NarrowPhaseCollision/btGjkConvexCast.h + NarrowPhaseCollision/btGjkEpa2.h + NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h + NarrowPhaseCollision/btGjkPairDetector.h + NarrowPhaseCollision/btManifoldPoint.h + NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h + NarrowPhaseCollision/btPersistentManifold.h + NarrowPhaseCollision/btPointCollector.h + NarrowPhaseCollision/btRaycastCallback.h + NarrowPhaseCollision/btSimplexSolverInterface.h + NarrowPhaseCollision/btSubSimplexConvexCast.h + NarrowPhaseCollision/btVoronoiSimplexSolver.h +) + +SET(BulletCollision_HDRS + ${Root_HDRS} + ${BroadphaseCollision_HDRS} + ${CollisionDispatch_HDRS} + ${CollisionShapes_HDRS} + ${Gimpact_HDRS} + ${NarrowPhaseCollision_HDRS} +) + + +ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS}) +SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION}) +IF (BUILD_SHARED_LIBS) + TARGET_LINK_LIBRARIES(BulletCollision LinearMath) +ENDIF (BUILD_SHARED_LIBS) + +#INSTALL of other files requires CMake 2.6 +IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + INSTALL(TARGETS BulletCollision DESTINATION lib) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + +IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + SET_TARGET_PROPERTIES(BulletCollision PROPERTIES FRAMEWORK true) + + SET_TARGET_PROPERTIES(BulletCollision PROPERTIES PUBLIC_HEADER "${Root_HDRS}") + # Have to list out sub-directories manually: + SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision) + SET_PROPERTY(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch) + SET_PROPERTY(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes) + SET_PROPERTY(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact) + SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision) + +ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp index f6c1e32ac7c..9a749a03793 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp @@ -19,9 +19,10 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btSphereShape.h" -SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle) +SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle,btScalar contactBreakingThreshold) :m_sphere(sphere), -m_triangle(triangle) +m_triangle(triangle), +m_contactBreakingThreshold(contactBreakingThreshold) { } @@ -40,7 +41,7 @@ void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Res //move sphere into triangle space btTransform sphereInTr = transformB.inverseTimes(transformA); - if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact)) + if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact,m_contactBreakingThreshold)) { if (swapResults) { @@ -93,7 +94,7 @@ bool SphereTriangleDetector::facecontains(const btVector3 &p,const btVector3* ve } ///combined discrete/continuous sphere-triangle -bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact) +bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold) { const btVector3* vertices = &m_triangle->getVertexPtr(0); @@ -115,10 +116,7 @@ bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &po normal *= btScalar(-1.); } - ///todo: move this gContactBreakingThreshold into a proper structure - extern btScalar gContactBreakingThreshold; - - btScalar contactMargin = gContactBreakingThreshold; + btScalar contactMargin = contactBreakingThreshold; bool isInsideContactPlane = distanceFromPlane < r + contactMargin; bool isInsideShellPlane = distanceFromPlane < r; @@ -140,8 +138,8 @@ bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &po btVector3 nearestOnEdge; for (int i = 0; i < m_triangle->getNumEdges(); i++) { - btPoint3 pa; - btPoint3 pb; + btVector3 pa; + btVector3 pb; m_triangle->getEdge(i,pa,pb); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h index 26dabaa480e..981bd54e76c 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h @@ -17,7 +17,7 @@ subject to the following restrictions: #define SPHERE_TRIANGLE_DETECTOR_H #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "LinearMath/btPoint3.h" + class btSphereShape; @@ -30,19 +30,19 @@ struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface { virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false); - SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle); + SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle, btScalar contactBreakingThreshold); virtual ~SphereTriangleDetector() {}; private: - bool collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact); + bool collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold); bool pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p ); bool facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal); btSphereShape* m_sphere; btTriangleShape* m_triangle; - + btScalar m_contactBreakingThreshold; }; #endif //SPHERE_TRIANGLE_DETECTOR_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp new file mode 100644 index 00000000000..7e5da6c5872 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp @@ -0,0 +1,47 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btActivatingCollisionAlgorithm.h" +#include "btCollisionDispatcher.h" +#include "btCollisionObject.h" + +btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci) +:btCollisionAlgorithm(ci) +//, +//m_colObj0(0), +//m_colObj1(0) +{ +} +btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* colObj0,btCollisionObject* colObj1) +:btCollisionAlgorithm(ci) +//, +//m_colObj0(0), +//m_colObj1(0) +{ +// if (ci.m_dispatcher1->needsCollision(colObj0,colObj1)) +// { +// m_colObj0 = colObj0; +// m_colObj1 = colObj1; +// +// m_colObj0->activate(); +// m_colObj1->activate(); +// } +} + +btActivatingCollisionAlgorithm::~btActivatingCollisionAlgorithm() +{ +// m_colObj0->activate(); +// m_colObj1->activate(); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h new file mode 100644 index 00000000000..25fe088942d --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h @@ -0,0 +1,36 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef __BT_ACTIVATING_COLLISION_ALGORITHM_H +#define __BT_ACTIVATING_COLLISION_ALGORITHM_H + +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" + +///This class is not enabled yet (work-in-progress) to more aggressively activate objects. +class btActivatingCollisionAlgorithm : public btCollisionAlgorithm +{ +// btCollisionObject* m_colObj0; +// btCollisionObject* m_colObj1; + +public: + + btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci); + + btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* colObj0,btCollisionObject* colObj1); + + virtual ~btActivatingCollisionAlgorithm(); + +}; +#endif //__BT_ACTIVATING_COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp index cd0c028012c..d3342c547b5 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp @@ -22,7 +22,7 @@ subject to the following restrictions: #define USE_PERSISTENT_CONTACTS 1 btBoxBoxCollisionAlgorithm::btBoxBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* obj0,btCollisionObject* obj1) -: btCollisionAlgorithm(ci), +: btActivatingCollisionAlgorithm(ci,obj0,obj1), m_ownManifold(false), m_manifoldPtr(mf) { diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h index 35afaf175a1..e7d2cc25c22 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef BOX_BOX__COLLISION_ALGORITHM_H #define BOX_BOX__COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" @@ -24,14 +24,14 @@ subject to the following restrictions: class btPersistentManifold; ///box-box collision detection -class btBoxBoxCollisionAlgorithm : public btCollisionAlgorithm +class btBoxBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm { bool m_ownManifold; btPersistentManifold* m_manifoldPtr; public: btBoxBoxCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) - : btCollisionAlgorithm(ci) {} + : btActivatingCollisionAlgorithm(ci) {} virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp index 45ebff5dc45..31353f1b2c4 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp @@ -207,7 +207,13 @@ void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[]) cy += q*(p[i*2+1]+p[i*2+3]); } q = p[n*2-2]*p[1] - p[0]*p[n*2-1]; - a = 1.f/(btScalar(3.0)*(a+q)); + if (btFabs(a+q) > SIMD_EPSILON) + { + a = 1.f/(btScalar(3.0)*(a+q)); + } else + { + a=1e30f; + } cx = a*(cx + q*(p[n*2-2]+p[0])); cy = a*(cy + q*(p[n*2-1]+p[1])); } @@ -226,9 +232,9 @@ void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[]) a = btScalar(j)*(2*M__PI/m) + A[i0]; if (a > M__PI) a -= 2*M__PI; btScalar maxdiff=1e9,diff; -#if defined(DEBUG) || defined (_DEBUG) - *iret = i0; // iret is not allowed to keep this value -#endif + + *iret = i0; // iret is not allowed to keep this value, but it sometimes does, when diff=#QNAN0 + for (i=0; i btCollisionObjectArray; class btCollisionAlgorithm; class btCollisionObject; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp index a031a9f9784..e6ff2130aad 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp @@ -52,12 +52,12 @@ btCollisionDispatcher::btCollisionDispatcher (btCollisionConfiguration* collisio for (int j=0;jgetCollisionAlgorithmCreateFunc(i,j); - assert(m_doubleDispatch[i][j]); + btAssert(m_doubleDispatch[i][j]); } } -}; +} void btCollisionDispatcher::registerCollisionCreateFunc(int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc *createFunc) @@ -78,7 +78,13 @@ btPersistentManifold* btCollisionDispatcher::getNewManifold(void* b0,void* b1) btCollisionObject* body0 = (btCollisionObject*)b0; btCollisionObject* body1 = (btCollisionObject*)b1; - + + //test for Bullet 2.74: use a relative contact breaking threshold without clamping against 'gContactBreakingThreshold' + //btScalar contactBreakingThreshold = btMin(gContactBreakingThreshold,btMin(body0->getCollisionShape()->getContactBreakingThreshold(),body1->getCollisionShape()->getContactBreakingThreshold())); + btScalar contactBreakingThreshold = btMin(body0->getCollisionShape()->getContactBreakingThreshold(),body1->getCollisionShape()->getContactBreakingThreshold()); + + btScalar contactProcessingThreshold = btMin(body0->getContactProcessingThreshold(),body1->getContactProcessingThreshold()); + void* mem = 0; if (m_persistentManifoldPoolAllocator->getFreeCount()) @@ -89,7 +95,7 @@ btPersistentManifold* btCollisionDispatcher::getNewManifold(void* b0,void* b1) mem = btAlignedAlloc(sizeof(btPersistentManifold),16); } - btPersistentManifold* manifold = new(mem) btPersistentManifold (body0,body1,0); + btPersistentManifold* manifold = new(mem) btPersistentManifold (body0,body1,0,contactBreakingThreshold,contactProcessingThreshold); manifold->m_index1a = m_manifoldsPtr.size(); m_manifoldsPtr.push_back(manifold); @@ -144,7 +150,6 @@ btCollisionAlgorithm* btCollisionDispatcher::findAlgorithm(btCollisionObject* bo - bool btCollisionDispatcher::needsResponse(btCollisionObject* body0,btCollisionObject* body1) { //here you can do filtering @@ -158,8 +163,8 @@ bool btCollisionDispatcher::needsResponse(btCollisionObject* body0,btCollisionOb bool btCollisionDispatcher::needsCollision(btCollisionObject* body0,btCollisionObject* body1) { - assert(body0); - assert(body1); + btAssert(body0); + btAssert(body1); bool needsCollision = true; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp index 846c9b9b989..285b8f174e4 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp @@ -19,6 +19,7 @@ subject to the following restrictions: btCollisionObject::btCollisionObject() : m_anisotropicFriction(1.f,1.f,1.f), m_hasAnisotropicFriction(false), + m_contactProcessingThreshold(0.f), m_broadphaseHandle(0), m_collisionShape(0), m_rootCollisionShape(0), diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h index 8442868cf89..0d5b7886443 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h @@ -29,8 +29,11 @@ struct btBroadphaseProxy; class btCollisionShape; #include "LinearMath/btMotionState.h" #include "LinearMath/btAlignedAllocator.h" +#include "LinearMath/btAlignedObjectArray.h" +typedef btAlignedObjectArray btCollisionObjectArray; + /// btCollisionObject can be used to manage collision detection objects. /// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy. @@ -49,8 +52,10 @@ protected: //without destroying the continuous interpolated motion (which uses this interpolation velocities) btVector3 m_interpolationLinearVelocity; btVector3 m_interpolationAngularVelocity; + btVector3 m_anisotropicFriction; - bool m_hasAnisotropicFriction; + bool m_hasAnisotropicFriction; + btScalar m_contactProcessingThreshold; btBroadphaseProxy* m_broadphaseHandle; btCollisionShape* m_collisionShape; @@ -74,7 +79,7 @@ protected: ///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer void* m_userObjectPointer; - ///m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody etc. + ///m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc. ///do not assign your own m_internalType unless you write a new dynamics object class. int m_internalType; @@ -106,14 +111,19 @@ public: CF_STATIC_OBJECT= 1, CF_KINEMATIC_OBJECT= 2, CF_NO_CONTACT_RESPONSE = 4, - CF_CUSTOM_MATERIAL_CALLBACK = 8//this allows per-triangle material (friction/restitution) + CF_CUSTOM_MATERIAL_CALLBACK = 8,//this allows per-triangle material (friction/restitution) + CF_CHARACTER_OBJECT = 16 }; enum CollisionObjectTypes { CO_COLLISION_OBJECT =1, CO_RIGID_BODY, - CO_SOFT_BODY + ///CO_GHOST_OBJECT keeps track of all objects overlapping its AABB and that pass its collision filter + ///It is useful for collision sensors, explosion objects, character controller etc. + CO_GHOST_OBJECT, + CO_SOFT_BODY, + CO_HF_FLUID }; SIMD_FORCE_INLINE bool mergesSimulationIslands() const @@ -136,6 +146,16 @@ public: return m_hasAnisotropicFriction; } + ///the constraint solver can discard solving contacts, if the distance is above this threshold. 0 by default. + ///Note that using contacts with positive distance can improve stability. It increases, however, the chance of colliding with degerate contacts, such as 'interior' triangle edges + void setContactProcessingThreshold( btScalar contactProcessingThreshold) + { + m_contactProcessingThreshold = contactProcessingThreshold; + } + btScalar getContactProcessingThreshold() const + { + return m_contactProcessingThreshold; + } SIMD_FORCE_INLINE bool isStaticObject() const { return (m_collisionFlags & CF_STATIC_OBJECT) != 0; @@ -193,7 +213,7 @@ public: m_collisionShape = collisionShape; } - int getActivationState() const { return m_activationState1;} + SIMD_FORCE_INLINE int getActivationState() const { return m_activationState1;} void setActivationState(int newState); @@ -210,7 +230,7 @@ public: void activate(bool forceActivation = false); - inline bool isActive() const + SIMD_FORCE_INLINE bool isActive() const { return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION)); } @@ -254,12 +274,12 @@ public: } - btBroadphaseProxy* getBroadphaseHandle() + SIMD_FORCE_INLINE btBroadphaseProxy* getBroadphaseHandle() { return m_broadphaseHandle; } - const btBroadphaseProxy* getBroadphaseHandle() const + SIMD_FORCE_INLINE const btBroadphaseProxy* getBroadphaseHandle() const { return m_broadphaseHandle; } @@ -305,7 +325,7 @@ public: return m_interpolationAngularVelocity; } - const int getIslandTag() const + SIMD_FORCE_INLINE int getIslandTag() const { return m_islandTag1; } @@ -315,7 +335,7 @@ public: m_islandTag1 = tag; } - const int getCompanionId() const + SIMD_FORCE_INLINE int getCompanionId() const { return m_companionId; } @@ -325,7 +345,7 @@ public: m_companionId = id; } - const btScalar getHitFraction() const + SIMD_FORCE_INLINE btScalar getHitFraction() const { return m_hitFraction; } @@ -336,7 +356,7 @@ public: } - const int getCollisionFlags() const + SIMD_FORCE_INLINE int getCollisionFlags() const { return m_collisionFlags; } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp index d8674a320a7..10e880e2523 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp @@ -32,6 +32,9 @@ subject to the following restrictions: #include "LinearMath/btQuickprof.h" #include "LinearMath/btStackAlloc.h" +//#define USE_BRUTEFORCE_RAYBROADPHASE 1 +//RECALCULATE_AABB is slower, but benefit is that you don't need to call 'stepSimulation' or 'updateAabbs' before using a rayTest +//#define RECALCULATE_AABB_RAYCAST 1 //When the user doesn't provide dispatcher or broadphase, create basic versions (and delete them in destructor) #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" @@ -66,6 +69,7 @@ btCollisionWorld::~btCollisionWorld() // getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1); getBroadphase()->destroyProxy(bp,m_dispatcher1); + collisionObject->setBroadphaseHandle(0); } } @@ -111,6 +115,41 @@ void btCollisionWorld::addCollisionObject(btCollisionObject* collisionObject,sho +} + + + +void btCollisionWorld::updateSingleAabb(btCollisionObject* colObj) +{ + btVector3 minAabb,maxAabb; + colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); + //need to increase the aabb for contact thresholds + btVector3 contactThreshold(gContactBreakingThreshold,gContactBreakingThreshold,gContactBreakingThreshold); + minAabb -= contactThreshold; + maxAabb += contactThreshold; + + btBroadphaseInterface* bp = (btBroadphaseInterface*)m_broadphasePairCache; + + //moving objects should be moderately sized, probably something wrong if not + if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < btScalar(1e12))) + { + bp->setAabb(colObj->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); + } else + { + //something went wrong, investigate + //this assert is unwanted in 3D modelers (danger of loosing work) + colObj->setActivationState(DISABLE_SIMULATION); + + static bool reportMe = true; + if (reportMe && m_debugDrawer) + { + reportMe = false; + m_debugDrawer->reportErrorWarning("Overflow in AABB, object removed from simulation"); + m_debugDrawer->reportErrorWarning("If you can reproduce this, please email bugs@continuousphysics.com\n"); + m_debugDrawer->reportErrorWarning("Please include above information, your Platform, version of OS.\n"); + m_debugDrawer->reportErrorWarning("Thanks.\n"); + } + } } void btCollisionWorld::updateAabbs() @@ -125,38 +164,9 @@ void btCollisionWorld::updateAabbs() //only update aabb of active objects if (colObj->isActive()) { - btPoint3 minAabb,maxAabb; - colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); - //need to increase the aabb for contact thresholds - btVector3 contactThreshold(gContactBreakingThreshold,gContactBreakingThreshold,gContactBreakingThreshold); - minAabb -= contactThreshold; - maxAabb += contactThreshold; - - btBroadphaseInterface* bp = (btBroadphaseInterface*)m_broadphasePairCache; - - //moving objects should be moderately sized, probably something wrong if not - if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < btScalar(1e12))) - { - bp->setAabb(colObj->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); - } else - { - //something went wrong, investigate - //this assert is unwanted in 3D modelers (danger of loosing work) - colObj->setActivationState(DISABLE_SIMULATION); - - static bool reportMe = true; - if (reportMe && m_debugDrawer) - { - reportMe = false; - m_debugDrawer->reportErrorWarning("Overflow in AABB, object removed from simulation"); - m_debugDrawer->reportErrorWarning("If you can reproduce this, please email bugs@continuousphysics.com\n"); - m_debugDrawer->reportErrorWarning("Please include above information, your Platform, version of OS.\n"); - m_debugDrawer->reportErrorWarning("Thanks.\n"); - } - } + updateSingleAabb(colObj); } } - } @@ -226,6 +236,7 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra if (collisionShape->isConvex()) { +// BT_PROFILE("rayTestConvex"); btConvexCast::CastResult castResult; castResult.m_fraction = resultCallback.m_closestHitFraction; @@ -269,6 +280,7 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra } else { if (collisionShape->isConcave()) { +// BT_PROFILE("rayTestConcave"); if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE) { ///optimized version for btBvhTriangleMeshShape @@ -286,7 +298,8 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to, btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh): - btTriangleRaycastCallback(from,to), + //@BP Mod + btTriangleRaycastCallback(from,to, resultCallback->m_flags), m_resultCallback(resultCallback), m_collisionObject(collisionObject), m_triangleMesh(triangleMesh) @@ -317,7 +330,8 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra triangleMesh->performRaycast(&rcb,rayFromLocal,rayToLocal); } else { - btTriangleMeshShape* triangleMesh = (btTriangleMeshShape*)collisionShape; + //generic (slower) case + btConcaveShape* concaveShape = (btConcaveShape*)collisionShape; btTransform worldTocollisionObject = colObjWorldTransform.inverse(); @@ -330,11 +344,12 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra { btCollisionWorld::RayResultCallback* m_resultCallback; btCollisionObject* m_collisionObject; - btTriangleMeshShape* m_triangleMesh; + btConcaveShape* m_triangleMesh; BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to, - btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh): - btTriangleRaycastCallback(from,to), + btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btConcaveShape* triangleMesh): + //@BP Mod + btTriangleRaycastCallback(from,to, resultCallback->m_flags), m_resultCallback(resultCallback), m_collisionObject(collisionObject), m_triangleMesh(triangleMesh) @@ -363,7 +378,7 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra }; - BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,triangleMesh); + BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,concaveShape); rcb.m_hitFraction = resultCallback.m_closestHitFraction; btVector3 rayAabbMinLocal = rayFromLocal; @@ -371,10 +386,11 @@ void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra btVector3 rayAabbMaxLocal = rayFromLocal; rayAabbMaxLocal.setMax(rayToLocal); - triangleMesh->processAllTriangles(&rcb,rayAabbMinLocal,rayAabbMaxLocal); + concaveShape->processAllTriangles(&rcb,rayAabbMinLocal,rayAabbMaxLocal); } } else { - //todo: use AABB tree or other BVH acceleration structure! +// BT_PROFILE("rayTestCompound"); + ///@todo: use AABB tree or other BVH acceleration structure, see btDbvt if (collisionShape->isCompound()) { const btCompoundShape* compoundShape = static_cast(collisionShape); @@ -408,9 +424,10 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt { if (collisionShape->isConvex()) { + //BT_PROFILE("convexSweepConvex"); btConvexCast::CastResult castResult; castResult.m_allowedPenetration = allowedPenetration; - castResult.m_fraction = btScalar(1.);//?? + castResult.m_fraction = resultCallback.m_closestHitFraction;//btScalar(1.);//?? btConvexShape* convexShape = (btConvexShape*) collisionShape; btVoronoiSimplexSolver simplexSolver; @@ -452,6 +469,7 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt { if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE) { + //BT_PROFILE("convexSweepbtBvhTriangleMesh"); btBvhTriangleMeshShape* triangleMesh = (btBvhTriangleMeshShape*)collisionShape; btTransform worldTocollisionObject = colObjWorldTransform.inverse(); btVector3 convexFromLocal = worldTocollisionObject * convexFromTrans.getOrigin(); @@ -508,7 +526,8 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt triangleMesh->performConvexcast(&tccb,convexFromLocal,convexToLocal,boxMinLocal, boxMaxLocal); } else { - btBvhTriangleMeshShape* triangleMesh = (btBvhTriangleMeshShape*)collisionShape; + //BT_PROFILE("convexSweepConcave"); + btConcaveShape* concaveShape = (btConcaveShape*)collisionShape; btTransform worldTocollisionObject = colObjWorldTransform.inverse(); btVector3 convexFromLocal = worldTocollisionObject * convexFromTrans.getOrigin(); btVector3 convexToLocal = worldTocollisionObject * convexToTrans.getOrigin(); @@ -520,10 +539,10 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt { btCollisionWorld::ConvexResultCallback* m_resultCallback; btCollisionObject* m_collisionObject; - btTriangleMeshShape* m_triangleMesh; + btConcaveShape* m_triangleMesh; BridgeTriangleConvexcastCallback(const btConvexShape* castShape, const btTransform& from,const btTransform& to, - btCollisionWorld::ConvexResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh, const btTransform& triangleToWorld): + btCollisionWorld::ConvexResultCallback* resultCallback, btCollisionObject* collisionObject,btConcaveShape* triangleMesh, const btTransform& triangleToWorld): btTriangleConvexcastCallback(castShape, from,to, triangleToWorld, triangleMesh->getMargin()), m_resultCallback(resultCallback), m_collisionObject(collisionObject), @@ -556,7 +575,7 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt }; - BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,collisionObject,triangleMesh, colObjWorldTransform); + BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,collisionObject,concaveShape, colObjWorldTransform); tccb.m_hitFraction = resultCallback.m_closestHitFraction; btVector3 boxMinLocal, boxMaxLocal; castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal); @@ -567,12 +586,13 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt rayAabbMaxLocal.setMax(convexToLocal); rayAabbMinLocal += boxMinLocal; rayAabbMaxLocal += boxMaxLocal; - triangleMesh->processAllTriangles(&tccb,rayAabbMinLocal,rayAabbMaxLocal); + concaveShape->processAllTriangles(&tccb,rayAabbMinLocal,rayAabbMaxLocal); } } else { - //todo: use AABB tree or other BVH acceleration structure! + ///@todo : use AABB tree or other BVH acceleration structure! if (collisionShape->isCompound()) { + BT_PROFILE("convexSweepCompound"); const btCompoundShape* compoundShape = static_cast(collisionShape); int i=0; for (i=0;igetNumChildShapes();i++) @@ -596,51 +616,173 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt } } -void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const + +struct btSingleRayCallback : public btBroadphaseRayCallback { + btVector3 m_rayFromWorld; + btVector3 m_rayToWorld; + btTransform m_rayFromTrans; + btTransform m_rayToTrans; + btVector3 m_hitNormal; - btTransform rayFromTrans,rayToTrans; - rayFromTrans.setIdentity(); - rayFromTrans.setOrigin(rayFromWorld); - rayToTrans.setIdentity(); + const btCollisionWorld* m_world; + btCollisionWorld::RayResultCallback& m_resultCallback; - rayToTrans.setOrigin(rayToWorld); - - /// go over all objects, and if the ray intersects their aabb, do a ray-shape query using convexCaster (CCD) - - int i; - for (i=0;igetBroadphaseHandle())) { - //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); - btVector3 collisionObjectAabbMin,collisionObjectAabbMax; - collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax); + btVector3 rayDir = (rayToWorld-rayFromWorld); - btScalar hitLambda = resultCallback.m_closestHitFraction; - btVector3 hitNormal; - if (btRayAabb(rayFromWorld,rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal)) - { - rayTestSingle(rayFromTrans,rayToTrans, - collisionObject, - collisionObject->getCollisionShape(), - collisionObject->getWorldTransform(), - resultCallback); - } - } + rayDir.normalize (); + ///what about division by zero? --> just set rayDirection[i] to INF/1e30 + m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[0]; + m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[1]; + m_rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[2]; + m_signs[0] = m_rayDirectionInverse[0] < 0.0; + m_signs[1] = m_rayDirectionInverse[1] < 0.0; + m_signs[2] = m_rayDirectionInverse[2] < 0.0; + + m_lambda_max = rayDir.dot(m_rayToWorld-m_rayFromWorld); } + + + virtual bool process(const btBroadphaseProxy* proxy) + { + ///terminate further ray tests, once the closestHitFraction reached zero + if (m_resultCallback.m_closestHitFraction == btScalar(0.f)) + return false; + + btCollisionObject* collisionObject = (btCollisionObject*)proxy->m_clientObject; + + //only perform raycast if filterMask matches + if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle())) + { + //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); + //btVector3 collisionObjectAabbMin,collisionObjectAabbMax; +#if 0 +#ifdef RECALCULATE_AABB + btVector3 collisionObjectAabbMin,collisionObjectAabbMax; + collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax); +#else + //getBroadphase()->getAabb(collisionObject->getBroadphaseHandle(),collisionObjectAabbMin,collisionObjectAabbMax); + const btVector3& collisionObjectAabbMin = collisionObject->getBroadphaseHandle()->m_aabbMin; + const btVector3& collisionObjectAabbMax = collisionObject->getBroadphaseHandle()->m_aabbMax; +#endif +#endif + //btScalar hitLambda = m_resultCallback.m_closestHitFraction; + //culling already done by broadphase + //if (btRayAabb(m_rayFromWorld,m_rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,m_hitNormal)) + { + m_world->rayTestSingle(m_rayFromTrans,m_rayToTrans, + collisionObject, + collisionObject->getCollisionShape(), + collisionObject->getWorldTransform(), + m_resultCallback); + } + } + return true; + } +}; + +void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const +{ + BT_PROFILE("rayTest"); + /// use the broadphase to accelerate the search for objects, based on their aabb + /// and for each object with ray-aabb overlap, perform an exact ray test + btSingleRayCallback rayCB(rayFromWorld,rayToWorld,this,resultCallback); + +#ifndef USE_BRUTEFORCE_RAYBROADPHASE + m_broadphasePairCache->rayTest(rayFromWorld,rayToWorld,rayCB); +#else + for (int i=0;igetNumCollisionObjects();i++) + { + rayCB.process(m_collisionObjects[i]->getBroadphaseHandle()); + } +#endif //USE_BRUTEFORCE_RAYBROADPHASE + } -void btCollisionWorld::convexSweepTest(const btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, ConvexResultCallback& resultCallback) const + +struct btSingleSweepCallback : public btBroadphaseRayCallback { + + btTransform m_convexFromTrans; + btTransform m_convexToTrans; + btVector3 m_hitNormal; + const btCollisionWorld* m_world; + btCollisionWorld::ConvexResultCallback& m_resultCallback; + btScalar m_allowedCcdPenetration; + const btConvexShape* m_castShape; + + + btSingleSweepCallback(const btConvexShape* castShape, const btTransform& convexFromTrans,const btTransform& convexToTrans,const btCollisionWorld* world,btCollisionWorld::ConvexResultCallback& resultCallback,btScalar allowedPenetration) + :m_convexFromTrans(convexFromTrans), + m_convexToTrans(convexToTrans), + m_world(world), + m_resultCallback(resultCallback), + m_allowedCcdPenetration(allowedPenetration), + m_castShape(castShape) + { + btVector3 unnormalizedRayDir = (m_convexToTrans.getOrigin()-m_convexFromTrans.getOrigin()); + btVector3 rayDir = unnormalizedRayDir.normalized(); + ///what about division by zero? --> just set rayDirection[i] to INF/1e30 + m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[0]; + m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[1]; + m_rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[2]; + m_signs[0] = m_rayDirectionInverse[0] < 0.0; + m_signs[1] = m_rayDirectionInverse[1] < 0.0; + m_signs[2] = m_rayDirectionInverse[2] < 0.0; + + m_lambda_max = rayDir.dot(unnormalizedRayDir); + + } + + virtual bool process(const btBroadphaseProxy* proxy) + { + ///terminate further convex sweep tests, once the closestHitFraction reached zero + if (m_resultCallback.m_closestHitFraction == btScalar(0.f)) + return false; + + btCollisionObject* collisionObject = (btCollisionObject*)proxy->m_clientObject; + + //only perform raycast if filterMask matches + if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle())) { + //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); + m_world->objectQuerySingle(m_castShape, m_convexFromTrans,m_convexToTrans, + collisionObject, + collisionObject->getCollisionShape(), + collisionObject->getWorldTransform(), + m_resultCallback, + m_allowedCcdPenetration); + } + + return true; + } +}; + + + +void btCollisionWorld::convexSweepTest(const btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration) const +{ + + BT_PROFILE("convexSweepTest"); + /// use the broadphase to accelerate the search for objects, based on their aabb + /// and for each object with ray-aabb overlap, perform an exact ray test + /// unfortunately the implementation for rayTest and convexSweepTest duplicated, albeit practically identical + + + btTransform convexFromTrans,convexToTrans; convexFromTrans = convexFromWorld; convexToTrans = convexToWorld; @@ -649,12 +791,21 @@ void btCollisionWorld::convexSweepTest(const btConvexShape* castShape, const btT { btVector3 linVel, angVel; btTransformUtil::calculateVelocity (convexFromTrans, convexToTrans, 1.0, linVel, angVel); + btVector3 zeroLinVel; + zeroLinVel.setValue(0,0,0); btTransform R; R.setIdentity (); R.setRotation (convexFromTrans.getRotation()); - castShape->calculateTemporalAabb (R, linVel, angVel, 1.0, castShapeAabbMin, castShapeAabbMax); + castShape->calculateTemporalAabb (R, zeroLinVel, angVel, 1.0, castShapeAabbMin, castShapeAabbMax); } +#ifndef USE_BRUTEFORCE_RAYBROADPHASE + + btSingleSweepCallback convexCB(castShape,convexFromWorld,convexToWorld,this,resultCallback,allowedCcdPenetration); + + m_broadphasePairCache->rayTest(convexFromTrans.getOrigin(),convexToTrans.getOrigin(),convexCB,castShapeAabbMin,castShapeAabbMax); + +#else /// go over all objects, and if the ray intersects their aabb + cast shape aabb, // do a ray-shape query using convexCaster (CCD) int i; @@ -676,9 +827,9 @@ void btCollisionWorld::convexSweepTest(const btConvexShape* castShape, const btT collisionObject->getCollisionShape(), collisionObject->getWorldTransform(), resultCallback, - getDispatchInfo().m_allowedCcdPenetration); + allowedCcdPenetration); } } } - +#endif //USE_BRUTEFORCE_RAYBROADPHASE } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h index 7557691a9a9..87f7137a55b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h @@ -1,6 +1,6 @@ /* Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ +Copyright (c) 2003-2006 Erwin Coumans http://bulletphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. @@ -22,39 +22,39 @@ subject to the following restrictions: * * Bullet is a Collision Detection and Rigid Body Dynamics Library. The Library is Open Source and free for commercial use, under the ZLib license ( http://opensource.org/licenses/zlib-license.php ). * - * There is the Physics Forum for Feedback and bteral Collision Detection and Physics discussions. - * Please visit http://www.continuousphysics.com/Bullet/phpBB2/index.php + * There is the Physics Forum for feedback and general Collision Detection and Physics discussions. + * Please visit http://www.bulletphysics.com * * @section install_sec Installation * * @subsection step1 Step 1: Download - * You can download the Bullet Physics Library from our website: http://www.continuousphysics.com/Bullet/ + * You can download the Bullet Physics Library from the Google Code repository: http://code.google.com/p/bullet/downloads/list * @subsection step2 Step 2: Building * Bullet comes with autogenerated Project Files for Microsoft Visual Studio 6, 7, 7.1 and 8. * The main Workspace/Solution is located in Bullet/msvc/8/wksbullet.sln (replace 8 with your version). * - * Under other platforms, like Linux or Mac OS-X, Bullet can be build using either using cmake, http://www.cmake.org, or jam, http://www.perforce.com/jam/jam.html . cmake can autogenerate Xcode, KDevelop, MSVC and other build systems. just run cmake . in the root of Bullet. + * Under other platforms, like Linux or Mac OS-X, Bullet can be build using either using make, cmake, http://www.cmake.org , or jam, http://www.perforce.com/jam/jam.html . cmake can autogenerate Xcode, KDevelop, MSVC and other build systems. just run cmake . in the root of Bullet. + * So if you are not using MSVC or cmake, you can run ./autogen.sh ./configure to create both Makefile and Jamfile and then run make or jam. * Jam is a build system that can build the library, demos and also autogenerate the MSVC Project Files. - * So if you are not using MSVC, you can run configure and jam . - * If you don't have jam installed, you can make jam from the included jam-2.5 sources, or download jam from ftp://ftp.perforce.com/pub/jam/ + * If you don't have jam installed, you can make jam from the included jam-2.5 sources, or download jam from ftp://ftp.perforce.com/jam * * @subsection step3 Step 3: Testing demos - * Try to run and experiment with CcdPhysicsDemo executable as a starting point. + * Try to run and experiment with BasicDemo executable as a starting point. * Bullet can be used in several ways, as Full Rigid Body simulation, as Collision Detector Library or Low Level / Snippets like the GJK Closest Point calculation. * The Dependencies can be seen in this documentation under Directories * - * @subsection step4 Step 4: Integrating in your application, Full Rigid Body Simulation - * Check out CcdPhysicsDemo how to create a btDynamicsWorld, btRigidBody and btCollisionShape, Stepping the simulation and synchronizing your graphics object transform. - * PLEASE NOTE THE CcdPhysicsEnvironment and CcdPhysicsController is obsolete and will be removed. It has been replaced by classes derived frmo btDynamicsWorld and btRididBody + * @subsection step4 Step 4: Integrating in your application, full Rigid Body and Soft Body simulation + * Check out BasicDemo how to create a btDynamicsWorld, btRigidBody and btCollisionShape, Stepping the simulation and synchronizing your graphics object transform. + * Check out SoftDemo how to use soft body dynamics, using btSoftRigidDynamicsWorld. * @subsection step5 Step 5 : Integrate the Collision Detection Library (without Dynamics and other Extras) * Bullet Collision Detection can also be used without the Dynamics/Extras. - * Check out btCollisionWorld and btCollisionObject, and the CollisionInterfaceDemo. Also in Extras/test_BulletOde.cpp there is a sample Collision Detection integration with Open Dynamics Engine, ODE, http://www.ode.org + * Check out btCollisionWorld and btCollisionObject, and the CollisionInterfaceDemo. * @subsection step6 Step 6 : Use Snippets like the GJK Closest Point calculation. * Bullet has been designed in a modular way keeping dependencies to a minimum. The ConvexHullDistance demo demonstrates direct use of btGjkPairDetector. * * @section copyright Copyright - * Copyright (C) 2005-2007 Erwin Coumans, some contributions Copyright Gino van den Bergen, Christer Ericson, Simon Hobbs, Ricardo Padrela, F Richter(res), Stephane Redon - * Special thanks to all visitors of the Bullet Physics forum, and in particular above contributors, Dave Eberle, Dirk Gregorius, Erin Catto, Dave Eberle, Adam Moravanszky, + * Copyright (C) 2005-2008 Erwin Coumans, some contributions Copyright Gino van den Bergen, Christer Ericson, Simon Hobbs, Ricardo Padrela, F Richter(res), Stephane Redon + * Special thanks to all visitors of the Bullet Physics forum, and in particular above contributors, John McCutchan, Nathanael Presson, Dave Eberle, Dirk Gregorius, Erin Catto, Dave Eberle, Adam Moravanszky, * Pierre Terdiman, Kenny Erleben, Russell Smith, Oliver Strunk, Jan Paul van Waveren, Marten Svanfeldt. * */ @@ -71,7 +71,7 @@ class btBroadphaseInterface; #include "LinearMath/btVector3.h" #include "LinearMath/btTransform.h" #include "btCollisionObject.h" -#include "btCollisionDispatcher.h" //for definition of btCollisionObjectArray +#include "btCollisionDispatcher.h" #include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" #include "LinearMath/btAlignedObjectArray.h" @@ -107,6 +107,11 @@ public: m_broadphasePairCache = pairCache; } + const btBroadphaseInterface* getBroadphase() const + { + return m_broadphasePairCache; + } + btBroadphaseInterface* getBroadphase() { return m_broadphasePairCache; @@ -128,8 +133,10 @@ public: return m_dispatcher1; } - virtual void updateAabbs(); + void updateSingleAabb(btCollisionObject* colObj); + virtual void updateAabbs(); + virtual void setDebugDrawer(btIDebugDraw* debugDrawer) { m_debugDrawer = debugDrawer; @@ -179,6 +186,8 @@ public: btCollisionObject* m_collisionObject; short int m_collisionFilterGroup; short int m_collisionFilterMask; + //@BP Mod - Custom flags, currently used to enable backface culling on tri-meshes, see btRaycastCallback + unsigned int m_flags; virtual ~RayResultCallback() { @@ -192,7 +201,9 @@ public: :m_closestHitFraction(btScalar(1.)), m_collisionObject(0), m_collisionFilterGroup(btBroadphaseProxy::DefaultFilter), - m_collisionFilterMask(btBroadphaseProxy::AllFilter) + m_collisionFilterMask(btBroadphaseProxy::AllFilter), + //@BP Mod + m_flags(0) { } @@ -347,7 +358,7 @@ public: // convexTest performs a swept convex cast on all objects in the btCollisionWorld, and calls the resultCallback // This allows for several queries: first hit, all hits, any hit, dependent on the value return by the callback. - void convexSweepTest (const btConvexShape* castShape, const btTransform& from, const btTransform& to, ConvexResultCallback& resultCallback) const; + void convexSweepTest (const btConvexShape* castShape, const btTransform& from, const btTransform& to, ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration = btScalar(0.)) const; /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp index 535b61992b0..1dea91a0b0b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp @@ -19,19 +19,32 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btDbvt.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btAabbUtil2.h" +#include "btManifoldResult.h" btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) -:btCollisionAlgorithm(ci), +:btActivatingCollisionAlgorithm(ci,body0,body1), m_isSwapped(isSwapped), m_sharedManifold(ci.m_manifold) { m_ownsManifold = false; btCollisionObject* colObj = m_isSwapped? body1 : body0; - btCollisionObject* otherObj = m_isSwapped? body0 : body1; - assert (colObj->getCollisionShape()->isCompound()); + btAssert (colObj->getCollisionShape()->isCompound()); btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); + m_compoundShapeRevision = compoundShape->getUpdateRevision(); + + preallocateChildAlgorithms(body0,body1); +} + +void btCompoundCollisionAlgorithm::preallocateChildAlgorithms(btCollisionObject* body0,btCollisionObject* body1) +{ + btCollisionObject* colObj = m_isSwapped? body1 : body0; + btCollisionObject* otherObj = m_isSwapped? body0 : body1; + btAssert (colObj->getCollisionShape()->isCompound()); + + btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); + int numChildren = compoundShape->getNumChildShapes(); int i; @@ -46,14 +59,13 @@ m_sharedManifold(ci.m_manifold) btCollisionShape* tmpShape = colObj->getCollisionShape(); btCollisionShape* childShape = compoundShape->getChildShape(i); colObj->internalSetTemporaryCollisionShape( childShape ); - m_childCollisionAlgorithms[i] = ci.m_dispatcher1->findAlgorithm(colObj,otherObj,m_sharedManifold); + m_childCollisionAlgorithms[i] = m_dispatcher->findAlgorithm(colObj,otherObj,m_sharedManifold); colObj->internalSetTemporaryCollisionShape( tmpShape ); } } } - -btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm() +void btCompoundCollisionAlgorithm::removeChildAlgorithms() { int numChildren = m_childCollisionAlgorithms.size(); int i; @@ -67,6 +79,11 @@ btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm() } } +btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm() +{ + removeChildAlgorithms(); +} + @@ -167,13 +184,50 @@ void btCompoundCollisionAlgorithm::processCollision (btCollisionObject* body0,bt btCollisionObject* colObj = m_isSwapped? body1 : body0; btCollisionObject* otherObj = m_isSwapped? body0 : body1; - assert (colObj->getCollisionShape()->isCompound()); + + + btAssert (colObj->getCollisionShape()->isCompound()); btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); + ///btCompoundShape might have changed: + ////make sure the internal child collision algorithm caches are still valid + if (compoundShape->getUpdateRevision() != m_compoundShapeRevision) + { + ///clear and update all + removeChildAlgorithms(); + + preallocateChildAlgorithms(body0,body1); + } + + btDbvt* tree = compoundShape->getDynamicAabbTree(); //use a dynamic aabb tree to cull potential child-overlaps btCompoundLeafCallback callback(colObj,otherObj,m_dispatcher,dispatchInfo,resultOut,&m_childCollisionAlgorithms[0],m_sharedManifold); + ///we need to refresh all contact manifolds + ///note that we should actually recursively traverse all children, btCompoundShape can nested more then 1 level deep + ///so we should add a 'refreshManifolds' in the btCollisionAlgorithm + { + int i; + btManifoldArray manifoldArray; + for (i=0;igetAllContactManifolds(manifoldArray); + for (int m=0;mgetNumContacts()) + { + resultOut->setPersistentManifold(manifoldArray[m]); + resultOut->refreshContactPoints(); + resultOut->setPersistentManifold(0);//??necessary? + } + } + manifoldArray.clear(); + } + } + } if (tree) { @@ -242,7 +296,7 @@ btScalar btCompoundCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* btCollisionObject* colObj = m_isSwapped? body1 : body0; btCollisionObject* otherObj = m_isSwapped? body0 : body1; - assert (colObj->getCollisionShape()->isCompound()); + btAssert (colObj->getCollisionShape()->isCompound()); btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); @@ -285,3 +339,4 @@ btScalar btCompoundCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* } + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h index 624a3cf10f5..255e0af668c 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef COMPOUND_COLLISION_ALGORITHM_H #define COMPOUND_COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" @@ -26,16 +26,23 @@ class btDispatcher; #include "btCollisionCreateFunc.h" #include "LinearMath/btAlignedObjectArray.h" class btDispatcher; +class btCollisionObject; /// btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes -class btCompoundCollisionAlgorithm : public btCollisionAlgorithm +class btCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm { btAlignedObjectArray m_childCollisionAlgorithms; bool m_isSwapped; class btPersistentManifold* m_sharedManifold; bool m_ownsManifold; + + int m_compoundShapeRevision;//to keep track of changes, so that childAlgorithm array can be updated + void removeChildAlgorithms(); + + void preallocateChildAlgorithms(btCollisionObject* body0,btCollisionObject* body1); + public: btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp index 6d28904cb03..cbc5530732b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp @@ -27,7 +27,7 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" btConvexConcaveCollisionAlgorithm::btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) -: btCollisionAlgorithm(ci), +: btActivatingCollisionAlgorithm(ci,body0,body1), m_isSwapped(isSwapped), m_btConvexTriangleCallback(ci.m_dispatcher1,body0,body1,isSwapped) { @@ -72,7 +72,7 @@ btConvexTriangleCallback::~btConvexTriangleCallback() void btConvexTriangleCallback::clearCache() { m_dispatcher->clearManifold(m_manifoldPtr); -}; +} @@ -93,7 +93,7 @@ void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, i ///debug drawing of the overlapping triangles - if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() > 0) + if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && (m_dispatchInfoPtr->m_debugDraw->getDebugMode() &btIDebugDraw::DBG_DrawWireframe )) { btVector3 color(255,255,0); btTransform& tr = ob->getWorldTransform(); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h index 34b9a107be9..984a4c39e8e 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef CONVEX_CONCAVE_COLLISION_ALGORITHM_H #define CONVEX_CONCAVE_COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/CollisionShapes/btTriangleCallback.h" @@ -34,8 +34,8 @@ class btConvexTriangleCallback : public btTriangleCallback btVector3 m_aabbMin; btVector3 m_aabbMax ; - btManifoldResult* m_resultOut; + btManifoldResult* m_resultOut; btDispatcher* m_dispatcher; const btDispatcherInfo* m_dispatchInfoPtr; btScalar m_collisionMarginTriangle; @@ -70,7 +70,7 @@ int m_triangleCount; /// btConvexConcaveCollisionAlgorithm supports collision between convex shapes and (concave) trianges meshes. -class btConvexConcaveCollisionAlgorithm : public btCollisionAlgorithm +class btConvexConcaveCollisionAlgorithm : public btActivatingCollisionAlgorithm { bool m_isSwapped; @@ -78,6 +78,7 @@ class btConvexConcaveCollisionAlgorithm : public btCollisionAlgorithm btConvexTriangleCallback m_btConvexTriangleCallback; + public: btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp index cb830f889be..274c5f5bdc6 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp @@ -38,7 +38,7 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" #include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" @@ -51,6 +51,8 @@ subject to the following restrictions: btConvexConvexAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) { + m_numPerturbationIterations = 0; + m_minimumPointsPerturbationThreshold = 3; m_simplexSolver = simplexSolver; m_pdSolver = pdSolver; } @@ -59,17 +61,22 @@ btConvexConvexAlgorithm::CreateFunc::~CreateFunc() { } -btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) -: btCollisionAlgorithm(ci), -m_gjkPairDetector(0,0,simplexSolver,pdSolver), +btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver,int numPerturbationIterations, int minimumPointsPerturbationThreshold) +: btActivatingCollisionAlgorithm(ci,body0,body1), +m_simplexSolver(simplexSolver), +m_pdSolver(pdSolver), m_ownManifold (false), m_manifoldPtr(mf), -m_lowLevelOfDetail(false) +m_lowLevelOfDetail(false), +#ifdef USE_SEPDISTANCE_UTIL2 +,m_sepDistance((static_cast(body0->getCollisionShape()))->getAngularMotionDisc(), + (static_cast(body1->getCollisionShape()))->getAngularMotionDisc()), +#endif +m_numPerturbationIterations(numPerturbationIterations), +m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold) { (void)body0; (void)body1; - - } @@ -90,8 +97,63 @@ void btConvexConvexAlgorithm ::setLowLevelOfDetail(bool useLowLevel) } +struct btPerturbedContactResult : public btManifoldResult +{ + btManifoldResult* m_originalManifoldResult; + btTransform m_transformA; + btTransform m_transformB; + btTransform m_unPerturbedTransform; + bool m_perturbA; + btIDebugDraw* m_debugDrawer; + btPerturbedContactResult(btManifoldResult* originalResult,const btTransform& transformA,const btTransform& transformB,const btTransform& unPerturbedTransform,bool perturbA,btIDebugDraw* debugDrawer) + :m_originalManifoldResult(originalResult), + m_transformA(transformA), + m_transformB(transformB), + m_perturbA(perturbA), + m_unPerturbedTransform(unPerturbedTransform), + m_debugDrawer(debugDrawer) + { + } + virtual ~ btPerturbedContactResult() + { + } + + virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar orgDepth) + { + btVector3 endPt,startPt; + btScalar newDepth; + btVector3 newNormal; + + if (m_perturbA) + { + btVector3 endPtOrg = pointInWorld + normalOnBInWorld*orgDepth; + endPt = (m_unPerturbedTransform*m_transformA.inverse())(endPtOrg); + newDepth = (endPt - pointInWorld).dot(normalOnBInWorld); + startPt = endPt+normalOnBInWorld*newDepth; + } else + { + endPt = pointInWorld + normalOnBInWorld*orgDepth; + startPt = (m_unPerturbedTransform*m_transformB.inverse())(pointInWorld); + newDepth = (endPt - startPt).dot(normalOnBInWorld); + + } + +//#define DEBUG_CONTACTS 1 +#ifdef DEBUG_CONTACTS + m_debugDrawer->drawLine(startPt,endPt,btVector3(1,0,0)); + m_debugDrawer->drawSphere(startPt,0.05,btVector3(0,1,0)); + m_debugDrawer->drawSphere(endPt,0.05,btVector3(0,0,1)); +#endif //DEBUG_CONTACTS + + + m_originalManifoldResult->addContactPoint(normalOnBInWorld,startPt,newDepth); + } + +}; + +extern btScalar gContactBreakingThreshold; // // Convex-Convex collision algorithm @@ -107,39 +169,125 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl } resultOut->setPersistentManifold(m_manifoldPtr); -#ifdef USE_BT_GJKEPA - btConvexShape* shape0(static_cast(body0->getCollisionShape())); - btConvexShape* shape1(static_cast(body1->getCollisionShape())); - const btScalar radialmargin(0/*shape0->getMargin()+shape1->getMargin()*/); - btGjkEpaSolver::sResults results; - if(btGjkEpaSolver::Collide( shape0,body0->getWorldTransform(), - shape1,body1->getWorldTransform(), - radialmargin,results)) - { - dispatchInfo.m_debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); - resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); - } -#else + //comment-out next line to test multi-contact generation + //resultOut->getPersistentManifold()->clearManifold(); + btConvexShape* min0 = static_cast(body0->getCollisionShape()); btConvexShape* min1 = static_cast(body1->getCollisionShape()); + +#ifdef USE_SEPDISTANCE_UTIL2 + m_sepDistance.updateSeparatingDistance(body0->getWorldTransform(),body1->getWorldTransform()); + if (!dispatchInfo.m_useConvexConservativeDistanceUtil || m_sepDistance.getConservativeSeparatingDistance()<=0.f) +#endif //USE_SEPDISTANCE_UTIL2 + + { + btGjkPairDetector::ClosestPointInput input; + btGjkPairDetector gjkPairDetector(min0,min1,m_simplexSolver,m_pdSolver); //TODO: if (dispatchInfo.m_useContinuous) - m_gjkPairDetector.setMinkowskiA(min0); - m_gjkPairDetector.setMinkowskiB(min1); - input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold(); - input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared; - input.m_stackAlloc = dispatchInfo.m_stackAllocator; + gjkPairDetector.setMinkowskiA(min0); + gjkPairDetector.setMinkowskiB(min1); -// input.m_maximumDistanceSquared = btScalar(1e30); - +#ifdef USE_SEPDISTANCE_UTIL2 + if (dispatchInfo.m_useConvexConservativeDistanceUtil) + { + input.m_maximumDistanceSquared = 1e30f; + } else +#endif //USE_SEPDISTANCE_UTIL2 + { + input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold(); + input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared; + } + + input.m_stackAlloc = dispatchInfo.m_stackAllocator; input.m_transformA = body0->getWorldTransform(); input.m_transformB = body1->getWorldTransform(); + + gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); + btScalar sepDist = gjkPairDetector.getCachedSeparatingDistance()+dispatchInfo.m_convexConservativeDistanceThreshold; + + //now perturbe directions to get multiple contact points + btVector3 v0,v1; + btVector3 sepNormalWorldSpace = gjkPairDetector.getCachedSeparatingAxis().normalized(); + btPlaneSpace1(sepNormalWorldSpace,v0,v1); + //now perform 'm_numPerturbationIterations' collision queries with the perturbated collision objects - m_gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); + //perform perturbation when more then 'm_minimumPointsPerturbationThreshold' points + if (resultOut->getPersistentManifold()->getNumContacts() < m_minimumPointsPerturbationThreshold) + { + + int i; + + bool perturbeA = true; + const btScalar angleLimit = 0.125f * SIMD_PI; + btScalar perturbeAngle; + btScalar radiusA = min0->getAngularMotionDisc(); + btScalar radiusB = min1->getAngularMotionDisc(); + if (radiusA < radiusB) + { + perturbeAngle = gContactBreakingThreshold /radiusA; + perturbeA = true; + } else + { + perturbeAngle = gContactBreakingThreshold / radiusB; + perturbeA = false; + } + if ( perturbeAngle > angleLimit ) + perturbeAngle = angleLimit; + + btTransform unPerturbedTransform; + if (perturbeA) + { + unPerturbedTransform = input.m_transformA; + } else + { + unPerturbedTransform = input.m_transformB; + } + + for ( i=0;igetWorldTransform().getBasis()); + input.m_transformB = body1->getWorldTransform(); +#ifdef DEBUG_CONTACTS + dispatchInfo.m_debugDraw->drawTransform(input.m_transformA,10.0); +#endif //DEBUG_CONTACTS + } else + { + input.m_transformA = body0->getWorldTransform(); + input.m_transformB.setBasis( btMatrix3x3(rotq.inverse()*perturbeRot*rotq)*body1->getWorldTransform().getBasis()); +#ifdef DEBUG_CONTACTS + dispatchInfo.m_debugDraw->drawTransform(input.m_transformB,10.0); #endif + } + + btPerturbedContactResult perturbedResultOut(resultOut,input.m_transformA,input.m_transformB,unPerturbedTransform,perturbeA,dispatchInfo.m_debugDraw); + gjkPairDetector.getClosestPoints(input,perturbedResultOut,dispatchInfo.m_debugDraw); + + + } + } + + + +#ifdef USE_SEPDISTANCE_UTIL2 + if (dispatchInfo.m_useConvexConservativeDistanceUtil) + { + m_sepDistance.initSeparatingDistance(gjkPairDetector.getCachedSeparatingAxis(),sepDist,body0->getWorldTransform(),body1->getWorldTransform()); + } +#endif //USE_SEPDISTANCE_UTIL2 + + + } if (m_ownManifold) { diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h index a0030e6793d..62dd33eb98d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h @@ -16,30 +16,50 @@ subject to the following restrictions: #ifndef CONVEX_CONVEX_ALGORITHM_H #define CONVEX_CONVEX_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" #include "btCollisionCreateFunc.h" #include "btCollisionDispatcher.h" +#include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUtil class btConvexPenetrationDepthSolver; -///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations. -class btConvexConvexAlgorithm : public btCollisionAlgorithm -{ - btGjkPairDetector m_gjkPairDetector; -public: +///Enabling USE_SEPDISTANCE_UTIL2 requires 100% reliable distance computation. However, when using large size ratios GJK can be imprecise +///so the distance is not conservative. In that case, enabling this USE_SEPDISTANCE_UTIL2 would result in failing/missing collisions. +///Either improve GJK for large size ratios (testing a 100 units versus a 0.1 unit object) or only enable the util +///for certain pairs that have a small size ratio +///#define USE_SEPDISTANCE_UTIL2 1 +///The convexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations between two convex objects. +///Multiple contact points are calculated by perturbing the orientation of the smallest object orthogonal to the separating normal. +///This idea was described by Gino van den Bergen in this forum topic http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=4&t=288&p=888#p888 +class btConvexConvexAlgorithm : public btActivatingCollisionAlgorithm +{ +#ifdef USE_SEPDISTANCE_UTIL2 + btConvexSeparatingDistanceUtil m_sepDistance; +#endif + btSimplexSolverInterface* m_simplexSolver; + btConvexPenetrationDepthSolver* m_pdSolver; + + bool m_ownManifold; btPersistentManifold* m_manifoldPtr; bool m_lowLevelOfDetail; + int m_numPerturbationIterations; + int m_minimumPointsPerturbationThreshold; + + + ///cache separating vector to speedup collision detection + public: - btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); + btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold); + virtual ~btConvexConvexAlgorithm(); @@ -65,9 +85,12 @@ public: struct CreateFunc :public btCollisionAlgorithmCreateFunc { + btConvexPenetrationDepthSolver* m_pdSolver; btSimplexSolverInterface* m_simplexSolver; - + int m_numPerturbationIterations; + int m_minimumPointsPerturbationThreshold; + CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); virtual ~CreateFunc(); @@ -75,7 +98,7 @@ public: virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConvexAlgorithm)); - return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver); + return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp index 391cf6c7bc4..a7b3b163d66 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp @@ -4,8 +4,8 @@ Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. @@ -22,15 +22,17 @@ subject to the following restrictions: //#include -btConvexPlaneCollisionAlgorithm::btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped) +btConvexPlaneCollisionAlgorithm::btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped, int numPerturbationIterations,int minimumPointsPerturbationThreshold) : btCollisionAlgorithm(ci), m_ownManifold(false), m_manifoldPtr(mf), -m_isSwapped(isSwapped) +m_isSwapped(isSwapped), +m_numPerturbationIterations(numPerturbationIterations), +m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold) { btCollisionObject* convexObj = m_isSwapped? col1 : col0; btCollisionObject* planeObj = m_isSwapped? col0 : col1; - + if (!m_manifoldPtr && m_dispatcher->needsCollision(convexObj,planeObj)) { m_manifoldPtr = m_dispatcher->getNewManifold(convexObj,planeObj); @@ -48,30 +50,28 @@ btConvexPlaneCollisionAlgorithm::~btConvexPlaneCollisionAlgorithm() } } - - -void btConvexPlaneCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +void btConvexPlaneCollisionAlgorithm::collideSingleContact (const btQuaternion& perturbeRot, btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) { - (void)dispatchInfo; - (void)resultOut; - if (!m_manifoldPtr) - return; - - btCollisionObject* convexObj = m_isSwapped? body1 : body0; + btCollisionObject* convexObj = m_isSwapped? body1 : body0; btCollisionObject* planeObj = m_isSwapped? body0: body1; btConvexShape* convexShape = (btConvexShape*) convexObj->getCollisionShape(); btStaticPlaneShape* planeShape = (btStaticPlaneShape*) planeObj->getCollisionShape(); - bool hasCollision = false; + bool hasCollision = false; const btVector3& planeNormal = planeShape->getPlaneNormal(); const btScalar& planeConstant = planeShape->getPlaneConstant(); - btTransform planeInConvex; - planeInConvex= convexObj->getWorldTransform().inverse() * planeObj->getWorldTransform(); + + btTransform convexWorldTransform = convexObj->getWorldTransform(); btTransform convexInPlaneTrans; - convexInPlaneTrans= planeObj->getWorldTransform().inverse() * convexObj->getWorldTransform(); - + convexInPlaneTrans= planeObj->getWorldTransform().inverse() * convexWorldTransform; + //now perturbe the convex-world transform + convexWorldTransform.getBasis()*=btMatrix3x3(perturbeRot); + btTransform planeInConvex; + planeInConvex= convexWorldTransform.inverse() * planeObj->getWorldTransform(); + btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis()*-planeNormal); + btVector3 vtxInPlane = convexInPlaneTrans(vtx); btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant); @@ -87,6 +87,53 @@ void btConvexPlaneCollisionAlgorithm::processCollision (btCollisionObject* body0 btVector3 pOnB = vtxInPlaneWorld; resultOut->addContactPoint(normalOnSurfaceB,pOnB,distance); } +} + + +void btConvexPlaneCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)dispatchInfo; + if (!m_manifoldPtr) + return; + + btCollisionObject* convexObj = m_isSwapped? body1 : body0; + btCollisionObject* planeObj = m_isSwapped? body0: body1; + + btConvexShape* convexShape = (btConvexShape*) convexObj->getCollisionShape(); + btStaticPlaneShape* planeShape = (btStaticPlaneShape*) planeObj->getCollisionShape(); + + bool hasCollision = false; + const btVector3& planeNormal = planeShape->getPlaneNormal(); + const btScalar& planeConstant = planeShape->getPlaneConstant(); + + //first perform a collision query with the non-perturbated collision objects + { + btQuaternion rotq(0,0,0,1); + collideSingleContact(rotq,body0,body1,dispatchInfo,resultOut); + } + + if (resultOut->getPersistentManifold()->getNumContacts()getAngularMotionDisc(); + perturbeAngle = gContactBreakingThreshold / radius; + if ( perturbeAngle > angleLimit ) + perturbeAngle = angleLimit; + + btQuaternion perturbeRot(v0,perturbeAngle); + for (int i=0;igetNumContacts()) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h index 7b258554171..368ca71dda0 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h @@ -4,8 +4,8 @@ Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. @@ -28,18 +28,22 @@ class btPersistentManifold; /// Other features are frame-coherency (persistent data) and collision response. class btConvexPlaneCollisionAlgorithm : public btCollisionAlgorithm { - bool m_ownManifold; + bool m_ownManifold; btPersistentManifold* m_manifoldPtr; - bool m_isSwapped; - + bool m_isSwapped; + int m_numPerturbationIterations; + int m_minimumPointsPerturbationThreshold; + public: - btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped); + btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped, int numPerturbationIterations,int minimumPointsPerturbationThreshold); virtual ~btConvexPlaneCollisionAlgorithm(); virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + void collideSingleContact (const btQuaternion& perturbeRot, btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); virtual void getAllContactManifolds(btManifoldArray& manifoldArray) @@ -52,15 +56,24 @@ public: struct CreateFunc :public btCollisionAlgorithmCreateFunc { + int m_numPerturbationIterations; + int m_minimumPointsPerturbationThreshold; + + CreateFunc() + : m_numPerturbationIterations(3), + m_minimumPointsPerturbationThreshold(3) + { + } + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexPlaneCollisionAlgorithm)); if (!m_swapped) { - return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false); + return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold); } else { - return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true); + return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold); } } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp index 1c317080544..3ae25f109c2 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp @@ -100,11 +100,10 @@ btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefault int maxSize = sizeof(btConvexConvexAlgorithm); int maxSize2 = sizeof(btConvexConcaveCollisionAlgorithm); int maxSize3 = sizeof(btCompoundCollisionAlgorithm); - int maxSize4 = sizeof(btEmptyAlgorithm); - + int sl = sizeof(btConvexSeparatingDistanceUtil); + sl = sizeof(btGjkPairDetector); int collisionAlgorithmMaxElementSize = btMax(maxSize,maxSize2); collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3); - collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize4); if (constructionInfo.m_stackAlloc) { @@ -289,3 +288,10 @@ btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration::getCollisionAlg //failed to find an algorithm return m_emptyCreateFunc; } + +void btDefaultCollisionConfiguration::setConvexConvexMultipointIterations(int numPerturbationIterations, int minimumPointsPerturbationThreshold) +{ + btConvexConvexAlgorithm::CreateFunc* convexConvex = (btConvexConvexAlgorithm::CreateFunc*) m_convexConvexCreateFunc; + convexConvex->m_numPerturbationIterations = numPerturbationIterations; + convexConvex->m_minimumPointsPerturbationThreshold = minimumPointsPerturbationThreshold; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h index df48ee95a18..6d8cab726bd 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h @@ -33,9 +33,9 @@ struct btDefaultCollisionConstructionInfo :m_stackAlloc(0), m_persistentManifoldPool(0), m_collisionAlgorithmPool(0), - m_defaultMaxPersistentManifoldPoolSize(65535), - m_defaultMaxCollisionAlgorithmPoolSize(65535), - m_defaultStackAllocatorSize(5*1024*1024) + m_defaultMaxPersistentManifoldPoolSize(4096), + m_defaultMaxCollisionAlgorithmPoolSize(4096), + m_defaultStackAllocatorSize(0) { } }; @@ -44,7 +44,7 @@ struct btDefaultCollisionConstructionInfo ///btCollisionConfiguration allows to configure Bullet collision detection ///stack allocator, pool memory allocators -///todo: describe the meaning +///@todo: describe the meaning class btDefaultCollisionConfiguration : public btCollisionConfiguration { @@ -111,6 +111,14 @@ public: virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1); + ///Use this method to allow to generate multiple contact points between at once, between two objects using the generic convex-convex algorithm. + ///By default, this feature is disabled for best performance. + ///@param numPerturbationIterations controls the number of collision queries. Set it to zero to disable the feature. + ///@param minimumPointsPerturbationThreshold is the minimum number of points in the contact cache, above which the feature is disabled + ///3 is a good value for both params, if you want to enable the feature. This is because the default contact cache contains a maximum of 4 points, and one collision query at the unperturbed orientation is performed first. + ///See Bullet/Demos/CollisionDemo for an example how this feature gathers multiple points. + ///@todo we could add a per-object setting of those parameters, for level-of-detail collision detection. + void setConvexConvexMultipointIterations(int numPerturbationIterations=3, int minimumPointsPerturbationThreshold = 3); }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.cpp new file mode 100644 index 00000000000..86141fa6899 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.cpp @@ -0,0 +1,171 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btGhostObject.h" +#include "btCollisionWorld.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "LinearMath/btAabbUtil2.h" + +btGhostObject::btGhostObject() +{ + m_internalType = CO_GHOST_OBJECT; +} + +btGhostObject::~btGhostObject() +{ + ///btGhostObject should have been removed from the world, so no overlapping objects + btAssert(!m_overlappingObjects.size()); +} + + +void btGhostObject::addOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btBroadphaseProxy* thisProxy) +{ + btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject; + btAssert(otherObject); + ///if this linearSearch becomes too slow (too many overlapping objects) we should add a more appropriate data structure + int index = m_overlappingObjects.findLinearSearch(otherObject); + if (index==m_overlappingObjects.size()) + { + //not found + m_overlappingObjects.push_back(otherObject); + } +} + +void btGhostObject::removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy) +{ + btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject; + btAssert(otherObject); + int index = m_overlappingObjects.findLinearSearch(otherObject); + if (index~btHashedOverlappingPairCache(); + btAlignedFree( m_hashPairCache ); +} + +void btPairCachingGhostObject::addOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btBroadphaseProxy* thisProxy) +{ + btBroadphaseProxy*actualThisProxy = thisProxy ? thisProxy : getBroadphaseHandle(); + btAssert(actualThisProxy); + + btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject; + btAssert(otherObject); + int index = m_overlappingObjects.findLinearSearch(otherObject); + if (index==m_overlappingObjects.size()) + { + m_overlappingObjects.push_back(otherObject); + m_hashPairCache->addOverlappingPair(actualThisProxy,otherProxy); + } +} + +void btPairCachingGhostObject::removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy1) +{ + btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject; + btBroadphaseProxy* actualThisProxy = thisProxy1 ? thisProxy1 : getBroadphaseHandle(); + btAssert(actualThisProxy); + + btAssert(otherObject); + int index = m_overlappingObjects.findLinearSearch(otherObject); + if (indexremoveOverlappingPair(actualThisProxy,otherProxy,dispatcher); + } +} + + +void btGhostObject::convexSweepTest(const btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, btCollisionWorld::ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration) const +{ + btTransform convexFromTrans,convexToTrans; + convexFromTrans = convexFromWorld; + convexToTrans = convexToWorld; + btVector3 castShapeAabbMin, castShapeAabbMax; + /* Compute AABB that encompasses angular movement */ + { + btVector3 linVel, angVel; + btTransformUtil::calculateVelocity (convexFromTrans, convexToTrans, 1.0, linVel, angVel); + btTransform R; + R.setIdentity (); + R.setRotation (convexFromTrans.getRotation()); + castShape->calculateTemporalAabb (R, linVel, angVel, 1.0, castShapeAabbMin, castShapeAabbMax); + } + + /// go over all objects, and if the ray intersects their aabb + cast shape aabb, + // do a ray-shape query using convexCaster (CCD) + int i; + for (i=0;igetBroadphaseHandle())) { + //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); + btVector3 collisionObjectAabbMin,collisionObjectAabbMax; + collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax); + AabbExpand (collisionObjectAabbMin, collisionObjectAabbMax, castShapeAabbMin, castShapeAabbMax); + btScalar hitLambda = btScalar(1.); //could use resultCallback.m_closestHitFraction, but needs testing + btVector3 hitNormal; + if (btRayAabb(convexFromWorld.getOrigin(),convexToWorld.getOrigin(),collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal)) + { + btCollisionWorld::objectQuerySingle(castShape, convexFromTrans,convexToTrans, + collisionObject, + collisionObject->getCollisionShape(), + collisionObject->getWorldTransform(), + resultCallback, + allowedCcdPenetration); + } + } + } + +} + +void btGhostObject::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, btCollisionWorld::RayResultCallback& resultCallback) const +{ + btTransform rayFromTrans; + rayFromTrans.setIdentity(); + rayFromTrans.setOrigin(rayFromWorld); + btTransform rayToTrans; + rayToTrans.setIdentity(); + rayToTrans.setOrigin(rayToWorld); + + + int i; + for (i=0;igetBroadphaseHandle())) + { + btCollisionWorld::rayTestSingle(rayFromTrans,rayToTrans, + collisionObject, + collisionObject->getCollisionShape(), + collisionObject->getWorldTransform(), + resultCallback); + } + } +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.h new file mode 100644 index 00000000000..95b5750240c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.h @@ -0,0 +1,174 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_GHOST_OBJECT_H +#define BT_GHOST_OBJECT_H + + +#include "btCollisionObject.h" +#include "BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h" +#include "LinearMath/btAlignedAllocator.h" +#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" +#include "btCollisionWorld.h" + +class btConvexShape; + +class btDispatcher; + +///The btGhostObject can keep track of all objects that are overlapping +///By default, this overlap is based on the AABB +///This is useful for creating a character controller, collision sensors/triggers, explosions etc. +///We plan on adding rayTest and other queries for the btGhostObject +ATTRIBUTE_ALIGNED16(class) btGhostObject : public btCollisionObject +{ +protected: + + btAlignedObjectArray m_overlappingObjects; + +public: + + btGhostObject(); + + virtual ~btGhostObject(); + + void convexSweepTest(const class btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, btCollisionWorld::ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration = 0.f) const; + + void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, btCollisionWorld::RayResultCallback& resultCallback) const; + + ///this method is mainly for expert/internal use only. + virtual void addOverlappingObjectInternal(btBroadphaseProxy* otherProxy, btBroadphaseProxy* thisProxy=0); + ///this method is mainly for expert/internal use only. + virtual void removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy=0); + + int getNumOverlappingObjects() const + { + return m_overlappingObjects.size(); + } + + btCollisionObject* getOverlappingObject(int index) + { + return m_overlappingObjects[index]; + } + + const btCollisionObject* getOverlappingObject(int index) const + { + return m_overlappingObjects[index]; + } + + btAlignedObjectArray& getOverlappingPairs() + { + return m_overlappingObjects; + } + + const btAlignedObjectArray getOverlappingPairs() const + { + return m_overlappingObjects; + } + + // + // internal cast + // + + static const btGhostObject* upcast(const btCollisionObject* colObj) + { + if (colObj->getInternalType()==CO_GHOST_OBJECT) + return (const btGhostObject*)colObj; + return 0; + } + static btGhostObject* upcast(btCollisionObject* colObj) + { + if (colObj->getInternalType()==CO_GHOST_OBJECT) + return (btGhostObject*)colObj; + return 0; + } + +}; + +class btPairCachingGhostObject : public btGhostObject +{ + btHashedOverlappingPairCache* m_hashPairCache; + +public: + + btPairCachingGhostObject(); + + virtual ~btPairCachingGhostObject(); + + ///this method is mainly for expert/internal use only. + virtual void addOverlappingObjectInternal(btBroadphaseProxy* otherProxy, btBroadphaseProxy* thisProxy=0); + + virtual void removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy=0); + + btHashedOverlappingPairCache* getOverlappingPairCache() + { + return m_hashPairCache; + } + +}; + + + +///The btGhostPairCallback interfaces and forwards adding and removal of overlapping pairs from the btBroadphaseInterface to btGhostObject. +class btGhostPairCallback : public btOverlappingPairCallback +{ + +public: + btGhostPairCallback() + { + } + + virtual ~btGhostPairCallback() + { + + } + + virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) + { + btCollisionObject* colObj0 = (btCollisionObject*) proxy0->m_clientObject; + btCollisionObject* colObj1 = (btCollisionObject*) proxy1->m_clientObject; + btGhostObject* ghost0 = btGhostObject::upcast(colObj0); + btGhostObject* ghost1 = btGhostObject::upcast(colObj1); + if (ghost0) + ghost0->addOverlappingObjectInternal(proxy1, proxy0); + if (ghost1) + ghost1->addOverlappingObjectInternal(proxy0, proxy1); + return 0; + } + + virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher) + { + btCollisionObject* colObj0 = (btCollisionObject*) proxy0->m_clientObject; + btCollisionObject* colObj1 = (btCollisionObject*) proxy1->m_clientObject; + btGhostObject* ghost0 = btGhostObject::upcast(colObj0); + btGhostObject* ghost1 = btGhostObject::upcast(colObj1); + if (ghost0) + ghost0->removeOverlappingObjectInternal(proxy1,dispatcher,proxy0); + if (ghost1) + ghost1->removeOverlappingObjectInternal(proxy0,dispatcher,proxy1); + return 0; + } + + virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0,btDispatcher* dispatcher) + { + btAssert(0); + //need to keep track of all ghost objects and call them here + //m_hashPairCache->removeOverlappingPairsContainingProxy(proxy0,dispatcher); + } + + + +}; + +#endif \ No newline at end of file diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp index d5b12598be2..f8dfa5b101f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp @@ -55,7 +55,7 @@ btManifoldResult::btManifoldResult(btCollisionObject* body0,btCollisionObject* b void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) { - assert(m_manifoldPtr); + btAssert(m_manifoldPtr); //order in manifold needs to match if (depth > m_manifoldPtr->getContactBreakingThreshold()) @@ -92,8 +92,8 @@ void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const b newPt.m_partId1 = m_partId1; newPt.m_index0 = m_index0; newPt.m_index1 = m_index1; - - ///todo, check this for any side effects + //printf("depth=%f\n",depth); + ///@todo, check this for any side effects if (insertIndex >= 0) { //const btManifoldPoint& oldPoint = m_manifoldPtr->getContactPoint(insertIndex); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h index 5aac9a46f6a..964b6a04483 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h @@ -45,6 +45,8 @@ class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result int m_partId1; int m_index0; int m_index1; + + public: btManifoldResult() @@ -77,6 +79,7 @@ public: m_index1=index1; } + virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth); SIMD_FORCE_INLINE void refreshContactPoints() diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp index 9f8e27a4407..0328d0f738f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp @@ -24,7 +24,8 @@ subject to the following restrictions: //#include #include "LinearMath/btQuickprof.h" -btSimulationIslandManager::btSimulationIslandManager() +btSimulationIslandManager::btSimulationIslandManager(): +m_splitIslands(true) { } @@ -43,10 +44,10 @@ void btSimulationIslandManager::findUnions(btDispatcher* /* dispatcher */,btColl { { - btBroadphasePair* pairPtr = colWorld->getPairCache()->getOverlappingPairArrayPtr(); - + for (int i=0;igetPairCache()->getNumOverlappingPairs();i++) { + btBroadphasePair* pairPtr = colWorld->getPairCache()->getOverlappingPairArrayPtr(); const btBroadphasePair& collisionPair = pairPtr[i]; btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject; btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject; @@ -143,11 +144,13 @@ class btPersistentManifoldSortPredicate }; -void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects) +void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisionWorld* collisionWorld) { BT_PROFILE("islandUnionFindAndQuickSort"); + btCollisionObjectArray& collisionObjects = collisionWorld->getCollisionObjectArray(); + m_islandmanifold.resize(0); //we are going to sort the unionfind array, and store the element id in the size @@ -183,7 +186,7 @@ void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisio // printf("error in island management\n"); } - assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); + btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); if (colObj0->getIslandTag() == islandId) { if (colObj0->getActivationState()== ACTIVE_TAG) @@ -210,7 +213,7 @@ void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisio // printf("error in island management\n"); } - assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); + btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); if (colObj0->getIslandTag() == islandId) { @@ -231,13 +234,14 @@ void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisio // printf("error in island management\n"); } - assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); + btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); if (colObj0->getIslandTag() == islandId) { if ( colObj0->getActivationState() == ISLAND_SLEEPING) { colObj0->setActivationState( WANTS_DEACTIVATION); + colObj0->setDeactivationTime(0.f); } } } @@ -248,11 +252,11 @@ void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisio int i; int maxNumManifolds = dispatcher->getNumManifolds(); -#define SPLIT_ISLANDS 1 -#ifdef SPLIT_ISLANDS +//#define SPLIT_ISLANDS 1 +//#ifdef SPLIT_ISLANDS -#endif //SPLIT_ISLANDS +//#endif //SPLIT_ISLANDS for (i=0;i(manifold->getBody0()); btCollisionObject* colObj1 = static_cast(manifold->getBody1()); - //todo: check sleeping conditions! + ///@todo: check sleeping conditions! if (((colObj0) && colObj0->getActivationState() != ISLAND_SLEEPING) || ((colObj1) && colObj1->getActivationState() != ISLAND_SLEEPING)) { @@ -276,24 +280,24 @@ void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisio { colObj0->activate(); } -#ifdef SPLIT_ISLANDS - // //filtering for response - if (dispatcher->needsResponse(colObj0,colObj1)) - m_islandmanifold.push_back(manifold); -#endif //SPLIT_ISLANDS + if(m_splitIslands) + { + //filtering for response + if (dispatcher->needsResponse(colObj0,colObj1)) + m_islandmanifold.push_back(manifold); + } } } } -// -// todo: this is random access, it can be walked 'cache friendly'! -// -void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback) +///@todo: this is random access, it can be walked 'cache friendly'! +void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,btCollisionWorld* collisionWorld, IslandCallback* callback) { + btCollisionObjectArray& collisionObjects = collisionWorld->getCollisionObjectArray(); - buildIslands(dispatcher,collisionObjects); + buildIslands(dispatcher,collisionWorld); int endIslandIndex=1; int startIslandIndex; @@ -301,84 +305,86 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher, BT_PROFILE("processIslands"); -#ifndef SPLIT_ISLANDS - btPersistentManifold** manifold = dispatcher->getInternalManifoldPointer(); - - callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, -1); -#else - // Sort manifolds, based on islands - // Sort the vector using predicate and std::sort - //std::sort(islandmanifold.begin(), islandmanifold.end(), btPersistentManifoldSortPredicate); - - int numManifolds = int (m_islandmanifold.size()); - - //we should do radix sort, it it much faster (O(n) instead of O (n log2(n)) - m_islandmanifold.quickSort(btPersistentManifoldSortPredicate()); - - //now process all active islands (sets of manifolds for now) - - int startManifoldIndex = 0; - int endManifoldIndex = 1; - - //int islandId; - - - -// printf("Start Islands\n"); - - //traverse the simulation islands, and call the solver, unless all objects are sleeping/deactivated - for ( startIslandIndex=0;startIslandIndexgetInternalManifoldPointer(); + int maxNumManifolds = dispatcher->getNumManifolds(); + callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, -1); + } + else + { + // Sort manifolds, based on islands + // Sort the vector using predicate and std::sort + //std::sort(islandmanifold.begin(), islandmanifold.end(), btPersistentManifoldSortPredicate); + int numManifolds = int (m_islandmanifold.size()); - bool islandSleeping = false; - - for (endIslandIndex = startIslandIndex;(endIslandIndexisActive()) - islandSleeping = true; - } - + //we should do radix sort, it it much faster (O(n) instead of O (n log2(n)) + m_islandmanifold.quickSort(btPersistentManifoldSortPredicate()); - //find the accompanying contact manifold for this islandId - int numIslandManifolds = 0; - btPersistentManifold** startManifold = 0; + //now process all active islands (sets of manifolds for now) - if (startManifoldIndexisActive()) + islandSleeping = true; + } + + + //find the accompanying contact manifold for this islandId + int numIslandManifolds = 0; + btPersistentManifold** startManifold = 0; + + if (startManifoldIndexProcessIsland(&m_islandBodies[0],m_islandBodies.size(),startManifold,numIslandManifolds, islandId); + // printf("Island callback of size:%d bodies, %d manifolds\n",islandBodies.size(),numIslandManifolds); + } + + if (numIslandManifolds) + { + startManifoldIndex = endManifoldIndex; + } - if (!islandSleeping) - { - callback->ProcessIsland(&m_islandBodies[0],m_islandBodies.size(),startManifold,numIslandManifolds, islandId); -// printf("Island callback of size:%d bodies, %d manifolds\n",islandBodies.size(),numIslandManifolds); + m_islandBodies.resize(0); } - - if (numIslandManifolds) - { - startManifoldIndex = endManifoldIndex; - } - - m_islandBodies.resize(0); - } -#endif //SPLIT_ISLANDS - + } // else if(!splitIslands) } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h index 5f4d54cd803..d059f5d6b0d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h @@ -19,7 +19,7 @@ subject to the following restrictions: #include "BulletCollision/CollisionDispatch/btUnionFind.h" #include "btCollisionCreateFunc.h" #include "LinearMath/btAlignedObjectArray.h" - +#include "btCollisionObject.h" class btCollisionObject; class btCollisionWorld; @@ -35,6 +35,7 @@ class btSimulationIslandManager btAlignedObjectArray m_islandmanifold; btAlignedObjectArray m_islandBodies; + bool m_splitIslands; public: btSimulationIslandManager(); @@ -61,9 +62,18 @@ public: virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,class btPersistentManifold** manifolds,int numManifolds, int islandId) = 0; }; - void buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback); + void buildAndProcessIslands(btDispatcher* dispatcher,btCollisionWorld* collisionWorld, IslandCallback* callback); - void buildIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects); + void buildIslands(btDispatcher* dispatcher,btCollisionWorld* colWorld); + + bool getSplitIslands() + { + return m_splitIslands; + } + void setSplitIslands(bool doSplitIslands) + { + m_splitIslands = doSplitIslands; + } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp index 1e4bbce451d..8df876928c1 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp @@ -21,7 +21,7 @@ subject to the following restrictions: //#include btSphereBoxCollisionAlgorithm::btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped) -: btCollisionAlgorithm(ci), +: btActivatingCollisionAlgorithm(ci,col0,col1), m_ownManifold(false), m_manifoldPtr(mf), m_isSwapped(isSwapped) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h index 158f0ffcc74..47111d1c4af 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef SPHERE_BOX_COLLISION_ALGORITHM_H #define SPHERE_BOX_COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" class btPersistentManifold; @@ -26,7 +26,7 @@ class btPersistentManifold; /// btSphereBoxCollisionAlgorithm provides sphere-box collision detection. /// Other features are frame-coherency (persistent data) and collision response. -class btSphereBoxCollisionAlgorithm : public btCollisionAlgorithm +class btSphereBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm { bool m_ownManifold; btPersistentManifold* m_manifoldPtr; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp index c2b13f5903f..5c4e78fe518 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp @@ -19,7 +19,7 @@ subject to the following restrictions: #include "BulletCollision/CollisionDispatch/btCollisionObject.h" btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1) -: btCollisionAlgorithm(ci), +: btActivatingCollisionAlgorithm(ci,col0,col1), m_ownManifold(false), m_manifoldPtr(mf) { @@ -78,7 +78,7 @@ void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0 } ///point on A (worldspace) - btVector3 pos0 = col0->getWorldTransform().getOrigin() - radius0 * normalOnSurfaceB; + ///btVector3 pos0 = col0->getWorldTransform().getOrigin() - radius0 * normalOnSurfaceB; ///point on B (worldspace) btVector3 pos1 = col1->getWorldTransform().getOrigin() + radius1* normalOnSurfaceB; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h index afdc2ee7fa0..7d07512ca66 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef SPHERE_SPHERE_COLLISION_ALGORITHM_H #define SPHERE_SPHERE_COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" #include "btCollisionDispatcher.h" @@ -26,7 +26,7 @@ class btPersistentManifold; /// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. /// Other features are frame-coherency (persistent data) and collision response. /// Also provides the most basic sample for custom/user btCollisionAlgorithm -class btSphereSphereCollisionAlgorithm : public btCollisionAlgorithm +class btSphereSphereCollisionAlgorithm : public btActivatingCollisionAlgorithm { bool m_ownManifold; btPersistentManifold* m_manifoldPtr; @@ -35,7 +35,7 @@ public: btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1); btSphereSphereCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) - : btCollisionAlgorithm(ci) {} + : btActivatingCollisionAlgorithm(ci) {} virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp index fdbd4abef27..2d5efcf56ba 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp @@ -22,7 +22,7 @@ subject to the following restrictions: btSphereTriangleCollisionAlgorithm::btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1,bool swapped) -: btCollisionAlgorithm(ci), +: btActivatingCollisionAlgorithm(ci,col0,col1), m_ownManifold(false), m_manifoldPtr(mf), m_swapped(swapped) @@ -56,10 +56,10 @@ void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* co /// report a contact. internally this will be kept persistent, and contact reduction is done resultOut->setPersistentManifold(m_manifoldPtr); - SphereTriangleDetector detector(sphere,triangle); + SphereTriangleDetector detector(sphere,triangle, m_manifoldPtr->getContactBreakingThreshold()); btDiscreteCollisionDetectorInterface::ClosestPointInput input; - input.m_maximumDistanceSquared = btScalar(1e30);//todo: tighter bounds + input.m_maximumDistanceSquared = btScalar(1e30);///@todo: tighter bounds input.m_transformA = sphereObj->getWorldTransform(); input.m_transformB = triObj->getWorldTransform(); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h index bbaf228c44c..606c3635ae9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef SPHERE_TRIANGLE_COLLISION_ALGORITHM_H #define SPHERE_TRIANGLE_COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" class btPersistentManifold; @@ -25,7 +25,7 @@ class btPersistentManifold; /// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. /// Other features are frame-coherency (persistent data) and collision response. /// Also provides the most basic sample for custom/user btCollisionAlgorithm -class btSphereTriangleCollisionAlgorithm : public btCollisionAlgorithm +class btSphereTriangleCollisionAlgorithm : public btActivatingCollisionAlgorithm { bool m_ownManifold; btPersistentManifold* m_manifoldPtr; @@ -35,7 +35,7 @@ public: btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool swapped); btSphereTriangleCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) - : btCollisionAlgorithm(ci) {} + : btActivatingCollisionAlgorithm(ci) {} virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp index bb01b60fa85..c561df06109 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp @@ -14,8 +14,6 @@ subject to the following restrictions: */ #include "btUnionFind.h" -#include - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h index 820c8bc858e..e105ecbff18 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h @@ -98,8 +98,8 @@ class btUnionFind int find(int x) { - //assert(x < m_N); - //assert(x >= 0); + //btAssert(x < m_N); + //btAssert(x >= 0); while (x != m_elements[x].m_id) { @@ -110,8 +110,8 @@ class btUnionFind m_elements[x].m_id = m_elements[m_elements[x].m_id].m_id; #endif // x = m_elements[x].m_id; - //assert(x < m_N); - //assert(x >= 0); + //btAssert(x < m_N); + //btAssert(x >= 0); } return x; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h index 4d4fbefea37..14502d485dc 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h @@ -19,7 +19,7 @@ subject to the following restrictions: #include "btPolyhedralConvexShape.h" #include "btCollisionMargin.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "LinearMath/btPoint3.h" +#include "LinearMath/btVector3.h" #include "LinearMath/btMinMax.h" ///The btBoxShape is a box primitive around the origin, its sides axis aligned with length specified by half extents, in local shape coordinates. When used as part of a btCollisionObject or btRigidBody it will be an oriented box in world space. @@ -45,8 +45,6 @@ public: } - virtual int getShapeType() const { return BOX_SHAPE_PROXYTYPE;} - virtual btVector3 localGetSupportingVertex(const btVector3& vec) const { btVector3 halfExtents = getHalfExtentsWithoutMargin(); @@ -82,8 +80,10 @@ public: } - btBoxShape( const btVector3& boxHalfExtents) + btBoxShape( const btVector3& boxHalfExtents) + : btPolyhedralConvexShape() { + m_shapeType = BOX_SHAPE_PROXYTYPE; btVector3 margin(getMargin(),getMargin(),getMargin()); m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin; }; @@ -117,7 +117,7 @@ public: virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const + virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const { //this plane might not be aligned... btVector4 plane ; @@ -161,36 +161,30 @@ public: switch (i) { case 0: - plane.setValue(btScalar(1.),btScalar(0.),btScalar(0.)); - plane[3] = -halfExtents.x(); + plane.setValue(btScalar(1.),btScalar(0.),btScalar(0.),-halfExtents.x()); break; case 1: - plane.setValue(btScalar(-1.),btScalar(0.),btScalar(0.)); - plane[3] = -halfExtents.x(); + plane.setValue(btScalar(-1.),btScalar(0.),btScalar(0.),-halfExtents.x()); break; case 2: - plane.setValue(btScalar(0.),btScalar(1.),btScalar(0.)); - plane[3] = -halfExtents.y(); + plane.setValue(btScalar(0.),btScalar(1.),btScalar(0.),-halfExtents.y()); break; case 3: - plane.setValue(btScalar(0.),btScalar(-1.),btScalar(0.)); - plane[3] = -halfExtents.y(); + plane.setValue(btScalar(0.),btScalar(-1.),btScalar(0.),-halfExtents.y()); break; case 4: - plane.setValue(btScalar(0.),btScalar(0.),btScalar(1.)); - plane[3] = -halfExtents.z(); + plane.setValue(btScalar(0.),btScalar(0.),btScalar(1.),-halfExtents.z()); break; case 5: - plane.setValue(btScalar(0.),btScalar(0.),btScalar(-1.)); - plane[3] = -halfExtents.z(); + plane.setValue(btScalar(0.),btScalar(0.),btScalar(-1.),-halfExtents.z()); break; default: - assert(0); + btAssert(0); } } - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const + virtual void getEdge(int i,btVector3& pa,btVector3& pb) const //virtual void getEdge(int i,Edge& edge) const { int edgeVert0 = 0; @@ -261,7 +255,7 @@ public: - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const + virtual bool isInside(const btVector3& pt,btScalar tolerance) const { btVector3 halfExtents = getHalfExtentsWithoutMargin(); @@ -312,7 +306,7 @@ public: penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(-1.)); break; default: - assert(0); + btAssert(0); } } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp index 819f6f7f97d..68ff5e2d7bb 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp @@ -26,6 +26,7 @@ m_bvh(0), m_useQuantizedAabbCompression(useQuantizedAabbCompression), m_ownsBvh(false) { + m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE; //construct bvh from meshInterface #ifndef DISABLE_BVH @@ -57,6 +58,7 @@ m_bvh(0), m_useQuantizedAabbCompression(useQuantizedAabbCompression), m_ownsBvh(false) { + m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE; //construct bvh from meshInterface #ifndef DISABLE_BVH @@ -141,10 +143,19 @@ void btBvhTriangleMeshShape::performRaycast (btTriangleCallback* callback, const for (int j=2;j>=0;j--) { int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j]; - - btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); - - m_triangle[j] = btVector3(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ()); + + if (type == PHY_FLOAT) + { + float* graphicsbase = (float*)(vertexbase+graphicsindex*stride); + + m_triangle[j] = btVector3(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ()); + } + else + { + double* graphicsbase = (double*)(vertexbase+graphicsindex*stride); + + m_triangle[j] = btVector3(btScalar(graphicsbase[0])*meshScaling.getX(),btScalar(graphicsbase[1])*meshScaling.getY(),btScalar(graphicsbase[2])*meshScaling.getZ()); + } } /* Perform ray vs. triangle collision here */ @@ -202,9 +213,18 @@ void btBvhTriangleMeshShape::performConvexcast (btTriangleCallback* callback, co { int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j]; - btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); + if (type == PHY_FLOAT) + { + float* graphicsbase = (float*)(vertexbase+graphicsindex*stride); - m_triangle[j] = btVector3(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ()); + m_triangle[j] = btVector3(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ()); + } + else + { + double* graphicsbase = (double*)(vertexbase+graphicsindex*stride); + + m_triangle[j] = btVector3(btScalar(graphicsbase[0])*meshScaling.getX(),btScalar(graphicsbase[1])*meshScaling.getY(),btScalar(graphicsbase[2])*meshScaling.getZ()); + } } /* Perform ray vs. triangle collision here */ @@ -279,12 +299,24 @@ void btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,co #ifdef DEBUG_TRIANGLE_MESH printf("%d ,",graphicsindex); #endif //DEBUG_TRIANGLE_MESH - btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); + if (type == PHY_FLOAT) + { + float* graphicsbase = (float*)(vertexbase+graphicsindex*stride); + + m_triangle[j] = btVector3( + graphicsbase[0]*meshScaling.getX(), + graphicsbase[1]*meshScaling.getY(), + graphicsbase[2]*meshScaling.getZ()); + } + else + { + double* graphicsbase = (double*)(vertexbase+graphicsindex*stride); - m_triangle[j] = btVector3( - graphicsbase[0]*meshScaling.getX(), - graphicsbase[1]*meshScaling.getY(), - graphicsbase[2]*meshScaling.getZ()); + m_triangle[j] = btVector3( + btScalar(graphicsbase[0])*meshScaling.getX(), + btScalar(graphicsbase[1])*meshScaling.getY(), + btScalar(graphicsbase[2])*meshScaling.getZ()); + } #ifdef DEBUG_TRIANGLE_MESH printf("triangle vertices:%f,%f,%f\n",triangle[j].x(),triangle[j].y(),triangle[j].z()); #endif //DEBUG_TRIANGLE_MESH diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h index 6e587340dc1..cb2c326574e 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -37,7 +37,7 @@ public: BT_DECLARE_ALIGNED_ALLOCATOR(); - btBvhTriangleMeshShape() :btTriangleMeshShape(0),m_bvh(0),m_ownsBvh(false) {}; + btBvhTriangleMeshShape() : btTriangleMeshShape(0),m_bvh(0),m_ownsBvh(false) {m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;}; btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true); ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb @@ -50,10 +50,7 @@ public: return m_ownsBvh; } - virtual int getShapeType() const - { - return TRIANGLE_MESH_SHAPE_PROXYTYPE; - } + void performRaycast (btTriangleCallback* callback, const btVector3& raySource, const btVector3& rayTarget); void performConvexcast (btTriangleCallback* callback, const btVector3& boxSource, const btVector3& boxTarget, const btVector3& boxMin, const btVector3& boxMax); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp index 26ba276b900..60a96a542f9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp @@ -19,8 +19,9 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btCollisionMargin.h" #include "LinearMath/btQuaternion.h" -btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) +btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) : btConvexInternalShape () { + m_shapeType = CAPSULE_SHAPE_PROXYTYPE; m_upAxis = 1; m_implicitShapeDimensions.setValue(radius,0.5f*height,radius); } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h index d4b046d40c9..828c1b3a565 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h @@ -30,7 +30,7 @@ protected: protected: ///only used for btCapsuleShapeZ and btCapsuleShapeX subclasses. - btCapsuleShape() {}; + btCapsuleShape() : btConvexInternalShape() {m_shapeType = CAPSULE_SHAPE_PROXYTYPE;}; public: btCapsuleShape(btScalar radius,btScalar height); @@ -43,15 +43,13 @@ public: virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - virtual int getShapeType() const { return CAPSULE_SHAPE_PROXYTYPE; } - virtual void getAabb (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const { btVector3 halfExtents(getRadius(),getRadius(),getRadius()); halfExtents[m_upAxis] = getRadius() + getHalfHeight(); halfExtents += btVector3(getMargin(),getMargin(),getMargin()); btMatrix3x3 abs_b = t.getBasis().absolute(); - btPoint3 center = t.getOrigin(); + btVector3 center = t.getOrigin(); btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents)); aabbMin = center - extent; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp index 39e621aa946..d242cba1b72 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp @@ -16,6 +16,9 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btCollisionShape.h" +btScalar gContactThresholdFactor=btScalar(0.02); + + /* Make sure this dummy function never changes so that it can be used by probes that are checking whether the @@ -42,8 +45,13 @@ void btCollisionShape::getBoundingSphere(btVector3& center,btScalar& radius) con center = (aabbMin+aabbMax)*btScalar(0.5); } +btScalar btCollisionShape::getContactBreakingThreshold() const +{ + return getAngularMotionDisc() * gContactThresholdFactor; +} btScalar btCollisionShape::getAngularMotionDisc() const { + ///@todo cache this value, to improve performance btVector3 center; btScalar disc; getBoundingSphere(center,disc); @@ -65,7 +73,7 @@ void btCollisionShape::calculateTemporalAabb(const btTransform& curTrans,const b // add linear motion btVector3 linMotion = linvel*timeStep; - //todo: simd would have a vector max/min operation, instead of per-element access + ///@todo: simd would have a vector max/min operation, instead of per-element access if (linMotion.x() > btScalar(0.)) temporalAabbMaxx += linMotion.x(); else diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h index 3a352b90777..1f4b9bec647 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h @@ -19,20 +19,21 @@ subject to the following restrictions: #include "LinearMath/btTransform.h" #include "LinearMath/btVector3.h" #include "LinearMath/btMatrix3x3.h" -#include "LinearMath/btPoint3.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types ///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects. class btCollisionShape { - +protected: + int m_shapeType; void* m_userPointer; public: - btCollisionShape() : m_userPointer(0) + btCollisionShape() : m_shapeType (INVALID_SHAPE_PROXYTYPE), m_userPointer(0) { } + virtual ~btCollisionShape() { } @@ -45,6 +46,8 @@ public: ///getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations. virtual btScalar getAngularMotionDisc() const; + virtual btScalar getContactBreakingThreshold() const; + ///calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep) ///result is conservative @@ -76,7 +79,7 @@ public: return btBroadphaseProxy::isInfinite(getShapeType()); } - virtual int getShapeType() const=0; + virtual void setLocalScaling(const btVector3& scaling) =0; virtual const btVector3& getLocalScaling() const =0; virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const = 0; @@ -87,13 +90,13 @@ public: #endif //__SPU__ - + int getShapeType() const { return m_shapeType; } virtual void setMargin(btScalar margin) = 0; virtual btScalar getMargin() const = 0; ///optional user data pointer - void setUserPointer(void* userPtr) + void setUserPointer(void* userPtr) { m_userPointer = userPtr; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp index f08b810eadb..9c2b04d18fa 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp @@ -17,16 +17,22 @@ subject to the following restrictions: #include "btCollisionShape.h" #include "BulletCollision/BroadphaseCollision/btDbvt.h" -btCompoundShape::btCompoundShape() -:m_localAabbMin(btScalar(1e30),btScalar(1e30),btScalar(1e30)), +btCompoundShape::btCompoundShape(bool enableDynamicAabbTree) +: m_localAabbMin(btScalar(1e30),btScalar(1e30),btScalar(1e30)), m_localAabbMax(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)), m_collisionMargin(btScalar(0.)), m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)), -m_dynamicAabbTree(0) +m_dynamicAabbTree(0), +m_updateRevision(1) { - void* mem = btAlignedAlloc(sizeof(btDbvt),16); - m_dynamicAabbTree = new(mem) btDbvt(); - btAssert(mem==m_dynamicAabbTree); + m_shapeType = COMPOUND_SHAPE_PROXYTYPE; + + if (enableDynamicAabbTree) + { + void* mem = btAlignedAlloc(sizeof(btDbvt),16); + m_dynamicAabbTree = new(mem) btDbvt(); + btAssert(mem==m_dynamicAabbTree); + } } @@ -41,6 +47,7 @@ btCompoundShape::~btCompoundShape() void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisionShape* shape) { + m_updateRevision++; //m_childTransforms.push_back(localTransform); //m_childShapes.push_back(shape); btCompoundShapeChild child; @@ -49,8 +56,7 @@ void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisio child.m_childShapeType = shape->getShapeType(); child.m_childMargin = shape->getMargin(); - m_children.push_back(child); - + //extend the local aabbMin/aabbMax btVector3 localAabbMin,localAabbMax; shape->getAabb(localTransform,localAabbMin,localAabbMax); @@ -69,14 +75,34 @@ void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisio if (m_dynamicAabbTree) { const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax); - int index = m_children.size()-1; + int index = m_children.size(); child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index); } + m_children.push_back(child); + +} + +void btCompoundShape::updateChildTransform(int childIndex, const btTransform& newChildTransform) +{ + m_children[childIndex].m_transform = newChildTransform; + + if (m_dynamicAabbTree) + { + ///update the dynamic aabb tree + btVector3 localAabbMin,localAabbMax; + m_children[childIndex].m_childShape->getAabb(newChildTransform,localAabbMin,localAabbMax); + ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax); + int index = m_children.size()-1; + m_dynamicAabbTree->update(m_children[childIndex].m_node,bounds); + } + + recalculateLocalAabb(); } void btCompoundShape::removeChildShapeByIndex(int childShapeIndex) { + m_updateRevision++; btAssert(childShapeIndex >=0 && childShapeIndex < m_children.size()); if (m_dynamicAabbTree) { @@ -87,8 +113,11 @@ void btCompoundShape::removeChildShapeByIndex(int childShapeIndex) } + + void btCompoundShape::removeChildShape(btCollisionShape* shape) { + m_updateRevision++; // Find the children containing the shape specified, and remove those children. //note: there might be multiple children using the same shape! for(int i = m_children.size()-1; i >= 0 ; i--) @@ -98,6 +127,8 @@ void btCompoundShape::removeChildShape(btCollisionShape* shape) m_children.swap(i,m_children.size()-1); m_children.pop_back(); //remove it from the m_dynamicAabbTree too + //@todo: this leads to problems due to caching in the btCompoundCollisionAlgorithm + //so effectively, removeChildShape is broken at the moment //m_dynamicAabbTree->remove(m_aabbProxies[i]); //m_aabbProxies.swap(i,m_children.size()-1); //m_aabbProxies.pop_back(); @@ -113,6 +144,7 @@ void btCompoundShape::recalculateLocalAabb() { // Recalculate the local aabb // Brute force, it iterates over all the shapes left. + m_localAabbMin = btVector3(btScalar(1e30),btScalar(1e30),btScalar(1e30)); m_localAabbMax = btVector3(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); @@ -135,19 +167,27 @@ void btCompoundShape::recalculateLocalAabb() void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const { btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); - localHalfExtents += btVector3(getMargin(),getMargin(),getMargin()); btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); + + //avoid an illegal AABB when there are no children + if (!m_children.size()) + { + localHalfExtents.setValue(0,0,0); + localCenter.setValue(0,0,0); + } + localHalfExtents += btVector3(getMargin(),getMargin(),getMargin()); + btMatrix3x3 abs_b = trans.getBasis().absolute(); - btPoint3 center = trans(localCenter); + btVector3 center = trans(localCenter); btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), abs_b[1].dot(localHalfExtents), abs_b[2].dot(localHalfExtents)); aabbMin = center-extent; aabbMax = center+extent; - + } void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const @@ -179,7 +219,9 @@ void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransf btScalar totalMass = 0; btVector3 center(0, 0, 0); - for (int k = 0; k < n; k++) + int k; + + for (k = 0; k < n; k++) { center += m_children[k].m_transform.getOrigin() * masses[k]; totalMass += masses[k]; @@ -188,7 +230,7 @@ void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransf principal.setOrigin(center); btMatrix3x3 tensor(0, 0, 0, 0, 0, 0, 0, 0, 0); - for (int k = 0; k < n; k++) + for ( k = 0; k < n; k++) { btVector3 i; m_children[k].m_childShape->calculateLocalInertia(masses[k], i); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h index 3624749f768..434860c8633 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h @@ -46,23 +46,26 @@ SIMD_FORCE_INLINE bool operator==(const btCompoundShapeChild& c1, const btCompou c1.m_childMargin == c2.m_childMargin ); } -/// btCompoundShape allows to store multiple other btCollisionShapes +/// The btCompoundShape allows to store multiple other btCollisionShapes /// This allows for moving concave collision objects. This is more general then the static concave btBvhTriangleMeshShape. +/// It has an (optional) dynamic aabb tree to accelerate early rejection tests. +/// @todo: This aabb tree can also be use to speed up ray tests on btCompoundShape, see http://code.google.com/p/bullet/issues/detail?id=25 +/// Currently, removal of child shapes is only supported when disabling the aabb tree (pass 'false' in the constructor of btCompoundShape) ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape { - //btAlignedObjectArray m_childTransforms; - //btAlignedObjectArray m_childShapes; btAlignedObjectArray m_children; btVector3 m_localAabbMin; btVector3 m_localAabbMax; - //btOptimizedBvh* m_aabbTree; btDbvt* m_dynamicAabbTree; + ///increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated + int m_updateRevision; + public: BT_DECLARE_ALIGNED_ALLOCATOR(); - btCompoundShape(); + btCompoundShape(bool enableDynamicAabbTree = true); virtual ~btCompoundShape(); @@ -88,15 +91,18 @@ public: return m_children[index].m_childShape; } - btTransform getChildTransform(int index) + btTransform& getChildTransform(int index) { return m_children[index].m_transform; } - const btTransform getChildTransform(int index) const + const btTransform& getChildTransform(int index) const { return m_children[index].m_transform; } + ///set a new transform for a child, and update internal data structures (local aabb and dynamic tree) + void updateChildTransform(int childIndex, const btTransform& newChildTransform); + btCompoundShapeChild* getChildList() { @@ -121,8 +127,6 @@ public: virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - virtual int getShapeType() const { return COMPOUND_SHAPE_PROXYTYPE;} - virtual void setMargin(btScalar margin) { m_collisionMargin = margin; @@ -151,6 +155,10 @@ public: ///of the collision object by the principal transform. void calculatePrincipalAxisTransform(btScalar* masses, btTransform& principal, btVector3& inertia) const; + int getUpdateRevision() const + { + return m_updateRevision; + } private: btScalar m_collisionMargin; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h index f3f57206ab7..30065d55a12 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h @@ -20,6 +20,16 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types #include "btTriangleCallback.h" +/// PHY_ScalarType enumerates possible scalar types. +/// See the btStridingMeshInterface or btHeightfieldTerrainShape for its use +typedef enum PHY_ScalarType { + PHY_FLOAT, + PHY_DOUBLE, + PHY_INTEGER, + PHY_SHORT, + PHY_FIXEDPOINT88, + PHY_UCHAR +} PHY_ScalarType; ///The btConcaveShape class provides an interface for non-moving (static) concave shapes. ///It has been implemented by the btStaticPlaneShape, btBvhTriangleMeshShape and btHeightfieldTerrainShape. diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp index 207b3024bc3..d887be61ada 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp @@ -14,14 +14,14 @@ subject to the following restrictions: */ #include "btConeShape.h" -#include "LinearMath/btPoint3.h" -btConeShape::btConeShape (btScalar radius,btScalar height): +btConeShape::btConeShape (btScalar radius,btScalar height): btConvexInternalShape (), m_radius (radius), m_height(height) { + m_shapeType = CONE_SHAPE_PROXYTYPE; setConeUpIndex(1); btVector3 halfExtents; m_sinAngle = (m_radius / btSqrt(m_radius * m_radius + m_height * m_height)); @@ -60,7 +60,7 @@ void btConeShape::setConeUpIndex(int upIndex) m_coneIndices[2] = 1; break; default: - assert(0); + btAssert(0); }; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h index 685369742e4..1869893f37a 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h @@ -69,9 +69,6 @@ public: } - - virtual int getShapeType() const { return CONE_SHAPE_PROXYTYPE; } - virtual const char* getName()const { return "Cone"; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp index 2596858bc3a..2b067367767 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp @@ -19,16 +19,17 @@ subject to the following restrictions: -btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int stride) +btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int stride) : btPolyhedralConvexShape () { - m_points.resize(numPoints); + m_shapeType = CONVEX_HULL_SHAPE_PROXYTYPE; + m_unscaledPoints.resize(numPoints); unsigned char* pointsBaseAddress = (unsigned char*)points; for (int i=0;i maxDot) @@ -91,9 +92,9 @@ void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const supportVerticesOut[i][3] = btScalar(-1e30); } } - for (int i=0;i m_points; + btAlignedObjectArray m_unscaledPoints; public: BT_DECLARE_ALIGNED_ALLOCATOR(); @@ -33,23 +33,38 @@ public: ///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. ///It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. ///btConvexHullShape make an internal copy of the points. - btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btPoint3)); + btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btVector3)); - void addPoint(const btPoint3& point); + void addPoint(const btVector3& point); - btPoint3* getPoints() + + btVector3* getUnscaledPoints() { - return &m_points[0]; + return &m_unscaledPoints[0]; } - const btPoint3* getPoints() const + const btVector3* getUnscaledPoints() const { - return &m_points[0]; + return &m_unscaledPoints[0]; } - int getNumPoints() const + ///getPoints is obsolete, please use getUnscaledPoints + const btVector3* getPoints() const { - return m_points.size(); + return getUnscaledPoints(); + } + + + + + SIMD_FORCE_INLINE btVector3 getScaledPoint(int i) const + { + return m_unscaledPoints[i] * m_localScaling; + } + + SIMD_FORCE_INLINE int getNumPoints() const + { + return m_unscaledPoints.size(); } virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; @@ -57,7 +72,6 @@ public: virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - virtual int getShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; } //debugging virtual const char* getName()const {return "Convex";} @@ -65,11 +79,11 @@ public: virtual int getNumVertices() const; virtual int getNumEdges() const; - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; - virtual void getVertex(int i,btPoint3& vtx) const; + virtual void getEdge(int i,btVector3& pa,btVector3& pb) const; + virtual void getVertex(int i,btVector3& vtx) const; virtual int getNumPlanes() const; - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const; - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; + virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const; + virtual bool isInside(const btVector3& pt,btScalar tolerance) const; ///in case we receive negative scaling virtual void setLocalScaling(const btVector3& scaling); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp index fb81c8a5bde..bfb741310e1 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp @@ -17,6 +17,7 @@ subject to the following restrictions: #include "btConvexInternalShape.h" + btConvexInternalShape::btConvexInternalShape() : m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)), m_collisionMargin(CONVEX_DISTANCE_MARGIN) @@ -48,7 +49,8 @@ void btConvexInternalShape::getAabbSlow(const btTransform& trans,btVector3&minAa tmp = trans(localGetSupportingVertex(vec*trans.getBasis())); minAabb[i] = tmp[i]-margin; } -}; +} + btVector3 btConvexInternalShape::localGetSupportingVertex(const btVector3& vec)const @@ -70,6 +72,7 @@ btVector3 btConvexInternalShape::localGetSupportingVertex(const btVector3& vec)c return supVertex; #else + btAssert(0); return btVector3(0,0,0); #endif //__SPU__ diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h index 9388ccf31f2..bab720d7b6d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h @@ -19,23 +19,18 @@ class btConvexInternalShape : public btConvexShape btScalar m_padding; + btConvexInternalShape(); + public: - btConvexInternalShape(); + virtual ~btConvexInternalShape() { } - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; -#ifndef __SPU__ - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; - - //notice that the vectors should be unit length - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; -#endif //#ifndef __SPU__ const btVector3& getImplicitShapeDimensions() const { diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp new file mode 100644 index 00000000000..4ab5d692945 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp @@ -0,0 +1,156 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ +#include "btConvexPointCloudShape.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" + +#include "LinearMath/btQuaternion.h" + +void btConvexPointCloudShape::setLocalScaling(const btVector3& scaling) +{ + m_localScaling = scaling; + recalcLocalAabb(); +} + +#ifndef __SPU__ +btVector3 btConvexPointCloudShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const +{ + btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.)); + btScalar newDot,maxDot = btScalar(-1e30); + + btVector3 vec = vec0; + btScalar lenSqr = vec.length2(); + if (lenSqr < btScalar(0.0001)) + { + vec.setValue(1,0,0); + } else + { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + vec *= rlen; + } + + + for (int i=0;i maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + return supVec; +} + +void btConvexPointCloudShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + btScalar newDot; + //use 'w' component of supportVerticesOut? + { + for (int i=0;i supportVerticesOut[j][3]) + { + //WARNING: don't swap next lines, the w component would get overwritten! + supportVerticesOut[j] = vtx; + supportVerticesOut[j][3] = newDot; + } + } + } + + + +} + + + +btVector3 btConvexPointCloudShape::localGetSupportingVertex(const btVector3& vec)const +{ + btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); + + if ( getMargin()!=btScalar(0.) ) + { + btVector3 vecnorm = vec; + if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) + { + vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); + } + vecnorm.normalize(); + supVertex+= getMargin() * vecnorm; + } + return supVertex; +} + + +#endif + + + + + + +//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection +//Please note that you can debug-draw btConvexHullShape with the Raytracer Demo +int btConvexPointCloudShape::getNumVertices() const +{ + return m_numPoints; +} + +int btConvexPointCloudShape::getNumEdges() const +{ + return 0; +} + +void btConvexPointCloudShape::getEdge(int i,btVector3& pa,btVector3& pb) const +{ + btAssert (0); +} + +void btConvexPointCloudShape::getVertex(int i,btVector3& vtx) const +{ + vtx = m_unscaledPoints[i]*m_localScaling; +} + +int btConvexPointCloudShape::getNumPlanes() const +{ + return 0; +} + +void btConvexPointCloudShape::getPlane(btVector3& ,btVector3& ,int ) const +{ + + btAssert(0); +} + +//not yet +bool btConvexPointCloudShape::isInside(const btVector3& ,btScalar ) const +{ + btAssert(0); + return false; +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h new file mode 100644 index 00000000000..7e1c13b29c1 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h @@ -0,0 +1,96 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_CONVEX_POINT_CLOUD_SHAPE_H +#define BT_CONVEX_POINT_CLOUD_SHAPE_H + +#include "btPolyhedralConvexShape.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "LinearMath/btAlignedObjectArray.h" + +///The btConvexPointCloudShape implements an implicit convex hull of an array of vertices. +ATTRIBUTE_ALIGNED16(class) btConvexPointCloudShape : public btPolyhedralConvexShape +{ + btVector3* m_unscaledPoints; + int m_numPoints; + +public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + + btConvexPointCloudShape(btVector3* points,int numPoints, const btVector3& localScaling,bool computeAabb = true) + { + m_localScaling = localScaling; + m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE; + m_unscaledPoints = points; + m_numPoints = numPoints; + + if (computeAabb) + recalcLocalAabb(); + } + + void setPoints (btVector3* points, int numPoints, bool computeAabb = true) + { + m_unscaledPoints = points; + m_numPoints = numPoints; + + if (computeAabb) + recalcLocalAabb(); + } + + SIMD_FORCE_INLINE btVector3* getUnscaledPoints() + { + return m_unscaledPoints; + } + + SIMD_FORCE_INLINE const btVector3* getUnscaledPoints() const + { + return m_unscaledPoints; + } + + SIMD_FORCE_INLINE int getNumPoints() const + { + return m_numPoints; + } + + SIMD_FORCE_INLINE btVector3 getScaledPoint( int index) const + { + return m_unscaledPoints[index] * m_localScaling; + } + +#ifndef __SPU__ + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; +#endif + + + //debugging + virtual const char* getName()const {return "ConvexPointCloud";} + + virtual int getNumVertices() const; + virtual int getNumEdges() const; + virtual void getEdge(int i,btVector3& pa,btVector3& pb) const; + virtual void getVertex(int i,btVector3& vtx) const; + virtual int getNumPlanes() const; + virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const; + virtual bool isInside(const btVector3& pt,btScalar tolerance) const; + + ///in case we receive negative scaling + virtual void setLocalScaling(const btVector3& scaling); +}; + + +#endif //BT_CONVEX_POINT_CLOUD_SHAPE_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp index 7afcccf8b03..7e67696f4c7 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp @@ -14,5 +14,366 @@ subject to the following restrictions: */ #include "btConvexShape.h" +#include "btTriangleShape.h" +#include "btSphereShape.h" +#include "btCylinderShape.h" +#include "btCapsuleShape.h" +#include "btConvexHullShape.h" +#include "btConvexPointCloudShape.h" + +btConvexShape::btConvexShape () +{ +} + +btConvexShape::~btConvexShape() +{ + +} + +static btVector3 convexHullSupport (const btVector3& localDir, const btVector3* points, int numPoints, const btVector3& localScaling) +{ + btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.)); + btScalar newDot,maxDot = btScalar(-1e30); + + btVector3 vec0(localDir.getX(),localDir.getY(),localDir.getZ()); + btVector3 vec = vec0; + btScalar lenSqr = vec.length2(); + if (lenSqr < btScalar(0.0001)) + { + vec.setValue(1,0,0); + } else { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + vec *= rlen; + } + + + for (int i=0;i maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + return btVector3(supVec.getX(),supVec.getY(),supVec.getZ()); +} + +btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btVector3& localDir) const +{ + switch (m_shapeType) + { + case SPHERE_SHAPE_PROXYTYPE: + { + return btVector3(0,0,0); + } + case BOX_SHAPE_PROXYTYPE: + { + btBoxShape* convexShape = (btBoxShape*)this; + const btVector3& halfExtents = convexShape->getImplicitShapeDimensions(); + + return btVector3(btFsels(localDir.x(), halfExtents.x(), -halfExtents.x()), + btFsels(localDir.y(), halfExtents.y(), -halfExtents.y()), + btFsels(localDir.z(), halfExtents.z(), -halfExtents.z())); + } + case TRIANGLE_SHAPE_PROXYTYPE: + { + btTriangleShape* triangleShape = (btTriangleShape*)this; + btVector3 dir(localDir.getX(),localDir.getY(),localDir.getZ()); + btVector3* vertices = &triangleShape->m_vertices1[0]; + btVector3 dots(dir.dot(vertices[0]), dir.dot(vertices[1]), dir.dot(vertices[2])); + btVector3 sup = vertices[dots.maxAxis()]; + return btVector3(sup.getX(),sup.getY(),sup.getZ()); + } + case CYLINDER_SHAPE_PROXYTYPE: + { + btCylinderShape* cylShape = (btCylinderShape*)this; + //mapping of halfextents/dimension onto radius/height depends on how cylinder local orientation is (upAxis) + + btVector3 halfExtents = cylShape->getImplicitShapeDimensions(); + btVector3 v(localDir.getX(),localDir.getY(),localDir.getZ()); + int cylinderUpAxis = cylShape->getUpAxis(); + int XX(1),YY(0),ZZ(2); + + switch (cylinderUpAxis) + { + case 0: + { + XX = 1; + YY = 0; + ZZ = 2; + } + break; + case 1: + { + XX = 0; + YY = 1; + ZZ = 2; + } + break; + case 2: + { + XX = 0; + YY = 2; + ZZ = 1; + + } + break; + default: + btAssert(0); + break; + }; + + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; + + btVector3 tmp; + btScalar d ; + + btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); + if (s != btScalar(0.0)) + { + d = radius / s; + tmp[XX] = v[XX] * d; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = v[ZZ] * d; + return btVector3(tmp.getX(),tmp.getY(),tmp.getZ()); + } else { + tmp[XX] = radius; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = btScalar(0.0); + return btVector3(tmp.getX(),tmp.getY(),tmp.getZ()); + } + } + case CAPSULE_SHAPE_PROXYTYPE: + { + btVector3 vec0(localDir.getX(),localDir.getY(),localDir.getZ()); + + btCapsuleShape* capsuleShape = (btCapsuleShape*)this; + btScalar halfHeight = capsuleShape->getHalfHeight(); + int capsuleUpAxis = capsuleShape->getUpAxis(); + + btScalar radius = capsuleShape->getRadius(); + btVector3 supVec(0,0,0); + + btScalar maxDot(btScalar(-1e30)); + + btVector3 vec = vec0; + btScalar lenSqr = vec.length2(); + if (lenSqr < btScalar(0.0001)) + { + vec.setValue(1,0,0); + } else + { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + vec *= rlen; + } + btVector3 vtx; + btScalar newDot; + { + btVector3 pos(0,0,0); + pos[capsuleUpAxis] = halfHeight; + + //vtx = pos +vec*(radius); + vtx = pos +vec*capsuleShape->getLocalScalingNV()*(radius) - vec * capsuleShape->getMarginNV(); + newDot = vec.dot(vtx); + + + if (newDot > maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + { + btVector3 pos(0,0,0); + pos[capsuleUpAxis] = -halfHeight; + + //vtx = pos +vec*(radius); + vtx = pos +vec*capsuleShape->getLocalScalingNV()*(radius) - vec * capsuleShape->getMarginNV(); + newDot = vec.dot(vtx); + if (newDot > maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + return btVector3(supVec.getX(),supVec.getY(),supVec.getZ()); + } + case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE: + { + btConvexPointCloudShape* convexPointCloudShape = (btConvexPointCloudShape*)this; + btVector3* points = convexPointCloudShape->getUnscaledPoints (); + int numPoints = convexPointCloudShape->getNumPoints (); + return convexHullSupport (localDir, points, numPoints,convexPointCloudShape->getLocalScalingNV()); + } + case CONVEX_HULL_SHAPE_PROXYTYPE: + { + btConvexHullShape* convexHullShape = (btConvexHullShape*)this; + btVector3* points = convexHullShape->getUnscaledPoints(); + int numPoints = convexHullShape->getNumPoints (); + return convexHullSupport (localDir, points, numPoints,convexHullShape->getLocalScalingNV()); + } + default: +#ifndef __SPU__ + return this->localGetSupportingVertexWithoutMargin (localDir); +#else + btAssert (0); +#endif + } + + // should never reach here + btAssert (0); + return btVector3 (btScalar(0.0f), btScalar(0.0f), btScalar(0.0f)); +} + +btVector3 btConvexShape::localGetSupportVertexNonVirtual (const btVector3& localDir) const +{ + btVector3 localDirNorm = localDir; + if (localDirNorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) + { + localDirNorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); + } + localDirNorm.normalize (); + + return localGetSupportVertexWithoutMarginNonVirtual(localDirNorm)+ getMarginNonVirtual() * localDirNorm; +} + +/* TODO: This should be bumped up to btCollisionShape () */ +btScalar btConvexShape::getMarginNonVirtual () const +{ + switch (m_shapeType) + { + case SPHERE_SHAPE_PROXYTYPE: + { + btSphereShape* sphereShape = (btSphereShape*)this; + return sphereShape->getRadius (); + } + case BOX_SHAPE_PROXYTYPE: + { + btBoxShape* convexShape = (btBoxShape*)this; + return convexShape->getMarginNV (); + } + case TRIANGLE_SHAPE_PROXYTYPE: + { + btTriangleShape* triangleShape = (btTriangleShape*)this; + return triangleShape->getMarginNV (); + } + case CYLINDER_SHAPE_PROXYTYPE: + { + btCylinderShape* cylShape = (btCylinderShape*)this; + return cylShape->getMarginNV(); + } + case CAPSULE_SHAPE_PROXYTYPE: + { + btCapsuleShape* capsuleShape = (btCapsuleShape*)this; + return capsuleShape->getMarginNV(); + } + case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE: + /* fall through */ + case CONVEX_HULL_SHAPE_PROXYTYPE: + { + btPolyhedralConvexShape* convexHullShape = (btPolyhedralConvexShape*)this; + return convexHullShape->getMarginNV(); + } + default: +#ifndef __SPU__ + return this->getMargin (); +#else + btAssert (0); +#endif + } + + // should never reach here + btAssert (0); + return btScalar(0.0f); +} + +void btConvexShape::getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const +{ + switch (m_shapeType) + { + case SPHERE_SHAPE_PROXYTYPE: + { + btSphereShape* sphereShape = (btSphereShape*)this; + btScalar radius = sphereShape->getImplicitShapeDimensions().getX();// * convexShape->getLocalScaling().getX(); + btScalar margin = radius + sphereShape->getMarginNonVirtual(); + const btVector3& center = t.getOrigin(); + btVector3 extent(margin,margin,margin); + aabbMin = center - extent; + aabbMax = center + extent; + } + break; + case CYLINDER_SHAPE_PROXYTYPE: + /* fall through */ + case BOX_SHAPE_PROXYTYPE: + { + btBoxShape* convexShape = (btBoxShape*)this; + btScalar margin=convexShape->getMarginNonVirtual(); + btVector3 halfExtents = convexShape->getImplicitShapeDimensions(); + halfExtents += btVector3(margin,margin,margin); + btMatrix3x3 abs_b = t.getBasis().absolute(); + btVector3 center = t.getOrigin(); + btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents)); + + aabbMin = center - extent; + aabbMax = center + extent; + break; + } + case TRIANGLE_SHAPE_PROXYTYPE: + { + btTriangleShape* triangleShape = (btTriangleShape*)this; + btScalar margin = triangleShape->getMarginNonVirtual(); + for (int i=0;i<3;i++) + { + btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); + vec[i] = btScalar(1.); + + btVector3 sv = localGetSupportVertexWithoutMarginNonVirtual(vec*t.getBasis()); + + btVector3 tmp = t(sv); + aabbMax[i] = tmp[i]+margin; + vec[i] = btScalar(-1.); + tmp = t(localGetSupportVertexWithoutMarginNonVirtual(vec*t.getBasis())); + aabbMin[i] = tmp[i]-margin; + } + } + break; + case CAPSULE_SHAPE_PROXYTYPE: + { + btCapsuleShape* capsuleShape = (btCapsuleShape*)this; + btVector3 halfExtents(capsuleShape->getRadius(),capsuleShape->getRadius(),capsuleShape->getRadius()); + int m_upAxis = capsuleShape->getUpAxis(); + halfExtents[m_upAxis] = capsuleShape->getRadius() + capsuleShape->getHalfHeight(); + halfExtents += btVector3(capsuleShape->getMarginNonVirtual(),capsuleShape->getMarginNonVirtual(),capsuleShape->getMarginNonVirtual()); + btMatrix3x3 abs_b = t.getBasis().absolute(); + btVector3 center = t.getOrigin(); + btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents)); + aabbMin = center - extent; + aabbMax = center + extent; + } + break; + case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE: + case CONVEX_HULL_SHAPE_PROXYTYPE: + { + btPolyhedralConvexShape* convexHullShape = (btPolyhedralConvexShape*)this; + btScalar margin = convexHullShape->getMarginNonVirtual(); + convexHullShape->getNonvirtualAabb (t, aabbMin, aabbMax, margin); + } + break; + default: +#ifndef __SPU__ + this->getAabb (t, aabbMin, aabbMax); +#else + btAssert (0); +#endif + break; + } + + // should never reach here + btAssert (0); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h index e4eb7f6dbf6..0cc7b349521 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h @@ -24,8 +24,6 @@ subject to the following restrictions: #include "btCollisionMargin.h" #include "LinearMath/btAlignedAllocator.h" -//todo: get rid of this btConvexCastResult thing! -struct btConvexCastResult; #define MAX_PREFERRED_PENETRATION_DIRECTIONS 10 /// The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape, btConvexHullShape etc. @@ -38,20 +36,25 @@ public: BT_DECLARE_ALIGNED_ALLOCATOR(); - virtual ~btConvexShape() - { + btConvexShape (); - } + virtual ~btConvexShape(); + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const = 0; + + //////// + #ifndef __SPU__ + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const=0; + #endif //#ifndef __SPU__ + + btVector3 localGetSupportVertexWithoutMarginNonVirtual (const btVector3& vec) const; + btVector3 localGetSupportVertexNonVirtual (const btVector3& vec) const; + btScalar getMarginNonVirtual () const; + void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const; - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const =0; -#ifndef __SPU__ - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; //notice that the vectors should be unit length virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; -#endif //#ifndef __SPU__ - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; @@ -69,6 +72,9 @@ public: virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const=0; + + + }; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp index 02a293e82ba..4bd986bb7f7 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp @@ -20,8 +20,9 @@ subject to the following restrictions: btConvexTriangleMeshShape ::btConvexTriangleMeshShape (btStridingMeshInterface* meshInterface, bool calcAabb) -:m_stridingMesh(meshInterface) +: btPolyhedralConvexShape(), m_stridingMesh(meshInterface) { + m_shapeType = CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE; if ( calcAabb ) recalcLocalAabb(); } @@ -107,7 +108,7 @@ void btConvexTriangleMeshShape::batchedUnitVectorGetSupportingVertexWithoutMargi } } - //todo: could do the batch inside the callback! + ///@todo: could do the batch inside the callback! for (int j=0;j 1 && "bad width"); + btAssert(heightStickLength > 1 && "bad length"); + btAssert(heightfieldData && "null heightfield data"); + // btAssert(heightScale) -- do we care? Trust caller here + btAssert(minHeight <= maxHeight && "bad min/max height"); + btAssert(upAxis >= 0 && upAxis < 3 && + "bad upAxis--should be in range [0,2]"); + btAssert(hdt != PHY_UCHAR || hdt != PHY_FLOAT || hdt != PHY_SHORT && + "Bad height data type enum"); + + // initialize member variables + m_shapeType = TERRAIN_SHAPE_PROXYTYPE; + m_heightStickWidth = heightStickWidth; + m_heightStickLength = heightStickLength; + m_minHeight = minHeight; + m_maxHeight = maxHeight; + m_width = (btScalar) (heightStickWidth - 1); + m_length = (btScalar) (heightStickLength - 1); + m_heightScale = heightScale; + m_heightfieldDataUnknown = heightfieldData; + m_heightDataType = hdt; + m_flipQuadEdges = flipQuadEdges; + m_useDiamondSubdivision = false; + m_upAxis = upAxis; + m_localScaling.setValue(btScalar(1.), btScalar(1.), btScalar(1.)); + + // determine min/max axis-aligned bounding box (aabb) values switch (m_upAxis) { case 0: { - halfExtents.setValue( - btScalar(m_maxHeight), - btScalar(m_width), //?? don't know if this should change - btScalar(m_length)); + m_localAabbMin.setValue(m_minHeight, 0, 0); + m_localAabbMax.setValue(m_maxHeight, m_width, m_length); break; } case 1: { - halfExtents.setValue( - btScalar(m_width), - btScalar(m_maxHeight), - btScalar(m_length)); + m_localAabbMin.setValue(0, m_minHeight, 0); + m_localAabbMax.setValue(m_width, m_maxHeight, m_length); break; }; case 2: { - halfExtents.setValue( - btScalar(m_width), - btScalar(m_length), - btScalar(m_maxHeight) - ); + m_localAabbMin.setValue(0, 0, m_minHeight); + m_localAabbMax.setValue(m_width, m_length, m_maxHeight); break; } default: { //need to get valid m_upAxis - btAssert(0); + btAssert(0 && "Bad m_upAxis"); } } - halfExtents*= btScalar(0.5); - - m_localAabbMin = -halfExtents - clampValue; - m_localAabbMax = halfExtents + clampValue; - btVector3 aabbSize = m_localAabbMax - m_localAabbMin; - + // remember origin (defined as exact middle of aabb) + m_localOrigin = btScalar(0.5) * (m_localAabbMin + m_localAabbMax); } + btHeightfieldTerrainShape::~btHeightfieldTerrainShape() { } @@ -92,57 +128,80 @@ btHeightfieldTerrainShape::~btHeightfieldTerrainShape() void btHeightfieldTerrainShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const { btVector3 halfExtents = (m_localAabbMax-m_localAabbMin)* m_localScaling * btScalar(0.5); - halfExtents += btVector3(getMargin(),getMargin(),getMargin()); + + btVector3 localOrigin(0, 0, 0); + localOrigin[m_upAxis] = (m_minHeight + m_maxHeight) * btScalar(0.5); + localOrigin *= m_localScaling; btMatrix3x3 abs_b = t.getBasis().absolute(); - btPoint3 center = t.getOrigin(); + btVector3 center = t.getOrigin(); btVector3 extent = btVector3(abs_b[0].dot(halfExtents), abs_b[1].dot(halfExtents), abs_b[2].dot(halfExtents)); - + extent += btVector3(getMargin(),getMargin(),getMargin()); aabbMin = center - extent; aabbMax = center + extent; - - } -btScalar btHeightfieldTerrainShape::getHeightFieldValue(int x,int y) const + +/// This returns the "raw" (user's initial) height, not the actual height. +/// The actual height needs to be adjusted to be relative to the center +/// of the heightfield's AABB. +btScalar +btHeightfieldTerrainShape::getRawHeightFieldValue(int x,int y) const { btScalar val = 0.f; - if (m_useFloatData) + switch (m_heightDataType) { - val = m_heightfieldDataFloat[(y*m_heightStickWidth)+x]; - } else - { - //assume unsigned short int - unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y*m_heightStickWidth)+x]; - val = heightFieldValue* (m_maxHeight/btScalar(65535)); + case PHY_FLOAT: + { + val = m_heightfieldDataFloat[(y*m_heightStickWidth)+x]; + break; + } + + case PHY_UCHAR: + { + unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y*m_heightStickWidth)+x]; + val = heightFieldValue * m_heightScale; + break; + } + + case PHY_SHORT: + { + short hfValue = m_heightfieldDataShort[(y * m_heightStickWidth) + x]; + val = hfValue * m_heightScale; + break; + } + + default: + { + btAssert(!"Bad m_heightDataType"); + } } + return val; } - +/// this returns the vertex in bullet-local coordinates void btHeightfieldTerrainShape::getVertex(int x,int y,btVector3& vertex) const { - btAssert(x>=0); btAssert(y>=0); btAssert(xstartX) startX = quantizedAabbMin[1]; if (quantizedAabbMax[1]startX) startX = quantizedAabbMin[0]; if (quantizedAabbMax[0]startX) startX = quantizedAabbMin[0]; if (quantizedAabbMax[0] aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; - overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; - overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; - return overlap; - } + + + /// protected initialization + /** + Handles the work of constructors so that public constructors can be + backwards-compatible without a lot of copy/paste. + */ + void initialize(int heightStickWidth, int heightStickLength, + void* heightfieldData, btScalar heightScale, + btScalar minHeight, btScalar maxHeight, int upAxis, + PHY_ScalarType heightDataType, bool flipQuadEdges); public: - btHeightfieldTerrainShape(int heightStickWidth,int heightStickHeight,void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges); + /// preferred constructor + /** + This constructor supports a range of heightfield + data types, and allows for a non-zero minimum height value. + heightScale is needed for any integer-based heightfield data types. + */ + btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength, + void* heightfieldData, btScalar heightScale, + btScalar minHeight, btScalar maxHeight, + int upAxis, PHY_ScalarType heightDataType, + bool flipQuadEdges); + + /// legacy constructor + /** + The legacy constructor assumes the heightfield has a minimum height + of zero. Only unsigned char or floats are supported. For legacy + compatibility reasons, heightScale is calculated as maxHeight / 65535 + (and is only used when useFloatData = false). + */ + btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges); virtual ~btHeightfieldTerrainShape(); void setUseDiamondSubdivision(bool useDiamondSubdivision=true) { m_useDiamondSubdivision = useDiamondSubdivision;} - virtual int getShapeType() const - { - return TERRAIN_SHAPE_PROXYTYPE; - } virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp index 8f893ac98aa..b107b0bea6e 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp @@ -17,23 +17,25 @@ subject to the following restrictions: btMinkowskiSumShape::btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB) -:m_shapeA(shapeA), +: btConvexInternalShape (), +m_shapeA(shapeA), m_shapeB(shapeB) { + m_shapeType = MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE; m_transA.setIdentity(); m_transB.setIdentity(); } btVector3 btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const { - btVector3 supVertexA = m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(-vec*m_transA.getBasis())); - btVector3 supVertexB = m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(vec*m_transB.getBasis())); + btVector3 supVertexA = m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(vec*m_transA.getBasis())); + btVector3 supVertexB = m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(-vec*m_transB.getBasis())); return supVertexA - supVertexB; } void btMinkowskiSumShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const { - //todo: could make recursive use of batching. probably this shape is not used frequently. + ///@todo: could make recursive use of batching. probably this shape is not used frequently. for (int i=0;iprocessAllTriangles(&triBuf,aabbMin, aabbMax); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp index b962829041a..5f292532861 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp @@ -82,7 +82,8 @@ bool btTriangleIndexVertexArray::hasPremadeAabb() const return (m_hasAabb == 1); } -void btTriangleIndexVertexArray::setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) + +void btTriangleIndexVertexArray::setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) const { m_aabbMin = aabbMin; m_aabbMax = aabbMax; @@ -95,3 +96,4 @@ void btTriangleIndexVertexArray::getPremadeAabb(btVector3* aabbMin, btVector3* a *aabbMax = m_aabbMax; } + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h index e546675f802..eb79ff5e47d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h @@ -52,9 +52,9 @@ ATTRIBUTE_ALIGNED16( class) btTriangleIndexVertexArray : public btStridingMeshIn protected: IndexedMeshArray m_indexedMeshes; int m_pad[2]; - int m_hasAabb; // using int instead of bool to maintain alignment - btVector3 m_aabbMin; - btVector3 m_aabbMax; + mutable int m_hasAabb; // using int instead of bool to maintain alignment + mutable btVector3 m_aabbMin; + mutable btVector3 m_aabbMax; public: @@ -106,7 +106,7 @@ public: virtual void preallocateIndices(int numindices){(void) numindices;} virtual bool hasPremadeAabb() const; - virtual void setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ); + virtual void setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) const; virtual void getPremadeAabb(btVector3* aabbMin, btVector3* aabbMax ) const; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp index 492854ff646..abefa71250a 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp @@ -1,3 +1,4 @@ + /* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp index 29d26316316..5dcfa51c280 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp @@ -35,13 +35,13 @@ m_weldingThreshold(0.0) if (m_use32bitIndices) { m_indexedMeshes[0].m_numTriangles = m_32bitIndices.size()/3; - m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_32bitIndices[0]; + m_indexedMeshes[0].m_triangleIndexBase = 0; m_indexedMeshes[0].m_indexType = PHY_INTEGER; m_indexedMeshes[0].m_triangleIndexStride = 3*sizeof(int); } else { m_indexedMeshes[0].m_numTriangles = m_16bitIndices.size()/3; - m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_16bitIndices[0]; + m_indexedMeshes[0].m_triangleIndexBase = 0; m_indexedMeshes[0].m_indexType = PHY_SHORT; m_indexedMeshes[0].m_triangleIndexStride = 3*sizeof(short int); } @@ -49,12 +49,12 @@ m_weldingThreshold(0.0) if (m_use4componentVertices) { m_indexedMeshes[0].m_numVertices = m_4componentVertices.size(); - m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_4componentVertices[0]; + m_indexedMeshes[0].m_vertexBase = 0; m_indexedMeshes[0].m_vertexStride = sizeof(btVector3); } else { m_indexedMeshes[0].m_numVertices = m_3componentVertices.size()/3; - m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_3componentVertices[0]; + m_indexedMeshes[0].m_vertexBase = 0; m_indexedMeshes[0].m_vertexStride = 3*sizeof(btScalar); } @@ -74,17 +74,21 @@ void btTriangleMesh::addIndex(int index) } } -int btTriangleMesh::findOrAddVertex(const btVector3& vertex) + +int btTriangleMesh::findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices) { //return index of new/existing vertex - //todo: could use acceleration structure for this + ///@todo: could use acceleration structure for this if (m_use4componentVertices) { - for (int i=0;i< m_4componentVertices.size();i++) - { - if ((m_4componentVertices[i]-vertex).length2() <= m_weldingThreshold) + if (removeDuplicateVertices) { - return i; + for (int i=0;i< m_4componentVertices.size();i++) + { + if ((m_4componentVertices[i]-vertex).length2() <= m_weldingThreshold) + { + return i; + } } } m_indexedMeshes[0].m_numVertices++; @@ -96,17 +100,20 @@ int btTriangleMesh::findOrAddVertex(const btVector3& vertex) } else { - for (int i=0;i< m_3componentVertices.size();i+=3) + if (removeDuplicateVertices) { - btVector3 vtx(m_3componentVertices[i],m_3componentVertices[i+1],m_3componentVertices[i+2]); - if ((vtx-vertex).length2() <= m_weldingThreshold) + for (int i=0;i< m_3componentVertices.size();i+=3) { - return i/3; + btVector3 vtx(m_3componentVertices[i],m_3componentVertices[i+1],m_3componentVertices[i+2]); + if ((vtx-vertex).length2() <= m_weldingThreshold) + { + return i/3; + } } - } - m_3componentVertices.push_back(vertex.getX()); - m_3componentVertices.push_back(vertex.getY()); - m_3componentVertices.push_back(vertex.getZ()); + } + m_3componentVertices.push_back((float)vertex.getX()); + m_3componentVertices.push_back((float)vertex.getY()); + m_3componentVertices.push_back((float)vertex.getZ()); m_indexedMeshes[0].m_numVertices++; m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_3componentVertices[0]; return (m_3componentVertices.size()/3)-1; @@ -114,13 +121,12 @@ int btTriangleMesh::findOrAddVertex(const btVector3& vertex) } -void btTriangleMesh::addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2) +void btTriangleMesh::addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2,bool removeDuplicateVertices) { m_indexedMeshes[0].m_numTriangles++; - - addIndex(findOrAddVertex(vertex0)); - addIndex(findOrAddVertex(vertex1)); - addIndex(findOrAddVertex(vertex2)); + addIndex(findOrAddVertex(vertex0,removeDuplicateVertices)); + addIndex(findOrAddVertex(vertex1,removeDuplicateVertices)); + addIndex(findOrAddVertex(vertex2,removeDuplicateVertices)); } int btTriangleMesh::getNumTriangles() const diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h index 1f51b2f2c87..f06fbb7c22d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h @@ -25,7 +25,6 @@ subject to the following restrictions: ///It allows either 32bit or 16bit indices, and 4 (x-y-z-w) or 3 (x-y-z) component vertices. ///If you want to share triangle/index data between graphics mesh and collision mesh (btBvhTriangleMeshShape), you can directly use btTriangleIndexVertexArray or derive your own class from btStridingMeshInterface. ///Performance of btTriangleMesh and btTriangleIndexVertexArray used in a btBvhTriangleMeshShape is the same. -///It has a brute-force option to weld together closeby vertices. class btTriangleMesh : public btTriangleIndexVertexArray { btAlignedObjectArray m_4componentVertices; @@ -42,7 +41,7 @@ class btTriangleMesh : public btTriangleIndexVertexArray btTriangleMesh (bool use32bitIndices=true,bool use4componentVertices=true); - int findOrAddVertex(const btVector3& vertex); + int findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices); void addIndex(int index); bool getUse32bitIndices() const @@ -54,8 +53,9 @@ class btTriangleMesh : public btTriangleIndexVertexArray { return m_use4componentVertices; } - - void addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2); + ///By default addTriangle won't search for duplicate vertices, because the search is very slow for large triangle meshes. + ///In general it is better to directly use btTriangleIndexVertexArray instead. + void addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2, bool removeDuplicateVertices=false); int getNumTriangles() const; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp index 0a2c77096d1..1bd7e84a4e7 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp @@ -22,8 +22,9 @@ subject to the following restrictions: btTriangleMeshShape::btTriangleMeshShape(btStridingMeshInterface* meshInterface) -: m_meshInterface(meshInterface) +: btConcaveShape (), m_meshInterface(meshInterface) { + m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE; if(meshInterface->hasPremadeAabb()) { meshInterface->getPremadeAabb(&m_localAabbMin, &m_localAabbMax); @@ -52,7 +53,7 @@ void btTriangleMeshShape::getAabb(const btTransform& trans,btVector3& aabbMin,bt btMatrix3x3 abs_b = trans.getBasis().absolute(); - btPoint3 center = trans(localCenter); + btVector3 center = trans(localCenter); btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), abs_b[1].dot(localHalfExtents), diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h index c9eabafe290..53d65799001 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h @@ -40,7 +40,7 @@ public: virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const { - assert(0); + btAssert(0); return localGetSupportingVertex(vec); } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h index ba7aa0c32a0..4bfb0b9e881 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h @@ -40,17 +40,13 @@ public: { vert = m_vertices1[index]; } - virtual int getShapeType() const - { - return TRIANGLE_SHAPE_PROXYTYPE; - } virtual int getNumEdges() const { return 3; } - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const + virtual void getEdge(int i,btVector3& pa,btVector3& pb) const { getVertex(i,pa); getVertex((i+1)%3,pb); @@ -83,15 +79,16 @@ public: - btTriangleShape(const btVector3& p0,const btVector3& p1,const btVector3& p2) + btTriangleShape(const btVector3& p0,const btVector3& p1,const btVector3& p2) : btPolyhedralConvexShape () { + m_shapeType = TRIANGLE_SHAPE_PROXYTYPE; m_vertices1[0] = p0; m_vertices1[1] = p1; m_vertices1[2] = p2; } - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i) const + virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i) const { getPlaneEquation(i,planeNormal,planeSupport); } @@ -107,7 +104,7 @@ public: normal.normalize(); } - virtual void getPlaneEquation(int i, btVector3& planeNormal,btPoint3& planeSupport) const + virtual void getPlaneEquation(int i, btVector3& planeNormal,btVector3& planeSupport) const { (void)i; calcNormal(planeNormal); @@ -121,7 +118,7 @@ public: inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); } - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const + virtual bool isInside(const btVector3& pt,btScalar tolerance) const { btVector3 normal; calcNormal(normal); @@ -135,7 +132,7 @@ public: int i; for (i=0;i<3;i++) { - btPoint3 pa,pb; + btVector3 pa,pb; getEdge(i,pa,pb); btVector3 edge = pb-pa; btVector3 edgeNormal = edge.cross(normal); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp index ef340286cb0..4c1c716d519 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp @@ -16,9 +16,10 @@ subject to the following restrictions: #include "btUniformScalingShape.h" btUniformScalingShape::btUniformScalingShape( btConvexShape* convexChildShape,btScalar uniformScalingFactor): -m_childConvexShape(convexChildShape), +btConvexShape (), m_childConvexShape(convexChildShape), m_uniformScalingFactor(uniformScalingFactor) { + m_shapeType = UNIFORM_SCALING_SHAPE_PROXYTYPE; } btUniformScalingShape::~btUniformScalingShape() diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h index 1e17fc8e198..945976ac036 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h @@ -61,7 +61,6 @@ class btUniformScalingShape : public btConvexShape return "UniformScalingShape"; } - virtual int getShapeType() const { return UNIFORM_SCALING_SHAPE_PROXYTYPE; } /////////////////////////// diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h b/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h index cf43f487e24..827a3c89587 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btBoxCollision.h @@ -26,9 +26,6 @@ subject to the following restrictions: #include "LinearMath/btTransform.h" -/*! \defgroup BOUND_AABB_OPERATIONS -*/ -//! @{ ///Swap numbers #define BT_SWAP_NUMBERS(a,b){ \ @@ -41,7 +38,7 @@ subject to the following restrictions: #define BT_MAX(a,b) (ab?b:a) -#define BT_GREATER(x, y) fabsf(x) > (y) +#define BT_GREATER(x, y) btFabs(x) > (y) #define BT_MAX3(a,b,c) BT_MAX(a,BT_MAX(b,c)) #define BT_MIN3(a,b,c) BT_MIN(a,BT_MIN(b,c)) @@ -181,7 +178,7 @@ public: { for(j=0;j<3;j++ ) { - m_AR[i][j] = 1e-6f + fabsf(m_R1to0[i][j]); + m_AR[i][j] = 1e-6f + btFabs(m_R1to0[i][j]); } } @@ -646,6 +643,5 @@ SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btT } -//! @} #endif // GIM_BOX_COLLISION_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h b/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h index 28c03b7e039..5de391a7561 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btClipPolygon.h @@ -27,9 +27,6 @@ subject to the following restrictions: #include "LinearMath/btTransform.h" #include "LinearMath/btGeometryUtil.h" -/*! \addtogroup GEOMETRIC_OPERATIONS -*/ -//! @{ SIMD_FORCE_INLINE btScalar bt_distance_point_plane(const btVector4 & plane,const btVector3 &point) { @@ -181,6 +178,5 @@ SIMD_FORCE_INLINE int bt_plane_clip_triangle( -//! @} #endif // GIM_TRI_COLLISION_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp index faba2d8a542..c3b697bdd1e 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp +++ b/extern/bullet2/src/BulletCollision/Gimpact/btContactProcessing.cpp @@ -103,12 +103,12 @@ void btContactArray::merge_contacts( push_back(contacts[keycontacts[0].m_value]); - BT_CONTACT * pcontact = &(*this)[0]; + GIM_CONTACT * pcontact = &(*this)[0]; for( i=1;i +class btContactArray:public btAlignedObjectArray { public: btContactArray() @@ -124,11 +120,11 @@ public: const btVector3 &point,const btVector3 & normal, btScalar depth, int feature1, int feature2) { - push_back( BT_CONTACT(point,normal,depth,feature1,feature2) ); + push_back( GIM_CONTACT(point,normal,depth,feature1,feature2) ); } SIMD_FORCE_INLINE void push_triangle_contacts( - const BT_TRIANGLE_CONTACT & tricontact, + const GIM_TRIANGLE_CONTACT & tricontact, int feature1,int feature2) { for(int i = 0;i>1); } - bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex)); - btAssert(!unbal); + btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex)))); return splitIndex; } -void btBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex) +void btBvhTree::_build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex) { int curIndex = m_num_nodes; m_num_nodes++; @@ -211,7 +210,7 @@ void btBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIn //! stackless build tree void btBvhTree::build_tree( - BT_BVH_DATA_ARRAY & primitive_boxes) + GIM_BVH_DATA_ARRAY & primitive_boxes) { // initialize node count to 0 m_num_nodes = 0; @@ -236,7 +235,7 @@ void btGImpactBvh::refit() } else { - //const BT_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount); + //const GIM_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount); //get left bound btAABB bound; bound.invalidate(); @@ -266,7 +265,7 @@ void btGImpactBvh::refit() void btGImpactBvh::buildSet() { //obtain primitive boxes - BT_BVH_DATA_ARRAY primitive_boxes; + GIM_BVH_DATA_ARRAY primitive_boxes; primitive_boxes.resize(m_primitive_manager->get_primitive_count()); for (int i = 0;i +class btPairSet: public btAlignedObjectArray { public: btPairSet() @@ -71,32 +65,32 @@ public: } inline void push_pair(int index1,int index2) { - push_back(BT_PAIR(index1,index2)); + push_back(GIM_PAIR(index1,index2)); } inline void push_pair_inv(int index1,int index2) { - push_back(BT_PAIR(index2,index1)); + push_back(GIM_PAIR(index2,index1)); } }; - -struct BT_BVH_DATA +///GIM_BVH_DATA is an internal GIMPACT collision structure to contain axis aligned bounding box +struct GIM_BVH_DATA { btAABB m_bound; int m_data; }; //! Node Structure for trees -class BT_BVH_TREE_NODE +class GIM_BVH_TREE_NODE { public: btAABB m_bound; protected: int m_escapeIndexOrDataIndex; public: - BT_BVH_TREE_NODE() + GIM_BVH_TREE_NODE() { m_escapeIndexOrDataIndex = 0; } @@ -133,12 +127,12 @@ public: }; -class BT_BVH_DATA_ARRAY:public btAlignedObjectArray +class GIM_BVH_DATA_ARRAY:public btAlignedObjectArray { }; -class BT_BVH_TREE_NODE_ARRAY:public btAlignedObjectArray +class GIM_BVH_TREE_NODE_ARRAY:public btAlignedObjectArray { }; @@ -150,15 +144,15 @@ class btBvhTree { protected: int m_num_nodes; - BT_BVH_TREE_NODE_ARRAY m_node_array; + GIM_BVH_TREE_NODE_ARRAY m_node_array; protected: int _sort_and_calc_splitting_index( - BT_BVH_DATA_ARRAY & primitive_boxes, + GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex, int splitAxis); - int _calc_splitting_axis(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); + int _calc_splitting_axis(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); - void _build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); + void _build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); public: btBvhTree() { @@ -167,7 +161,7 @@ public: //! prototype functions for box tree management //!@{ - void build_tree(BT_BVH_DATA_ARRAY & primitive_boxes); + void build_tree(GIM_BVH_DATA_ARRAY & primitive_boxes); SIMD_FORCE_INLINE void clearNodes() { @@ -218,7 +212,7 @@ public: return m_node_array[nodeindex].getEscapeIndex(); } - SIMD_FORCE_INLINE const BT_BVH_TREE_NODE * get_node_pointer(int index = 0) const + SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int index = 0) const { return &m_node_array[index]; } @@ -382,12 +376,11 @@ public: } - SIMD_FORCE_INLINE const BT_BVH_TREE_NODE * get_node_pointer(int index = 0) const + SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int index = 0) const { return m_box_tree.get_node_pointer(index); } -//! @} static float getAverageTreeCollisionTime(); diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp index 28ad18fbde2..4d6fa88f62d 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp @@ -192,7 +192,7 @@ float btGImpactCollisionAlgorithm::getAverageTriangleCollisionTime() btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) -: btCollisionAlgorithm(ci) +: btActivatingCollisionAlgorithm(ci,body0,body1) { m_manifoldPtr = NULL; m_convex_algorithm = NULL; @@ -404,7 +404,7 @@ void btGImpactCollisionAlgorithm::collide_sat_triangles(btCollisionObject * body btPrimitiveTriangle ptri0; btPrimitiveTriangle ptri1; - BT_TRIANGLE_CONTACT contact_data; + GIM_TRIANGLE_CONTACT contact_data; shape0->lockChildShapes(); shape1->lockChildShapes(); @@ -540,7 +540,7 @@ void btGImpactCollisionAlgorithm::gimpact_vs_gimpact( int i = pairset.size(); while(i--) { - BT_PAIR * pair = &pairset[i]; + GIM_PAIR * pair = &pairset[i]; m_triface0 = pair->m_index1; m_triface1 = pair->m_index2; btCollisionShape * colshape0 = retriever0.getChildShape(m_triface0); @@ -584,14 +584,15 @@ void btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject * body0, if(shape0->getGImpactShapeType()==CONST_GIMPACT_TRIMESH_SHAPE) { btGImpactMeshShape * meshshape0 = static_cast(shape0); - m_part0 = meshshape0->getMeshPartCount(); + int& part = swapped ? m_part1 : m_part0; + part = meshshape0->getMeshPartCount(); - while(m_part0--) + while(part--) { gimpact_vs_shape(body0, body1, - meshshape0->getMeshPart(m_part0), + meshshape0->getMeshPart(part), shape1,swapped); } diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h index c745b7ed5d8..453472aa034 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h @@ -24,7 +24,7 @@ subject to the following restrictions: #ifndef BVH_CONCAVE_COLLISION_ALGORITHM_H #define BVH_CONCAVE_COLLISION_ALGORITHM_H -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h" #include "BulletCollision/BroadphaseCollision/btDispatcher.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" @@ -51,7 +51,7 @@ btCollisionDispatcher * dispatcher = static_cast(m_dyna btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); \endcode */ -class btGImpactCollisionAlgorithm : public btCollisionAlgorithm +class btGImpactCollisionAlgorithm : public btActivatingCollisionAlgorithm { protected: btCollisionAlgorithm * m_convex_algorithm; @@ -67,7 +67,7 @@ protected: //! Creates a new contact point SIMD_FORCE_INLINE btPersistentManifold* newContactManifold(btCollisionObject* body0,btCollisionObject* body1) { - m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1); + m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1); return m_manifoldPtr; } diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp index 0b1ef6acd83..ea1647a8129 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp @@ -67,7 +67,7 @@ float btGImpactQuantizedBvh::getAverageTreeCollisionTime() /////////////////////// btQuantizedBvhTree ///////////////////////////////// void btQuantizedBvhTree::calc_quantization( - BT_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin) + GIM_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin) { //calc globa box btAABB global_bound; @@ -86,7 +86,7 @@ void btQuantizedBvhTree::calc_quantization( int btQuantizedBvhTree::_calc_splitting_axis( - BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex) + GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex) { int i; @@ -118,7 +118,7 @@ int btQuantizedBvhTree::_calc_splitting_axis( int btQuantizedBvhTree::_sort_and_calc_splitting_index( - BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, + GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex, int splitAxis) { int i; @@ -171,15 +171,14 @@ int btQuantizedBvhTree::_sort_and_calc_splitting_index( splitIndex = startIndex+ (numIndices>>1); } - bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex)); - btAssert(!unbal); + btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex)))); return splitIndex; } -void btQuantizedBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex) +void btQuantizedBvhTree::_build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex) { int curIndex = m_num_nodes; m_num_nodes++; @@ -232,7 +231,7 @@ void btQuantizedBvhTree::_build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, in //! stackless build tree void btQuantizedBvhTree::build_tree( - BT_BVH_DATA_ARRAY & primitive_boxes) + GIM_BVH_DATA_ARRAY & primitive_boxes) { calc_quantization(primitive_boxes); // initialize node count to 0 @@ -258,7 +257,7 @@ void btGImpactQuantizedBvh::refit() } else { - //const BT_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount); + //const GIM_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount); //get left bound btAABB bound; bound.invalidate(); @@ -288,7 +287,7 @@ void btGImpactQuantizedBvh::refit() void btGImpactQuantizedBvh::buildSet() { //obtain primitive boxes - BT_BVH_DATA_ARRAY primitive_boxes; + GIM_BVH_DATA_ARRAY primitive_boxes; primitive_boxes.resize(m_primitive_manager->get_primitive_count()); for (int i = 0;i +class GIM_QUANTIZED_BVH_NODE_ARRAY:public btAlignedObjectArray { }; @@ -112,19 +106,19 @@ class btQuantizedBvhTree { protected: int m_num_nodes; - BT_QUANTIZED_BVH_NODE_ARRAY m_node_array; + GIM_QUANTIZED_BVH_NODE_ARRAY m_node_array; btAABB m_global_bound; btVector3 m_bvhQuantization; protected: - void calc_quantization(BT_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin = btScalar(1.0) ); + void calc_quantization(GIM_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin = btScalar(1.0) ); int _sort_and_calc_splitting_index( - BT_BVH_DATA_ARRAY & primitive_boxes, + GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex, int splitAxis); - int _calc_splitting_axis(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); + int _calc_splitting_axis(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); - void _build_sub_tree(BT_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); + void _build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex); public: btQuantizedBvhTree() { @@ -133,7 +127,7 @@ public: //! prototype functions for box tree management //!@{ - void build_tree(BT_BVH_DATA_ARRAY & primitive_boxes); + void build_tree(GIM_BVH_DATA_ARRAY & primitive_boxes); SIMD_FORCE_INLINE void quantizePoint( unsigned short * quantizedpoint, const btVector3 & point) const @@ -365,7 +359,6 @@ public: return m_box_tree.get_node_pointer(index); } -//! @} static float getAverageTreeCollisionTime(); diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h index 43f32bea5a1..05431cfce15 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.h @@ -105,6 +105,7 @@ protected: public: btGImpactShapeInterface() { + m_shapeType=GIMPACT_SHAPE_PROXYTYPE; m_localAABB.invalidate(); m_needs_update = true; localScaling.setValue(1.f,1.f,1.f); @@ -880,6 +881,8 @@ Set of btGImpactMeshShapePart parts */ class btGImpactMeshShape : public btGImpactShapeInterface { + btStridingMeshInterface* m_meshInterface; + protected: btAlignedObjectArray m_mesh_parts; void buildMeshParts(btStridingMeshInterface * meshInterface) @@ -906,6 +909,7 @@ protected: public: btGImpactMeshShape(btStridingMeshInterface * meshInterface) { + m_meshInterface = meshInterface; buildMeshParts(meshInterface); } @@ -921,6 +925,15 @@ public: } + btStridingMeshInterface* getMeshInterface() + { + return m_meshInterface; + } + + const btStridingMeshInterface* getMeshInterface() const + { + return m_meshInterface; + } int getMeshPartCount() const { @@ -1032,12 +1045,12 @@ public: } //! call when reading child shapes - virtual void lockChildShapes() + virtual void lockChildShapes() const { btAssert(0); } - virtual void unlockChildShapes() + virtual void unlockChildShapes() const { btAssert(0); } diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp index 4b4b5e20dd3..956fa0430e3 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp @@ -251,16 +251,16 @@ bool btGenericPoolAllocator::freeMemory(void * pointer) #define BT_DEFAULT_POOL_ELEMENT_SIZE 8 // main allocator -class BT_STANDARD_ALLOCATOR: public btGenericPoolAllocator +class GIM_STANDARD_ALLOCATOR: public btGenericPoolAllocator { public: - BT_STANDARD_ALLOCATOR():btGenericPoolAllocator(BT_DEFAULT_POOL_ELEMENT_SIZE,BT_DEFAULT_POOL_SIZE) + GIM_STANDARD_ALLOCATOR():btGenericPoolAllocator(BT_DEFAULT_POOL_ELEMENT_SIZE,BT_DEFAULT_POOL_SIZE) { } }; // global allocator -BT_STANDARD_ALLOCATOR g_main_allocator; +GIM_STANDARD_ALLOCATOR g_main_allocator; void * btPoolAlloc(size_t size) diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h index 05b79a82516..e883bcd23d2 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGenericPoolAllocator.h @@ -155,14 +155,9 @@ public: -/*! \defgroup POOL_MEMORY_FUNCTIONS -standar managed Memory functions. Memory pools are used. -*/ -//! @{ void * btPoolAlloc(size_t size); void * btPoolRealloc(void *ptr, size_t oldsize, size_t newsize); void btPoolFree(void *ptr); -//! @} #endif diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h b/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h index f5800716a96..bc5a416ddb7 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btGeometryOperations.h @@ -29,9 +29,6 @@ subject to the following restrictions: -/*! \defgroup GEOMETRIC_OPERATIONS -*/ -//! @{ #define PLANEDIREPSILON 0.0000001f @@ -210,7 +207,6 @@ SIMD_FORCE_INLINE void bt_segment_collision( -//! @} #endif // GIM_VECTOR_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h b/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h index e9e6ad3d805..7faada61c95 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btQuantization.h @@ -29,9 +29,6 @@ subject to the following restrictions: -/*! \defgroup GEOMETRIC_OPERATIONS -*/ -//! @{ @@ -86,7 +83,6 @@ SIMD_FORCE_INLINE btVector3 bt_unquantize( return vecOut; } -//! @} #endif // GIM_VECTOR_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp index 0267f7e67c7..78696277c34 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp +++ b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp @@ -25,7 +25,7 @@ subject to the following restrictions: -void BT_TRIANGLE_CONTACT::merge_points(const btVector4 & plane, +void GIM_TRIANGLE_CONTACT::merge_points(const btVector4 & plane, btScalar margin, const btVector3 * points, int point_count) { m_point_count = 0; @@ -123,7 +123,7 @@ int btPrimitiveTriangle::clip_triangle(btPrimitiveTriangle & other, btVector3 * return clipped_count; } -bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangle & other, BT_TRIANGLE_CONTACT & contacts) +bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangle & other, GIM_TRIANGLE_CONTACT & contacts) { btScalar margin = m_margin + other.m_margin; @@ -132,7 +132,7 @@ bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangl //create planes // plane v vs U points - BT_TRIANGLE_CONTACT contacts1; + GIM_TRIANGLE_CONTACT contacts1; contacts1.m_separating_normal = m_plane; @@ -152,7 +152,7 @@ bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangl //Clip tri1 by tri2 edges - BT_TRIANGLE_CONTACT contacts2; + GIM_TRIANGLE_CONTACT contacts2; contacts2.m_separating_normal = other.m_plane; clipped_count = other.clip_triangle(*this,clipped_points); diff --git a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h index bdaa323d564..bbd6b630c02 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/btTriangleShapeEx.h @@ -35,14 +35,14 @@ subject to the following restrictions: #define MAX_TRI_CLIPPING 16 //! Structure for collision -struct BT_TRIANGLE_CONTACT +struct GIM_TRIANGLE_CONTACT { btScalar m_penetration_depth; int m_point_count; btVector4 m_separating_normal; btVector3 m_points[MAX_TRI_CLIPPING]; - SIMD_FORCE_INLINE void copy_from(const BT_TRIANGLE_CONTACT& other) + SIMD_FORCE_INLINE void copy_from(const GIM_TRIANGLE_CONTACT& other) { m_penetration_depth = other.m_penetration_depth; m_separating_normal = other.m_separating_normal; @@ -54,11 +54,11 @@ struct BT_TRIANGLE_CONTACT } } - BT_TRIANGLE_CONTACT() + GIM_TRIANGLE_CONTACT() { } - BT_TRIANGLE_CONTACT(const BT_TRIANGLE_CONTACT& other) + GIM_TRIANGLE_CONTACT(const GIM_TRIANGLE_CONTACT& other) { copy_from(other); } @@ -123,7 +123,7 @@ public: /*! \pre this triangle and other must have their triangles calculated */ - bool find_triangle_collision_clip_method(btPrimitiveTriangle & other, BT_TRIANGLE_CONTACT & contacts); + bool find_triangle_collision_clip_method(btPrimitiveTriangle & other, GIM_TRIANGLE_CONTACT & contacts); }; diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h index 89fbb5ab0a5..c8161d252d5 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_array.h @@ -34,11 +34,6 @@ email: projectileman@yahoo.com #include "gim_memory.h" -/*! \addtogroup CONTAINERS -\brief -Abstract class for template containers -*/ -//! @{ #define GIM_ARRAY_GROW_INCREMENT 2 #define GIM_ARRAY_GROW_FACTOR 2 @@ -321,11 +316,10 @@ public: { resizeData(m_size); } -//!@} + }; -//! @} diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h index d4cbce04b5e..666abf7917a 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h @@ -40,9 +40,6 @@ email: projectileman@yahoo.com -/*! \defgroup GEOMETRIC_OPERATIONS -*/ -//! @{ #define PLANEDIREPSILON 0.0000001f @@ -541,7 +538,6 @@ SIMD_FORCE_INLINE void SORT_3_INDICES( -//! @} #endif // GIM_VECTOR_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h index 7784aeff140..322004a8d5b 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_bitset.h @@ -34,11 +34,6 @@ email: projectileman@yahoo.com #include "gim_array.h" -/*! \addtogroup CONTAINERS -\brief -Abstract class for template containers -*/ -//! @{ #define GUINT_BIT_COUNT 32 #define GUINT_EXPONENT 5 @@ -122,7 +117,6 @@ public: }; -//! @} diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h index c9bb83e3653..0add5e4b99f 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_collision.h @@ -35,9 +35,6 @@ email: projectileman@yahoo.com #include "gim_basic_geometry_operations.h" #include "LinearMath/btTransform.h" -/*! \defgroup BOUND_AABB_OPERATIONS -*/ -//! @{ //SIMD_FORCE_INLINE bool test_cross_edge_box( @@ -589,6 +586,5 @@ SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btT } -//! @} #endif // GIM_BOX_COLLISION_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp index 1ffc2bbad78..0c3d7ba8db0 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.cpp @@ -110,8 +110,7 @@ GUINT GIM_BOX_TREE::_sort_and_calc_splitting_index( splitIndex = startIndex+ (numIndices>>1); } - bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex)); - btAssert(!unbal); + btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex)))); return splitIndex; } @@ -180,3 +179,4 @@ void GIM_BOX_TREE::build_tree( _build_sub_tree(primitive_boxes, 0, primitive_boxes.size()); } + diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h index ece5936de6b..1058a0872a5 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_box_set.h @@ -40,12 +40,6 @@ email: projectileman@yahoo.com #include "gim_tri_collision.h" -/*! \defgroup BOX_PRUNNING - - - -*/ -//! @{ //! Overlapping pair struct GIM_PAIR @@ -446,7 +440,6 @@ public: m_primitive_manager.get_primitive_triangle(getNodeData(nodeindex),triangle); } -//! @} }; //! Class for Box Tree Sets diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h index 62151cb97b7..a91fd3aa422 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_clip_polygon.h @@ -33,9 +33,6 @@ email: projectileman@yahoo.com ----------------------------------------------------------------------------- */ -/*! \addtogroup GEOMETRIC_OPERATIONS -*/ -//! @{ //! This function calcs the distance from a 3D plane class DISTANCE_PLANE_3D_FUNC @@ -209,6 +206,5 @@ SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D( } -//! @} #endif // GIM_TRI_COLLISION_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h index 62df51b782f..ad3e12298fe 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_contact.h @@ -36,17 +36,6 @@ email: projectileman@yahoo.com #include "gim_radixsort.h" #include "gim_array.h" -/*! \defgroup CONTACTS -\brief -Functions for managing and sorting contacts resulting from a collision query. -
    -
  • Contact lists must be create by calling \ref GIM_CREATE_CONTACT_LIST -
  • After querys, contact lists must be destroy by calling \ref GIM_DYNARRAY_DESTROY -
  • Contacts can be merge for avoid duplicate results by calling \ref gim_merge_contacts -
- -*/ -//! @{ /** Configuration var for applying interpolation of contact normals @@ -55,6 +44,10 @@ Configuration var for applying interpolation of contact normals #define CONTACT_DIFF_EPSILON 0.00001f /// Structure for collision results +///Functions for managing and sorting contacts resulting from a collision query. +///Contact lists must be create by calling \ref GIM_CREATE_CONTACT_LIST +///After querys, contact lists must be destroy by calling \ref GIM_DYNARRAY_DESTROY +///Contacts can be merge for avoid duplicate results by calling \ref gim_merge_contacts class GIM_CONTACT { public: @@ -168,5 +161,4 @@ public: void merge_contacts_unique(const gim_contact_array & contacts); }; -//! @} #endif // GIM_CONTACT_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h index cd3e53dcc0c..2fb1e3f9e45 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_geom_types.h @@ -36,11 +36,7 @@ email: projectileman@yahoo.com #include "gim_math.h" -/*! \defgroup GEOMETRIC_TYPES -\brief -Basic types and constants for geometry -*/ -//! @{ + //! Short Integer vector 2D typedef GSHORT vec2s[2]; @@ -95,7 +91,6 @@ typedef GREAL mat4f[4][4]; typedef GREAL quatf[4]; //typedef struct _aabb3f aabb3f; -//! @} diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h index fd980dff5fa..93c66f81823 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_hash_table.h @@ -34,11 +34,6 @@ email: projectileman@yahoo.com #include "gim_radixsort.h" -/*! \addtogroup CONTAINERS -\brief -Abstract class for collision objects -*/ -//! @{ #define GIM_INVALID_HASH 0xffffffff //!< A very very high value #define GIM_DEFAULT_HASH_TABLE_SIZE 380 @@ -204,12 +199,7 @@ protected: //SuperBufferedArray< _node_type > m_nodes; bool m_sorted; - /*! \defgroup HASH_TABLE_STRUCTURES - \brief - Hash table data management. The hash table has the indices to the corresponding m_nodes array - */ - //! @{ - + ///Hash table data management. The hash table has the indices to the corresponding m_nodes array GUINT * m_hash_table;//!< GUINT m_table_size;//!< GUINT m_node_size;//!< @@ -459,13 +449,8 @@ protected: } - //! @} - - /*! \defgroup SORTED_ARRAY_STRUCTURES - \brief - Sorted array data management. The hash table has the indices to the corresponding m_nodes array - */ - //! @{ + + ///Sorted array data management. The hash table has the indices to the corresponding m_nodes array inline bool _erase_sorted(GUINT index) { if(index>=(GUINT)m_nodes.size()) return false; @@ -575,8 +560,7 @@ protected: return GIM_INVALID_HASH; } - //! @} - + public: @@ -913,8 +897,6 @@ public: }; -//! @} - #endif // GIM_CONTAINERS_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h index adf1c1c2ddf..0247d4e61cc 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_linear_math.h @@ -40,11 +40,6 @@ email: projectileman@yahoo.com -/*! \defgroup VECTOR_OPERATIONS -T -Operations for vectors : vec2f,vec3f and vec4f -*/ -//! @{ //! Zero out a 2D vector #define VEC_ZERO_2(a) \ @@ -446,13 +441,8 @@ Takes two vectors a, b, blends them together with s <=1 */ -//! @} -/*! \defgroup MATRIX_OPERATIONS -Operations for matrices : mat2f, mat3f and mat4f -*/ -//! @{ /// initialize matrix #define IDENTIFY_MATRIX_3X3(m) \ @@ -1579,6 +1569,5 @@ and m is a mat4f
}\ -//! @} #endif // GIM_VECTOR_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h index 25ad1e21c7f..8b9e6806ef7 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_math.h @@ -35,13 +35,6 @@ email: projectileman@yahoo.com #include "LinearMath/btScalar.h" -/*! \defgroup BASIC_TYPES -Basic types and constants -Conventions: -Types starting with G -Constants starting with G_ -*/ -//! @{ #define GREAL btScalar #define GREAL2 double @@ -52,15 +45,7 @@ Constants starting with G_ #define GINT64 long long #define GUINT64 unsigned long long -//! @} -/*! \defgroup BASIC_CONSTANTS -Basic constants -Conventions: -Types starting with G -Constants starting with G_ -*/ -//! @{ #define G_PI 3.14159265358979f #define G_HALF_PI 1.5707963f @@ -73,14 +58,9 @@ Constants starting with G_ #define G_REAL_INFINITY FLT_MAX #define G_SIGN_BITMASK 0x80000000 #define G_EPSILON SIMD_EPSILON -//! @} -/*! \defgroup SCALAR_TYPES -\brief -Precision type constants -*/ -//! @{ + enum GIM_SCALAR_TYPES { G_STYPE_REAL =0, @@ -92,12 +72,8 @@ enum GIM_SCALAR_TYPES G_STYPE_INT64, G_STYPE_UINT64 }; -//! @} -/*! \defgroup MATH_FUNCTIONS -mathematical functions -*/ -//! @{ + #define G_DEGTORAD(X) ((X)*3.1415926f/180.0f) #define G_RADTODEG(X) ((X)*180.0f/3.1415926f) @@ -131,7 +107,7 @@ mathematical functions ///returns a clamped number #define GIM_CLAMP(number,minval,maxval) (numbermaxval?maxval:number)) -#define GIM_GREATER(x, y) fabsf(x) > (y) +#define GIM_GREATER(x, y) btFabs(x) > (y) ///Swap numbers #define GIM_SWAP_NUMBERS(a,b){ \ @@ -176,6 +152,6 @@ inline GREAL gim_sqrt(GREAL f) return r; } -//! @} + #endif // GIM_MATH_H_INCLUDED diff --git a/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h b/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h index 469a8280f7d..fa99eebb60e 100644 --- a/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h +++ b/extern/bullet2/src/BulletCollision/Gimpact/gim_memory.h @@ -36,9 +36,6 @@ email: projectileman@yahoo.com #include "gim_math.h" #include -//#define PREFETCH 1 -//! \defgroup PREFETCH -//! @{ #ifdef PREFETCH #include // for prefetch #define pfval 64 @@ -53,13 +50,9 @@ email: projectileman@yahoo.com //! Prefetch 128 #define pf2(_x,_i) #endif -//! @} -/*! \defgroup ARRAY_UTILITIES -\brief -Functions for manip packed arrays of numbers -*/ -//! @{ + +///Functions for manip packed arrays of numbers #define GIM_COPY_ARRAYS(dest_array,source_array,element_count)\ {\ for (GUINT _i_=0;_i_*(Ls))(d)); + return(((m_shapes[0])->*(Ls))(d)); } - inline btVector3 Support1(const btVector3& d) const + inline btVector3 Support1(const btVector3& d) const { - return(m_toshape0*((m_shapes[1])->*(Ls))(m_toshape1*d)); + return(m_toshape0*((m_shapes[1])->*(Ls))(m_toshape1*d)); } - inline btVector3 Support(const btVector3& d) const + inline btVector3 Support(const btVector3& d) const { - return(Support0(d)-Support1(-d)); + return(Support0(d)-Support1(-d)); } - btVector3 Support(const btVector3& d,U index) const + btVector3 Support(const btVector3& d,U index) const { - if(index) - return(Support1(d)); + if(index) + return(Support1(d)); else - return(Support0(d)); + return(Support0(d)); } }; -typedef MinkowskiDiff tShape; + typedef MinkowskiDiff tShape; -// GJK -struct GJK -{ -/* Types */ -struct sSV + // GJK + struct GJK { - btVector3 d,w; - }; -struct sSimplex - { - sSV* c[4]; - btScalar p[4]; - U rank; - }; -struct eStatus { enum _ { - Valid, - Inside, - Failed };}; -/* Fields */ -tShape m_shape; -btVector3 m_ray; -btScalar m_distance; -sSimplex m_simplices[2]; -sSV m_store[4]; -sSV* m_free[4]; -U m_nfree; -U m_current; -sSimplex* m_simplex; -eStatus::_ m_status; -/* Methods */ - GJK() - { - Initialize(); - } -void Initialize() - { - m_ray = btVector3(0,0,0); - m_nfree = 0; - m_status = eStatus::Failed; - m_current = 0; - m_distance = 0; - } -eStatus::_ Evaluate(const tShape& shapearg,const btVector3& guess) - { - U iterations=0; - btScalar sqdist=0; - btScalar alpha=0; - btVector3 lastw[4]; - U clastw=0; - /* Initialize solver */ - m_free[0] = &m_store[0]; - m_free[1] = &m_store[1]; - m_free[2] = &m_store[2]; - m_free[3] = &m_store[3]; - m_nfree = 4; - m_current = 0; - m_status = eStatus::Valid; - m_shape = shapearg; - m_distance = 0; - /* Initialize simplex */ - m_simplices[0].rank = 0; - m_ray = guess; - const btScalar sqrl= m_ray.length2(); - appendvertice(m_simplices[0],sqrl>0?-m_ray:btVector3(1,0,0)); - m_simplices[0].p[0] = 1; - m_ray = m_simplices[0].c[0]->w; - sqdist = sqrl; - lastw[0] = - lastw[1] = - lastw[2] = - lastw[3] = m_ray; - /* Loop */ - do { - const U next=1-m_current; - sSimplex& cs=m_simplices[m_current]; - sSimplex& ns=m_simplices[next]; - /* Check zero */ - const btScalar rl=m_ray.length(); - if(rlw; - bool found=false; - for(U i=0;i<4;++i) + /* Types */ + struct sSV + { + btVector3 d,w; + }; + struct sSimplex + { + sSV* c[4]; + btScalar p[4]; + U rank; + }; + struct eStatus { enum _ { + Valid, + Inside, + Failed };}; + /* Fields */ + tShape m_shape; + btVector3 m_ray; + btScalar m_distance; + sSimplex m_simplices[2]; + sSV m_store[4]; + sSV* m_free[4]; + U m_nfree; + U m_current; + sSimplex* m_simplex; + eStatus::_ m_status; + /* Methods */ + GJK() { - if((w-lastw[i]).length2()w, - cs.c[1]->w, - weights,mask);break; - case 3: sqdist=projectorigin( cs.c[0]->w, - cs.c[1]->w, - cs.c[2]->w, - weights,mask);break; - case 4: sqdist=projectorigin( cs.c[0]->w, - cs.c[1]->w, - cs.c[2]->w, - cs.c[3]->w, - weights,mask);break; + m_ray = btVector3(0,0,0); + m_nfree = 0; + m_status = eStatus::Failed; + m_current = 0; + m_distance = 0; } - if(sqdist>=0) - {/* Valid */ - ns.rank = 0; - m_ray = btVector3(0,0,0); - m_current = next; - for(U i=0,ni=cs.rank;i0?-m_ray:btVector3(1,0,0)); + m_simplices[0].p[0] = 1; + m_ray = m_simplices[0].c[0]->w; + sqdist = sqrl; + lastw[0] = + lastw[1] = + lastw[2] = + lastw[3] = m_ray; + /* Loop */ + do { + const U next=1-m_current; + sSimplex& cs=m_simplices[m_current]; + sSimplex& ns=m_simplices[next]; + /* Check zero */ + const btScalar rl=m_ray.length(); + if(rlw; + bool found=false; + for(U i=0;i<4;++i) { - ns.c[ns.rank] = cs.c[i]; - ns.p[ns.rank++] = weights[i]; - m_ray += cs.c[i]->w*weights[i]; + if((w-lastw[i]).length2()rank) - { - case 1: - { - for(U i=0;i<3;++i) - { - btVector3 axis=btVector3(0,0,0); - axis[i]=1; - appendvertice(*m_simplex, axis); - if(EncloseOrigin()) return(true); - removevertice(*m_simplex); - appendvertice(*m_simplex,-axis); - if(EncloseOrigin()) return(true); - removevertice(*m_simplex); - } - } - break; - case 2: - { - const btVector3 d=m_simplex->c[1]->w-m_simplex->c[0]->w; - for(U i=0;i<3;++i) - { - btVector3 axis=btVector3(0,0,0); - axis[i]=1; - const btVector3 p=cross(d,axis); - if(p.length2()>0) + /* Check for termination */ + const btScalar omega=dot(m_ray,w)/rl; + alpha=btMax(omega,alpha); + if(((rl-alpha)-(GJK_ACCURARY*rl))<=0) + {/* Return old simplex */ + removevertice(m_simplices[m_current]); + break; + } + /* Reduce simplex */ + btScalar weights[4]; + U mask=0; + switch(cs.rank) { - appendvertice(*m_simplex, p); - if(EncloseOrigin()) return(true); - removevertice(*m_simplex); - appendvertice(*m_simplex,-p); - if(EncloseOrigin()) return(true); - removevertice(*m_simplex); + case 2: sqdist=projectorigin( cs.c[0]->w, + cs.c[1]->w, + weights,mask);break; + case 3: sqdist=projectorigin( cs.c[0]->w, + cs.c[1]->w, + cs.c[2]->w, + weights,mask);break; + case 4: sqdist=projectorigin( cs.c[0]->w, + cs.c[1]->w, + cs.c[2]->w, + cs.c[3]->w, + weights,mask);break; } - } - } - break; - case 3: - { - const btVector3 n=cross(m_simplex->c[1]->w-m_simplex->c[0]->w, - m_simplex->c[2]->w-m_simplex->c[0]->w); - if(n.length2()>0) + if(sqdist>=0) + {/* Valid */ + ns.rank = 0; + m_ray = btVector3(0,0,0); + m_current = next; + for(U i=0,ni=cs.rank;iw*weights[i]; + } + else + { + m_free[m_nfree++] = cs.c[i]; + } + } + if(mask==15) m_status=eStatus::Inside; + } + else + {/* Return old simplex */ + removevertice(m_simplices[m_current]); + break; + } + m_status=((++iterations)c[0]->w-m_simplex->c[3]->w, + switch(m_simplex->rank) + { + case 1: + { + for(U i=0;i<3;++i) + { + btVector3 axis=btVector3(0,0,0); + axis[i]=1; + appendvertice(*m_simplex, axis); + if(EncloseOrigin()) return(true); + removevertice(*m_simplex); + appendvertice(*m_simplex,-axis); + if(EncloseOrigin()) return(true); + removevertice(*m_simplex); + } + } + break; + case 2: + { + const btVector3 d=m_simplex->c[1]->w-m_simplex->c[0]->w; + for(U i=0;i<3;++i) + { + btVector3 axis=btVector3(0,0,0); + axis[i]=1; + const btVector3 p=cross(d,axis); + if(p.length2()>0) + { + appendvertice(*m_simplex, p); + if(EncloseOrigin()) return(true); + removevertice(*m_simplex); + appendvertice(*m_simplex,-p); + if(EncloseOrigin()) return(true); + removevertice(*m_simplex); + } + } + } + break; + case 3: + { + const btVector3 n=cross(m_simplex->c[1]->w-m_simplex->c[0]->w, + m_simplex->c[2]->w-m_simplex->c[0]->w); + if(n.length2()>0) + { + appendvertice(*m_simplex,n); + if(EncloseOrigin()) return(true); + removevertice(*m_simplex); + appendvertice(*m_simplex,-n); + if(EncloseOrigin()) return(true); + removevertice(*m_simplex); + } + } + break; + case 4: + { + if(btFabs(det( m_simplex->c[0]->w-m_simplex->c[3]->w, m_simplex->c[1]->w-m_simplex->c[3]->w, m_simplex->c[2]->w-m_simplex->c[3]->w))>0) - return(true); - } - break; - } - return(false); - } -/* Internals */ -void getsupport(const btVector3& d,sSV& sv) const - { - sv.d = d/d.length(); - sv.w = m_shape.Support(sv.d); - } -void removevertice(sSimplex& simplex) - { - m_free[m_nfree++]=simplex.c[--simplex.rank]; - } -void appendvertice(sSimplex& simplex,const btVector3& v) - { - simplex.p[simplex.rank]=0; - simplex.c[simplex.rank]=m_free[--m_nfree]; - getsupport(v,*simplex.c[simplex.rank++]); - } -static btScalar det(const btVector3& a,const btVector3& b,const btVector3& c) - { - return( a.y()*b.z()*c.x()+a.z()*b.x()*c.y()- - a.x()*b.z()*c.y()-a.y()*b.x()*c.z()+ - a.x()*b.y()*c.z()-a.z()*b.y()*c.x()); - } -static btScalar projectorigin( const btVector3& a, - const btVector3& b, - btScalar* w,U& m) - { - const btVector3 d=b-a; - const btScalar l=d.length2(); - if(l>GJK_SIMPLEX2_EPS) - { - const btScalar t(l>0?-dot(a,d)/l:0); - if(t>=1) { w[0]=0;w[1]=1;m=2;return(b.length2()); } - else if(t<=0) { w[0]=1;w[1]=0;m=1;return(a.length2()); } - else { w[0]=1-(w[1]=t);m=3;return((a+d*t).length2()); } - } - return(-1); - } -static btScalar projectorigin( const btVector3& a, - const btVector3& b, - const btVector3& c, - btScalar* w,U& m) - { - static const U imd3[]={1,2,0}; - const btVector3* vt[]={&a,&b,&c}; - const btVector3 dl[]={a-b,b-c,c-a}; - const btVector3 n=cross(dl[0],dl[1]); - const btScalar l=n.length2(); - if(l>GJK_SIMPLEX3_EPS) - { - btScalar mindist=-1; - btScalar subw[2]; - U subm; - for(U i=0;i<3;++i) - { - if(dot(*vt[i],cross(dl[i],n))>0) - { - const U j=imd3[i]; - const btScalar subd(projectorigin(*vt[i],*vt[j],subw,subm)); - if((mindist<0)||(subd(((subm&1)?1<GJK_SIMPLEX4_EPS)) - { - btScalar mindist=-1; - btScalar subw[3]; - U subm; - for(U i=0;i<3;++i) + void removevertice(sSimplex& simplex) { - const U j=imd3[i]; - const btScalar s=vl*dot(d,cross(dl[i],dl[j])); - if(s>0) + m_free[m_nfree++]=simplex.c[--simplex.rank]; + } + void appendvertice(sSimplex& simplex,const btVector3& v) + { + simplex.p[simplex.rank]=0; + simplex.c[simplex.rank]=m_free[--m_nfree]; + getsupport(v,*simplex.c[simplex.rank++]); + } + static btScalar det(const btVector3& a,const btVector3& b,const btVector3& c) + { + return( a.y()*b.z()*c.x()+a.z()*b.x()*c.y()- + a.x()*b.z()*c.y()-a.y()*b.x()*c.z()+ + a.x()*b.y()*c.z()-a.z()*b.y()*c.x()); + } + static btScalar projectorigin( const btVector3& a, + const btVector3& b, + btScalar* w,U& m) + { + const btVector3 d=b-a; + const btScalar l=d.length2(); + if(l>GJK_SIMPLEX2_EPS) { - const btScalar subd=projectorigin(*vt[i],*vt[j],d,subw,subm); - if((mindist<0)||(subd0?-dot(a,d)/l:0); + if(t>=1) { w[0]=0;w[1]=1;m=2;return(b.length2()); } + else if(t<=0) { w[0]=1;w[1]=0;m=1;return(a.length2()); } + else { w[0]=1-(w[1]=t);m=3;return((a+d*t).length2()); } + } + return(-1); + } + static btScalar projectorigin( const btVector3& a, + const btVector3& b, + const btVector3& c, + btScalar* w,U& m) + { + static const U imd3[]={1,2,0}; + const btVector3* vt[]={&a,&b,&c}; + const btVector3 dl[]={a-b,b-c,c-a}; + const btVector3 n=cross(dl[0],dl[1]); + const btScalar l=n.length2(); + if(l>GJK_SIMPLEX3_EPS) + { + btScalar mindist=-1; + btScalar subw[2]; + U subm; + for(U i=0;i<3;++i) { - mindist = subd; - m = static_cast((subm&1?1<0) + { + const U j=imd3[i]; + const btScalar subd(projectorigin(*vt[i],*vt[j],subw,subm)); + if((mindist<0)||(subd(((subm&1)?1<GJK_SIMPLEX4_EPS)) + { + btScalar mindist=-1; + btScalar subw[3]; + U subm; + for(U i=0;i<3;++i) + { + const U j=imd3[i]; + const btScalar s=vl*dot(d,cross(dl[i],dl[j])); + if(s>0) + { + const btScalar subd=projectorigin(*vt[i],*vt[j],d,subw,subm); + if((mindist<0)||(subd((subm&1?1<e[ea]=(U1)eb;fa->f[ea]=fb; + fb->e[eb]=(U1)ea;fb->f[eb]=fa; + } + static inline void append(sList& list,sFace* face) + { + face->l[0] = 0; + face->l[1] = list.root; + if(list.root) list.root->l[0]=face; + list.root = face; + ++list.count; + } + static inline void remove(sList& list,sFace* face) + { + if(face->l[1]) face->l[1]->l[0]=face->l[0]; + if(face->l[0]) face->l[0]->l[1]=face->l[1]; + if(face==list.root) list.root=face->l[1]; + --list.count; + } + + + void Initialize() + { + m_status = eStatus::Failed; + m_normal = btVector3(0,0,0); + m_depth = 0; + m_nextsv = 0; + for(U i=0;i1)&&gjk.EncloseOrigin()) + { -// EPA -struct EPA -{ -/* Types */ -typedef GJK::sSV sSV; -struct sFace - { - btVector3 n; - btScalar d; - btScalar p; - sSV* c[3]; - sFace* f[3]; - sFace* l[2]; - U1 e[3]; - U1 pass; - }; -struct sList - { - sFace* root; - U count; - sList() : root(0),count(0) {} - }; -struct sHorizon - { - sFace* cf; - sFace* ff; - U nf; - sHorizon() : cf(0),ff(0),nf(0) {} - }; -struct eStatus { enum _ { - Valid, - Touching, - Degenerated, - NonConvex, - InvalidHull, - OutOfFaces, - OutOfVertices, - AccuraryReached, - FallBack, - Failed };}; -/* Fields */ -eStatus::_ m_status; -GJK::sSimplex m_result; -btVector3 m_normal; -btScalar m_depth; -sSV m_sv_store[EPA_MAX_VERTICES]; -sFace m_fc_store[EPA_MAX_FACES]; -U m_nextsv; -sList m_hull; -sList m_stock; -/* Methods */ - EPA() - { - Initialize(); - } - - - static inline void bind(sFace* fa,U ea,sFace* fb,U eb) - { - fa->e[ea]=(U1)eb;fa->f[ea]=fb; - fb->e[eb]=(U1)ea;fb->f[eb]=fa; - } -static inline void append(sList& list,sFace* face) - { - face->l[0] = 0; - face->l[1] = list.root; - if(list.root) list.root->l[0]=face; - list.root = face; - ++list.count; - } -static inline void remove(sList& list,sFace* face) - { - if(face->l[1]) face->l[1]->l[0]=face->l[0]; - if(face->l[0]) face->l[0]->l[1]=face->l[1]; - if(face==list.root) list.root=face->l[1]; - --list.count; - } - - -void Initialize() - { - m_status = eStatus::Failed; - m_normal = btVector3(0,0,0); - m_depth = 0; - m_nextsv = 0; - for(U i=0;i1)&&gjk.EncloseOrigin()) - { - - /* Clean up */ - while(m_hull.root) - { - sFace* f = m_hull.root; - remove(m_hull,f); - append(m_stock,f); - } - m_status = eStatus::Valid; - m_nextsv = 0; - /* Orient simplex */ - if(gjk.det( simplex.c[0]->w-simplex.c[3]->w, - simplex.c[1]->w-simplex.c[3]->w, - simplex.c[2]->w-simplex.c[3]->w)<0) - { - btSwap(simplex.c[0],simplex.c[1]); - btSwap(simplex.p[0],simplex.p[1]); - } - /* Build initial hull */ - sFace* tetra[]={newface(simplex.c[0],simplex.c[1],simplex.c[2],true), + /* Clean up */ + while(m_hull.root) + { + sFace* f = m_hull.root; + remove(m_hull,f); + append(m_stock,f); + } + m_status = eStatus::Valid; + m_nextsv = 0; + /* Orient simplex */ + if(gjk.det( simplex.c[0]->w-simplex.c[3]->w, + simplex.c[1]->w-simplex.c[3]->w, + simplex.c[2]->w-simplex.c[3]->w)<0) + { + btSwap(simplex.c[0],simplex.c[1]); + btSwap(simplex.p[0],simplex.p[1]); + } + /* Build initial hull */ + sFace* tetra[]={newface(simplex.c[0],simplex.c[1],simplex.c[2],true), newface(simplex.c[1],simplex.c[0],simplex.c[3],true), newface(simplex.c[2],simplex.c[1],simplex.c[3],true), newface(simplex.c[0],simplex.c[2],simplex.c[3],true)}; - if(m_hull.count==4) - { - sFace* best=findbest(); - sFace outer=*best; - U pass=0; - U iterations=0; - bind(tetra[0],0,tetra[1],0); - bind(tetra[0],1,tetra[2],0); - bind(tetra[0],2,tetra[3],0); - bind(tetra[1],1,tetra[3],2); - bind(tetra[1],2,tetra[2],1); - bind(tetra[2],2,tetra[3],1); - m_status=eStatus::Valid; - for(;iterationspass = (U1)(++pass); - gjk.getsupport(best->n,*w); - const btScalar wdist=dot(best->n,w->w)-best->d; - if(wdist>EPA_ACCURACY) + if(m_hull.count==4) + { + sFace* best=findbest(); + sFace outer=*best; + U pass=0; + U iterations=0; + bind(tetra[0],0,tetra[1],0); + bind(tetra[0],1,tetra[2],0); + bind(tetra[0],2,tetra[3],0); + bind(tetra[1],1,tetra[3],2); + bind(tetra[1],2,tetra[2],1); + bind(tetra[2],2,tetra[3],1); + m_status=eStatus::Valid; + for(;iterationspass = (U1)(++pass); + gjk.getsupport(best->n,*w); + const btScalar wdist=dot(best->n,w->w)-best->d; + if(wdist>EPA_ACCURACY) + { + for(U j=0;(j<3)&&valid;++j) + { + valid&=expand( pass,w, best->f[j],best->e[j], horizon); - } - if(valid&&(horizon.nf>=3)) - { - bind(horizon.cf,1,horizon.ff,2); - remove(m_hull,best); - append(m_stock,best); - best=findbest(); - if(best->p>=outer.p) outer=*best; - } else { m_status=eStatus::InvalidHull;break; } - } else { m_status=eStatus::AccuraryReached;break; } - } else { m_status=eStatus::OutOfVertices;break; } + } + if(valid&&(horizon.nf>=3)) + { + bind(horizon.cf,1,horizon.ff,2); + remove(m_hull,best); + append(m_stock,best); + best=findbest(); + if(best->p>=outer.p) outer=*best; + } else { m_status=eStatus::InvalidHull;break; } + } else { m_status=eStatus::AccuraryReached;break; } + } else { m_status=eStatus::OutOfVertices;break; } + } + const btVector3 projection=outer.n*outer.d; + m_normal = outer.n; + m_depth = outer.d; + m_result.rank = 3; + m_result.c[0] = outer.c[0]; + m_result.c[1] = outer.c[1]; + m_result.c[2] = outer.c[2]; + m_result.p[0] = cross( outer.c[1]->w-projection, + outer.c[2]->w-projection).length(); + m_result.p[1] = cross( outer.c[2]->w-projection, + outer.c[0]->w-projection).length(); + m_result.p[2] = cross( outer.c[0]->w-projection, + outer.c[1]->w-projection).length(); + const btScalar sum=m_result.p[0]+m_result.p[1]+m_result.p[2]; + m_result.p[0] /= sum; + m_result.p[1] /= sum; + m_result.p[2] /= sum; + return(m_status); + } } - const btVector3 projection=outer.n*outer.d; - m_normal = outer.n; - m_depth = outer.d; - m_result.rank = 3; - m_result.c[0] = outer.c[0]; - m_result.c[1] = outer.c[1]; - m_result.c[2] = outer.c[2]; - m_result.p[0] = cross( outer.c[1]->w-projection, - outer.c[2]->w-projection).length(); - m_result.p[1] = cross( outer.c[2]->w-projection, - outer.c[0]->w-projection).length(); - m_result.p[2] = cross( outer.c[0]->w-projection, - outer.c[1]->w-projection).length(); - const btScalar sum=m_result.p[0]+m_result.p[1]+m_result.p[2]; - m_result.p[0] /= sum; - m_result.p[1] /= sum; - m_result.p[2] /= sum; - return(m_status); + /* Fallback */ + m_status = eStatus::FallBack; + m_normal = -guess; + const btScalar nl=m_normal.length(); + if(nl>0) + m_normal = m_normal/nl; + else + m_normal = btVector3(1,0,0); + m_depth = 0; + m_result.rank=1; + m_result.c[0]=simplex.c[0]; + m_result.p[0]=1; + return(m_status); } - } - /* Fallback */ - m_status = eStatus::FallBack; - m_normal = -guess; - const btScalar nl=m_normal.length(); - if(nl>0) - m_normal = m_normal/nl; - else - m_normal = btVector3(1,0,0); - m_depth = 0; - m_result.rank=1; - m_result.c[0]=simplex.c[0]; - m_result.p[0]=1; - return(m_status); - } -sFace* newface(sSV* a,sSV* b,sSV* c,bool forced) - { - if(m_stock.root) - { - sFace* face=m_stock.root; - remove(m_stock,face); - append(m_hull,face); - face->pass = 0; - face->c[0] = a; - face->c[1] = b; - face->c[2] = c; - face->n = cross(b->w-a->w,c->w-a->w); - const btScalar l=face->n.length(); - const bool v=l>EPA_ACCURACY; - face->p = btMin(btMin( - dot(a->w,cross(face->n,a->w-b->w)), - dot(b->w,cross(face->n,b->w-c->w))), - dot(c->w,cross(face->n,c->w-a->w))) / - (v?l:1); - face->p = face->p>=-EPA_INSIDE_EPS?0:face->p; - if(v) + sFace* newface(sSV* a,sSV* b,sSV* c,bool forced) { - face->d = dot(a->w,face->n)/l; - face->n /= l; - if(forced||(face->d>=-EPA_PLANE_EPS)) + if(m_stock.root) { - return(face); - } else m_status=eStatus::NonConvex; - } else m_status=eStatus::Degenerated; - remove(m_hull,face); - append(m_stock,face); - return(0); - } - m_status=m_stock.root?eStatus::OutOfVertices:eStatus::OutOfFaces; - return(0); - } -sFace* findbest() - { - sFace* minf=m_hull.root; - btScalar mind=minf->d*minf->d; - btScalar maxp=minf->p; - for(sFace* f=minf->l[1];f;f=f->l[1]) - { - const btScalar sqd=f->d*f->d; - if((f->p>=maxp)&&(sqdp; - } - } - return(minf); - } -bool expand(U pass,sSV* w,sFace* f,U e,sHorizon& horizon) - { - static const U i1m3[]={1,2,0}; - static const U i2m3[]={2,0,1}; - if(f->pass!=pass) - { - const U e1=i1m3[e]; - if((dot(f->n,w->w)-f->d)<-EPA_PLANE_EPS) - { - sFace* nf=newface(f->c[e1],f->c[e],w,false); - if(nf) - { - bind(nf,0,f,e); - if(horizon.cf) bind(horizon.cf,1,nf,2); else horizon.ff=nf; - horizon.cf=nf; - ++horizon.nf; - return(true); + sFace* face=m_stock.root; + remove(m_stock,face); + append(m_hull,face); + face->pass = 0; + face->c[0] = a; + face->c[1] = b; + face->c[2] = c; + face->n = cross(b->w-a->w,c->w-a->w); + const btScalar l=face->n.length(); + const bool v=l>EPA_ACCURACY; + face->p = btMin(btMin( + dot(a->w,cross(face->n,a->w-b->w)), + dot(b->w,cross(face->n,b->w-c->w))), + dot(c->w,cross(face->n,c->w-a->w))) / + (v?l:1); + face->p = face->p>=-EPA_INSIDE_EPS?0:face->p; + if(v) + { + face->d = dot(a->w,face->n)/l; + face->n /= l; + if(forced||(face->d>=-EPA_PLANE_EPS)) + { + return(face); + } else m_status=eStatus::NonConvex; + } else m_status=eStatus::Degenerated; + remove(m_hull,face); + append(m_stock,face); + return(0); } + m_status=m_stock.root?eStatus::OutOfVertices:eStatus::OutOfFaces; + return(0); } - else + sFace* findbest() { - const U e2=i2m3[e]; - f->pass = (U1)pass; - if( expand(pass,w,f->f[e1],f->e[e1],horizon)&& - expand(pass,w,f->f[e2],f->e[e2],horizon)) + sFace* minf=m_hull.root; + btScalar mind=minf->d*minf->d; + btScalar maxp=minf->p; + for(sFace* f=minf->l[1];f;f=f->l[1]) { - remove(m_hull,f); - append(m_stock,f); - return(true); + const btScalar sqd=f->d*f->d; + if((f->p>=maxp)&&(sqdp; + } } + return(minf); + } + bool expand(U pass,sSV* w,sFace* f,U e,sHorizon& horizon) + { + static const U i1m3[]={1,2,0}; + static const U i2m3[]={2,0,1}; + if(f->pass!=pass) + { + const U e1=i1m3[e]; + if((dot(f->n,w->w)-f->d)<-EPA_PLANE_EPS) + { + sFace* nf=newface(f->c[e1],f->c[e],w,false); + if(nf) + { + bind(nf,0,f,e); + if(horizon.cf) bind(horizon.cf,1,nf,2); else horizon.ff=nf; + horizon.cf=nf; + ++horizon.nf; + return(true); + } + } + else + { + const U e2=i2m3[e]; + f->pass = (U1)pass; + if( expand(pass,w,f->f[e1],f->e[e1],horizon)&& + expand(pass,w,f->f[e2],f->e[e2],horizon)) + { + remove(m_hull,f); + append(m_stock,f); + return(true); + } + } + } + return(false); } - } - return(false); - } -}; + }; -// -static void Initialize( const btConvexShape* shape0,const btTransform& wtrs0, - const btConvexShape* shape1,const btTransform& wtrs1, - btGjkEpaSolver2::sResults& results, - tShape& shape, - bool withmargins) -{ -/* Results */ -results.witnesses[0] = -results.witnesses[1] = btVector3(0,0,0); -results.status = btGjkEpaSolver2::sResults::Separated; -/* Shape */ -shape.m_shapes[0] = shape0; -shape.m_shapes[1] = shape1; -shape.m_toshape1 = wtrs1.getBasis().transposeTimes(wtrs0.getBasis()); -shape.m_toshape0 = wtrs0.inverseTimes(wtrs1); -shape.EnableMargin(withmargins); -} + // + static void Initialize( const btConvexShape* shape0,const btTransform& wtrs0, + const btConvexShape* shape1,const btTransform& wtrs1, + btGjkEpaSolver2::sResults& results, + tShape& shape, + bool withmargins) + { + /* Results */ + results.witnesses[0] = + results.witnesses[1] = btVector3(0,0,0); + results.status = btGjkEpaSolver2::sResults::Separated; + /* Shape */ + shape.m_shapes[0] = shape0; + shape.m_shapes[1] = shape1; + shape.m_toshape1 = wtrs1.getBasis().transposeTimes(wtrs0.getBasis()); + shape.m_toshape0 = wtrs0.inverseTimes(wtrs1); + shape.EnableMargin(withmargins); + } } @@ -775,87 +775,87 @@ using namespace gjkepa2_impl; // int btGjkEpaSolver2::StackSizeRequirement() { -return(sizeof(GJK)+sizeof(EPA)); + return(sizeof(GJK)+sizeof(EPA)); } // bool btGjkEpaSolver2::Distance( const btConvexShape* shape0, - const btTransform& wtrs0, - const btConvexShape* shape1, - const btTransform& wtrs1, - const btVector3& guess, - sResults& results) + const btTransform& wtrs0, + const btConvexShape* shape1, + const btTransform& wtrs1, + const btVector3& guess, + sResults& results) { -tShape shape; -Initialize(shape0,wtrs0,shape1,wtrs1,results,shape,false); -GJK gjk; -GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,guess); -if(gjk_status==GJK::eStatus::Valid) + tShape shape; + Initialize(shape0,wtrs0,shape1,wtrs1,results,shape,false); + GJK gjk; + GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,guess); + if(gjk_status==GJK::eStatus::Valid) { - btVector3 w0=btVector3(0,0,0); - btVector3 w1=btVector3(0,0,0); - for(U i=0;irank;++i) + btVector3 w0=btVector3(0,0,0); + btVector3 w1=btVector3(0,0,0); + for(U i=0;irank;++i) { - const btScalar p=gjk.m_simplex->p[i]; - w0+=shape.Support( gjk.m_simplex->c[i]->d,0)*p; - w1+=shape.Support(-gjk.m_simplex->c[i]->d,1)*p; + const btScalar p=gjk.m_simplex->p[i]; + w0+=shape.Support( gjk.m_simplex->c[i]->d,0)*p; + w1+=shape.Support(-gjk.m_simplex->c[i]->d,1)*p; } - results.witnesses[0] = wtrs0*w0; - results.witnesses[1] = wtrs0*w1; - results.normal = w0-w1; - results.distance = results.normal.length(); - results.normal /= results.distance>GJK_MIN_DISTANCE?results.distance:1; - return(true); + results.witnesses[0] = wtrs0*w0; + results.witnesses[1] = wtrs0*w1; + results.normal = w0-w1; + results.distance = results.normal.length(); + results.normal /= results.distance>GJK_MIN_DISTANCE?results.distance:1; + return(true); } else { - results.status = gjk_status==GJK::eStatus::Inside? - sResults::Penetrating : - sResults::GJK_Failed ; - return(false); + results.status = gjk_status==GJK::eStatus::Inside? + sResults::Penetrating : + sResults::GJK_Failed ; + return(false); } } // bool btGjkEpaSolver2::Penetration( const btConvexShape* shape0, - const btTransform& wtrs0, - const btConvexShape* shape1, - const btTransform& wtrs1, - const btVector3& guess, - sResults& results, - bool usemargins) + const btTransform& wtrs0, + const btConvexShape* shape1, + const btTransform& wtrs1, + const btVector3& guess, + sResults& results, + bool usemargins) { -tShape shape; -Initialize(shape0,wtrs0,shape1,wtrs1,results,shape,usemargins); -GJK gjk; -GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,-guess); -switch(gjk_status) + tShape shape; + Initialize(shape0,wtrs0,shape1,wtrs1,results,shape,usemargins); + GJK gjk; + GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,-guess); + switch(gjk_status) { case GJK::eStatus::Inside: { - EPA epa; - EPA::eStatus::_ epa_status=epa.Evaluate(gjk,-guess); - if(epa_status!=EPA::eStatus::Failed) + EPA epa; + EPA::eStatus::_ epa_status=epa.Evaluate(gjk,-guess); + if(epa_status!=EPA::eStatus::Failed) { - btVector3 w0=btVector3(0,0,0); - for(U i=0;id,0)*epa.m_result.p[i]; + w0+=shape.Support(epa.m_result.c[i]->d,0)*epa.m_result.p[i]; } - results.status = sResults::Penetrating; - results.witnesses[0] = wtrs0*w0; - results.witnesses[1] = wtrs0*(w0-epa.m_normal*epa.m_depth); - results.normal = -epa.m_normal; - results.distance = -epa.m_depth; - return(true); + results.status = sResults::Penetrating; + results.witnesses[0] = wtrs0*w0; + results.witnesses[1] = wtrs0*(w0-epa.m_normal*epa.m_depth); + results.normal = -epa.m_normal; + results.distance = -epa.m_depth; + return(true); } else results.status=sResults::EPA_Failed; } - break; + break; case GJK::eStatus::Failed: - results.status=sResults::GJK_Failed; - break; + results.status=sResults::GJK_Failed; + break; } -return(false); + return(false); } // @@ -865,49 +865,49 @@ btScalar btGjkEpaSolver2::SignedDistance(const btVector3& position, const btTransform& wtrs0, sResults& results) { -tShape shape; -btSphereShape shape1(margin); -btTransform wtrs1(btQuaternion(0,0,0,1),position); -Initialize(shape0,wtrs0,&shape1,wtrs1,results,shape,false); -GJK gjk; -GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,btVector3(1,1,1)); -if(gjk_status==GJK::eStatus::Valid) + tShape shape; + btSphereShape shape1(margin); + btTransform wtrs1(btQuaternion(0,0,0,1),position); + Initialize(shape0,wtrs0,&shape1,wtrs1,results,shape,false); + GJK gjk; + GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,btVector3(1,1,1)); + if(gjk_status==GJK::eStatus::Valid) { - btVector3 w0=btVector3(0,0,0); - btVector3 w1=btVector3(0,0,0); - for(U i=0;irank;++i) + btVector3 w0=btVector3(0,0,0); + btVector3 w1=btVector3(0,0,0); + for(U i=0;irank;++i) { - const btScalar p=gjk.m_simplex->p[i]; - w0+=shape.Support( gjk.m_simplex->c[i]->d,0)*p; - w1+=shape.Support(-gjk.m_simplex->c[i]->d,1)*p; + const btScalar p=gjk.m_simplex->p[i]; + w0+=shape.Support( gjk.m_simplex->c[i]->d,0)*p; + w1+=shape.Support(-gjk.m_simplex->c[i]->d,1)*p; } - results.witnesses[0] = wtrs0*w0; - results.witnesses[1] = wtrs0*w1; - const btVector3 delta= results.witnesses[1]- - results.witnesses[0]; - const btScalar margin= shape0->getMargin()+ - shape1.getMargin(); - const btScalar length= delta.length(); - results.normal = delta/length; - results.witnesses[0] += results.normal*margin; - return(length-margin); + results.witnesses[0] = wtrs0*w0; + results.witnesses[1] = wtrs0*w1; + const btVector3 delta= results.witnesses[1]- + results.witnesses[0]; + const btScalar margin= shape0->getMarginNonVirtual()+ + shape1.getMarginNonVirtual(); + const btScalar length= delta.length(); + results.normal = delta/length; + results.witnesses[0] += results.normal*margin; + return(length-margin); } else { - if(gjk_status==GJK::eStatus::Inside) + if(gjk_status==GJK::eStatus::Inside) { - if(Penetration(shape0,wtrs0,&shape1,wtrs1,gjk.m_ray,results)) + if(Penetration(shape0,wtrs0,&shape1,wtrs1,gjk.m_ray,results)) { - const btVector3 delta= results.witnesses[0]- - results.witnesses[1]; - const btScalar length= delta.length(); - if (length >= SIMD_EPSILON) - results.normal = delta/length; - return(-length); + const btVector3 delta= results.witnesses[0]- + results.witnesses[1]; + const btScalar length= delta.length(); + if (length >= SIMD_EPSILON) + results.normal = delta/length; + return(-length); } } } -return(SIMD_INFINITY); + return(SIMD_INFINITY); } // @@ -918,10 +918,10 @@ bool btGjkEpaSolver2::SignedDistance(const btConvexShape* shape0, const btVector3& guess, sResults& results) { -if(!Distance(shape0,wtrs0,shape1,wtrs1,guess,results)) - return(Penetration(shape0,wtrs0,shape1,wtrs1,guess,results,false)); + if(!Distance(shape0,wtrs0,shape1,wtrs1,guess,results)) + return(Penetration(shape0,wtrs0,shape1,wtrs1,guess,results,false)); else - return(true); + return(true); } /* Symbols cleanup */ diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp index c4f84ed4d75..05573c7cfce 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp @@ -17,13 +17,14 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btConvexShape.h" #include "btGjkEpaPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" + + #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver, const btConvexShape* pConvexA, const btConvexShape* pConvexB, const btTransform& transformA, const btTransform& transformB, - btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, + btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB, class btIDebugDraw* debugDraw, btStackAlloc* stackAlloc ) { @@ -33,20 +34,12 @@ bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& sim const btScalar radialmargin(btScalar(0.)); -//#define USE_ORIGINAL_GJK 1 -#ifdef USE_ORIGINAL_GJK - btGjkEpaSolver::sResults results; - if(btGjkEpaSolver::Collide( pConvexA,transformA, - pConvexB,transformB, - radialmargin,stackAlloc,results)) -#else btVector3 guessVector(transformA.getOrigin()-transformB.getOrigin()); btGjkEpaSolver2::sResults results; if(btGjkEpaSolver2::Penetration(pConvexA,transformA, pConvexB,transformB, guessVector,results)) -#endif { // debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); //resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h index 2dc069ce5cf..68dbc566518 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h @@ -28,7 +28,7 @@ class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver bool calcPenDepth( btSimplexSolverInterface& simplexSolver, const btConvexShape* pConvexA, const btConvexShape* pConvexB, const btTransform& transformA, const btTransform& transformB, - btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, + btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ); private : diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp index 01fb1a4b068..0856332d1ca 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp @@ -18,11 +18,15 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" #include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h" + + #if defined(DEBUG) || defined (_DEBUG) +//#define TEST_NON_VIRTUAL 1 #include //for debug printf #ifdef __SPU__ #include #define printf spu_printf +//#define DEBUG_SPU_COLLISION_DETECTION 1 #endif //__SPU__ #endif @@ -49,6 +53,8 @@ m_catchDegeneracies(1) void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults) { + m_cachedSeparatingDistance = 0.f; + btScalar distance=btScalar(0.); btVector3 normalInB(btScalar(0.),btScalar(0.),btScalar(0.)); btVector3 pointOnA,pointOnB; @@ -58,16 +64,35 @@ void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& localTransA.getOrigin() -= positionOffset; localTransB.getOrigin() -= positionOffset; +#ifdef __SPU__ + btScalar marginA = m_minkowskiA->getMarginNonVirtual(); + btScalar marginB = m_minkowskiB->getMarginNonVirtual(); +#else btScalar marginA = m_minkowskiA->getMargin(); btScalar marginB = m_minkowskiB->getMargin(); +#ifdef TEST_NON_VIRTUAL + btScalar marginAv = m_minkowskiA->getMarginNonVirtual(); + btScalar marginBv = m_minkowskiB->getMarginNonVirtual(); + btAssert(marginA == marginAv); + btAssert(marginB == marginBv); +#endif //TEST_NON_VIRTUAL +#endif + + gNumGjkChecks++; +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("inside gjk\n"); +#endif //for CCD we don't use margins if (m_ignoreMargin) { marginA = btScalar(0.); marginB = btScalar(0.); +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("ignoring margin\n"); +#endif } m_curIter = 0; @@ -98,18 +123,35 @@ void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& btVector3 seperatingAxisInA = (-m_cachedSeparatingAxis)* input.m_transformA.getBasis(); btVector3 seperatingAxisInB = m_cachedSeparatingAxis* input.m_transformB.getBasis(); +#ifdef __SPU__ + btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInA); + btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInB); +#else btVector3 pInA = m_minkowskiA->localGetSupportingVertexWithoutMargin(seperatingAxisInA); btVector3 qInB = m_minkowskiB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); - btPoint3 pWorld = localTransA(pInA); - btPoint3 qWorld = localTransB(qInB); - +#ifdef TEST_NON_VIRTUAL + btVector3 pInAv = m_minkowskiA->localGetSupportingVertexWithoutMargin(seperatingAxisInA); + btVector3 qInBv = m_minkowskiB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); + btAssert((pInAv-pInA).length() < 0.0001); + btAssert((qInBv-qInB).length() < 0.0001); +#endif // +#endif //__SPU__ + + btVector3 pWorld = localTransA(pInA); + btVector3 qWorld = localTransB(qInB); + +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("got local supporting vertices\n"); +#endif + btVector3 w = pWorld - qWorld; delta = m_cachedSeparatingAxis.dot(w); // potential exit, they don't overlap if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared)) { - checkPenetration = false; + checkSimplex=true; + //checkPenetration = false; break; } @@ -133,9 +175,15 @@ void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& checkSimplex = true; break; } + +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("addVertex 1\n"); +#endif //add current vertex to simplex m_simplexSolver->addVertex(w, pWorld, qWorld); - +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("addVertex 2\n"); +#endif //calculate the closest point to the origin (update vector v) if (!m_simplexSolver->closest(m_cachedSeparatingAxis)) { @@ -167,7 +215,7 @@ void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& //degeneracy, this is typically due to invalid/uninitialized worldtransforms for a btCollisionObject if (m_curIter++ > gGjkMaxIter) { - #if defined(DEBUG) || defined (_DEBUG) + #if defined(DEBUG) || defined (_DEBUG) || defined (DEBUG_SPU_COLLISION_DETECTION) printf("btGjkPairDetector maxIter exceeded:%i\n",m_curIter); printf("sepAxis=(%f,%f,%f), squaredDistance = %f, shapeTypeA=%i,shapeTypeB=%i\n", @@ -290,10 +338,20 @@ void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& #endif //__CELLOS_LV2__ +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("output 1\n"); +#endif + m_cachedSeparatingAxis = normalInB; + m_cachedSeparatingDistance = distance; + output.addContactPoint( normalInB, pointOnB+positionOffset, distance); + +#ifdef DEBUG_SPU_COLLISION_DETECTION + spu_printf("output 2\n"); +#endif //printf("gjk add:%f",distance); } diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h index 550fc4677e0..0ad4aab8a59 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h @@ -20,7 +20,6 @@ subject to the following restrictions: #define GJK_PAIR_DETECTOR_H #include "btDiscreteCollisionDetectorInterface.h" -#include "LinearMath/btPoint3.h" #include "BulletCollision/CollisionShapes/btCollisionMargin.h" class btConvexShape; @@ -38,6 +37,7 @@ class btGjkPairDetector : public btDiscreteCollisionDetectorInterface const btConvexShape* m_minkowskiA; const btConvexShape* m_minkowskiB; bool m_ignoreMargin; + btScalar m_cachedSeparatingDistance; public: @@ -68,6 +68,15 @@ public: m_cachedSeparatingAxis = seperatingAxis; } + const btVector3& getCachedSeparatingAxis() const + { + return m_cachedSeparatingAxis; + } + btScalar getCachedSeparatingDistance() const + { + return m_cachedSeparatingDistance; + } + void setPenetrationDepthSolver(btConvexPenetrationDepthSolver* penetrationDepthSolver) { m_penetrationDepthSolver = penetrationDepthSolver; diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h index e75fc1bee96..c7c9812985d 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h @@ -32,6 +32,8 @@ class btManifoldPoint :m_userPersistentData(0), m_appliedImpulse(0.f), m_lateralFrictionInitialized(false), + m_appliedImpulseLateral1(0.f), + m_appliedImpulseLateral2(0.f), m_lifeTime(0) { } @@ -110,6 +112,12 @@ class btManifoldPoint m_distance1 = dist; } + ///this returns the most recent applied impulse, to satisfy contact constraints by the constraint solver + btScalar getAppliedImpulse() const + { + return m_appliedImpulse; + } + }; diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp index 0e6fa2e6dfe..581b4258f03 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp @@ -19,9 +19,6 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" #include "BulletCollision/CollisionShapes/btConvexShape.h" - - - #define NUM_UNITSPHERE_POINTS 42 static btVector3 sPenetrationDirections[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2] = { @@ -73,7 +70,7 @@ btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654)) bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simplexSolver, const btConvexShape* convexA,const btConvexShape* convexB, const btTransform& transA,const btTransform& transB, - btVector3& v, btPoint3& pa, btPoint3& pb, + btVector3& v, btVector3& pa, btVector3& pb, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ) { @@ -117,7 +114,9 @@ bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& s btVector3 seperatingAxisInA,seperatingAxisInB; btVector3 pInA,qInB,pWorld,qWorld,w; +#ifndef __SPU__ #define USE_BATCHED_SUPPORT 1 +#endif #ifdef USE_BATCHED_SUPPORT btVector3 supportVerticesABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; @@ -200,6 +199,7 @@ bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& s int numSampleDirections = NUM_UNITSPHERE_POINTS; +#ifndef __SPU__ { int numPDA = convexA->getNumPreferredPenetrationDirections(); if (numPDA) @@ -229,14 +229,15 @@ bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& s } } } +#endif // __SPU__ for (int i=0;ilocalGetSupportingVertexWithoutMargin(seperatingAxisInA); - qInB = convexB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); + pInA = convexA->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInA); + qInB = convexB->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInB); pWorld = transA(pInA); qWorld = transB(qInB); w = qWorld - pWorld; @@ -254,13 +255,13 @@ bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& s //add the margins - minA += minNorm*convexA->getMargin(); - minB -= minNorm*convexB->getMargin(); + minA += minNorm*convexA->getMarginNonVirtual(); + minB -= minNorm*convexB->getMarginNonVirtual(); //no penetration if (minProj < btScalar(0.)) return false; - minProj += (convexA->getMargin() + convexB->getMargin()); + minProj += (convexA->getMarginNonVirtual() + convexB->getMarginNonVirtual()); diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h index 27b42c2b47e..23cbd57ac7e 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h @@ -27,10 +27,9 @@ public: virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, const btConvexShape* convexA,const btConvexShape* convexB, const btTransform& transA,const btTransform& transB, - btVector3& v, btPoint3& pa, btPoint3& pb, + btVector3& v, btVector3& pa, btVector3& pb, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ); - }; #endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp index 386885d2ac8..eecf927ee10 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp @@ -16,7 +16,7 @@ subject to the following restrictions: #include "btPersistentManifold.h" #include "LinearMath/btTransform.h" -#include + btScalar gContactBreakingThreshold = btScalar(0.02); ContactDestroyedCallback gContactDestroyedCallback = 0; @@ -66,7 +66,7 @@ void btPersistentManifold::clearUserCache(btManifoldPoint& pt) printf("error in clearUserCache\n"); } } - assert(occurance<=0); + btAssert(occurance<=0); #endif //DEBUG_PERSISTENCY if (pt.m_userPersistentData && gContactDestroyedCallback) @@ -164,7 +164,7 @@ int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint) { - assert(validContactDistance(newPoint)); + btAssert(validContactDistance(newPoint)); int insertIndex = getNumContacts(); if (insertIndex == MANIFOLD_CACHE_SIZE) @@ -172,6 +172,9 @@ int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint) #if MANIFOLD_CACHE_SIZE >= 4 //sort cache so best points come first, based on area insertIndex = sortCachedPoints(newPoint); + + if (insertIndex<0) + insertIndex=0; #else insertIndex = 0; #endif @@ -180,9 +183,8 @@ int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint) } else { m_cachedPoints++; - - } + btAssert(m_pointCache[insertIndex].m_userPersistentData==0); m_pointCache[insertIndex] = newPoint; return insertIndex; @@ -190,7 +192,7 @@ int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint) btScalar btPersistentManifold::getContactBreakingThreshold() const { - return gContactBreakingThreshold; + return m_contactBreakingThreshold; } diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h index c122eb865e8..0b3c734d1d7 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h @@ -24,7 +24,7 @@ subject to the following restrictions: struct btCollisionResult; -///contact breaking and merging threshold +///maximum contact breaking and merging threshold extern btScalar gContactBreakingThreshold; typedef bool (*ContactDestroyedCallback)(void* userPersistentData); @@ -54,6 +54,9 @@ ATTRIBUTE_ALIGNED16( class) btPersistentManifold void* m_body1; int m_cachedPoints; + btScalar m_contactBreakingThreshold; + btScalar m_contactProcessingThreshold; + /// sort cached points so most isolated points come first int sortCachedPoints(const btManifoldPoint& pt); @@ -68,10 +71,12 @@ public: btPersistentManifold(); - btPersistentManifold(void* body0,void* body1,int bla) - : m_body0(body0),m_body1(body1),m_cachedPoints(0) + btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold,btScalar contactProcessingThreshold) + : m_body0(body0),m_body1(body1),m_cachedPoints(0), + m_contactBreakingThreshold(contactBreakingThreshold), + m_contactProcessingThreshold(contactProcessingThreshold) { - (void)bla; + } SIMD_FORCE_INLINE void* getBody0() { return m_body0;} @@ -106,8 +111,13 @@ public: return m_pointCache[index]; } - /// todo: get this margin from the current physics / collision environment + ///@todo: get this margin from the current physics / collision environment btScalar getContactBreakingThreshold() const; + + btScalar getContactProcessingThreshold() const + { + return m_contactProcessingThreshold; + } int getCacheEntry(const btManifoldPoint& newPoint) const; diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp index a70a3ae56c4..cdb1d22444d 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp @@ -23,10 +23,12 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" #include "btRaycastCallback.h" -btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to) +btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to, unsigned int flags) : m_from(from), m_to(to), + //@BP Mod + m_flags(flags), m_hitFraction(btScalar(1.)) { @@ -55,6 +57,12 @@ void btTriangleRaycastCallback::processTriangle(btVector3* triangle,int partId, { return ; // same sign } + //@BP Mod - Backface filtering + if (((m_flags & kF_FilterBackfaces) != 0) && (dist_a > btScalar(0.0))) + { + // Backface, skip check + return; + } const btScalar proj_length=dist_a-dist_b; const btScalar distance = (dist_a)/(proj_length); @@ -89,14 +97,18 @@ void btTriangleRaycastCallback::processTriangle(btVector3* triangle,int partId, if ( (btScalar)(cp2.dot(triangleNormal)) >=edge_tolerance) { + //@BP Mod + // Triangle normal isn't normalized + triangleNormal.normalize(); - if ( dist_a > 0 ) + //@BP Mod - Allow for unflipped normal when raycasting against backfaces + if (((m_flags & kF_KeepUnflippedNormal) != 0) || (dist_a <= btScalar(0.0))) { - m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex); + m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex); } else { - m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex); + m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex); } } } diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h index d2b4b80f8ba..3a1ab388c13 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h @@ -29,9 +29,20 @@ public: btVector3 m_from; btVector3 m_to; + //@BP Mod - allow backface filtering and unflipped normals + enum EFlags + { + kF_None = 0, + kF_FilterBackfaces = 1 << 0, + kF_KeepUnflippedNormal = 1 << 1, // Prevents returned face normal getting flipped when a ray hits a back-facing triangle + + kF_Terminator = 0xFFFFFFFF + }; + unsigned int m_flags; + btScalar m_hitFraction; - btTriangleRaycastCallback(const btVector3& from,const btVector3& to); + btTriangleRaycastCallback(const btVector3& from,const btVector3& to, unsigned int flags=0); virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h index cf65f46505b..823b4e7158b 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h @@ -19,7 +19,6 @@ subject to the following restrictions: #define SIMPLEX_SOLVER_INTERFACE_H #include "LinearMath/btVector3.h" -#include "LinearMath/btPoint3.h" #define NO_VIRTUAL_INTERFACE 1 #ifdef NO_VIRTUAL_INTERFACE @@ -37,7 +36,7 @@ class btSimplexSolverInterface virtual void reset() = 0; - virtual void addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) = 0; + virtual void addVertex(const btVector3& w, const btVector3& p, const btVector3& q) = 0; virtual bool closest(btVector3& v) = 0; @@ -45,7 +44,7 @@ class btSimplexSolverInterface virtual bool fullSimplex() const = 0; - virtual int getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const = 0; + virtual int getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const = 0; virtual bool inSimplex(const btVector3& w) = 0; @@ -53,7 +52,7 @@ class btSimplexSolverInterface virtual bool emptySimplex() const = 0; - virtual void compute_points(btPoint3& p1, btPoint3& p2) = 0; + virtual void compute_points(btVector3& p1, btVector3& p2) = 0; virtual int numVertices() const =0; diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp index cf8a3ab5eb1..a7ffeda8c62 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp @@ -25,8 +25,6 @@ subject to the following restrictions: #include "btVoronoiSimplexSolver.h" -#include -//#include #define VERTA 0 #define VERTB 1 @@ -37,7 +35,7 @@ subject to the following restrictions: void btVoronoiSimplexSolver::removeVertex(int index) { - assert(m_numVertices>0); + btAssert(m_numVertices>0); m_numVertices--; m_simplexVectorW[index] = m_simplexVectorW[m_numVertices]; m_simplexPointsP[index] = m_simplexPointsP[m_numVertices]; @@ -77,7 +75,7 @@ void btVoronoiSimplexSolver::reset() //add a vertex -void btVoronoiSimplexSolver::addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) +void btVoronoiSimplexSolver::addVertex(const btVector3& w, const btVector3& p, const btVector3& q) { m_lastW = w; m_needsUpdate = true; @@ -267,7 +265,7 @@ btScalar btVoronoiSimplexSolver::maxVertex() //return the current simplex -int btVoronoiSimplexSolver::getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const +int btVoronoiSimplexSolver::getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const { int i; for (i=0;i + + +//#define CONETWIST_USE_OBSOLETE_SOLVER true +#define CONETWIST_USE_OBSOLETE_SOLVER false +#define CONETWIST_DEF_FIX_THRESH btScalar(.05f) + + + btConeTwistConstraint::btConeTwistConstraint() -:btTypedConstraint(CONETWIST_CONSTRAINT_TYPE) +:btTypedConstraint(CONETWIST_CONSTRAINT_TYPE), +m_useSolveConstraintObsolete(CONETWIST_USE_OBSOLETE_SOLVER) { } @@ -31,69 +40,229 @@ btConeTwistConstraint::btConeTwistConstraint() btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame,const btTransform& rbBFrame) :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), - m_angularOnly(false) + m_angularOnly(false), + m_useSolveConstraintObsolete(CONETWIST_USE_OBSOLETE_SOLVER) { - m_swingSpan1 = btScalar(1e30); - m_swingSpan2 = btScalar(1e30); - m_twistSpan = btScalar(1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - - m_solveTwistLimit = false; - m_solveSwingLimit = false; - + init(); } btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame) :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE,rbA),m_rbAFrame(rbAFrame), - m_angularOnly(false) + m_angularOnly(false), + m_useSolveConstraintObsolete(CONETWIST_USE_OBSOLETE_SOLVER) { m_rbBFrame = m_rbAFrame; - - m_swingSpan1 = btScalar(1e30); - m_swingSpan2 = btScalar(1e30); - m_twistSpan = btScalar(1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; + init(); +} - m_solveTwistLimit = false; - m_solveSwingLimit = false; - -} -void btConeTwistConstraint::buildJacobian() +void btConeTwistConstraint::init() { - m_appliedImpulse = btScalar(0.); - - //set bias, sign, clear accumulator - m_swingCorrection = btScalar(0.); - m_twistLimitSign = btScalar(0.); + m_angularOnly = false; m_solveTwistLimit = false; m_solveSwingLimit = false; - m_accTwistLimitImpulse = btScalar(0.); - m_accSwingLimitImpulse = btScalar(0.); + m_bMotorEnabled = false; + m_maxMotorImpulse = btScalar(-1); - if (!m_angularOnly) + setLimit(btScalar(BT_LARGE_FLOAT), btScalar(BT_LARGE_FLOAT), btScalar(BT_LARGE_FLOAT)); + m_damping = btScalar(0.01); + m_fixThresh = CONETWIST_DEF_FIX_THRESH; +} + + + + +void btConeTwistConstraint::getInfo1 (btConstraintInfo1* info) +{ + if (m_useSolveConstraintObsolete) { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - btVector3 relPos = pivotBInW - pivotAInW; - - btVector3 normal[3]; - if (relPos.length2() > SIMD_EPSILON) + info->m_numConstraintRows = 0; + info->nub = 0; + } + else + { + info->m_numConstraintRows = 3; + info->nub = 3; + calcAngleInfo2(); + if(m_solveSwingLimit) { - normal[0] = relPos.normalized(); + info->m_numConstraintRows++; + info->nub--; + if((m_swingSpan1 < m_fixThresh) && (m_swingSpan2 < m_fixThresh)) + { + info->m_numConstraintRows++; + info->nub--; + } + } + if(m_solveTwistLimit) + { + info->m_numConstraintRows++; + info->nub--; + } + } +} + + + +void btConeTwistConstraint::getInfo2 (btConstraintInfo2* info) +{ + btAssert(!m_useSolveConstraintObsolete); + //retrieve matrices + btTransform body0_trans; + body0_trans = m_rbA.getCenterOfMassTransform(); + btTransform body1_trans; + body1_trans = m_rbB.getCenterOfMassTransform(); + // set jacobian + info->m_J1linearAxis[0] = 1; + info->m_J1linearAxis[info->rowskip+1] = 1; + info->m_J1linearAxis[2*info->rowskip+2] = 1; + btVector3 a1 = body0_trans.getBasis() * m_rbAFrame.getOrigin(); + { + btVector3* angular0 = (btVector3*)(info->m_J1angularAxis); + btVector3* angular1 = (btVector3*)(info->m_J1angularAxis+info->rowskip); + btVector3* angular2 = (btVector3*)(info->m_J1angularAxis+2*info->rowskip); + btVector3 a1neg = -a1; + a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2); + } + btVector3 a2 = body1_trans.getBasis() * m_rbBFrame.getOrigin(); + { + btVector3* angular0 = (btVector3*)(info->m_J2angularAxis); + btVector3* angular1 = (btVector3*)(info->m_J2angularAxis+info->rowskip); + btVector3* angular2 = (btVector3*)(info->m_J2angularAxis+2*info->rowskip); + a2.getSkewSymmetricMatrix(angular0,angular1,angular2); + } + // set right hand side + btScalar k = info->fps * info->erp; + int j; + for (j=0; j<3; j++) + { + info->m_constraintError[j*info->rowskip] = k * (a2[j] + body1_trans.getOrigin()[j] - a1[j] - body0_trans.getOrigin()[j]); + info->m_lowerLimit[j*info->rowskip] = -SIMD_INFINITY; + info->m_upperLimit[j*info->rowskip] = SIMD_INFINITY; + } + int row = 3; + int srow = row * info->rowskip; + btVector3 ax1; + // angular limits + if(m_solveSwingLimit) + { + btScalar *J1 = info->m_J1angularAxis; + btScalar *J2 = info->m_J2angularAxis; + if((m_swingSpan1 < m_fixThresh) && (m_swingSpan2 < m_fixThresh)) + { + btTransform trA = m_rbA.getCenterOfMassTransform()*m_rbAFrame; + btVector3 p = trA.getBasis().getColumn(1); + btVector3 q = trA.getBasis().getColumn(2); + int srow1 = srow + info->rowskip; + J1[srow+0] = p[0]; + J1[srow+1] = p[1]; + J1[srow+2] = p[2]; + J1[srow1+0] = q[0]; + J1[srow1+1] = q[1]; + J1[srow1+2] = q[2]; + J2[srow+0] = -p[0]; + J2[srow+1] = -p[1]; + J2[srow+2] = -p[2]; + J2[srow1+0] = -q[0]; + J2[srow1+1] = -q[1]; + J2[srow1+2] = -q[2]; + btScalar fact = info->fps * m_relaxationFactor; + info->m_constraintError[srow] = fact * m_swingAxis.dot(p); + info->m_constraintError[srow1] = fact * m_swingAxis.dot(q); + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = SIMD_INFINITY; + info->m_lowerLimit[srow1] = -SIMD_INFINITY; + info->m_upperLimit[srow1] = SIMD_INFINITY; + srow = srow1 + info->rowskip; } else { - normal[0].setValue(btScalar(1.0),0,0); + ax1 = m_swingAxis * m_relaxationFactor * m_relaxationFactor; + J1[srow+0] = ax1[0]; + J1[srow+1] = ax1[1]; + J1[srow+2] = ax1[2]; + J2[srow+0] = -ax1[0]; + J2[srow+1] = -ax1[1]; + J2[srow+2] = -ax1[2]; + btScalar k = info->fps * m_biasFactor; + + info->m_constraintError[srow] = k * m_swingCorrection; + info->cfm[srow] = 0.0f; + // m_swingCorrection is always positive or 0 + info->m_lowerLimit[srow] = 0; + info->m_upperLimit[srow] = SIMD_INFINITY; + srow += info->rowskip; } - - btPlaneSpace1(normal[0], normal[1], normal[2]); - - for (int i=0;i<3;i++) + } + if(m_solveTwistLimit) + { + ax1 = m_twistAxis * m_relaxationFactor * m_relaxationFactor; + btScalar *J1 = info->m_J1angularAxis; + btScalar *J2 = info->m_J2angularAxis; + J1[srow+0] = ax1[0]; + J1[srow+1] = ax1[1]; + J1[srow+2] = ax1[2]; + J2[srow+0] = -ax1[0]; + J2[srow+1] = -ax1[1]; + J2[srow+2] = -ax1[2]; + btScalar k = info->fps * m_biasFactor; + info->m_constraintError[srow] = k * m_twistCorrection; + info->cfm[srow] = 0.0f; + if(m_twistSpan > 0.0f) { - new (&m_jac[i]) btJacobianEntry( + + if(m_twistCorrection > 0.0f) + { + info->m_lowerLimit[srow] = 0; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else + { + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = 0; + } + } + else + { + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + srow += info->rowskip; + } +} + + + +void btConeTwistConstraint::buildJacobian() +{ + if (m_useSolveConstraintObsolete) + { + m_appliedImpulse = btScalar(0.); + m_accTwistLimitImpulse = btScalar(0.); + m_accSwingLimitImpulse = btScalar(0.); + m_accMotorImpulse = btVector3(0.,0.,0.); + + if (!m_angularOnly) + { + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); + btVector3 relPos = pivotBInW - pivotAInW; + + btVector3 normal[3]; + if (relPos.length2() > SIMD_EPSILON) + { + normal[0] = relPos.normalized(); + } + else + { + normal[0].setValue(btScalar(1.0),0,0); + } + + btPlaneSpace1(normal[0], normal[1], normal[2]); + + for (int i=0;i<3;i++) + { + new (&m_jac[i]) btJacobianEntry( m_rbA.getCenterOfMassTransform().getBasis().transpose(), m_rbB.getCenterOfMassTransform().getBasis().transpose(), pivotAInW - m_rbA.getCenterOfMassPosition(), @@ -103,9 +272,243 @@ void btConeTwistConstraint::buildJacobian() m_rbA.getInvMass(), m_rbB.getInvInertiaDiagLocal(), m_rbB.getInvMass()); + } + } + + calcAngleInfo2(); + } +} + + + +void btConeTwistConstraint::solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep) +{ + if (m_useSolveConstraintObsolete) + { + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); + + btScalar tau = btScalar(0.3); + + //linear part + if (!m_angularOnly) + { + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + btVector3 vel1; + bodyA.getVelocityInLocalPointObsolete(rel_pos1,vel1); + btVector3 vel2; + bodyB.getVelocityInLocalPointObsolete(rel_pos2,vel2); + btVector3 vel = vel1 - vel2; + + for (int i=0;i<3;i++) + { + const btVector3& normal = m_jac[i].m_linearJointAxis; + btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); + + btScalar rel_vel; + rel_vel = normal.dot(vel); + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal + btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; + m_appliedImpulse += impulse; + + btVector3 ftorqueAxis1 = rel_pos1.cross(normal); + btVector3 ftorqueAxis2 = rel_pos2.cross(normal); + bodyA.applyImpulse(normal*m_rbA.getInvMass(), m_rbA.getInvInertiaTensorWorld()*ftorqueAxis1,impulse); + bodyB.applyImpulse(normal*m_rbB.getInvMass(), m_rbB.getInvInertiaTensorWorld()*ftorqueAxis2,-impulse); + + } + } + + // apply motor + if (m_bMotorEnabled) + { + // compute current and predicted transforms + btTransform trACur = m_rbA.getCenterOfMassTransform(); + btTransform trBCur = m_rbB.getCenterOfMassTransform(); + btVector3 omegaA; bodyA.getAngularVelocity(omegaA); + btVector3 omegaB; bodyB.getAngularVelocity(omegaB); + btTransform trAPred; trAPred.setIdentity(); + btVector3 zerovec(0,0,0); + btTransformUtil::integrateTransform( + trACur, zerovec, omegaA, timeStep, trAPred); + btTransform trBPred; trBPred.setIdentity(); + btTransformUtil::integrateTransform( + trBCur, zerovec, omegaB, timeStep, trBPred); + + // compute desired transforms in world + btTransform trPose(m_qTarget); + btTransform trABDes = m_rbBFrame * trPose * m_rbAFrame.inverse(); + btTransform trADes = trBPred * trABDes; + btTransform trBDes = trAPred * trABDes.inverse(); + + // compute desired omegas in world + btVector3 omegaADes, omegaBDes; + + btTransformUtil::calculateVelocity(trACur, trADes, timeStep, zerovec, omegaADes); + btTransformUtil::calculateVelocity(trBCur, trBDes, timeStep, zerovec, omegaBDes); + + // compute delta omegas + btVector3 dOmegaA = omegaADes - omegaA; + btVector3 dOmegaB = omegaBDes - omegaB; + + // compute weighted avg axis of dOmega (weighting based on inertias) + btVector3 axisA, axisB; + btScalar kAxisAInv = 0, kAxisBInv = 0; + + if (dOmegaA.length2() > SIMD_EPSILON) + { + axisA = dOmegaA.normalized(); + kAxisAInv = getRigidBodyA().computeAngularImpulseDenominator(axisA); + } + + if (dOmegaB.length2() > SIMD_EPSILON) + { + axisB = dOmegaB.normalized(); + kAxisBInv = getRigidBodyB().computeAngularImpulseDenominator(axisB); + } + + btVector3 avgAxis = kAxisAInv * axisA + kAxisBInv * axisB; + + static bool bDoTorque = true; + if (bDoTorque && avgAxis.length2() > SIMD_EPSILON) + { + avgAxis.normalize(); + kAxisAInv = getRigidBodyA().computeAngularImpulseDenominator(avgAxis); + kAxisBInv = getRigidBodyB().computeAngularImpulseDenominator(avgAxis); + btScalar kInvCombined = kAxisAInv + kAxisBInv; + + btVector3 impulse = (kAxisAInv * dOmegaA - kAxisBInv * dOmegaB) / + (kInvCombined * kInvCombined); + + if (m_maxMotorImpulse >= 0) + { + btScalar fMaxImpulse = m_maxMotorImpulse; + if (m_bNormalizedMotorStrength) + fMaxImpulse = fMaxImpulse/kAxisAInv; + + btVector3 newUnclampedAccImpulse = m_accMotorImpulse + impulse; + btScalar newUnclampedMag = newUnclampedAccImpulse.length(); + if (newUnclampedMag > fMaxImpulse) + { + newUnclampedAccImpulse.normalize(); + newUnclampedAccImpulse *= fMaxImpulse; + impulse = newUnclampedAccImpulse - m_accMotorImpulse; + } + m_accMotorImpulse += impulse; + } + + btScalar impulseMag = impulse.length(); + btVector3 impulseAxis = impulse / impulseMag; + + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*impulseAxis, impulseMag); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*impulseAxis, -impulseMag); + + } + } + else if (m_damping > SIMD_EPSILON) // no motor: do a little damping + { + btVector3 angVelA; bodyA.getAngularVelocity(angVelA); + btVector3 angVelB; bodyB.getAngularVelocity(angVelB); + btVector3 relVel = angVelB - angVelA; + if (relVel.length2() > SIMD_EPSILON) + { + btVector3 relVelAxis = relVel.normalized(); + btScalar m_kDamping = btScalar(1.) / + (getRigidBodyA().computeAngularImpulseDenominator(relVelAxis) + + getRigidBodyB().computeAngularImpulseDenominator(relVelAxis)); + btVector3 impulse = m_damping * m_kDamping * relVel; + + btScalar impulseMag = impulse.length(); + btVector3 impulseAxis = impulse / impulseMag; + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*impulseAxis, impulseMag); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*impulseAxis, -impulseMag); + } + } + + // joint limits + { + ///solve angular part + btVector3 angVelA; + bodyA.getAngularVelocity(angVelA); + btVector3 angVelB; + bodyB.getAngularVelocity(angVelB); + + // solve swing limit + if (m_solveSwingLimit) + { + btScalar amplitude = m_swingLimitRatio * m_swingCorrection*m_biasFactor/timeStep; + btScalar relSwingVel = (angVelB - angVelA).dot(m_swingAxis); + if (relSwingVel > 0) + amplitude += m_swingLimitRatio * relSwingVel * m_relaxationFactor; + btScalar impulseMag = amplitude * m_kSwing; + + // Clamp the accumulated impulse + btScalar temp = m_accSwingLimitImpulse; + m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, btScalar(0.0) ); + impulseMag = m_accSwingLimitImpulse - temp; + + btVector3 impulse = m_swingAxis * impulseMag; + + // don't let cone response affect twist + // (this can happen since body A's twist doesn't match body B's AND we use an elliptical cone limit) + { + btVector3 impulseTwistCouple = impulse.dot(m_twistAxisA) * m_twistAxisA; + btVector3 impulseNoTwistCouple = impulse - impulseTwistCouple; + impulse = impulseNoTwistCouple; + } + + impulseMag = impulse.length(); + btVector3 noTwistSwingAxis = impulse / impulseMag; + + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*noTwistSwingAxis, impulseMag); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*noTwistSwingAxis, -impulseMag); + } + + + // solve twist limit + if (m_solveTwistLimit) + { + btScalar amplitude = m_twistLimitRatio * m_twistCorrection*m_biasFactor/timeStep; + btScalar relTwistVel = (angVelB - angVelA).dot( m_twistAxis ); + if (relTwistVel > 0) // only damp when moving towards limit (m_twistAxis flipping is important) + amplitude += m_twistLimitRatio * relTwistVel * m_relaxationFactor; + btScalar impulseMag = amplitude * m_kTwist; + + // Clamp the accumulated impulse + btScalar temp = m_accTwistLimitImpulse; + m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, btScalar(0.0) ); + impulseMag = m_accTwistLimitImpulse - temp; + + btVector3 impulse = m_twistAxis * impulseMag; + + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*m_twistAxis,impulseMag); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*m_twistAxis,-impulseMag); + } } } +} + + + +void btConeTwistConstraint::updateRHS(btScalar timeStep) +{ + (void)timeStep; + +} + + + +void btConeTwistConstraint::calcAngleInfo() +{ + m_swingCorrection = btScalar(0.); + m_twistLimitSign = btScalar(0.); + m_solveTwistLimit = false; + m_solveSwingLimit = false; + btVector3 b1Axis1,b1Axis2,b1Axis3; btVector3 b2Axis1,b2Axis2; @@ -122,20 +525,17 @@ void btConeTwistConstraint::buildJacobian() if (m_swingSpan1 >= btScalar(0.05f)) { b1Axis2 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(1); -// swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) ); swx = b2Axis1.dot(b1Axis1); swy = b2Axis1.dot(b1Axis2); swing1 = btAtan2Fast(swy, swx); fact = (swy*swy + swx*swx) * thresh * thresh; fact = fact / (fact + btScalar(1.0)); swing1 *= fact; - } if (m_swingSpan2 >= btScalar(0.05f)) { b1Axis3 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(2); -// swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) ); swx = b2Axis1.dot(b1Axis1); swy = b2Axis1.dot(b1Axis3); swing2 = btAtan2Fast(swy, swx); @@ -152,17 +552,11 @@ void btConeTwistConstraint::buildJacobian() { m_swingCorrection = EllipseAngle-1.0f; m_solveSwingLimit = true; - // Calculate necessary axis & factors m_swingAxis = b2Axis1.cross(b1Axis2* b2Axis1.dot(b1Axis2) + b1Axis3* b2Axis1.dot(b1Axis3)); m_swingAxis.normalize(); - btScalar swingAxisSign = (b2Axis1.dot(b1Axis1) >= 0.0f) ? 1.0f : -1.0f; m_swingAxis *= swingAxisSign; - - m_kSwing = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_swingAxis) + - getRigidBodyB().computeAngularImpulseDenominator(m_swingAxis)); - } // Twist limits @@ -172,118 +566,444 @@ void btConeTwistConstraint::buildJacobian() btQuaternion rotationArc = shortestArcQuat(b2Axis1,b1Axis1); btVector3 TwistRef = quatRotate(rotationArc,b2Axis2); btScalar twist = btAtan2Fast( TwistRef.dot(b1Axis3), TwistRef.dot(b1Axis2) ); + m_twistAngle = twist; - btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? m_limitSoftness : btScalar(0.); +// btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? m_limitSoftness : btScalar(0.); + btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? btScalar(1.0f) : btScalar(0.); if (twist <= -m_twistSpan*lockedFreeFactor) { m_twistCorrection = -(twist + m_twistSpan); m_solveTwistLimit = true; - m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; m_twistAxis.normalize(); m_twistAxis *= -1.0f; + } + else if (twist > m_twistSpan*lockedFreeFactor) + { + m_twistCorrection = (twist - m_twistSpan); + m_solveTwistLimit = true; + m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; + m_twistAxis.normalize(); + } + } +} - m_kTwist = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + - getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); - } else - if (twist > m_twistSpan*lockedFreeFactor) +static btVector3 vTwist(1,0,0); // twist axis in constraint's space + + + +void btConeTwistConstraint::calcAngleInfo2() +{ + m_swingCorrection = btScalar(0.); + m_twistLimitSign = btScalar(0.); + m_solveTwistLimit = false; + m_solveSwingLimit = false; + // compute rotation of A wrt B (in constraint space) + if (m_bMotorEnabled && (!m_useSolveConstraintObsolete)) + { // it is assumed that setMotorTarget() was alredy called + // and motor target m_qTarget is within constraint limits + // TODO : split rotation to pure swing and pure twist + // compute desired transforms in world + btTransform trPose(m_qTarget); + btTransform trA = getRigidBodyA().getCenterOfMassTransform() * m_rbAFrame; + btTransform trB = getRigidBodyB().getCenterOfMassTransform() * m_rbBFrame; + btTransform trDeltaAB = trB * trPose * trA.inverse(); + btQuaternion qDeltaAB = trDeltaAB.getRotation(); + btVector3 swingAxis = btVector3(qDeltaAB.x(), qDeltaAB.y(), qDeltaAB.z()); + m_swingAxis = swingAxis; + m_swingAxis.normalize(); + m_swingCorrection = qDeltaAB.getAngle(); + if(!btFuzzyZero(m_swingCorrection)) + { + m_solveSwingLimit = true; + } + return; + } + + + { + // compute rotation of A wrt B (in constraint space) + btQuaternion qA = getRigidBodyA().getCenterOfMassTransform().getRotation() * m_rbAFrame.getRotation(); + btQuaternion qB = getRigidBodyB().getCenterOfMassTransform().getRotation() * m_rbBFrame.getRotation(); + btQuaternion qAB = qB.inverse() * qA; + // split rotation into cone and twist + // (all this is done from B's perspective. Maybe I should be averaging axes...) + btVector3 vConeNoTwist = quatRotate(qAB, vTwist); vConeNoTwist.normalize(); + btQuaternion qABCone = shortestArcQuat(vTwist, vConeNoTwist); qABCone.normalize(); + btQuaternion qABTwist = qABCone.inverse() * qAB; qABTwist.normalize(); + + if (m_swingSpan1 >= m_fixThresh && m_swingSpan2 >= m_fixThresh) + { + btScalar swingAngle, swingLimit = 0; btVector3 swingAxis; + computeConeLimitInfo(qABCone, swingAngle, swingAxis, swingLimit); + + if (swingAngle > swingLimit * m_limitSoftness) + { + m_solveSwingLimit = true; + + // compute limit ratio: 0->1, where + // 0 == beginning of soft limit + // 1 == hard/real limit + m_swingLimitRatio = 1.f; + if (swingAngle < swingLimit && m_limitSoftness < 1.f - SIMD_EPSILON) + { + m_swingLimitRatio = (swingAngle - swingLimit * m_limitSoftness)/ + (swingLimit - swingLimit * m_limitSoftness); + } + + // swing correction tries to get back to soft limit + m_swingCorrection = swingAngle - (swingLimit * m_limitSoftness); + + // adjustment of swing axis (based on ellipse normal) + adjustSwingAxisToUseEllipseNormal(swingAxis); + + // Calculate necessary axis & factors + m_swingAxis = quatRotate(qB, -swingAxis); + + m_twistAxisA.setValue(0,0,0); + + m_kSwing = btScalar(1.) / + (getRigidBodyA().computeAngularImpulseDenominator(m_swingAxis) + + getRigidBodyB().computeAngularImpulseDenominator(m_swingAxis)); + } + } + else + { + // you haven't set any limits; + // or you're trying to set at least one of the swing limits too small. (if so, do you really want a conetwist constraint?) + // anyway, we have either hinge or fixed joint + btVector3 ivA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(0); + btVector3 jvA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(1); + btVector3 kvA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + btVector3 ivB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(0); + btVector3 target; + btScalar x = ivB.dot(ivA); + btScalar y = ivB.dot(jvA); + btScalar z = ivB.dot(kvA); + if((m_swingSpan1 < m_fixThresh) && (m_swingSpan2 < m_fixThresh)) + { // fixed. We'll need to add one more row to constraint + if((!btFuzzyZero(y)) || (!(btFuzzyZero(z)))) + { + m_solveSwingLimit = true; + m_swingAxis = -ivB.cross(ivA); + } + } + else + { + if(m_swingSpan1 < m_fixThresh) + { // hinge around Y axis + if(!(btFuzzyZero(y))) + { + m_solveSwingLimit = true; + if(m_swingSpan2 >= m_fixThresh) + { + y = btScalar(0.f); + btScalar span2 = btAtan2(z, x); + if(span2 > m_swingSpan2) + { + x = btCos(m_swingSpan2); + z = btSin(m_swingSpan2); + } + else if(span2 < -m_swingSpan2) + { + x = btCos(m_swingSpan2); + z = -btSin(m_swingSpan2); + } + } + } + } + else + { // hinge around Z axis + if(!btFuzzyZero(z)) + { + m_solveSwingLimit = true; + if(m_swingSpan1 >= m_fixThresh) + { + z = btScalar(0.f); + btScalar span1 = btAtan2(y, x); + if(span1 > m_swingSpan1) + { + x = btCos(m_swingSpan1); + y = btSin(m_swingSpan1); + } + else if(span1 < -m_swingSpan1) + { + x = btCos(m_swingSpan1); + y = -btSin(m_swingSpan1); + } + } + } + } + target[0] = x * ivA[0] + y * jvA[0] + z * kvA[0]; + target[1] = x * ivA[1] + y * jvA[1] + z * kvA[1]; + target[2] = x * ivA[2] + y * jvA[2] + z * kvA[2]; + target.normalize(); + m_swingAxis = -ivB.cross(target); + m_swingCorrection = m_swingAxis.length(); + m_swingAxis.normalize(); + } + } + + if (m_twistSpan >= btScalar(0.f)) + { + btVector3 twistAxis; + computeTwistLimitInfo(qABTwist, m_twistAngle, twistAxis); + + if (m_twistAngle > m_twistSpan*m_limitSoftness) { - m_twistCorrection = (twist - m_twistSpan); m_solveTwistLimit = true; - m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; - m_twistAxis.normalize(); + m_twistLimitRatio = 1.f; + if (m_twistAngle < m_twistSpan && m_limitSoftness < 1.f - SIMD_EPSILON) + { + m_twistLimitRatio = (m_twistAngle - m_twistSpan * m_limitSoftness)/ + (m_twistSpan - m_twistSpan * m_limitSoftness); + } - m_kTwist = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + - getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); + // twist correction tries to get back to soft limit + m_twistCorrection = m_twistAngle - (m_twistSpan * m_limitSoftness); + m_twistAxis = quatRotate(qB, -twistAxis); + + m_kTwist = btScalar(1.) / + (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + + getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); } - } -} -void btConeTwistConstraint::solveConstraint(btScalar timeStep) -{ - - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - - btScalar tau = btScalar(0.3); - - //linear part - if (!m_angularOnly) - { - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - for (int i=0;i<3;i++) - { - const btVector3& normal = m_jac[i].m_linearJointAxis; - btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - - btScalar rel_vel; - rel_vel = normal.dot(vel); - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; - m_appliedImpulse += impulse; - btVector3 impulse_vector = normal * impulse; - m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); - m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); + if (m_solveSwingLimit) + m_twistAxisA = quatRotate(qA, -twistAxis); } - } - - { - ///solve angular part - const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); - const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); - - // solve swing limit - if (m_solveSwingLimit) + else { - btScalar amplitude = ((angVelB - angVelA).dot( m_swingAxis )*m_relaxationFactor*m_relaxationFactor + m_swingCorrection*(btScalar(1.)/timeStep)*m_biasFactor); - btScalar impulseMag = amplitude * m_kSwing; - - // Clamp the accumulated impulse - btScalar temp = m_accSwingLimitImpulse; - m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, btScalar(0.0) ); - impulseMag = m_accSwingLimitImpulse - temp; - - btVector3 impulse = m_swingAxis * impulseMag; - - m_rbA.applyTorqueImpulse(impulse); - m_rbB.applyTorqueImpulse(-impulse); - + m_twistAngle = btScalar(0.f); } + } +} - // solve twist limit - if (m_solveTwistLimit) + + +// given a cone rotation in constraint space, (pre: twist must already be removed) +// this method computes its corresponding swing angle and axis. +// more interestingly, it computes the cone/swing limit (angle) for this cone "pose". +void btConeTwistConstraint::computeConeLimitInfo(const btQuaternion& qCone, + btScalar& swingAngle, // out + btVector3& vSwingAxis, // out + btScalar& swingLimit) // out +{ + swingAngle = qCone.getAngle(); + if (swingAngle > SIMD_EPSILON) + { + vSwingAxis = btVector3(qCone.x(), qCone.y(), qCone.z()); + vSwingAxis.normalize(); + if (fabs(vSwingAxis.x()) > SIMD_EPSILON) { - btScalar amplitude = ((angVelB - angVelA).dot( m_twistAxis )*m_relaxationFactor*m_relaxationFactor + m_twistCorrection*(btScalar(1.)/timeStep)*m_biasFactor ); - btScalar impulseMag = amplitude * m_kTwist; - - // Clamp the accumulated impulse - btScalar temp = m_accTwistLimitImpulse; - m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, btScalar(0.0) ); - impulseMag = m_accTwistLimitImpulse - temp; - - btVector3 impulse = m_twistAxis * impulseMag; - - m_rbA.applyTorqueImpulse(impulse); - m_rbB.applyTorqueImpulse(-impulse); - + // non-zero twist?! this should never happen. + int wtf = 0; wtf = wtf; } - + + // Compute limit for given swing. tricky: + // Given a swing axis, we're looking for the intersection with the bounding cone ellipse. + // (Since we're dealing with angles, this ellipse is embedded on the surface of a sphere.) + + // For starters, compute the direction from center to surface of ellipse. + // This is just the perpendicular (ie. rotate 2D vector by PI/2) of the swing axis. + // (vSwingAxis is the cone rotation (in z,y); change vars and rotate to (x,y) coords.) + btScalar xEllipse = vSwingAxis.y(); + btScalar yEllipse = -vSwingAxis.z(); + + // Now, we use the slope of the vector (using x/yEllipse) and find the length + // of the line that intersects the ellipse: + // x^2 y^2 + // --- + --- = 1, where a and b are semi-major axes 2 and 1 respectively (ie. the limits) + // a^2 b^2 + // Do the math and it should be clear. + + swingLimit = m_swingSpan1; // if xEllipse == 0, we have a pure vSwingAxis.z rotation: just use swingspan1 + if (fabs(xEllipse) > SIMD_EPSILON) + { + btScalar surfaceSlope2 = (yEllipse*yEllipse)/(xEllipse*xEllipse); + btScalar norm = 1 / (m_swingSpan2 * m_swingSpan2); + norm += surfaceSlope2 / (m_swingSpan1 * m_swingSpan1); + btScalar swingLimit2 = (1 + surfaceSlope2) / norm; + swingLimit = sqrt(swingLimit2); + } + + // test! + /*swingLimit = m_swingSpan2; + if (fabs(vSwingAxis.z()) > SIMD_EPSILON) + { + btScalar mag_2 = m_swingSpan1*m_swingSpan1 + m_swingSpan2*m_swingSpan2; + btScalar sinphi = m_swingSpan2 / sqrt(mag_2); + btScalar phi = asin(sinphi); + btScalar theta = atan2(fabs(vSwingAxis.y()),fabs(vSwingAxis.z())); + btScalar alpha = 3.14159f - theta - phi; + btScalar sinalpha = sin(alpha); + swingLimit = m_swingSpan1 * sinphi/sinalpha; + }*/ + } + else if (swingAngle < 0) + { + // this should never happen! + int wtf = 0; wtf = wtf; + } +} + +btVector3 btConeTwistConstraint::GetPointForAngle(btScalar fAngleInRadians, btScalar fLength) const +{ + // compute x/y in ellipse using cone angle (0 -> 2*PI along surface of cone) + btScalar xEllipse = btCos(fAngleInRadians); + btScalar yEllipse = btSin(fAngleInRadians); + + // Use the slope of the vector (using x/yEllipse) and find the length + // of the line that intersects the ellipse: + // x^2 y^2 + // --- + --- = 1, where a and b are semi-major axes 2 and 1 respectively (ie. the limits) + // a^2 b^2 + // Do the math and it should be clear. + + float swingLimit = m_swingSpan1; // if xEllipse == 0, just use axis b (1) + if (fabs(xEllipse) > SIMD_EPSILON) + { + btScalar surfaceSlope2 = (yEllipse*yEllipse)/(xEllipse*xEllipse); + btScalar norm = 1 / (m_swingSpan2 * m_swingSpan2); + norm += surfaceSlope2 / (m_swingSpan1 * m_swingSpan1); + btScalar swingLimit2 = (1 + surfaceSlope2) / norm; + swingLimit = sqrt(swingLimit2); } + // convert into point in constraint space: + // note: twist is x-axis, swing 1 and 2 are along the z and y axes respectively + btVector3 vSwingAxis(0, xEllipse, -yEllipse); + btQuaternion qSwing(vSwingAxis, swingLimit); + btVector3 vPointInConstraintSpace(fLength,0,0); + return quatRotate(qSwing, vPointInConstraintSpace); } -void btConeTwistConstraint::updateRHS(btScalar timeStep) +// given a twist rotation in constraint space, (pre: cone must already be removed) +// this method computes its corresponding angle and axis. +void btConeTwistConstraint::computeTwistLimitInfo(const btQuaternion& qTwist, + btScalar& twistAngle, // out + btVector3& vTwistAxis) // out { - (void)timeStep; + btQuaternion qMinTwist = qTwist; + twistAngle = qTwist.getAngle(); + if (twistAngle > SIMD_PI) // long way around. flip quat and recalculate. + { + qMinTwist = operator-(qTwist); + twistAngle = qMinTwist.getAngle(); + } + if (twistAngle < 0) + { + // this should never happen + int wtf = 0; wtf = wtf; + } + + vTwistAxis = btVector3(qMinTwist.x(), qMinTwist.y(), qMinTwist.z()); + if (twistAngle > SIMD_EPSILON) + vTwistAxis.normalize(); } + + +void btConeTwistConstraint::adjustSwingAxisToUseEllipseNormal(btVector3& vSwingAxis) const +{ + // the swing axis is computed as the "twist-free" cone rotation, + // but the cone limit is not circular, but elliptical (if swingspan1 != swingspan2). + // so, if we're outside the limits, the closest way back inside the cone isn't + // along the vector back to the center. better (and more stable) to use the ellipse normal. + + // convert swing axis to direction from center to surface of ellipse + // (ie. rotate 2D vector by PI/2) + btScalar y = -vSwingAxis.z(); + btScalar z = vSwingAxis.y(); + + // do the math... + if (fabs(z) > SIMD_EPSILON) // avoid division by 0. and we don't need an update if z == 0. + { + // compute gradient/normal of ellipse surface at current "point" + btScalar grad = y/z; + grad *= m_swingSpan2 / m_swingSpan1; + + // adjust y/z to represent normal at point (instead of vector to point) + if (y > 0) + y = fabs(grad * z); + else + y = -fabs(grad * z); + + // convert ellipse direction back to swing axis + vSwingAxis.setZ(-y); + vSwingAxis.setY( z); + vSwingAxis.normalize(); + } +} + + + +void btConeTwistConstraint::setMotorTarget(const btQuaternion &q) +{ + btTransform trACur = m_rbA.getCenterOfMassTransform(); + btTransform trBCur = m_rbB.getCenterOfMassTransform(); + btTransform trABCur = trBCur.inverse() * trACur; + btQuaternion qABCur = trABCur.getRotation(); + btTransform trConstraintCur = (trBCur * m_rbBFrame).inverse() * (trACur * m_rbAFrame); + btQuaternion qConstraintCur = trConstraintCur.getRotation(); + + btQuaternion qConstraint = m_rbBFrame.getRotation().inverse() * q * m_rbAFrame.getRotation(); + setMotorTargetInConstraintSpace(qConstraint); +} + + +void btConeTwistConstraint::setMotorTargetInConstraintSpace(const btQuaternion &q) +{ + m_qTarget = q; + + // clamp motor target to within limits + { + btScalar softness = 1.f;//m_limitSoftness; + + // split into twist and cone + btVector3 vTwisted = quatRotate(m_qTarget, vTwist); + btQuaternion qTargetCone = shortestArcQuat(vTwist, vTwisted); qTargetCone.normalize(); + btQuaternion qTargetTwist = qTargetCone.inverse() * m_qTarget; qTargetTwist.normalize(); + + // clamp cone + if (m_swingSpan1 >= btScalar(0.05f) && m_swingSpan2 >= btScalar(0.05f)) + { + btScalar swingAngle, swingLimit; btVector3 swingAxis; + computeConeLimitInfo(qTargetCone, swingAngle, swingAxis, swingLimit); + + if (fabs(swingAngle) > SIMD_EPSILON) + { + if (swingAngle > swingLimit*softness) + swingAngle = swingLimit*softness; + else if (swingAngle < -swingLimit*softness) + swingAngle = -swingLimit*softness; + qTargetCone = btQuaternion(swingAxis, swingAngle); + } + } + + // clamp twist + if (m_twistSpan >= btScalar(0.05f)) + { + btScalar twistAngle; btVector3 twistAxis; + computeTwistLimitInfo(qTargetTwist, twistAngle, twistAxis); + + if (fabs(twistAngle) > SIMD_EPSILON) + { + // eddy todo: limitSoftness used here??? + if (twistAngle > m_twistSpan*softness) + twistAngle = m_twistSpan*softness; + else if (twistAngle < -m_twistSpan*softness) + twistAngle = -m_twistSpan*softness; + qTargetTwist = btQuaternion(twistAxis, twistAngle); + } + } + + m_qTarget = qTargetCone * qTargetTwist; + } +} + + + + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h index f121919c8f9..8a893d4fb8c 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h @@ -17,10 +17,26 @@ Written by: Marcus Hennix +/* +Overview: + +btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc). +It is a fixed translation, 3 degree-of-freedom (DOF) rotational "joint". +It divides the 3 rotational DOFs into swing (movement within a cone) and twist. +Swing is divided into swing1 and swing2 which can have different limits, giving an elliptical shape. +(Note: the cone's base isn't flat, so this ellipse is "embedded" on the surface of a sphere.) + +In the contraint's frame of reference: +twist is along the x-axis, +and swing 1 and 2 are along the z and y axes respectively. +*/ + + + #ifndef CONETWISTCONSTRAINT_H #define CONETWISTCONSTRAINT_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btJacobianEntry.h" #include "btTypedConstraint.h" @@ -42,10 +58,14 @@ public: btScalar m_biasFactor; btScalar m_relaxationFactor; + btScalar m_damping; + btScalar m_swingSpan1; btScalar m_swingSpan2; btScalar m_twistSpan; + btScalar m_fixThresh; + btVector3 m_swingAxis; btVector3 m_twistAxis; @@ -56,6 +76,8 @@ public: btScalar m_swingCorrection; btScalar m_twistCorrection; + btScalar m_twistAngle; + btScalar m_accSwingLimitImpulse; btScalar m_accTwistLimitImpulse; @@ -63,6 +85,19 @@ public: bool m_solveTwistLimit; bool m_solveSwingLimit; + bool m_useSolveConstraintObsolete; + + // not yet used... + btScalar m_swingLimitRatio; + btScalar m_twistLimitRatio; + btVector3 m_twistAxisA; + + // motor + bool m_bMotorEnabled; + bool m_bNormalizedMotorStrength; + btQuaternion m_qTarget; + btScalar m_maxMotorImpulse; + btVector3 m_accMotorImpulse; public: @@ -74,7 +109,12 @@ public: virtual void buildJacobian(); - virtual void solveConstraint(btScalar timeStep); + virtual void getInfo1 (btConstraintInfo1* info); + + virtual void getInfo2 (btConstraintInfo2* info); + + + virtual void solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep); void updateRHS(btScalar timeStep); @@ -92,7 +132,43 @@ public: m_angularOnly = angularOnly; } - void setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan, btScalar _softness = 0.8f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) + void setLimit(int limitIndex,btScalar limitValue) + { + switch (limitIndex) + { + case 3: + { + m_twistSpan = limitValue; + break; + } + case 4: + { + m_swingSpan2 = limitValue; + break; + } + case 5: + { + m_swingSpan1 = limitValue; + break; + } + default: + { + } + }; + } + + // setLimit(), a few notes: + // _softness: + // 0->1, recommend ~0.8->1. + // describes % of limits where movement is free. + // beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached. + // _biasFactor: + // 0->1?, recommend 0.3 +/-0.3 or so. + // strength with which constraint resists zeroth order (angular, not angular velocity) limit violation. + // __relaxationFactor: + // 0->1, recommend to stay near 1. + // the lower the value, the less the constraint will fight velocities which violate the angular limits. + void setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan, btScalar _softness = 1.f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) { m_swingSpan1 = _swingSpan1; m_swingSpan2 = _swingSpan2; @@ -121,6 +197,60 @@ public: return m_twistLimitSign; } + void calcAngleInfo(); + void calcAngleInfo2(); + + inline btScalar getSwingSpan1() + { + return m_swingSpan1; + } + inline btScalar getSwingSpan2() + { + return m_swingSpan2; + } + inline btScalar getTwistSpan() + { + return m_twistSpan; + } + inline btScalar getTwistAngle() + { + return m_twistAngle; + } + bool isPastSwingLimit() { return m_solveSwingLimit; } + + + void setDamping(btScalar damping) { m_damping = damping; } + + void enableMotor(bool b) { m_bMotorEnabled = b; } + void setMaxMotorImpulse(btScalar maxMotorImpulse) { m_maxMotorImpulse = maxMotorImpulse; m_bNormalizedMotorStrength = false; } + void setMaxMotorImpulseNormalized(btScalar maxMotorImpulse) { m_maxMotorImpulse = maxMotorImpulse; m_bNormalizedMotorStrength = true; } + + btScalar getFixThresh() { return m_fixThresh; } + void setFixThresh(btScalar fixThresh) { m_fixThresh = fixThresh; } + + // setMotorTarget: + // q: the desired rotation of bodyA wrt bodyB. + // note: if q violates the joint limits, the internal target is clamped to avoid conflicting impulses (very bad for stability) + // note: don't forget to enableMotor() + void setMotorTarget(const btQuaternion &q); + + // same as above, but q is the desired rotation of frameA wrt frameB in constraint space + void setMotorTargetInConstraintSpace(const btQuaternion &q); + + btVector3 GetPointForAngle(btScalar fAngleInRadians, btScalar fLength) const; + + + +protected: + void init(); + + void computeConeLimitInfo(const btQuaternion& qCone, // in + btScalar& swingAngle, btVector3& vSwingAxis, btScalar& swingLimit); // all outs + + void computeTwistLimitInfo(const btQuaternion& qTwist, // in + btScalar& twistAngle, btVector3& vTwistAxis); // all outs + + void adjustSwingAxisToUseEllipseNormal(btVector3& vSwingAxis) const; }; #endif //CONETWISTCONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp index 4d7cd05feb7..012c321fd6d 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp @@ -22,7 +22,7 @@ subject to the following restrictions: #include "LinearMath/btMinMax.h" #include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h" -#define ASSERT2 assert +#define ASSERT2 btAssert #define USE_INTERNAL_APPLY_IMPULSE 1 @@ -52,7 +52,7 @@ void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1, btVector3 vel = vel1 - vel2; - btJacobianEntry jac(body1.getCenterOfMassTransform().getBasis().transpose(), + btJacobianEntry jac(body1.getCenterOfMassTransform().getBasis().transpose(), body2.getCenterOfMassTransform().getBasis().transpose(), rel_pos1,rel_pos2,normal,body1.getInvInertiaDiagLocal(),body1.getInvMass(), body2.getInvInertiaDiagLocal(),body2.getInvMass()); @@ -114,7 +114,7 @@ btScalar resolveSingleCollision( btScalar Kcor = Kerp *Kfps; btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); + btAssert(cpd); btScalar distance = cpd->m_penetration; btScalar positionalError = Kcor *-distance; btScalar velocityError = cpd->m_restitution - rel_vel;// * damping; @@ -166,7 +166,7 @@ btScalar resolveSingleFriction( btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); + btAssert(cpd); btScalar combinedFriction = cpd->m_friction; @@ -255,7 +255,7 @@ btScalar resolveSingleFrictionOriginal( btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); + btAssert(cpd); btScalar combinedFriction = cpd->m_friction; @@ -337,7 +337,7 @@ btScalar resolveSingleCollisionCombined( btScalar Kcor = Kerp *Kfps; btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); + btAssert(cpd); btScalar distance = cpd->m_penetration; btScalar positionalError = Kcor *-distance; btScalar velocityError = cpd->m_restitution - rel_vel;// * damping; @@ -425,5 +425,5 @@ btScalar resolveSingleFrictionEmpty( return btScalar(0.); -}; +} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h index 826e79f78bd..e8871f3860b 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef CONTACT_CONSTRAINT_H #define CONTACT_CONSTRAINT_H -//todo: make into a proper class working with the iterative constraint solver +///@todo: make into a proper class working with the iterative constraint solver class btRigidBody; #include "LinearMath/btVector3.h" diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h index 916d4581f79..a11fc94ea11 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h @@ -21,7 +21,13 @@ enum btSolverMode SOLVER_RANDMIZE_ORDER = 1, SOLVER_FRICTION_SEPARATE = 2, SOLVER_USE_WARMSTARTING = 4, - SOLVER_CACHE_FRIENDLY = 8 + SOLVER_USE_FRICTION_WARMSTARTING = 8, + SOLVER_USE_2_FRICTION_DIRECTIONS = 16, + SOLVER_ENABLE_FRICTION_DIRECTION_CACHING = 32, + SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION = 64, + SOLVER_CACHE_FRIENDLY = 128, + SOLVER_SIMD = 256, //enabled for Windows, the solver innerloop is branchless SIMD, 40% faster than FPU/scalar version + SOLVER_CUDA = 512 //will be open sourced during Game Developers Conference 2009. Much faster. }; struct btContactSolverInfoData @@ -38,12 +44,14 @@ struct btContactSolverInfoData btScalar m_sor; btScalar m_erp;//used as Baumgarte factor btScalar m_erp2;//used in Split Impulse + btScalar m_globalCfm;//constraint force mixing int m_splitImpulse; btScalar m_splitImpulsePenetrationThreshold; btScalar m_linearSlop; btScalar m_warmstartingFactor; int m_solverMode; + int m_restingContactRestitutionThreshold; }; @@ -63,12 +71,14 @@ struct btContactSolverInfo : public btContactSolverInfoData m_numIterations = 10; m_erp = btScalar(0.2); m_erp2 = btScalar(0.1); - m_sor = btScalar(1.3); + m_globalCfm = btScalar(0.); + m_sor = btScalar(1.); m_splitImpulse = false; m_splitImpulsePenetrationThreshold = -0.02f; m_linearSlop = btScalar(0.0); m_warmstartingFactor=btScalar(0.85); - m_solverMode = SOLVER_RANDMIZE_ORDER | SOLVER_CACHE_FRIENDLY | SOLVER_USE_WARMSTARTING; + m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_USE_2_FRICTION_DIRECTIONS |SOLVER_SIMD | SOLVER_RANDMIZE_ORDER; + m_restingContactRestitutionThreshold = 2;//resting contact lifetime threshold to disable restitution } }; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp index 077b326d13a..38e81688f02 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp @@ -19,18 +19,42 @@ email: projectileman@yahoo.com http://gimpact.sf.net */ - #include "btGeneric6DofConstraint.h" #include "BulletDynamics/Dynamics/btRigidBody.h" #include "LinearMath/btTransformUtil.h" +#include "LinearMath/btTransformUtil.h" #include -static const btScalar kSign[] = { btScalar(1.0), btScalar(-1.0), btScalar(1.0) }; -static const int kAxisA[] = { 1, 0, 0 }; -static const int kAxisB[] = { 2, 2, 1 }; + +#define D6_USE_OBSOLETE_METHOD false + + +btGeneric6DofConstraint::btGeneric6DofConstraint() +:btTypedConstraint(D6_CONSTRAINT_TYPE), +m_useLinearReferenceFrameA(true), +m_useSolveConstraintObsolete(D6_USE_OBSOLETE_METHOD) +{ +} + + + +btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA) +: btTypedConstraint(D6_CONSTRAINT_TYPE, rbA, rbB) +, m_frameInA(frameInA) +, m_frameInB(frameInB), +m_useLinearReferenceFrameA(useLinearReferenceFrameA), +m_useSolveConstraintObsolete(D6_USE_OBSOLETE_METHOD) +{ + +} + + + #define GENERIC_D6_DISABLE_WARMSTARTING 1 + + btScalar btGetMatrixElem(const btMatrix3x3& mat, int index); btScalar btGetMatrixElem(const btMatrix3x3& mat, int index) { @@ -39,51 +63,48 @@ btScalar btGetMatrixElem(const btMatrix3x3& mat, int index) return mat[i][j]; } + + ///MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html bool matrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz); bool matrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz) { -// // rot = cy*cz -cy*sz sy -// // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx -// // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy -// + // // rot = cy*cz -cy*sz sy + // // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx + // // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy + // - if (btGetMatrixElem(mat,2) < btScalar(1.0)) + btScalar fi = btGetMatrixElem(mat,2); + if (fi < btScalar(1.0f)) + { + if (fi > btScalar(-1.0f)) { - if (btGetMatrixElem(mat,2) > btScalar(-1.0)) - { - xyz[0] = btAtan2(-btGetMatrixElem(mat,5),btGetMatrixElem(mat,8)); - xyz[1] = btAsin(btGetMatrixElem(mat,2)); - xyz[2] = btAtan2(-btGetMatrixElem(mat,1),btGetMatrixElem(mat,0)); - return true; - } - else - { - // WARNING. Not unique. XA - ZA = -atan2(r10,r11) - xyz[0] = -btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); - xyz[1] = -SIMD_HALF_PI; - xyz[2] = btScalar(0.0); - return false; - } + xyz[0] = btAtan2(-btGetMatrixElem(mat,5),btGetMatrixElem(mat,8)); + xyz[1] = btAsin(btGetMatrixElem(mat,2)); + xyz[2] = btAtan2(-btGetMatrixElem(mat,1),btGetMatrixElem(mat,0)); + return true; } else { - // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) - xyz[0] = btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); - xyz[1] = SIMD_HALF_PI; - xyz[2] = 0.0; - + // WARNING. Not unique. XA - ZA = -atan2(r10,r11) + xyz[0] = -btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); + xyz[1] = -SIMD_HALF_PI; + xyz[2] = btScalar(0.0); + return false; } - - + } + else + { + // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) + xyz[0] = btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); + xyz[1] = SIMD_HALF_PI; + xyz[2] = 0.0; + } return false; } - - //////////////////////////// btRotationalLimitMotor //////////////////////////////////// - int btRotationalLimitMotor::testLimitValue(btScalar test_value) { if(m_loLimit>m_hiLimit) @@ -107,212 +128,239 @@ int btRotationalLimitMotor::testLimitValue(btScalar test_value) m_currentLimit = 0;//Free from violation return 0; - + } -btScalar btRotationalLimitMotor::solveAngularLimits( - btScalar timeStep,btVector3& axis,btScalar jacDiagABInv, - btRigidBody * body0, btRigidBody * body1) -{ - if (needApplyTorques()==false) return 0.0f; - btScalar target_velocity = m_targetVelocity; - btScalar maxMotorForce = m_maxMotorForce; +btScalar btRotationalLimitMotor::solveAngularLimits( + btScalar timeStep,btVector3& axis,btScalar jacDiagABInv, + btRigidBody * body0, btSolverBody& bodyA, btRigidBody * body1, btSolverBody& bodyB) +{ + if (needApplyTorques()==false) return 0.0f; + + btScalar target_velocity = m_targetVelocity; + btScalar maxMotorForce = m_maxMotorForce; //current error correction - if (m_currentLimit!=0) - { - target_velocity = -m_ERP*m_currentLimitError/(timeStep); - maxMotorForce = m_maxLimitForce; - } + if (m_currentLimit!=0) + { + target_velocity = -m_ERP*m_currentLimitError/(timeStep); + maxMotorForce = m_maxLimitForce; + } - maxMotorForce *= timeStep; + maxMotorForce *= timeStep; - // current velocity difference - btVector3 vel_diff = body0->getAngularVelocity(); - if (body1) - { - vel_diff -= body1->getAngularVelocity(); - } + // current velocity difference + + btVector3 angVelA; + bodyA.getAngularVelocity(angVelA); + btVector3 angVelB; + bodyB.getAngularVelocity(angVelB); + + btVector3 vel_diff; + vel_diff = angVelA-angVelB; - btScalar rel_vel = axis.dot(vel_diff); + btScalar rel_vel = axis.dot(vel_diff); // correction velocity - btScalar motor_relvel = m_limitSoftness*(target_velocity - m_damping*rel_vel); + btScalar motor_relvel = m_limitSoftness*(target_velocity - m_damping*rel_vel); - if ( motor_relvel < SIMD_EPSILON && motor_relvel > -SIMD_EPSILON ) - { - return 0.0f;//no need for applying force - } + if ( motor_relvel < SIMD_EPSILON && motor_relvel > -SIMD_EPSILON ) + { + return 0.0f;//no need for applying force + } // correction impulse - btScalar unclippedMotorImpulse = (1+m_bounce)*motor_relvel*jacDiagABInv; + btScalar unclippedMotorImpulse = (1+m_bounce)*motor_relvel*jacDiagABInv; // clip correction impulse - btScalar clippedMotorImpulse; + btScalar clippedMotorImpulse; - //todo: should clip against accumulated impulse - if (unclippedMotorImpulse>0.0f) - { - clippedMotorImpulse = unclippedMotorImpulse > maxMotorForce? maxMotorForce: unclippedMotorImpulse; - } - else - { - clippedMotorImpulse = unclippedMotorImpulse < -maxMotorForce ? -maxMotorForce: unclippedMotorImpulse; - } + ///@todo: should clip against accumulated impulse + if (unclippedMotorImpulse>0.0f) + { + clippedMotorImpulse = unclippedMotorImpulse > maxMotorForce? maxMotorForce: unclippedMotorImpulse; + } + else + { + clippedMotorImpulse = unclippedMotorImpulse < -maxMotorForce ? -maxMotorForce: unclippedMotorImpulse; + } // sort with accumulated impulses - btScalar lo = btScalar(-1e30); - btScalar hi = btScalar(1e30); + btScalar lo = btScalar(-BT_LARGE_FLOAT); + btScalar hi = btScalar(BT_LARGE_FLOAT); - btScalar oldaccumImpulse = m_accumulatedImpulse; - btScalar sum = oldaccumImpulse + clippedMotorImpulse; - m_accumulatedImpulse = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; + btScalar oldaccumImpulse = m_accumulatedImpulse; + btScalar sum = oldaccumImpulse + clippedMotorImpulse; + m_accumulatedImpulse = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; - clippedMotorImpulse = m_accumulatedImpulse - oldaccumImpulse; + clippedMotorImpulse = m_accumulatedImpulse - oldaccumImpulse; + + btVector3 motorImp = clippedMotorImpulse * axis; + + //body0->applyTorqueImpulse(motorImp); + //body1->applyTorqueImpulse(-motorImp); + + bodyA.applyImpulse(btVector3(0,0,0), body0->getInvInertiaTensorWorld()*axis,clippedMotorImpulse); + bodyB.applyImpulse(btVector3(0,0,0), body1->getInvInertiaTensorWorld()*axis,-clippedMotorImpulse); - - btVector3 motorImp = clippedMotorImpulse * axis; - - - body0->applyTorqueImpulse(motorImp); - if (body1) body1->applyTorqueImpulse(-motorImp); - - return clippedMotorImpulse; + return clippedMotorImpulse; } //////////////////////////// End btRotationalLimitMotor //////////////////////////////////// + + + //////////////////////////// btTranslationalLimitMotor //////////////////////////////////// + + +int btTranslationalLimitMotor::testLimitValue(int limitIndex, btScalar test_value) +{ + btScalar loLimit = m_lowerLimit[limitIndex]; + btScalar hiLimit = m_upperLimit[limitIndex]; + if(loLimit > hiLimit) + { + m_currentLimit[limitIndex] = 0;//Free from violation + m_currentLimitError[limitIndex] = btScalar(0.f); + return 0; + } + + if (test_value < loLimit) + { + m_currentLimit[limitIndex] = 2;//low limit violation + m_currentLimitError[limitIndex] = test_value - loLimit; + return 2; + } + else if (test_value> hiLimit) + { + m_currentLimit[limitIndex] = 1;//High limit violation + m_currentLimitError[limitIndex] = test_value - hiLimit; + return 1; + }; + + m_currentLimit[limitIndex] = 0;//Free from violation + m_currentLimitError[limitIndex] = btScalar(0.f); + return 0; +} + + + btScalar btTranslationalLimitMotor::solveLinearAxis( - btScalar timeStep, - btScalar jacDiagABInv, - btRigidBody& body1,const btVector3 &pointInA, - btRigidBody& body2,const btVector3 &pointInB, - int limit_index, - const btVector3 & axis_normal_on_a, - const btVector3 & anchorPos) + btScalar timeStep, + btScalar jacDiagABInv, + btRigidBody& body1,btSolverBody& bodyA,const btVector3 &pointInA, + btRigidBody& body2,btSolverBody& bodyB,const btVector3 &pointInB, + int limit_index, + const btVector3 & axis_normal_on_a, + const btVector3 & anchorPos) { -///find relative velocity -// btVector3 rel_pos1 = pointInA - body1.getCenterOfMassPosition(); -// btVector3 rel_pos2 = pointInB - body2.getCenterOfMassPosition(); - btVector3 rel_pos1 = anchorPos - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = anchorPos - body2.getCenterOfMassPosition(); + ///find relative velocity + // btVector3 rel_pos1 = pointInA - body1.getCenterOfMassPosition(); + // btVector3 rel_pos2 = pointInB - body2.getCenterOfMassPosition(); + btVector3 rel_pos1 = anchorPos - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = anchorPos - body2.getCenterOfMassPosition(); - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; + btVector3 vel1; + bodyA.getVelocityInLocalPointObsolete(rel_pos1,vel1); + btVector3 vel2; + bodyB.getVelocityInLocalPointObsolete(rel_pos2,vel2); + btVector3 vel = vel1 - vel2; - btScalar rel_vel = axis_normal_on_a.dot(vel); + btScalar rel_vel = axis_normal_on_a.dot(vel); -/// apply displacement correction + /// apply displacement correction -//positional error (zeroth order error) - btScalar depth = -(pointInA - pointInB).dot(axis_normal_on_a); - btScalar lo = btScalar(-1e30); - btScalar hi = btScalar(1e30); + //positional error (zeroth order error) + btScalar depth = -(pointInA - pointInB).dot(axis_normal_on_a); + btScalar lo = btScalar(-BT_LARGE_FLOAT); + btScalar hi = btScalar(BT_LARGE_FLOAT); - btScalar minLimit = m_lowerLimit[limit_index]; - btScalar maxLimit = m_upperLimit[limit_index]; + btScalar minLimit = m_lowerLimit[limit_index]; + btScalar maxLimit = m_upperLimit[limit_index]; - //handle the limits - if (minLimit < maxLimit) - { - { - if (depth > maxLimit) - { - depth -= maxLimit; - lo = btScalar(0.); + //handle the limits + if (minLimit < maxLimit) + { + { + if (depth > maxLimit) + { + depth -= maxLimit; + lo = btScalar(0.); - } - else - { - if (depth < minLimit) - { - depth -= minLimit; - hi = btScalar(0.); - } - else - { - return 0.0f; - } - } - } - } + } + else + { + if (depth < minLimit) + { + depth -= minLimit; + hi = btScalar(0.); + } + else + { + return 0.0f; + } + } + } + } - btScalar normalImpulse= m_limitSoftness*(m_restitution*depth/timeStep - m_damping*rel_vel) * jacDiagABInv; + btScalar normalImpulse= m_limitSoftness*(m_restitution*depth/timeStep - m_damping*rel_vel) * jacDiagABInv; - btScalar oldNormalImpulse = m_accumulatedImpulse[limit_index]; - btScalar sum = oldNormalImpulse + normalImpulse; - m_accumulatedImpulse[limit_index] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; - normalImpulse = m_accumulatedImpulse[limit_index] - oldNormalImpulse; + btScalar oldNormalImpulse = m_accumulatedImpulse[limit_index]; + btScalar sum = oldNormalImpulse + normalImpulse; + m_accumulatedImpulse[limit_index] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; + normalImpulse = m_accumulatedImpulse[limit_index] - oldNormalImpulse; - btVector3 impulse_vector = axis_normal_on_a * normalImpulse; - body1.applyImpulse( impulse_vector, rel_pos1); - body2.applyImpulse(-impulse_vector, rel_pos2); - return normalImpulse; + btVector3 impulse_vector = axis_normal_on_a * normalImpulse; + //body1.applyImpulse( impulse_vector, rel_pos1); + //body2.applyImpulse(-impulse_vector, rel_pos2); + + btVector3 ftorqueAxis1 = rel_pos1.cross(axis_normal_on_a); + btVector3 ftorqueAxis2 = rel_pos2.cross(axis_normal_on_a); + bodyA.applyImpulse(axis_normal_on_a*body1.getInvMass(), body1.getInvInertiaTensorWorld()*ftorqueAxis1,normalImpulse); + bodyB.applyImpulse(axis_normal_on_a*body2.getInvMass(), body2.getInvInertiaTensorWorld()*ftorqueAxis2,-normalImpulse); + + + + + return normalImpulse; } //////////////////////////// btTranslationalLimitMotor //////////////////////////////////// - -btGeneric6DofConstraint::btGeneric6DofConstraint() - :btTypedConstraint(D6_CONSTRAINT_TYPE), - m_useLinearReferenceFrameA(true) -{ -} - -btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA) - : btTypedConstraint(D6_CONSTRAINT_TYPE, rbA, rbB) - , m_frameInA(frameInA) - , m_frameInB(frameInB), - m_useLinearReferenceFrameA(useLinearReferenceFrameA) -{ - -} - - - - - void btGeneric6DofConstraint::calculateAngleInfo() { btMatrix3x3 relative_frame = m_calculatedTransformA.getBasis().inverse()*m_calculatedTransformB.getBasis(); - matrixToEulerXYZ(relative_frame,m_calculatedAxisAngleDiff); - - - // in euler angle mode we do not actually constrain the angular velocity - // along the axes axis[0] and axis[2] (although we do use axis[1]) : - // - // to get constrain w2-w1 along ...not - // ------ --------------------- ------ - // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0] - // d(angle[1])/dt = 0 ax[1] - // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2] - // - // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0. - // to prove the result for angle[0], write the expression for angle[0] from - // GetInfo1 then take the derivative. to prove this for angle[2] it is - // easier to take the euler rate expression for d(angle[2])/dt with respect - // to the components of w and set that to 0. - + // along the axes axis[0] and axis[2] (although we do use axis[1]) : + // + // to get constrain w2-w1 along ...not + // ------ --------------------- ------ + // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0] + // d(angle[1])/dt = 0 ax[1] + // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2] + // + // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0. + // to prove the result for angle[0], write the expression for angle[0] from + // GetInfo1 then take the derivative. to prove this for angle[2] it is + // easier to take the euler rate expression for d(angle[2])/dt with respect + // to the components of w and set that to 0. btVector3 axis0 = m_calculatedTransformB.getBasis().getColumn(0); btVector3 axis2 = m_calculatedTransformA.getBasis().getColumn(2); @@ -320,34 +368,29 @@ void btGeneric6DofConstraint::calculateAngleInfo() m_calculatedAxis[0] = m_calculatedAxis[1].cross(axis2); m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]); - -// if(m_debugDrawer) -// { -// -// char buff[300]; -// sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ", -// m_calculatedAxisAngleDiff[0], -// m_calculatedAxisAngleDiff[1], -// m_calculatedAxisAngleDiff[2]); -// m_debugDrawer->reportErrorWarning(buff); -// } + m_calculatedAxis[0].normalize(); + m_calculatedAxis[1].normalize(); + m_calculatedAxis[2].normalize(); } + + void btGeneric6DofConstraint::calculateTransforms() { - m_calculatedTransformA = m_rbA.getCenterOfMassTransform() * m_frameInA; - m_calculatedTransformB = m_rbB.getCenterOfMassTransform() * m_frameInB; - - calculateAngleInfo(); + m_calculatedTransformA = m_rbA.getCenterOfMassTransform() * m_frameInA; + m_calculatedTransformB = m_rbB.getCenterOfMassTransform() * m_frameInB; + calculateLinearInfo(); + calculateAngleInfo(); } + void btGeneric6DofConstraint::buildLinearJacobian( - btJacobianEntry & jacLinear,const btVector3 & normalWorld, - const btVector3 & pivotAInW,const btVector3 & pivotBInW) + btJacobianEntry & jacLinear,const btVector3 & normalWorld, + const btVector3 & pivotAInW,const btVector3 & pivotBInW) { - new (&jacLinear) btJacobianEntry( + new (&jacLinear) btJacobianEntry( m_rbA.getCenterOfMassTransform().getBasis().transpose(), m_rbB.getCenterOfMassTransform().getBasis().transpose(), pivotAInW - m_rbA.getCenterOfMassPosition(), @@ -357,13 +400,14 @@ void btGeneric6DofConstraint::buildLinearJacobian( m_rbA.getInvMass(), m_rbB.getInvInertiaDiagLocal(), m_rbB.getInvMass()); - } + + void btGeneric6DofConstraint::buildAngularJacobian( - btJacobianEntry & jacAngular,const btVector3 & jointAxisW) + btJacobianEntry & jacAngular,const btVector3 & jointAxisW) { - new (&jacAngular) btJacobianEntry(jointAxisW, + new (&jacAngular) btJacobianEntry(jointAxisW, m_rbA.getCenterOfMassTransform().getBasis().transpose(), m_rbB.getCenterOfMassTransform().getBasis().transpose(), m_rbA.getInvInertiaDiagLocal(), @@ -371,142 +415,267 @@ void btGeneric6DofConstraint::buildAngularJacobian( } + + bool btGeneric6DofConstraint::testAngularLimitMotor(int axis_index) { - btScalar angle = m_calculatedAxisAngleDiff[axis_index]; - - //test limits - m_angularLimits[axis_index].testLimitValue(angle); - return m_angularLimits[axis_index].needApplyTorques(); + btScalar angle = m_calculatedAxisAngleDiff[axis_index]; + m_angularLimits[axis_index].m_currentPosition = angle; + //test limits + m_angularLimits[axis_index].testLimitValue(angle); + return m_angularLimits[axis_index].needApplyTorques(); } + + void btGeneric6DofConstraint::buildJacobian() { + if (m_useSolveConstraintObsolete) + { - // Clear accumulated impulses for the next simulation step - m_linearLimits.m_accumulatedImpulse.setValue(btScalar(0.), btScalar(0.), btScalar(0.)); - int i; - for(i = 0; i < 3; i++) - { - m_angularLimits[i].m_accumulatedImpulse = btScalar(0.); - } - //calculates transform - calculateTransforms(); + // Clear accumulated impulses for the next simulation step + m_linearLimits.m_accumulatedImpulse.setValue(btScalar(0.), btScalar(0.), btScalar(0.)); + int i; + for(i = 0; i < 3; i++) + { + m_angularLimits[i].m_accumulatedImpulse = btScalar(0.); + } + //calculates transform + calculateTransforms(); -// const btVector3& pivotAInW = m_calculatedTransformA.getOrigin(); -// const btVector3& pivotBInW = m_calculatedTransformB.getOrigin(); - calcAnchorPos(); - btVector3 pivotAInW = m_AnchorPos; - btVector3 pivotBInW = m_AnchorPos; + // const btVector3& pivotAInW = m_calculatedTransformA.getOrigin(); + // const btVector3& pivotBInW = m_calculatedTransformB.getOrigin(); + calcAnchorPos(); + btVector3 pivotAInW = m_AnchorPos; + btVector3 pivotBInW = m_AnchorPos; -// not used here -// btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); -// btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + // not used here + // btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + // btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - btVector3 normalWorld; - //linear part - for (i=0;i<3;i++) - { - if (m_linearLimits.isLimited(i)) - { - if (m_useLinearReferenceFrameA) - normalWorld = m_calculatedTransformA.getBasis().getColumn(i); - else - normalWorld = m_calculatedTransformB.getBasis().getColumn(i); + btVector3 normalWorld; + //linear part + for (i=0;i<3;i++) + { + if (m_linearLimits.isLimited(i)) + { + if (m_useLinearReferenceFrameA) + normalWorld = m_calculatedTransformA.getBasis().getColumn(i); + else + normalWorld = m_calculatedTransformB.getBasis().getColumn(i); - buildLinearJacobian( - m_jacLinear[i],normalWorld , - pivotAInW,pivotBInW); + buildLinearJacobian( + m_jacLinear[i],normalWorld , + pivotAInW,pivotBInW); - } - } - - // angular part - for (i=0;i<3;i++) - { - //calculates error angle - if (testAngularLimitMotor(i)) - { - normalWorld = this->getAxis(i); - // Create angular atom - buildAngularJacobian(m_jacAng[i],normalWorld); - } - } + } + } + // angular part + for (i=0;i<3;i++) + { + //calculates error angle + if (testAngularLimitMotor(i)) + { + normalWorld = this->getAxis(i); + // Create angular atom + buildAngularJacobian(m_jacAng[i],normalWorld); + } + } + } } -void btGeneric6DofConstraint::solveConstraint(btScalar timeStep) + +void btGeneric6DofConstraint::getInfo1 (btConstraintInfo1* info) { - m_timeStep = timeStep; - - //calculateTransforms(); - - int i; - - // linear - - btVector3 pointInA = m_calculatedTransformA.getOrigin(); - btVector3 pointInB = m_calculatedTransformB.getOrigin(); - - btScalar jacDiagABInv; - btVector3 linear_axis; - for (i=0;i<3;i++) - { - if (m_linearLimits.isLimited(i)) - { - jacDiagABInv = btScalar(1.) / m_jacLinear[i].getDiagonal(); - - if (m_useLinearReferenceFrameA) - linear_axis = m_calculatedTransformA.getBasis().getColumn(i); - else - linear_axis = m_calculatedTransformB.getBasis().getColumn(i); - - m_linearLimits.solveLinearAxis( - m_timeStep, - jacDiagABInv, - m_rbA,pointInA, - m_rbB,pointInB, - i,linear_axis, m_AnchorPos); - - } - } - - // angular - btVector3 angular_axis; - btScalar angularJacDiagABInv; - for (i=0;i<3;i++) - { - if (m_angularLimits[i].needApplyTorques()) - { - - // get axis - angular_axis = getAxis(i); - - angularJacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal(); - - m_angularLimits[i].solveAngularLimits(m_timeStep,angular_axis,angularJacDiagABInv, &m_rbA,&m_rbB); - } - } + if (m_useSolveConstraintObsolete) + { + info->m_numConstraintRows = 0; + info->nub = 0; + } else + { + //prepare constraint + calculateTransforms(); + info->m_numConstraintRows = 0; + info->nub = 6; + int i; + //test linear limits + for(i = 0; i < 3; i++) + { + if(m_linearLimits.needApplyForce(i)) + { + info->m_numConstraintRows++; + info->nub--; + } + } + //test angular limits + for (i=0;i<3 ;i++ ) + { + if(testAngularLimitMotor(i)) + { + info->m_numConstraintRows++; + info->nub--; + } + } + } } + + +void btGeneric6DofConstraint::getInfo2 (btConstraintInfo2* info) +{ + btAssert(!m_useSolveConstraintObsolete); + int row = setLinearLimits(info); + setAngularLimits(info, row); +} + + + +int btGeneric6DofConstraint::setLinearLimits(btConstraintInfo2* info) +{ + btGeneric6DofConstraint * d6constraint = this; + int row = 0; + //solve linear limits + btRotationalLimitMotor limot; + for (int i=0;i<3 ;i++ ) + { + if(m_linearLimits.needApplyForce(i)) + { // re-use rotational motor code + limot.m_bounce = btScalar(0.f); + limot.m_currentLimit = m_linearLimits.m_currentLimit[i]; + limot.m_currentPosition = m_linearLimits.m_currentLinearDiff[i]; + limot.m_currentLimitError = m_linearLimits.m_currentLimitError[i]; + limot.m_damping = m_linearLimits.m_damping; + limot.m_enableMotor = m_linearLimits.m_enableMotor[i]; + limot.m_ERP = m_linearLimits.m_restitution; + limot.m_hiLimit = m_linearLimits.m_upperLimit[i]; + limot.m_limitSoftness = m_linearLimits.m_limitSoftness; + limot.m_loLimit = m_linearLimits.m_lowerLimit[i]; + limot.m_maxLimitForce = btScalar(0.f); + limot.m_maxMotorForce = m_linearLimits.m_maxMotorForce[i]; + limot.m_targetVelocity = m_linearLimits.m_targetVelocity[i]; + btVector3 axis = m_calculatedTransformA.getBasis().getColumn(i); + row += get_limit_motor_info2(&limot, &m_rbA, &m_rbB, info, row, axis, 0); + } + } + return row; +} + + + +int btGeneric6DofConstraint::setAngularLimits(btConstraintInfo2 *info, int row_offset) +{ + btGeneric6DofConstraint * d6constraint = this; + int row = row_offset; + //solve angular limits + for (int i=0;i<3 ;i++ ) + { + if(d6constraint->getRotationalLimitMotor(i)->needApplyTorques()) + { + btVector3 axis = d6constraint->getAxis(i); + row += get_limit_motor_info2( + d6constraint->getRotationalLimitMotor(i), + &m_rbA, + &m_rbB, + info,row,axis,1); + } + } + + return row; +} + + + +void btGeneric6DofConstraint::solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep) +{ + if (m_useSolveConstraintObsolete) + { + + + m_timeStep = timeStep; + + //calculateTransforms(); + + int i; + + // linear + + btVector3 pointInA = m_calculatedTransformA.getOrigin(); + btVector3 pointInB = m_calculatedTransformB.getOrigin(); + + btScalar jacDiagABInv; + btVector3 linear_axis; + for (i=0;i<3;i++) + { + if (m_linearLimits.isLimited(i)) + { + jacDiagABInv = btScalar(1.) / m_jacLinear[i].getDiagonal(); + + if (m_useLinearReferenceFrameA) + linear_axis = m_calculatedTransformA.getBasis().getColumn(i); + else + linear_axis = m_calculatedTransformB.getBasis().getColumn(i); + + m_linearLimits.solveLinearAxis( + m_timeStep, + jacDiagABInv, + m_rbA,bodyA,pointInA, + m_rbB,bodyB,pointInB, + i,linear_axis, m_AnchorPos); + + } + } + + // angular + btVector3 angular_axis; + btScalar angularJacDiagABInv; + for (i=0;i<3;i++) + { + if (m_angularLimits[i].needApplyTorques()) + { + + // get axis + angular_axis = getAxis(i); + + angularJacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal(); + + m_angularLimits[i].solveAngularLimits(m_timeStep,angular_axis,angularJacDiagABInv, &m_rbA,bodyA,&m_rbB,bodyB); + } + } + } +} + + + void btGeneric6DofConstraint::updateRHS(btScalar timeStep) { - (void)timeStep; + (void)timeStep; } + + btVector3 btGeneric6DofConstraint::getAxis(int axis_index) const { - return m_calculatedAxis[axis_index]; + return m_calculatedAxis[axis_index]; } -btScalar btGeneric6DofConstraint::getAngle(int axis_index) const + +btScalar btGeneric6DofConstraint::getRelativePivotPosition(int axisIndex) const { - return m_calculatedAxisAngleDiff[axis_index]; + return m_calculatedLinearDiff[axisIndex]; } + +btScalar btGeneric6DofConstraint::getAngle(int axisIndex) const +{ + return m_calculatedAxisAngleDiff[axisIndex]; +} + + + void btGeneric6DofConstraint::calcAnchorPos(void) { btScalar imA = m_rbA.getInvMass(); @@ -524,5 +693,279 @@ void btGeneric6DofConstraint::calcAnchorPos(void) const btVector3& pB = m_calculatedTransformB.getOrigin(); m_AnchorPos = pA * weight + pB * (btScalar(1.0) - weight); return; -} // btGeneric6DofConstraint::calcAnchorPos() +} + + + +void btGeneric6DofConstraint::calculateLinearInfo() +{ + m_calculatedLinearDiff = m_calculatedTransformB.getOrigin() - m_calculatedTransformA.getOrigin(); + m_calculatedLinearDiff = m_calculatedTransformA.getBasis().inverse() * m_calculatedLinearDiff; + for(int i = 0; i < 3; i++) + { + m_linearLimits.m_currentLinearDiff[i] = m_calculatedLinearDiff[i]; + m_linearLimits.testLimitValue(i, m_calculatedLinearDiff[i]); + } +} + + + +int btGeneric6DofConstraint::get_limit_motor_info2( + btRotationalLimitMotor * limot, + btRigidBody * body0, btRigidBody * body1, + btConstraintInfo2 *info, int row, btVector3& ax1, int rotational) +{ + int srow = row * info->rowskip; + int powered = limot->m_enableMotor; + int limit = limot->m_currentLimit; + if (powered || limit) + { // if the joint is powered, or has joint limits, add in the extra row + btScalar *J1 = rotational ? info->m_J1angularAxis : info->m_J1linearAxis; + btScalar *J2 = rotational ? info->m_J2angularAxis : 0; + J1[srow+0] = ax1[0]; + J1[srow+1] = ax1[1]; + J1[srow+2] = ax1[2]; + if(rotational) + { + J2[srow+0] = -ax1[0]; + J2[srow+1] = -ax1[1]; + J2[srow+2] = -ax1[2]; + } + if((!rotational)) + { + btVector3 ltd; // Linear Torque Decoupling vector + btVector3 c = m_calculatedTransformB.getOrigin() - body0->getCenterOfMassPosition(); + ltd = c.cross(ax1); + info->m_J1angularAxis[srow+0] = ltd[0]; + info->m_J1angularAxis[srow+1] = ltd[1]; + info->m_J1angularAxis[srow+2] = ltd[2]; + + c = m_calculatedTransformB.getOrigin() - body1->getCenterOfMassPosition(); + ltd = -c.cross(ax1); + info->m_J2angularAxis[srow+0] = ltd[0]; + info->m_J2angularAxis[srow+1] = ltd[1]; + info->m_J2angularAxis[srow+2] = ltd[2]; + } + // if we're limited low and high simultaneously, the joint motor is + // ineffective + if (limit && (limot->m_loLimit == limot->m_hiLimit)) powered = 0; + info->m_constraintError[srow] = btScalar(0.f); + if (powered) + { + info->cfm[srow] = 0.0f; + if(!limit) + { + btScalar tag_vel = rotational ? limot->m_targetVelocity : -limot->m_targetVelocity; + + btScalar mot_fact = getMotorFactor( limot->m_currentPosition, + limot->m_loLimit, + limot->m_hiLimit, + tag_vel, + info->fps * info->erp); + info->m_constraintError[srow] += mot_fact * limot->m_targetVelocity; + info->m_lowerLimit[srow] = -limot->m_maxMotorForce; + info->m_upperLimit[srow] = limot->m_maxMotorForce; + } + } + if(limit) + { + btScalar k = info->fps * limot->m_ERP; + if(!rotational) + { + info->m_constraintError[srow] += k * limot->m_currentLimitError; + } + else + { + info->m_constraintError[srow] += -k * limot->m_currentLimitError; + } + info->cfm[srow] = 0.0f; + if (limot->m_loLimit == limot->m_hiLimit) + { // limited low and high simultaneously + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else + { + if (limit == 1) + { + info->m_lowerLimit[srow] = 0; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else + { + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = 0; + } + // deal with bounce + if (limot->m_bounce > 0) + { + // calculate joint velocity + btScalar vel; + if (rotational) + { + vel = body0->getAngularVelocity().dot(ax1); + if (body1) + vel -= body1->getAngularVelocity().dot(ax1); + } + else + { + vel = body0->getLinearVelocity().dot(ax1); + if (body1) + vel -= body1->getLinearVelocity().dot(ax1); + } + // only apply bounce if the velocity is incoming, and if the + // resulting c[] exceeds what we already have. + if (limit == 1) + { + if (vel < 0) + { + btScalar newc = -limot->m_bounce* vel; + if (newc > info->m_constraintError[srow]) + info->m_constraintError[srow] = newc; + } + } + else + { + if (vel > 0) + { + btScalar newc = -limot->m_bounce * vel; + if (newc < info->m_constraintError[srow]) + info->m_constraintError[srow] = newc; + } + } + } + } + } + return 1; + } + else return 0; +} + + + + +btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA) + : btGeneric6DofConstraint(rbA, rbB, frameInA, frameInB, useLinearReferenceFrameA) +{ + for(int i = 0; i < 6; i++) + { + m_springEnabled[i] = false; + m_equilibriumPoint[i] = btScalar(0.f); + m_springStiffness[i] = btScalar(0.f); + m_springDamping[i] = btScalar(1.f); + } +} + + +void btGeneric6DofSpringConstraint::enableSpring(int index, bool onOff) +{ + btAssert((index >= 0) && (index < 6)); + m_springEnabled[index] = onOff; + if(index < 3) + { + m_linearLimits.m_enableMotor[index] = onOff; + } + else + { + m_angularLimits[index - 3].m_enableMotor = onOff; + } +} + + + +void btGeneric6DofSpringConstraint::setStiffness(int index, btScalar stiffness) +{ + btAssert((index >= 0) && (index < 6)); + m_springStiffness[index] = stiffness; +} + + +void btGeneric6DofSpringConstraint::setDamping(int index, btScalar damping) +{ + btAssert((index >= 0) && (index < 6)); + m_springDamping[index] = damping; +} + + +void btGeneric6DofSpringConstraint::setEquilibriumPoint() +{ + calculateTransforms(); + for(int i = 0; i < 3; i++) + { + m_equilibriumPoint[i] = m_calculatedLinearDiff[i]; + } + for(int i = 0; i < 3; i++) + { + m_equilibriumPoint[i + 3] = m_calculatedAxisAngleDiff[i]; + } +} + + + +void btGeneric6DofSpringConstraint::setEquilibriumPoint(int index) +{ + btAssert((index >= 0) && (index < 6)); + calculateTransforms(); + if(index < 3) + { + m_equilibriumPoint[index] = m_calculatedLinearDiff[index]; + } + else + { + m_equilibriumPoint[index + 3] = m_calculatedAxisAngleDiff[index]; + } +} + + + +void btGeneric6DofSpringConstraint::internalUpdateSprings(btConstraintInfo2* info) +{ + calculateTransforms(); + // it is assumed that calculateTransforms() have been called before this call + int i; + btVector3 relVel = m_rbB.getLinearVelocity() - m_rbA.getLinearVelocity(); + for(i = 0; i < 3; i++) + { + if(m_springEnabled[i]) + { + // get current position of constraint + btScalar currPos = m_calculatedLinearDiff[i]; + // calculate difference + btScalar delta = currPos - m_equilibriumPoint[i]; + // spring force is (delta * m_stiffness) according to Hooke's Law + btScalar force = delta * m_springStiffness[i]; + btScalar velFactor = info->fps * m_springDamping[i]; + m_linearLimits.m_targetVelocity[i] = velFactor * force; + m_linearLimits.m_maxMotorForce[i] = btFabs(force) / info->fps; + } + } + for(i = 0; i < 3; i++) + { + if(m_springEnabled[i + 3]) + { + // get current position of constraint + btScalar currPos = m_calculatedAxisAngleDiff[i]; + // calculate difference + btScalar delta = currPos - m_equilibriumPoint[i+3]; + // spring force is (-delta * m_stiffness) according to Hooke's Law + btScalar force = -delta * m_springStiffness[i+3]; + btScalar velFactor = info->fps * m_springDamping[i+3]; + m_angularLimits[i].m_targetVelocity = velFactor * force; + m_angularLimits[i].m_maxMotorForce = btFabs(force) / info->fps; + } + } +} + + +void btGeneric6DofSpringConstraint::getInfo2(btConstraintInfo2* info) +{ + // this will be called by constraint solver at the constraint setup stage + // set current motor parameters + internalUpdateSprings(info); + // do the rest of job for constraint setup + btGeneric6DofConstraint::getInfo2(info); +} + + + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h index f0718d2d4a0..8082eb1f132 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h @@ -30,6 +30,8 @@ http://gimpact.sf.net class btRigidBody; + + //! Rotation Limit structure for generic joints class btRotationalLimitMotor { @@ -52,6 +54,7 @@ public: //! temp_variables //!@{ btScalar m_currentLimitError;//! How much is violated this limit + btScalar m_currentPosition; //! current value of angle int m_currentLimit;//!< 0=free, 1=at lo limit, 2=at hi limit btScalar m_accumulatedImpulse; //!@} @@ -92,7 +95,7 @@ public: //! Is limited bool isLimited() { - if(m_loLimit>=m_hiLimit) return false; + if(m_loLimit > m_hiLimit) return false; return true; } @@ -110,8 +113,7 @@ public: int testLimitValue(btScalar test_value); //! apply the correction impulses for two bodies - btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btRigidBody * body1); - + btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btSolverBody& bodyA,btRigidBody * body1,btSolverBody& bodyB); }; @@ -129,6 +131,12 @@ public: btScalar m_damping;//!< Damping for linear limit btScalar m_restitution;//! Bounce parameter for linear limit //!@} + bool m_enableMotor[3]; + btVector3 m_targetVelocity;//!< target motor velocity + btVector3 m_maxMotorForce;//!< max force on motor + btVector3 m_currentLimitError;//! How much is violated this limit + btVector3 m_currentLinearDiff;//! Current relative offset of constraint frames + int m_currentLimit[3];//!< 0=free, 1=at lower limit, 2=at upper limit btTranslationalLimitMotor() { @@ -139,6 +147,12 @@ public: m_limitSoftness = 0.7f; m_damping = btScalar(1.0f); m_restitution = btScalar(0.5f); + for(int i=0; i < 3; i++) + { + m_enableMotor[i] = false; + m_targetVelocity[i] = btScalar(0.f); + m_maxMotorForce[i] = btScalar(0.f); + } } btTranslationalLimitMotor(const btTranslationalLimitMotor & other ) @@ -150,6 +164,12 @@ public: m_limitSoftness = other.m_limitSoftness ; m_damping = other.m_damping; m_restitution = other.m_restitution; + for(int i=0; i < 3; i++) + { + m_enableMotor[i] = other.m_enableMotor[i]; + m_targetVelocity[i] = other.m_targetVelocity[i]; + m_maxMotorForce[i] = other.m_maxMotorForce[i]; + } } //! Test limit @@ -163,13 +183,19 @@ public: { return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]); } + inline bool needApplyForce(int limitIndex) + { + if(m_currentLimit[limitIndex] == 0 && m_enableMotor[limitIndex] == false) return false; + return true; + } + int testLimitValue(int limitIndex, btScalar test_value); btScalar solveLinearAxis( btScalar timeStep, btScalar jacDiagABInv, - btRigidBody& body1,const btVector3 &pointInA, - btRigidBody& body2,const btVector3 &pointInB, + btRigidBody& body1,btSolverBody& bodyA,const btVector3 &pointInA, + btRigidBody& body2,btSolverBody& bodyB,const btVector3 &pointInB, int limit_index, const btVector3 & axis_normal_on_a, const btVector3 & anchorPos); @@ -247,6 +273,7 @@ protected: btTransform m_calculatedTransformB; btVector3 m_calculatedAxisAngleDiff; btVector3 m_calculatedAxis[3]; + btVector3 m_calculatedLinearDiff; btVector3 m_AnchorPos; // point betwen pivots of bodies A and B to solve linear axes @@ -262,6 +289,9 @@ protected: } + int setAngularLimits(btConstraintInfo2 *info, int row_offset); + + int setLinearLimits(btConstraintInfo2 *info); void buildLinearJacobian( btJacobianEntry & jacLinear,const btVector3 & normalWorld, @@ -269,6 +299,8 @@ protected: void buildAngularJacobian(btJacobianEntry & jacAngular,const btVector3 & jointAxisW); + // tests linear limits + void calculateLinearInfo(); //! calcs the euler angles between the two bodies. void calculateAngleInfo(); @@ -276,6 +308,10 @@ protected: public: + + ///for backwards compatibility during the transition to 'getInfo/getInfo2' + bool m_useSolveConstraintObsolete; + btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA); btGeneric6DofConstraint(); @@ -330,7 +366,11 @@ public: //! performs Jacobian calculation, and also calculates angle differences and axis virtual void buildJacobian(); - virtual void solveConstraint(btScalar timeStep); + virtual void getInfo1 (btConstraintInfo1* info); + + virtual void getInfo2 (btConstraintInfo2* info); + + virtual void solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep); void updateRHS(btScalar timeStep); @@ -342,14 +382,21 @@ public: //! Get the relative Euler angle /*! - \pre btGeneric6DofConstraint.buildJacobian must be called previously. + \pre btGeneric6DofConstraint::calculateTransforms() must be called previously. */ btScalar getAngle(int axis_index) const; + //! Get the relative position of the constraint pivot + /*! + \pre btGeneric6DofConstraint::calculateTransforms() must be called previously. + */ + btScalar getRelativePivotPosition(int axis_index) const; + + //! Test angular limit. /*! Calculates angular correction and returns true if limit needs to be corrected. - \pre btGeneric6DofConstraint.buildJacobian must be called previously. + \pre btGeneric6DofConstraint::calculateTransforms() must be called previously. */ bool testAngularLimitMotor(int axis_index); @@ -432,6 +479,41 @@ public: virtual void calcAnchorPos(void); // overridable + int get_limit_motor_info2( btRotationalLimitMotor * limot, + btRigidBody * body0, btRigidBody * body1, + btConstraintInfo2 *info, int row, btVector3& ax1, int rotational); + + }; + +/// Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF + +/// DOF index used in enableSpring() and setStiffness() means: +/// 0 : translation X +/// 1 : translation Y +/// 2 : translation Z +/// 3 : rotation X (3rd Euler rotational around new position of X axis, range [-PI+epsilon, PI-epsilon] ) +/// 4 : rotation Y (2nd Euler rotational around new position of Y axis, range [-PI/2+epsilon, PI/2-epsilon] ) +/// 5 : rotation Z (1st Euler rotational around Z axis, range [-PI+epsilon, PI-epsilon] ) + +class btGeneric6DofSpringConstraint : public btGeneric6DofConstraint +{ +protected: + bool m_springEnabled[6]; + btScalar m_equilibriumPoint[6]; + btScalar m_springStiffness[6]; + btScalar m_springDamping[6]; // between 0 and 1 (1 == no damping) + void internalUpdateSprings(btConstraintInfo2* info); +public: + btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA); + void enableSpring(int index, bool onOff); + void setStiffness(int index, btScalar stiffness); + void setDamping(int index, btScalar damping); + void setEquilibriumPoint(); // set the current constraint position/orientation as an equilibrium point for all DOF + void setEquilibriumPoint(int index); // set the current constraint position/orientation as an equilibrium point for given DOF + virtual void getInfo2 (btConstraintInfo2* info); +}; + + #endif //GENERIC_6DOF_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp index a0523a8c76b..b6b34305804 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp @@ -19,19 +19,33 @@ subject to the following restrictions: #include "LinearMath/btTransformUtil.h" #include "LinearMath/btMinMax.h" #include +#include "btSolverBody.h" + +//----------------------------------------------------------------------------- + +#define HINGE_USE_OBSOLETE_SOLVER false + +//----------------------------------------------------------------------------- btHingeConstraint::btHingeConstraint() : btTypedConstraint (HINGE_CONSTRAINT_TYPE), -m_enableAngularMotor(false) +m_enableAngularMotor(false), +m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER), +m_useReferenceFrameA(false) { + m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f); } +//----------------------------------------------------------------------------- + btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, - btVector3& axisInA,btVector3& axisInB) + btVector3& axisInA,btVector3& axisInB, bool useReferenceFrameA) :btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB), m_angularOnly(false), - m_enableAngularMotor(false) + m_enableAngularMotor(false), + m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER), + m_useReferenceFrameA(useReferenceFrameA) { m_rbAFrame.getOrigin() = pivotInA; @@ -60,9 +74,9 @@ btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const bt btVector3 rbAxisB2 = axisInB.cross(rbAxisB1); m_rbBFrame.getOrigin() = pivotInB; - m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),-axisInB.getX(), - rbAxisB1.getY(),rbAxisB2.getY(),-axisInB.getY(), - rbAxisB1.getZ(),rbAxisB2.getZ(),-axisInB.getZ() ); + m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(), + rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(), + rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() ); //start with free m_lowerLimit = btScalar(1e30); @@ -71,32 +85,28 @@ btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const bt m_relaxationFactor = 1.0f; m_limitSoftness = 0.9f; m_solveLimit = false; - + m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f); } +//----------------------------------------------------------------------------- -btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA) -:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA), m_angularOnly(false), m_enableAngularMotor(false) +btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA, bool useReferenceFrameA) +:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA), m_angularOnly(false), m_enableAngularMotor(false), +m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER), +m_useReferenceFrameA(useReferenceFrameA) { // since no frame is given, assume this to be zero angle and just pick rb transform axis // fixed axis in worldspace - btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0); - btScalar projection = rbAxisA1.dot(axisInA); - if (projection > SIMD_EPSILON) - rbAxisA1 = rbAxisA1*projection - axisInA; - else - rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1); - - btVector3 rbAxisA2 = axisInA.cross(rbAxisA1); + btVector3 rbAxisA1, rbAxisA2; + btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2); m_rbAFrame.getOrigin() = pivotInA; m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(), rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(), rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() ); - - btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * -axisInA; + btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * axisInA; btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB); btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1); @@ -115,19 +125,19 @@ btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA, m_relaxationFactor = 1.0f; m_limitSoftness = 0.9f; m_solveLimit = false; + m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f); } +//----------------------------------------------------------------------------- + btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, - const btTransform& rbAFrame, const btTransform& rbBFrame) + const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA) :btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), m_angularOnly(false), -m_enableAngularMotor(false) +m_enableAngularMotor(false), +m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER), +m_useReferenceFrameA(useReferenceFrameA) { - // flip axis - m_rbBFrame.getBasis()[0][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); - //start with free m_lowerLimit = btScalar(1e30); m_upperLimit = btScalar(-1e30); @@ -135,22 +145,20 @@ m_enableAngularMotor(false) m_relaxationFactor = 1.0f; m_limitSoftness = 0.9f; m_solveLimit = false; + m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f); } +//----------------------------------------------------------------------------- - -btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame) +btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame, bool useReferenceFrameA) :btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame), m_angularOnly(false), -m_enableAngularMotor(false) +m_enableAngularMotor(false), +m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER), +m_useReferenceFrameA(useReferenceFrameA) { ///not providing rigidbody B means implicitly using worldspace for body B - // flip axis - m_rbBFrame.getBasis()[0][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); - m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(m_rbAFrame.getOrigin()); //start with free @@ -160,33 +168,38 @@ m_enableAngularMotor(false) m_relaxationFactor = 1.0f; m_limitSoftness = 0.9f; m_solveLimit = false; + m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f); } +//----------------------------------------------------------------------------- + void btHingeConstraint::buildJacobian() { - m_appliedImpulse = btScalar(0.); - - if (!m_angularOnly) + if (m_useSolveConstraintObsolete) { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - btVector3 relPos = pivotBInW - pivotAInW; + m_appliedImpulse = btScalar(0.); - btVector3 normal[3]; - if (relPos.length2() > SIMD_EPSILON) + if (!m_angularOnly) { - normal[0] = relPos.normalized(); - } - else - { - normal[0].setValue(btScalar(1.0),0,0); - } + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); + btVector3 relPos = pivotBInW - pivotAInW; - btPlaneSpace1(normal[0], normal[1], normal[2]); + btVector3 normal[3]; + if (relPos.length2() > SIMD_EPSILON) + { + normal[0] = relPos.normalized(); + } + else + { + normal[0].setValue(btScalar(1.0),0,0); + } - for (int i=0;i<3;i++) - { - new (&m_jac[i]) btJacobianEntry( + btPlaneSpace1(normal[0], normal[1], normal[2]); + + for (int i=0;i<3;i++) + { + new (&m_jac[i]) btJacobianEntry( m_rbA.getCenterOfMassTransform().getBasis().transpose(), m_rbB.getCenterOfMassTransform().getBasis().transpose(), pivotAInW - m_rbA.getCenterOfMassPosition(), @@ -196,214 +209,458 @@ void btHingeConstraint::buildJacobian() m_rbA.getInvMass(), m_rbB.getInvInertiaDiagLocal(), m_rbB.getInvMass()); + } } - } - //calculate two perpendicular jointAxis, orthogonal to hingeAxis - //these two jointAxis require equal angular velocities for both bodies + //calculate two perpendicular jointAxis, orthogonal to hingeAxis + //these two jointAxis require equal angular velocities for both bodies - //this is unused for now, it's a todo - btVector3 jointAxis0local; - btVector3 jointAxis1local; - - btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local); - - getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local; - btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local; - btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + //this is unused for now, it's a todo + btVector3 jointAxis0local; + btVector3 jointAxis1local; - new (&m_jacAng[0]) btJacobianEntry(jointAxis0, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); + btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local); - new (&m_jacAng[1]) btJacobianEntry(jointAxis1, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); + getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local; + btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local; + btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + + new (&m_jacAng[0]) btJacobianEntry(jointAxis0, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); - new (&m_jacAng[2]) btJacobianEntry(hingeAxisWorld, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); + new (&m_jacAng[1]) btJacobianEntry(jointAxis1, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); + new (&m_jacAng[2]) btJacobianEntry(hingeAxisWorld, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); - // Compute limit information - btScalar hingeAngle = getHingeAngle(); + // clear accumulator + m_accLimitImpulse = btScalar(0.); - //set bias, sign, clear accumulator - m_correction = btScalar(0.); - m_limitSign = btScalar(0.); - m_solveLimit = false; - m_accLimitImpulse = btScalar(0.); + // test angular limit + testLimit(); + + //Compute K = J*W*J' for hinge axis + btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + m_kHinge = 1.0f / (getRigidBodyA().computeAngularImpulseDenominator(axisA) + + getRigidBodyB().computeAngularImpulseDenominator(axisA)); -// if (m_lowerLimit < m_upperLimit) - if (m_lowerLimit <= m_upperLimit) - { -// if (hingeAngle <= m_lowerLimit*m_limitSoftness) - if (hingeAngle <= m_lowerLimit) - { - m_correction = (m_lowerLimit - hingeAngle); - m_limitSign = 1.0f; - m_solveLimit = true; - } -// else if (hingeAngle >= m_upperLimit*m_limitSoftness) - else if (hingeAngle >= m_upperLimit) - { - m_correction = m_upperLimit - hingeAngle; - m_limitSign = -1.0f; - m_solveLimit = true; - } } - - //Compute K = J*W*J' for hinge axis - btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - m_kHinge = 1.0f / (getRigidBodyA().computeAngularImpulseDenominator(axisA) + - getRigidBodyB().computeAngularImpulseDenominator(axisA)); - } -void btHingeConstraint::solveConstraint(btScalar timeStep) +//----------------------------------------------------------------------------- + +void btHingeConstraint::getInfo1(btConstraintInfo1* info) +{ + if (m_useSolveConstraintObsolete) + { + info->m_numConstraintRows = 0; + info->nub = 0; + } + else + { + info->m_numConstraintRows = 5; // Fixed 3 linear + 2 angular + info->nub = 1; + //prepare constraint + testLimit(); + if(getSolveLimit() || getEnableAngularMotor()) + { + info->m_numConstraintRows++; // limit 3rd anguar as well + info->nub--; + } + } +} // btHingeConstraint::getInfo1 () + +//----------------------------------------------------------------------------- + +void btHingeConstraint::getInfo2 (btConstraintInfo2* info) +{ + btAssert(!m_useSolveConstraintObsolete); + int i, s = info->rowskip; + // transforms in world space + btTransform trA = m_rbA.getCenterOfMassTransform()*m_rbAFrame; + btTransform trB = m_rbB.getCenterOfMassTransform()*m_rbBFrame; + // pivot point + btVector3 pivotAInW = trA.getOrigin(); + btVector3 pivotBInW = trB.getOrigin(); + // linear (all fixed) + info->m_J1linearAxis[0] = 1; + info->m_J1linearAxis[s + 1] = 1; + info->m_J1linearAxis[2 * s + 2] = 1; + btVector3 a1 = pivotAInW - m_rbA.getCenterOfMassTransform().getOrigin(); + { + btVector3* angular0 = (btVector3*)(info->m_J1angularAxis); + btVector3* angular1 = (btVector3*)(info->m_J1angularAxis + s); + btVector3* angular2 = (btVector3*)(info->m_J1angularAxis + 2 * s); + btVector3 a1neg = -a1; + a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2); + } + btVector3 a2 = pivotBInW - m_rbB.getCenterOfMassTransform().getOrigin(); + { + btVector3* angular0 = (btVector3*)(info->m_J2angularAxis); + btVector3* angular1 = (btVector3*)(info->m_J2angularAxis + s); + btVector3* angular2 = (btVector3*)(info->m_J2angularAxis + 2 * s); + a2.getSkewSymmetricMatrix(angular0,angular1,angular2); + } + // linear RHS + btScalar k = info->fps * info->erp; + for(i = 0; i < 3; i++) + { + info->m_constraintError[i * s] = k * (pivotBInW[i] - pivotAInW[i]); + } + // make rotations around X and Y equal + // the hinge axis should be the only unconstrained + // rotational axis, the angular velocity of the two bodies perpendicular to + // the hinge axis should be equal. thus the constraint equations are + // p*w1 - p*w2 = 0 + // q*w1 - q*w2 = 0 + // where p and q are unit vectors normal to the hinge axis, and w1 and w2 + // are the angular velocity vectors of the two bodies. + // get hinge axis (Z) + btVector3 ax1 = trA.getBasis().getColumn(2); + // get 2 orthos to hinge axis (X, Y) + btVector3 p = trA.getBasis().getColumn(0); + btVector3 q = trA.getBasis().getColumn(1); + // set the two hinge angular rows + int s3 = 3 * info->rowskip; + int s4 = 4 * info->rowskip; + + info->m_J1angularAxis[s3 + 0] = p[0]; + info->m_J1angularAxis[s3 + 1] = p[1]; + info->m_J1angularAxis[s3 + 2] = p[2]; + info->m_J1angularAxis[s4 + 0] = q[0]; + info->m_J1angularAxis[s4 + 1] = q[1]; + info->m_J1angularAxis[s4 + 2] = q[2]; + + info->m_J2angularAxis[s3 + 0] = -p[0]; + info->m_J2angularAxis[s3 + 1] = -p[1]; + info->m_J2angularAxis[s3 + 2] = -p[2]; + info->m_J2angularAxis[s4 + 0] = -q[0]; + info->m_J2angularAxis[s4 + 1] = -q[1]; + info->m_J2angularAxis[s4 + 2] = -q[2]; + // compute the right hand side of the constraint equation. set relative + // body velocities along p and q to bring the hinge back into alignment. + // if ax1,ax2 are the unit length hinge axes as computed from body1 and + // body2, we need to rotate both bodies along the axis u = (ax1 x ax2). + // if `theta' is the angle between ax1 and ax2, we need an angular velocity + // along u to cover angle erp*theta in one step : + // |angular_velocity| = angle/time = erp*theta / stepsize + // = (erp*fps) * theta + // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2| + // = (erp*fps) * theta * (ax1 x ax2) / sin(theta) + // ...as ax1 and ax2 are unit length. if theta is smallish, + // theta ~= sin(theta), so + // angular_velocity = (erp*fps) * (ax1 x ax2) + // ax1 x ax2 is in the plane space of ax1, so we project the angular + // velocity to p and q to find the right hand side. + btVector3 ax2 = trB.getBasis().getColumn(2); + btVector3 u = ax1.cross(ax2); + info->m_constraintError[s3] = k * u.dot(p); + info->m_constraintError[s4] = k * u.dot(q); + // check angular limits + int nrow = 4; // last filled row + int srow; + btScalar limit_err = btScalar(0.0); + int limit = 0; + if(getSolveLimit()) + { + limit_err = m_correction * m_referenceSign; + limit = (limit_err > btScalar(0.0)) ? 1 : 2; + } + // if the hinge has joint limits or motor, add in the extra row + int powered = 0; + if(getEnableAngularMotor()) + { + powered = 1; + } + if(limit || powered) + { + nrow++; + srow = nrow * info->rowskip; + info->m_J1angularAxis[srow+0] = ax1[0]; + info->m_J1angularAxis[srow+1] = ax1[1]; + info->m_J1angularAxis[srow+2] = ax1[2]; + + info->m_J2angularAxis[srow+0] = -ax1[0]; + info->m_J2angularAxis[srow+1] = -ax1[1]; + info->m_J2angularAxis[srow+2] = -ax1[2]; + + btScalar lostop = getLowerLimit(); + btScalar histop = getUpperLimit(); + if(limit && (lostop == histop)) + { // the joint motor is ineffective + powered = 0; + } + info->m_constraintError[srow] = btScalar(0.0f); + if(powered) + { + info->cfm[srow] = btScalar(0.0); + btScalar mot_fact = getMotorFactor(m_hingeAngle, lostop, histop, m_motorTargetVelocity, info->fps * info->erp); + info->m_constraintError[srow] += mot_fact * m_motorTargetVelocity * m_referenceSign; + info->m_lowerLimit[srow] = - m_maxMotorImpulse; + info->m_upperLimit[srow] = m_maxMotorImpulse; + } + if(limit) + { + k = info->fps * info->erp; + info->m_constraintError[srow] += k * limit_err; + info->cfm[srow] = btScalar(0.0); + if(lostop == histop) + { + // limited low and high simultaneously + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else if(limit == 1) + { // low limit + info->m_lowerLimit[srow] = 0; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else + { // high limit + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = 0; + } + // bounce (we'll use slider parameter abs(1.0 - m_dampingLimAng) for that) + btScalar bounce = m_relaxationFactor; + if(bounce > btScalar(0.0)) + { + btScalar vel = m_rbA.getAngularVelocity().dot(ax1); + vel -= m_rbB.getAngularVelocity().dot(ax1); + // only apply bounce if the velocity is incoming, and if the + // resulting c[] exceeds what we already have. + if(limit == 1) + { // low limit + if(vel < 0) + { + btScalar newc = -bounce * vel; + if(newc > info->m_constraintError[srow]) + { + info->m_constraintError[srow] = newc; + } + } + } + else + { // high limit - all those computations are reversed + if(vel > 0) + { + btScalar newc = -bounce * vel; + if(newc < info->m_constraintError[srow]) + { + info->m_constraintError[srow] = newc; + } + } + } + } + info->m_constraintError[srow] *= m_biasFactor; + } // if(limit) + } // if angular limit or powered +} + +//----------------------------------------------------------------------------- + +void btHingeConstraint::solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep) { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - - btScalar tau = btScalar(0.3); - - //linear part - if (!m_angularOnly) + ///for backwards compatibility during the transition to 'getInfo/getInfo2' + if (m_useSolveConstraintObsolete) { - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - for (int i=0;i<3;i++) - { - const btVector3& normal = m_jac[i].m_linearJointAxis; - btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); + btScalar tau = btScalar(0.3); - btScalar rel_vel; - rel_vel = normal.dot(vel); - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; - m_appliedImpulse += impulse; - btVector3 impulse_vector = normal * impulse; - m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); - m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); - } - } - - - { - ///solve angular part - - // get axes in world space - btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - btVector3 axisB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(2); - - const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); - const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); - - btVector3 angVelAroundHingeAxisA = axisA * axisA.dot(angVelA); - btVector3 angVelAroundHingeAxisB = axisB * axisB.dot(angVelB); - - btVector3 angAorthog = angVelA - angVelAroundHingeAxisA; - btVector3 angBorthog = angVelB - angVelAroundHingeAxisB; - btVector3 velrelOrthog = angAorthog-angBorthog; + //linear part + if (!m_angularOnly) { - //solve orthogonal angular velocity correction - btScalar relaxation = btScalar(1.); - btScalar len = velrelOrthog.length(); - if (len > btScalar(0.00001)) - { - btVector3 normal = velrelOrthog.normalized(); - btScalar denom = getRigidBodyA().computeAngularImpulseDenominator(normal) + - getRigidBodyB().computeAngularImpulseDenominator(normal); - // scale for mass and relaxation - //todo: expose this 0.9 factor to developer - velrelOrthog *= (btScalar(1.)/denom) * m_relaxationFactor; - } + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - //solve angular positional correction - btVector3 angularError = -axisA.cross(axisB) *(btScalar(1.)/timeStep); - btScalar len2 = angularError.length(); - if (len2>btScalar(0.00001)) - { - btVector3 normal2 = angularError.normalized(); - btScalar denom2 = getRigidBodyA().computeAngularImpulseDenominator(normal2) + - getRigidBodyB().computeAngularImpulseDenominator(normal2); - angularError *= (btScalar(1.)/denom2) * relaxation; - } + btVector3 vel1,vel2; + bodyA.getVelocityInLocalPointObsolete(rel_pos1,vel1); + bodyB.getVelocityInLocalPointObsolete(rel_pos2,vel2); + btVector3 vel = vel1 - vel2; - m_rbA.applyTorqueImpulse(-velrelOrthog+angularError); - m_rbB.applyTorqueImpulse(velrelOrthog-angularError); + for (int i=0;i<3;i++) + { + const btVector3& normal = m_jac[i].m_linearJointAxis; + btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - // solve limit - if (m_solveLimit) - { - btScalar amplitude = ( (angVelB - angVelA).dot( axisA )*m_relaxationFactor + m_correction* (btScalar(1.)/timeStep)*m_biasFactor ) * m_limitSign; - - btScalar impulseMag = amplitude * m_kHinge; - - // Clamp the accumulated impulse - btScalar temp = m_accLimitImpulse; - m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, btScalar(0) ); - impulseMag = m_accLimitImpulse - temp; - - - btVector3 impulse = axisA * impulseMag * m_limitSign; - m_rbA.applyTorqueImpulse(impulse); - m_rbB.applyTorqueImpulse(-impulse); + btScalar rel_vel; + rel_vel = normal.dot(vel); + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal + btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; + m_appliedImpulse += impulse; + btVector3 impulse_vector = normal * impulse; + btVector3 ftorqueAxis1 = rel_pos1.cross(normal); + btVector3 ftorqueAxis2 = rel_pos2.cross(normal); + bodyA.applyImpulse(normal*m_rbA.getInvMass(), m_rbA.getInvInertiaTensorWorld()*ftorqueAxis1,impulse); + bodyB.applyImpulse(normal*m_rbB.getInvMass(), m_rbB.getInvInertiaTensorWorld()*ftorqueAxis2,-impulse); } } - //apply motor - if (m_enableAngularMotor) + { - //todo: add limits too - btVector3 angularLimit(0,0,0); + ///solve angular part - btVector3 velrel = angVelAroundHingeAxisA - angVelAroundHingeAxisB; - btScalar projRelVel = velrel.dot(axisA); + // get axes in world space + btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + btVector3 axisB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(2); - btScalar desiredMotorVel = m_motorTargetVelocity; - btScalar motor_relvel = desiredMotorVel - projRelVel; + btVector3 angVelA; + bodyA.getAngularVelocity(angVelA); + btVector3 angVelB; + bodyB.getAngularVelocity(angVelB); - btScalar unclippedMotorImpulse = m_kHinge * motor_relvel;; - //todo: should clip against accumulated impulse - btScalar clippedMotorImpulse = unclippedMotorImpulse > m_maxMotorImpulse ? m_maxMotorImpulse : unclippedMotorImpulse; - clippedMotorImpulse = clippedMotorImpulse < -m_maxMotorImpulse ? -m_maxMotorImpulse : clippedMotorImpulse; - btVector3 motorImp = clippedMotorImpulse * axisA; + btVector3 angVelAroundHingeAxisA = axisA * axisA.dot(angVelA); + btVector3 angVelAroundHingeAxisB = axisB * axisB.dot(angVelB); - m_rbA.applyTorqueImpulse(motorImp+angularLimit); - m_rbB.applyTorqueImpulse(-motorImp-angularLimit); + btVector3 angAorthog = angVelA - angVelAroundHingeAxisA; + btVector3 angBorthog = angVelB - angVelAroundHingeAxisB; + btVector3 velrelOrthog = angAorthog-angBorthog; + { + + + //solve orthogonal angular velocity correction + btScalar relaxation = btScalar(1.); + btScalar len = velrelOrthog.length(); + if (len > btScalar(0.00001)) + { + btVector3 normal = velrelOrthog.normalized(); + btScalar denom = getRigidBodyA().computeAngularImpulseDenominator(normal) + + getRigidBodyB().computeAngularImpulseDenominator(normal); + // scale for mass and relaxation + //velrelOrthog *= (btScalar(1.)/denom) * m_relaxationFactor; + + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*velrelOrthog,-(btScalar(1.)/denom)); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*velrelOrthog,(btScalar(1.)/denom)); + + } + + //solve angular positional correction + btVector3 angularError = axisA.cross(axisB) *(btScalar(1.)/timeStep); + btScalar len2 = angularError.length(); + if (len2>btScalar(0.00001)) + { + btVector3 normal2 = angularError.normalized(); + btScalar denom2 = getRigidBodyA().computeAngularImpulseDenominator(normal2) + + getRigidBodyB().computeAngularImpulseDenominator(normal2); + //angularError *= (btScalar(1.)/denom2) * relaxation; + + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*angularError,(btScalar(1.)/denom2)); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*angularError,-(btScalar(1.)/denom2)); + + } + + + + + + // solve limit + if (m_solveLimit) + { + btScalar amplitude = ( (angVelB - angVelA).dot( axisA )*m_relaxationFactor + m_correction* (btScalar(1.)/timeStep)*m_biasFactor ) * m_limitSign; + + btScalar impulseMag = amplitude * m_kHinge; + + // Clamp the accumulated impulse + btScalar temp = m_accLimitImpulse; + m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, btScalar(0) ); + impulseMag = m_accLimitImpulse - temp; + + + + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*axisA,impulseMag * m_limitSign); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*axisA,-(impulseMag * m_limitSign)); + + } + } + + //apply motor + if (m_enableAngularMotor) + { + //todo: add limits too + btVector3 angularLimit(0,0,0); + + btVector3 velrel = angVelAroundHingeAxisA - angVelAroundHingeAxisB; + btScalar projRelVel = velrel.dot(axisA); + + btScalar desiredMotorVel = m_motorTargetVelocity; + btScalar motor_relvel = desiredMotorVel - projRelVel; + + btScalar unclippedMotorImpulse = m_kHinge * motor_relvel;; + //todo: should clip against accumulated impulse + btScalar clippedMotorImpulse = unclippedMotorImpulse > m_maxMotorImpulse ? m_maxMotorImpulse : unclippedMotorImpulse; + clippedMotorImpulse = clippedMotorImpulse < -m_maxMotorImpulse ? -m_maxMotorImpulse : clippedMotorImpulse; + btVector3 motorImp = clippedMotorImpulse * axisA; + bodyA.applyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*axisA,clippedMotorImpulse); + bodyB.applyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*axisA,-clippedMotorImpulse); + + } } } } +//----------------------------------------------------------------------------- + void btHingeConstraint::updateRHS(btScalar timeStep) { (void)timeStep; } +//----------------------------------------------------------------------------- + btScalar btHingeConstraint::getHingeAngle() { const btVector3 refAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(0); const btVector3 refAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(1); const btVector3 swingAxis = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(1); - - return btAtan2Fast( swingAxis.dot(refAxis0), swingAxis.dot(refAxis1) ); + btScalar angle = btAtan2Fast(swingAxis.dot(refAxis0), swingAxis.dot(refAxis1)); + return m_referenceSign * angle; } +//----------------------------------------------------------------------------- + +void btHingeConstraint::testLimit() +{ + // Compute limit information + m_hingeAngle = getHingeAngle(); + m_correction = btScalar(0.); + m_limitSign = btScalar(0.); + m_solveLimit = false; + if (m_lowerLimit <= m_upperLimit) + { + if (m_hingeAngle <= m_lowerLimit) + { + m_correction = (m_lowerLimit - m_hingeAngle); + m_limitSign = 1.0f; + m_solveLimit = true; + } + else if (m_hingeAngle >= m_upperLimit) + { + m_correction = m_upperLimit - m_hingeAngle; + m_limitSign = -1.0f; + m_solveLimit = true; + } + } + return; +} // btHingeConstraint::testLimit() + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h index 4fa9972f6d8..0af655f4409 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h @@ -53,27 +53,35 @@ public: btScalar m_correction; btScalar m_accLimitImpulse; + btScalar m_hingeAngle; + btScalar m_referenceSign; bool m_angularOnly; bool m_enableAngularMotor; bool m_solveLimit; + bool m_useSolveConstraintObsolete; + bool m_useReferenceFrameA; public: - btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, btVector3& axisInA,btVector3& axisInB); + btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, btVector3& axisInA,btVector3& axisInB, bool useReferenceFrameA = false); - btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA); + btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA, bool useReferenceFrameA = false); - btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame); + btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA = false); - btHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame); + btHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame, bool useReferenceFrameA = false); btHingeConstraint(); virtual void buildJacobian(); - virtual void solveConstraint(btScalar timeStep); + virtual void getInfo1 (btConstraintInfo1* info); + + virtual void getInfo2 (btConstraintInfo2* info); + + virtual void solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep); void updateRHS(btScalar timeStep); @@ -86,6 +94,16 @@ public: return m_rbB; } + btRigidBody& getRigidBodyA() + { + return m_rbA; + } + + btRigidBody& getRigidBodyB() + { + return m_rbB; + } + void setAngularOnly(bool angularOnly) { m_angularOnly = angularOnly; @@ -122,6 +140,8 @@ public: btScalar getHingeAngle(); + void testLimit(); + const btTransform& getAFrame() { return m_rbAFrame; }; const btTransform& getBFrame() { return m_rbBFrame; }; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp index 2b69ad90438..1da749517e8 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp @@ -21,33 +21,38 @@ subject to the following restrictions: btPoint2PointConstraint::btPoint2PointConstraint() -:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE) +:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE), +m_useSolveConstraintObsolete(false) { } btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB) -:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB) +:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB), +m_useSolveConstraintObsolete(false) { } btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA) -:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)) +:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)), +m_useSolveConstraintObsolete(false) { } void btPoint2PointConstraint::buildJacobian() { - m_appliedImpulse = btScalar(0.); - - btVector3 normal(0,0,0); - - for (int i=0;i<3;i++) + ///we need it for both methods { - normal[i] = 1; - new (&m_jac[i]) btJacobianEntry( + m_appliedImpulse = btScalar(0.); + + btVector3 normal(0,0,0); + + for (int i=0;i<3;i++) + { + normal[i] = 1; + new (&m_jac[i]) btJacobianEntry( m_rbA.getCenterOfMassTransform().getBasis().transpose(), m_rbB.getCenterOfMassTransform().getBasis().transpose(), m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(), @@ -58,64 +63,162 @@ void btPoint2PointConstraint::buildJacobian() m_rbB.getInvInertiaDiagLocal(), m_rbB.getInvMass()); normal[i] = 0; + } } } -void btPoint2PointConstraint::solveConstraint(btScalar timeStep) + +void btPoint2PointConstraint::getInfo1 (btConstraintInfo1* info) { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_pivotInA; - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_pivotInB; + if (m_useSolveConstraintObsolete) + { + info->m_numConstraintRows = 0; + info->nub = 0; + } else + { + info->m_numConstraintRows = 3; + info->nub = 3; + } +} +void btPoint2PointConstraint::getInfo2 (btConstraintInfo2* info) +{ + btAssert(!m_useSolveConstraintObsolete); - btVector3 normal(0,0,0); - + //retrieve matrices + btTransform body0_trans; + body0_trans = m_rbA.getCenterOfMassTransform(); + btTransform body1_trans; + body1_trans = m_rbB.getCenterOfMassTransform(); -// btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); -// btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); + // anchor points in global coordinates with respect to body PORs. + + // set jacobian + info->m_J1linearAxis[0] = 1; + info->m_J1linearAxis[info->rowskip+1] = 1; + info->m_J1linearAxis[2*info->rowskip+2] = 1; - for (int i=0;i<3;i++) - { - normal[i] = 1; - btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - //this jacobian entry could be re-used for all iterations - - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar rel_vel; - rel_vel = normal.dot(vel); - - /* - //velocity error (first order error) - btScalar rel_vel = m_jac[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, - m_rbB.getLinearVelocity(),angvelB); + btVector3 a1 = body0_trans.getBasis()*getPivotInA(); + { + btVector3* angular0 = (btVector3*)(info->m_J1angularAxis); + btVector3* angular1 = (btVector3*)(info->m_J1angularAxis+info->rowskip); + btVector3* angular2 = (btVector3*)(info->m_J1angularAxis+2*info->rowskip); + btVector3 a1neg = -a1; + a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2); + } + + /*info->m_J2linearAxis[0] = -1; + info->m_J2linearAxis[s+1] = -1; + info->m_J2linearAxis[2*s+2] = -1; */ - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - - btScalar impulse = depth*m_setting.m_tau/timeStep * jacDiagABInv - m_setting.m_damping * rel_vel * jacDiagABInv; + btVector3 a2 = body1_trans.getBasis()*getPivotInB(); + + { + btVector3 a2n = -a2; + btVector3* angular0 = (btVector3*)(info->m_J2angularAxis); + btVector3* angular1 = (btVector3*)(info->m_J2angularAxis+info->rowskip); + btVector3* angular2 = (btVector3*)(info->m_J2angularAxis+2*info->rowskip); + a2.getSkewSymmetricMatrix(angular0,angular1,angular2); + } + - btScalar impulseClamp = m_setting.m_impulseClamp; - if (impulseClamp > 0) + + // set right hand side + btScalar k = info->fps * info->erp; + int j; + + for (j=0; j<3; j++) + { + info->m_constraintError[j*info->rowskip] = k * (a2[j] + body1_trans.getOrigin()[j] - a1[j] - body0_trans.getOrigin()[j]); + //printf("info->m_constraintError[%d]=%f\n",j,info->m_constraintError[j]); + } + + btScalar impulseClamp = m_setting.m_impulseClamp;// + for (j=0; j<3; j++) + { + if (m_setting.m_impulseClamp > 0) { - if (impulse < -impulseClamp) - impulse = -impulseClamp; - if (impulse > impulseClamp) - impulse = impulseClamp; + info->m_lowerLimit[j*info->rowskip] = -impulseClamp; + info->m_upperLimit[j*info->rowskip] = impulseClamp; } + } + +} - m_appliedImpulse+=impulse; - btVector3 impulse_vector = normal * impulse; - m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); - m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); + +void btPoint2PointConstraint::solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep) +{ + if (m_useSolveConstraintObsolete) + { + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_pivotInA; + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_pivotInB; + + + btVector3 normal(0,0,0); - normal[i] = 0; + + // btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); + // btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); + + for (int i=0;i<3;i++) + { + normal[i] = 1; + btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); + + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + //this jacobian entry could be re-used for all iterations + + btVector3 vel1,vel2; + bodyA.getVelocityInLocalPointObsolete(rel_pos1,vel1); + bodyB.getVelocityInLocalPointObsolete(rel_pos2,vel2); + btVector3 vel = vel1 - vel2; + + btScalar rel_vel; + rel_vel = normal.dot(vel); + + /* + //velocity error (first order error) + btScalar rel_vel = m_jac[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, + m_rbB.getLinearVelocity(),angvelB); + */ + + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal + + btScalar deltaImpulse = depth*m_setting.m_tau/timeStep * jacDiagABInv - m_setting.m_damping * rel_vel * jacDiagABInv; + + btScalar impulseClamp = m_setting.m_impulseClamp; + + const btScalar sum = btScalar(m_appliedImpulse) + deltaImpulse; + if (sum < -impulseClamp) + { + deltaImpulse = -impulseClamp-m_appliedImpulse; + m_appliedImpulse = -impulseClamp; + } + else if (sum > impulseClamp) + { + deltaImpulse = impulseClamp-m_appliedImpulse; + m_appliedImpulse = impulseClamp; + } + else + { + m_appliedImpulse = sum; + } + + + btVector3 impulse_vector = normal * deltaImpulse; + + btVector3 ftorqueAxis1 = rel_pos1.cross(normal); + btVector3 ftorqueAxis2 = rel_pos2.cross(normal); + bodyA.applyImpulse(normal*m_rbA.getInvMass(), m_rbA.getInvInertiaTensorWorld()*ftorqueAxis1,deltaImpulse); + bodyB.applyImpulse(normal*m_rbB.getInvMass(), m_rbB.getInvInertiaTensorWorld()*ftorqueAxis2,-deltaImpulse); + + + normal[i] = 0; + } } } diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h index c9d5968530c..e2b865cd484 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h @@ -50,6 +50,9 @@ public: public: + ///for backwards compatibility during the transition to 'getInfo/getInfo2' + bool m_useSolveConstraintObsolete; + btConstraintSetting m_setting; btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB); @@ -60,8 +63,12 @@ public: virtual void buildJacobian(); + virtual void getInfo1 (btConstraintInfo1* info); - virtual void solveConstraint(btScalar timeStep); + virtual void getInfo2 (btConstraintInfo2* info); + + + virtual void solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep); void updateRHS(btScalar timeStep); diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp index 41e336c9d17..dbd09b39238 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp @@ -15,7 +15,6 @@ subject to the following restrictions: //#define COMPUTE_IMPULSE_DENOM 1 //It is not necessary (redundant) to refresh contact manifolds, this refresh has been moved to the collision algorithms. -//#define FORCE_REFESH_CONTACT_MANIFOLDS 1 #include "btSequentialImpulseConstraintSolver.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" @@ -32,31 +31,152 @@ subject to the following restrictions: #include "LinearMath/btQuickprof.h" #include "btSolverBody.h" #include "btSolverConstraint.h" - - #include "LinearMath/btAlignedObjectArray.h" +#include //for memset - -int totalCpd = 0; - -int gTotalContactPoints = 0; - -struct btOrderIndex +btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver() +:m_btSeed2(0) { - int m_manifoldIndex; - int m_pointIndex; -}; +} +btSequentialImpulseConstraintSolver::~btSequentialImpulseConstraintSolver() +{ +} + +#ifdef USE_SIMD +#include +#define vec_splat(x, e) _mm_shuffle_ps(x, x, _MM_SHUFFLE(e,e,e,e)) +static inline __m128 _vmathVfDot3( __m128 vec0, __m128 vec1 ) +{ + __m128 result = _mm_mul_ps( vec0, vec1); + return _mm_add_ps( vec_splat( result, 0 ), _mm_add_ps( vec_splat( result, 1 ), vec_splat( result, 2 ) ) ); +} +#endif//USE_SIMD + +// Project Gauss Seidel or the equivalent Sequential Impulse +void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& c) +{ +#ifdef USE_SIMD + __m128 cpAppliedImp = _mm_set1_ps(c.m_appliedImpulse); + __m128 lowerLimit1 = _mm_set1_ps(c.m_lowerLimit); + __m128 upperLimit1 = _mm_set1_ps(c.m_upperLimit); + __m128 deltaImpulse = _mm_sub_ps(_mm_set1_ps(c.m_rhs), _mm_mul_ps(_mm_set1_ps(c.m_appliedImpulse),_mm_set1_ps(c.m_cfm))); + __m128 deltaVel1Dotn = _mm_add_ps(_vmathVfDot3(c.m_contactNormal.mVec128,body1.m_deltaLinearVelocity.mVec128), _vmathVfDot3(c.m_relpos1CrossNormal.mVec128,body1.m_deltaAngularVelocity.mVec128)); + __m128 deltaVel2Dotn = _mm_sub_ps(_vmathVfDot3(c.m_relpos2CrossNormal.mVec128,body2.m_deltaAngularVelocity.mVec128),_vmathVfDot3((c.m_contactNormal).mVec128,body2.m_deltaLinearVelocity.mVec128)); + deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel1Dotn,_mm_set1_ps(c.m_jacDiagABInv))); + deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel2Dotn,_mm_set1_ps(c.m_jacDiagABInv))); + btSimdScalar sum = _mm_add_ps(cpAppliedImp,deltaImpulse); + btSimdScalar resultLowerLess,resultUpperLess; + resultLowerLess = _mm_cmplt_ps(sum,lowerLimit1); + resultUpperLess = _mm_cmplt_ps(sum,upperLimit1); + __m128 lowMinApplied = _mm_sub_ps(lowerLimit1,cpAppliedImp); + deltaImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowMinApplied), _mm_andnot_ps(resultLowerLess, deltaImpulse) ); + c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowerLimit1), _mm_andnot_ps(resultLowerLess, sum) ); + __m128 upperMinApplied = _mm_sub_ps(upperLimit1,cpAppliedImp); + deltaImpulse = _mm_or_ps( _mm_and_ps(resultUpperLess, deltaImpulse), _mm_andnot_ps(resultUpperLess, upperMinApplied) ); + c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultUpperLess, c.m_appliedImpulse), _mm_andnot_ps(resultUpperLess, upperLimit1) ); + __m128 linearComponentA = _mm_mul_ps(c.m_contactNormal.mVec128,body1.m_invMass.mVec128); + __m128 linearComponentB = _mm_mul_ps((c.m_contactNormal).mVec128,body2.m_invMass.mVec128); + __m128 impulseMagnitude = deltaImpulse; + body1.m_deltaLinearVelocity.mVec128 = _mm_add_ps(body1.m_deltaLinearVelocity.mVec128,_mm_mul_ps(linearComponentA,impulseMagnitude)); + body1.m_deltaAngularVelocity.mVec128 = _mm_add_ps(body1.m_deltaAngularVelocity.mVec128 ,_mm_mul_ps(c.m_angularComponentA.mVec128,impulseMagnitude)); + body2.m_deltaLinearVelocity.mVec128 = _mm_sub_ps(body2.m_deltaLinearVelocity.mVec128,_mm_mul_ps(linearComponentB,impulseMagnitude)); + body2.m_deltaAngularVelocity.mVec128 = _mm_add_ps(body2.m_deltaAngularVelocity.mVec128 ,_mm_mul_ps(c.m_angularComponentB.mVec128,impulseMagnitude)); +#else + resolveSingleConstraintRowGeneric(body1,body2,c); +#endif +} + +// Project Gauss Seidel or the equivalent Sequential Impulse + void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& c) +{ + btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm; + const btScalar deltaVel1Dotn = c.m_contactNormal.dot(body1.m_deltaLinearVelocity) + c.m_relpos1CrossNormal.dot(body1.m_deltaAngularVelocity); + const btScalar deltaVel2Dotn = -c.m_contactNormal.dot(body2.m_deltaLinearVelocity) + c.m_relpos2CrossNormal.dot(body2.m_deltaAngularVelocity); + + const btScalar delta_rel_vel = deltaVel1Dotn-deltaVel2Dotn; + deltaImpulse -= deltaVel1Dotn*c.m_jacDiagABInv; + deltaImpulse -= deltaVel2Dotn*c.m_jacDiagABInv; + + const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse; + if (sum < c.m_lowerLimit) + { + deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse; + c.m_appliedImpulse = c.m_lowerLimit; + } + else if (sum > c.m_upperLimit) + { + deltaImpulse = c.m_upperLimit-c.m_appliedImpulse; + c.m_appliedImpulse = c.m_upperLimit; + } + else + { + c.m_appliedImpulse = sum; + } + body1.applyImpulse(c.m_contactNormal*body1.m_invMass,c.m_angularComponentA,deltaImpulse); + body2.applyImpulse(-c.m_contactNormal*body2.m_invMass,c.m_angularComponentB,deltaImpulse); +} + + void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& c) +{ +#ifdef USE_SIMD + __m128 cpAppliedImp = _mm_set1_ps(c.m_appliedImpulse); + __m128 lowerLimit1 = _mm_set1_ps(c.m_lowerLimit); + __m128 upperLimit1 = _mm_set1_ps(c.m_upperLimit); + __m128 deltaImpulse = _mm_sub_ps(_mm_set1_ps(c.m_rhs), _mm_mul_ps(_mm_set1_ps(c.m_appliedImpulse),_mm_set1_ps(c.m_cfm))); + __m128 deltaVel1Dotn = _mm_add_ps(_vmathVfDot3(c.m_contactNormal.mVec128,body1.m_deltaLinearVelocity.mVec128), _vmathVfDot3(c.m_relpos1CrossNormal.mVec128,body1.m_deltaAngularVelocity.mVec128)); + __m128 deltaVel2Dotn = _mm_sub_ps(_vmathVfDot3(c.m_relpos2CrossNormal.mVec128,body2.m_deltaAngularVelocity.mVec128),_vmathVfDot3((c.m_contactNormal).mVec128,body2.m_deltaLinearVelocity.mVec128)); + deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel1Dotn,_mm_set1_ps(c.m_jacDiagABInv))); + deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel2Dotn,_mm_set1_ps(c.m_jacDiagABInv))); + btSimdScalar sum = _mm_add_ps(cpAppliedImp,deltaImpulse); + btSimdScalar resultLowerLess,resultUpperLess; + resultLowerLess = _mm_cmplt_ps(sum,lowerLimit1); + resultUpperLess = _mm_cmplt_ps(sum,upperLimit1); + __m128 lowMinApplied = _mm_sub_ps(lowerLimit1,cpAppliedImp); + deltaImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowMinApplied), _mm_andnot_ps(resultLowerLess, deltaImpulse) ); + c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowerLimit1), _mm_andnot_ps(resultLowerLess, sum) ); + __m128 linearComponentA = _mm_mul_ps(c.m_contactNormal.mVec128,body1.m_invMass.mVec128); + __m128 linearComponentB = _mm_mul_ps((c.m_contactNormal).mVec128,body2.m_invMass.mVec128); + __m128 impulseMagnitude = deltaImpulse; + body1.m_deltaLinearVelocity.mVec128 = _mm_add_ps(body1.m_deltaLinearVelocity.mVec128,_mm_mul_ps(linearComponentA,impulseMagnitude)); + body1.m_deltaAngularVelocity.mVec128 = _mm_add_ps(body1.m_deltaAngularVelocity.mVec128 ,_mm_mul_ps(c.m_angularComponentA.mVec128,impulseMagnitude)); + body2.m_deltaLinearVelocity.mVec128 = _mm_sub_ps(body2.m_deltaLinearVelocity.mVec128,_mm_mul_ps(linearComponentB,impulseMagnitude)); + body2.m_deltaAngularVelocity.mVec128 = _mm_add_ps(body2.m_deltaAngularVelocity.mVec128 ,_mm_mul_ps(c.m_angularComponentB.mVec128,impulseMagnitude)); +#else + resolveSingleConstraintRowLowerLimit(body1,body2,c); +#endif +} + +// Project Gauss Seidel or the equivalent Sequential Impulse + void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& c) +{ + btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm; + const btScalar deltaVel1Dotn = c.m_contactNormal.dot(body1.m_deltaLinearVelocity) + c.m_relpos1CrossNormal.dot(body1.m_deltaAngularVelocity); + const btScalar deltaVel2Dotn = -c.m_contactNormal.dot(body2.m_deltaLinearVelocity) + c.m_relpos2CrossNormal.dot(body2.m_deltaAngularVelocity); + + deltaImpulse -= deltaVel1Dotn*c.m_jacDiagABInv; + deltaImpulse -= deltaVel2Dotn*c.m_jacDiagABInv; + const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse; + if (sum < c.m_lowerLimit) + { + deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse; + c.m_appliedImpulse = c.m_lowerLimit; + } + else + { + c.m_appliedImpulse = sum; + } + body1.applyImpulse(c.m_contactNormal*body1.m_invMass,c.m_angularComponentA,deltaImpulse); + body2.applyImpulse(-c.m_contactNormal*body2.m_invMass,c.m_angularComponentB,deltaImpulse); +} -#define SEQUENTIAL_IMPULSE_MAX_SOLVER_POINTS 16384 -static btOrderIndex gOrder[SEQUENTIAL_IMPULSE_MAX_SOLVER_POINTS]; unsigned long btSequentialImpulseConstraintSolver::btRand2() { - m_btSeed2 = (1664525L*m_btSeed2 + 1013904223L) & 0xffffffff; - return m_btSeed2; + m_btSeed2 = (1664525L*m_btSeed2 + 1013904223L) & 0xffffffff; + return m_btSeed2; } @@ -64,437 +184,63 @@ unsigned long btSequentialImpulseConstraintSolver::btRand2() //See ODE: adam's all-int straightforward(?) dRandInt (0..n-1) int btSequentialImpulseConstraintSolver::btRandInt2 (int n) { - // seems good; xor-fold and modulus - const unsigned long un = static_cast(n); - unsigned long r = btRand2(); + // seems good; xor-fold and modulus + const unsigned long un = static_cast(n); + unsigned long r = btRand2(); - // note: probably more aggressive than it needs to be -- might be - // able to get away without one or two of the innermost branches. - if (un <= 0x00010000UL) { - r ^= (r >> 16); - if (un <= 0x00000100UL) { - r ^= (r >> 8); - if (un <= 0x00000010UL) { - r ^= (r >> 4); - if (un <= 0x00000004UL) { - r ^= (r >> 2); - if (un <= 0x00000002UL) { - r ^= (r >> 1); - } - } - } - } - } - - return (int) (r % un); -} - - - - -bool MyContactDestroyedCallback(void* userPersistentData); -bool MyContactDestroyedCallback(void* userPersistentData) -{ - assert (userPersistentData); - btConstraintPersistentData* cpd = (btConstraintPersistentData*)userPersistentData; - btAlignedFree(cpd); - totalCpd--; - //printf("totalCpd = %i. DELETED Ptr %x\n",totalCpd,userPersistentData); - return true; -} - - - -btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver() -:m_btSeed2(0) -{ - gContactDestroyedCallback = &MyContactDestroyedCallback; - - //initialize default friction/contact funcs - int i,j; - for (i=0;i> 16); + if (un <= 0x00000100UL) { + r ^= (r >> 8); + if (un <= 0x00000010UL) { + r ^= (r >> 4); + if (un <= 0x00000004UL) { + r ^= (r >> 2); + if (un <= 0x00000002UL) { + r ^= (r >> 1); + } + } + } } + } + + return (int) (r % un); } -btSequentialImpulseConstraintSolver::~btSequentialImpulseConstraintSolver() -{ -} -void initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject); -void initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject) +void btSequentialImpulseConstraintSolver::initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject) { - btRigidBody* rb = btRigidBody::upcast(collisionObject); + btRigidBody* rb = collisionObject? btRigidBody::upcast(collisionObject) : 0; + + solverBody->m_deltaLinearVelocity.setValue(0.f,0.f,0.f); + solverBody->m_deltaAngularVelocity.setValue(0.f,0.f,0.f); + if (rb) { - solverBody->m_angularVelocity = rb->getAngularVelocity() ; - solverBody->m_centerOfMassPosition = collisionObject->getWorldTransform().getOrigin(); - solverBody->m_friction = collisionObject->getFriction(); - solverBody->m_invMass = rb->getInvMass(); - solverBody->m_linearVelocity = rb->getLinearVelocity(); + solverBody->m_invMass = btVector3(rb->getInvMass(),rb->getInvMass(),rb->getInvMass())*rb->getLinearFactor(); solverBody->m_originalBody = rb; solverBody->m_angularFactor = rb->getAngularFactor(); } else { - solverBody->m_angularVelocity.setValue(0,0,0); - solverBody->m_centerOfMassPosition = collisionObject->getWorldTransform().getOrigin(); - solverBody->m_friction = collisionObject->getFriction(); - solverBody->m_invMass = 0.f; - solverBody->m_linearVelocity.setValue(0,0,0); + solverBody->m_invMass.setValue(0,0,0); solverBody->m_originalBody = 0; - solverBody->m_angularFactor = 1.f; + solverBody->m_angularFactor.setValue(1,1,1); } - - solverBody->m_pushVelocity.setValue(0.f,0.f,0.f); - solverBody->m_turnVelocity.setValue(0.f,0.f,0.f); } int gNumSplitImpulseRecoveries = 0; -btScalar restitutionCurve(btScalar rel_vel, btScalar restitution); -btScalar restitutionCurve(btScalar rel_vel, btScalar restitution) +btScalar btSequentialImpulseConstraintSolver::restitutionCurve(btScalar rel_vel, btScalar restitution) { btScalar rest = restitution * -rel_vel; return rest; } -void resolveSplitPenetrationImpulseCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo); - -//SIMD_FORCE_INLINE -void resolveSplitPenetrationImpulseCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo) -{ - (void)solverInfo; - - if (contactConstraint.m_penetration < solverInfo.m_splitImpulsePenetrationThreshold) - { - - gNumSplitImpulseRecoveries++; - btScalar normalImpulse; - - // Optimized version of projected relative velocity, use precomputed cross products with normal - // body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); - // body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); - // btVector3 vel = vel1 - vel2; - // btScalar rel_vel = contactConstraint.m_contactNormal.dot(vel); - - btScalar rel_vel; - btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_pushVelocity) - + contactConstraint.m_relpos1CrossNormal.dot(body1.m_turnVelocity); - btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_pushVelocity) - + contactConstraint.m_relpos2CrossNormal.dot(body2.m_turnVelocity); - - rel_vel = vel1Dotn-vel2Dotn; - - - btScalar positionalError = -contactConstraint.m_penetration * solverInfo.m_erp2/solverInfo.m_timeStep; - // btScalar positionalError = contactConstraint.m_penetration; - - btScalar velocityError = contactConstraint.m_restitution - rel_vel;// * damping; - - btScalar penetrationImpulse = positionalError * contactConstraint.m_jacDiagABInv; - btScalar velocityImpulse = velocityError * contactConstraint.m_jacDiagABInv; - normalImpulse = penetrationImpulse+velocityImpulse; - - // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse - btScalar oldNormalImpulse = contactConstraint.m_appliedPushImpulse; - btScalar sum = oldNormalImpulse + normalImpulse; - contactConstraint.m_appliedPushImpulse = btScalar(0.) > sum ? btScalar(0.): sum; - - normalImpulse = contactConstraint.m_appliedPushImpulse - oldNormalImpulse; - - body1.internalApplyPushImpulse(contactConstraint.m_contactNormal*body1.m_invMass, contactConstraint.m_angularComponentA,normalImpulse); - - body2.internalApplyPushImpulse(contactConstraint.m_contactNormal*body2.m_invMass, contactConstraint.m_angularComponentB,-normalImpulse); - - } - -} - - -//velocity + friction -//response between two dynamic objects with friction - -btScalar resolveSingleCollisionCombinedCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo); - -//SIMD_FORCE_INLINE -btScalar resolveSingleCollisionCombinedCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo) -{ - (void)solverInfo; - - btScalar normalImpulse; - - { - - - // Optimized version of projected relative velocity, use precomputed cross products with normal - // body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); - // body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); - // btVector3 vel = vel1 - vel2; - // btScalar rel_vel = contactConstraint.m_contactNormal.dot(vel); - - btScalar rel_vel; - btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) - + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); - btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) - + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); - - rel_vel = vel1Dotn-vel2Dotn; - - btScalar positionalError = 0.f; - if (!solverInfo.m_splitImpulse || (contactConstraint.m_penetration > solverInfo.m_splitImpulsePenetrationThreshold)) - { - positionalError = -contactConstraint.m_penetration * solverInfo.m_erp/solverInfo.m_timeStep; - } - - btScalar velocityError = contactConstraint.m_restitution - rel_vel;// * damping; - - btScalar penetrationImpulse = positionalError * contactConstraint.m_jacDiagABInv; - btScalar velocityImpulse = velocityError * contactConstraint.m_jacDiagABInv; - normalImpulse = penetrationImpulse+velocityImpulse; - - - // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse - btScalar oldNormalImpulse = contactConstraint.m_appliedImpulse; - btScalar sum = oldNormalImpulse + normalImpulse; - contactConstraint.m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; - - normalImpulse = contactConstraint.m_appliedImpulse - oldNormalImpulse; - - body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass, - contactConstraint.m_angularComponentA,normalImpulse); - - body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass, - contactConstraint.m_angularComponentB,-normalImpulse); - } - - return normalImpulse; -} - -//#define NO_FRICTION_TANGENTIALS 1 -#ifndef NO_FRICTION_TANGENTIALS - -btScalar resolveSingleFrictionCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo, - btScalar appliedNormalImpulse); - -//SIMD_FORCE_INLINE -btScalar resolveSingleFrictionCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo, - btScalar appliedNormalImpulse) -{ - (void)solverInfo; - - - const btScalar combinedFriction = contactConstraint.m_friction; - - const btScalar limit = appliedNormalImpulse * combinedFriction; - - if (appliedNormalImpulse>btScalar(0.)) - //friction - { - - btScalar j1; - { - - btScalar rel_vel; - const btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) - + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); - const btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) - + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); - rel_vel = vel1Dotn-vel2Dotn; - - // calculate j that moves us to zero relative velocity - j1 = -rel_vel * contactConstraint.m_jacDiagABInv; -#define CLAMP_ACCUMULATED_FRICTION_IMPULSE 1 -#ifdef CLAMP_ACCUMULATED_FRICTION_IMPULSE - btScalar oldTangentImpulse = contactConstraint.m_appliedImpulse; - contactConstraint.m_appliedImpulse = oldTangentImpulse + j1; - - if (limit < contactConstraint.m_appliedImpulse) - { - contactConstraint.m_appliedImpulse = limit; - } else - { - if (contactConstraint.m_appliedImpulse < -limit) - contactConstraint.m_appliedImpulse = -limit; - } - j1 = contactConstraint.m_appliedImpulse - oldTangentImpulse; -#else - if (limit < j1) - { - j1 = limit; - } else - { - if (j1 < -limit) - j1 = -limit; - } - -#endif //CLAMP_ACCUMULATED_FRICTION_IMPULSE - - //GEN_set_min(contactConstraint.m_appliedImpulse, limit); - //GEN_set_max(contactConstraint.m_appliedImpulse, -limit); - - - - } - - body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass,contactConstraint.m_angularComponentA,j1); - - body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass,contactConstraint.m_angularComponentB,-j1); - - } - return 0.f; -} - - -#else - -//velocity + friction -//response between two dynamic objects with friction -btScalar resolveSingleFrictionCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo) -{ - - btVector3 vel1; - btVector3 vel2; - btScalar normalImpulse(0.f); - - { - const btVector3& normal = contactConstraint.m_contactNormal; - if (contactConstraint.m_penetration < 0.f) - return 0.f; - - - body1.getVelocityInLocalPoint(contactConstraint.m_relpos1CrossNormal,vel1); - body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; - rel_vel = normal.dot(vel); - - btVector3 lat_vel = vel - normal * rel_vel; - btScalar lat_rel_vel = lat_vel.length2(); - - btScalar combinedFriction = contactConstraint.m_friction; - const btVector3& rel_pos1 = contactConstraint.m_rel_posA; - const btVector3& rel_pos2 = contactConstraint.m_rel_posB; - - - if (lat_rel_vel > SIMD_EPSILON*SIMD_EPSILON) - { - lat_rel_vel = btSqrt(lat_rel_vel); - - lat_vel /= lat_rel_vel; - btVector3 temp1 = body1.m_invInertiaWorld * rel_pos1.cross(lat_vel); - btVector3 temp2 = body2.m_invInertiaWorld * rel_pos2.cross(lat_vel); - btScalar friction_impulse = lat_rel_vel / - (body1.m_invMass + body2.m_invMass + lat_vel.dot(temp1.cross(rel_pos1) + temp2.cross(rel_pos2))); - btScalar normal_impulse = contactConstraint.m_appliedImpulse * combinedFriction; - - btSetMin(friction_impulse, normal_impulse); - btSetMin(friction_impulse, -normal_impulse); - body1.internalApplyImpulse(lat_vel * -friction_impulse, rel_pos1); - body2.applyImpulse(lat_vel * friction_impulse, rel_pos2); - } - } - - return normalImpulse; -} - -#endif //NO_FRICTION_TANGENTIALS - - - - - -void btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation) -{ - - btRigidBody* body0=btRigidBody::upcast(colObj0); - btRigidBody* body1=btRigidBody::upcast(colObj1); - - btSolverConstraint& solverConstraint = m_tmpSolverFrictionConstraintPool.expand(); - solverConstraint.m_contactNormal = normalAxis; - - solverConstraint.m_solverBodyIdA = solverBodyIdA; - solverConstraint.m_solverBodyIdB = solverBodyIdB; - solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; - solverConstraint.m_frictionIndex = frictionIndex; - - solverConstraint.m_friction = cp.m_combinedFriction; - solverConstraint.m_originalContactPoint = 0; - - solverConstraint.m_appliedImpulse = btScalar(0.); - solverConstraint.m_appliedPushImpulse = 0.f; - solverConstraint.m_penetration = 0.f; - { - btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos1CrossNormal = ftorqueAxis1; - solverConstraint.m_angularComponentA = body0 ? body0->getInvInertiaTensorWorld()*ftorqueAxis1 : btVector3(0,0,0); - } - { - btVector3 ftorqueAxis1 = rel_pos2.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos2CrossNormal = ftorqueAxis1; - solverConstraint.m_angularComponentB = body1 ? body1->getInvInertiaTensorWorld()*ftorqueAxis1 : btVector3(0,0,0); - } - -#ifdef COMPUTE_IMPULSE_DENOM - btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); - btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); -#else - btVector3 vec; - btScalar denom0 = 0.f; - btScalar denom1 = 0.f; - if (body0) - { - vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); - denom0 = body0->getInvMass() + normalAxis.dot(vec); - } - if (body1) - { - vec = ( solverConstraint.m_angularComponentB).cross(rel_pos2); - denom1 = body1->getInvMass() + normalAxis.dot(vec); - } - - -#endif //COMPUTE_IMPULSE_DENOM - btScalar denom = relaxation/(denom0+denom1); - solverConstraint.m_jacDiagABInv = denom; - - -} - void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection); void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection) @@ -513,6 +259,374 @@ void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirec +btSolverConstraint& btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation) +{ + + + btRigidBody* body0=btRigidBody::upcast(colObj0); + btRigidBody* body1=btRigidBody::upcast(colObj1); + + btSolverConstraint& solverConstraint = m_tmpSolverContactFrictionConstraintPool.expand(); + memset(&solverConstraint,0xff,sizeof(btSolverConstraint)); + solverConstraint.m_contactNormal = normalAxis; + + solverConstraint.m_solverBodyIdA = solverBodyIdA; + solverConstraint.m_solverBodyIdB = solverBodyIdB; + solverConstraint.m_frictionIndex = frictionIndex; + + solverConstraint.m_friction = cp.m_combinedFriction; + solverConstraint.m_originalContactPoint = 0; + + solverConstraint.m_appliedImpulse = 0.f; + // solverConstraint.m_appliedPushImpulse = 0.f; + + { + btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos1CrossNormal = ftorqueAxis1; + solverConstraint.m_angularComponentA = body0 ? body0->getInvInertiaTensorWorld()*ftorqueAxis1*body0->getAngularFactor() : btVector3(0,0,0); + } + { + btVector3 ftorqueAxis1 = rel_pos2.cross(-solverConstraint.m_contactNormal); + solverConstraint.m_relpos2CrossNormal = ftorqueAxis1; + solverConstraint.m_angularComponentB = body1 ? body1->getInvInertiaTensorWorld()*ftorqueAxis1*body1->getAngularFactor() : btVector3(0,0,0); + } + +#ifdef COMPUTE_IMPULSE_DENOM + btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); + btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); +#else + btVector3 vec; + btScalar denom0 = 0.f; + btScalar denom1 = 0.f; + if (body0) + { + vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); + denom0 = body0->getInvMass() + normalAxis.dot(vec); + } + if (body1) + { + vec = ( -solverConstraint.m_angularComponentB).cross(rel_pos2); + denom1 = body1->getInvMass() + normalAxis.dot(vec); + } + + +#endif //COMPUTE_IMPULSE_DENOM + btScalar denom = relaxation/(denom0+denom1); + solverConstraint.m_jacDiagABInv = denom; + +#ifdef _USE_JACOBIAN + solverConstraint.m_jac = btJacobianEntry ( + rel_pos1,rel_pos2,solverConstraint.m_contactNormal, + body0->getInvInertiaDiagLocal(), + body0->getInvMass(), + body1->getInvInertiaDiagLocal(), + body1->getInvMass()); +#endif //_USE_JACOBIAN + + + { + btScalar rel_vel; + btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(body0?body0->getLinearVelocity():btVector3(0,0,0)) + + solverConstraint.m_relpos1CrossNormal.dot(body0?body0->getAngularVelocity():btVector3(0,0,0)); + btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(body1?body1->getLinearVelocity():btVector3(0,0,0)) + + solverConstraint.m_relpos2CrossNormal.dot(body1?body1->getAngularVelocity():btVector3(0,0,0)); + + rel_vel = vel1Dotn+vel2Dotn; + + btScalar positionalError = 0.f; + + btSimdScalar velocityError = - rel_vel; + btSimdScalar velocityImpulse = velocityError * btSimdScalar(solverConstraint.m_jacDiagABInv); + solverConstraint.m_rhs = velocityImpulse; + solverConstraint.m_cfm = 0.f; + solverConstraint.m_lowerLimit = 0; + solverConstraint.m_upperLimit = 1e10f; + } + + return solverConstraint; +} + +int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject& body) +{ + int solverBodyIdA = -1; + + if (body.getCompanionId() >= 0) + { + //body has already been converted + solverBodyIdA = body.getCompanionId(); + } else + { + btRigidBody* rb = btRigidBody::upcast(&body); + if (rb && rb->getInvMass()) + { + solverBodyIdA = m_tmpSolverBodyPool.size(); + btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); + initSolverBody(&solverBody,&body); + body.setCompanionId(solverBodyIdA); + } else + { + return 0;//assume first one is a fixed solver body + } + } + return solverBodyIdA; +} +#include + + + +void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal) +{ + btCollisionObject* colObj0=0,*colObj1=0; + + colObj0 = (btCollisionObject*)manifold->getBody0(); + colObj1 = (btCollisionObject*)manifold->getBody1(); + + int solverBodyIdA=-1; + int solverBodyIdB=-1; + + if (manifold->getNumContacts()) + { + solverBodyIdA = getOrInitSolverBody(*colObj0); + solverBodyIdB = getOrInitSolverBody(*colObj1); + } + + ///avoid collision response between two static objects + if (!solverBodyIdA && !solverBodyIdB) + return; + + btVector3 rel_pos1; + btVector3 rel_pos2; + btScalar relaxation; + + for (int j=0;jgetNumContacts();j++) + { + + btManifoldPoint& cp = manifold->getContactPoint(j); + + if (cp.getDistance() <= manifold->getContactProcessingThreshold()) + { + + const btVector3& pos1 = cp.getPositionWorldOnA(); + const btVector3& pos2 = cp.getPositionWorldOnB(); + + rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin(); + rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin(); + + + relaxation = 1.f; + btScalar rel_vel; + btVector3 vel; + + int frictionIndex = m_tmpSolverContactConstraintPool.size(); + + { + btSolverConstraint& solverConstraint = m_tmpSolverContactConstraintPool.expand(); + btRigidBody* rb0 = btRigidBody::upcast(colObj0); + btRigidBody* rb1 = btRigidBody::upcast(colObj1); + + solverConstraint.m_solverBodyIdA = solverBodyIdA; + solverConstraint.m_solverBodyIdB = solverBodyIdB; + + solverConstraint.m_originalContactPoint = &cp; + + btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); + solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0*rb0->getAngularFactor() : btVector3(0,0,0); + btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); + solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*-torqueAxis1*rb1->getAngularFactor() : btVector3(0,0,0); + { +#ifdef COMPUTE_IMPULSE_DENOM + btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB); + btScalar denom1 = rb1->computeImpulseDenominator(pos2,cp.m_normalWorldOnB); +#else + btVector3 vec; + btScalar denom0 = 0.f; + btScalar denom1 = 0.f; + if (rb0) + { + vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); + denom0 = rb0->getInvMass() + cp.m_normalWorldOnB.dot(vec); + } + if (rb1) + { + vec = ( -solverConstraint.m_angularComponentB).cross(rel_pos2); + denom1 = rb1->getInvMass() + cp.m_normalWorldOnB.dot(vec); + } +#endif //COMPUTE_IMPULSE_DENOM + + btScalar denom = relaxation/(denom0+denom1); + solverConstraint.m_jacDiagABInv = denom; + } + + solverConstraint.m_contactNormal = cp.m_normalWorldOnB; + solverConstraint.m_relpos1CrossNormal = rel_pos1.cross(cp.m_normalWorldOnB); + solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(-cp.m_normalWorldOnB); + + + btVector3 vel1 = rb0 ? rb0->getVelocityInLocalPoint(rel_pos1) : btVector3(0,0,0); + btVector3 vel2 = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0); + + vel = vel1 - vel2; + + rel_vel = cp.m_normalWorldOnB.dot(vel); + + btScalar penetration = cp.getDistance()+infoGlobal.m_linearSlop; + + + solverConstraint.m_friction = cp.m_combinedFriction; + + btScalar restitution = 0.f; + + if (cp.m_lifeTime>infoGlobal.m_restingContactRestitutionThreshold) + { + restitution = 0.f; + } else + { + restitution = restitutionCurve(rel_vel, cp.m_combinedRestitution); + if (restitution <= btScalar(0.)) + { + restitution = 0.f; + }; + } + + + ///warm starting (or zero if disabled) + if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING) + { + solverConstraint.m_appliedImpulse = cp.m_appliedImpulse * infoGlobal.m_warmstartingFactor; + if (rb0) + m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA].applyImpulse(solverConstraint.m_contactNormal*rb0->getInvMass()*rb0->getLinearFactor(),solverConstraint.m_angularComponentA,solverConstraint.m_appliedImpulse); + if (rb1) + m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB].applyImpulse(solverConstraint.m_contactNormal*rb1->getInvMass()*rb1->getLinearFactor(),-solverConstraint.m_angularComponentB,-solverConstraint.m_appliedImpulse); + } else + { + solverConstraint.m_appliedImpulse = 0.f; + } + + // solverConstraint.m_appliedPushImpulse = 0.f; + + { + btScalar rel_vel; + btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(rb0?rb0->getLinearVelocity():btVector3(0,0,0)) + + solverConstraint.m_relpos1CrossNormal.dot(rb0?rb0->getAngularVelocity():btVector3(0,0,0)); + btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(rb1?rb1->getLinearVelocity():btVector3(0,0,0)) + + solverConstraint.m_relpos2CrossNormal.dot(rb1?rb1->getAngularVelocity():btVector3(0,0,0)); + + rel_vel = vel1Dotn+vel2Dotn; + + btScalar positionalError = 0.f; + positionalError = -penetration * infoGlobal.m_erp/infoGlobal.m_timeStep; + btScalar velocityError = restitution - rel_vel;// * damping; + btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv; + btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv; + solverConstraint.m_rhs = penetrationImpulse+velocityImpulse; + solverConstraint.m_cfm = 0.f; + solverConstraint.m_lowerLimit = 0; + solverConstraint.m_upperLimit = 1e10f; + } + + + /////setup the friction constraints + + + + if (1) + { + solverConstraint.m_frictionIndex = m_tmpSolverContactFrictionConstraintPool.size(); + if (!(infoGlobal.m_solverMode & SOLVER_ENABLE_FRICTION_DIRECTION_CACHING) || !cp.m_lateralFrictionInitialized) + { + cp.m_lateralFrictionDir1 = vel - cp.m_normalWorldOnB * rel_vel; + btScalar lat_rel_vel = cp.m_lateralFrictionDir1.length2(); + if (!(infoGlobal.m_solverMode & SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION) && lat_rel_vel > SIMD_EPSILON) + { + cp.m_lateralFrictionDir1 /= btSqrt(lat_rel_vel); + if((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS)) + { + cp.m_lateralFrictionDir2 = cp.m_lateralFrictionDir1.cross(cp.m_normalWorldOnB); + cp.m_lateralFrictionDir2.normalize();//?? + applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2); + applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2); + addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); + } + + applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1); + applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1); + addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); + cp.m_lateralFrictionInitialized = true; + } else + { + //re-calculate friction direction every frame, todo: check if this is really needed + btPlaneSpace1(cp.m_normalWorldOnB,cp.m_lateralFrictionDir1,cp.m_lateralFrictionDir2); + if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS)) + { + applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2); + applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2); + addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); + } + + applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1); + applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1); + addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); + + cp.m_lateralFrictionInitialized = true; + } + + } else + { + addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); + if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS)) + addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); + } + + if (infoGlobal.m_solverMode & SOLVER_USE_FRICTION_WARMSTARTING) + { + { + btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex]; + if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING) + { + frictionConstraint1.m_appliedImpulse = cp.m_appliedImpulseLateral1 * infoGlobal.m_warmstartingFactor; + if (rb0) + m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA].applyImpulse(frictionConstraint1.m_contactNormal*rb0->getInvMass()*rb0->getLinearFactor(),frictionConstraint1.m_angularComponentA,frictionConstraint1.m_appliedImpulse); + if (rb1) + m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB].applyImpulse(frictionConstraint1.m_contactNormal*rb1->getInvMass()*rb1->getLinearFactor(),-frictionConstraint1.m_angularComponentB,-frictionConstraint1.m_appliedImpulse); + } else + { + frictionConstraint1.m_appliedImpulse = 0.f; + } + } + + if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS)) + { + btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1]; + if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING) + { + frictionConstraint2.m_appliedImpulse = cp.m_appliedImpulseLateral2 * infoGlobal.m_warmstartingFactor; + if (rb0) + m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA].applyImpulse(frictionConstraint2.m_contactNormal*rb0->getInvMass(),frictionConstraint2.m_angularComponentA,frictionConstraint2.m_appliedImpulse); + if (rb1) + m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB].applyImpulse(frictionConstraint2.m_contactNormal*rb1->getInvMass(),-frictionConstraint2.m_angularComponentB,-frictionConstraint2.m_appliedImpulse); + } else + { + frictionConstraint2.m_appliedImpulse = 0.f; + } + } + } else + { + btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex]; + frictionConstraint1.m_appliedImpulse = 0.f; + if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS)) + { + btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1]; + frictionConstraint2.m_appliedImpulse = 0.f; + } + } + } + } + + + } + } +} + btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** /*bodies */,int /*numBodies */,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc) { @@ -523,331 +637,11 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol if (!(numConstraints + numManifolds)) { -// printf("empty\n"); + // printf("empty\n"); return 0.f; } - btPersistentManifold* manifold = 0; - btCollisionObject* colObj0=0,*colObj1=0; - - //btRigidBody* rb0=0,*rb1=0; - - -#ifdef FORCE_REFESH_CONTACT_MANIFOLDS - - BEGIN_PROFILE("refreshManifolds"); - - int i; - - - - for (i=0;igetBody1(); - rb0 = (btRigidBody*)manifold->getBody0(); - - manifold->refreshContactPoints(rb0->getCenterOfMassTransform(),rb1->getCenterOfMassTransform()); - - } - - END_PROFILE("refreshManifolds"); -#endif //FORCE_REFESH_CONTACT_MANIFOLDS - - - - - - //int sizeofSB = sizeof(btSolverBody); - //int sizeofSC = sizeof(btSolverConstraint); - - - //if (1) - { - //if m_stackAlloc, try to pack bodies/constraints to speed up solving -// btBlock* sablock; -// sablock = stackAlloc->beginBlock(); - - // int memsize = 16; -// unsigned char* stackMemory = stackAlloc->allocate(memsize); - - - //todo: use stack allocator for this temp memory -// int minReservation = numManifolds*2; - - //m_tmpSolverBodyPool.reserve(minReservation); - - //don't convert all bodies, only the one we need so solver the constraints -/* - { - for (int i=0;igetIslandTag() >= 0)) - { - btAssert(rb->getCompanionId() < 0); - int solverBodyId = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,rb); - rb->setCompanionId(solverBodyId); - } - } - } -*/ - - //m_tmpSolverConstraintPool.reserve(minReservation); - //m_tmpSolverFrictionConstraintPool.reserve(minReservation); - - { - int i; - - for (i=0;igetBody0(); - colObj1 = (btCollisionObject*)manifold->getBody1(); - - int solverBodyIdA=-1; - int solverBodyIdB=-1; - - if (manifold->getNumContacts()) - { - - - - if (colObj0->getIslandTag() >= 0) - { - if (colObj0->getCompanionId() >= 0) - { - //body has already been converted - solverBodyIdA = colObj0->getCompanionId(); - } else - { - solverBodyIdA = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,colObj0); - colObj0->setCompanionId(solverBodyIdA); - } - } else - { - //create a static body - solverBodyIdA = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,colObj0); - } - - if (colObj1->getIslandTag() >= 0) - { - if (colObj1->getCompanionId() >= 0) - { - solverBodyIdB = colObj1->getCompanionId(); - } else - { - solverBodyIdB = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,colObj1); - colObj1->setCompanionId(solverBodyIdB); - } - } else - { - //create a static body - solverBodyIdB = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,colObj1); - } - } - - btVector3 rel_pos1; - btVector3 rel_pos2; - btScalar relaxation; - - for (int j=0;jgetNumContacts();j++) - { - - btManifoldPoint& cp = manifold->getContactPoint(j); - - if (cp.getDistance() <= btScalar(0.)) - { - - const btVector3& pos1 = cp.getPositionWorldOnA(); - const btVector3& pos2 = cp.getPositionWorldOnB(); - - rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin(); - rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin(); - - - relaxation = 1.f; - btScalar rel_vel; - btVector3 vel; - - int frictionIndex = m_tmpSolverConstraintPool.size(); - - { - btSolverConstraint& solverConstraint = m_tmpSolverConstraintPool.expand(); - btRigidBody* rb0 = btRigidBody::upcast(colObj0); - btRigidBody* rb1 = btRigidBody::upcast(colObj1); - - solverConstraint.m_solverBodyIdA = solverBodyIdA; - solverConstraint.m_solverBodyIdB = solverBodyIdB; - solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_CONTACT_1D; - - solverConstraint.m_originalContactPoint = &cp; - - btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); - solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0 : btVector3(0,0,0); - btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); - solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*torqueAxis1 : btVector3(0,0,0); - { -#ifdef COMPUTE_IMPULSE_DENOM - btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB); - btScalar denom1 = rb1->computeImpulseDenominator(pos2,cp.m_normalWorldOnB); -#else - btVector3 vec; - btScalar denom0 = 0.f; - btScalar denom1 = 0.f; - if (rb0) - { - vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); - denom0 = rb0->getInvMass() + cp.m_normalWorldOnB.dot(vec); - } - if (rb1) - { - vec = ( solverConstraint.m_angularComponentB).cross(rel_pos2); - denom1 = rb1->getInvMass() + cp.m_normalWorldOnB.dot(vec); - } -#endif //COMPUTE_IMPULSE_DENOM - - btScalar denom = relaxation/(denom0+denom1); - solverConstraint.m_jacDiagABInv = denom; - } - - solverConstraint.m_contactNormal = cp.m_normalWorldOnB; - solverConstraint.m_relpos1CrossNormal = rel_pos1.cross(cp.m_normalWorldOnB); - solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(cp.m_normalWorldOnB); - - - btVector3 vel1 = rb0 ? rb0->getVelocityInLocalPoint(rel_pos1) : btVector3(0,0,0); - btVector3 vel2 = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0); - - vel = vel1 - vel2; - - rel_vel = cp.m_normalWorldOnB.dot(vel); - - solverConstraint.m_penetration = btMin(cp.getDistance()+infoGlobal.m_linearSlop,btScalar(0.)); - //solverConstraint.m_penetration = cp.getDistance(); - - solverConstraint.m_friction = cp.m_combinedFriction; - solverConstraint.m_restitution = restitutionCurve(rel_vel, cp.m_combinedRestitution); - if (solverConstraint.m_restitution <= btScalar(0.)) - { - solverConstraint.m_restitution = 0.f; - }; - - - btScalar penVel = -solverConstraint.m_penetration/infoGlobal.m_timeStep; - - - - if (solverConstraint.m_restitution > penVel) - { - solverConstraint.m_penetration = btScalar(0.); - } - - - - ///warm starting (or zero if disabled) - if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING) - { - solverConstraint.m_appliedImpulse = cp.m_appliedImpulse * infoGlobal.m_warmstartingFactor; - if (rb0) - m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA].internalApplyImpulse(solverConstraint.m_contactNormal*rb0->getInvMass(),solverConstraint.m_angularComponentA,solverConstraint.m_appliedImpulse); - if (rb1) - m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB].internalApplyImpulse(solverConstraint.m_contactNormal*rb1->getInvMass(),solverConstraint.m_angularComponentB,-solverConstraint.m_appliedImpulse); - } else - { - solverConstraint.m_appliedImpulse = 0.f; - } - - solverConstraint.m_appliedPushImpulse = 0.f; - - solverConstraint.m_frictionIndex = m_tmpSolverFrictionConstraintPool.size(); - if (!cp.m_lateralFrictionInitialized) - { - cp.m_lateralFrictionDir1 = vel - cp.m_normalWorldOnB * rel_vel; - - //scale anisotropic friction - - applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1); - applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1); - - btScalar lat_rel_vel = cp.m_lateralFrictionDir1.length2(); - - - if (lat_rel_vel > SIMD_EPSILON)//0.0f) - { - cp.m_lateralFrictionDir1 /= btSqrt(lat_rel_vel); - addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); - cp.m_lateralFrictionDir2 = cp.m_lateralFrictionDir1.cross(cp.m_normalWorldOnB); - cp.m_lateralFrictionDir2.normalize(); - applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2); - applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2); - - addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); - } else - { - //re-calculate friction direction every frame, todo: check if this is really needed - btPlaneSpace1(cp.m_normalWorldOnB,cp.m_lateralFrictionDir1,cp.m_lateralFrictionDir2); - applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2); - applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2); - addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); - addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); - } - cp.m_lateralFrictionInitialized = true; - - } else - { - addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); - addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation); - } - - { - btSolverConstraint& frictionConstraint1 = m_tmpSolverFrictionConstraintPool[solverConstraint.m_frictionIndex]; - if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING) - { - frictionConstraint1.m_appliedImpulse = cp.m_appliedImpulseLateral1 * infoGlobal.m_warmstartingFactor; - if (rb0) - m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA].internalApplyImpulse(frictionConstraint1.m_contactNormal*rb0->getInvMass(),frictionConstraint1.m_angularComponentA,frictionConstraint1.m_appliedImpulse); - if (rb1) - m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB].internalApplyImpulse(frictionConstraint1.m_contactNormal*rb1->getInvMass(),frictionConstraint1.m_angularComponentB,-frictionConstraint1.m_appliedImpulse); - } else - { - frictionConstraint1.m_appliedImpulse = 0.f; - } - } - { - btSolverConstraint& frictionConstraint2 = m_tmpSolverFrictionConstraintPool[solverConstraint.m_frictionIndex+1]; - if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING) - { - frictionConstraint2.m_appliedImpulse = cp.m_appliedImpulseLateral2 * infoGlobal.m_warmstartingFactor; - if (rb0) - m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdA].internalApplyImpulse(frictionConstraint2.m_contactNormal*rb0->getInvMass(),frictionConstraint2.m_angularComponentA,frictionConstraint2.m_appliedImpulse); - if (rb1) - m_tmpSolverBodyPool[solverConstraint.m_solverBodyIdB].internalApplyImpulse(frictionConstraint2.m_contactNormal*rb1->getInvMass(),frictionConstraint2.m_angularComponentB,-frictionConstraint2.m_appliedImpulse); - } else - { - frictionConstraint2.m_appliedImpulse = 0.f; - } - } - } - - - } - } - } - } - } - - btContactSolverInfo info = infoGlobal; + if (1) { int j; for (j=0;jbuildJacobian(); } } - - - int numConstraintPool = m_tmpSolverConstraintPool.size(); - int numFrictionPool = m_tmpSolverFrictionConstraintPool.size(); + btSolverBody& fixedBody = m_tmpSolverBodyPool.expand(); + initSolverBody(&fixedBody,0); - ///todo: use stack allocator for such temporarily memory, same for solver bodies/constraints + //btRigidBody* rb0=0,*rb1=0; + + //if (1) + { + { + + int totalNumRows = 0; + int i; + //calculate the total number of contraint rows + for (i=0;igetInfo1(&info1); + totalNumRows += info1.m_numConstraintRows; + } + m_tmpSolverNonContactConstraintPool.resize(totalNumRows); + + btTypedConstraint::btConstraintInfo1 info1; + info1.m_numConstraintRows = 0; + + + ///setup the btSolverConstraints + int currentRow = 0; + + for (i=0;igetInfo1(&info1); + if (info1.m_numConstraintRows) + { + btAssert(currentRowgetRigidBodyA(); + btRigidBody& rbB = constraint->getRigidBodyB(); + + int solverBodyIdA = getOrInitSolverBody(rbA); + int solverBodyIdB = getOrInitSolverBody(rbB); + + btSolverBody* bodyAPtr = &m_tmpSolverBodyPool[solverBodyIdA]; + btSolverBody* bodyBPtr = &m_tmpSolverBodyPool[solverBodyIdB]; + + int j; + for ( j=0;jm_deltaLinearVelocity.setValue(0.f,0.f,0.f); + bodyAPtr->m_deltaAngularVelocity.setValue(0.f,0.f,0.f); + bodyBPtr->m_deltaLinearVelocity.setValue(0.f,0.f,0.f); + bodyBPtr->m_deltaAngularVelocity.setValue(0.f,0.f,0.f); + + + + btTypedConstraint::btConstraintInfo2 info2; + info2.fps = 1.f/infoGlobal.m_timeStep; + info2.erp = infoGlobal.m_erp; + info2.m_J1linearAxis = currentConstraintRow->m_contactNormal; + info2.m_J1angularAxis = currentConstraintRow->m_relpos1CrossNormal; + info2.m_J2linearAxis = 0; + info2.m_J2angularAxis = currentConstraintRow->m_relpos2CrossNormal; + info2.rowskip = sizeof(btSolverConstraint)/sizeof(btScalar);//check this + ///the size of btSolverConstraint needs be a multiple of btScalar + btAssert(info2.rowskip*sizeof(btScalar)== sizeof(btSolverConstraint)); + info2.m_constraintError = ¤tConstraintRow->m_rhs; + info2.cfm = ¤tConstraintRow->m_cfm; + info2.m_lowerLimit = ¤tConstraintRow->m_lowerLimit; + info2.m_upperLimit = ¤tConstraintRow->m_upperLimit; + constraints[i]->getInfo2(&info2); + + ///finalize the constraint setup + for ( j=0;jgetRigidBodyA().getInvInertiaTensorWorld()*ftorqueAxis1*constraint->getRigidBodyA().getAngularFactor(); + } + { + const btVector3& ftorqueAxis2 = solverConstraint.m_relpos2CrossNormal; + solverConstraint.m_angularComponentB = constraint->getRigidBodyB().getInvInertiaTensorWorld()*ftorqueAxis2*constraint->getRigidBodyB().getAngularFactor(); + } + + { + btVector3 iMJlA = solverConstraint.m_contactNormal*rbA.getInvMass(); + btVector3 iMJaA = rbA.getInvInertiaTensorWorld()*solverConstraint.m_relpos1CrossNormal; + btVector3 iMJlB = solverConstraint.m_contactNormal*rbB.getInvMass();//sign of normal? + btVector3 iMJaB = rbB.getInvInertiaTensorWorld()*solverConstraint.m_relpos2CrossNormal; + + btScalar sum = iMJlA.dot(solverConstraint.m_contactNormal); + sum += iMJaA.dot(solverConstraint.m_relpos1CrossNormal); + sum += iMJlB.dot(solverConstraint.m_contactNormal); + sum += iMJaB.dot(solverConstraint.m_relpos2CrossNormal); + + solverConstraint.m_jacDiagABInv = btScalar(1.)/sum; + } + + + ///fix rhs + ///todo: add force/torque accelerators + { + btScalar rel_vel; + btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(rbA.getLinearVelocity()) + solverConstraint.m_relpos1CrossNormal.dot(rbA.getAngularVelocity()); + btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(rbB.getLinearVelocity()) + solverConstraint.m_relpos2CrossNormal.dot(rbB.getAngularVelocity()); + + rel_vel = vel1Dotn+vel2Dotn; + + btScalar restitution = 0.f; + btScalar positionalError = solverConstraint.m_rhs;//already filled in by getConstraintInfo2 + btScalar velocityError = restitution - rel_vel;// * damping; + btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv; + btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv; + solverConstraint.m_rhs = penetrationImpulse+velocityImpulse; + solverConstraint.m_appliedImpulse = 0.f; + + } + } + } + } + } + + { + int i; + btPersistentManifold* manifold = 0; + btCollisionObject* colObj0=0,*colObj1=0; + + + for (i=0;igetRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) + ///solve all joint constraints, using SIMD, if available + for (j=0;jgetRigidBodyA().getCompanionId()].writebackVelocity(); - } - if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) - { - m_tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].writebackVelocity(); + btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[j]; + resolveSingleConstraintRowGenericSIMD(m_tmpSolverBodyPool[constraint.m_solverBodyIdA],m_tmpSolverBodyPool[constraint.m_solverBodyIdB],constraint); } - constraint->solveConstraint(infoGlobal.m_timeStep); - - if ((constraint->getRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) + for (j=0;jgetRigidBodyA().getCompanionId()].readVelocity(); - } - if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) - { - m_tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].readVelocity(); + int bodyAid = getOrInitSolverBody(constraints[j]->getRigidBodyA()); + int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB()); + btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid]; + btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid]; + constraints[j]->solveConstraintObsolete(bodyA,bodyB,infoGlobal.m_timeStep); } - } - - { - int numPoolConstraints = m_tmpSolverConstraintPool.size(); + ///solve all contact constraints using SIMD, if available + int numPoolConstraints = m_tmpSolverContactConstraintPool.size(); for (j=0;jbtScalar(0)) { - const btSolverConstraint& solveManifold = m_tmpSolverConstraintPool[m_orderTmpConstraintPool[j]]; + solveManifold.m_lowerLimit = -(solveManifold.m_friction*totalImpulse); + solveManifold.m_upperLimit = solveManifold.m_friction*totalImpulse; - resolveSplitPenetrationImpulseCacheFriendly(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], - m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold,infoGlobal); + resolveSingleConstraintRowGenericSIMD(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold); + } + } + } else + { + + ///solve all joint constraints + for (j=0;jgetRigidBodyA()); + int bodyBid = getOrInitSolverBody(constraints[j]->getRigidBodyB()); + btSolverBody& bodyA = m_tmpSolverBodyPool[bodyAid]; + btSolverBody& bodyB = m_tmpSolverBodyPool[bodyBid]; + + constraints[j]->solveConstraintObsolete(bodyA,bodyB,infoGlobal.m_timeStep); + } + + ///solve all contact constraints + int numPoolConstraints = m_tmpSolverContactConstraintPool.size(); + for (j=0;jbtScalar(0)) + { + solveManifold.m_lowerLimit = -(solveManifold.m_friction*totalImpulse); + solveManifold.m_upperLimit = solveManifold.m_friction*totalImpulse; + + resolveSingleConstraintRowGeneric(m_tmpSolverBodyPool[solveManifold.m_solverBodyIdA], m_tmpSolverBodyPool[solveManifold.m_solverBodyIdB],solveManifold); } } } + + } - } - return 0.f; } -btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc) + +/// btSequentialImpulseConstraintSolver Sequentially applies impulses +btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc,btDispatcher* /*dispatcher*/) { + + + + BT_PROFILE("solveGroup"); + //we only implement SOLVER_CACHE_FRIENDLY now + //you need to provide at least some bodies + btAssert(bodies); + btAssert(numBodies); + int i; solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc); solveGroupCacheFriendlyIterations(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc); - int numPoolConstraints = m_tmpSolverConstraintPool.size(); + int numPoolConstraints = m_tmpSolverContactConstraintPool.size(); int j; + for (j=0;jm_appliedImpulse = solveManifold.m_appliedImpulse; - pt->m_appliedImpulseLateral1 = m_tmpSolverFrictionConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse; - pt->m_appliedImpulseLateral2 = m_tmpSolverFrictionConstraintPool[solveManifold.m_frictionIndex+1].m_appliedImpulse; + if (infoGlobal.m_solverMode & SOLVER_USE_FRICTION_WARMSTARTING) + { + pt->m_appliedImpulseLateral1 = m_tmpSolverContactFrictionConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse; + pt->m_appliedImpulseLateral2 = m_tmpSolverContactFrictionConstraintPool[solveManifold.m_frictionIndex+1].m_appliedImpulse; + } //do a callback here? - } if (infoGlobal.m_splitImpulse) @@ -1030,418 +999,26 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisio } else { for ( i=0;igetNumContacts();p++) - { - gOrder[totalPoints].m_manifoldIndex = j; - gOrder[totalPoints].m_pointIndex = p; - totalPoints++; - } - } - } - - { - int j; - for (j=0;jbuildJacobian(); - } - } - - - //should traverse the contacts random order... - int iteration; - - { - for ( iteration = 0;iterationsolveConstraint(info.m_timeStep); - } - - for (j=0;jgetBody0(), - (btRigidBody*)manifold->getBody1() - ,manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); - } - - for (j=0;jgetBody0(), - (btRigidBody*)manifold->getBody1(),manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); - } - - } - } - - - - - return btScalar(0.); -} - - - - - - - -void btSequentialImpulseConstraintSolver::prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer) -{ - - (void)debugDrawer; - - btRigidBody* body0 = (btRigidBody*)manifoldPtr->getBody0(); - btRigidBody* body1 = (btRigidBody*)manifoldPtr->getBody1(); - - - //only necessary to refresh the manifold once (first iteration). The integration is done outside the loop - { -#ifdef FORCE_REFESH_CONTACT_MANIFOLDS - manifoldPtr->refreshContactPoints(body0->getCenterOfMassTransform(),body1->getCenterOfMassTransform()); -#endif //FORCE_REFESH_CONTACT_MANIFOLDS - int numpoints = manifoldPtr->getNumContacts(); - - gTotalContactPoints += numpoints; - - - for (int i=0;igetContactPoint(i); - if (cp.getDistance() <= btScalar(0.)) - { - const btVector3& pos1 = cp.getPositionWorldOnA(); - const btVector3& pos2 = cp.getPositionWorldOnB(); - - btVector3 rel_pos1 = pos1 - body0->getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - body1->getCenterOfMassPosition(); - - - //this jacobian entry is re-used for all iterations - btJacobianEntry jac(body0->getCenterOfMassTransform().getBasis().transpose(), - body1->getCenterOfMassTransform().getBasis().transpose(), - rel_pos1,rel_pos2,cp.m_normalWorldOnB,body0->getInvInertiaDiagLocal(),body0->getInvMass(), - body1->getInvInertiaDiagLocal(),body1->getInvMass()); - - - btScalar jacDiagAB = jac.getDiagonal(); - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - if (cpd) - { - //might be invalid - cpd->m_persistentLifeTime++; - if (cpd->m_persistentLifeTime != cp.getLifeTime()) - { - //printf("Invalid: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); - new (cpd) btConstraintPersistentData; - cpd->m_persistentLifeTime = cp.getLifeTime(); - - } else - { - //printf("Persistent: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); - - } - } else - { - - //todo: should this be in a pool? - void* mem = btAlignedAlloc(sizeof(btConstraintPersistentData),16); - cpd = new (mem)btConstraintPersistentData; - assert(cpd); - - totalCpd ++; - //printf("totalCpd = %i Created Ptr %x\n",totalCpd,cpd); - cp.m_userPersistentData = cpd; - cpd->m_persistentLifeTime = cp.getLifeTime(); - //printf("CREATED: %x . cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd,cpd->m_persistentLifeTime,cp.getLifeTime()); - - } - assert(cpd); - - cpd->m_jacDiagABInv = btScalar(1.) / jacDiagAB; - - //Dependent on Rigidbody A and B types, fetch the contact/friction response func - //perhaps do a similar thing for friction/restutution combiner funcs... - - cpd->m_frictionSolverFunc = m_frictionDispatch[body0->m_frictionSolverType][body1->m_frictionSolverType]; - cpd->m_contactSolverFunc = m_contactDispatch[body0->m_contactSolverType][body1->m_contactSolverType]; - - btVector3 vel1 = body0->getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body1->getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; - rel_vel = cp.m_normalWorldOnB.dot(vel); - - btScalar combinedRestitution = cp.m_combinedRestitution; - - cpd->m_penetration = cp.getDistance();///btScalar(info.m_numIterations); - cpd->m_friction = cp.m_combinedFriction; - cpd->m_restitution = restitutionCurve(rel_vel, combinedRestitution); - if (cpd->m_restitution <= btScalar(0.)) - { - cpd->m_restitution = btScalar(0.0); - - }; - - //restitution and penetration work in same direction so - //rel_vel - - btScalar penVel = -cpd->m_penetration/info.m_timeStep; - - if (cpd->m_restitution > penVel) - { - cpd->m_penetration = btScalar(0.); - } - - - btScalar relaxation = info.m_damping; - if (info.m_solverMode & SOLVER_USE_WARMSTARTING) - { - cpd->m_appliedImpulse *= relaxation; - } else - { - cpd->m_appliedImpulse =btScalar(0.); - } - - //for friction - cpd->m_prevAppliedImpulse = cpd->m_appliedImpulse; - - //re-calculate friction direction every frame, todo: check if this is really needed - btPlaneSpace1(cp.m_normalWorldOnB,cpd->m_frictionWorldTangential0,cpd->m_frictionWorldTangential1); - - -#define NO_FRICTION_WARMSTART 1 - - #ifdef NO_FRICTION_WARMSTART - cpd->m_accumulatedTangentImpulse0 = btScalar(0.); - cpd->m_accumulatedTangentImpulse1 = btScalar(0.); - #endif //NO_FRICTION_WARMSTART - btScalar denom0 = body0->computeImpulseDenominator(pos1,cpd->m_frictionWorldTangential0); - btScalar denom1 = body1->computeImpulseDenominator(pos2,cpd->m_frictionWorldTangential0); - btScalar denom = relaxation/(denom0+denom1); - cpd->m_jacDiagABInvTangent0 = denom; - - - denom0 = body0->computeImpulseDenominator(pos1,cpd->m_frictionWorldTangential1); - denom1 = body1->computeImpulseDenominator(pos2,cpd->m_frictionWorldTangential1); - denom = relaxation/(denom0+denom1); - cpd->m_jacDiagABInvTangent1 = denom; - - btVector3 totalImpulse = - #ifndef NO_FRICTION_WARMSTART - cpd->m_frictionWorldTangential0*cpd->m_accumulatedTangentImpulse0+ - cpd->m_frictionWorldTangential1*cpd->m_accumulatedTangentImpulse1+ - #endif //NO_FRICTION_WARMSTART - cp.m_normalWorldOnB*cpd->m_appliedImpulse; - - - - /// - { - btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); - cpd->m_angularComponentA = body0->getInvInertiaTensorWorld()*torqueAxis0; - btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); - cpd->m_angularComponentB = body1->getInvInertiaTensorWorld()*torqueAxis1; - } - { - btVector3 ftorqueAxis0 = rel_pos1.cross(cpd->m_frictionWorldTangential0); - cpd->m_frictionAngularComponent0A = body0->getInvInertiaTensorWorld()*ftorqueAxis0; - } - { - btVector3 ftorqueAxis1 = rel_pos1.cross(cpd->m_frictionWorldTangential1); - cpd->m_frictionAngularComponent1A = body0->getInvInertiaTensorWorld()*ftorqueAxis1; - } - { - btVector3 ftorqueAxis0 = rel_pos2.cross(cpd->m_frictionWorldTangential0); - cpd->m_frictionAngularComponent0B = body1->getInvInertiaTensorWorld()*ftorqueAxis0; - } - { - btVector3 ftorqueAxis1 = rel_pos2.cross(cpd->m_frictionWorldTangential1); - cpd->m_frictionAngularComponent1B = body1->getInvInertiaTensorWorld()*ftorqueAxis1; - } - - /// - - - - //apply previous frames impulse on both bodies - body0->applyImpulse(totalImpulse, rel_pos1); - body1->applyImpulse(-totalImpulse, rel_pos2); - } - - } - } -} - - -btScalar btSequentialImpulseConstraintSolver::solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) -{ - btScalar maxImpulse = btScalar(0.); - - { - - - { - if (cp.getDistance() <= btScalar(0.)) - { - - - - { - - //btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - btScalar impulse = resolveSingleCollisionCombined( - *body0,*body1, - cp, - info); - - if (maxImpulse < impulse) - maxImpulse = impulse; - - } - } - } - } - return maxImpulse; -} - - - -btScalar btSequentialImpulseConstraintSolver::solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) -{ - - btScalar maxImpulse = btScalar(0.); - - { - - - { - if (cp.getDistance() <= btScalar(0.)) - { - - - - { - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - btScalar impulse = cpd->m_contactSolverFunc( - *body0,*body1, - cp, - info); - - if (maxImpulse < impulse) - maxImpulse = impulse; - - } - } - } - } - return maxImpulse; -} - -btScalar btSequentialImpulseConstraintSolver::solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) -{ - - (void)debugDrawer; - (void)iter; - - - { - - - { - - if (cp.getDistance() <= btScalar(0.)) - { - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - cpd->m_frictionSolverFunc( - *body0,*body1, - cp, - info); - - - } - } - - - } - return btScalar(0.); -} void btSequentialImpulseConstraintSolver::reset() diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h index 7143bc41991..90e7fc8354d 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h @@ -23,67 +23,59 @@ class btIDebugDraw; #include "btSolverConstraint.h" -/// btSequentialImpulseConstraintSolver uses a Propagation Method and Sequentially applies impulses -/// The approach is the 3D version of Erin Catto's GDC 2006 tutorial. See http://www.gphysics.com -/// Although Sequential Impulse is more intuitive, it is mathematically equivalent to Projected Successive Overrelaxation (iterative LCP) -/// Applies impulses for combined restitution and penetration recovery and to simulate friction + +///The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method. class btSequentialImpulseConstraintSolver : public btConstraintSolver { +protected: btAlignedObjectArray m_tmpSolverBodyPool; - btAlignedObjectArray m_tmpSolverConstraintPool; - btAlignedObjectArray m_tmpSolverFrictionConstraintPool; + btConstraintArray m_tmpSolverContactConstraintPool; + btConstraintArray m_tmpSolverNonContactConstraintPool; + btConstraintArray m_tmpSolverContactFrictionConstraintPool; btAlignedObjectArray m_orderTmpConstraintPool; btAlignedObjectArray m_orderFrictionConstraintPool; - -protected: - btScalar solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); - btScalar solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); - void prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer); - void addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation); - - ContactSolverFunc m_contactDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; - ContactSolverFunc m_frictionDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; - + btSolverConstraint& addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation); ///m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction unsigned long m_btSeed2; + void initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject); + btScalar restitutionCurve(btScalar rel_vel, btScalar restitution); + + void convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal); + + void resolveSplitPenetrationImpulseCacheFriendly( + btSolverBody& body1, + btSolverBody& body2, + const btSolverConstraint& contactConstraint, + const btContactSolverInfo& solverInfo); + + //internal method + int getOrInitSolverBody(btCollisionObject& body); + + void resolveSingleConstraintRowGeneric(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& contactConstraint); + + void resolveSingleConstraintRowGenericSIMD(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& contactConstraint); + + void resolveSingleConstraintRowLowerLimit(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& contactConstraint); + + void resolveSingleConstraintRowLowerLimitSIMD(btSolverBody& body1,btSolverBody& body2,const btSolverConstraint& contactConstraint); + public: btSequentialImpulseConstraintSolver(); - - ///Advanced: Override the default contact solving function for contacts, for certain types of rigidbody - ///See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType - void setContactSolverFunc(ContactSolverFunc func,int type0,int type1) - { - m_contactDispatch[type0][type1] = func; - } - - ///Advanced: Override the default friction solving function for contacts, for certain types of rigidbody - ///See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType - void SetFrictionSolverFunc(ContactSolverFunc func,int type0,int type1) - { - m_frictionDispatch[type0][type1] = func; - } - virtual ~btSequentialImpulseConstraintSolver(); - + virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher); - - virtual btScalar solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); - btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); + btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); - + btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); ///clear internal cached data and reset random seed virtual void reset(); - - btScalar solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); - - unsigned long btRand2(); diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp index 4128f504bf1..133aed7271b 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp @@ -18,14 +18,14 @@ Added by Roman Ponomarev (rponom@gmail.com) April 04, 2008 */ -//----------------------------------------------------------------------------- + #include "btSliderConstraint.h" #include "BulletDynamics/Dynamics/btRigidBody.h" #include "LinearMath/btTransformUtil.h" #include -//----------------------------------------------------------------------------- + void btSliderConstraint::initParams() { @@ -62,32 +62,56 @@ void btSliderConstraint::initParams() m_maxAngMotorForce = btScalar(0.); m_accumulatedAngMotorImpulse = btScalar(0.0); -} // btSliderConstraint::initParams() +} + -//----------------------------------------------------------------------------- btSliderConstraint::btSliderConstraint() :btTypedConstraint(SLIDER_CONSTRAINT_TYPE), - m_useLinearReferenceFrameA(true) + m_useLinearReferenceFrameA(true), + m_useSolveConstraintObsolete(false) +// m_useSolveConstraintObsolete(true) { initParams(); -} // btSliderConstraint::btSliderConstraint() +} + -//----------------------------------------------------------------------------- btSliderConstraint::btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA) : btTypedConstraint(SLIDER_CONSTRAINT_TYPE, rbA, rbB) , m_frameInA(frameInA) , m_frameInB(frameInB), - m_useLinearReferenceFrameA(useLinearReferenceFrameA) + m_useLinearReferenceFrameA(useLinearReferenceFrameA), + m_useSolveConstraintObsolete(false) +// m_useSolveConstraintObsolete(true) { initParams(); -} // btSliderConstraint::btSliderConstraint() +} + + +static btRigidBody s_fixed(0, 0, 0); +btSliderConstraint::btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB) + : btTypedConstraint(SLIDER_CONSTRAINT_TYPE, s_fixed, rbB) + , + m_frameInB(frameInB), + m_useLinearReferenceFrameA(useLinearReferenceFrameB), + m_useSolveConstraintObsolete(false) +// m_useSolveConstraintObsolete(true) +{ + ///not providing rigidbody B means implicitly using worldspace for body B +// m_frameInA.getOrigin() = m_rbA.getCenterOfMassTransform()(m_frameInA.getOrigin()); + + initParams(); +} + -//----------------------------------------------------------------------------- void btSliderConstraint::buildJacobian() { + if (!m_useSolveConstraintObsolete) + { + return; + } if(m_useLinearReferenceFrameA) { buildJacobianInt(m_rbA, m_rbB, m_frameInA, m_frameInB); @@ -96,9 +120,9 @@ void btSliderConstraint::buildJacobian() { buildJacobianInt(m_rbB, m_rbA, m_frameInB, m_frameInA); } -} // btSliderConstraint::buildJacobian() +} + -//----------------------------------------------------------------------------- void btSliderConstraint::buildJacobianInt(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB) { @@ -151,31 +175,376 @@ void btSliderConstraint::buildJacobianInt(btRigidBody& rbA, btRigidBody& rbB, co // clear accumulator for motors m_accumulatedLinMotorImpulse = btScalar(0.0); m_accumulatedAngMotorImpulse = btScalar(0.0); -} // btSliderConstraint::buildJacobianInt() +} -//----------------------------------------------------------------------------- -void btSliderConstraint::solveConstraint(btScalar timeStep) + +void btSliderConstraint::getInfo1(btConstraintInfo1* info) { - m_timeStep = timeStep; - if(m_useLinearReferenceFrameA) + if (m_useSolveConstraintObsolete) { - solveConstraintInt(m_rbA, m_rbB); + info->m_numConstraintRows = 0; + info->nub = 0; } else { - solveConstraintInt(m_rbB, m_rbA); + info->m_numConstraintRows = 4; // Fixed 2 linear + 2 angular + info->nub = 2; + //prepare constraint + calculateTransforms(); + testLinLimits(); + if(getSolveLinLimit() || getPoweredLinMotor()) + { + info->m_numConstraintRows++; // limit 3rd linear as well + info->nub--; + } + testAngLimits(); + if(getSolveAngLimit() || getPoweredAngMotor()) + { + info->m_numConstraintRows++; // limit 3rd angular as well + info->nub--; + } } -} // btSliderConstraint::solveConstraint() +} -//----------------------------------------------------------------------------- -void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) + +void btSliderConstraint::getInfo2(btConstraintInfo2* info) +{ + btAssert(!m_useSolveConstraintObsolete); + int i, s = info->rowskip; + const btTransform& trA = getCalculatedTransformA(); + const btTransform& trB = getCalculatedTransformB(); + btScalar signFact = m_useLinearReferenceFrameA ? btScalar(1.0f) : btScalar(-1.0f); + // make rotations around Y and Z equal + // the slider axis should be the only unconstrained + // rotational axis, the angular velocity of the two bodies perpendicular to + // the slider axis should be equal. thus the constraint equations are + // p*w1 - p*w2 = 0 + // q*w1 - q*w2 = 0 + // where p and q are unit vectors normal to the slider axis, and w1 and w2 + // are the angular velocity vectors of the two bodies. + // get slider axis (X) + btVector3 ax1 = trA.getBasis().getColumn(0); + // get 2 orthos to slider axis (Y, Z) + btVector3 p = trA.getBasis().getColumn(1); + btVector3 q = trA.getBasis().getColumn(2); + // set the two slider rows + info->m_J1angularAxis[0] = p[0]; + info->m_J1angularAxis[1] = p[1]; + info->m_J1angularAxis[2] = p[2]; + info->m_J1angularAxis[s+0] = q[0]; + info->m_J1angularAxis[s+1] = q[1]; + info->m_J1angularAxis[s+2] = q[2]; + + info->m_J2angularAxis[0] = -p[0]; + info->m_J2angularAxis[1] = -p[1]; + info->m_J2angularAxis[2] = -p[2]; + info->m_J2angularAxis[s+0] = -q[0]; + info->m_J2angularAxis[s+1] = -q[1]; + info->m_J2angularAxis[s+2] = -q[2]; + // compute the right hand side of the constraint equation. set relative + // body velocities along p and q to bring the slider back into alignment. + // if ax1,ax2 are the unit length slider axes as computed from body1 and + // body2, we need to rotate both bodies along the axis u = (ax1 x ax2). + // if "theta" is the angle between ax1 and ax2, we need an angular velocity + // along u to cover angle erp*theta in one step : + // |angular_velocity| = angle/time = erp*theta / stepsize + // = (erp*fps) * theta + // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2| + // = (erp*fps) * theta * (ax1 x ax2) / sin(theta) + // ...as ax1 and ax2 are unit length. if theta is smallish, + // theta ~= sin(theta), so + // angular_velocity = (erp*fps) * (ax1 x ax2) + // ax1 x ax2 is in the plane space of ax1, so we project the angular + // velocity to p and q to find the right hand side. + btScalar k = info->fps * info->erp * getSoftnessOrthoAng(); + btVector3 ax2 = trB.getBasis().getColumn(0); + btVector3 u = ax1.cross(ax2); + info->m_constraintError[0] = k * u.dot(p); + info->m_constraintError[s] = k * u.dot(q); + // pull out pos and R for both bodies. also get the connection + // vector c = pos2-pos1. + // next two rows. we want: vel2 = vel1 + w1 x c ... but this would + // result in three equations, so we project along the planespace vectors + // so that sliding along the slider axis is disregarded. for symmetry we + // also consider rotation around center of mass of two bodies (factA and factB). + btTransform bodyA_trans = m_rbA.getCenterOfMassTransform(); + btTransform bodyB_trans = m_rbB.getCenterOfMassTransform(); + int s2 = 2 * s, s3 = 3 * s; + btVector3 c; + btScalar miA = m_rbA.getInvMass(); + btScalar miB = m_rbB.getInvMass(); + btScalar miS = miA + miB; + btScalar factA, factB; + if(miS > btScalar(0.f)) + { + factA = miB / miS; + } + else + { + factA = btScalar(0.5f); + } + if(factA > 0.99f) factA = 0.99f; + if(factA < 0.01f) factA = 0.01f; + factB = btScalar(1.0f) - factA; + c = bodyB_trans.getOrigin() - bodyA_trans.getOrigin(); + btVector3 tmp = c.cross(p); + for (i=0; i<3; i++) info->m_J1angularAxis[s2+i] = factA*tmp[i]; + for (i=0; i<3; i++) info->m_J2angularAxis[s2+i] = factB*tmp[i]; + tmp = c.cross(q); + for (i=0; i<3; i++) info->m_J1angularAxis[s3+i] = factA*tmp[i]; + for (i=0; i<3; i++) info->m_J2angularAxis[s3+i] = factB*tmp[i]; + + for (i=0; i<3; i++) info->m_J1linearAxis[s2+i] = p[i]; + for (i=0; i<3; i++) info->m_J1linearAxis[s3+i] = q[i]; + // compute two elements of right hand side. we want to align the offset + // point (in body 2's frame) with the center of body 1. + btVector3 ofs; // offset point in global coordinates + ofs = trB.getOrigin() - trA.getOrigin(); + k = info->fps * info->erp * getSoftnessOrthoLin(); + info->m_constraintError[s2] = k * p.dot(ofs); + info->m_constraintError[s3] = k * q.dot(ofs); + int nrow = 3; // last filled row + int srow; + // check linear limits linear + btScalar limit_err = btScalar(0.0); + int limit = 0; + if(getSolveLinLimit()) + { + limit_err = getLinDepth() * signFact; + limit = (limit_err > btScalar(0.0)) ? 2 : 1; + } + int powered = 0; + if(getPoweredLinMotor()) + { + powered = 1; + } + // if the slider has joint limits or motor, add in the extra row + if (limit || powered) + { + nrow++; + srow = nrow * info->rowskip; + info->m_J1linearAxis[srow+0] = ax1[0]; + info->m_J1linearAxis[srow+1] = ax1[1]; + info->m_J1linearAxis[srow+2] = ax1[2]; + // linear torque decoupling step: + // + // we have to be careful that the linear constraint forces (+/- ax1) applied to the two bodies + // do not create a torque couple. in other words, the points that the + // constraint force is applied at must lie along the same ax1 axis. + // a torque couple will result in limited slider-jointed free + // bodies from gaining angular momentum. + // the solution used here is to apply the constraint forces at the center of mass of the two bodies + btVector3 ltd; // Linear Torque Decoupling vector (a torque) +// c = btScalar(0.5) * c; + ltd = c.cross(ax1); + info->m_J1angularAxis[srow+0] = factA*ltd[0]; + info->m_J1angularAxis[srow+1] = factA*ltd[1]; + info->m_J1angularAxis[srow+2] = factA*ltd[2]; + info->m_J2angularAxis[srow+0] = factB*ltd[0]; + info->m_J2angularAxis[srow+1] = factB*ltd[1]; + info->m_J2angularAxis[srow+2] = factB*ltd[2]; + // right-hand part + btScalar lostop = getLowerLinLimit(); + btScalar histop = getUpperLinLimit(); + if(limit && (lostop == histop)) + { // the joint motor is ineffective + powered = 0; + } + info->m_constraintError[srow] = 0.; + info->m_lowerLimit[srow] = 0.; + info->m_upperLimit[srow] = 0.; + if(powered) + { + info->cfm[nrow] = btScalar(0.0); + btScalar tag_vel = getTargetLinMotorVelocity(); + btScalar mot_fact = getMotorFactor(m_linPos, m_lowerLinLimit, m_upperLinLimit, tag_vel, info->fps * info->erp); +// info->m_constraintError[srow] += mot_fact * getTargetLinMotorVelocity(); + info->m_constraintError[srow] -= signFact * mot_fact * getTargetLinMotorVelocity(); + info->m_lowerLimit[srow] += -getMaxLinMotorForce() * info->fps; + info->m_upperLimit[srow] += getMaxLinMotorForce() * info->fps; + } + if(limit) + { + k = info->fps * info->erp; + info->m_constraintError[srow] += k * limit_err; + info->cfm[srow] = btScalar(0.0); // stop_cfm; + if(lostop == histop) + { // limited low and high simultaneously + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else if(limit == 1) + { // low limit + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = 0; + } + else + { // high limit + info->m_lowerLimit[srow] = 0; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + // bounce (we'll use slider parameter abs(1.0 - m_dampingLimLin) for that) + btScalar bounce = btFabs(btScalar(1.0) - getDampingLimLin()); + if(bounce > btScalar(0.0)) + { + btScalar vel = m_rbA.getLinearVelocity().dot(ax1); + vel -= m_rbB.getLinearVelocity().dot(ax1); + vel *= signFact; + // only apply bounce if the velocity is incoming, and if the + // resulting c[] exceeds what we already have. + if(limit == 1) + { // low limit + if(vel < 0) + { + btScalar newc = -bounce * vel; + if (newc > info->m_constraintError[srow]) + { + info->m_constraintError[srow] = newc; + } + } + } + else + { // high limit - all those computations are reversed + if(vel > 0) + { + btScalar newc = -bounce * vel; + if(newc < info->m_constraintError[srow]) + { + info->m_constraintError[srow] = newc; + } + } + } + } + info->m_constraintError[srow] *= getSoftnessLimLin(); + } // if(limit) + } // if linear limit + // check angular limits + limit_err = btScalar(0.0); + limit = 0; + if(getSolveAngLimit()) + { + limit_err = getAngDepth(); + limit = (limit_err > btScalar(0.0)) ? 1 : 2; + } + // if the slider has joint limits, add in the extra row + powered = 0; + if(getPoweredAngMotor()) + { + powered = 1; + } + if(limit || powered) + { + nrow++; + srow = nrow * info->rowskip; + info->m_J1angularAxis[srow+0] = ax1[0]; + info->m_J1angularAxis[srow+1] = ax1[1]; + info->m_J1angularAxis[srow+2] = ax1[2]; + + info->m_J2angularAxis[srow+0] = -ax1[0]; + info->m_J2angularAxis[srow+1] = -ax1[1]; + info->m_J2angularAxis[srow+2] = -ax1[2]; + + btScalar lostop = getLowerAngLimit(); + btScalar histop = getUpperAngLimit(); + if(limit && (lostop == histop)) + { // the joint motor is ineffective + powered = 0; + } + if(powered) + { + info->cfm[srow] = btScalar(0.0); + btScalar mot_fact = getMotorFactor(m_angPos, m_lowerAngLimit, m_upperAngLimit, getTargetAngMotorVelocity(), info->fps * info->erp); + info->m_constraintError[srow] = mot_fact * getTargetAngMotorVelocity(); + info->m_lowerLimit[srow] = -getMaxAngMotorForce() * info->fps; + info->m_upperLimit[srow] = getMaxAngMotorForce() * info->fps; + } + if(limit) + { + k = info->fps * info->erp; + info->m_constraintError[srow] += k * limit_err; + info->cfm[srow] = btScalar(0.0); // stop_cfm; + if(lostop == histop) + { + // limited low and high simultaneously + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else if(limit == 1) + { // low limit + info->m_lowerLimit[srow] = 0; + info->m_upperLimit[srow] = SIMD_INFINITY; + } + else + { // high limit + info->m_lowerLimit[srow] = -SIMD_INFINITY; + info->m_upperLimit[srow] = 0; + } + // bounce (we'll use slider parameter abs(1.0 - m_dampingLimAng) for that) + btScalar bounce = btFabs(btScalar(1.0) - getDampingLimAng()); + if(bounce > btScalar(0.0)) + { + btScalar vel = m_rbA.getAngularVelocity().dot(ax1); + vel -= m_rbB.getAngularVelocity().dot(ax1); + // only apply bounce if the velocity is incoming, and if the + // resulting c[] exceeds what we already have. + if(limit == 1) + { // low limit + if(vel < 0) + { + btScalar newc = -bounce * vel; + if(newc > info->m_constraintError[srow]) + { + info->m_constraintError[srow] = newc; + } + } + } + else + { // high limit - all those computations are reversed + if(vel > 0) + { + btScalar newc = -bounce * vel; + if(newc < info->m_constraintError[srow]) + { + info->m_constraintError[srow] = newc; + } + } + } + } + info->m_constraintError[srow] *= getSoftnessLimAng(); + } // if(limit) + } // if angular limit or powered +} + + + +void btSliderConstraint::solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep) +{ + if (m_useSolveConstraintObsolete) + { + m_timeStep = timeStep; + if(m_useLinearReferenceFrameA) + { + solveConstraintInt(m_rbA,bodyA, m_rbB,bodyB); + } + else + { + solveConstraintInt(m_rbB,bodyB, m_rbA,bodyA); + } + } +} + + + +void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btSolverBody& bodyA,btRigidBody& rbB, btSolverBody& bodyB) { int i; // linear - btVector3 velA = rbA.getVelocityInLocalPoint(m_relPosA); - btVector3 velB = rbB.getVelocityInLocalPoint(m_relPosB); + btVector3 velA; + bodyA.getVelocityInLocalPointObsolete(m_relPosA,velA); + btVector3 velB; + bodyB.getVelocityInLocalPointObsolete(m_relPosB,velB); btVector3 vel = velA - velB; for(i = 0; i < 3; i++) { @@ -190,8 +559,18 @@ void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) // calcutate and apply impulse btScalar normalImpulse = softness * (restitution * depth / m_timeStep - damping * rel_vel) * m_jacLinDiagABInv[i]; btVector3 impulse_vector = normal * normalImpulse; - rbA.applyImpulse( impulse_vector, m_relPosA); - rbB.applyImpulse(-impulse_vector, m_relPosB); + + //rbA.applyImpulse( impulse_vector, m_relPosA); + //rbB.applyImpulse(-impulse_vector, m_relPosB); + { + btVector3 ftorqueAxis1 = m_relPosA.cross(normal); + btVector3 ftorqueAxis2 = m_relPosB.cross(normal); + bodyA.applyImpulse(normal*rbA.getInvMass(), rbA.getInvInertiaTensorWorld()*ftorqueAxis1,normalImpulse); + bodyB.applyImpulse(normal*rbB.getInvMass(), rbB.getInvInertiaTensorWorld()*ftorqueAxis2,-normalImpulse); + } + + + if(m_poweredLinMotor && (!i)) { // apply linear motor if(m_accumulatedLinMotorImpulse < m_maxLinMotorForce) @@ -217,8 +596,18 @@ void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) m_accumulatedLinMotorImpulse = new_acc; // apply clamped impulse impulse_vector = normal * normalImpulse; - rbA.applyImpulse( impulse_vector, m_relPosA); - rbB.applyImpulse(-impulse_vector, m_relPosB); + //rbA.applyImpulse( impulse_vector, m_relPosA); + //rbB.applyImpulse(-impulse_vector, m_relPosB); + + { + btVector3 ftorqueAxis1 = m_relPosA.cross(normal); + btVector3 ftorqueAxis2 = m_relPosB.cross(normal); + bodyA.applyImpulse(normal*rbA.getInvMass(), rbA.getInvInertiaTensorWorld()*ftorqueAxis1,normalImpulse); + bodyB.applyImpulse(normal*rbB.getInvMass(), rbB.getInvInertiaTensorWorld()*ftorqueAxis2,-normalImpulse); + } + + + } } } @@ -227,8 +616,10 @@ void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) btVector3 axisA = m_calculatedTransformA.getBasis().getColumn(0); btVector3 axisB = m_calculatedTransformB.getBasis().getColumn(0); - const btVector3& angVelA = rbA.getAngularVelocity(); - const btVector3& angVelB = rbB.getAngularVelocity(); + btVector3 angVelA; + bodyA.getAngularVelocity(angVelA); + btVector3 angVelB; + bodyB.getAngularVelocity(angVelB); btVector3 angVelAroundAxisA = axisA * axisA.dot(angVelA); btVector3 angVelAroundAxisB = axisB * axisB.dot(angVelB); @@ -238,24 +629,38 @@ void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) btVector3 velrelOrthog = angAorthog-angBorthog; //solve orthogonal angular velocity correction btScalar len = velrelOrthog.length(); + btScalar orthorImpulseMag = 0.f; + if (len > btScalar(0.00001)) { btVector3 normal = velrelOrthog.normalized(); btScalar denom = rbA.computeAngularImpulseDenominator(normal) + rbB.computeAngularImpulseDenominator(normal); - velrelOrthog *= (btScalar(1.)/denom) * m_dampingOrthoAng * m_softnessOrthoAng; + //velrelOrthog *= (btScalar(1.)/denom) * m_dampingOrthoAng * m_softnessOrthoAng; + orthorImpulseMag = (btScalar(1.)/denom) * m_dampingOrthoAng * m_softnessOrthoAng; } //solve angular positional correction btVector3 angularError = axisA.cross(axisB) *(btScalar(1.)/m_timeStep); + btVector3 angularAxis = angularError; + btScalar angularImpulseMag = 0; + btScalar len2 = angularError.length(); if (len2>btScalar(0.00001)) { btVector3 normal2 = angularError.normalized(); btScalar denom2 = rbA.computeAngularImpulseDenominator(normal2) + rbB.computeAngularImpulseDenominator(normal2); - angularError *= (btScalar(1.)/denom2) * m_restitutionOrthoAng * m_softnessOrthoAng; + angularImpulseMag = (btScalar(1.)/denom2) * m_restitutionOrthoAng * m_softnessOrthoAng; + angularError *= angularImpulseMag; } // apply impulse - rbA.applyTorqueImpulse(-velrelOrthog+angularError); - rbB.applyTorqueImpulse(velrelOrthog-angularError); + //rbA.applyTorqueImpulse(-velrelOrthog+angularError); + //rbB.applyTorqueImpulse(velrelOrthog-angularError); + + bodyA.applyImpulse(btVector3(0,0,0), rbA.getInvInertiaTensorWorld()*velrelOrthog,-orthorImpulseMag); + bodyB.applyImpulse(btVector3(0,0,0), rbB.getInvInertiaTensorWorld()*velrelOrthog,orthorImpulseMag); + bodyA.applyImpulse(btVector3(0,0,0), rbA.getInvInertiaTensorWorld()*angularAxis,angularImpulseMag); + bodyB.applyImpulse(btVector3(0,0,0), rbB.getInvInertiaTensorWorld()*angularAxis,-angularImpulseMag); + + btScalar impulseMag; //solve angular limits if(m_solveAngLim) @@ -269,8 +674,14 @@ void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) impulseMag *= m_kAngle * m_softnessDirAng; } btVector3 impulse = axisA * impulseMag; - rbA.applyTorqueImpulse(impulse); - rbB.applyTorqueImpulse(-impulse); + //rbA.applyTorqueImpulse(impulse); + //rbB.applyTorqueImpulse(-impulse); + + bodyA.applyImpulse(btVector3(0,0,0), rbA.getInvInertiaTensorWorld()*axisA,impulseMag); + bodyB.applyImpulse(btVector3(0,0,0), rbB.getInvInertiaTensorWorld()*axisA,-impulseMag); + + + //apply angular motor if(m_poweredAngMotor) { @@ -301,18 +712,21 @@ void btSliderConstraint::solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB) m_accumulatedAngMotorImpulse = new_acc; // apply clamped impulse btVector3 motorImp = angImpulse * axisA; - m_rbA.applyTorqueImpulse(motorImp); - m_rbB.applyTorqueImpulse(-motorImp); + //rbA.applyTorqueImpulse(motorImp); + //rbB.applyTorqueImpulse(-motorImp); + + bodyA.applyImpulse(btVector3(0,0,0), rbA.getInvInertiaTensorWorld()*axisA,angImpulse); + bodyB.applyImpulse(btVector3(0,0,0), rbB.getInvInertiaTensorWorld()*axisA,-angImpulse); } } -} // btSliderConstraint::solveConstraint() +} + + -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- void btSliderConstraint::calculateTransforms(void){ - if(m_useLinearReferenceFrameA) + if(m_useLinearReferenceFrameA || (!m_useSolveConstraintObsolete)) { m_calculatedTransformA = m_rbA.getCenterOfMassTransform() * m_frameInA; m_calculatedTransformB = m_rbB.getCenterOfMassTransform() * m_frameInB; @@ -325,7 +739,14 @@ void btSliderConstraint::calculateTransforms(void){ m_realPivotAInW = m_calculatedTransformA.getOrigin(); m_realPivotBInW = m_calculatedTransformB.getOrigin(); m_sliderAxis = m_calculatedTransformA.getBasis().getColumn(0); // along X - m_delta = m_realPivotBInW - m_realPivotAInW; + if(m_useLinearReferenceFrameA || m_useSolveConstraintObsolete) + { + m_delta = m_realPivotBInW - m_realPivotAInW; + } + else + { + m_delta = m_realPivotAInW - m_realPivotBInW; + } m_projPivotInW = m_realPivotAInW + m_sliderAxis.dot(m_delta) * m_sliderAxis; btVector3 normalWorld; int i; @@ -335,9 +756,9 @@ void btSliderConstraint::calculateTransforms(void){ normalWorld = m_calculatedTransformA.getBasis().getColumn(i); m_depth[i] = m_delta.dot(normalWorld); } -} // btSliderConstraint::calculateTransforms() +} -//----------------------------------------------------------------------------- + void btSliderConstraint::testLinLimits(void) { @@ -364,10 +785,9 @@ void btSliderConstraint::testLinLimits(void) { m_depth[0] = btScalar(0.); } -} // btSliderConstraint::testLinLimits() +} + -//----------------------------------------------------------------------------- - void btSliderConstraint::testAngLimits(void) { @@ -379,6 +799,7 @@ void btSliderConstraint::testAngLimits(void) const btVector3 axisA1 = m_calculatedTransformA.getBasis().getColumn(2); const btVector3 axisB0 = m_calculatedTransformB.getBasis().getColumn(1); btScalar rot = btAtan2Fast(axisB0.dot(axisA1), axisB0.dot(axisA0)); + m_angPos = rot; if(rot < m_lowerAngLimit) { m_angDepth = rot - m_lowerAngLimit; @@ -390,11 +811,8 @@ void btSliderConstraint::testAngLimits(void) m_solveAngLim = true; } } -} // btSliderConstraint::testAngLimits() - +} -//----------------------------------------------------------------------------- - btVector3 btSliderConstraint::getAncorInA(void) @@ -403,13 +821,13 @@ btVector3 btSliderConstraint::getAncorInA(void) ancorInA = m_realPivotAInW + (m_lowerLinLimit + m_upperLinLimit) * btScalar(0.5) * m_sliderAxis; ancorInA = m_rbA.getCenterOfMassTransform().inverse() * ancorInA; return ancorInA; -} // btSliderConstraint::getAncorInA() +} + -//----------------------------------------------------------------------------- btVector3 btSliderConstraint::getAncorInB(void) { btVector3 ancorInB; ancorInB = m_frameInB.getOrigin(); return ancorInB; -} // btSliderConstraint::getAncorInB(); +} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h index 580dfa1178d..01cef59ed31 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h @@ -25,27 +25,29 @@ TODO: #ifndef SLIDER_CONSTRAINT_H #define SLIDER_CONSTRAINT_H -//----------------------------------------------------------------------------- + #include "LinearMath/btVector3.h" #include "btJacobianEntry.h" #include "btTypedConstraint.h" -//----------------------------------------------------------------------------- + class btRigidBody; -//----------------------------------------------------------------------------- + #define SLIDER_CONSTRAINT_DEF_SOFTNESS (btScalar(1.0)) #define SLIDER_CONSTRAINT_DEF_DAMPING (btScalar(1.0)) #define SLIDER_CONSTRAINT_DEF_RESTITUTION (btScalar(0.7)) -//----------------------------------------------------------------------------- + class btSliderConstraint : public btTypedConstraint { protected: + ///for backwards compatibility during the transition to 'getInfo/getInfo2' + bool m_useSolveConstraintObsolete; btTransform m_frameInA; btTransform m_frameInB; // use frameA fo define limits, if true @@ -104,6 +106,7 @@ protected: btVector3 m_relPosB; btScalar m_linPos; + btScalar m_angPos; btScalar m_angDepth; btScalar m_kAngle; @@ -123,10 +126,17 @@ protected: public: // constructors btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA); + btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB); btSliderConstraint(); // overrides virtual void buildJacobian(); - virtual void solveConstraint(btScalar timeStep); + virtual void getInfo1 (btConstraintInfo1* info); + + virtual void getInfo2 (btConstraintInfo2* info); + + virtual void solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep); + + // access const btRigidBody& getRigidBodyA() const { return m_rbA; } const btRigidBody& getRigidBodyB() const { return m_rbB; } @@ -194,6 +204,7 @@ public: void setMaxAngMotorForce(btScalar maxAngMotorForce) { m_maxAngMotorForce = maxAngMotorForce; } btScalar getMaxAngMotorForce() { return m_maxAngMotorForce; } btScalar getLinearPos() { return m_linPos; } + // access for ODE solver bool getSolveLinLimit() { return m_solveLinLim; } @@ -202,17 +213,18 @@ public: btScalar getAngDepth() { return m_angDepth; } // internal void buildJacobianInt(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB); - void solveConstraintInt(btRigidBody& rbA, btRigidBody& rbB); + void solveConstraintInt(btRigidBody& rbA, btSolverBody& bodyA,btRigidBody& rbB, btSolverBody& bodyB); // shared code used by ODE solver void calculateTransforms(void); void testLinLimits(void); + void testLinLimits2(btConstraintInfo2* info); void testAngLimits(void); // access for PE Solver btVector3 getAncorInA(void); btVector3 getAncorInB(void); }; -//----------------------------------------------------------------------------- + #endif //SLIDER_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h index b3f0c9d7444..6b728959162 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h @@ -23,86 +23,152 @@ class btRigidBody; #include "LinearMath/btAlignedAllocator.h" #include "LinearMath/btTransformUtil.h" +///Until we get other contributions, only use SIMD on Windows, when using Visual Studio 2008 or later, and not double precision +#ifdef BT_USE_SSE +#define USE_SIMD 1 +#endif // -///btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packed to increase cache coherence/performance. + +#ifdef USE_SIMD + +struct btSimdScalar +{ + SIMD_FORCE_INLINE btSimdScalar() + { + + } + + SIMD_FORCE_INLINE btSimdScalar(float fl) + :m_vec128 (_mm_set1_ps(fl)) + { + } + + SIMD_FORCE_INLINE btSimdScalar(__m128 v128) + :m_vec128(v128) + { + } + union + { + __m128 m_vec128; + float m_floats[4]; + int m_ints[4]; + btScalar m_unusedPadding; + }; + SIMD_FORCE_INLINE __m128 get128() + { + return m_vec128; + } + + SIMD_FORCE_INLINE const __m128 get128() const + { + return m_vec128; + } + + SIMD_FORCE_INLINE void set128(__m128 v128) + { + m_vec128 = v128; + } + + SIMD_FORCE_INLINE operator __m128() + { + return m_vec128; + } + SIMD_FORCE_INLINE operator const __m128() const + { + return m_vec128; + } + + SIMD_FORCE_INLINE operator float() const + { + return m_floats[0]; + } + +}; + +///@brief Return the elementwise product of two btSimdScalar +SIMD_FORCE_INLINE btSimdScalar +operator*(const btSimdScalar& v1, const btSimdScalar& v2) +{ + return btSimdScalar(_mm_mul_ps(v1.get128(),v2.get128())); +} + +///@brief Return the elementwise product of two btSimdScalar +SIMD_FORCE_INLINE btSimdScalar +operator+(const btSimdScalar& v1, const btSimdScalar& v2) +{ + return btSimdScalar(_mm_add_ps(v1.get128(),v2.get128())); +} + + +#else +#define btSimdScalar btScalar +#endif + +///The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packed to increase cache coherence/performance. ATTRIBUTE_ALIGNED16 (struct) btSolverBody { BT_DECLARE_ALIGNED_ALLOCATOR(); - - btVector3 m_angularVelocity; - float m_angularFactor; - float m_invMass; - float m_friction; + btVector3 m_deltaLinearVelocity; + btVector3 m_deltaAngularVelocity; + btVector3 m_angularFactor; + btVector3 m_invMass; + btScalar m_friction; btRigidBody* m_originalBody; - btVector3 m_linearVelocity; - btVector3 m_centerOfMassPosition; - btVector3 m_pushVelocity; - btVector3 m_turnVelocity; + //btVector3 m_turnVelocity; + - - SIMD_FORCE_INLINE void getVelocityInLocalPoint(const btVector3& rel_pos, btVector3& velocity ) const + SIMD_FORCE_INLINE void getVelocityInLocalPointObsolete(const btVector3& rel_pos, btVector3& velocity ) const { - velocity = m_linearVelocity + m_angularVelocity.cross(rel_pos); + if (m_originalBody) + velocity = m_originalBody->getLinearVelocity()+m_deltaLinearVelocity + (m_originalBody->getAngularVelocity()+m_deltaAngularVelocity).cross(rel_pos); + else + velocity.setValue(0,0,0); } + SIMD_FORCE_INLINE void getAngularVelocity(btVector3& angVel) const + { + if (m_originalBody) + angVel = m_originalBody->getAngularVelocity()+m_deltaAngularVelocity; + else + angVel.setValue(0,0,0); + } + + //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position - SIMD_FORCE_INLINE void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) + SIMD_FORCE_INLINE void applyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,const btScalar impulseMagnitude) { - if (m_invMass) + //if (m_invMass) { - m_linearVelocity += linearComponent*impulseMagnitude; - m_angularVelocity += angularComponent*(impulseMagnitude*m_angularFactor); - } - } - - SIMD_FORCE_INLINE void internalApplyPushImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) - { - if (m_invMass) - { - m_pushVelocity += linearComponent*impulseMagnitude; - m_turnVelocity += angularComponent*(impulseMagnitude*m_angularFactor); + m_deltaLinearVelocity += linearComponent*impulseMagnitude; + m_deltaAngularVelocity += angularComponent*(impulseMagnitude*m_angularFactor); } } +/* + void writebackVelocity() { if (m_invMass) { - m_originalBody->setLinearVelocity(m_linearVelocity); - m_originalBody->setAngularVelocity(m_angularVelocity); + m_originalBody->setLinearVelocity(m_originalBody->getLinearVelocity()+ m_deltaLinearVelocity); + m_originalBody->setAngularVelocity(m_originalBody->getAngularVelocity()+m_deltaAngularVelocity); //m_originalBody->setCompanionId(-1); } } - + */ - void writebackVelocity(btScalar timeStep) + void writebackVelocity(btScalar timeStep=0) { - if (m_invMass) + if (m_originalBody) { - m_originalBody->setLinearVelocity(m_linearVelocity); - m_originalBody->setAngularVelocity(m_angularVelocity); - - //correct the position/orientation based on push/turn recovery - btTransform newTransform; - btTransformUtil::integrateTransform(m_originalBody->getWorldTransform(),m_pushVelocity,m_turnVelocity,timeStep,newTransform); - m_originalBody->setWorldTransform(newTransform); - + m_originalBody->setLinearVelocity(m_originalBody->getLinearVelocity()+m_deltaLinearVelocity); + m_originalBody->setAngularVelocity(m_originalBody->getAngularVelocity()+m_deltaAngularVelocity); //m_originalBody->setCompanionId(-1); } } - - void readVelocity() - { - if (m_invMass) - { - m_linearVelocity = m_originalBody->getLinearVelocity(); - m_angularVelocity = m_originalBody->getAngularVelocity(); - } - } - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h index 2c71360c5b9..867d62a301d 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h @@ -19,40 +19,64 @@ subject to the following restrictions: class btRigidBody; #include "LinearMath/btVector3.h" #include "LinearMath/btMatrix3x3.h" +#include "btJacobianEntry.h" //#define NO_FRICTION_TANGENTIALS 1 +#include "btSolverBody.h" + ///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints. ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint { BT_DECLARE_ALIGNED_ALLOCATOR(); - btVector3 m_relpos1CrossNormal; - btVector3 m_contactNormal; + btVector3 m_relpos1CrossNormal; + btVector3 m_contactNormal; - btVector3 m_relpos2CrossNormal; - btVector3 m_angularComponentA; + btVector3 m_relpos2CrossNormal; + //btVector3 m_contactNormal2;//usually m_contactNormal2 == -m_contactNormal - btVector3 m_angularComponentB; - - mutable btScalar m_appliedPushImpulse; + btVector3 m_angularComponentA; + btVector3 m_angularComponentB; + + mutable btSimdScalar m_appliedPushImpulse; + mutable btSimdScalar m_appliedImpulse; - mutable btScalar m_appliedImpulse; - int m_solverBodyIdA; - int m_solverBodyIdB; btScalar m_friction; - btScalar m_restitution; btScalar m_jacDiagABInv; - btScalar m_penetration; - + union + { + int m_numConsecutiveRowsPerKernel; + btScalar m_unusedPadding0; + }; + union + { + int m_frictionIndex; + btScalar m_unusedPadding1; + }; + union + { + int m_solverBodyIdA; + btScalar m_unusedPadding2; + }; + union + { + int m_solverBodyIdB; + btScalar m_unusedPadding3; + }; - int m_constraintType; - int m_frictionIndex; - void* m_originalContactPoint; - int m_unusedPadding[1]; + union + { + void* m_originalContactPoint; + btScalar m_unusedPadding4; + }; + btScalar m_rhs; + btScalar m_cfm; + btScalar m_lowerLimit; + btScalar m_upperLimit; enum btSolverConstraintType { @@ -61,9 +85,7 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint }; }; - - - +typedef btAlignedObjectArray btConstraintArray; #endif //BT_SOLVER_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp index 6e8b552dbbc..3fa98ee4c88 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp @@ -19,13 +19,16 @@ subject to the following restrictions: static btRigidBody s_fixed(0, 0,0); +#define DEFAULT_DEBUGDRAW_SIZE btScalar(0.3f) + btTypedConstraint::btTypedConstraint(btTypedConstraintType type) :m_userConstraintType(-1), m_userConstraintId(-1), m_constraintType (type), m_rbA(s_fixed), m_rbB(s_fixed), -m_appliedImpulse(btScalar(0.)) +m_appliedImpulse(btScalar(0.)), +m_dbgDrawSize(DEFAULT_DEBUGDRAW_SIZE) { s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); } @@ -35,7 +38,8 @@ m_userConstraintId(-1), m_constraintType (type), m_rbA(rbA), m_rbB(s_fixed), -m_appliedImpulse(btScalar(0.)) +m_appliedImpulse(btScalar(0.)), +m_dbgDrawSize(DEFAULT_DEBUGDRAW_SIZE) { s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); @@ -48,9 +52,63 @@ m_userConstraintId(-1), m_constraintType (type), m_rbA(rbA), m_rbB(rbB), -m_appliedImpulse(btScalar(0.)) +m_appliedImpulse(btScalar(0.)), +m_dbgDrawSize(DEFAULT_DEBUGDRAW_SIZE) { s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); } + +//----------------------------------------------------------------------------- + +btScalar btTypedConstraint::getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact) +{ + if(lowLim > uppLim) + { + return btScalar(1.0f); + } + else if(lowLim == uppLim) + { + return btScalar(0.0f); + } + btScalar lim_fact = btScalar(1.0f); + btScalar delta_max = vel / timeFact; + if(delta_max < btScalar(0.0f)) + { + if((pos >= lowLim) && (pos < (lowLim - delta_max))) + { + lim_fact = (lowLim - pos) / delta_max; + } + else if(pos < lowLim) + { + lim_fact = btScalar(0.0f); + } + else + { + lim_fact = btScalar(1.0f); + } + } + else if(delta_max > btScalar(0.0f)) + { + if((pos <= uppLim) && (pos > (uppLim - delta_max))) + { + lim_fact = (uppLim - pos) / delta_max; + } + else if(pos > uppLim) + { + lim_fact = btScalar(0.0f); + } + else + { + lim_fact = btScalar(1.0f); + } + } + else + { + lim_fact = btScalar(0.0f); + } + return lim_fact; +} // btTypedConstraint::getMotorFactor() + + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h index c50ec6ec579..14cbe831b40 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h @@ -18,6 +18,11 @@ subject to the following restrictions: class btRigidBody; #include "LinearMath/btScalar.h" +#include "btSolverConstraint.h" +struct btSolverBody; + + + enum btTypedConstraintType { @@ -25,7 +30,6 @@ enum btTypedConstraintType HINGE_CONSTRAINT_TYPE, CONETWIST_CONSTRAINT_TYPE, D6_CONSTRAINT_TYPE, - VEHICLE_CONSTRAINT_TYPE, SLIDER_CONSTRAINT_TYPE }; @@ -48,6 +52,7 @@ protected: btRigidBody& m_rbA; btRigidBody& m_rbB; btScalar m_appliedImpulse; + btScalar m_dbgDrawSize; public: @@ -55,13 +60,55 @@ public: btTypedConstraint(btTypedConstraintType type); virtual ~btTypedConstraint() {}; btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA); - btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB); + struct btConstraintInfo1 { + int m_numConstraintRows,nub; + }; + + struct btConstraintInfo2 { + // integrator parameters: frames per second (1/stepsize), default error + // reduction parameter (0..1). + btScalar fps,erp; + + // for the first and second body, pointers to two (linear and angular) + // n*3 jacobian sub matrices, stored by rows. these matrices will have + // been initialized to 0 on entry. if the second body is zero then the + // J2xx pointers may be 0. + btScalar *m_J1linearAxis,*m_J1angularAxis,*m_J2linearAxis,*m_J2angularAxis; + + // elements to jump from one row to the next in J's + int rowskip; + + // right hand sides of the equation J*v = c + cfm * lambda. cfm is the + // "constraint force mixing" vector. c is set to zero on entry, cfm is + // set to a constant value (typically very small or zero) value on entry. + btScalar *m_constraintError,*cfm; + + // lo and hi limits for variables (set to -/+ infinity on entry). + btScalar *m_lowerLimit,*m_upperLimit; + + // findex vector for variables. see the LCP solver interface for a + // description of what this does. this is set to -1 on entry. + // note that the returned indexes are relative to the first index of + // the constraint. + int *findex; + }; + + virtual void buildJacobian() = 0; - virtual void solveConstraint(btScalar timeStep) = 0; + virtual void setupSolverConstraint(btConstraintArray& ca, int solverBodyA,int solverBodyB, btScalar timeStep) + { + } + virtual void getInfo1 (btConstraintInfo1* info)=0; + virtual void getInfo2 (btConstraintInfo2* info)=0; + + virtual void solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar timeStep) = 0; + + btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact); + const btRigidBody& getRigidBodyA() const { return m_rbA; @@ -94,7 +141,7 @@ public: { m_userConstraintId = uid; } - + int getUserConstraintId() const { return m_userConstraintId; @@ -114,7 +161,16 @@ public: { return m_constraintType; } - + + void setDbgDrawSize(btScalar dbgDrawSize) + { + m_dbgDrawSize = dbgDrawSize; + } + btScalar getDbgDrawSize() + { + return m_dbgDrawSize; + } + }; #endif //TYPED_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp index c2fd71d67fe..47addbac45b 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp @@ -38,7 +38,7 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" #include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" #include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" #include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" @@ -110,16 +110,16 @@ void plDeleteDynamicsWorld(plDynamicsWorldHandle world) void plStepSimulation(plDynamicsWorldHandle world, plReal timeStep) { btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); - assert(dynamicsWorld); + btAssert(dynamicsWorld); dynamicsWorld->stepSimulation(timeStep); } void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object) { btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); - assert(dynamicsWorld); + btAssert(dynamicsWorld); btRigidBody* body = reinterpret_cast< btRigidBody* >(object); - assert(body); + btAssert(body); dynamicsWorld->addRigidBody(body); } @@ -127,9 +127,9 @@ void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object) void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object) { btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); - assert(dynamicsWorld); + btAssert(dynamicsWorld); btRigidBody* body = reinterpret_cast< btRigidBody* >(object); - assert(body); + btAssert(body); dynamicsWorld->removeRigidBody(body); } @@ -142,7 +142,7 @@ plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionSh trans.setIdentity(); btVector3 localInertia(0,0,0); btCollisionShape* shape = reinterpret_cast( cshape); - assert(shape); + btAssert(shape); if (mass) { shape->calculateLocalInertia(mass,localInertia); @@ -158,7 +158,7 @@ plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionSh void plDeleteRigidBody(plRigidBodyHandle cbody) { btRigidBody* body = reinterpret_cast< btRigidBody* >(cbody); - assert(body); + btAssert(body); btAlignedFree( body); } @@ -255,20 +255,20 @@ void plAddVertex(plCollisionShapeHandle cshape, plReal x,plReal y,plReal z) (void)colShape; btAssert(colShape->getShapeType()==CONVEX_HULL_SHAPE_PROXYTYPE); btConvexHullShape* convexHullShape = reinterpret_cast( cshape); - convexHullShape->addPoint(btPoint3(x,y,z)); + convexHullShape->addPoint(btVector3(x,y,z)); } void plDeleteShape(plCollisionShapeHandle cshape) { btCollisionShape* shape = reinterpret_cast( cshape); - assert(shape); + btAssert(shape); btAlignedFree(shape); } void plSetScaling(plCollisionShapeHandle cshape, plVector3 cscaling) { btCollisionShape* shape = reinterpret_cast( cshape); - assert(shape); + btAssert(shape); btVector3 scaling(cscaling[0],cscaling[1],cscaling[2]); shape->setLocalScaling(scaling); } diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btActionInterface.h b/extern/bullet2/src/BulletDynamics/Dynamics/btActionInterface.h new file mode 100644 index 00000000000..8348795ef70 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btActionInterface.h @@ -0,0 +1,39 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef _BT_ACTION_INTERFACE_H +#define _BT_ACTION_INTERFACE_H + +class btIDebugDraw; +class btCollisionWorld; + +#include "LinearMath/btScalar.h" + +///Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWorld +class btActionInterface +{ + public: + + virtual ~btActionInterface() + { + } + + virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTimeStep)=0; + + virtual void debugDraw(btIDebugDraw* debugDrawer) = 0; + +}; + +#endif //_BT_ACTION_INTERFACE_H \ No newline at end of file diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp index 19443adc723..fa0d63d74a1 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp @@ -90,8 +90,7 @@ void btContinuousDynamicsWorld::internalSingleStepSimulation( btScalar timeStep) integrateTransforms(timeStep * toi); ///update vehicle simulation - updateVehicles(timeStep); - + updateActions(timeStep); updateActivationState( timeStep ); diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp index 745694e2f70..b6231a8fda6 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp @@ -29,6 +29,11 @@ subject to the following restrictions: #include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" #include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" #include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" +#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h" +#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h" +#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h" +#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h" +#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h" //for debug rendering #include "BulletCollision/CollisionShapes/btBoxShape.h" @@ -46,12 +51,7 @@ subject to the following restrictions: #include "LinearMath/btIDebugDraw.h" - -//vehicle -#include "BulletDynamics/Vehicle/btRaycastVehicle.h" -#include "BulletDynamics/Vehicle/btVehicleRaycaster.h" -#include "BulletDynamics/Vehicle/btWheelInfo.h" -#include "LinearMath/btIDebugDraw.h" +#include "BulletDynamics/Dynamics/btActionInterface.h" #include "LinearMath/btQuickprof.h" #include "LinearMath/btMotionState.h" @@ -110,7 +110,6 @@ void btDiscreteDynamicsWorld::saveKinematicState(btScalar timeStep) btRigidBody* body = btRigidBody::upcast(colObj); if (body) { - btTransform predictedTrans; if (body->getActivationState() != ISLAND_SLEEPING) { if (body->isKinematicObject()) @@ -125,6 +124,7 @@ void btDiscreteDynamicsWorld::saveKinematicState(btScalar timeStep) void btDiscreteDynamicsWorld::debugDrawWorld() { + BT_PROFILE("debugDrawWorld"); if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawContactPoints) { @@ -144,13 +144,30 @@ void btDiscreteDynamicsWorld::debugDrawWorld() } } } + bool drawConstraints = false; + if (getDebugDrawer()) + { + int mode = getDebugDrawer()->getDebugMode(); + if(mode & (btIDebugDraw::DBG_DrawConstraints | btIDebugDraw::DBG_DrawConstraintLimits)) + { + drawConstraints = true; + } + } + if(drawConstraints) + { + for(int i = getNumConstraints()-1; i>=0 ;i--) + { + btTypedConstraint* constraint = getConstraint(i); + debugDrawConstraint(constraint); + } + } + if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe | btIDebugDraw::DBG_DrawAabb)) { int i; - //todo: iterate over awake simulation islands! for ( i=0;igetDebugMode() & btIDebugDraw::DBG_DrawAabb)) { - btPoint3 minAabb,maxAabb; + btVector3 minAabb,maxAabb; btVector3 colorvec(1,0,0); colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); m_debugDrawer->drawAabb(minAabb,maxAabb,colorvec); @@ -187,32 +204,11 @@ void btDiscreteDynamicsWorld::debugDrawWorld() } - for ( i=0;im_vehicles.size();i++) + if (getDebugDrawer() && getDebugDrawer()->getDebugMode()) { - for (int v=0;vgetNumWheels();v++) + for (i=0;igetWheelInfo(v).m_raycastInfo.m_isInContact) - { - wheelColor.setValue(0,0,255); - } else - { - wheelColor.setValue(255,0,255); - } - - btVector3 wheelPosWS = m_vehicles[i]->getWheelInfo(v).m_worldTransform.getOrigin(); - - btVector3 axle = btVector3( - m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[0][m_vehicles[i]->getRightAxis()], - m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[1][m_vehicles[i]->getRightAxis()], - m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[2][m_vehicles[i]->getRightAxis()]); - - - //m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_wheelAxleWS - //debug wheels (cylinders) - m_debugDrawer->drawLine(wheelPosWS,wheelPosWS+axle,wheelColor); - m_debugDrawer->drawLine(wheelPosWS,m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_contactPointWS,wheelColor); - + m_actions[i]->debugDraw(m_debugDrawer); } } } @@ -220,7 +216,7 @@ void btDiscreteDynamicsWorld::debugDrawWorld() void btDiscreteDynamicsWorld::clearForces() { - //todo: iterate over awake simulation islands! + ///@todo: iterate over awake simulation islands! for ( int i=0;igetMotionState() && !body->isStaticOrKinematicObject()) + { + //we need to call the update at least once, even for sleeping objects + //otherwise the 'graphics' transform never updates properly + ///@todo: add 'dirty' flag + //if (body->getActivationState() != ISLAND_SLEEPING) + { + btTransform interpolatedTransform; + btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(), + body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),m_localTime*body->getHitFraction(),interpolatedTransform); + body->getMotionState()->setWorldTransform(interpolatedTransform); + } + } +} + void btDiscreteDynamicsWorld::synchronizeMotionStates() { + BT_PROFILE("synchronizeMotionStates"); { //todo: iterate over awake simulation islands! for ( int i=0;igetMotionState() && !body->isStaticOrKinematicObject()) - { - //we need to call the update at least once, even for sleeping objects - //otherwise the 'graphics' transform never updates properly - //so todo: add 'dirty' flag - //if (body->getActivationState() != ISLAND_SLEEPING) - { - btTransform interpolatedTransform; - btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(), - body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),m_localTime*body->getHitFraction(),interpolatedTransform); - body->getMotionState()->setWorldTransform(interpolatedTransform); - } - } + if (body) + synchronizeSingleMotionState(body); } } - +/* if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawWireframe) { for ( int i=0;im_vehicles.size();i++) @@ -287,6 +292,8 @@ void btDiscreteDynamicsWorld::synchronizeMotionStates() } } } + */ + } @@ -327,7 +334,8 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, //process some debugging flags if (getDebugDrawer()) { - gDisableDeactivation = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_NoDeactivation) != 0; + btIDebugDraw* debugDrawer = getDebugDrawer (); + gDisableDeactivation = (debugDrawer->getDebugMode() & btIDebugDraw::DBG_NoDeactivation) != 0; } if (numSimulationSubSteps) { @@ -342,12 +350,13 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, for (int i=0;igetNumConstraintRefs()) - { - btTypedConstraint* constraint = body->getConstraintRef(0); - removeConstraint(constraint); - } - removeCollisionObject(body); } @@ -464,17 +465,17 @@ void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body, short group, short } -void btDiscreteDynamicsWorld::updateVehicles(btScalar timeStep) +void btDiscreteDynamicsWorld::updateActions(btScalar timeStep) { - BT_PROFILE("updateVehicles"); + BT_PROFILE("updateActions"); - for ( int i=0;iupdateVehicle( timeStep); + m_actions[i]->updateAction( this, timeStep); } } - + + void btDiscreteDynamicsWorld::updateActivationState(btScalar timeStep) { BT_PROFILE("updateActivationState"); @@ -529,16 +530,38 @@ void btDiscreteDynamicsWorld::removeConstraint(btTypedConstraint* constraint) constraint->getRigidBodyB().removeConstraintRef(constraint); } -void btDiscreteDynamicsWorld::addVehicle(btRaycastVehicle* vehicle) +void btDiscreteDynamicsWorld::addAction(btActionInterface* action) { - m_vehicles.push_back(vehicle); + m_actions.push_back(action); } -void btDiscreteDynamicsWorld::removeVehicle(btRaycastVehicle* vehicle) +void btDiscreteDynamicsWorld::removeAction(btActionInterface* action) { - m_vehicles.remove(vehicle); + m_actions.remove(action); } + +void btDiscreteDynamicsWorld::addVehicle(btActionInterface* vehicle) +{ + addAction(vehicle); +} + +void btDiscreteDynamicsWorld::removeVehicle(btActionInterface* vehicle) +{ + removeAction(vehicle); +} + +void btDiscreteDynamicsWorld::addCharacter(btActionInterface* character) +{ + addAction(character); +} + +void btDiscreteDynamicsWorld::removeCharacter(btActionInterface* character) +{ + removeAction(character); +} + + SIMD_FORCE_INLINE int btGetConstraintIslandId(const btTypedConstraint* lhs) { int islandId; @@ -611,8 +634,11 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) { if (islandId<0) { - ///we don't split islands, so all constraints/contact manifolds/bodies are passed into the solver regardless the island id - m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher); + if (numManifolds + m_numConstraints) + { + ///we don't split islands, so all constraints/contact manifolds/bodies are passed into the solver regardless the island id + m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher); + } } else { //also add all non-contact constraints/joints for this island @@ -658,7 +684,7 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) sortedConstraints[i] = m_constraints[i]; } -// assert(0); +// btAssert(0); @@ -671,7 +697,7 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) m_constraintSolver->prepareSolve(getCollisionWorld()->getNumCollisionObjects(), getCollisionWorld()->getDispatcher()->getNumManifolds()); /// solve all the constraints for this island - m_islandManager->buildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld()->getCollisionObjectArray(),&solverCallback); + m_islandManager->buildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld(),&solverCallback); m_constraintSolver->allSolved(solverInfo, m_debugDrawer, m_stackAlloc); } @@ -700,9 +726,13 @@ void btDiscreteDynamicsWorld::calculateSimulationIslands() { if (colObj0->isActive() || colObj1->isActive()) { - - getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(), - (colObj1)->getIslandTag()); + if ((colObj0)->getIslandTag() != -1 && (colObj1)->getIslandTag() != -1) + { + + getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(), + (colObj1)->getIslandTag()); + } + } } } @@ -722,21 +752,27 @@ class btClosestNotMeConvexResultCallback : public btCollisionWorld::ClosestConve btCollisionObject* m_me; btScalar m_allowedPenetration; btOverlappingPairCache* m_pairCache; + btDispatcher* m_dispatcher; public: - btClosestNotMeConvexResultCallback (btCollisionObject* me,const btVector3& fromA,const btVector3& toA,btOverlappingPairCache* pairCache) : + btClosestNotMeConvexResultCallback (btCollisionObject* me,const btVector3& fromA,const btVector3& toA,btOverlappingPairCache* pairCache,btDispatcher* dispatcher) : btCollisionWorld::ClosestConvexResultCallback(fromA,toA), m_allowedPenetration(0.0f), m_me(me), - m_pairCache(pairCache) + m_pairCache(pairCache), + m_dispatcher(dispatcher) { } virtual btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult,bool normalInWorldSpace) { if (convexResult.m_hitCollisionObject == m_me) - return 1.0; + return 1.0f; + + //ignore result if there is no contact response + if(!convexResult.m_hitCollisionObject->hasContactResponse()) + return 1.0f; btVector3 linVelA,linVelB; linVelA = m_convexToWorld-m_convexFromWorld; @@ -757,23 +793,29 @@ public: return false; ///don't do CCD when the collision filters are not matching - if (!btCollisionWorld::ClosestConvexResultCallback::needsCollision(proxy0)) + if (!ClosestConvexResultCallback::needsCollision(proxy0)) return false; - ///don't do CCD when there are already contact points (touching contact/penetration) - btAlignedObjectArray manifoldArray; - btBroadphasePair* collisionPair = m_pairCache->findPair(m_me->getBroadphaseHandle(),proxy0); - if (collisionPair) + btCollisionObject* otherObj = (btCollisionObject*) proxy0->m_clientObject; + + //call needsResponse, see http://code.google.com/p/bullet/issues/detail?id=179 + if (m_dispatcher->needsResponse(m_me,otherObj)) { - if (collisionPair->m_algorithm) + ///don't do CCD when there are already contact points (touching contact/penetration) + btAlignedObjectArray manifoldArray; + btBroadphasePair* collisionPair = m_pairCache->findPair(m_me->getBroadphaseHandle(),proxy0); + if (collisionPair) { - manifoldArray.resize(0); - collisionPair->m_algorithm->getAllContactManifolds(manifoldArray); - for (int j=0;jm_algorithm) { - btPersistentManifold* manifold = manifoldArray[j]; - if (manifold->getNumContacts()>0) - return false; + manifoldArray.resize(0); + collisionPair->m_algorithm->getAllContactManifolds(manifoldArray); + for (int j=0;jgetNumContacts()>0) + return false; + } } } } @@ -811,9 +853,13 @@ void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep) { gNumClampedCcdMotions++; - btClosestNotMeConvexResultCallback sweepResults(body,body->getWorldTransform().getOrigin(),predictedTrans.getOrigin(),getBroadphase()->getOverlappingPairCache()); + btClosestNotMeConvexResultCallback sweepResults(body,body->getWorldTransform().getOrigin(),predictedTrans.getOrigin(),getBroadphase()->getOverlappingPairCache(),getDispatcher()); btConvexShape* convexShape = static_cast(body->getCollisionShape()); btSphereShape tmpSphere(body->getCcdSweptSphereRadius());//btConvexShape* convexShape = static_cast(body->getCollisionShape()); + + sweepResults.m_collisionFilterGroup = body->getBroadphaseProxy()->m_collisionFilterGroup; + sweepResults.m_collisionFilterMask = body->getBroadphaseProxy()->m_collisionFilterMask; + convexSweepTest(&tmpSphere,body->getWorldTransform(),predictedTrans,sweepResults); if (sweepResults.hasHit() && (sweepResults.m_closestHitFraction < 1.f)) { @@ -833,6 +879,8 @@ void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep) + + void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) { BT_PROFILE("predictUnconstraintMotion"); @@ -844,14 +892,12 @@ void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) { if (!body->isStaticOrKinematicObject()) { - if (body->isActive()) - { - body->integrateVelocities( timeStep); - //damping - body->applyDamping(timeStep); + + body->integrateVelocities( timeStep); + //damping + body->applyDamping(timeStep); - body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform()); - } + body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform()); } } } @@ -1103,7 +1149,7 @@ void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, { btConcaveShape* concaveMesh = (btConcaveShape*) shape; - //todo pass camera, for some culling + ///@todo pass camera, for some culling? no -> we are not a graphics lib btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); @@ -1132,7 +1178,7 @@ void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, int i; for (i=0;igetNumEdges();i++) { - btPoint3 a,b; + btVector3 a,b; polyshape->getEdge(i,a,b); btVector3 wa = worldTransform * a; btVector3 wb = worldTransform * b; @@ -1148,6 +1194,189 @@ void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, } +void btDiscreteDynamicsWorld::debugDrawConstraint(btTypedConstraint* constraint) +{ + bool drawFrames = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawConstraints) != 0; + bool drawLimits = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawConstraintLimits) != 0; + btScalar dbgDrawSize = constraint->getDbgDrawSize(); + if(dbgDrawSize <= btScalar(0.f)) + { + return; + } + + switch(constraint->getConstraintType()) + { + case POINT2POINT_CONSTRAINT_TYPE: + { + btPoint2PointConstraint* p2pC = (btPoint2PointConstraint*)constraint; + btTransform tr; + tr.setIdentity(); + btVector3 pivot = p2pC->getPivotInA(); + pivot = p2pC->getRigidBodyA().getCenterOfMassTransform() * pivot; + tr.setOrigin(pivot); + getDebugDrawer()->drawTransform(tr, dbgDrawSize); + // that ideally should draw the same frame + pivot = p2pC->getPivotInB(); + pivot = p2pC->getRigidBodyB().getCenterOfMassTransform() * pivot; + tr.setOrigin(pivot); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + } + break; + case HINGE_CONSTRAINT_TYPE: + { + btHingeConstraint* pHinge = (btHingeConstraint*)constraint; + btTransform tr = pHinge->getRigidBodyA().getCenterOfMassTransform() * pHinge->getAFrame(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + tr = pHinge->getRigidBodyB().getCenterOfMassTransform() * pHinge->getBFrame(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + btScalar minAng = pHinge->getLowerLimit(); + btScalar maxAng = pHinge->getUpperLimit(); + if(minAng == maxAng) + { + break; + } + bool drawSect = true; + if(minAng > maxAng) + { + minAng = btScalar(0.f); + maxAng = SIMD_2_PI; + drawSect = false; + } + if(drawLimits) + { + btVector3& center = tr.getOrigin(); + btVector3 normal = tr.getBasis().getColumn(2); + btVector3 axis = tr.getBasis().getColumn(0); + getDebugDrawer()->drawArc(center, normal, axis, dbgDrawSize, dbgDrawSize, minAng, maxAng, btVector3(0,0,0), drawSect); + } + } + break; + case CONETWIST_CONSTRAINT_TYPE: + { + btConeTwistConstraint* pCT = (btConeTwistConstraint*)constraint; + btTransform tr = pCT->getRigidBodyA().getCenterOfMassTransform() * pCT->getAFrame(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + tr = pCT->getRigidBodyB().getCenterOfMassTransform() * pCT->getBFrame(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + if(drawLimits) + { + //const btScalar length = btScalar(5); + const btScalar length = dbgDrawSize; + static int nSegments = 8*4; + btScalar fAngleInRadians = btScalar(2.*3.1415926) * (btScalar)(nSegments-1)/btScalar(nSegments); + btVector3 pPrev = pCT->GetPointForAngle(fAngleInRadians, length); + pPrev = tr * pPrev; + for (int i=0; iGetPointForAngle(fAngleInRadians, length); + pCur = tr * pCur; + getDebugDrawer()->drawLine(pPrev, pCur, btVector3(0,0,0)); + + if (i%(nSegments/8) == 0) + getDebugDrawer()->drawLine(tr.getOrigin(), pCur, btVector3(0,0,0)); + + pPrev = pCur; + } + btScalar tws = pCT->getTwistSpan(); + btScalar twa = pCT->getTwistAngle(); + bool useFrameB = (pCT->getRigidBodyB().getInvMass() > btScalar(0.f)); + if(useFrameB) + { + tr = pCT->getRigidBodyB().getCenterOfMassTransform() * pCT->getBFrame(); + } + else + { + tr = pCT->getRigidBodyA().getCenterOfMassTransform() * pCT->getAFrame(); + } + btVector3 pivot = tr.getOrigin(); + btVector3 normal = tr.getBasis().getColumn(0); + btVector3 axis1 = tr.getBasis().getColumn(1); + getDebugDrawer()->drawArc(pivot, normal, axis1, dbgDrawSize, dbgDrawSize, -twa-tws, -twa+tws, btVector3(0,0,0), true); + + } + } + break; + case D6_CONSTRAINT_TYPE: + { + btGeneric6DofConstraint* p6DOF = (btGeneric6DofConstraint*)constraint; + btTransform tr = p6DOF->getCalculatedTransformA(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + tr = p6DOF->getCalculatedTransformB(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + if(drawLimits) + { + tr = p6DOF->getCalculatedTransformA(); + const btVector3& center = p6DOF->getCalculatedTransformB().getOrigin(); + btVector3 up = tr.getBasis().getColumn(2); + btVector3 axis = tr.getBasis().getColumn(0); + btScalar minTh = p6DOF->getRotationalLimitMotor(1)->m_loLimit; + btScalar maxTh = p6DOF->getRotationalLimitMotor(1)->m_hiLimit; + btScalar minPs = p6DOF->getRotationalLimitMotor(2)->m_loLimit; + btScalar maxPs = p6DOF->getRotationalLimitMotor(2)->m_hiLimit; + getDebugDrawer()->drawSpherePatch(center, up, axis, dbgDrawSize * btScalar(.9f), minTh, maxTh, minPs, maxPs, btVector3(0,0,0)); + axis = tr.getBasis().getColumn(1); + btScalar ay = p6DOF->getAngle(1); + btScalar az = p6DOF->getAngle(2); + btScalar cy = btCos(ay); + btScalar sy = btSin(ay); + btScalar cz = btCos(az); + btScalar sz = btSin(az); + btVector3 ref; + ref[0] = cy*cz*axis[0] + cy*sz*axis[1] - sy*axis[2]; + ref[1] = -sz*axis[0] + cz*axis[1]; + ref[2] = cz*sy*axis[0] + sz*sy*axis[1] + cy*axis[2]; + tr = p6DOF->getCalculatedTransformB(); + btVector3 normal = -tr.getBasis().getColumn(0); + btScalar minFi = p6DOF->getRotationalLimitMotor(0)->m_loLimit; + btScalar maxFi = p6DOF->getRotationalLimitMotor(0)->m_hiLimit; + if(minFi > maxFi) + { + getDebugDrawer()->drawArc(center, normal, ref, dbgDrawSize, dbgDrawSize, -SIMD_PI, SIMD_PI, btVector3(0,0,0), false); + } + else if(minFi < maxFi) + { + getDebugDrawer()->drawArc(center, normal, ref, dbgDrawSize, dbgDrawSize, minFi, maxFi, btVector3(0,0,0), true); + } + tr = p6DOF->getCalculatedTransformA(); + btVector3 bbMin = p6DOF->getTranslationalLimitMotor()->m_lowerLimit; + btVector3 bbMax = p6DOF->getTranslationalLimitMotor()->m_upperLimit; + getDebugDrawer()->drawBox(bbMin, bbMax, tr, btVector3(0,0,0)); + } + } + break; + case SLIDER_CONSTRAINT_TYPE: + { + btSliderConstraint* pSlider = (btSliderConstraint*)constraint; + btTransform tr = pSlider->getCalculatedTransformA(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + tr = pSlider->getCalculatedTransformB(); + if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize); + if(drawLimits) + { + btTransform tr = pSlider->getCalculatedTransformA(); + btVector3 li_min = tr * btVector3(pSlider->getLowerLinLimit(), 0.f, 0.f); + btVector3 li_max = tr * btVector3(pSlider->getUpperLinLimit(), 0.f, 0.f); + getDebugDrawer()->drawLine(li_min, li_max, btVector3(0, 0, 0)); + btVector3 normal = tr.getBasis().getColumn(0); + btVector3 axis = tr.getBasis().getColumn(1); + btScalar a_min = pSlider->getLowerAngLimit(); + btScalar a_max = pSlider->getUpperAngLimit(); + const btVector3& center = pSlider->getCalculatedTransformB().getOrigin(); + getDebugDrawer()->drawArc(center, normal, axis, dbgDrawSize, dbgDrawSize, a_min, a_max, btVector3(0,0,0), true); + } + } + break; + default : + break; + } + return; +} // btDiscreteDynamicsWorld::debugDrawConstraint() + + + + + void btDiscreteDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) { if (m_ownsConstraintSolver) @@ -1176,3 +1405,5 @@ const btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index) const { return m_constraints[index]; } + + diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h index d9e2652aaf6..4662cf5052a 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h @@ -23,9 +23,8 @@ class btOverlappingPairCache; class btConstraintSolver; class btSimulationIslandManager; class btTypedConstraint; +class btActionInterface; - -class btRaycastVehicle; class btIDebugDraw; #include "LinearMath/btAlignedObjectArray.h" @@ -42,7 +41,6 @@ protected: btAlignedObjectArray m_constraints; - btVector3 m_gravity; //for variable timesteps @@ -52,33 +50,32 @@ protected: bool m_ownsIslandManager; bool m_ownsConstraintSolver; + btAlignedObjectArray m_actions; - btAlignedObjectArray m_vehicles; - int m_profileTimings; virtual void predictUnconstraintMotion(btScalar timeStep); virtual void integrateTransforms(btScalar timeStep); - void calculateSimulationIslands(); + virtual void calculateSimulationIslands(); - void solveConstraints(btContactSolverInfo& solverInfo); + virtual void solveConstraints(btContactSolverInfo& solverInfo); void updateActivationState(btScalar timeStep); - void updateVehicles(btScalar timeStep); + void updateActions(btScalar timeStep); void startProfiling(btScalar timeStep); virtual void internalSingleStepSimulation( btScalar timeStep); - void synchronizeMotionStates(); - void saveKinematicState(btScalar timeStep); + virtual void saveKinematicState(btScalar timeStep); void debugDrawSphere(btScalar radius, const btTransform& transform, const btVector3& color); + public: @@ -91,14 +88,19 @@ public: virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)); - void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false); + virtual void synchronizeMotionStates(); - void removeConstraint(btTypedConstraint* constraint); + ///this can be useful to synchronize a single rigid body -> graphics object + void synchronizeSingleMotionState(btRigidBody* body); - void addVehicle(btRaycastVehicle* vehicle); + virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false); - void removeVehicle(btRaycastVehicle* vehicle); + virtual void removeConstraint(btTypedConstraint* constraint); + virtual void addAction(btActionInterface*); + + virtual void removeAction(btActionInterface*); + btSimulationIslandManager* getSimulationIslandManager() { return m_islandManager; @@ -114,8 +116,8 @@ public: return this; } - virtual void setGravity(const btVector3& gravity); + virtual btVector3 getGravity () const; virtual void addRigidBody(btRigidBody* body); @@ -126,6 +128,8 @@ public: void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color); + void debugDrawConstraint(btTypedConstraint* constraint); + virtual void debugDrawWorld(); virtual void setConstraintSolver(btConstraintSolver* solver); @@ -152,8 +156,24 @@ public: virtual void setNumTasks(int numTasks) { + (void) numTasks; } + ///obsolete, use updateActions instead + virtual void updateVehicles(btScalar timeStep) + { + updateActions(timeStep); + } + + ///obsolete, use addAction instead + virtual void addVehicle(btActionInterface* vehicle); + ///obsolete, use removeAction instead + virtual void removeVehicle(btActionInterface* vehicle); + ///obsolete, use addAction instead + virtual void addCharacter(btActionInterface* character); + ///obsolete, use removeAction instead + virtual void removeCharacter(btActionInterface* character); + }; #endif //BT_DISCRETE_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h index 929e24d337c..ecf7a2f0c64 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h @@ -20,10 +20,11 @@ subject to the following restrictions: #include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" class btTypedConstraint; -class btRaycastVehicle; +class btActionInterface; class btConstraintSolver; class btDynamicsWorld; + /// Type for the callback for each tick typedef void (*btInternalTickCallback)(btDynamicsWorld *world, btScalar timeStep); @@ -71,15 +72,17 @@ public: virtual void removeConstraint(btTypedConstraint* constraint) {(void)constraint;} - virtual void addVehicle(btRaycastVehicle* vehicle) {(void)vehicle;} + virtual void addAction(btActionInterface* action) = 0; - virtual void removeVehicle(btRaycastVehicle* vehicle) {(void)vehicle;} + virtual void removeAction(btActionInterface* action) = 0; //once a rigidbody is added to the dynamics world, it will get this gravity assigned //existing rigidbodies in the world get gravity assigned too, during this method virtual void setGravity(const btVector3& gravity) = 0; virtual btVector3 getGravity () const = 0; + virtual void synchronizeMotionStates() = 0; + virtual void addRigidBody(btRigidBody* body) = 0; virtual void removeRigidBody(btRigidBody* body) = 0; @@ -121,6 +124,16 @@ public: } + ///obsolete, use addAction instead. + virtual void addVehicle(btActionInterface* vehicle) {(void)vehicle;} + ///obsolete, use removeAction instead + virtual void removeVehicle(btActionInterface* vehicle) {(void)vehicle;} + ///obsolete, use addAction instead. + virtual void addCharacter(btActionInterface* character) {(void)character;} + ///obsolete, use removeAction instead + virtual void removeCharacter(btActionInterface* character) {(void)character;} + + }; #endif //BT_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp index 93d70de39d8..a4d8e1d77f6 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp @@ -44,9 +44,10 @@ void btRigidBody::setupRigidBody(const btRigidBody::btRigidBodyConstructionInfo& m_linearVelocity.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); m_angularVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); - m_angularFactor = btScalar(1.); - m_anisotropicFriction.setValue(1.f,1.f,1.f); + m_angularFactor.setValue(1,1,1); + m_linearFactor.setValue(1,1,1); m_gravity.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); + m_gravity_acceleration.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); m_totalForce.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); m_totalTorque.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)), m_linearDamping = btScalar(0.); @@ -125,6 +126,7 @@ void btRigidBody::setGravity(const btVector3& acceleration) { m_gravity = acceleration * (btScalar(1.0) / m_inverseMass); } + m_gravity_acceleration = acceleration; } @@ -144,8 +146,17 @@ void btRigidBody::setDamping(btScalar lin_damping, btScalar ang_damping) ///applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping void btRigidBody::applyDamping(btScalar timeStep) { + //On new damping: see discussion/issue report here: http://code.google.com/p/bullet/issues/detail?id=74 + //todo: do some performance comparisons (but other parts of the engine are probably bottleneck anyway + +//#define USE_OLD_DAMPING_METHOD 1 +#ifdef USE_OLD_DAMPING_METHOD m_linearVelocity *= GEN_clamped((btScalar(1.) - timeStep * m_linearDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); m_angularVelocity *= GEN_clamped((btScalar(1.) - timeStep * m_angularDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); +#else + m_linearVelocity *= btPow(btScalar(1)-m_linearDamping, timeStep); + m_angularVelocity *= btPow(btScalar(1)-m_angularDamping, timeStep); +#endif if (m_additionalDamping) { diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h index 4596f90a00f..da1fcb78611 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h @@ -17,7 +17,6 @@ subject to the following restrictions: #define RIGIDBODY_H #include "LinearMath/btAlignedObjectArray.h" -#include "LinearMath/btPoint3.h" #include "LinearMath/btTransform.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" @@ -31,7 +30,7 @@ extern btScalar gDeactivationTime; extern bool gDisableDeactivation; -///btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape. +///The btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape. ///It is recommended for performance and memory use to share btCollisionShape objects whenever possible. ///There are 3 types of rigid bodies: ///- A) Dynamic rigid bodies, with positive mass. Motion is controlled by rigid body dynamics. @@ -46,9 +45,11 @@ class btRigidBody : public btCollisionObject btVector3 m_linearVelocity; btVector3 m_angularVelocity; btScalar m_inverseMass; - btScalar m_angularFactor; + btVector3 m_angularFactor; + btVector3 m_linearFactor; btVector3 m_gravity; + btVector3 m_gravity_acceleration; btVector3 m_invInertiaLocal; btVector3 m_totalForce; btVector3 m_totalTorque; @@ -75,7 +76,7 @@ class btRigidBody : public btCollisionObject public: - ///btRigidBodyConstructionInfo provides information to create a rigid body. Setting mass to zero creates a fixed (non-dynamic) rigid body. + ///The btRigidBodyConstructionInfo structure provides information to create a rigid body. Setting mass to zero creates a fixed (non-dynamic) rigid body. ///For dynamic objects, you can use the collision shape to approximate the local inertia tensor, otherwise use the zero vector (default argument) ///You can use the motion state to synchronize the world transform between physics and graphics objects. ///And if the motion state is provided, the rigid body will initialize its initial world transform from the motion state, @@ -182,7 +183,7 @@ public: const btVector3& getGravity() const { - return m_gravity; + return m_gravity_acceleration; } void setDamping(btScalar lin_damping, btScalar ang_damping); @@ -219,6 +220,14 @@ public: void setMassProps(btScalar mass, const btVector3& inertia); + const btVector3& getLinearFactor() const + { + return m_linearFactor; + } + void setLinearFactor(const btVector3& linearFactor) + { + m_linearFactor = linearFactor; + } btScalar getInvMass() const { return m_inverseMass; } const btMatrix3x3& getInvInertiaTensorWorld() const { return m_invInertiaTensorWorld; @@ -230,10 +239,20 @@ public: void applyCentralForce(const btVector3& force) { - m_totalForce += force; + m_totalForce += force*m_linearFactor; } + + const btVector3& getTotalForce() + { + return m_totalForce; + }; + + const btVector3& getTotalTorque() + { + return m_totalTorque; + }; - const btVector3& getInvInertiaDiagLocal() + const btVector3& getInvInertiaDiagLocal() const { return m_invInertiaLocal; }; @@ -251,23 +270,23 @@ public: void applyTorque(const btVector3& torque) { - m_totalTorque += torque; + m_totalTorque += torque*m_angularFactor; } void applyForce(const btVector3& force, const btVector3& rel_pos) { applyCentralForce(force); - applyTorque(rel_pos.cross(force)*m_angularFactor); + applyTorque(rel_pos.cross(force*m_linearFactor)); } void applyCentralImpulse(const btVector3& impulse) { - m_linearVelocity += impulse * m_inverseMass; + m_linearVelocity += impulse *m_linearFactor * m_inverseMass; } void applyTorqueImpulse(const btVector3& torque) { - m_angularVelocity += m_invInertiaTensorWorld * torque; + m_angularVelocity += m_invInertiaTensorWorld * torque * m_angularFactor; } void applyImpulse(const btVector3& impulse, const btVector3& rel_pos) @@ -277,7 +296,7 @@ public: applyCentralImpulse(impulse); if (m_angularFactor) { - applyTorqueImpulse(rel_pos.cross(impulse)*m_angularFactor); + applyTorqueImpulse(rel_pos.cross(impulse*m_linearFactor)); } } } @@ -287,10 +306,10 @@ public: { if (m_inverseMass != btScalar(0.)) { - m_linearVelocity += linearComponent*impulseMagnitude; + m_linearVelocity += linearComponent*m_linearFactor*impulseMagnitude; if (m_angularFactor) { - m_angularVelocity += angularComponent*impulseMagnitude*m_angularFactor; + m_angularVelocity += angularComponent*m_angularFactor*impulseMagnitude; } } } @@ -303,7 +322,7 @@ public: void updateInertiaTensor(); - const btPoint3& getCenterOfMassPosition() const { + const btVector3& getCenterOfMassPosition() const { return m_worldTransform.getOrigin(); } btQuaternion getOrientation() const; @@ -321,15 +340,12 @@ public: inline void setLinearVelocity(const btVector3& lin_vel) { - assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); m_linearVelocity = lin_vel; } - inline void setAngularVelocity(const btVector3& ang_vel) { - assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); - { - m_angularVelocity = ang_vel; - } + inline void setAngularVelocity(const btVector3& ang_vel) + { + m_angularVelocity = ang_vel; } btVector3 getVelocityInLocalPoint(const btVector3& rel_pos) const @@ -353,7 +369,7 @@ public: - SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btPoint3& pos, const btVector3& normal) const + SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btVector3& pos, const btVector3& normal) const { btVector3 r0 = pos - getCenterOfMassPosition(); @@ -443,11 +459,16 @@ public: int m_contactSolverType; int m_frictionSolverType; - void setAngularFactor(btScalar angFac) + void setAngularFactor(const btVector3& angFac) { m_angularFactor = angFac; } - btScalar getAngularFactor() const + + void setAngularFactor(btScalar angFac) + { + m_angularFactor.setValue(angFac,angFac,angFac); + } + const btVector3& getAngularFactor() const { return m_angularFactor; } diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp index 3be04d1a4ad..3f6141463c3 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp @@ -97,7 +97,7 @@ int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, b void btSimpleDynamicsWorld::clearForces() { - //todo: iterate over awake simulation islands! + ///@todo: iterate over awake simulation islands! for ( int i=0;iisActive() && (!body->isStaticObject())) { - btPoint3 minAabb,maxAabb; + btVector3 minAabb,maxAabb; colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); btBroadphaseInterface* bp = getBroadphase(); bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); @@ -210,7 +210,7 @@ void btSimpleDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) void btSimpleDynamicsWorld::synchronizeMotionStates() { - //todo: iterate over awake simulation islands! + ///@todo: iterate over awake simulation islands! for ( int i=0;icastRay(source,target,rayResults); @@ -188,7 +186,7 @@ btScalar btRaycastVehicle::rayCast(btWheelInfo& wheel) wheel.m_raycastInfo.m_contactNormalWS = rayResults.m_hitNormalInWorld; wheel.m_raycastInfo.m_isInContact = true; - wheel.m_raycastInfo.m_groundObject = &s_fixedObject;//todo for driving on dynamic/movable objects!; + wheel.m_raycastInfo.m_groundObject = &s_fixedObject;///@todo for driving on dynamic/movable objects!; //wheel.m_raycastInfo.m_groundObject = object; @@ -359,7 +357,7 @@ void btRaycastVehicle::updateVehicle( btScalar step ) void btRaycastVehicle::setSteeringValue(btScalar steering,int wheel) { - assert(wheel>=0 && wheel < getNumWheels()); + btAssert(wheel>=0 && wheel < getNumWheels()); btWheelInfo& wheelInfo = getWheelInfo(wheel); wheelInfo.m_steering = steering; @@ -375,7 +373,7 @@ btScalar btRaycastVehicle::getSteeringValue(int wheel) const void btRaycastVehicle::applyEngineForce(btScalar force, int wheel) { - assert(wheel>=0 && wheel < getNumWheels()); + btAssert(wheel>=0 && wheel < getNumWheels()); btWheelInfo& wheelInfo = getWheelInfo(wheel); wheelInfo.m_engineForce = force; } @@ -691,7 +689,7 @@ void btRaycastVehicle::updateFriction(btScalar timeStep) btVector3 sideImp = m_axle[wheel] * m_sideImpulse[wheel]; - rel_pos[2] *= wheelInfo.m_rollInfluence; + rel_pos[m_indexUpAxis] *= wheelInfo.m_rollInfluence; m_chassisBody->applyImpulse(sideImp,rel_pos); //apply friction impulse on the ground @@ -704,6 +702,36 @@ void btRaycastVehicle::updateFriction(btScalar timeStep) } + +void btRaycastVehicle::debugDraw(btIDebugDraw* debugDrawer) +{ + + for (int v=0;vgetNumWheels();v++) + { + btVector3 wheelColor(0,255,255); + if (getWheelInfo(v).m_raycastInfo.m_isInContact) + { + wheelColor.setValue(0,0,255); + } else + { + wheelColor.setValue(255,0,255); + } + + btVector3 wheelPosWS = getWheelInfo(v).m_worldTransform.getOrigin(); + + btVector3 axle = btVector3( + getWheelInfo(v).m_worldTransform.getBasis()[0][getRightAxis()], + getWheelInfo(v).m_worldTransform.getBasis()[1][getRightAxis()], + getWheelInfo(v).m_worldTransform.getBasis()[2][getRightAxis()]); + + //debug wheels (cylinders) + debugDrawer->drawLine(wheelPosWS,wheelPosWS+axle,wheelColor); + debugDrawer->drawLine(wheelPosWS,getWheelInfo(v).m_raycastInfo.m_contactPointWS,wheelColor); + + } +} + + void* btDefaultVehicleRaycaster::castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) { // RayResultCallback& resultCallback; @@ -727,3 +755,4 @@ void* btDefaultVehicleRaycaster::castRay(const btVector3& from,const btVector3& } return 0; } + diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h index 8361dcabe4b..d5a299c606f 100644 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h @@ -17,11 +17,12 @@ class btDynamicsWorld; #include "LinearMath/btAlignedObjectArray.h" #include "btWheelInfo.h" +#include "BulletDynamics/Dynamics/btActionInterface.h" class btVehicleTuning; ///rayCast vehicle, very special constraint that turn a rigidbody into a vehicle. -class btRaycastVehicle : public btTypedConstraint +class btRaycastVehicle : public btActionInterface { btAlignedObjectArray m_forwardWS; @@ -29,6 +30,11 @@ class btRaycastVehicle : public btTypedConstraint btAlignedObjectArray m_forwardImpulse; btAlignedObjectArray m_sideImpulse; + int m_userConstraintType; + + int m_userConstraintId; + + public: class btVehicleTuning { @@ -73,13 +79,24 @@ public: virtual ~btRaycastVehicle() ; - + + ///btActionInterface interface + virtual void updateAction( btCollisionWorld* collisionWorld, btScalar step) + { + updateVehicle(step); + } + + + ///btActionInterface interface + void debugDraw(btIDebugDraw* debugDrawer); + const btTransform& getChassisWorldTransform() const; btScalar rayCast(btWheelInfo& wheel); virtual void updateVehicle(btScalar step); - + + void resetSuspension(); btScalar getSteeringValue(int wheel) const; @@ -175,15 +192,24 @@ public: m_indexForwardAxis = forwardIndex; } - virtual void buildJacobian() + int getUserConstraintType() const { - //not yet + return m_userConstraintType ; } - virtual void solveConstraint(btScalar timeStep) + void setUserConstraintType(int userConstraintType) { - (void)timeStep; - //not yet + m_userConstraintType = userConstraintType; + }; + + void setUserConstraintId(int uid) + { + m_userConstraintId = uid; + } + + int getUserConstraintId() const + { + return m_userConstraintId; } diff --git a/extern/bullet2/src/BulletSoftBody/CMakeLists.txt b/extern/bullet2/src/BulletSoftBody/CMakeLists.txt index a725e10ff77..fe31d2bee71 100644 --- a/extern/bullet2/src/BulletSoftBody/CMakeLists.txt +++ b/extern/bullet2/src/BulletSoftBody/CMakeLists.txt @@ -3,19 +3,41 @@ INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) -ADD_LIBRARY(LibBulletSoftBody +SET(BulletSoftBody_SRCS btSoftBody.cpp - btSoftBody.h btSoftBodyHelpers.cpp - btSparseSDF.h - btSoftBodyHelpers.h btSoftBodyRigidBodyCollisionConfiguration.cpp btSoftRigidCollisionAlgorithm.cpp - btSoftRigidCollisionAlgorithm.h btSoftSoftCollisionAlgorithm.cpp - btSoftSoftCollisionAlgorithm.h btSoftBodyConcaveCollisionAlgorithm.cpp - btSoftBodyConcaveCollisionAlgorithm.h - btSoftRigidDynamicsWorld.h btSoftRigidDynamicsWorld.cpp ) + +SET(BulletSoftBody_HDRS + btSoftBody.h + btSparseSDF.h + btSoftBodyHelpers.h + btSoftRigidCollisionAlgorithm.h + btSoftSoftCollisionAlgorithm.h + btSoftBodyConcaveCollisionAlgorithm.h + btSoftRigidDynamicsWorld.h +) + + + +ADD_LIBRARY(BulletSoftBody ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS}) +SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES SOVERSION ${BULLET_VERSION}) +IF (BUILD_SHARED_LIBS) + TARGET_LINK_LIBRARIES(BulletSoftBody BulletDynamics) +ENDIF (BUILD_SHARED_LIBS) + +IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + INSTALL(TARGETS BulletSoftBody DESTINATION lib) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + +IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES PUBLIC_HEADER "${BulletSoftBody_HDRS}") +ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp index 1ec668c9c78..ee810c54082 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp @@ -150,98 +150,98 @@ bool btSoftBody::checkFace(int node0,int node1,int node2) const // btSoftBody::Material* btSoftBody::appendMaterial() { -Material* pm=new(btAlignedAlloc(sizeof(Material),16)) Material(); -if(m_materials.size()>0) - *pm=*m_materials[0]; + Material* pm=new(btAlignedAlloc(sizeof(Material),16)) Material(); + if(m_materials.size()>0) + *pm=*m_materials[0]; else - ZeroInitialize(*pm); -m_materials.push_back(pm); -return(pm); + ZeroInitialize(*pm); + m_materials.push_back(pm); + return(pm); } // void btSoftBody::appendNote( const char* text, - const btVector3& o, - const btVector4& c, - Node* n0, - Node* n1, - Node* n2, - Node* n3) + const btVector3& o, + const btVector4& c, + Node* n0, + Node* n1, + Node* n2, + Node* n3) { -Note n; -ZeroInitialize(n); -n.m_rank = 0; -n.m_text = text; -n.m_offset = o; -n.m_coords[0] = c.x(); -n.m_coords[1] = c.y(); -n.m_coords[2] = c.z(); -n.m_coords[3] = c.w(); -n.m_nodes[0] = n0;n.m_rank+=n0?1:0; -n.m_nodes[1] = n1;n.m_rank+=n1?1:0; -n.m_nodes[2] = n2;n.m_rank+=n2?1:0; -n.m_nodes[3] = n3;n.m_rank+=n3?1:0; -m_notes.push_back(n); + Note n; + ZeroInitialize(n); + n.m_rank = 0; + n.m_text = text; + n.m_offset = o; + n.m_coords[0] = c.x(); + n.m_coords[1] = c.y(); + n.m_coords[2] = c.z(); + n.m_coords[3] = c.w(); + n.m_nodes[0] = n0;n.m_rank+=n0?1:0; + n.m_nodes[1] = n1;n.m_rank+=n1?1:0; + n.m_nodes[2] = n2;n.m_rank+=n2?1:0; + n.m_nodes[3] = n3;n.m_rank+=n3?1:0; + m_notes.push_back(n); } // void btSoftBody::appendNote( const char* text, - const btVector3& o, - Node* feature) + const btVector3& o, + Node* feature) { -appendNote(text,o,btVector4(1,0,0,0),feature); + appendNote(text,o,btVector4(1,0,0,0),feature); } // void btSoftBody::appendNote( const char* text, - const btVector3& o, - Link* feature) + const btVector3& o, + Link* feature) { -static const btScalar w=1/(btScalar)2; -appendNote(text,o,btVector4(w,w,0,0), feature->m_n[0], - feature->m_n[1]); + static const btScalar w=1/(btScalar)2; + appendNote(text,o,btVector4(w,w,0,0), feature->m_n[0], + feature->m_n[1]); } - + // void btSoftBody::appendNote( const char* text, - const btVector3& o, - Face* feature) + const btVector3& o, + Face* feature) { -static const btScalar w=1/(btScalar)3; -appendNote(text,o,btVector4(w,w,w,0), feature->m_n[0], - feature->m_n[1], - feature->m_n[2]); + static const btScalar w=1/(btScalar)3; + appendNote(text,o,btVector4(w,w,w,0), feature->m_n[0], + feature->m_n[1], + feature->m_n[2]); } // void btSoftBody::appendNode( const btVector3& x,btScalar m) { -if(m_nodes.capacity()==m_nodes.size()) + if(m_nodes.capacity()==m_nodes.size()) { - pointersToIndices(); - m_nodes.reserve(m_nodes.size()*2+1); - indicesToPointers(); + pointersToIndices(); + m_nodes.reserve(m_nodes.size()*2+1); + indicesToPointers(); } -const btScalar margin=getCollisionShape()->getMargin(); -m_nodes.push_back(Node()); -Node& n=m_nodes[m_nodes.size()-1]; -ZeroInitialize(n); -n.m_x = x; -n.m_q = n.m_x; -n.m_im = m>0?1/m:0; -n.m_material = m_materials[0]; -n.m_leaf = m_ndbvt.insert(btDbvtVolume::FromCR(n.m_x,margin),&n); + const btScalar margin=getCollisionShape()->getMargin(); + m_nodes.push_back(Node()); + Node& n=m_nodes[m_nodes.size()-1]; + ZeroInitialize(n); + n.m_x = x; + n.m_q = n.m_x; + n.m_im = m>0?1/m:0; + n.m_material = m_materials[0]; + n.m_leaf = m_ndbvt.insert(btDbvtVolume::FromCR(n.m_x,margin),&n); } // void btSoftBody::appendLink(int model,Material* mat) { -Link l; -if(model>=0) - l=m_links[model]; + Link l; + if(model>=0) + l=m_links[model]; else { ZeroInitialize(l);l.m_material=mat?mat:m_materials[0]; } -m_links.push_back(l); + m_links.push_back(l); } // @@ -273,12 +273,12 @@ void btSoftBody::appendLink( Node* node0, // void btSoftBody::appendFace(int model,Material* mat) { -Face f; -if(model>=0) + Face f; + if(model>=0) { f=m_faces[model]; } else { ZeroInitialize(f);f.m_material=mat?mat:m_materials[0]; } -m_faces.push_back(f); + m_faces.push_back(f); } // @@ -306,9 +306,9 @@ void btSoftBody::appendFace(int node0,int node1,int node2,Material* mat) } // -void btSoftBody::appendAnchor(int node,btRigidBody* body,bool disableCollisionWithBody=false) +void btSoftBody::appendAnchor(int node,btRigidBody* body, bool disableCollisionBetweenLinkedBodies) { - if (disableCollisionWithBody) + if (disableCollisionBetweenLinkedBodies) { if (m_collisionDisabledObjects.findLinearSearch(body)==m_collisionDisabledObjects.size()) { @@ -327,54 +327,54 @@ void btSoftBody::appendAnchor(int node,btRigidBody* body,bool disableCollision // void btSoftBody::appendLinearJoint(const LJoint::Specs& specs,Cluster* body0,Body body1) { -LJoint* pj = new(btAlignedAlloc(sizeof(LJoint),16)) LJoint(); -pj->m_bodies[0] = body0; -pj->m_bodies[1] = body1; -pj->m_refs[0] = pj->m_bodies[0].xform().inverse()*specs.position; -pj->m_refs[1] = pj->m_bodies[1].xform().inverse()*specs.position; -pj->m_cfm = specs.cfm; -pj->m_erp = specs.erp; -pj->m_split = specs.split; -m_joints.push_back(pj); + LJoint* pj = new(btAlignedAlloc(sizeof(LJoint),16)) LJoint(); + pj->m_bodies[0] = body0; + pj->m_bodies[1] = body1; + pj->m_refs[0] = pj->m_bodies[0].xform().inverse()*specs.position; + pj->m_refs[1] = pj->m_bodies[1].xform().inverse()*specs.position; + pj->m_cfm = specs.cfm; + pj->m_erp = specs.erp; + pj->m_split = specs.split; + m_joints.push_back(pj); } // void btSoftBody::appendLinearJoint(const LJoint::Specs& specs,Body body) { -appendLinearJoint(specs,m_clusters[0],body); + appendLinearJoint(specs,m_clusters[0],body); } // void btSoftBody::appendLinearJoint(const LJoint::Specs& specs,btSoftBody* body) { -appendLinearJoint(specs,m_clusters[0],body->m_clusters[0]); + appendLinearJoint(specs,m_clusters[0],body->m_clusters[0]); } // void btSoftBody::appendAngularJoint(const AJoint::Specs& specs,Cluster* body0,Body body1) { -AJoint* pj = new(btAlignedAlloc(sizeof(AJoint),16)) AJoint(); -pj->m_bodies[0] = body0; -pj->m_bodies[1] = body1; -pj->m_refs[0] = pj->m_bodies[0].xform().inverse().getBasis()*specs.axis; -pj->m_refs[1] = pj->m_bodies[1].xform().inverse().getBasis()*specs.axis; -pj->m_cfm = specs.cfm; -pj->m_erp = specs.erp; -pj->m_split = specs.split; -pj->m_icontrol = specs.icontrol; -m_joints.push_back(pj); + AJoint* pj = new(btAlignedAlloc(sizeof(AJoint),16)) AJoint(); + pj->m_bodies[0] = body0; + pj->m_bodies[1] = body1; + pj->m_refs[0] = pj->m_bodies[0].xform().inverse().getBasis()*specs.axis; + pj->m_refs[1] = pj->m_bodies[1].xform().inverse().getBasis()*specs.axis; + pj->m_cfm = specs.cfm; + pj->m_erp = specs.erp; + pj->m_split = specs.split; + pj->m_icontrol = specs.icontrol; + m_joints.push_back(pj); } // void btSoftBody::appendAngularJoint(const AJoint::Specs& specs,Body body) { -appendAngularJoint(specs,m_clusters[0],body); + appendAngularJoint(specs,m_clusters[0],body); } // void btSoftBody::appendAngularJoint(const AJoint::Specs& specs,btSoftBody* body) { -appendAngularJoint(specs,m_clusters[0],body->m_clusters[0]); + appendAngularJoint(specs,m_clusters[0],body->m_clusters[0]); } // @@ -463,8 +463,8 @@ void btSoftBody::setTotalMass(btScalar mass,bool fromfaces) { const Face& f=m_faces[i]; const btScalar twicearea=AreaOf( f.m_n[0]->m_x, - f.m_n[1]->m_x, - f.m_n[2]->m_x); + f.m_n[1]->m_x, + f.m_n[2]->m_x); for(int j=0;j<3;++j) { f.m_n[j]->m_im+=twicearea; @@ -494,13 +494,17 @@ void btSoftBody::setTotalDensity(btScalar density) void btSoftBody::transform(const btTransform& trs) { const btScalar margin=getCollisionShape()->getMargin(); + ATTRIBUTE_ALIGNED16(btDbvtVolume) vol; + for(int i=0,ni=m_nodes.size();igetMargin(); + ATTRIBUTE_ALIGNED16(btDbvtVolume) vol; + for(int i=0,ni=m_nodes.size();i0 ? - 1/(m_nodes[i].m_im*tmass) : - kmass/tmass; + 1/(m_nodes[i].m_im*tmass) : + kmass/tmass; } /* Pos */ const btVector3 com=evaluateCom(); @@ -578,16 +585,16 @@ void btSoftBody::setPose(bool bvolume,bool bframe) m_pose.m_scl.setIdentity(); /* Aqq */ m_pose.m_aqq[0] = - m_pose.m_aqq[1] = - m_pose.m_aqq[2] = btVector3(0,0,0); + m_pose.m_aqq[1] = + m_pose.m_aqq[2] = btVector3(0,0,0); for( i=0,ni=m_nodes.size();im_nodes.size();im_nodes.size();im_nodes[i]->m_x*cluster->m_masses[i]; + com+=cluster->m_nodes[i]->m_x*cluster->m_masses[i]; } -return(com*cluster->m_imass); + return(com*cluster->m_imass); } // btVector3 btSoftBody::clusterCom(int cluster) const { -return(clusterCom(m_clusters[cluster])); + return(clusterCom(m_clusters[cluster])); } // btVector3 btSoftBody::clusterVelocity(const Cluster* cluster,const btVector3& rpos) { -return(cluster->m_lv+cross(cluster->m_av,rpos)); + return(cluster->m_lv+cross(cluster->m_av,rpos)); } // void btSoftBody::clusterVImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse) { -const btVector3 li=cluster->m_imass*impulse; -const btVector3 ai=cluster->m_invwi*cross(rpos,impulse); -cluster->m_vimpulses[0]+=li;cluster->m_lv+=li; -cluster->m_vimpulses[1]+=ai;cluster->m_av+=ai; -cluster->m_nvimpulses++; + const btVector3 li=cluster->m_imass*impulse; + const btVector3 ai=cluster->m_invwi*cross(rpos,impulse); + cluster->m_vimpulses[0]+=li;cluster->m_lv+=li; + cluster->m_vimpulses[1]+=ai;cluster->m_av+=ai; + cluster->m_nvimpulses++; } // void btSoftBody::clusterDImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse) { -const btVector3 li=cluster->m_imass*impulse; -const btVector3 ai=cluster->m_invwi*cross(rpos,impulse); -cluster->m_dimpulses[0]+=li; -cluster->m_dimpulses[1]+=ai; -cluster->m_ndimpulses++; + const btVector3 li=cluster->m_imass*impulse; + const btVector3 ai=cluster->m_invwi*cross(rpos,impulse); + cluster->m_dimpulses[0]+=li; + cluster->m_dimpulses[1]+=ai; + cluster->m_ndimpulses++; } // void btSoftBody::clusterImpulse(Cluster* cluster,const btVector3& rpos,const Impulse& impulse) { -if(impulse.m_asVelocity) clusterVImpulse(cluster,rpos,impulse.m_velocity); -if(impulse.m_asDrift) clusterDImpulse(cluster,rpos,impulse.m_drift); + if(impulse.m_asVelocity) clusterVImpulse(cluster,rpos,impulse.m_velocity); + if(impulse.m_asDrift) clusterDImpulse(cluster,rpos,impulse.m_drift); } // void btSoftBody::clusterVAImpulse(Cluster* cluster,const btVector3& impulse) { -const btVector3 ai=cluster->m_invwi*impulse; -cluster->m_vimpulses[1]+=ai;cluster->m_av+=ai; -cluster->m_nvimpulses++; + const btVector3 ai=cluster->m_invwi*impulse; + cluster->m_vimpulses[1]+=ai;cluster->m_av+=ai; + cluster->m_nvimpulses++; } // void btSoftBody::clusterDAImpulse(Cluster* cluster,const btVector3& impulse) { -const btVector3 ai=cluster->m_invwi*impulse; -cluster->m_dimpulses[1]+=ai; -cluster->m_ndimpulses++; + const btVector3 ai=cluster->m_invwi*impulse; + cluster->m_dimpulses[1]+=ai; + cluster->m_ndimpulses++; } // void btSoftBody::clusterAImpulse(Cluster* cluster,const Impulse& impulse) { -if(impulse.m_asVelocity) clusterVAImpulse(cluster,impulse.m_velocity); -if(impulse.m_asDrift) clusterDAImpulse(cluster,impulse.m_drift); + if(impulse.m_asVelocity) clusterVAImpulse(cluster,impulse.m_velocity); + if(impulse.m_asDrift) clusterDAImpulse(cluster,impulse.m_drift); } // void btSoftBody::clusterDCImpulse(Cluster* cluster,const btVector3& impulse) { -cluster->m_dimpulses[0]+=impulse*cluster->m_imass; -cluster->m_ndimpulses++; + cluster->m_dimpulses[0]+=impulse*cluster->m_imass; + cluster->m_ndimpulses++; } // @@ -762,9 +769,9 @@ int btSoftBody::generateBendingConstraints(int distance,Material* mat) // void btSoftBody::randomizeConstraints() { -unsigned long seed=243703; + unsigned long seed=243703; #define NEXTRAND (seed=(1664525L*seed+1013904223L)&0xffffffff) -int i,ni; + int i,ni; for(i=0,ni=m_links.size();im_leaf) m_cdbvt.remove(c->m_leaf); -c->~Cluster(); -btAlignedFree(c); -m_clusters.remove(c); + Cluster* c=m_clusters[index]; + if(c->m_leaf) m_cdbvt.remove(c->m_leaf); + c->~Cluster(); + btAlignedFree(c); + m_clusters.remove(c); } // void btSoftBody::releaseClusters() { -while(m_clusters.size()>0) releaseCluster(0); + while(m_clusters.size()>0) releaseCluster(0); } // int btSoftBody::generateClusters(int k,int maxiterations) { -int i; -releaseClusters(); -m_clusters.resize(btMin(k,m_nodes.size())); -for(i=0;im_collide= true; + m_clusters[i] = new(btAlignedAlloc(sizeof(Cluster),16)) Cluster(); + m_clusters[i]->m_collide= true; } -k=m_clusters.size(); -if(k>0) + k=m_clusters.size(); + if(k>0) { - /* Initialize */ - btAlignedObjectArray centers; - btVector3 cog(0,0,0); - int i; - for(i=0;i centers; + btVector3 cog(0,0,0); + int i; + for(i=0;im_nodes.push_back(&m_nodes[i]); + cog+=m_nodes[i].m_x; + m_clusters[(i*29873)%m_clusters.size()]->m_nodes.push_back(&m_nodes[i]); } - cog/=(btScalar)m_nodes.size(); - centers.resize(k,cog); - /* Iterate */ - const btScalar slope=16; - bool changed; - int iterations=0; - do { - const btScalar w=2-btMin(1,iterations/slope); - changed=false; - iterations++; - int i; + cog/=(btScalar)m_nodes.size(); + centers.resize(k,cog); + /* Iterate */ + const btScalar slope=16; + bool changed; + int iterations=0; + do { + const btScalar w=2-btMin(1,iterations/slope); + changed=false; + iterations++; + int i; - for(i=0;im_nodes.size();++j) + btVector3 c(0,0,0); + for(int j=0;jm_nodes.size();++j) { - c+=m_clusters[i]->m_nodes[j]->m_x; + c+=m_clusters[i]->m_nodes[j]->m_x; } - if(m_clusters[i]->m_nodes.size()) + if(m_clusters[i]->m_nodes.size()) { - c /= (btScalar)m_clusters[i]->m_nodes.size(); - c = centers[i]+(c-centers[i])*w; - changed |= ((c-centers[i]).length2()>SIMD_EPSILON); - centers[i] = c; - m_clusters[i]->m_nodes.resize(0); + c /= (btScalar)m_clusters[i]->m_nodes.size(); + c = centers[i]+(c-centers[i])*w; + changed |= ((c-centers[i]).length2()>SIMD_EPSILON); + centers[i] = c; + m_clusters[i]->m_nodes.resize(0); } } - for(i=0;im_nodes.push_back(&m_nodes[i]); + m_clusters[kbest]->m_nodes.push_back(&m_nodes[i]); } } while(changed&&(iterations cids; - cids.resize(m_nodes.size(),-1); - for(i=0;i cids; + cids.resize(m_nodes.size(),-1); + for(i=0;im_nodes.size();++j) + for(int j=0;jm_nodes.size();++j) { - cids[int(m_clusters[i]->m_nodes[j]-&m_nodes[0])]=i; + cids[int(m_clusters[i]->m_nodes[j]-&m_nodes[0])]=i; } } - for(i=0;im_nodes.findLinearSearch(&m_nodes[kid])==m_clusters[cid]->m_nodes.size()) + if(m_clusters[cid]->m_nodes.findLinearSearch(&m_nodes[kid])==m_clusters[cid]->m_nodes.size()) { - m_clusters[cid]->m_nodes.push_back(&m_nodes[kid]); + m_clusters[cid]->m_nodes.push_back(&m_nodes[kid]); } } } } } - /* Master */ - if(m_clusters.size()>1) + /* Master */ + if(m_clusters.size()>1) { - Cluster* pmaster=new(btAlignedAlloc(sizeof(Cluster),16)) Cluster(); - pmaster->m_collide = false; - pmaster->m_nodes.reserve(m_nodes.size()); - for(int i=0;im_nodes.push_back(&m_nodes[i]); - m_clusters.push_back(pmaster); - btSwap(m_clusters[0],m_clusters[m_clusters.size()-1]); + Cluster* pmaster=new(btAlignedAlloc(sizeof(Cluster),16)) Cluster(); + pmaster->m_collide = false; + pmaster->m_nodes.reserve(m_nodes.size()); + for(int i=0;im_nodes.push_back(&m_nodes[i]); + m_clusters.push_back(pmaster); + btSwap(m_clusters[0],m_clusters[m_clusters.size()-1]); } - /* Terminate */ - for(i=0;im_nodes.size()==0) + if(m_clusters[i]->m_nodes.size()==0) { - releaseCluster(i--); + releaseCluster(i--); } } - - initializeClusters(); - updateClusters(); - return(m_clusters.size()); + + initializeClusters(); + updateClusters(); + + //for self-collision + m_clusterConnectivity.resize(m_clusters.size()*m_clusters.size()); + { + for (int c0=0;c0m_clusterIndex=c0; + for (int c1=0;c1m_nodes.size();i++) + { + for (int j=0;jm_nodes.size();j++) + { + if (cla->m_nodes[i] == clb->m_nodes[j]) + { + connected=true; + break; + } + } + } + m_clusterConnectivity[c0+c1*m_clusters.size()]=connected; + } + } + } + + return(m_clusters.size()); } -return(0); + return(0); } // void btSoftBody::refine(ImplicitFn* ifn,btScalar accurary,bool cut) { -const Node* nbase = &m_nodes[0]; -int ncount = m_nodes.size(); -btSymMatrix edges(ncount,-2); -int newnodes=0; -int i,j,k,ni; + const Node* nbase = &m_nodes[0]; + int ncount = m_nodes.size(); + btSymMatrix edges(ncount,-2); + int newnodes=0; + int i,j,k,ni; -/* Filter out */ -for(i=0;iEval(l.m_n[0]->m_x),ifn->Eval(l.m_n[1]->m_x))) + if(!SameSign(ifn->Eval(l.m_n[0]->m_x),ifn->Eval(l.m_n[1]->m_x))) { - btSwap(m_links[i],m_links[m_links.size()-1]); - m_links.pop_back();--i; + btSwap(m_links[i],m_links[m_links.size()-1]); + m_links.pop_back();--i; } } } -/* Fill edges */ -for(i=0;i0) + Node& a=m_nodes[i]; + Node& b=m_nodes[j]; + const btScalar t=ImplicitSolve(ifn,a.m_x,b.m_x,accurary); + if(t>0) { - const btVector3 x=Lerp(a.m_x,b.m_x,t); - const btVector3 v=Lerp(a.m_v,b.m_v,t); - btScalar m=0; - if(a.m_im>0) + const btVector3 x=Lerp(a.m_x,b.m_x,t); + const btVector3 v=Lerp(a.m_v,b.m_v,t); + btScalar m=0; + if(a.m_im>0) { - if(b.m_im>0) + if(b.m_im>0) { - const btScalar ma=1/a.m_im; - const btScalar mb=1/b.m_im; - const btScalar mc=Lerp(ma,mb,t); - const btScalar f=(ma+mb)/(ma+mb+mc); - a.m_im=1/(ma*f); - b.m_im=1/(mb*f); - m=mc*f; + const btScalar ma=1/a.m_im; + const btScalar mb=1/b.m_im; + const btScalar mc=Lerp(ma,mb,t); + const btScalar f=(ma+mb)/(ma+mb+mc); + a.m_im=1/(ma*f); + b.m_im=1/(mb*f); + m=mc*f; } else { a.m_im/=0.5;m=1/a.m_im; } } else { - if(b.m_im>0) + if(b.m_im>0) { b.m_im/=0.5;m=1/b.m_im; } else - m=0; + m=0; } - appendNode(x,m); - edges(i,j)=m_nodes.size()-1; - m_nodes[edges(i,j)].m_v=v; - ++newnodes; + appendNode(x,m); + edges(i,j)=m_nodes.size()-1; + m_nodes[edges(i,j)].m_v=v; + ++newnodes; } } } } -nbase=&m_nodes[0]; -/* Refine links */ -for(i=0,ni=m_links.size();i0) - { - appendLink(i); - Link* pft[]={ &m_links[i], - &m_links[m_links.size()-1]}; - pft[0]->m_n[0]=&m_nodes[idx[0]]; - pft[0]->m_n[1]=&m_nodes[ni]; - pft[1]->m_n[0]=&m_nodes[ni]; - pft[1]->m_n[1]=&m_nodes[idx[1]]; - } - } - } -/* Refine faces */ -for(i=0;i0) - { - appendFace(i); - const int l=(k+1)%3; - Face* pft[]={ &m_faces[i], - &m_faces[m_faces.size()-1]}; - pft[0]->m_n[0]=&m_nodes[idx[l]]; - pft[0]->m_n[1]=&m_nodes[idx[j]]; - pft[0]->m_n[2]=&m_nodes[ni]; - pft[1]->m_n[0]=&m_nodes[ni]; - pft[1]->m_n[1]=&m_nodes[idx[k]]; - pft[1]->m_n[2]=&m_nodes[idx[l]]; - appendLink(ni,idx[l],pft[0]->m_material); - --i;break; - } - } - } - } -/* Cut */ -if(cut) - { - btAlignedObjectArray cnodes; - const int pcount=ncount; - int i; - ncount=m_nodes.size(); - cnodes.resize(ncount,0); - /* Nodes */ - for(i=0;i=pcount)||(btFabs(ifn->Eval(x))0) { m*=0.5;m_nodes[i].m_im/=0.5; } - appendNode(x,m); - cnodes[i]=m_nodes.size()-1; - m_nodes[cnodes[i]].m_v=v; - } - } nbase=&m_nodes[0]; - /* Links */ + /* Refine links */ for(i=0,ni=m_links.size();i0) { - appendLink(i); - todetach=m_links.size()-1; + appendLink(i); + Link* pft[]={ &m_links[i], + &m_links[m_links.size()-1]}; + pft[0]->m_n[0]=&m_nodes[idx[0]]; + pft[0]->m_n[1]=&m_nodes[ni]; + pft[1]->m_n[0]=&m_nodes[ni]; + pft[1]->m_n[1]=&m_nodes[idx[1]]; } - else + } + } + /* Refine faces */ + for(i=0;iEval(m_nodes[id[0]].m_x)Eval(m_nodes[id[1]].m_x)0) { - int cn=cnodes[int(l.m_n[j]-nbase)]; - if(cn) l.m_n[j]=&m_nodes[cn]; + appendFace(i); + const int l=(k+1)%3; + Face* pft[]={ &m_faces[i], + &m_faces[m_faces.size()-1]}; + pft[0]->m_n[0]=&m_nodes[idx[l]]; + pft[0]->m_n[1]=&m_nodes[idx[j]]; + pft[0]->m_n[2]=&m_nodes[ni]; + pft[1]->m_n[0]=&m_nodes[ni]; + pft[1]->m_n[1]=&m_nodes[idx[k]]; + pft[1]->m_n[2]=&m_nodes[idx[l]]; + appendLink(ni,idx[l],pft[0]->m_material); + --i;break; + } + } + } + } + /* Cut */ + if(cut) + { + btAlignedObjectArray cnodes; + const int pcount=ncount; + int i; + ncount=m_nodes.size(); + cnodes.resize(ncount,0); + /* Nodes */ + for(i=0;i=pcount)||(btFabs(ifn->Eval(x))0) { m*=0.5;m_nodes[i].m_im/=0.5; } + appendNode(x,m); + cnodes[i]=m_nodes.size()-1; + m_nodes[cnodes[i]].m_v=v; + } + } + nbase=&m_nodes[0]; + /* Links */ + for(i=0,ni=m_links.size();iEval(m_nodes[id[0]].m_x)Eval(m_nodes[id[1]].m_x)Eval(n[0]->m_x)Eval(n[1]->m_x)Eval(n[2]->m_x)Eval(n[0]->m_x)Eval(n[1]->m_x)Eval(n[2]->m_x) ranks; - btAlignedObjectArray todelete; - ranks.resize(nnodes,0); - for(i=0,ni=m_links.size();i ranks; + btAlignedObjectArray todelete; + ranks.resize(nnodes,0); + for(i=0,ni=m_links.size();i=0;--i) +#if 0 + for(i=nnodes-1;i>=0;--i) { - if(!ranks[i]) todelete.push_back(i); + if(!ranks[i]) todelete.push_back(i); } - if(todelete.size()) + if(todelete.size()) { - btAlignedObjectArray& map=ranks; - for(int i=0;i& map=ranks; + for(int i=0;im_v=v; -pn[1]->m_v=v; -for(i=0,ni=m_links.size();im_v=v; + pn[1]->m_v=v; + for(i=0,ni=m_links.size();im_n[1]=pn[mtch]; - pft[1]->m_n[0]=pn[1-mtch]; - done=true; + appendLink(i); + Link* pft[]={&m_links[i],&m_links[m_links.size()-1]}; + pft[0]->m_n[1]=pn[mtch]; + pft[1]->m_n[0]=pn[1-mtch]; + done=true; } } -for(i=0,ni=m_faces.size();im_n[l]=pn[mtch]; - pft[1]->m_n[k]=pn[1-mtch]; - appendLink(pn[0],pft[0]->m_n[(l+1)%3],pft[0]->m_material,true); - appendLink(pn[1],pft[0]->m_n[(l+1)%3],pft[0]->m_material,true); + appendFace(i); + Face* pft[]={&m_faces[i],&m_faces[m_faces.size()-1]}; + pft[0]->m_n[l]=pn[mtch]; + pft[1]->m_n[k]=pn[1-mtch]; + appendLink(pn[0],pft[0]->m_n[(l+1)%3],pft[0]->m_material,true); + appendLink(pn[1],pft[0]->m_n[(l+1)%3],pft[0]->m_material,true); } } } -if(!done) + if(!done) { - m_ndbvt.remove(pn[0]->m_leaf); - m_ndbvt.remove(pn[1]->m_leaf); - m_nodes.pop_back(); - m_nodes.pop_back(); + m_ndbvt.remove(pn[0]->m_leaf); + m_ndbvt.remove(pn[1]->m_leaf); + m_nodes.pop_back(); + m_nodes.pop_back(); } -return(done); + return(done); } // -bool btSoftBody::rayCast(const btVector3& org, - const btVector3& dir, - sRayCast& results, - btScalar maxtime) +bool btSoftBody::rayTest(const btVector3& rayFrom, + const btVector3& rayTo, + sRayCast& results) { -if(m_faces.size()&&m_fdbvt.empty()) initializeFaceTree(); -results.body = this; -results.time = maxtime; -results.feature = eFeature::None; -results.index = -1; -return(rayCast(org,dir,results.time,results.feature,results.index,false)!=0); + if(m_faces.size()&&m_fdbvt.empty()) + initializeFaceTree(); + + results.body = this; + results.fraction = 1.f; + results.feature = eFeature::None; + results.index = -1; + + return(rayTest(rayFrom,rayTo,results.fraction,results.feature,results.index,false)!=0); } // void btSoftBody::setSolver(eSolverPresets::_ preset) { -m_cfg.m_vsequence.clear(); -m_cfg.m_psequence.clear(); -m_cfg.m_dsequence.clear(); -switch(preset) + m_cfg.m_vsequence.clear(); + m_cfg.m_psequence.clear(); + m_cfg.m_dsequence.clear(); + switch(preset) { case eSolverPresets::Positions: - m_cfg.m_psequence.push_back(ePSolver::Anchors); - m_cfg.m_psequence.push_back(ePSolver::RContacts); - m_cfg.m_psequence.push_back(ePSolver::SContacts); - m_cfg.m_psequence.push_back(ePSolver::Linear); - break; + m_cfg.m_psequence.push_back(ePSolver::Anchors); + m_cfg.m_psequence.push_back(ePSolver::RContacts); + m_cfg.m_psequence.push_back(ePSolver::SContacts); + m_cfg.m_psequence.push_back(ePSolver::Linear); + break; case eSolverPresets::Velocities: - m_cfg.m_vsequence.push_back(eVSolver::Linear); - - m_cfg.m_psequence.push_back(ePSolver::Anchors); - m_cfg.m_psequence.push_back(ePSolver::RContacts); - m_cfg.m_psequence.push_back(ePSolver::SContacts); - - m_cfg.m_dsequence.push_back(ePSolver::Linear); - break; + m_cfg.m_vsequence.push_back(eVSolver::Linear); + + m_cfg.m_psequence.push_back(ePSolver::Anchors); + m_cfg.m_psequence.push_back(ePSolver::RContacts); + m_cfg.m_psequence.push_back(ePSolver::SContacts); + + m_cfg.m_dsequence.push_back(ePSolver::Linear); + break; } } @@ -1282,11 +1320,11 @@ void btSoftBody::predictMotion(btScalar dt) updateConstants(); m_fdbvt.clear(); if(m_cfg.collisions&fCollision::VF_SS) - { + { initializeFaceTree(); - } + } } - + /* Prepare */ m_sst.sdt = dt*m_cfg.timescale; m_sst.isdt = 1/m_sst.sdt; @@ -1310,45 +1348,48 @@ void btSoftBody::predictMotion(btScalar dt) /* Bounds */ updateBounds(); /* Nodes */ + ATTRIBUTE_ALIGNED16(btDbvtVolume) vol; for(i=0,ni=m_nodes.size();im_v+ - f.m_n[1]->m_v+ - f.m_n[2]->m_v)/3; + f.m_n[1]->m_v+ + f.m_n[2]->m_v)/3; + vol = VolumeOf(f,m_sst.radmrg); m_fdbvt.update( f.m_leaf, - VolumeOf(f,m_sst.radmrg), - v*m_sst.velmrg, - m_sst.updmrg); - } + vol, + v*m_sst.velmrg, + m_sst.updmrg); } + } /* Pose */ updatePose(); /* Match */ if(m_pose.m_bframe&&(m_cfg.kMT>0)) - { + { const btMatrix3x3 posetrs=m_pose.m_rot; for(int i=0,ni=m_nodes.size();i0) - { + { const btVector3 x=posetrs*m_pose.m_pos[i]+m_pose.m_com; n.m_x=Lerp(n.m_x,x,m_cfg.kMT); - } } } + } /* Clear contacts */ m_rcontacts.resize(0); m_scontacts.resize(0); @@ -1361,104 +1402,104 @@ void btSoftBody::predictMotion(btScalar dt) // void btSoftBody::solveConstraints() { -/* Apply clusters */ -applyClusters(false); -/* Prepare links */ + /* Apply clusters */ + applyClusters(false); + /* Prepare links */ -int i,ni; + int i,ni; -for(i=0,ni=m_links.size();im_q-l.m_n[0]->m_q; - l.m_c2 = 1/(l.m_c3.length2()*l.m_c0); + Link& l=m_links[i]; + l.m_c3 = l.m_n[1]->m_q-l.m_n[0]->m_q; + l.m_c2 = 1/(l.m_c3.length2()*l.m_c0); } -/* Prepare anchors */ -for(i=0,ni=m_anchors.size();igetWorldTransform().getBasis()*a.m_local; - a.m_c0 = ImpulseMatrix( m_sst.sdt, - a.m_node->m_im, - a.m_body->getInvMass(), - a.m_body->getInvInertiaTensorWorld(), - ra); - a.m_c1 = ra; - a.m_c2 = m_sst.sdt*a.m_node->m_im; - a.m_body->activate(); + Anchor& a=m_anchors[i]; + const btVector3 ra=a.m_body->getWorldTransform().getBasis()*a.m_local; + a.m_c0 = ImpulseMatrix( m_sst.sdt, + a.m_node->m_im, + a.m_body->getInvMass(), + a.m_body->getInvInertiaTensorWorld(), + ra); + a.m_c1 = ra; + a.m_c2 = m_sst.sdt*a.m_node->m_im; + a.m_body->activate(); } -/* Solve velocities */ -if(m_cfg.viterations>0) + /* Solve velocities */ + if(m_cfg.viterations>0) { - /* Solve */ - for(int isolve=0;isolve0) + /* Solve positions */ + if(m_cfg.piterations>0) { - for(int isolve=0;isolve0) + /* Solve drift */ + if(m_cfg.diterations>0) { - const btScalar vcf=m_cfg.kVCF*m_sst.isdt; - for(i=0,ni=m_nodes.size();i& bodies) { -const int nb=bodies.size(); -int iterations=0; -int i; + const int nb=bodies.size(); + int iterations=0; + int i; -for(i=0;im_cfg.citerations); + iterations=btMax(iterations,bodies[i]->m_cfg.citerations); } -for(i=0;iprepareClusters(iterations); + bodies[i]->prepareClusters(iterations); } -for(i=0;isolveClusters(sor); + bodies[j]->solveClusters(sor); } } -for(i=0;icleanupClusters(); + bodies[i]->cleanupClusters(); } } @@ -1506,48 +1547,54 @@ void btSoftBody::integrateMotion() } // - btSoftBody::RayCaster::RayCaster(const btVector3& org,const btVector3& dir,btScalar mxt) +btSoftBody::RayFromToCaster::RayFromToCaster(const btVector3& rayFrom,const btVector3& rayTo,btScalar mxt) { -o = org; -d = dir; -mint = mxt; -face = 0; -tests = 0; + m_rayFrom = rayFrom; + m_rayNormalizedDirection = (rayTo-rayFrom); + m_rayTo = rayTo; + m_mint = mxt; + m_face = 0; + m_tests = 0; } // -void btSoftBody::RayCaster::Process(const btDbvtNode* leaf) +void btSoftBody::RayFromToCaster::Process(const btDbvtNode* leaf) { -btSoftBody::Face& f=*(btSoftBody::Face*)leaf->data; -const btScalar t=rayTriangle( o,d, - f.m_n[0]->m_x, - f.m_n[1]->m_x, - f.m_n[2]->m_x, - mint); -if((t>0)&&(tdata; + const btScalar t=rayFromToTriangle( m_rayFrom,m_rayTo,m_rayNormalizedDirection, + f.m_n[0]->m_x, + f.m_n[1]->m_x, + f.m_n[2]->m_x, + m_mint); + if((t>0)&&(tteps)&&(tceps) && (dot(n,cross(b-hit,c-hit))>ceps) && (dot(n,cross(c-hit,a-hit))>ceps)) @@ -1569,9 +1616,9 @@ void btSoftBody::pointersToIndices() for(i=0,ni=m_nodes.size();idata=*(void**)&i; - } + } } for(i=0,ni=m_links.size();idata=*(void**)&i; - } + } } for(i=0,ni=m_anchors.size();idata=&m_nodes[i]; - } + } } for(i=0,ni=m_links.size();idata=&m_faces[i]; - } + } } for(i=0,ni=m_anchors.size();im_x, - f.m_n[1]->m_x, - f.m_n[2]->m_x, - mint); + + const btScalar t=RayFromToCaster::rayFromToTriangle( rayFrom,rayTo,dir, + f.m_n[0]->m_x, + f.m_n[1]->m_x, + f.m_n[2]->m_x, + mint); if(t>0) - { + { ++cnt; if(!bcountonly) - { + { feature=btSoftBody::eFeature::Face; index=i; mint=t; - } } } } - else - {/* Use dbvt */ - RayCaster collider(org,dir,mint); - btDbvt::collideRAY(m_fdbvt.m_root,org,dir,collider); - if(collider.face) - { - mint=collider.mint; + } + else + {/* Use dbvt */ + RayFromToCaster collider(rayFrom,rayTo,mint); + + btDbvt::rayTest(m_fdbvt.m_root,rayFrom,rayTo,collider); + if(collider.m_face) + { + mint=collider.m_mint; feature=btSoftBody::eFeature::Face; - index=(int)(collider.face-&m_faces[0]); + index=(int)(collider.m_face-&m_faces[0]); cnt=1; - } } + } return(cnt); } // void btSoftBody::initializeFaceTree() { -m_fdbvt.clear(); -for(int i=0;igetCollisionShape(); - const btTransform& wtr=prb->getInterpolationWorldTransform(); + btCollisionShape* shp=colObj->getCollisionShape(); + btRigidBody* tmpRigid = btRigidBody::upcast(colObj); + const btTransform& wtr=tmpRigid? tmpRigid->getInterpolationWorldTransform() : colObj->getWorldTransform(); btScalar dst=m_worldInfo->m_sparsesdf.Evaluate( wtr.invXform(x), - shp, - nrm, - margin); + shp, + nrm, + margin); if(dst<0) { - cti.m_body = prb; + cti.m_colObj = colObj; cti.m_normal = wtr.getBasis()*nrm; cti.m_offset = -dot( cti.m_normal, - x-cti.m_normal*dst); + x-cti.m_normal*dst); return(true); } return(false); @@ -1751,7 +1804,7 @@ void btSoftBody::updateNormals() { btSoftBody::Face& f=m_faces[i]; const btVector3 n=cross(f.m_n[1]->m_x-f.m_n[0]->m_x, - f.m_n[2]->m_x-f.m_n[0]->m_x); + f.m_n[2]->m_x-f.m_n[0]->m_x); f.m_normal=n.normalized(); f.m_n[0]->m_n+=n; f.m_n[1]->m_n+=n; @@ -1769,28 +1822,28 @@ void btSoftBody::updateNormals() void btSoftBody::updateBounds() { if(m_ndbvt.m_root) - { + { const btVector3& mins=m_ndbvt.m_root->volume.Mins(); const btVector3& maxs=m_ndbvt.m_root->volume.Maxs(); const btScalar csm=getCollisionShape()->getMargin(); const btVector3 mrg=btVector3( csm, - csm, - csm)*1; // ??? to investigate... + csm, + csm)*1; // ??? to investigate... m_bounds[0]=mins-mrg; m_bounds[1]=maxs+mrg; - if(0!=getBroadphaseHandle()) - { - m_worldInfo->m_broadphase->setAabb( getBroadphaseHandle(), - m_bounds[0], - m_bounds[1], - m_worldInfo->m_dispatcher); - } + if(0!=getBroadphaseHandle()) + { + m_worldInfo->m_broadphase->setAabb( getBroadphaseHandle(), + m_bounds[0], + m_bounds[1], + m_worldInfo->m_dispatcher); } - else - { + } + else + { m_bounds[0]= - m_bounds[1]=btVector3(0,0,0); - } + m_bounds[1]=btVector3(0,0,0); + } } @@ -1821,12 +1874,12 @@ void btSoftBody::updatePose() pose.m_rot=r; pose.m_scl=pose.m_aqq*r.transpose()*Apq; if(m_cfg.maxvolume>1) - { + { const btScalar idet=Clamp( 1/pose.m_scl.determinant(), - 1,m_cfg.maxvolume); + 1,m_cfg.maxvolume); pose.m_scl=Mul(pose.m_scl,idet); - } - + } + } } @@ -1881,53 +1934,53 @@ void btSoftBody::initializeClusters() { int i; -for( i=0;im_im>0?1/c.m_nodes[j]->m_im:0; - c.m_imass += c.m_masses[j]; + c.m_masses[j] = c.m_nodes[j]->m_im>0?1/c.m_nodes[j]->m_im:0; + c.m_imass += c.m_masses[j]; } - c.m_imass = 1/c.m_imass; - c.m_com = btSoftBody::clusterCom(&c); - c.m_lv = btVector3(0,0,0); - c.m_av = btVector3(0,0,0); - c.m_leaf = 0; - /* Inertia */ - btMatrix3x3& ii=c.m_locii; - ii[0]=ii[1]=ii[2]=btVector3(0,0,0); - { - int i,ni; + c.m_imass = 1/c.m_imass; + c.m_com = btSoftBody::clusterCom(&c); + c.m_lv = btVector3(0,0,0); + c.m_av = btVector3(0,0,0); + c.m_leaf = 0; + /* Inertia */ + btMatrix3x3& ii=c.m_locii; + ii[0]=ii[1]=ii[2]=btVector3(0,0,0); + { + int i,ni; - for(i=0,ni=c.m_nodes.size();im_x-c.m_com; - const btVector3 q=k*k; - const btScalar m=c.m_masses[i]; - ii[0][0] += m*(q[1]+q[2]); - ii[1][1] += m*(q[0]+q[2]); - ii[2][2] += m*(q[0]+q[1]); - ii[0][1] -= m*k[0]*k[1]; - ii[0][2] -= m*k[0]*k[2]; - ii[1][2] -= m*k[1]*k[2]; - } - } - ii[1][0]=ii[0][1]; - ii[2][0]=ii[0][2]; - ii[2][1]=ii[1][2]; - ii=ii.inverse(); - /* Frame */ - c.m_framexform.setIdentity(); - c.m_framexform.setOrigin(c.m_com); - c.m_framerefs.resize(c.m_nodes.size()); - { - int i; - for(i=0;im_x-c.m_com; + const btVector3 k=c.m_nodes[i]->m_x-c.m_com; + const btVector3 q=k*k; + const btScalar m=c.m_masses[i]; + ii[0][0] += m*(q[1]+q[2]); + ii[1][1] += m*(q[0]+q[2]); + ii[2][2] += m*(q[0]+q[1]); + ii[0][1] -= m*k[0]*k[1]; + ii[0][2] -= m*k[0]*k[2]; + ii[1][2] -= m*k[1]*k[2]; + } + } + ii[1][0]=ii[0][1]; + ii[2][0]=ii[0][2]; + ii[2][1]=ii[1][2]; + ii=ii.inverse(); + /* Frame */ + c.m_framexform.setIdentity(); + c.m_framexform.setOrigin(c.m_com); + c.m_framerefs.resize(c.m_nodes.size()); + { + int i; + for(i=0;im_x-c.m_com; } } } @@ -1936,49 +1989,49 @@ for( i=0;im_x-c.m_com; - const btVector3& b=c.m_framerefs[i]; - m[0]+=a[0]*b;m[1]+=a[1]*b;m[2]+=a[2]*b; + const btVector3 a=c.m_nodes[i]->m_x-c.m_com; + const btVector3& b=c.m_framerefs[i]; + m[0]+=a[0]*b;m[1]+=a[1]*b;m[2]+=a[2]*b; } - PolarDecompose(m,r,s); - c.m_framexform.setOrigin(c.m_com); - c.m_framexform.setBasis(r); - /* Inertia */ - #if 1/* Constant */ - c.m_invwi=c.m_framexform.getBasis()*c.m_locii*c.m_framexform.getBasis().transpose(); - #else - #if 0/* Sphere */ + PolarDecompose(m,r,s); + c.m_framexform.setOrigin(c.m_com); + c.m_framexform.setBasis(r); + /* Inertia */ +#if 1/* Constant */ + c.m_invwi=c.m_framexform.getBasis()*c.m_locii*c.m_framexform.getBasis().transpose(); +#else +#if 0/* Sphere */ const btScalar rk=(2*c.m_extents.length2())/(5*c.m_imass); const btVector3 inertia(rk,rk,rk); const btVector3 iin(btFabs(inertia[0])>SIMD_EPSILON?1/inertia[0]:0, - btFabs(inertia[1])>SIMD_EPSILON?1/inertia[1]:0, - btFabs(inertia[2])>SIMD_EPSILON?1/inertia[2]:0); - + btFabs(inertia[1])>SIMD_EPSILON?1/inertia[1]:0, + btFabs(inertia[2])>SIMD_EPSILON?1/inertia[2]:0); + c.m_invwi=c.m_xform.getBasis().scaled(iin)*c.m_xform.getBasis().transpose(); - #else/* Actual */ +#else/* Actual */ c.m_invwi[0]=c.m_invwi[1]=c.m_invwi[2]=btVector3(0,0,0); for(int i=0;im_x-c.m_com; const btVector3 q=k*k; const btScalar m=1/c.m_nodes[i]->m_im; @@ -1988,74 +2041,79 @@ for(i=0;im_v*c.m_masses[i]; - c.m_lv += v; - c.m_av += cross(c.m_nodes[i]->m_x-c.m_com,v); - } - } - c.m_lv=c.m_imass*c.m_lv*(1-c.m_ldamping); - c.m_av=c.m_invwi*c.m_av*(1-c.m_adamping); - c.m_vimpulses[0] = - c.m_vimpulses[1] = btVector3(0,0,0); - c.m_dimpulses[0] = - c.m_dimpulses[1] = btVector3(0,0,0); - c.m_nvimpulses = 0; - c.m_ndimpulses = 0; - /* Matching */ - if(c.m_matching>0) - { - for(int j=0;jm_v*c.m_masses[i]; + c.m_lv += v; + c.m_av += cross(c.m_nodes[i]->m_x-c.m_com,v); } } - /* Dbvt */ - if(c.m_collide) + c.m_lv=c.m_imass*c.m_lv*(1-c.m_ldamping); + c.m_av=c.m_invwi*c.m_av*(1-c.m_adamping); + c.m_vimpulses[0] = + c.m_vimpulses[1] = btVector3(0,0,0); + c.m_dimpulses[0] = + c.m_dimpulses[1] = btVector3(0,0,0); + c.m_nvimpulses = 0; + c.m_ndimpulses = 0; + /* Matching */ + if(c.m_matching>0) { - btVector3 mi=c.m_nodes[0]->m_x; - btVector3 mx=mi; - for(int j=1;jm_x); - mx.setMax(c.m_nodes[j]->m_x); + Node& n=*c.m_nodes[j]; + const btVector3 x=c.m_framexform*c.m_framerefs[j]; + n.m_x=Lerp(n.m_x,x,c.m_matching); + } + } + /* Dbvt */ + if(c.m_collide) + { + btVector3 mi=c.m_nodes[0]->m_x; + btVector3 mx=mi; + for(int j=1;jm_x); + mx.setMax(c.m_nodes[j]->m_x); } - const ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(mi,mx); - if(c.m_leaf) - m_cdbvt.update(c.m_leaf,bounds,c.m_lv*m_sst.sdt*3,m_sst.radmrg); + ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(mi,mx); + if(c.m_leaf) + m_cdbvt.update(c.m_leaf,bounds,c.m_lv*m_sst.sdt*3,m_sst.radmrg); else - c.m_leaf=m_cdbvt.insert(bounds,&c); + c.m_leaf=m_cdbvt.insert(bounds,&c); } } } + + } + + + // void btSoftBody::cleanupClusters() { -for(int i=0;iTerminate(m_sst.sdt); - if(m_joints[i]->m_delete) + m_joints[i]->Terminate(m_sst.sdt); + if(m_joints[i]->m_delete) { - btAlignedFree(m_joints[i]); - m_joints.remove(m_joints[i--]); + btAlignedFree(m_joints[i]); + m_joints.remove(m_joints[i--]); } } } @@ -2063,9 +2121,9 @@ for(int i=0;iPrepare(m_sst.sdt,iterations); + m_joints[i]->Prepare(m_sst.sdt,iterations); } } @@ -2073,50 +2131,51 @@ for(int i=0;iSolve(m_sst.sdt,sor); + m_joints[i]->Solve(m_sst.sdt,sor); } } // void btSoftBody::applyClusters(bool drift) { -BT_PROFILE("ApplyClusters"); -const btScalar f0=m_sst.sdt; -const btScalar f1=f0/2; -btAlignedObjectArray deltas; -btAlignedObjectArray weights; -deltas.resize(m_nodes.size(),btVector3(0,0,0)); -weights.resize(m_nodes.size(),0); -int i; + BT_PROFILE("ApplyClusters"); + const btScalar f0=m_sst.sdt; + const btScalar f1=f0/2; + btAlignedObjectArray deltas; + btAlignedObjectArray weights; + deltas.resize(m_nodes.size(),btVector3(0,0,0)); + weights.resize(m_nodes.size(),0); + int i; -if(drift) + if(drift) { - for(i=0;im_x; - const btScalar q=c.m_masses[j]; - deltas[idx] += (v+cross(w,x-c.m_com))*q; - weights[idx] += q; + const int idx=int(c.m_nodes[j]-&m_nodes[0]); + const btVector3& x=c.m_nodes[j]->m_x; + const btScalar q=c.m_masses[j]; + deltas[idx] += (v+cross(w,x-c.m_com))*q; + weights[idx] += q; } } } @@ -2131,18 +2190,21 @@ void btSoftBody::dampClusters() { int i; -for(i=0;i0) + Cluster& c=*m_clusters[i]; + if(c.m_ndamping>0) { - for(int j=0;j0) + Node& n=*c.m_nodes[j]; + if(n.m_im>0) { - const btVector3 vx=c.m_lv+cross(c.m_av,c.m_nodes[j]->m_q-c.m_com); - n.m_v += c.m_ndamping*(vx-n.m_v); + const btVector3 vx=c.m_lv+cross(c.m_av,c.m_nodes[j]->m_q-c.m_com); + if(vx.length2()<=n.m_v.length2()) + { + n.m_v += c.m_ndamping*(vx-n.m_v); + } } } } @@ -2152,154 +2214,155 @@ for(i=0;i0) + static const btScalar maxdrift=4; + Joint::Prepare(dt,iterations); + m_rpos[0] = m_bodies[0].xform()*m_refs[0]; + m_rpos[1] = m_bodies[1].xform()*m_refs[1]; + m_drift = Clamp(m_rpos[0]-m_rpos[1],maxdrift)*m_erp/dt; + m_rpos[0] -= m_bodies[0].xform().getOrigin(); + m_rpos[1] -= m_bodies[1].xform().getOrigin(); + m_massmatrix = ImpulseMatrix( m_bodies[0].invMass(),m_bodies[0].invWorldInertia(),m_rpos[0], + m_bodies[1].invMass(),m_bodies[1].invWorldInertia(),m_rpos[1]); + if(m_split>0) { - m_sdrift = m_massmatrix*(m_drift*m_split); - m_drift *= 1-m_split; + m_sdrift = m_massmatrix*(m_drift*m_split); + m_drift *= 1-m_split; } -m_drift /=(btScalar)iterations; + m_drift /=(btScalar)iterations; } // void btSoftBody::LJoint::Solve(btScalar dt,btScalar sor) { -const btVector3 va=m_bodies[0].velocity(m_rpos[0]); -const btVector3 vb=m_bodies[1].velocity(m_rpos[1]); -const btVector3 vr=va-vb; -btSoftBody::Impulse impulse; -impulse.m_asVelocity = 1; -impulse.m_velocity = m_massmatrix*(m_drift+vr*m_cfm)*sor; -m_bodies[0].applyImpulse(-impulse,m_rpos[0]); -m_bodies[1].applyImpulse( impulse,m_rpos[1]); + const btVector3 va=m_bodies[0].velocity(m_rpos[0]); + const btVector3 vb=m_bodies[1].velocity(m_rpos[1]); + const btVector3 vr=va-vb; + btSoftBody::Impulse impulse; + impulse.m_asVelocity = 1; + impulse.m_velocity = m_massmatrix*(m_drift+vr*m_cfm)*sor; + m_bodies[0].applyImpulse(-impulse,m_rpos[0]); + m_bodies[1].applyImpulse( impulse,m_rpos[1]); } // void btSoftBody::LJoint::Terminate(btScalar dt) { -if(m_split>0) + if(m_split>0) { - m_bodies[0].applyDImpulse(-m_sdrift,m_rpos[0]); - m_bodies[1].applyDImpulse( m_sdrift,m_rpos[1]); + m_bodies[0].applyDImpulse(-m_sdrift,m_rpos[0]); + m_bodies[1].applyDImpulse( m_sdrift,m_rpos[1]); } } // void btSoftBody::AJoint::Prepare(btScalar dt,int iterations) { -static const btScalar maxdrift=SIMD_PI/16; -m_icontrol->Prepare(this); -Joint::Prepare(dt,iterations); -m_axis[0] = m_bodies[0].xform().getBasis()*m_refs[0]; -m_axis[1] = m_bodies[1].xform().getBasis()*m_refs[1]; -m_drift = NormalizeAny(cross(m_axis[1],m_axis[0])); -m_drift *= btMin(maxdrift,btAcos(Clamp(dot(m_axis[0],m_axis[1]),-1,+1))); -m_drift *= m_erp/dt; -m_massmatrix= AngularImpulseMatrix(m_bodies[0].invWorldInertia(),m_bodies[1].invWorldInertia()); -if(m_split>0) + static const btScalar maxdrift=SIMD_PI/16; + m_icontrol->Prepare(this); + Joint::Prepare(dt,iterations); + m_axis[0] = m_bodies[0].xform().getBasis()*m_refs[0]; + m_axis[1] = m_bodies[1].xform().getBasis()*m_refs[1]; + m_drift = NormalizeAny(cross(m_axis[1],m_axis[0])); + m_drift *= btMin(maxdrift,btAcos(Clamp(dot(m_axis[0],m_axis[1]),-1,+1))); + m_drift *= m_erp/dt; + m_massmatrix= AngularImpulseMatrix(m_bodies[0].invWorldInertia(),m_bodies[1].invWorldInertia()); + if(m_split>0) { - m_sdrift = m_massmatrix*(m_drift*m_split); - m_drift *= 1-m_split; + m_sdrift = m_massmatrix*(m_drift*m_split); + m_drift *= 1-m_split; } -m_drift /=(btScalar)iterations; + m_drift /=(btScalar)iterations; } // void btSoftBody::AJoint::Solve(btScalar dt,btScalar sor) { -const btVector3 va=m_bodies[0].angularVelocity(); -const btVector3 vb=m_bodies[1].angularVelocity(); -const btVector3 vr=va-vb; -const btScalar sp=dot(vr,m_axis[0]); -const btVector3 vc=vr-m_axis[0]*m_icontrol->Speed(this,sp); -btSoftBody::Impulse impulse; -impulse.m_asVelocity = 1; -impulse.m_velocity = m_massmatrix*(m_drift+vc*m_cfm)*sor; -m_bodies[0].applyAImpulse(-impulse); -m_bodies[1].applyAImpulse( impulse); + const btVector3 va=m_bodies[0].angularVelocity(); + const btVector3 vb=m_bodies[1].angularVelocity(); + const btVector3 vr=va-vb; + const btScalar sp=dot(vr,m_axis[0]); + const btVector3 vc=vr-m_axis[0]*m_icontrol->Speed(this,sp); + btSoftBody::Impulse impulse; + impulse.m_asVelocity = 1; + impulse.m_velocity = m_massmatrix*(m_drift+vc*m_cfm)*sor; + m_bodies[0].applyAImpulse(-impulse); + m_bodies[1].applyAImpulse( impulse); } // void btSoftBody::AJoint::Terminate(btScalar dt) { -if(m_split>0) + if(m_split>0) { - m_bodies[0].applyDAImpulse(-m_sdrift); - m_bodies[1].applyDAImpulse( m_sdrift); + m_bodies[0].applyDAImpulse(-m_sdrift); + m_bodies[1].applyDAImpulse( m_sdrift); } } // void btSoftBody::CJoint::Prepare(btScalar dt,int iterations) { -Joint::Prepare(dt,iterations); -const bool dodrift=(m_life==0); -m_delete=(++m_life)>m_maxlife; -if(dodrift) + Joint::Prepare(dt,iterations); + const bool dodrift=(m_life==0); + m_delete=(++m_life)>m_maxlife; + if(dodrift) { - m_drift=m_drift*m_erp/dt; - if(m_split>0) + m_drift=m_drift*m_erp/dt; + if(m_split>0) { - m_sdrift = m_massmatrix*(m_drift*m_split); - m_drift *= 1-m_split; + m_sdrift = m_massmatrix*(m_drift*m_split); + m_drift *= 1-m_split; } - m_drift/=(btScalar)iterations; + m_drift/=(btScalar)iterations; } else { - m_drift=m_sdrift=btVector3(0,0,0); + m_drift=m_sdrift=btVector3(0,0,0); } } // void btSoftBody::CJoint::Solve(btScalar dt,btScalar sor) { -const btVector3 va=m_bodies[0].velocity(m_rpos[0]); -const btVector3 vb=m_bodies[1].velocity(m_rpos[1]); -const btVector3 vrel=va-vb; -const btScalar rvac=dot(vrel,m_normal); -btSoftBody::Impulse impulse; -impulse.m_asVelocity = 1; -impulse.m_velocity = m_drift; -if(rvac<0) + const btVector3 va=m_bodies[0].velocity(m_rpos[0]); + const btVector3 vb=m_bodies[1].velocity(m_rpos[1]); + const btVector3 vrel=va-vb; + const btScalar rvac=dot(vrel,m_normal); + btSoftBody::Impulse impulse; + impulse.m_asVelocity = 1; + impulse.m_velocity = m_drift; + if(rvac<0) { - const btVector3 iv=m_normal*rvac; - const btVector3 fv=vrel-iv; - impulse.m_velocity += iv+fv*m_friction; + const btVector3 iv=m_normal*rvac; + const btVector3 fv=vrel-iv; + impulse.m_velocity += iv+fv*m_friction; } -impulse.m_velocity=m_massmatrix*impulse.m_velocity*sor; -m_bodies[0].applyImpulse(-impulse,m_rpos[0]); -m_bodies[1].applyImpulse( impulse,m_rpos[1]); + impulse.m_velocity=m_massmatrix*impulse.m_velocity*sor; + m_bodies[0].applyImpulse(-impulse,m_rpos[0]); + m_bodies[1].applyImpulse( impulse,m_rpos[1]); } // void btSoftBody::CJoint::Terminate(btScalar dt) { -if(m_split>0) + if(m_split>0) { - m_bodies[0].applyDImpulse(-m_sdrift,m_rpos[0]); - m_bodies[1].applyDImpulse( m_sdrift,m_rpos[1]); + m_bodies[0].applyDImpulse(-m_sdrift,m_rpos[0]); + m_bodies[1].applyDImpulse( m_sdrift,m_rpos[1]); } } // void btSoftBody::applyForces() { + BT_PROFILE("SoftBody applyForces"); const btScalar dt=m_sst.sdt; const btScalar kLF=m_cfg.kLF; @@ -2311,14 +2374,14 @@ void btSoftBody::applyForces() const bool as_pressure=kPR!=0; const bool as_volume=kVC>0; const bool as_aero= as_lift || - as_drag ; + as_drag ; const bool as_vaero= as_aero && - (m_cfg.aeromodel=btSoftBody::eAeroModel::F_TwoSided); + (m_cfg.aeromodel>=btSoftBody::eAeroModel::F_TwoSided); const bool use_medium= as_aero; const bool use_volume= as_pressure || - as_volume ; + as_volume ; btScalar volume=0; btScalar ivolumetp=0; btScalar dvolumetv=0; @@ -2447,12 +2510,10 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb,btScalar kst,btScalar ti) for(int i=0,ni=psb->m_rcontacts.size();im_rcontacts[i]; - ///skip object that don't have collision response - if (!psb->getWorldInfo()->m_dispatcher->needsResponse(psb,c.m_cti.m_body)) - continue; - const sCti& cti=c.m_cti; - const btVector3 va=cti.m_body->getVelocityInLocalPoint(c.m_c1)*dt; + btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj); + + const btVector3 va=tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0); const btVector3 vb=c.m_node->m_x-c.m_node->m_q; const btVector3 vr=vb-va; const btScalar dn=dot(vr,cti.m_normal); @@ -2462,7 +2523,8 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb,btScalar kst,btScalar ti) const btVector3 fv=vr-cti.m_normal*dn; const btVector3 impulse=c.m_c0*((vr-fv*c.m_c3+cti.m_normal*(dp*c.m_c4))*kst); c.m_node->m_x-=impulse*c.m_c2; - c.m_cti.m_body->applyImpulse(impulse,c.m_c1); + if (tmpRigid) + tmpRigid->applyImpulse(impulse,c.m_c1); } } } @@ -2470,32 +2532,32 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb,btScalar kst,btScalar ti) // void btSoftBody::PSolve_SContacts(btSoftBody* psb,btScalar,btScalar ti) { -for(int i=0,ni=psb->m_scontacts.size();im_scontacts.size();im_scontacts[i]; - const btVector3& nr=c.m_normal; - Node& n=*c.m_node; - Face& f=*c.m_face; - const btVector3 p=BaryEval( f.m_n[0]->m_x, - f.m_n[1]->m_x, - f.m_n[2]->m_x, - c.m_weights); - const btVector3 q=BaryEval( f.m_n[0]->m_q, - f.m_n[1]->m_q, - f.m_n[2]->m_q, - c.m_weights); - const btVector3 vr=(n.m_x-n.m_q)-(p-q); - btVector3 corr(0,0,0); - if(dot(vr,nr)<0) + const SContact& c=psb->m_scontacts[i]; + const btVector3& nr=c.m_normal; + Node& n=*c.m_node; + Face& f=*c.m_face; + const btVector3 p=BaryEval( f.m_n[0]->m_x, + f.m_n[1]->m_x, + f.m_n[2]->m_x, + c.m_weights); + const btVector3 q=BaryEval( f.m_n[0]->m_q, + f.m_n[1]->m_q, + f.m_n[2]->m_q, + c.m_weights); + const btVector3 vr=(n.m_x-n.m_q)-(p-q); + btVector3 corr(0,0,0); + if(dot(vr,nr)<0) { - const btScalar j=c.m_margin-(dot(nr,n.m_x)-dot(nr,p)); - corr+=c.m_normal*j; + const btScalar j=c.m_margin-(dot(nr,n.m_x)-dot(nr,p)); + corr+=c.m_normal*j; } - corr -= ProjectOnPlane(vr,nr)*c.m_friction; - n.m_x += corr*c.m_cfm[0]; - f.m_n[0]->m_x -= corr*(c.m_cfm[1]*c.m_weights.x()); - f.m_n[1]->m_x -= corr*(c.m_cfm[1]*c.m_weights.y()); - f.m_n[2]->m_x -= corr*(c.m_cfm[1]*c.m_weights.z()); + corr -= ProjectOnPlane(vr,nr)*c.m_friction; + n.m_x += corr*c.m_cfm[0]; + f.m_n[0]->m_x -= corr*(c.m_cfm[1]*c.m_weights.x()); + f.m_n[1]->m_x -= corr*(c.m_cfm[1]*c.m_weights.y()); + f.m_n[2]->m_x -= corr*(c.m_cfm[1]*c.m_weights.z()); } } @@ -2522,107 +2584,114 @@ void btSoftBody::PSolve_Links(btSoftBody* psb,btScalar kst,btScalar ti) // void btSoftBody::VSolve_Links(btSoftBody* psb,btScalar kst) { -for(int i=0,ni=psb->m_links.size();im_links.size();im_links[i]; - Node** n=l.m_n; - const btScalar j=-dot(l.m_c3,n[0]->m_v-n[1]->m_v)*l.m_c2*kst; - n[0]->m_v+= l.m_c3*(j*n[0]->m_im); - n[1]->m_v-= l.m_c3*(j*n[1]->m_im); + Link& l=psb->m_links[i]; + Node** n=l.m_n; + const btScalar j=-dot(l.m_c3,n[0]->m_v-n[1]->m_v)*l.m_c2*kst; + n[0]->m_v+= l.m_c3*(j*n[0]->m_im); + n[1]->m_v-= l.m_c3*(j*n[1]->m_im); } } // btSoftBody::psolver_t btSoftBody::getSolver(ePSolver::_ solver) { -switch(solver) + switch(solver) { case ePSolver::Anchors: return(&btSoftBody::PSolve_Anchors); case ePSolver::Linear: return(&btSoftBody::PSolve_Links); case ePSolver::RContacts: return(&btSoftBody::PSolve_RContacts); case ePSolver::SContacts: return(&btSoftBody::PSolve_SContacts); } -return(0); + return(0); } // btSoftBody::vsolver_t btSoftBody::getSolver(eVSolver::_ solver) { -switch(solver) + switch(solver) { case eVSolver::Linear: return(&btSoftBody::VSolve_Links); } -return(0); + return(0); } // void btSoftBody::defaultCollisionHandler(btCollisionObject* pco) { -switch(m_cfg.collisions&fCollision::RVSmask) + switch(m_cfg.collisions&fCollision::RVSmask) { case fCollision::SDF_RS: { - btSoftColliders::CollideSDF_RS docollide; - btRigidBody* prb=btRigidBody::upcast(pco); - const btTransform wtr=prb->getInterpolationWorldTransform(); - const btTransform ctr=prb->getWorldTransform(); - const btScalar timemargin=(wtr.getOrigin()-ctr.getOrigin()).length(); - const btScalar basemargin=getCollisionShape()->getMargin(); - btVector3 mins; - btVector3 maxs; - ATTRIBUTE_ALIGNED16(btDbvtVolume) volume; - pco->getCollisionShape()->getAabb( pco->getInterpolationWorldTransform(), - mins, - maxs); - volume=btDbvtVolume::FromMM(mins,maxs); - volume.Expand(btVector3(basemargin,basemargin,basemargin)); - docollide.psb = this; - docollide.prb = prb; - docollide.dynmargin = basemargin+timemargin; - docollide.stamargin = basemargin; - btDbvt::collideTV(m_ndbvt.m_root,volume,docollide); + btSoftColliders::CollideSDF_RS docollide; + btRigidBody* prb1=btRigidBody::upcast(pco); + btTransform wtr=prb1 ? prb1->getInterpolationWorldTransform() : pco->getWorldTransform(); + + const btTransform ctr=pco->getWorldTransform(); + const btScalar timemargin=(wtr.getOrigin()-ctr.getOrigin()).length(); + const btScalar basemargin=getCollisionShape()->getMargin(); + btVector3 mins; + btVector3 maxs; + ATTRIBUTE_ALIGNED16(btDbvtVolume) volume; + pco->getCollisionShape()->getAabb( pco->getInterpolationWorldTransform(), + mins, + maxs); + volume=btDbvtVolume::FromMM(mins,maxs); + volume.Expand(btVector3(basemargin,basemargin,basemargin)); + docollide.psb = this; + docollide.m_colObj1 = pco; + docollide.m_rigidBody = prb1; + + docollide.dynmargin = basemargin+timemargin; + docollide.stamargin = basemargin; + m_ndbvt.collideTV(m_ndbvt.m_root,volume,docollide); } - break; + break; case fCollision::CL_RS: { - btSoftColliders::CollideCL_RS collider; - collider.Process(this,btRigidBody::upcast(pco)); + btSoftColliders::CollideCL_RS collider; + collider.Process(this,pco); } - break; + break; } } // void btSoftBody::defaultCollisionHandler(btSoftBody* psb) { -const int cf=m_cfg.collisions&psb->m_cfg.collisions; -switch(cf&fCollision::SVSmask) + const int cf=m_cfg.collisions&psb->m_cfg.collisions; + switch(cf&fCollision::SVSmask) { case fCollision::CL_SS: { - btSoftColliders::CollideCL_SS docollide; - docollide.Process(this,psb); + btSoftColliders::CollideCL_SS docollide; + docollide.Process(this,psb); } - break; + break; case fCollision::VF_SS: { - btSoftColliders::CollideVF_SS docollide; - /* common */ - docollide.mrg= getCollisionShape()->getMargin()+ - psb->getCollisionShape()->getMargin(); - /* psb0 nodes vs psb1 faces */ - docollide.psb[0]=this; - docollide.psb[1]=psb; - btDbvt::collideTT( docollide.psb[0]->m_ndbvt.m_root, - docollide.psb[1]->m_fdbvt.m_root, - docollide); - /* psb1 nodes vs psb0 faces */ - docollide.psb[0]=psb; - docollide.psb[1]=this; - btDbvt::collideTT( docollide.psb[0]->m_ndbvt.m_root, - docollide.psb[1]->m_fdbvt.m_root, - docollide); + //only self-collision for Cluster, not Vertex-Face yet + if (this!=psb) + { + btSoftColliders::CollideVF_SS docollide; + /* common */ + docollide.mrg= getCollisionShape()->getMargin()+ + psb->getCollisionShape()->getMargin(); + /* psb0 nodes vs psb1 faces */ + docollide.psb[0]=this; + docollide.psb[1]=psb; + docollide.psb[0]->m_ndbvt.collideTT( docollide.psb[0]->m_ndbvt.m_root, + docollide.psb[1]->m_fdbvt.m_root, + docollide); + /* psb1 nodes vs psb0 faces */ + docollide.psb[0]=psb; + docollide.psb[1]=this; + docollide.psb[0]->m_ndbvt.collideTT( docollide.psb[0]->m_ndbvt.m_root, + docollide.psb[1]->m_fdbvt.m_root, + docollide); + } } - break; + break; } } diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.h b/extern/bullet2/src/BulletSoftBody/btSoftBody.h index 743462d259a..a62c21883c8 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBody.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.h @@ -18,7 +18,6 @@ subject to the following restrictions: #define _BT_SOFT_BODY_H #include "LinearMath/btAlignedObjectArray.h" -#include "LinearMath/btPoint3.h" #include "LinearMath/btTransform.h" #include "LinearMath/btIDebugDraw.h" #include "BulletDynamics/Dynamics/btRigidBody.h" @@ -45,7 +44,8 @@ struct btSoftBodyWorldInfo }; -/// btSoftBody is work-in-progress +///The btSoftBody is an class to simulate cloth and volumetric soft bodies. +///There is two-way interaction between btSoftBody and btRigidBody/btCollisionObject. class btSoftBody : public btCollisionObject { public: @@ -64,13 +64,13 @@ public: F_OneSided, ///Face normals are taken as it is END };}; - + ///eVSolver : velocities solvers struct eVSolver { enum _ { Linear, ///Linear solver END };}; - + ///ePSolver : positions solvers struct ePSolver { enum _ { Linear, ///Linear solver @@ -79,7 +79,7 @@ public: SContacts, ///Soft contacts solver END };}; - + ///eSolverPresets struct eSolverPresets { enum _ { Positions, @@ -87,7 +87,7 @@ public: Default = Positions, END };}; - + ///eFeature struct eFeature { enum _ { None, @@ -96,20 +96,20 @@ public: Face, END };}; - + typedef btAlignedObjectArray tVSolverArray; typedef btAlignedObjectArray tPSolverArray; - + // // Flags // - + ///fCollision struct fCollision { enum _ { RVSmask = 0x000f, ///Rigid versus soft mask SDF_RS = 0x0001, ///SDF based rigid vs soft CL_RS = 0x0002, ///Cluster vs convex rigid vs soft - + SVSmask = 0x00f0, ///Rigid versus soft mask VF_SS = 0x0010, ///Vertex vs face soft vs soft handling CL_SS = 0x0020, ///Cluster vs cluster soft vs soft handling @@ -117,7 +117,7 @@ public: Default = SDF_RS, END };}; - + ///fMaterial struct fMaterial { enum _ { DebugDraw = 0x0001, /// Enable debug draw @@ -125,26 +125,26 @@ public: Default = DebugDraw, END };}; - + // // API Types // - + /* sRayCast */ struct sRayCast { btSoftBody* body; /// soft body eFeature::_ feature; /// feature type int index; /// feature index - btScalar time; /// time of impact (rayorg+raydir*time) + btScalar fraction; /// time of impact fraction (rayorg+(rayto-rayfrom)*fraction) }; - + /* ImplicitFn */ struct ImplicitFn { virtual btScalar Eval(const btVector3& x)=0; }; - + // // Internal types // @@ -155,7 +155,7 @@ public: /* sCti is Softbody contact info */ struct sCti { - btRigidBody* m_body; /* Rigid body */ + btCollisionObject* m_colObj; /* Rigid body */ btVector3 m_normal; /* Outward normal */ btScalar m_offset; /* Offset from origin */ }; @@ -182,7 +182,7 @@ public: btScalar m_kVST; // Volume stiffness coefficient [0,1] int m_flags; // Flags }; - + /* Feature */ struct Feature : Element { @@ -293,12 +293,13 @@ public: btVector3 m_lv; btVector3 m_av; btDbvtNode* m_leaf; - btScalar m_ndamping; - btScalar m_ldamping; - btScalar m_adamping; + btScalar m_ndamping; /* Node damping */ + btScalar m_ldamping; /* Linear damping */ + btScalar m_adamping; /* Angular damping */ btScalar m_matching; bool m_collide; - Cluster() : m_leaf(0),m_ndamping(0),m_ldamping(0),m_adamping(0),m_matching(0) {} + int m_clusterIndex; + Cluster() : m_leaf(0),m_ndamping(0),m_ldamping(0),m_adamping(0),m_matching(0) {} }; /* Impulse */ struct Impulse @@ -309,109 +310,115 @@ public: int m_asDrift:1; Impulse() : m_velocity(0,0,0),m_drift(0,0,0),m_asVelocity(0),m_asDrift(0) {} Impulse operator -() const - { + { Impulse i=*this; i.m_velocity=-i.m_velocity; i.m_drift=-i.m_drift; return(i); - } + } Impulse operator*(btScalar x) const - { + { Impulse i=*this; i.m_velocity*=x; i.m_drift*=x; return(i); - } + } }; /* Body */ struct Body { - Cluster* m_soft; - btRigidBody* m_rigid; - Body() : m_soft(0),m_rigid(0) {} - Body(Cluster* p) : m_soft(p),m_rigid(0) {} - Body(btRigidBody* p) : m_soft(0),m_rigid(p) {} + Cluster* m_soft; + btRigidBody* m_rigid; + btCollisionObject* m_collisionObject; + + Body() : m_soft(0),m_rigid(0),m_collisionObject(0) {} + Body(Cluster* p) : m_soft(p),m_rigid(0),m_collisionObject(0) {} + Body(btCollisionObject* colObj) : m_soft(0),m_collisionObject(colObj) + { + m_rigid = btRigidBody::upcast(m_collisionObject); + } + void activate() const - { + { if(m_rigid) m_rigid->activate(); - } + } const btMatrix3x3& invWorldInertia() const - { + { static const btMatrix3x3 iwi(0,0,0,0,0,0,0,0,0); if(m_rigid) return(m_rigid->getInvInertiaTensorWorld()); if(m_soft) return(m_soft->m_invwi); return(iwi); - } + } btScalar invMass() const - { + { if(m_rigid) return(m_rigid->getInvMass()); if(m_soft) return(m_soft->m_imass); return(0); - } + } const btTransform& xform() const - { + { static const btTransform identity=btTransform::getIdentity(); - if(m_rigid) return(m_rigid->getInterpolationWorldTransform()); + if(m_collisionObject) return(m_collisionObject->getInterpolationWorldTransform()); if(m_soft) return(m_soft->m_framexform); return(identity); - } + } btVector3 linearVelocity() const - { + { if(m_rigid) return(m_rigid->getLinearVelocity()); if(m_soft) return(m_soft->m_lv); return(btVector3(0,0,0)); - } + } btVector3 angularVelocity(const btVector3& rpos) const - { + { if(m_rigid) return(cross(m_rigid->getAngularVelocity(),rpos)); if(m_soft) return(cross(m_soft->m_av,rpos)); return(btVector3(0,0,0)); - } + } btVector3 angularVelocity() const - { + { if(m_rigid) return(m_rigid->getAngularVelocity()); if(m_soft) return(m_soft->m_av); return(btVector3(0,0,0)); - } + } btVector3 velocity(const btVector3& rpos) const - { + { return(linearVelocity()+angularVelocity(rpos)); - } + } void applyVImpulse(const btVector3& impulse,const btVector3& rpos) const - { + { if(m_rigid) m_rigid->applyImpulse(impulse,rpos); if(m_soft) btSoftBody::clusterVImpulse(m_soft,rpos,impulse); - } + } void applyDImpulse(const btVector3& impulse,const btVector3& rpos) const - { + { if(m_rigid) m_rigid->applyImpulse(impulse,rpos); if(m_soft) btSoftBody::clusterDImpulse(m_soft,rpos,impulse); - } + } void applyImpulse(const Impulse& impulse,const btVector3& rpos) const - { + { if(impulse.m_asVelocity) applyVImpulse(impulse.m_velocity,rpos); if(impulse.m_asDrift) applyDImpulse(impulse.m_drift,rpos); - } + } void applyVAImpulse(const btVector3& impulse) const - { + { if(m_rigid) m_rigid->applyTorqueImpulse(impulse); if(m_soft) btSoftBody::clusterVAImpulse(m_soft,impulse); - } + } void applyDAImpulse(const btVector3& impulse) const - { + { if(m_rigid) m_rigid->applyTorqueImpulse(impulse); if(m_soft) btSoftBody::clusterDAImpulse(m_soft,impulse); - } + } void applyAImpulse(const Impulse& impulse) const - { + { if(impulse.m_asVelocity) applyVAImpulse(impulse.m_velocity); if(impulse.m_asDrift) applyDAImpulse(impulse.m_drift); - } + } void applyDCImpulse(const btVector3& impulse) const - { + { if(m_rigid) m_rigid->applyCentralImpulse(impulse); if(m_soft) btSoftBody::clusterDCImpulse(m_soft,impulse); - } + } }; /* Joint */ struct Joint @@ -419,15 +426,15 @@ public: struct eType { enum _ { Linear, Angular, - Contact, + Contact };}; struct Specs - { - Specs() : erp(1),cfm(1),split(1) {} + { + Specs() : erp(1),cfm(1),split(1) {} btScalar erp; btScalar cfm; btScalar split; - }; + }; Body m_bodies[2]; btVector3 m_refs[2]; btScalar m_cfm; @@ -438,7 +445,7 @@ public: btMatrix3x3 m_massmatrix; bool m_delete; virtual ~Joint() {} - Joint() : m_delete(false) {} + Joint() : m_delete(false) {} virtual void Prepare(btScalar dt,int iterations); virtual void Solve(btScalar dt,btScalar sor)=0; virtual void Terminate(btScalar dt)=0; @@ -448,9 +455,9 @@ public: struct LJoint : Joint { struct Specs : Joint::Specs - { + { btVector3 position; - }; + }; btVector3 m_rpos[2]; void Prepare(btScalar dt,int iterations); void Solve(btScalar dt,btScalar sor); @@ -461,17 +468,17 @@ public: struct AJoint : Joint { struct IControl - { + { virtual void Prepare(AJoint*) {} virtual btScalar Speed(AJoint*,btScalar current) { return(current); } static IControl* Default() { static IControl def;return(&def); } - }; + }; struct Specs : Joint::Specs - { - Specs() : icontrol(IControl::Default()) {} + { + Specs() : icontrol(IControl::Default()) {} btVector3 axis; IControl* icontrol; - }; + }; btVector3 m_axis[2]; IControl* m_icontrol; void Prepare(btScalar dt,int iterations); @@ -534,23 +541,26 @@ public: btScalar radmrg; // radial margin btScalar updmrg; // Update margin }; - /* RayCaster */ - struct RayCaster : btDbvt::ICollide - { - btVector3 o; - btVector3 d; - btScalar mint; - Face* face; - int tests; - RayCaster(const btVector3& org,const btVector3& dir,btScalar mxt); + /// RayFromToCaster takes a ray from, ray to (instead of direction!) + struct RayFromToCaster : btDbvt::ICollide + { + btVector3 m_rayFrom; + btVector3 m_rayTo; + btVector3 m_rayNormalizedDirection; + btScalar m_mint; + Face* m_face; + int m_tests; + RayFromToCaster(const btVector3& rayFrom,const btVector3& rayTo,btScalar mxt); void Process(const btDbvtNode* leaf); - static inline btScalar rayTriangle(const btVector3& org, - const btVector3& dir, - const btVector3& a, - const btVector3& b, - const btVector3& c, - btScalar maxt=SIMD_INFINITY); - }; + + static inline btScalar rayFromToTriangle(const btVector3& rayFrom, + const btVector3& rayTo, + const btVector3& rayNormalizedDirection, + const btVector3& a, + const btVector3& b, + const btVector3& c, + btScalar maxt=SIMD_INFINITY); + }; // // Typedef's @@ -596,16 +606,19 @@ public: btDbvt m_fdbvt; // Faces tree btDbvt m_cdbvt; // Clusters tree tClusterArray m_clusters; // Clusters - - btTransform m_initialWorldTransform; //used to attach constraints etc. + + btAlignedObjectArraym_clusterConnectivity;//cluster connectivity, for self-collision + + btTransform m_initialWorldTransform; + // // Api // - + /* ctor */ btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count, - const btVector3* x, - const btScalar* m); + const btVector3* x, + const btScalar* m); /* dtor */ virtual ~btSoftBody(); /* Check for existing link */ @@ -617,59 +630,60 @@ public: return m_worldInfo; } + ///@todo: avoid internal softbody shape hack and move collision code to collision library virtual void setCollisionShape(btCollisionShape* collisionShape) { - //don't do anything, due to the internal shape hack: todo: fix this + } bool checkLink( int node0, int node1) const; bool checkLink( const Node* node0, - const Node* node1) const; + const Node* node1) const; /* Check for existring face */ bool checkFace( int node0, - int node1, - int node2) const; + int node1, + int node2) const; /* Append material */ Material* appendMaterial(); /* Append note */ void appendNote( const char* text, - const btVector3& o, - const btVector4& c=btVector4(1,0,0,0), - Node* n0=0, - Node* n1=0, - Node* n2=0, - Node* n3=0); + const btVector3& o, + const btVector4& c=btVector4(1,0,0,0), + Node* n0=0, + Node* n1=0, + Node* n2=0, + Node* n3=0); void appendNote( const char* text, - const btVector3& o, - Node* feature); + const btVector3& o, + Node* feature); void appendNote( const char* text, - const btVector3& o, - Link* feature); + const btVector3& o, + Link* feature); void appendNote( const char* text, - const btVector3& o, - Face* feature); + const btVector3& o, + Face* feature); /* Append node */ void appendNode( const btVector3& x,btScalar m); /* Append link */ void appendLink(int model=-1,Material* mat=0); void appendLink( int node0, - int node1, - Material* mat=0, - bool bcheckexist=false); + int node1, + Material* mat=0, + bool bcheckexist=false); void appendLink( Node* node0, - Node* node1, - Material* mat=0, - bool bcheckexist=false); + Node* node1, + Material* mat=0, + bool bcheckexist=false); /* Append face */ void appendFace(int model=-1,Material* mat=0); void appendFace( int node0, - int node1, - int node2, - Material* mat=0); + int node1, + int node2, + Material* mat=0); /* Append anchor */ void appendAnchor( int node, - btRigidBody* body,bool disableCollision); + btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false); /* Append linear joint */ void appendLinearJoint(const LJoint::Specs& specs,Cluster* body0,Body body1); void appendLinearJoint(const LJoint::Specs& specs,Body body=Body()); @@ -682,7 +696,7 @@ public: void addForce( const btVector3& force); /* Add force (or gravity) to a node of the body */ void addForce( const btVector3& force, - int node); + int node); /* Add velocity to the entire body */ void addVelocity( const btVector3& velocity); @@ -691,17 +705,17 @@ public: /* Add velocity to a node of the body */ void addVelocity( const btVector3& velocity, - int node); + int node); /* Set mass */ void setMass( int node, - btScalar mass); + btScalar mass); /* Get mass */ btScalar getMass( int node) const; /* Get total mass */ btScalar getTotalMass() const; /* Set total mass (weighted by previous masses) */ void setTotalMass( btScalar mass, - bool fromfaces=false); + bool fromfaces=false); /* Set total density */ void setTotalDensity(btScalar density); /* Transform */ @@ -714,7 +728,7 @@ public: void scale( const btVector3& scl); /* Set current state as pose */ void setPose( bool bvolume, - bool bframe); + bool bframe); /* Return the volume */ btScalar getVolume() const; /* Cluster count */ @@ -734,7 +748,7 @@ public: static void clusterDCImpulse(Cluster* cluster,const btVector3& impulse); /* Generate bending constraints based on distance in the adjency graph */ int generateBendingConstraints( int distance, - Material* mat=0); + Material* mat=0); /* Randomize constraints to reduce solver bias */ void randomizeConstraints(); /* Release clusters */ @@ -747,11 +761,11 @@ public: /* CutLink */ bool cutLink(int node0,int node1,btScalar position); bool cutLink(const Node* node0,const Node* node1,btScalar position); - /* Ray casting */ - bool rayCast(const btVector3& org, - const btVector3& dir, - sRayCast& results, - btScalar maxtime=SIMD_INFINITY); + + ///Ray casting using rayFrom and rayTo in worldspace, (not direction!) + bool rayTest(const btVector3& rayFrom, + const btVector3& rayTo, + sRayCast& results); /* Solver presets */ void setSolver(eSolverPresets::_ preset); /* predictMotion */ @@ -769,11 +783,11 @@ public: /* defaultCollisionHandlers */ void defaultCollisionHandler(btCollisionObject* pco); void defaultCollisionHandler(btSoftBody* psb); - + // // Cast // - + static const btSoftBody* upcast(const btCollisionObject* colObj) { if (colObj->getInternalType()==CO_SOFT_BODY) @@ -801,11 +815,12 @@ public: // void pointersToIndices(); void indicesToPointers(const int* map=0); - int rayCast(const btVector3& org,const btVector3& dir, - btScalar& mint,eFeature::_& feature,int& index,bool bcountonly) const; + + int rayTest(const btVector3& rayFrom,const btVector3& rayTo, + btScalar& mint,eFeature::_& feature,int& index,bool bcountonly) const; void initializeFaceTree(); btVector3 evaluateCom() const; - bool checkContact(btRigidBody* prb,const btVector3& x,btScalar margin,btSoftBody::sCti& cti) const; + bool checkContact(btCollisionObject* colObj,const btVector3& x,btScalar margin,btSoftBody::sCti& cti) const; void updateNormals(); void updateBounds(); void updatePose(); @@ -825,7 +840,7 @@ public: static void VSolve_Links(btSoftBody* psb,btScalar kst); static psolver_t getSolver(ePSolver::_ solver); static vsolver_t getSolver(eVSolver::_ solver); - + }; diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp index 61a57ea5da9..f334e15e0d3 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp @@ -32,7 +32,7 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" #include "BulletSoftBody/btSoftBody.h" -#define BT_SOFTBODY_TRIANGLE_EXTRUSION btScalar(0.3)//make this configurable +#define BT_SOFTBODY_TRIANGLE_EXTRUSION btScalar(0.06)//make this configurable btSoftBodyConcaveCollisionAlgorithm::btSoftBodyConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) : btCollisionAlgorithm(ci), @@ -50,27 +50,27 @@ btSoftBodyConcaveCollisionAlgorithm::~btSoftBodyConcaveCollisionAlgorithm() btSoftBodyTriangleCallback::btSoftBodyTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped): - m_dispatcher(dispatcher), - m_dispatchInfoPtr(0) +m_dispatcher(dispatcher), +m_dispatchInfoPtr(0) { m_softBody = (btSoftBody*) (isSwapped? body1:body0); m_triBody = isSwapped? body0:body1; - - // - // create the manifold from the dispatcher 'manifold pool' - // -// m_manifoldPtr = m_dispatcher->getNewManifold(m_convexBody,m_triBody); - clearCache(); + // + // create the manifold from the dispatcher 'manifold pool' + // + // m_manifoldPtr = m_dispatcher->getNewManifold(m_convexBody,m_triBody); + + clearCache(); } btSoftBodyTriangleCallback::~btSoftBodyTriangleCallback() { clearCache(); -// m_dispatcher->releaseManifold( m_manifoldPtr ); - + // m_dispatcher->releaseManifold( m_manifoldPtr ); + } - + void btSoftBodyTriangleCallback::clearCache() { @@ -83,18 +83,18 @@ void btSoftBodyTriangleCallback::clearCache() delete tmp->m_childShape; } m_shapeCache.clear(); -}; +} void btSoftBodyTriangleCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex) { - //just for debugging purposes + //just for debugging purposes //printf("triangle %d",m_triangleCount++); btCollisionObject* ob = static_cast(m_triBody); btCollisionAlgorithmConstructionInfo ci; ci.m_dispatcher1 = m_dispatcher; - ///debug drawing of the overlapping triangles + ///debug drawing of the overlapping triangles if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() > 0) { btVector3 color(255,255,0); @@ -107,7 +107,7 @@ void btSoftBodyTriangleCallback::processTriangle(btVector3* triangle,int partId, btTriIndex triIndex(partId,triangleIndex,0); btHashKey triKey(triIndex.getUid()); - + btTriIndex* shapeIndex = m_shapeCache[triKey]; if (shapeIndex) { @@ -116,13 +116,13 @@ void btSoftBodyTriangleCallback::processTriangle(btVector3* triangle,int partId, //copy over user pointers to temporary shape tm->setUserPointer(ob->getRootCollisionShape()->getUserPointer()); - + btCollisionShape* tmpShape = ob->getCollisionShape(); ob->internalSetTemporaryCollisionShape( tm ); - + btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_softBody,m_triBody,0);//m_manifoldPtr); - + colAlgo->processCollision(m_softBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); colAlgo->~btCollisionAlgorithm(); ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo); @@ -133,56 +133,56 @@ void btSoftBodyTriangleCallback::processTriangle(btVector3* triangle,int partId, //aabb filter is already applied! //btCollisionObject* colObj = static_cast(m_convexProxy->m_clientObject); - -// if (m_softBody->getCollisionShape()->getShapeType()== + + // if (m_softBody->getCollisionShape()->getShapeType()== { -// btVector3 other; + // btVector3 other; btVector3 normal = (triangle[1]-triangle[0]).cross(triangle[2]-triangle[0]); normal.normalize(); normal*= BT_SOFTBODY_TRIANGLE_EXTRUSION; -// other=(triangle[0]+triangle[1]+triangle[2])*0.333333f; -// other+=normal*22.f; - btVector3 pts[6] = {triangle[0], - triangle[1], - triangle[2], - triangle[0]-normal, - triangle[1]-normal, - triangle[2]-normal}; + // other=(triangle[0]+triangle[1]+triangle[2])*0.333333f; + // other+=normal*22.f; + btVector3 pts[6] = {triangle[0]+normal, + triangle[1]+normal, + triangle[2]+normal, + triangle[0]-normal, + triangle[1]-normal, + triangle[2]-normal}; btConvexHullShape* tm = new btConvexHullShape(&pts[0].getX(),6); -// btBU_Simplex1to4 tm(triangle[0],triangle[1],triangle[2],other); - + // btBU_Simplex1to4 tm(triangle[0],triangle[1],triangle[2],other); + //btTriangleShape tm(triangle[0],triangle[1],triangle[2]); - // tm.setMargin(m_collisionMarginTriangle); - + // tm.setMargin(m_collisionMarginTriangle); + //copy over user pointers to temporary shape tm->setUserPointer(ob->getRootCollisionShape()->getUserPointer()); - + btCollisionShape* tmpShape = ob->getCollisionShape(); ob->internalSetTemporaryCollisionShape( tm ); - + btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_softBody,m_triBody,0);//m_manifoldPtr); ///this should use the btDispatcher, so the actual registered algorithm is used // btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody); //m_resultOut->setShapeIdentifiers(-1,-1,partId,triangleIndex); - // cvxcvxalgo.setShapeIdentifiers(-1,-1,partId,triangleIndex); -// cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); + // cvxcvxalgo.setShapeIdentifiers(-1,-1,partId,triangleIndex); + // cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); colAlgo->processCollision(m_softBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); colAlgo->~btCollisionAlgorithm(); ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo); - - + + ob->internalSetTemporaryCollisionShape( tmpShape ); triIndex.m_childShape = tm; m_shapeCache.insert(triKey,triIndex); } - + } @@ -194,7 +194,7 @@ void btSoftBodyTriangleCallback::setTimeStepAndCounters(btScalar collisionMargin m_collisionMarginTriangle = collisionMarginTriangle+btScalar(BT_SOFTBODY_TRIANGLE_EXTRUSION); m_resultOut = resultOut; - + btVector3 aabbWorldSpaceMin,aabbWorldSpaceMax; m_softBody->getAabb(aabbWorldSpaceMin,aabbWorldSpaceMax); btVector3 halfExtents = (aabbWorldSpaceMax-aabbWorldSpaceMin)*btScalar(0.5); @@ -217,8 +217,8 @@ void btSoftBodyConcaveCollisionAlgorithm::clearCache() void btSoftBodyConcaveCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) { - - + + btCollisionObject* convexBody = m_isSwapped ? body1 : body0; btCollisionObject* triBody = m_isSwapped ? body0 : body1; @@ -228,26 +228,26 @@ void btSoftBodyConcaveCollisionAlgorithm::processCollision (btCollisionObject* b btCollisionObject* triOb = triBody; btConcaveShape* concaveShape = static_cast( triOb->getCollisionShape()); - - // if (convexBody->getCollisionShape()->isConvex()) + + // if (convexBody->getCollisionShape()->isConvex()) { btScalar collisionMarginTriangle = concaveShape->getMargin(); - -// resultOut->setPersistentManifold(m_btSoftBodyTriangleCallback.m_manifoldPtr); + + // resultOut->setPersistentManifold(m_btSoftBodyTriangleCallback.m_manifoldPtr); m_btSoftBodyTriangleCallback.setTimeStepAndCounters(collisionMarginTriangle,dispatchInfo,resultOut); //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here. //m_dispatcher->clearManifold(m_btSoftBodyTriangleCallback.m_manifoldPtr); -// m_btSoftBodyTriangleCallback.m_manifoldPtr->setBodies(convexBody,triBody); + // m_btSoftBodyTriangleCallback.m_manifoldPtr->setBodies(convexBody,triBody); concaveShape->processAllTriangles( &m_btSoftBodyTriangleCallback,m_btSoftBodyTriangleCallback.getAabbMin(),m_btSoftBodyTriangleCallback.getAabbMax()); - - // resultOut->refreshContactPoints(); - + + // resultOut->refreshContactPoints(); + } - + } } @@ -287,7 +287,7 @@ btScalar btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionO btScalar m_ccdSphereRadius; btScalar m_hitFraction; - + LocalTriangleSphereCastCallback(const btTransform& from,const btTransform& to,btScalar ccdSphereRadius,btScalar hitFraction) :m_ccdSphereFromTrans(from), @@ -296,8 +296,8 @@ btScalar btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionO m_hitFraction(hitFraction) { } - - + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) { (void)partId; @@ -327,9 +327,9 @@ btScalar btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionO }; - - + + if (triBody->getCollisionShape()->isConcave()) { btVector3 rayAabbMin = convexFromLocal.getOrigin(); @@ -349,12 +349,12 @@ btScalar btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionO btCollisionObject* concavebody = triBody; btConcaveShape* triangleMesh = (btConcaveShape*) concavebody->getCollisionShape(); - + if (triangleMesh) { triangleMesh->processAllTriangles(&raycastCallback,rayAabbMin,rayAabbMax); } - + if (raycastCallback.m_hitFraction < convexbody->getHitFraction()) diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h b/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h index 08ac3f11e20..a6ea33717bc 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h @@ -35,7 +35,7 @@ struct btTriIndex { int m_PartIdTriangleIndex; class btCollisionShape* m_childShape; - + btTriIndex(int partId,int triangleIndex,btCollisionShape* shape) { m_PartIdTriangleIndex = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | triangleIndex; @@ -75,11 +75,11 @@ class btSoftBodyTriangleCallback : public btTriangleCallback btScalar m_collisionMarginTriangle; btHashMap,btTriIndex> m_shapeCache; - + public: -int m_triangleCount; - -// btPersistentManifold* m_manifoldPtr; + int m_triangleCount; + + // btPersistentManifold* m_manifoldPtr; btSoftBodyTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); @@ -88,7 +88,7 @@ int m_triangleCount; virtual ~btSoftBodyTriangleCallback(); virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); - + void clearCache(); SIMD_FORCE_INLINE const btVector3& getAabbMin() const diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp index d9919967233..6ab93c16402 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp @@ -22,57 +22,57 @@ subject to the following restrictions: // static void drawVertex( btIDebugDraw* idraw, - const btVector3& x,btScalar s,const btVector3& c) - { - idraw->drawLine(x-btVector3(s,0,0),x+btVector3(s,0,0),c); - idraw->drawLine(x-btVector3(0,s,0),x+btVector3(0,s,0),c); - idraw->drawLine(x-btVector3(0,0,s),x+btVector3(0,0,s),c); - } + const btVector3& x,btScalar s,const btVector3& c) +{ + idraw->drawLine(x-btVector3(s,0,0),x+btVector3(s,0,0),c); + idraw->drawLine(x-btVector3(0,s,0),x+btVector3(0,s,0),c); + idraw->drawLine(x-btVector3(0,0,s),x+btVector3(0,0,s),c); +} // static void drawBox( btIDebugDraw* idraw, - const btVector3& mins, - const btVector3& maxs, - const btVector3& color) + const btVector3& mins, + const btVector3& maxs, + const btVector3& color) { -const btVector3 c[]={ btVector3(mins.x(),mins.y(),mins.z()), - btVector3(maxs.x(),mins.y(),mins.z()), - btVector3(maxs.x(),maxs.y(),mins.z()), - btVector3(mins.x(),maxs.y(),mins.z()), - btVector3(mins.x(),mins.y(),maxs.z()), - btVector3(maxs.x(),mins.y(),maxs.z()), - btVector3(maxs.x(),maxs.y(),maxs.z()), - btVector3(mins.x(),maxs.y(),maxs.z())}; -idraw->drawLine(c[0],c[1],color);idraw->drawLine(c[1],c[2],color); -idraw->drawLine(c[2],c[3],color);idraw->drawLine(c[3],c[0],color); -idraw->drawLine(c[4],c[5],color);idraw->drawLine(c[5],c[6],color); -idraw->drawLine(c[6],c[7],color);idraw->drawLine(c[7],c[4],color); -idraw->drawLine(c[0],c[4],color);idraw->drawLine(c[1],c[5],color); -idraw->drawLine(c[2],c[6],color);idraw->drawLine(c[3],c[7],color); + const btVector3 c[]={ btVector3(mins.x(),mins.y(),mins.z()), + btVector3(maxs.x(),mins.y(),mins.z()), + btVector3(maxs.x(),maxs.y(),mins.z()), + btVector3(mins.x(),maxs.y(),mins.z()), + btVector3(mins.x(),mins.y(),maxs.z()), + btVector3(maxs.x(),mins.y(),maxs.z()), + btVector3(maxs.x(),maxs.y(),maxs.z()), + btVector3(mins.x(),maxs.y(),maxs.z())}; + idraw->drawLine(c[0],c[1],color);idraw->drawLine(c[1],c[2],color); + idraw->drawLine(c[2],c[3],color);idraw->drawLine(c[3],c[0],color); + idraw->drawLine(c[4],c[5],color);idraw->drawLine(c[5],c[6],color); + idraw->drawLine(c[6],c[7],color);idraw->drawLine(c[7],c[4],color); + idraw->drawLine(c[0],c[4],color);idraw->drawLine(c[1],c[5],color); + idraw->drawLine(c[2],c[6],color);idraw->drawLine(c[3],c[7],color); } // static void drawTree( btIDebugDraw* idraw, - const btDbvtNode* node, - int depth, - const btVector3& ncolor, - const btVector3& lcolor, - int mindepth, - int maxdepth) + const btDbvtNode* node, + int depth, + const btVector3& ncolor, + const btVector3& lcolor, + int mindepth, + int maxdepth) { -if(node) + if(node) { - if(node->isinternal()&&((depthisinternal()&&((depthchilds[0],depth+1,ncolor,lcolor,mindepth,maxdepth); - drawTree(idraw,node->childs[1],depth+1,ncolor,lcolor,mindepth,maxdepth); + drawTree(idraw,node->childs[0],depth+1,ncolor,lcolor,mindepth,maxdepth); + drawTree(idraw,node->childs[1],depth+1,ncolor,lcolor,mindepth,maxdepth); } - if(depth>=mindepth) + if(depth>=mindepth) { - const btScalar scl=(btScalar)(node->isinternal()?1:1); - const btVector3 mi=node->volume.Center()-node->volume.Extents()*scl; - const btVector3 mx=node->volume.Center()+node->volume.Extents()*scl; - drawBox(idraw,mi,mx,node->isleaf()?lcolor:ncolor); + const btScalar scl=(btScalar)(node->isinternal()?1:1); + const btVector3 mi=node->volume.Center()-node->volume.Extents()*scl; + const btVector3 mx=node->volume.Center()+node->volume.Extents()*scl; + drawBox(idraw,mi,mx,node->isleaf()?lcolor:ncolor); } } } @@ -81,25 +81,25 @@ if(node) template static inline T sum(const btAlignedObjectArray& items) { -T v; -if(items.size()) + T v; + if(items.size()) { - v=items[0]; - for(int i=1,ni=items.size();i static inline void add(btAlignedObjectArray& items,const Q& value) { -for(int i=0,ni=items.size();i static inline void mul(btAlignedObjectArray& items,const Q& value) { -for(int i=0,ni=items.size();i static inline T average(const btAlignedObjectArray& items) { -const btScalar n=(btScalar)(items.size()>0?items.size():1); -return(sum(items)/n); + const btScalar n=(btScalar)(items.size()>0?items.size():1); + return(sum(items)/n); } // @@ -136,27 +136,27 @@ static inline btScalar tetravolume(const btVector3& x0, // #if 0 static btVector3 stresscolor(btScalar stress) - { +{ static const btVector3 spectrum[]= { btVector3(1,0,1), - btVector3(0,0,1), - btVector3(0,1,1), - btVector3(0,1,0), - btVector3(1,1,0), - btVector3(1,0,0), - btVector3(1,0,0)}; + btVector3(0,0,1), + btVector3(0,1,1), + btVector3(0,1,0), + btVector3(1,1,0), + btVector3(1,0,0), + btVector3(1,0,0)}; static const int ncolors=sizeof(spectrum)/sizeof(spectrum[0])-1; static const btScalar one=1; stress=btMax(0,btMin(1,stress))*ncolors; const int sel=(int)stress; const btScalar frc=stress-sel; return(spectrum[sel]+(spectrum[sel+1]-spectrum[sel])*frc); - } +} #endif // void btSoftBodyHelpers::Draw( btSoftBody* psb, - btIDebugDraw* idraw, - int drawflags) + btIDebugDraw* idraw, + int drawflags) { const btScalar scl=(btScalar)0.1; const btScalar nscl=scl*5; @@ -251,29 +251,29 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb, const btVector3 x[]={f.m_n[0]->m_x,f.m_n[1]->m_x,f.m_n[2]->m_x}; const btVector3 c=(x[0]+x[1]+x[2])/3; idraw->drawTriangle((x[0]-c)*scl+c, - (x[1]-c)*scl+c, - (x[2]-c)*scl+c, - col,alp); + (x[1]-c)*scl+c, + (x[2]-c)*scl+c, + col,alp); } } /* Clusters */ if(0!=(drawflags&fDrawFlags::Clusters)) - { + { srand(1806); for(i=0;im_clusters.size();++i) - { + { if(psb->m_clusters[i]->m_collide) - { + { btVector3 color( rand()/(btScalar)RAND_MAX, - rand()/(btScalar)RAND_MAX, - rand()/(btScalar)RAND_MAX); + rand()/(btScalar)RAND_MAX, + rand()/(btScalar)RAND_MAX); color=color.normalized()*0.75; btAlignedObjectArray vertices; vertices.resize(psb->m_clusters[i]->m_nodes.size()); for(j=0,nj=vertices.size();jm_clusters[i]->m_nodes[j]->m_x; - } + } HullDesc hdsc(QF_TRIANGLES,vertices.size(),&vertices[0]); HullResult hres; HullLibrary hlib; @@ -284,32 +284,32 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb, mul(hres.m_OutputVertices,(btScalar)1); add(hres.m_OutputVertices,center); for(j=0;j<(int)hres.mNumFaces;++j) - { + { const int idx[]={hres.m_Indices[j*3+0],hres.m_Indices[j*3+1],hres.m_Indices[j*3+2]}; idraw->drawTriangle(hres.m_OutputVertices[idx[0]], - hres.m_OutputVertices[idx[1]], - hres.m_OutputVertices[idx[2]], - color,1); - } - hlib.ReleaseResult(hres); + hres.m_OutputVertices[idx[1]], + hres.m_OutputVertices[idx[2]], + color,1); } + hlib.ReleaseResult(hres); + } /* Velocities */ - #if 0 +#if 0 for(int j=0;jm_clusters[i].m_nodes.size();++j) - { + { const btSoftBody::Cluster& c=psb->m_clusters[i]; const btVector3 r=c.m_nodes[j]->m_x-c.m_com; const btVector3 v=c.m_lv+cross(c.m_av,r); idraw->drawLine(c.m_nodes[j]->m_x,c.m_nodes[j]->m_x+v,btVector3(1,0,0)); - } - #endif + } +#endif /* Frame */ btSoftBody::Cluster& c=*psb->m_clusters[i]; idraw->drawLine(c.m_com,c.m_framexform*btVector3(10,0,0),btVector3(1,0,0)); idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,10,0),btVector3(0,1,0)); idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,0,10),btVector3(0,0,1)); - } } + } /* Notes */ if(0!=(drawflags&fDrawFlags::Notes)) { @@ -318,9 +318,9 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb, const btSoftBody::Note& n=psb->m_notes[i]; btVector3 p=n.m_offset; for(int j=0;jm_x*n.m_coords[j]; - } + } idraw->draw3dText(p,n.m_text); } } @@ -333,33 +333,33 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb, /* Joints */ if(0!=(drawflags&fDrawFlags::Joints)) { - for(i=0;im_joints.size();++i) + for(i=0;im_joints.size();++i) { - const btSoftBody::Joint* pj=psb->m_joints[i]; - switch(pj->Type()) + const btSoftBody::Joint* pj=psb->m_joints[i]; + switch(pj->Type()) { case btSoftBody::Joint::eType::Linear: { - const btSoftBody::LJoint* pjl=(const btSoftBody::LJoint*)pj; - const btVector3 a0=pj->m_bodies[0].xform()*pjl->m_refs[0]; - const btVector3 a1=pj->m_bodies[1].xform()*pjl->m_refs[1]; - idraw->drawLine(pj->m_bodies[0].xform().getOrigin(),a0,btVector3(1,1,0)); - idraw->drawLine(pj->m_bodies[1].xform().getOrigin(),a1,btVector3(0,1,1)); - drawVertex(idraw,a0,0.25,btVector3(1,1,0)); - drawVertex(idraw,a1,0.25,btVector3(0,1,1)); + const btSoftBody::LJoint* pjl=(const btSoftBody::LJoint*)pj; + const btVector3 a0=pj->m_bodies[0].xform()*pjl->m_refs[0]; + const btVector3 a1=pj->m_bodies[1].xform()*pjl->m_refs[1]; + idraw->drawLine(pj->m_bodies[0].xform().getOrigin(),a0,btVector3(1,1,0)); + idraw->drawLine(pj->m_bodies[1].xform().getOrigin(),a1,btVector3(0,1,1)); + drawVertex(idraw,a0,0.25,btVector3(1,1,0)); + drawVertex(idraw,a1,0.25,btVector3(0,1,1)); } - break; + break; case btSoftBody::Joint::eType::Angular: { - const btSoftBody::AJoint* pja=(const btSoftBody::AJoint*)pj; - const btVector3 o0=pj->m_bodies[0].xform().getOrigin(); - const btVector3 o1=pj->m_bodies[1].xform().getOrigin(); - const btVector3 a0=pj->m_bodies[0].xform().getBasis()*pj->m_refs[0]; - const btVector3 a1=pj->m_bodies[1].xform().getBasis()*pj->m_refs[1]; - idraw->drawLine(o0,o0+a0*10,btVector3(1,1,0)); - idraw->drawLine(o0,o0+a1*10,btVector3(1,1,0)); - idraw->drawLine(o1,o1+a0*10,btVector3(0,1,1)); - idraw->drawLine(o1,o1+a1*10,btVector3(0,1,1)); + const btSoftBody::AJoint* pja=(const btSoftBody::AJoint*)pj; + const btVector3 o0=pj->m_bodies[0].xform().getOrigin(); + const btVector3 o1=pj->m_bodies[1].xform().getOrigin(); + const btVector3 a0=pj->m_bodies[0].xform().getBasis()*pj->m_refs[0]; + const btVector3 a1=pj->m_bodies[1].xform().getBasis()*pj->m_refs[1]; + idraw->drawLine(o0,o0+a0*10,btVector3(1,1,0)); + idraw->drawLine(o0,o0+a1*10,btVector3(1,1,0)); + idraw->drawLine(o1,o1+a0*10,btVector3(0,1,1)); + idraw->drawLine(o1,o1+a1*10,btVector3(0,1,1)); } } } @@ -368,10 +368,10 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb, // void btSoftBodyHelpers::DrawInfos( btSoftBody* psb, - btIDebugDraw* idraw, - bool masses, - bool areas, - bool /*stress*/) + btIDebugDraw* idraw, + bool masses, + bool areas, + bool /*stress*/) { for(int i=0;im_nodes.size();++i) { @@ -394,34 +394,34 @@ void btSoftBodyHelpers::DrawInfos( btSoftBody* psb, // void btSoftBodyHelpers::DrawNodeTree( btSoftBody* psb, - btIDebugDraw* idraw, - int mindepth, - int maxdepth) + btIDebugDraw* idraw, + int mindepth, + int maxdepth) { -drawTree(idraw,psb->m_ndbvt.m_root,0,btVector3(1,0,1),btVector3(1,1,1),mindepth,maxdepth); + drawTree(idraw,psb->m_ndbvt.m_root,0,btVector3(1,0,1),btVector3(1,1,1),mindepth,maxdepth); } // void btSoftBodyHelpers::DrawFaceTree( btSoftBody* psb, - btIDebugDraw* idraw, - int mindepth, - int maxdepth) + btIDebugDraw* idraw, + int mindepth, + int maxdepth) { -drawTree(idraw,psb->m_fdbvt.m_root,0,btVector3(0,1,0),btVector3(1,0,0),mindepth,maxdepth); + drawTree(idraw,psb->m_fdbvt.m_root,0,btVector3(0,1,0),btVector3(1,0,0),mindepth,maxdepth); } // void btSoftBodyHelpers::DrawClusterTree( btSoftBody* psb, - btIDebugDraw* idraw, - int mindepth, - int maxdepth) + btIDebugDraw* idraw, + int mindepth, + int maxdepth) { -drawTree(idraw,psb->m_cdbvt.m_root,0,btVector3(0,1,1),btVector3(1,0,0),mindepth,maxdepth); + drawTree(idraw,psb->m_cdbvt.m_root,0,btVector3(0,1,1),btVector3(1,0,0),mindepth,maxdepth); } // void btSoftBodyHelpers::DrawFrame( btSoftBody* psb, - btIDebugDraw* idraw) + btIDebugDraw* idraw) { if(psb->m_pose.m_bframe) { @@ -445,9 +445,9 @@ void btSoftBodyHelpers::DrawFrame( btSoftBody* psb, // btSoftBody* btSoftBodyHelpers::CreateRope( btSoftBodyWorldInfo& worldInfo, const btVector3& from, - const btVector3& to, - int res, - int fixeds) + const btVector3& to, + int res, + int fixeds) { /* Create nodes */ const int r=res+2; @@ -477,13 +477,13 @@ btSoftBody* btSoftBodyHelpers::CreateRope( btSoftBodyWorldInfo& worldInfo, cons // btSoftBody* btSoftBodyHelpers::CreatePatch(btSoftBodyWorldInfo& worldInfo,const btVector3& corner00, - const btVector3& corner10, - const btVector3& corner01, - const btVector3& corner11, - int resx, - int resy, - int fixeds, - bool gendiags) + const btVector3& corner10, + const btVector3& corner01, + const btVector3& corner11, + int resx, + int resy, + int fixeds, + bool gendiags) { #define IDX(_x_,_y_) ((_y_)*rx+(_x_)) /* Create nodes */ @@ -552,10 +552,216 @@ btSoftBody* btSoftBodyHelpers::CreatePatch(btSoftBodyWorldInfo& worldInfo,const return(psb); } +// +btSoftBody* btSoftBodyHelpers::CreatePatchUV(btSoftBodyWorldInfo& worldInfo, + const btVector3& corner00, + const btVector3& corner10, + const btVector3& corner01, + const btVector3& corner11, + int resx, + int resy, + int fixeds, + bool gendiags, + float* tex_coords) +{ + + /* + * + * corners: + * + * [0][0] corner00 ------- corner01 [resx][0] + * | | + * | | + * [0][resy] corner10 -------- corner11 [resx][resy] + * + * + * + * + * + * + * "fixedgs" map: + * + * corner00 --> +1 + * corner01 --> +2 + * corner10 --> +4 + * corner11 --> +8 + * upper middle --> +16 + * left middle --> +32 + * right middle --> +64 + * lower middle --> +128 + * center --> +256 + * + * + * tex_coords size (resx-1)*(resy-1)*12 + * + * + * + * SINGLE QUAD INTERNALS + * + * 1) btSoftBody's nodes and links, + * diagonal link is optional ("gendiags") + * + * + * node00 ------ node01 + * | . + * | . + * | . + * | . + * | . + * node10 node11 + * + * + * + * 2) Faces: + * two triangles, + * UV Coordinates (hier example for single quad) + * + * (0,1) (0,1) (1,1) + * 1 |\ 3 \-----| 2 + * | \ \ | + * | \ \ | + * | \ \ | + * | \ \ | + * 2 |-----\ 3 \| 1 + * (0,0) (1,0) (1,0) + * + * + * + * + * + * + */ + +#define IDX(_x_,_y_) ((_y_)*rx+(_x_)) + /* Create nodes */ + if((resx<2)||(resy<2)) return(0); + const int rx=resx; + const int ry=resy; + const int tot=rx*ry; + btVector3* x=new btVector3[tot]; + btScalar* m=new btScalar[tot]; + + int iy; + + for(iy=0;iysetMass(IDX(0,0),0); + if(fixeds&2) psb->setMass(IDX(rx-1,0),0); + if(fixeds&4) psb->setMass(IDX(0,ry-1),0); + if(fixeds&8) psb->setMass(IDX(rx-1,ry-1),0); + if(fixeds&16) psb->setMass(IDX((rx-1)/2,0),0); + if(fixeds&32) psb->setMass(IDX(0,(ry-1)/2),0); + if(fixeds&64) psb->setMass(IDX(rx-1,(ry-1)/2),0); + if(fixeds&128) psb->setMass(IDX((rx-1)/2,ry-1),0); + if(fixeds&256) psb->setMass(IDX((rx-1)/2,(ry-1)/2),0); + delete[] x; + delete[] m; + + + int z = 0; + /* Create links and faces */ + for(iy=0;iyappendLink(node00,node01); + if(mdy) psb->appendLink(node00,node10); + if(mdx&&mdy) + { + psb->appendFace(node00,node10,node11); + if (tex_coords) { + tex_coords[z+0]=CalculateUV(resx,resy,ix,iy,0); + tex_coords[z+1]=CalculateUV(resx,resy,ix,iy,1); + tex_coords[z+2]=CalculateUV(resx,resy,ix,iy,0); + tex_coords[z+3]=CalculateUV(resx,resy,ix,iy,2); + tex_coords[z+4]=CalculateUV(resx,resy,ix,iy,3); + tex_coords[z+5]=CalculateUV(resx,resy,ix,iy,2); + } + psb->appendFace(node11,node01,node00); + if (tex_coords) { + tex_coords[z+6 ]=CalculateUV(resx,resy,ix,iy,3); + tex_coords[z+7 ]=CalculateUV(resx,resy,ix,iy,2); + tex_coords[z+8 ]=CalculateUV(resx,resy,ix,iy,3); + tex_coords[z+9 ]=CalculateUV(resx,resy,ix,iy,1); + tex_coords[z+10]=CalculateUV(resx,resy,ix,iy,0); + tex_coords[z+11]=CalculateUV(resx,resy,ix,iy,1); + } + if (gendiags) psb->appendLink(node00,node11); + z += 12; + } + } + } + /* Finished */ +#undef IDX + return(psb); +} + +float btSoftBodyHelpers::CalculateUV(int resx,int resy,int ix,int iy,int id) +{ + + /* + * + * + * node00 --- node01 + * | | + * node10 --- node11 + * + * + * ID map: + * + * node00 s --> 0 + * node00 t --> 1 + * + * node01 s --> 3 + * node01 t --> 1 + * + * node10 s --> 0 + * node10 t --> 2 + * + * node11 s --> 3 + * node11 t --> 2 + * + * + */ + + float tc=0.0f; + if (id == 0) { + tc = (1.0f/((resx-1))*ix); + } + else if (id==1) { + tc = (1.0f/((resy-1))*(resy-1-iy)); + } + else if (id==2) { + tc = (1.0f/((resy-1))*(resy-1-iy-1)); + } + else if (id==3) { + tc = (1.0f/((resx-1))*(ix+1)); + } + return tc; +} // btSoftBody* btSoftBodyHelpers::CreateEllipsoid(btSoftBodyWorldInfo& worldInfo,const btVector3& center, - const btVector3& radius, - int res) + const btVector3& radius, + int res) { struct Hammersley { @@ -586,8 +792,8 @@ btSoftBody* btSoftBodyHelpers::CreateEllipsoid(btSoftBodyWorldInfo& worldInfo,c // btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo& worldInfo,const btScalar* vertices, - const int* triangles, - int ntriangles) + const int* triangles, + int ntriangles) { int maxidx=0; int i,j,ni; @@ -615,7 +821,7 @@ btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo& worldInfo if(!chks[IDX(idx[j],idx[k])]) { chks[IDX(idx[j],idx[k])]=true; - chks[IDX(idx[k],idx[k])]=true; + chks[IDX(idx[k],idx[j])]=true; psb->appendLink(idx[j],idx[k]); } } @@ -628,7 +834,7 @@ btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo& worldInfo // btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldInfo, const btVector3* vertices, - int nvertices) + int nvertices) { HullDesc hdsc(QF_TRIANGLES,nvertices,vertices); HullResult hres; diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h index e9c6cb20657..0e3b50397ee 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h @@ -39,69 +39,81 @@ struct fDrawFlags { enum _ { Joints = 0x1000, /* presets */ Std = Links+Faces+Tetras+Anchors+Notes+Joints, - StdTetra = Std-Faces+Tetras, + StdTetra = Std-Faces+Tetras };}; struct btSoftBodyHelpers { /* Draw body */ static void Draw( btSoftBody* psb, - btIDebugDraw* idraw, - int drawflags=fDrawFlags::Std); + btIDebugDraw* idraw, + int drawflags=fDrawFlags::Std); /* Draw body infos */ static void DrawInfos( btSoftBody* psb, - btIDebugDraw* idraw, - bool masses, - bool areas, - bool stress); + btIDebugDraw* idraw, + bool masses, + bool areas, + bool stress); /* Draw node tree */ static void DrawNodeTree( btSoftBody* psb, - btIDebugDraw* idraw, - int mindepth=0, - int maxdepth=-1); + btIDebugDraw* idraw, + int mindepth=0, + int maxdepth=-1); /* Draw face tree */ static void DrawFaceTree( btSoftBody* psb, - btIDebugDraw* idraw, - int mindepth=0, - int maxdepth=-1); + btIDebugDraw* idraw, + int mindepth=0, + int maxdepth=-1); /* Draw cluster tree */ static void DrawClusterTree(btSoftBody* psb, - btIDebugDraw* idraw, - int mindepth=0, - int maxdepth=-1); + btIDebugDraw* idraw, + int mindepth=0, + int maxdepth=-1); /* Draw rigid frame */ static void DrawFrame( btSoftBody* psb, - btIDebugDraw* idraw); + btIDebugDraw* idraw); /* Create a rope */ static btSoftBody* CreateRope( btSoftBodyWorldInfo& worldInfo, - const btVector3& from, - const btVector3& to, - int res, - int fixeds); + const btVector3& from, + const btVector3& to, + int res, + int fixeds); /* Create a patch */ static btSoftBody* CreatePatch(btSoftBodyWorldInfo& worldInfo, - const btVector3& corner00, - const btVector3& corner10, - const btVector3& corner01, - const btVector3& corner11, - int resx, - int resy, - int fixeds, - bool gendiags); + const btVector3& corner00, + const btVector3& corner10, + const btVector3& corner01, + const btVector3& corner11, + int resx, + int resy, + int fixeds, + bool gendiags); + /* Create a patch with UV Texture Coordinates */ + static btSoftBody* CreatePatchUV(btSoftBodyWorldInfo& worldInfo, + const btVector3& corner00, + const btVector3& corner10, + const btVector3& corner01, + const btVector3& corner11, + int resx, + int resy, + int fixeds, + bool gendiags, + float* tex_coords=0); + static float CalculateUV(int resx,int resy,int ix,int iy,int id); /* Create an ellipsoid */ static btSoftBody* CreateEllipsoid(btSoftBodyWorldInfo& worldInfo, - const btVector3& center, - const btVector3& radius, - int res); + const btVector3& center, + const btVector3& radius, + int res); /* Create from trimesh */ static btSoftBody* CreateFromTriMesh( btSoftBodyWorldInfo& worldInfo, - const btScalar* vertices, - const int* triangles, - int ntriangles); + const btScalar* vertices, + const int* triangles, + int ntriangles); /* Create from convex-hull */ static btSoftBody* CreateFromConvexHull( btSoftBodyWorldInfo& worldInfo, - const btVector3* vertices, - int nvertices); + const btVector3* vertices, + int nvertices); }; #endif //SOFT_BODY_HELPERS_H diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h b/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h index 8fcf633fecc..5f0f7d54318 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h @@ -31,14 +31,14 @@ subject to the following restrictions: template struct btSymMatrix { - btSymMatrix() : dim(0) {} - btSymMatrix(int n,const T& init=T()) { resize(n,init); } -void resize(int n,const T& init=T()) { dim=n;store.resize((n*(n+1))/2,init); } -int index(int c,int r) const { if(c>r) btSwap(c,r);btAssert(r store; -int dim; + btSymMatrix() : dim(0) {} + btSymMatrix(int n,const T& init=T()) { resize(n,init); } + void resize(int n,const T& init=T()) { dim=n;store.resize((n*(n+1))/2,init); } + int index(int c,int r) const { if(c>r) btSwap(c,r);btAssert(r store; + int dim; }; // @@ -48,10 +48,11 @@ class btSoftBodyCollisionShape : public btConcaveShape { public: btSoftBody* m_body; - + btSoftBodyCollisionShape(btSoftBody* backptr) { - m_body=backptr; + m_shapeType = SOFTBODY_SHAPE_PROXYTYPE; + m_body=backptr; } virtual ~btSoftBodyCollisionShape() @@ -68,37 +69,34 @@ public: ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t. virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const { - /* t should be identity, but better be safe than...fast? */ - const btVector3 mins=m_body->m_bounds[0]; - const btVector3 maxs=m_body->m_bounds[1]; - const btVector3 crns[]={t*btVector3(mins.x(),mins.y(),mins.z()), - t*btVector3(maxs.x(),mins.y(),mins.z()), - t*btVector3(maxs.x(),maxs.y(),mins.z()), - t*btVector3(mins.x(),maxs.y(),mins.z()), - t*btVector3(mins.x(),mins.y(),maxs.z()), - t*btVector3(maxs.x(),mins.y(),maxs.z()), - t*btVector3(maxs.x(),maxs.y(),maxs.z()), - t*btVector3(mins.x(),maxs.y(),maxs.z())}; - aabbMin=aabbMax=crns[0]; - for(int i=1;i<8;++i) + /* t should be identity, but better be safe than...fast? */ + const btVector3 mins=m_body->m_bounds[0]; + const btVector3 maxs=m_body->m_bounds[1]; + const btVector3 crns[]={t*btVector3(mins.x(),mins.y(),mins.z()), + t*btVector3(maxs.x(),mins.y(),mins.z()), + t*btVector3(maxs.x(),maxs.y(),mins.z()), + t*btVector3(mins.x(),maxs.y(),mins.z()), + t*btVector3(mins.x(),mins.y(),maxs.z()), + t*btVector3(maxs.x(),mins.y(),maxs.z()), + t*btVector3(maxs.x(),maxs.y(),maxs.z()), + t*btVector3(mins.x(),maxs.y(),maxs.z())}; + aabbMin=aabbMax=crns[0]; + for(int i=1;i<8;++i) { - aabbMin.setMin(crns[i]); - aabbMax.setMax(crns[i]); + aabbMin.setMin(crns[i]); + aabbMax.setMax(crns[i]); } } - virtual int getShapeType() const - { - return SOFTBODY_SHAPE_PROXYTYPE; - } + virtual void setLocalScaling(const btVector3& /*scaling*/) { ///na } virtual const btVector3& getLocalScaling() const { - static const btVector3 dummy(1,1,1); - return dummy; + static const btVector3 dummy(1,1,1); + return dummy; } virtual void calculateLocalInertia(btScalar /*mass*/,btVector3& /*inertia*/) const { @@ -121,24 +119,24 @@ public: const btSoftBody::Cluster* m_cluster; btSoftClusterCollisionShape (const btSoftBody::Cluster* cluster) : m_cluster(cluster) { setMargin(0); } - - + + virtual btVector3 localGetSupportingVertex(const btVector3& vec) const - { + { btSoftBody::Node* const * n=&m_cluster->m_nodes[0]; btScalar d=dot(vec,n[0]->m_x); int j=0; for(int i=1,ni=m_cluster->m_nodes.size();im_x); if(k>d) { d=k;j=i; } - } + } return(n[j]->m_x); - } + } virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const - { + { return(localGetSupportingVertex(vec)); - } + } //notice that the vectors should be unit length virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const {} @@ -151,7 +149,7 @@ public: {} virtual int getShapeType() const { return SOFTBODY_SHAPE_PROXYTYPE; } - + //debugging virtual const char* getName()const {return "SOFTCLUSTER";} @@ -173,8 +171,8 @@ public: template static inline void ZeroInitialize(T& value) { -static const T zerodummy; -value=zerodummy; + static const T zerodummy; + value=zerodummy; } // template @@ -194,23 +192,23 @@ static inline T InvLerp(const T& a,const T& b,btScalar t) { return((b+a*t-b*t)/(a*b)); } // static inline btMatrix3x3 Lerp( const btMatrix3x3& a, - const btMatrix3x3& b, - btScalar t) + const btMatrix3x3& b, + btScalar t) { -btMatrix3x3 r; -r[0]=Lerp(a[0],b[0],t); -r[1]=Lerp(a[1],b[1],t); -r[2]=Lerp(a[2],b[2],t); -return(r); + btMatrix3x3 r; + r[0]=Lerp(a[0],b[0],t); + r[1]=Lerp(a[1],b[1],t); + r[2]=Lerp(a[2],b[2],t); + return(r); } // static inline btVector3 Clamp(const btVector3& v,btScalar maxlength) { -const btScalar sql=v.length2(); -if(sql>(maxlength*maxlength)) - return((v*maxlength)/btSqrt(sql)); + const btScalar sql=v.length2(); + if(sql>(maxlength*maxlength)) + return((v*maxlength)/btSqrt(sql)); else - return(v); + return(v); } // template @@ -235,8 +233,8 @@ static inline bool SameSign(const T& x,const T& y) // static inline btScalar ClusterMetric(const btVector3& x,const btVector3& y) { -const btVector3 d=x-y; -return(btFabs(d[0])+btFabs(d[1])+btFabs(d[2])); + const btVector3 d=x-y; + return(btFabs(d[0])+btFabs(d[1])+btFabs(d[2])); } // static inline btMatrix3x3 ScaleAlongAxis(const btVector3& a,btScalar s) @@ -273,7 +271,7 @@ static inline btMatrix3x3 Diagonal(btScalar x) } // static inline btMatrix3x3 Add(const btMatrix3x3& a, - const btMatrix3x3& b) + const btMatrix3x3& b) { btMatrix3x3 r; for(int i=0;i<3;++i) r[i]=a[i]+b[i]; @@ -281,7 +279,7 @@ static inline btMatrix3x3 Add(const btMatrix3x3& a, } // static inline btMatrix3x3 Sub(const btMatrix3x3& a, - const btMatrix3x3& b) + const btMatrix3x3& b) { btMatrix3x3 r; for(int i=0;i<3;++i) r[i]=a[i]-b[i]; @@ -289,7 +287,7 @@ static inline btMatrix3x3 Sub(const btMatrix3x3& a, } // static inline btMatrix3x3 Mul(const btMatrix3x3& a, - btScalar b) + btScalar b) { btMatrix3x3 r; for(int i=0;i<3;++i) r[i]=a[i]*b; @@ -298,9 +296,9 @@ static inline btMatrix3x3 Mul(const btMatrix3x3& a, // static inline void Orthogonalize(btMatrix3x3& m) { -m[2]=cross(m[0],m[1]).normalized(); -m[1]=cross(m[2],m[0]).normalized(); -m[0]=cross(m[1],m[2]).normalized(); + m[2]=cross(m[0],m[1]).normalized(); + m[1]=cross(m[2],m[0]).normalized(); + m[0]=cross(m[1],m[2]).normalized(); } // static inline btMatrix3x3 MassMatrix(btScalar im,const btMatrix3x3& iwi,const btVector3& r) @@ -311,90 +309,90 @@ static inline btMatrix3x3 MassMatrix(btScalar im,const btMatrix3x3& iwi,const bt // static inline btMatrix3x3 ImpulseMatrix( btScalar dt, - btScalar ima, - btScalar imb, - const btMatrix3x3& iwi, - const btVector3& r) + btScalar ima, + btScalar imb, + const btMatrix3x3& iwi, + const btVector3& r) { return(Diagonal(1/dt)*Add(Diagonal(ima),MassMatrix(imb,iwi,r)).inverse()); } // static inline btMatrix3x3 ImpulseMatrix( btScalar ima,const btMatrix3x3& iia,const btVector3& ra, - btScalar imb,const btMatrix3x3& iib,const btVector3& rb) + btScalar imb,const btMatrix3x3& iib,const btVector3& rb) { -return(Add(MassMatrix(ima,iia,ra),MassMatrix(imb,iib,rb)).inverse()); + return(Add(MassMatrix(ima,iia,ra),MassMatrix(imb,iib,rb)).inverse()); } // static inline btMatrix3x3 AngularImpulseMatrix( const btMatrix3x3& iia, - const btMatrix3x3& iib) + const btMatrix3x3& iib) { -return(Add(iia,iib).inverse()); + return(Add(iia,iib).inverse()); } // static inline btVector3 ProjectOnAxis( const btVector3& v, - const btVector3& a) + const btVector3& a) { return(a*dot(v,a)); } // static inline btVector3 ProjectOnPlane( const btVector3& v, - const btVector3& a) + const btVector3& a) { return(v-ProjectOnAxis(v,a)); } // static inline void ProjectOrigin( const btVector3& a, - const btVector3& b, - btVector3& prj, - btScalar& sqd) + const btVector3& b, + btVector3& prj, + btScalar& sqd) { -const btVector3 d=b-a; -const btScalar m2=d.length2(); -if(m2>SIMD_EPSILON) + const btVector3 d=b-a; + const btScalar m2=d.length2(); + if(m2>SIMD_EPSILON) { - const btScalar t=Clamp(-dot(a,d)/m2,0,1); - const btVector3 p=a+d*t; - const btScalar l2=p.length2(); - if(l2(-dot(a,d)/m2,0,1); + const btVector3 p=a+d*t; + const btScalar l2=p.length2(); + if(l2SIMD_EPSILON) + const btVector3& q=cross(b-a,c-a); + const btScalar m2=q.length2(); + if(m2>SIMD_EPSILON) { - const btVector3 n=q/btSqrt(m2); - const btScalar k=dot(a,n); - const btScalar k2=k*k; - if(k20)&& - (dot(cross(b-p,c-p),q)>0)&& - (dot(cross(c-p,a-p),q)>0)) + const btVector3 p=n*k; + if( (dot(cross(a-p,b-p),q)>0)&& + (dot(cross(b-p,c-p),q)>0)&& + (dot(cross(c-p,a-p),q)>0)) { - prj=p; - sqd=k2; + prj=p; + sqd=k2; } else { - ProjectOrigin(a,b,prj,sqd); - ProjectOrigin(b,c,prj,sqd); - ProjectOrigin(c,a,prj,sqd); + ProjectOrigin(a,b,prj,sqd); + ProjectOrigin(b,c,prj,sqd); + ProjectOrigin(c,a,prj,sqd); } } } @@ -403,53 +401,53 @@ if(m2>SIMD_EPSILON) // template static inline T BaryEval( const T& a, - const T& b, - const T& c, - const btVector3& coord) + const T& b, + const T& c, + const btVector3& coord) { return(a*coord.x()+b*coord.y()+c*coord.z()); } // static inline btVector3 BaryCoord( const btVector3& a, - const btVector3& b, - const btVector3& c, - const btVector3& p) + const btVector3& b, + const btVector3& c, + const btVector3& p) { -const btScalar w[]={ cross(a-p,b-p).length(), - cross(b-p,c-p).length(), - cross(c-p,a-p).length()}; -const btScalar isum=1/(w[0]+w[1]+w[2]); -return(btVector3(w[1]*isum,w[2]*isum,w[0]*isum)); + const btScalar w[]={ cross(a-p,b-p).length(), + cross(b-p,c-p).length(), + cross(c-p,a-p).length()}; + const btScalar isum=1/(w[0]+w[1]+w[2]); + return(btVector3(w[1]*isum,w[2]*isum,w[0]*isum)); } // static btScalar ImplicitSolve( btSoftBody::ImplicitFn* fn, - const btVector3& a, - const btVector3& b, - const btScalar accuracy, - const int maxiterations=256) + const btVector3& a, + const btVector3& b, + const btScalar accuracy, + const int maxiterations=256) { -btScalar span[2]={0,1}; -btScalar values[2]={fn->Eval(a),fn->Eval(b)}; -if(values[0]>values[1]) + btScalar span[2]={0,1}; + btScalar values[2]={fn->Eval(a),fn->Eval(b)}; + if(values[0]>values[1]) { - btSwap(span[0],span[1]); - btSwap(values[0],values[1]); + btSwap(span[0],span[1]); + btSwap(values[0],values[1]); } -if(values[0]>-accuracy) return(-1); -if(values[1]<+accuracy) return(-1); -for(int i=0;i-accuracy) return(-1); + if(values[1]<+accuracy) return(-1); + for(int i=0;iEval(Lerp(a,b,t)); - if((t<=0)||(t>=1)) break; - if(btFabs(v)Eval(Lerp(a,b,t)); + if((t<=0)||(t>=1)) break; + if(btFabs(v)m_x, - &f.m_n[1]->m_x, - &f.m_n[2]->m_x}; -btDbvtVolume vol=btDbvtVolume::FromPoints(pts,3); -vol.Expand(btVector3(margin,margin,margin)); -return(vol); + const btVector3* pts[]={ &f.m_n[0]->m_x, + &f.m_n[1]->m_x, + &f.m_n[2]->m_x}; + btDbvtVolume vol=btDbvtVolume::FromPoints(pts,3); + vol.Expand(btVector3(margin,margin,margin)); + return(vol); } // static inline btVector3 CenterOf( const btSoftBody::Face& f) { -return((f.m_n[0]->m_x+f.m_n[1]->m_x+f.m_n[2]->m_x)/3); + return((f.m_n[0]->m_x+f.m_n[1]->m_x+f.m_n[2]->m_x)/3); } // static inline btScalar AreaOf( const btVector3& x0, - const btVector3& x1, - const btVector3& x2) + const btVector3& x1, + const btVector3& x2) { const btVector3 a=x1-x0; const btVector3 b=x2-x0; @@ -494,9 +492,9 @@ static inline btScalar AreaOf( const btVector3& x0, // static inline btScalar VolumeOf( const btVector3& x0, - const btVector3& x1, - const btVector3& x2, - const btVector3& x3) + const btVector3& x1, + const btVector3& x2, + const btVector3& x3) { const btVector3 a=x1-x0; const btVector3 b=x2-x0; @@ -506,8 +504,8 @@ static inline btScalar VolumeOf( const btVector3& x0, // static void EvaluateMedium( const btSoftBodyWorldInfo* wfi, - const btVector3& x, - btSoftBody::sMedium& medium) + const btVector3& x, + btSoftBody::sMedium& medium) { medium.m_velocity = btVector3(0,0,0); medium.m_pressure = 0; @@ -525,8 +523,8 @@ static void EvaluateMedium( const btSoftBodyWorldInfo* wfi, // static inline void ApplyClampedForce( btSoftBody::Node& n, - const btVector3& f, - btScalar dt) + const btVector3& f, + btScalar dt) { const btScalar dtim=dt*n.m_im; if((f*dtim).length2()>n.m_v.length2()) @@ -541,13 +539,13 @@ static inline void ApplyClampedForce( btSoftBody::Node& n, // static inline int MatchEdge( const btSoftBody::Node* a, - const btSoftBody::Node* b, - const btSoftBody::Node* ma, - const btSoftBody::Node* mb) + const btSoftBody::Node* b, + const btSoftBody::Node* ma, + const btSoftBody::Node* mb) { -if((a==ma)&&(b==mb)) return(0); -if((a==mb)&&(b==ma)) return(1); -return(-1); + if((a==ma)&&(b==mb)) return(0); + if((a==mb)&&(b==ma)) return(1); + return(-1); } // @@ -557,56 +555,56 @@ return(-1); // struct btEigen { -static int system(btMatrix3x3& a,btMatrix3x3* vectors,btVector3* values=0) + static int system(btMatrix3x3& a,btMatrix3x3* vectors,btVector3* values=0) { - static const int maxiterations=16; - static const btScalar accuracy=(btScalar)0.0001; - btMatrix3x3& v=*vectors; - int iterations=0; - vectors->setIdentity(); - do { - int p=0,q=1; - if(btFabs(a[p][q])accuracy) + static const int maxiterations=16; + static const btScalar accuracy=(btScalar)0.0001; + btMatrix3x3& v=*vectors; + int iterations=0; + vectors->setIdentity(); + do { + int p=0,q=1; + if(btFabs(a[p][q])accuracy) { - const btScalar w=(a[q][q]-a[p][p])/(2*a[p][q]); - const btScalar z=btFabs(w); - const btScalar t=w/(z*(btSqrt(1+w*w)+z)); - if(t==t)/* [WARNING] let hope that one does not get thrown aways by some compilers... */ + const btScalar w=(a[q][q]-a[p][p])/(2*a[p][q]); + const btScalar z=btFabs(w); + const btScalar t=w/(z*(btSqrt(1+w*w)+z)); + if(t==t)/* [WARNING] let hope that one does not get thrown aways by some compilers... */ { - const btScalar c=1/btSqrt(t*t+1); - const btScalar s=c*t; - mulPQ(a,c,s,p,q); - mulTPQ(a,c,s,p,q); - mulPQ(v,c,s,p,q); + const btScalar c=1/btSqrt(t*t+1); + const btScalar s=c*t; + mulPQ(a,c,s,p,q); + mulTPQ(a,c,s,p,q); + mulPQ(v,c,s,p,q); } else break; } else break; } while((++iterations)data; - btSoftClusterCollisionShape cshape(cluster); - const btConvexShape* rshape=(const btConvexShape*)prb->getCollisionShape(); - btGjkEpaSolver2::sResults res; - if(btGjkEpaSolver2::SignedDistance( &cshape,btTransform::getIdentity(), - rshape,prb->getInterpolationWorldTransform(), - btVector3(1,0,0),res)) + btSoftBody::Cluster* cluster=(btSoftBody::Cluster*)leaf->data; + btSoftClusterCollisionShape cshape(cluster); + const btConvexShape* rshape=(const btConvexShape*)m_colObj->getCollisionShape(); + btGjkEpaSolver2::sResults res; + if(btGjkEpaSolver2::SignedDistance( &cshape,btTransform::getIdentity(), + rshape,m_colObj->getInterpolationWorldTransform(), + btVector3(1,0,0),res)) { - btSoftBody::CJoint joint; - if(SolveContact(res,cluster,prb,joint)) + btSoftBody::CJoint joint; + if(SolveContact(res,cluster,m_colObj,joint))//prb,joint)) { - btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint(); - *pj=joint;psb->m_joints.push_back(pj); - if(prb->isStaticOrKinematicObject()) + btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint(); + *pj=joint;psb->m_joints.push_back(pj); + if(m_colObj->isStaticOrKinematicObject()) { - pj->m_erp *= psb->m_cfg.kSKHR_CL; - pj->m_split *= psb->m_cfg.kSK_SPLT_CL; + pj->m_erp *= psb->m_cfg.kSKHR_CL; + pj->m_split *= psb->m_cfg.kSK_SPLT_CL; } else { - pj->m_erp *= psb->m_cfg.kSRHR_CL; - pj->m_split *= psb->m_cfg.kSR_SPLT_CL; + pj->m_erp *= psb->m_cfg.kSRHR_CL; + pj->m_split *= psb->m_cfg.kSR_SPLT_CL; } } } } - void Process(btSoftBody* ps,btRigidBody* pr) + void Process(btSoftBody* ps,btCollisionObject* colOb) { - psb = ps; - prb = pr; - idt = ps->m_sst.isdt; - margin = ps->getCollisionShape()->getMargin()+ - pr->getCollisionShape()->getMargin(); - friction = btMin(psb->m_cfg.kDF,prb->getFriction()); - btVector3 mins; - btVector3 maxs; - - ATTRIBUTE_ALIGNED16(btDbvtVolume) volume; - pr->getCollisionShape()->getAabb(pr->getInterpolationWorldTransform(),mins,maxs); - volume=btDbvtVolume::FromMM(mins,maxs); - volume.Expand(btVector3(1,1,1)*margin); - btDbvt::collideTV(ps->m_cdbvt.m_root,volume,*this); + psb = ps; + m_colObj = colOb; + idt = ps->m_sst.isdt; + margin = m_colObj->getCollisionShape()->getMargin(); + ///Bullet rigid body uses multiply instead of minimum to determine combined friction. Some customization would be useful. + friction = btMin(psb->m_cfg.kDF,m_colObj->getFriction()); + btVector3 mins; + btVector3 maxs; + + ATTRIBUTE_ALIGNED16(btDbvtVolume) volume; + colOb->getCollisionShape()->getAabb(colOb->getInterpolationWorldTransform(),mins,maxs); + volume=btDbvtVolume::FromMM(mins,maxs); + volume.Expand(btVector3(1,1,1)*margin); + ps->m_cdbvt.collideTV(ps->m_cdbvt.m_root,volume,*this); } }; // @@ -762,36 +761,53 @@ struct btSoftColliders // struct CollideCL_SS : ClusterBase { - btSoftBody* bodies[2]; - void Process(const btDbvtNode* la,const btDbvtNode* lb) + btSoftBody* bodies[2]; + void Process(const btDbvtNode* la,const btDbvtNode* lb) { - btSoftBody::Cluster* cla=(btSoftBody::Cluster*)la->data; - btSoftBody::Cluster* clb=(btSoftBody::Cluster*)lb->data; - btSoftClusterCollisionShape csa(cla); - btSoftClusterCollisionShape csb(clb); - btGjkEpaSolver2::sResults res; - if(btGjkEpaSolver2::SignedDistance( &csa,btTransform::getIdentity(), - &csb,btTransform::getIdentity(), - cla->m_com-clb->m_com,res)) + btSoftBody::Cluster* cla=(btSoftBody::Cluster*)la->data; + btSoftBody::Cluster* clb=(btSoftBody::Cluster*)lb->data; + + + bool connected=false; + if ((bodies[0]==bodies[1])&&(bodies[0]->m_clusterConnectivity.size())) { - btSoftBody::CJoint joint; - if(SolveContact(res,cla,clb,joint)) + connected = bodies[0]->m_clusterConnectivity[cla->m_clusterIndex+bodies[0]->m_clusters.size()*clb->m_clusterIndex]; + } + + if (!connected) + { + btSoftClusterCollisionShape csa(cla); + btSoftClusterCollisionShape csb(clb); + btGjkEpaSolver2::sResults res; + if(btGjkEpaSolver2::SignedDistance( &csa,btTransform::getIdentity(), + &csb,btTransform::getIdentity(), + cla->m_com-clb->m_com,res)) { - btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint(); - *pj=joint;bodies[0]->m_joints.push_back(pj); - pj->m_erp *= btMax(bodies[0]->m_cfg.kSSHR_CL,bodies[1]->m_cfg.kSSHR_CL); - pj->m_split *= (bodies[0]->m_cfg.kSS_SPLT_CL+bodies[1]->m_cfg.kSS_SPLT_CL)/2; + btSoftBody::CJoint joint; + if(SolveContact(res,cla,clb,joint)) + { + btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint(); + *pj=joint;bodies[0]->m_joints.push_back(pj); + pj->m_erp *= btMax(bodies[0]->m_cfg.kSSHR_CL,bodies[1]->m_cfg.kSSHR_CL); + pj->m_split *= (bodies[0]->m_cfg.kSS_SPLT_CL+bodies[1]->m_cfg.kSS_SPLT_CL)/2; + } } + } else + { + static int count=0; + count++; + //printf("count=%d\n",count); + } } - void Process(btSoftBody* psa,btSoftBody* psb) + void Process(btSoftBody* psa,btSoftBody* psb) { - idt = psa->m_sst.isdt; - margin = (psa->getCollisionShape()->getMargin()+psb->getCollisionShape()->getMargin())/2; - friction = btMin(psa->m_cfg.kDF,psb->m_cfg.kDF); - bodies[0] = psa; - bodies[1] = psb; - btDbvt::collideTT(psa->m_cdbvt.m_root,psb->m_cdbvt.m_root,*this); + idt = psa->m_sst.isdt; + margin = (psa->getCollisionShape()->getMargin()+psb->getCollisionShape()->getMargin())/2; + friction = btMin(psa->m_cfg.kDF,psb->m_cfg.kDF); + bodies[0] = psa; + bodies[1] = psb; + psa->m_cdbvt.collideTT(psa->m_cdbvt.m_root,psb->m_cdbvt.m_root,*this); } }; // @@ -799,96 +815,99 @@ struct btSoftColliders // struct CollideSDF_RS : btDbvt::ICollide { - void Process(const btDbvtNode* leaf) + void Process(const btDbvtNode* leaf) { - btSoftBody::Node* node=(btSoftBody::Node*)leaf->data; - DoNode(*node); + btSoftBody::Node* node=(btSoftBody::Node*)leaf->data; + DoNode(*node); } - void DoNode(btSoftBody::Node& n) const + void DoNode(btSoftBody::Node& n) const { - const btScalar m=n.m_im>0?dynmargin:stamargin; - btSoftBody::RContact c; - if( (!n.m_battach)&& - psb->checkContact(prb,n.m_x,m,c.m_cti)) + const btScalar m=n.m_im>0?dynmargin:stamargin; + btSoftBody::RContact c; + if( (!n.m_battach)&& + psb->checkContact(m_colObj1,n.m_x,m,c.m_cti)) { - const btScalar ima=n.m_im; - const btScalar imb=prb->getInvMass(); - const btScalar ms=ima+imb; - if(ms>0) + const btScalar ima=n.m_im; + const btScalar imb= m_rigidBody? m_rigidBody->getInvMass() : 0.f; + const btScalar ms=ima+imb; + if(ms>0) { - const btTransform& wtr=prb->getInterpolationWorldTransform(); - const btMatrix3x3& iwi=prb->getInvInertiaTensorWorld(); - const btVector3 ra=n.m_x-wtr.getOrigin(); - const btVector3 va=prb->getVelocityInLocalPoint(ra)*psb->m_sst.sdt; - const btVector3 vb=n.m_x-n.m_q; - const btVector3 vr=vb-va; - const btScalar dn=dot(vr,c.m_cti.m_normal); - const btVector3 fv=vr-c.m_cti.m_normal*dn; - const btScalar fc=psb->m_cfg.kDF*prb->getFriction(); - c.m_node = &n; - c.m_c0 = ImpulseMatrix(psb->m_sst.sdt,ima,imb,iwi,ra); - c.m_c1 = ra; - c.m_c2 = ima*psb->m_sst.sdt; - c.m_c3 = fv.length2()<(btFabs(dn)*fc)?0:1-fc; - c.m_c4 = prb->isStaticOrKinematicObject()?psb->m_cfg.kKHR:psb->m_cfg.kCHR; - psb->m_rcontacts.push_back(c); - prb->activate(); + const btTransform& wtr=m_rigidBody?m_rigidBody->getInterpolationWorldTransform() : m_colObj1->getWorldTransform(); + static const btMatrix3x3 iwiStatic(0,0,0,0,0,0,0,0,0); + const btMatrix3x3& iwi=m_rigidBody?m_rigidBody->getInvInertiaTensorWorld() : iwiStatic; + const btVector3 ra=n.m_x-wtr.getOrigin(); + const btVector3 va=m_rigidBody ? m_rigidBody->getVelocityInLocalPoint(ra)*psb->m_sst.sdt : btVector3(0,0,0); + const btVector3 vb=n.m_x-n.m_q; + const btVector3 vr=vb-va; + const btScalar dn=dot(vr,c.m_cti.m_normal); + const btVector3 fv=vr-c.m_cti.m_normal*dn; + const btScalar fc=psb->m_cfg.kDF*m_colObj1->getFriction(); + c.m_node = &n; + c.m_c0 = ImpulseMatrix(psb->m_sst.sdt,ima,imb,iwi,ra); + c.m_c1 = ra; + c.m_c2 = ima*psb->m_sst.sdt; + c.m_c3 = fv.length2()<(btFabs(dn)*fc)?0:1-fc; + c.m_c4 = m_colObj1->isStaticOrKinematicObject()?psb->m_cfg.kKHR:psb->m_cfg.kCHR; + psb->m_rcontacts.push_back(c); + if (m_rigidBody) + m_rigidBody->activate(); } } } - btSoftBody* psb; - btRigidBody* prb; - btScalar dynmargin; - btScalar stamargin; + btSoftBody* psb; + btCollisionObject* m_colObj1; + btRigidBody* m_rigidBody; + btScalar dynmargin; + btScalar stamargin; }; // // CollideVF_SS // struct CollideVF_SS : btDbvt::ICollide { - void Process(const btDbvtNode* lnode, - const btDbvtNode* lface) + void Process(const btDbvtNode* lnode, + const btDbvtNode* lface) { - btSoftBody::Node* node=(btSoftBody::Node*)lnode->data; - btSoftBody::Face* face=(btSoftBody::Face*)lface->data; - btVector3 o=node->m_x; - btVector3 p; - btScalar d=SIMD_INFINITY; - ProjectOrigin( face->m_n[0]->m_x-o, - face->m_n[1]->m_x-o, - face->m_n[2]->m_x-o, - p,d); - const btScalar m=mrg+(o-node->m_q).length()*2; - if(d<(m*m)) + btSoftBody::Node* node=(btSoftBody::Node*)lnode->data; + btSoftBody::Face* face=(btSoftBody::Face*)lface->data; + btVector3 o=node->m_x; + btVector3 p; + btScalar d=SIMD_INFINITY; + ProjectOrigin( face->m_n[0]->m_x-o, + face->m_n[1]->m_x-o, + face->m_n[2]->m_x-o, + p,d); + const btScalar m=mrg+(o-node->m_q).length()*2; + if(d<(m*m)) { - const btSoftBody::Node* n[]={face->m_n[0],face->m_n[1],face->m_n[2]}; - const btVector3 w=BaryCoord(n[0]->m_x,n[1]->m_x,n[2]->m_x,p+o); - const btScalar ma=node->m_im; - btScalar mb=BaryEval(n[0]->m_im,n[1]->m_im,n[2]->m_im,w); - if( (n[0]->m_im<=0)|| - (n[1]->m_im<=0)|| - (n[2]->m_im<=0)) + const btSoftBody::Node* n[]={face->m_n[0],face->m_n[1],face->m_n[2]}; + const btVector3 w=BaryCoord(n[0]->m_x,n[1]->m_x,n[2]->m_x,p+o); + const btScalar ma=node->m_im; + btScalar mb=BaryEval(n[0]->m_im,n[1]->m_im,n[2]->m_im,w); + if( (n[0]->m_im<=0)|| + (n[1]->m_im<=0)|| + (n[2]->m_im<=0)) { - mb=0; + mb=0; } - const btScalar ms=ma+mb; - if(ms>0) + const btScalar ms=ma+mb; + if(ms>0) { - btSoftBody::SContact c; - c.m_normal = p/-btSqrt(d); - c.m_margin = m; - c.m_node = node; - c.m_face = face; - c.m_weights = w; - c.m_friction = btMax(psb[0]->m_cfg.kDF,psb[1]->m_cfg.kDF); - c.m_cfm[0] = ma/ms*psb[0]->m_cfg.kSHR; - c.m_cfm[1] = mb/ms*psb[1]->m_cfg.kSHR; - psb[0]->m_scontacts.push_back(c); + btSoftBody::SContact c; + c.m_normal = p/-btSqrt(d); + c.m_margin = m; + c.m_node = node; + c.m_face = face; + c.m_weights = w; + c.m_friction = btMax(psb[0]->m_cfg.kDF,psb[1]->m_cfg.kDF); + c.m_cfm[0] = ma/ms*psb[0]->m_cfg.kSHR; + c.m_cfm[1] = mb/ms*psb[1]->m_cfg.kSHR; + psb[0]->m_scontacts.push_back(c); } } } - btSoftBody* psb[2]; - btScalar mrg; + btSoftBody* psb[2]; + btScalar mrg; }; }; diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp index 53ac2782583..f5a67f6d895 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp @@ -29,10 +29,10 @@ btSoftBodyRigidBodyCollisionConfiguration::btSoftBodyRigidBodyCollisionConfigura mem = btAlignedAlloc(sizeof(btSoftSoftCollisionAlgorithm::CreateFunc),16); m_softSoftCreateFunc = new(mem) btSoftSoftCollisionAlgorithm::CreateFunc; - + mem = btAlignedAlloc(sizeof(btSoftRigidCollisionAlgorithm::CreateFunc),16); m_softRigidConvexCreateFunc = new(mem) btSoftRigidCollisionAlgorithm::CreateFunc; - + mem = btAlignedAlloc(sizeof(btSoftRigidCollisionAlgorithm::CreateFunc),16); m_swappedSoftRigidConvexCreateFunc = new(mem) btSoftRigidCollisionAlgorithm::CreateFunc; m_swappedSoftRigidConvexCreateFunc->m_swapped=true; @@ -40,26 +40,27 @@ btSoftBodyRigidBodyCollisionConfiguration::btSoftBodyRigidBodyCollisionConfigura #ifdef ENABLE_SOFTBODY_CONCAVE_COLLISIONS mem = btAlignedAlloc(sizeof(btSoftBodyConcaveCollisionAlgorithm::CreateFunc),16); m_softRigidConcaveCreateFunc = new(mem) btSoftBodyConcaveCollisionAlgorithm::CreateFunc; - + mem = btAlignedAlloc(sizeof(btSoftBodyConcaveCollisionAlgorithm::CreateFunc),16); m_swappedSoftRigidConcaveCreateFunc = new(mem) btSoftBodyConcaveCollisionAlgorithm::SwappedCreateFunc; m_swappedSoftRigidConcaveCreateFunc->m_swapped=true; #endif //replace pool by a new one, with potential larger size - + if (m_ownsCollisionAlgorithmPool && m_collisionAlgorithmPool) { int curElemSize = m_collisionAlgorithmPool->getElementSize(); ///calculate maximum element size, big enough to fit any collision algorithm in the memory pool - - + + int maxSize0 = sizeof(btSoftSoftCollisionAlgorithm); int maxSize1 = sizeof(btSoftRigidCollisionAlgorithm); int maxSize2 = sizeof(btSoftBodyConcaveCollisionAlgorithm); int collisionAlgorithmMaxElementSize = btMax(maxSize0,maxSize1); collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize2); + if (collisionAlgorithmMaxElementSize > curElemSize) { m_collisionAlgorithmPool->~btPoolAllocator(); @@ -69,9 +70,6 @@ btSoftBodyRigidBodyCollisionConfiguration::btSoftBodyRigidBodyCollisionConfigura } } - - - } btSoftBodyRigidBodyCollisionConfiguration::~btSoftBodyRigidBodyCollisionConfiguration() @@ -93,7 +91,7 @@ btSoftBodyRigidBodyCollisionConfiguration::~btSoftBodyRigidBodyCollisionConfigur btAlignedFree( m_swappedSoftRigidConcaveCreateFunc); #endif } - + ///creation of soft-soft and soft-rigid, and otherwise fallback to base class implementation btCollisionAlgorithmCreateFunc* btSoftBodyRigidBodyCollisionConfiguration::getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) { diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h b/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h index 41c3af96939..21addcfe2e1 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h @@ -32,7 +32,7 @@ class btSoftBodyRigidBodyCollisionConfiguration : public btDefaultCollisionConfi btCollisionAlgorithmCreateFunc* m_swappedSoftRigidConvexCreateFunc; btCollisionAlgorithmCreateFunc* m_softRigidConcaveCreateFunc; btCollisionAlgorithmCreateFunc* m_swappedSoftRigidConcaveCreateFunc; - + public: btSoftBodyRigidBodyCollisionConfiguration(const btDefaultCollisionConstructionInfo& constructionInfo = btDefaultCollisionConstructionInfo()); diff --git a/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp b/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp index e5feb5ef749..11ad9e7daba 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp @@ -35,13 +35,13 @@ m_isSwapped(isSwapped) btSoftRigidCollisionAlgorithm::~btSoftRigidCollisionAlgorithm() { - + //m_softBody->m_overlappingRigidBodies.remove(m_rigidCollisionObject); /*if (m_ownManifold) { - if (m_manifoldPtr) - m_dispatcher->releaseManifold(m_manifoldPtr); + if (m_manifoldPtr) + m_dispatcher->releaseManifold(m_manifoldPtr); } */ diff --git a/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h b/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h index 74327e6c635..adc3844e363 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h @@ -28,15 +28,15 @@ class btSoftBody; /// btSoftRigidCollisionAlgorithm provides collision detection between btSoftBody and btRigidBody class btSoftRigidCollisionAlgorithm : public btCollisionAlgorithm { -// bool m_ownManifold; -// btPersistentManifold* m_manifoldPtr; + // bool m_ownManifold; + // btPersistentManifold* m_manifoldPtr; btSoftBody* m_softBody; btCollisionObject* m_rigidCollisionObject; ///for rigid versus soft (instead of soft versus rigid), we use this swapped boolean bool m_isSwapped; - + public: btSoftRigidCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped); @@ -52,7 +52,7 @@ public: //we don't add any manifolds } - + struct CreateFunc :public btCollisionAlgorithmCreateFunc { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) diff --git a/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp b/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp index b363a2efbc1..a0069b95145 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp @@ -28,17 +28,17 @@ subject to the following restrictions: btSoftRigidDynamicsWorld::btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration) :btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration) { -m_drawFlags = fDrawFlags::Std; -m_drawNodeTree = true; -m_drawFaceTree = false; -m_drawClusterTree = false; -m_sbi.m_broadphase = pairCache; -m_sbi.m_dispatcher = dispatcher; -m_sbi.m_sparsesdf.Initialize(); -m_sbi.m_sparsesdf.Reset(); + m_drawFlags = fDrawFlags::Std; + m_drawNodeTree = true; + m_drawFaceTree = false; + m_drawClusterTree = false; + m_sbi.m_broadphase = pairCache; + m_sbi.m_dispatcher = dispatcher; + m_sbi.m_sparsesdf.Initialize(); + m_sbi.m_sparsesdf.Reset(); } - + btSoftRigidDynamicsWorld::~btSoftRigidDynamicsWorld() { @@ -55,7 +55,7 @@ void btSoftRigidDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) psb->predictMotion(timeStep); } } - + void btSoftRigidDynamicsWorld::internalSingleStepSimulation( btScalar timeStep) { btDiscreteDynamicsWorld::internalSingleStepSimulation( timeStep ); @@ -63,6 +63,13 @@ void btSoftRigidDynamicsWorld::internalSingleStepSimulation( btScalar timeStep) ///solve soft bodies constraints solveSoftBodiesConstraints(); + //self collisions + for ( int i=0;idefaultCollisionHandler(psb); + } + ///update soft bodies updateSoftBodies(); @@ -71,7 +78,7 @@ void btSoftRigidDynamicsWorld::internalSingleStepSimulation( btScalar timeStep) void btSoftRigidDynamicsWorld::updateSoftBodies() { BT_PROFILE("updateSoftBodies"); - + for ( int i=0;i btSoftBodyArray; class btSoftRigidDynamicsWorld : public btDiscreteDynamicsWorld { - + btSoftBodyArray m_softBodies; int m_drawFlags; bool m_drawNodeTree; @@ -32,9 +32,9 @@ class btSoftRigidDynamicsWorld : public btDiscreteDynamicsWorld btSoftBodyWorldInfo m_sbi; protected: - + virtual void predictUnconstraintMotion(btScalar timeStep); - + virtual void internalSingleStepSimulation( btScalar timeStep); void updateSoftBodies(); @@ -43,17 +43,17 @@ protected: public: - + btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); virtual ~btSoftRigidDynamicsWorld(); - + virtual void debugDrawWorld(); - + void addSoftBody(btSoftBody* body); void removeSoftBody(btSoftBody* body); - + int getDrawFlags() const { return(m_drawFlags); } void setDrawFlags(int f) { m_drawFlags=f; } @@ -66,7 +66,7 @@ public: return m_sbi; } - + btSoftBodyArray& getSoftBodyArray() { return m_softBodies; @@ -76,7 +76,7 @@ public: { return m_softBodies; } - + }; #endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h b/extern/bullet2/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h index 7ca9c3415c9..1b34e0af60f 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h @@ -33,7 +33,7 @@ class btSoftSoftCollisionAlgorithm : public btCollisionAlgorithm btSoftBody* m_softBody0; btSoftBody* m_softBody1; - + public: btSoftSoftCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) : btCollisionAlgorithm(ci) {} diff --git a/extern/bullet2/src/BulletSoftBody/btSparseSDF.h b/extern/bullet2/src/BulletSoftBody/btSparseSDF.h index eafe74be1ae..cc4266732ae 100644 --- a/extern/bullet2/src/BulletSoftBody/btSparseSDF.h +++ b/extern/bullet2/src/BulletSoftBody/btSparseSDF.h @@ -23,139 +23,139 @@ subject to the following restrictions: // Modified Paul Hsieh hash template unsigned int HsiehHash(const void* pdata) - { +{ const unsigned short* data=(const unsigned short*)pdata; unsigned hash=DWORDLEN<<2,tmp; for(int i=0;i>11; - } + } hash^=hash<<3;hash+=hash>>5; hash^=hash<<4;hash+=hash>>17; hash^=hash<<25;hash+=hash>>6; return(hash); - } +} template struct btSparseSdf - { +{ // // Inner types // struct IntFrac - { + { int b; int i; btScalar f; - }; + }; struct Cell - { + { btScalar d[CELLSIZE+1][CELLSIZE+1][CELLSIZE+1]; int c[3]; int puid; unsigned hash; btCollisionShape* pclient; Cell* next; - }; + }; // // Fields // - + btAlignedObjectArray cells; btScalar voxelsz; int puid; int ncells; int nprobes; int nqueries; - + // // Methods // - + // void Initialize(int hashsize=2383) - { + { cells.resize(hashsize,0); Reset(); - } + } // void Reset() - { + { for(int i=0,ni=cells.size();inext; delete pc; pc=pn; - } } + } voxelsz =0.25; puid =0; ncells =0; nprobes =1; nqueries =1; - } + } // void GarbageCollect(int lifetime=256) - { + { const int life=puid-lifetime; for(int i=0;inext; if(pc->puidnext=pn; else root=pn; delete pc;pc=pp;--ncells; - } - pp=pc;pc=pn; } + pp=pc;pc=pn; } + } //printf("GC[%d]: %d cells, PpQ: %f\r\n",puid,ncells,nprobes/(btScalar)nqueries); nqueries=1; nprobes=1; - ++puid; /* TODO: Reset puid's when int range limit is reached */ - /* else setup a priority list... */ - } + ++puid; ///@todo: Reset puid's when int range limit is reached */ + /* else setup a priority list... */ + } // int RemoveReferences(btCollisionShape* pcs) - { + { int refcount=0; for(int i=0;inext; if(pc->pclient==pcs) - { + { if(pp) pp->next=pn; else root=pn; delete pc;pc=pp;++refcount; - } - pp=pc;pc=pn; } + pp=pc;pc=pn; } - return(refcount); } + return(refcount); + } // btScalar Evaluate( const btVector3& x, - btCollisionShape* shape, - btVector3& normal, - btScalar margin) - { + btCollisionShape* shape, + btVector3& normal, + btScalar margin) + { /* Lookup cell */ const btVector3 scx=x/voxelsz; const IntFrac ix=Decompose(scx.x()); @@ -166,19 +166,19 @@ struct btSparseSdf Cell* c=root; ++nqueries; while(c) - { + { ++nprobes; if( (c->hash==h) && (c->c[0]==ix.b) && (c->c[1]==iy.b) && (c->c[2]==iz.b) && (c->pclient==shape)) - { break; } - else - { c=c->next; } - } + { break; } + else + { c=c->next; } + } if(!c) - { + { ++nprobes; ++ncells; c=new Cell(); @@ -187,82 +187,82 @@ struct btSparseSdf c->hash=h; c->c[0]=ix.b;c->c[1]=iy.b;c->c[2]=iz.b; BuildCell(*c); - } + } c->puid=puid; /* Extract infos */ const int o[]={ ix.i,iy.i,iz.i}; const btScalar d[]={ c->d[o[0]+0][o[1]+0][o[2]+0], - c->d[o[0]+1][o[1]+0][o[2]+0], - c->d[o[0]+1][o[1]+1][o[2]+0], - c->d[o[0]+0][o[1]+1][o[2]+0], - c->d[o[0]+0][o[1]+0][o[2]+1], - c->d[o[0]+1][o[1]+0][o[2]+1], - c->d[o[0]+1][o[1]+1][o[2]+1], - c->d[o[0]+0][o[1]+1][o[2]+1]}; + c->d[o[0]+1][o[1]+0][o[2]+0], + c->d[o[0]+1][o[1]+1][o[2]+0], + c->d[o[0]+0][o[1]+1][o[2]+0], + c->d[o[0]+0][o[1]+0][o[2]+1], + c->d[o[0]+1][o[1]+0][o[2]+1], + c->d[o[0]+1][o[1]+1][o[2]+1], + c->d[o[0]+0][o[1]+1][o[2]+1]}; /* Normal */ - #if 1 +#if 1 const btScalar gx[]={ d[1]-d[0],d[2]-d[3], - d[5]-d[4],d[6]-d[7]}; + d[5]-d[4],d[6]-d[7]}; const btScalar gy[]={ d[3]-d[0],d[2]-d[1], - d[7]-d[4],d[6]-d[5]}; + d[7]-d[4],d[6]-d[5]}; const btScalar gz[]={ d[4]-d[0],d[5]-d[1], - d[7]-d[3],d[6]-d[2]}; + d[7]-d[3],d[6]-d[2]}; normal.setX(Lerp( Lerp(gx[0],gx[1],iy.f), - Lerp(gx[2],gx[3],iy.f),iz.f)); + Lerp(gx[2],gx[3],iy.f),iz.f)); normal.setY(Lerp( Lerp(gy[0],gy[1],ix.f), - Lerp(gy[2],gy[3],ix.f),iz.f)); + Lerp(gy[2],gy[3],ix.f),iz.f)); normal.setZ(Lerp( Lerp(gz[0],gz[1],ix.f), - Lerp(gz[2],gz[3],ix.f),iy.f)); + Lerp(gz[2],gz[3],ix.f),iy.f)); normal = normal.normalized(); - #else +#else normal = btVector3(d[1]-d[0],d[3]-d[0],d[4]-d[0]).normalized(); - #endif +#endif /* Distance */ const btScalar d0=Lerp(Lerp(d[0],d[1],ix.f), - Lerp(d[3],d[2],ix.f),iy.f); + Lerp(d[3],d[2],ix.f),iy.f); const btScalar d1=Lerp(Lerp(d[4],d[5],ix.f), - Lerp(d[7],d[6],ix.f),iy.f); + Lerp(d[7],d[6],ix.f),iy.f); return(Lerp(d0,d1,iz.f)-margin); - } + } // void BuildCell(Cell& c) - { + { const btVector3 org=btVector3( (btScalar)c.c[0], - (btScalar)c.c[1], - (btScalar)c.c[2]) * - CELLSIZE*voxelsz; + (btScalar)c.c[1], + (btScalar)c.c[2]) * + CELLSIZE*voxelsz; for(int k=0;k<=CELLSIZE;++k) - { + { const btScalar z=voxelsz*k+org.z(); for(int j=0;j<=CELLSIZE;++j) - { + { const btScalar y=voxelsz*j+org.y(); for(int i=0;i<=CELLSIZE;++i) - { + { const btScalar x=voxelsz*i+org.x(); c.d[i][j][k]=DistanceToShape( btVector3(x,y,z), - c.pclient); - } + c.pclient); } } } + } // static inline btScalar DistanceToShape(const btVector3& x, - btCollisionShape* shape) - { + btCollisionShape* shape) + { btTransform unit; unit.setIdentity(); if(shape->isConvex()) - { + { btGjkEpaSolver2::sResults res; btConvexShape* csh=static_cast(shape); return(btGjkEpaSolver2::SignedDistance(x,0,csh,unit,res)); - } - return(0); } + return(0); + } // static inline IntFrac Decompose(btScalar x) - { + { /* That one need a lot of improvements... */ /* Remove test, faster floor... */ IntFrac r; @@ -272,18 +272,18 @@ struct btSparseSdf const btScalar k=(x-r.b)*CELLSIZE; r.i=(int)k;r.f=k-r.i;r.b-=o; return(r); - } + } // static inline btScalar Lerp(btScalar a,btScalar b,btScalar t) - { + { return(a+(b-a)*t); - } + } + - // static inline unsigned int Hash(int x,int y,int z,btCollisionShape* shape) - { + { struct btS { int x,y,z; @@ -291,16 +291,16 @@ struct btSparseSdf }; btS myset; - + myset.x=x;myset.y=y;myset.z=z;myset.p=shape; const void* ptr = &myset; unsigned int result = HsiehHash (ptr); - + return result; - } + } }; - + #endif diff --git a/extern/bullet2/src/CMakeLists.txt b/extern/bullet2/src/CMakeLists.txt index 043fd3f6e7f..9b8a5a7e00e 100644 --- a/extern/bullet2/src/CMakeLists.txt +++ b/extern/bullet2/src/CMakeLists.txt @@ -1 +1,4 @@ -SUBDIRS( BulletCollision BulletDynamics LinearMath BulletSoftBody ) +ADD_SUBDIRECTORY(BulletCollision) +ADD_SUBDIRECTORY(BulletDynamics) +ADD_SUBDIRECTORY(LinearMath) +ADD_SUBDIRECTORY(BulletSoftBody ) diff --git a/extern/bullet2/src/LinearMath/CMakeLists.txt b/extern/bullet2/src/LinearMath/CMakeLists.txt index 02ffaad7228..99d5a6a2fef 100644 --- a/extern/bullet2/src/LinearMath/CMakeLists.txt +++ b/extern/bullet2/src/LinearMath/CMakeLists.txt @@ -3,7 +3,14 @@ INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) -ADD_LIBRARY(LibLinearMath +SET(LinearMath_SRCS + btConvexHull.cpp + btQuickprof.cpp + btGeometryUtil.cpp + btAlignedAllocator.cpp +) + +SET(LinearMath_HDRS btAlignedObjectArray.h btList.h btPoolAllocator.h @@ -16,7 +23,6 @@ ADD_LIBRARY(LibLinearMath btScalar.h btAabbUtil2.h btConvexHull.h - btConvexHull.cpp btMinMax.h btQuaternion.h btStackAlloc.h @@ -25,11 +31,21 @@ ADD_LIBRARY(LibLinearMath btTransform.h btAlignedAllocator.h btIDebugDraw.h - btPoint3.h btQuickprof.h btTransformUtil.h - btQuickprof.cpp - btGeometryUtil.cpp - btAlignedAllocator.cpp ) +ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS}) +SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION}) +SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION}) + +#FILES_MATCHING requires CMake 2.6 +IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + INSTALL(TARGETS LinearMath DESTINATION lib) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + +IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}") +ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) diff --git a/extern/bullet2/src/LinearMath/btAabbUtil2.h b/extern/bullet2/src/LinearMath/btAabbUtil2.h index 275c4914628..532ce1bf633 100644 --- a/extern/bullet2/src/LinearMath/btAabbUtil2.h +++ b/extern/bullet2/src/LinearMath/btAabbUtil2.h @@ -21,6 +21,8 @@ subject to the following restrictions: #include "btVector3.h" #include "btMinMax.h" + + SIMD_FORCE_INLINE void AabbExpand (btVector3& aabbMin, btVector3& aabbMax, const btVector3& expansionMin, @@ -30,15 +32,26 @@ SIMD_FORCE_INLINE void AabbExpand (btVector3& aabbMin, aabbMax = aabbMax + expansionMax; } +/// conservative test for overlap between two aabbs +SIMD_FORCE_INLINE bool TestPointAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, + const btVector3 &point) +{ + bool overlap = true; + overlap = (aabbMin1.getX() > point.getX() || aabbMax1.getX() < point.getX()) ? false : overlap; + overlap = (aabbMin1.getZ() > point.getZ() || aabbMax1.getZ() < point.getZ()) ? false : overlap; + overlap = (aabbMin1.getY() > point.getY() || aabbMax1.getY() < point.getY()) ? false : overlap; + return overlap; +} + /// conservative test for overlap between two aabbs SIMD_FORCE_INLINE bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, const btVector3 &aabbMin2, const btVector3 &aabbMax2) { bool overlap = true; - overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; - overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; - overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; + overlap = (aabbMin1.getX() > aabbMax2.getX() || aabbMax1.getX() < aabbMin2.getX()) ? false : overlap; + overlap = (aabbMin1.getZ() > aabbMax2.getZ() || aabbMax1.getZ() < aabbMin2.getZ()) ? false : overlap; + overlap = (aabbMin1.getY() > aabbMax2.getY() || aabbMax1.getY() < aabbMin2.getY()) ? false : overlap; return overlap; } @@ -73,6 +86,7 @@ SIMD_FORCE_INLINE int btOutcode(const btVector3& p,const btVector3& halfExtent) } + SIMD_FORCE_INLINE bool btRayAabb2(const btVector3& rayFrom, const btVector3& rayInvDirection, const unsigned int raySign[3], @@ -82,10 +96,10 @@ SIMD_FORCE_INLINE bool btRayAabb2(const btVector3& rayFrom, btScalar lambda_max) { btScalar tmax, tymin, tymax, tzmin, tzmax; - tmin = (bounds[raySign[0]][0] - rayFrom[0]) * rayInvDirection[0]; - tmax = (bounds[1-raySign[0]][0] - rayFrom[0]) * rayInvDirection[0]; - tymin = (bounds[raySign[1]][1] - rayFrom[1]) * rayInvDirection[1]; - tymax = (bounds[1-raySign[1]][1] - rayFrom[1]) * rayInvDirection[1]; + tmin = (bounds[raySign[0]].getX() - rayFrom.getX()) * rayInvDirection.getX(); + tmax = (bounds[1-raySign[0]].getX() - rayFrom.getX()) * rayInvDirection.getX(); + tymin = (bounds[raySign[1]].getY() - rayFrom.getY()) * rayInvDirection.getY(); + tymax = (bounds[1-raySign[1]].getY() - rayFrom.getY()) * rayInvDirection.getY(); if ( (tmin > tymax) || (tymin > tmax) ) return false; @@ -96,8 +110,8 @@ SIMD_FORCE_INLINE bool btRayAabb2(const btVector3& rayFrom, if (tymax < tmax) tmax = tymax; - tzmin = (bounds[raySign[2]][2] - rayFrom[2]) * rayInvDirection[2]; - tzmax = (bounds[1-raySign[2]][2] - rayFrom[2]) * rayInvDirection[2]; + tzmin = (bounds[raySign[2]].getZ() - rayFrom.getZ()) * rayInvDirection.getZ(); + tzmax = (bounds[1-raySign[2]].getZ() - rayFrom.getZ()) * rayInvDirection.getZ(); if ( (tmin > tzmax) || (tzmin > tmax) ) return false; @@ -196,6 +210,26 @@ SIMD_FORCE_INLINE void btTransformAabb(const btVector3& localAabbMin,const btVec aabbMaxOut = center+extent; } +#define USE_BANCHLESS 1 +#ifdef USE_BANCHLESS + //This block replaces the block below and uses no branches, and replaces the 8 bit return with a 32 bit return for improved performance (~3x on XBox 360) + SIMD_FORCE_INLINE unsigned testQuantizedAabbAgainstQuantizedAabb(const unsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) + { + return static_cast(btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0]) + & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2]) + & (aabbMin1[1] <= aabbMax2[1]) & (aabbMax1[1] >= aabbMin2[1])), + 1, 0)); + } +#else + SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(const unsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) + { + bool overlap = true; + overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; + overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; + overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; + return overlap; + } +#endif //USE_BANCHLESS #endif diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp index e120289e061..a3d790f8abc 100644 --- a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp +++ b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp @@ -19,6 +19,21 @@ int gNumAlignedAllocs = 0; int gNumAlignedFree = 0; int gTotalBytesAlignedAllocs = 0;//detect memory leaks +static void *btAllocDefault(size_t size) +{ + return malloc(size); +} + +static void btFreeDefault(void *ptr) +{ + free(ptr); +} + +static btAllocFunc *sAllocFunc = btAllocDefault; +static btFreeFunc *sFreeFunc = btFreeDefault; + + + #if defined (BT_HAS_ALIGNED_ALLOCATOR) #include static void *btAlignedAllocDefault(size_t size, int alignment) @@ -49,7 +64,7 @@ static inline void *btAlignedAllocDefault(size_t size, int alignment) char *real; unsigned long offset; - real = (char *)malloc(size + sizeof(void *) + (alignment-1)); + real = (char *)sAllocFunc(size + sizeof(void *) + (alignment-1)); if (real) { offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1); ret = (void *)((real + sizeof(void *)) + offset); @@ -66,25 +81,14 @@ static inline void btAlignedFreeDefault(void *ptr) if (ptr) { real = *((void **)(ptr)-1); - free(real); + sFreeFunc(real); } } #endif -static void *btAllocDefault(size_t size) -{ - return malloc(size); -} - -static void btFreeDefault(void *ptr) -{ - free(ptr); -} static btAlignedAllocFunc *sAlignedAllocFunc = btAlignedAllocDefault; static btAlignedFreeFunc *sAlignedFreeFunc = btAlignedFreeDefault; -static btAllocFunc *sAllocFunc = btAllocDefault; -static btFreeFunc *sFreeFunc = btFreeDefault; void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc) { diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.h b/extern/bullet2/src/LinearMath/btAlignedAllocator.h index a252f324d77..f168f3c66c7 100644 --- a/extern/bullet2/src/LinearMath/btAlignedAllocator.h +++ b/extern/bullet2/src/LinearMath/btAlignedAllocator.h @@ -38,7 +38,7 @@ void btAlignedFreeInternal (void* ptr,int line,char* filename); void* btAlignedAllocInternal (size_t size, int alignment); void btAlignedFreeInternal (void* ptr); - #define btAlignedAlloc(a,b) btAlignedAllocInternal(a,b) + #define btAlignedAlloc(size,alignment) btAlignedAllocInternal(size,alignment) #define btAlignedFree(ptr) btAlignedFreeInternal(ptr) #endif @@ -49,8 +49,11 @@ typedef void (btAlignedFreeFunc)(void *memblock); typedef void *(btAllocFunc)(size_t size); typedef void (btFreeFunc)(void *memblock); -void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc); +///The developer can let all Bullet memory allocations go through a custom memory allocator, using btAlignedAllocSetCustom void btAlignedAllocSetCustom(btAllocFunc *allocFunc, btFreeFunc *freeFunc); +///If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be used. The default aligned allocator pre-allocates extra memory using the non-aligned allocator, and instruments it. +void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc); + ///The btAlignedAllocator is a portable class for aligned memory allocations. ///Default implementations for unaligned and aligned allocations can be overridden by a custom allocator using btAlignedAllocSetCustom and btAlignedAllocSetCustomAligned. diff --git a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h index 5598f0d7236..bad1eee1f63 100644 --- a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h +++ b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h @@ -58,7 +58,7 @@ class btAlignedObjectArray { return (size ? size*2 : 1); } - SIMD_FORCE_INLINE void copy(int start,int end, T* dest) + SIMD_FORCE_INLINE void copy(int start,int end, T* dest) const { int i; for (i=start;i &al int ma=-1; for(btScalar x = btScalar(0.0) ; x<= btScalar(360.0) ; x+= btScalar(45.0)) { - btScalar s = sinf(SIMD_RADS_PER_DEG*(x)); - btScalar c = cosf(SIMD_RADS_PER_DEG*(x)); + btScalar s = btSin(SIMD_RADS_PER_DEG*(x)); + btScalar c = btCos(SIMD_RADS_PER_DEG*(x)); int mb = maxdirfiltered(p,count,dir+(u*s+v*c)*btScalar(0.025),allow); if(ma==m && mb==m) { @@ -275,8 +275,8 @@ int maxdirsterid(const T *p,int count,const T &dir,btAlignedObjectArray &al int mc = ma; for(btScalar xx = x-btScalar(40.0) ; xx <= x ; xx+= btScalar(5.0)) { - btScalar s = sinf(SIMD_RADS_PER_DEG*(xx)); - btScalar c = cosf(SIMD_RADS_PER_DEG*(xx)); + btScalar s = btSin(SIMD_RADS_PER_DEG*(xx)); + btScalar c = btCos(SIMD_RADS_PER_DEG*(xx)); int md = maxdirfiltered(p,count,dir+(u*s+v*c)*btScalar(0.025),allow); if(mc==m && md==m) { @@ -342,30 +342,30 @@ int shareedge(const int3 &a,const int3 &b) return 0; } -class Tri; +class btHullTriangle; -class Tri : public int3 +class btHullTriangle : public int3 { public: int3 n; int id; int vmax; btScalar rise; - Tri(int a,int b,int c):int3(a,b,c),n(-1,-1,-1) + btHullTriangle(int a,int b,int c):int3(a,b,c),n(-1,-1,-1) { vmax=-1; rise = btScalar(0.0); } - ~Tri() + ~btHullTriangle() { } int &neib(int a,int b); }; -int &Tri::neib(int a,int b) +int &btHullTriangle::neib(int a,int b) { static int er=-1; int i; @@ -379,7 +379,7 @@ int &Tri::neib(int a,int b) btAssert(0); return er; } -void HullLibrary::b2bfix(Tri* s,Tri*t) +void HullLibrary::b2bfix(btHullTriangle* s,btHullTriangle*t) { int i; for(i=0;i<3;i++) @@ -395,7 +395,7 @@ void HullLibrary::b2bfix(Tri* s,Tri*t) } } -void HullLibrary::removeb2b(Tri* s,Tri*t) +void HullLibrary::removeb2b(btHullTriangle* s,btHullTriangle*t) { b2bfix(s,t); deAllocateTriangle(s); @@ -403,7 +403,7 @@ void HullLibrary::removeb2b(Tri* s,Tri*t) deAllocateTriangle(t); } -void HullLibrary::checkit(Tri *t) +void HullLibrary::checkit(btHullTriangle *t) { (void)t; @@ -427,36 +427,36 @@ void HullLibrary::checkit(Tri *t) } } -Tri* HullLibrary::allocateTriangle(int a,int b,int c) +btHullTriangle* HullLibrary::allocateTriangle(int a,int b,int c) { - void* mem = btAlignedAlloc(sizeof(Tri),16); - Tri* tr = new (mem)Tri(a,b,c); + void* mem = btAlignedAlloc(sizeof(btHullTriangle),16); + btHullTriangle* tr = new (mem)btHullTriangle(a,b,c); tr->id = m_tris.size(); m_tris.push_back(tr); return tr; } -void HullLibrary::deAllocateTriangle(Tri* tri) +void HullLibrary::deAllocateTriangle(btHullTriangle* tri) { btAssert(m_tris[tri->id]==tri); m_tris[tri->id]=NULL; - tri->~Tri(); + tri->~btHullTriangle(); btAlignedFree(tri); } -void HullLibrary::extrude(Tri *t0,int v) +void HullLibrary::extrude(btHullTriangle *t0,int v) { int3 t= *t0; int n = m_tris.size(); - Tri* ta = allocateTriangle(v,t[1],t[2]); + btHullTriangle* ta = allocateTriangle(v,t[1],t[2]); ta->n = int3(t0->n[0],n+1,n+2); m_tris[t0->n[0]]->neib(t[1],t[2]) = n+0; - Tri* tb = allocateTriangle(v,t[2],t[0]); + btHullTriangle* tb = allocateTriangle(v,t[2],t[0]); tb->n = int3(t0->n[1],n+2,n+0); m_tris[t0->n[1]]->neib(t[2],t[0]) = n+1; - Tri* tc = allocateTriangle(v,t[0],t[1]); + btHullTriangle* tc = allocateTriangle(v,t[0],t[1]); tc->n = int3(t0->n[2],n+0,n+1); m_tris[t0->n[2]]->neib(t[0],t[1]) = n+2; checkit(ta); @@ -469,10 +469,10 @@ void HullLibrary::extrude(Tri *t0,int v) } -Tri* HullLibrary::extrudable(btScalar epsilon) +btHullTriangle* HullLibrary::extrudable(btScalar epsilon) { int i; - Tri *t=NULL; + btHullTriangle *t=NULL; for(i=0;iriserise)) @@ -550,23 +550,23 @@ int HullLibrary::calchullgen(btVector3 *verts,int verts_count, int vlimit) btVector3 center = (verts[p[0]]+verts[p[1]]+verts[p[2]]+verts[p[3]]) / btScalar(4.0); // a valid interior point - Tri *t0 = allocateTriangle(p[2],p[3],p[1]); t0->n=int3(2,3,1); - Tri *t1 = allocateTriangle(p[3],p[2],p[0]); t1->n=int3(3,2,0); - Tri *t2 = allocateTriangle(p[0],p[1],p[3]); t2->n=int3(0,1,3); - Tri *t3 = allocateTriangle(p[1],p[0],p[2]); t3->n=int3(1,0,2); + btHullTriangle *t0 = allocateTriangle(p[2],p[3],p[1]); t0->n=int3(2,3,1); + btHullTriangle *t1 = allocateTriangle(p[3],p[2],p[0]); t1->n=int3(3,2,0); + btHullTriangle *t2 = allocateTriangle(p[0],p[1],p[3]); t2->n=int3(0,1,3); + btHullTriangle *t3 = allocateTriangle(p[1],p[0],p[2]); t3->n=int3(1,0,2); isextreme[p[0]]=isextreme[p[1]]=isextreme[p[2]]=isextreme[p[3]]=1; checkit(t0);checkit(t1);checkit(t2);checkit(t3); for(j=0;jvmax<0); btVector3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]); t->vmax = maxdirsterid(verts,verts_count,n,allow); t->rise = dot(n,verts[t->vmax]-verts[(*t)[0]]); } - Tri *te; + btHullTriangle *te; vlimit-=4; while(vlimit >0 && ((te=extrudable(epsilon)) != 0)) { @@ -594,7 +594,7 @@ int HullLibrary::calchullgen(btVector3 *verts,int verts_count, int vlimit) int3 nt=*m_tris[j]; if(above(verts,nt,center,btScalar(0.01)*epsilon) || cross(verts[nt[1]]-verts[nt[0]],verts[nt[2]]-verts[nt[1]]).length()< epsilon*epsilon*btScalar(0.1) ) { - Tri *nb = m_tris[m_tris[j]->n[0]]; + btHullTriangle *nb = m_tris[m_tris[j]->n[0]]; btAssert(nb);btAssert(!hasvert(*nb,v));btAssert(nb->idvmax>=0) break; btVector3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]); diff --git a/extern/bullet2/src/LinearMath/btConvexHull.h b/extern/bullet2/src/LinearMath/btConvexHull.h index 8c36307dfd6..92560bddb9c 100644 --- a/extern/bullet2/src/LinearMath/btConvexHull.h +++ b/extern/bullet2/src/LinearMath/btConvexHull.h @@ -137,13 +137,9 @@ class ConvexH }; ConvexH() { - int i; - i=0; } ~ConvexH() { - int i; - i=0; } btAlignedObjectArray vertices; btAlignedObjectArray edges; @@ -188,7 +184,7 @@ public: class HullLibrary { - btAlignedObjectArray m_tris; + btAlignedObjectArray m_tris; public: @@ -203,15 +199,15 @@ private: bool ComputeHull(unsigned int vcount,const btVector3 *vertices,PHullResult &result,unsigned int vlimit); - class Tri* allocateTriangle(int a,int b,int c); - void deAllocateTriangle(Tri*); - void b2bfix(Tri* s,Tri*t); + class btHullTriangle* allocateTriangle(int a,int b,int c); + void deAllocateTriangle(btHullTriangle*); + void b2bfix(btHullTriangle* s,btHullTriangle*t); - void removeb2b(Tri* s,Tri*t); + void removeb2b(btHullTriangle* s,btHullTriangle*t); - void checkit(Tri *t); + void checkit(btHullTriangle *t); - Tri* extrudable(btScalar epsilon); + btHullTriangle* extrudable(btScalar epsilon); int calchull(btVector3 *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit); @@ -221,7 +217,7 @@ private: class ConvexH* ConvexHCrop(ConvexH& convex,const btPlane& slice); - void extrude(class Tri* t0,int v); + void extrude(class btHullTriangle* t0,int v); ConvexH* test_cube(); diff --git a/extern/bullet2/src/LinearMath/btIDebugDraw.h b/extern/bullet2/src/LinearMath/btIDebugDraw.h index 563615a9a32..e5a0061b779 100644 --- a/extern/bullet2/src/LinearMath/btIDebugDraw.h +++ b/extern/bullet2/src/LinearMath/btIDebugDraw.h @@ -29,6 +29,7 @@ DEALINGS IN THE SOFTWARE. #define IDEBUG_DRAW__H #include "btVector3.h" +#include "btTransform.h" ///The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations. @@ -52,11 +53,26 @@ class btIDebugDraw DBG_EnableSatComparison = 256, DBG_DisableBulletLCP = 512, DBG_EnableCCD = 1024, + DBG_DrawConstraints = (1 << 11), + DBG_DrawConstraintLimits = (1 << 12), DBG_MAX_DEBUG_DRAW_MODE }; virtual ~btIDebugDraw() {}; + virtual void drawLine(const btVector3& from,const btVector3& to, const btVector3& fromColor, const btVector3& toColor) + { + drawLine (from, to, fromColor); + } + + virtual void drawBox (const btVector3& boxMin, const btVector3& boxMax, const btVector3& color, btScalar alpha) + { + } + + virtual void drawSphere (const btVector3& p, btScalar radius, const btVector3& color) + { + } + virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color)=0; virtual void drawTriangle(const btVector3& v0,const btVector3& v1,const btVector3& v2,const btVector3& /*n0*/,const btVector3& /*n1*/,const btVector3& /*n2*/,const btVector3& color, btScalar alpha) @@ -109,6 +125,171 @@ class btIDebugDraw edgecoord[i]*=-1.f; } } + void drawTransform(const btTransform& transform, btScalar orthoLen) + { + btVector3 start = transform.getOrigin(); + drawLine(start, start+transform.getBasis() * btVector3(orthoLen, 0, 0), btVector3(0.7f,0,0)); + drawLine(start, start+transform.getBasis() * btVector3(0, orthoLen, 0), btVector3(0,0.7f,0)); + drawLine(start, start+transform.getBasis() * btVector3(0, 0, orthoLen), btVector3(0,0,0.7f)); + } + + void drawArc(const btVector3& center, const btVector3& normal, const btVector3& axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, + const btVector3& color, bool drawSect, btScalar stepDegrees = btScalar(10.f)) + { + const btVector3& vx = axis; + btVector3 vy = normal.cross(axis); + btScalar step = stepDegrees * SIMD_RADS_PER_DEG; + int nSteps = (int)((maxAngle - minAngle) / step); + if(!nSteps) nSteps = 1; + btVector3 prev = center + radiusA * vx * btCos(minAngle) + radiusB * vy * btSin(minAngle); + if(drawSect) + { + drawLine(center, prev, color); + } + for(int i = 1; i <= nSteps; i++) + { + btScalar angle = minAngle + (maxAngle - minAngle) * btScalar(i) / btScalar(nSteps); + btVector3 next = center + radiusA * vx * btCos(angle) + radiusB * vy * btSin(angle); + drawLine(prev, next, color); + prev = next; + } + if(drawSect) + { + drawLine(center, prev, color); + } + } + void drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, btScalar radius, + btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color, btScalar stepDegrees = btScalar(10.f)) + { + btVector3 vA[74]; + btVector3 vB[74]; + btVector3 *pvA = vA, *pvB = vB, *pT; + btVector3 npole = center + up * radius; + btVector3 spole = center - up * radius; + btVector3 arcStart; + btScalar step = stepDegrees * SIMD_RADS_PER_DEG; + const btVector3& kv = up; + const btVector3& iv = axis; + btVector3 jv = kv.cross(iv); + bool drawN = false; + bool drawS = false; + if(minTh <= -SIMD_HALF_PI) + { + minTh = -SIMD_HALF_PI + step; + drawN = true; + } + if(maxTh >= SIMD_HALF_PI) + { + maxTh = SIMD_HALF_PI - step; + drawS = true; + } + if(minTh > maxTh) + { + minTh = -SIMD_HALF_PI + step; + maxTh = SIMD_HALF_PI - step; + drawN = drawS = true; + } + int n_hor = (int)((maxTh - minTh) / step) + 1; + if(n_hor < 2) n_hor = 2; + btScalar step_h = (maxTh - minTh) / btScalar(n_hor - 1); + bool isClosed = false; + if(minPs > maxPs) + { + minPs = -SIMD_PI + step; + maxPs = SIMD_PI; + isClosed = true; + } + else if((maxPs - minPs) >= SIMD_PI * btScalar(2.f)) + { + isClosed = true; + } + else + { + isClosed = false; + } + int n_vert = (int)((maxPs - minPs) / step) + 1; + if(n_vert < 2) n_vert = 2; + btScalar step_v = (maxPs - minPs) / btScalar(n_vert - 1); + for(int i = 0; i < n_hor; i++) + { + btScalar th = minTh + btScalar(i) * step_h; + btScalar sth = radius * btSin(th); + btScalar cth = radius * btCos(th); + for(int j = 0; j < n_vert; j++) + { + btScalar psi = minPs + btScalar(j) * step_v; + btScalar sps = btSin(psi); + btScalar cps = btCos(psi); + pvB[j] = center + cth * cps * iv + cth * sps * jv + sth * kv; + if(i) + { + drawLine(pvA[j], pvB[j], color); + } + else if(drawS) + { + drawLine(spole, pvB[j], color); + } + if(j) + { + drawLine(pvB[j-1], pvB[j], color); + } + else + { + arcStart = pvB[j]; + } + if((i == (n_hor - 1)) && drawN) + { + drawLine(npole, pvB[j], color); + } + if(isClosed) + { + if(j == (n_vert-1)) + { + drawLine(arcStart, pvB[j], color); + } + } + else + { + if(((!i) || (i == (n_hor-1))) && ((!j) || (j == (n_vert-1)))) + { + drawLine(center, pvB[j], color); + } + } + } + pT = pvA; pvA = pvB; pvB = pT; + } + } + + void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btVector3& color) + { + drawLine(btVector3(bbMin[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMin[1], bbMin[2]), color); + drawLine(btVector3(bbMax[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMax[1], bbMin[2]), color); + drawLine(btVector3(bbMax[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMax[1], bbMin[2]), color); + drawLine(btVector3(bbMin[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMin[1], bbMin[2]), color); + drawLine(btVector3(bbMin[0], bbMin[1], bbMin[2]), btVector3(bbMin[0], bbMin[1], bbMax[2]), color); + drawLine(btVector3(bbMax[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMin[1], bbMax[2]), color); + drawLine(btVector3(bbMax[0], bbMax[1], bbMin[2]), btVector3(bbMax[0], bbMax[1], bbMax[2]), color); + drawLine(btVector3(bbMin[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMax[1], bbMax[2]), color); + drawLine(btVector3(bbMin[0], bbMin[1], bbMax[2]), btVector3(bbMax[0], bbMin[1], bbMax[2]), color); + drawLine(btVector3(bbMax[0], bbMin[1], bbMax[2]), btVector3(bbMax[0], bbMax[1], bbMax[2]), color); + drawLine(btVector3(bbMax[0], bbMax[1], bbMax[2]), btVector3(bbMin[0], bbMax[1], bbMax[2]), color); + drawLine(btVector3(bbMin[0], bbMax[1], bbMax[2]), btVector3(bbMin[0], bbMin[1], bbMax[2]), color); + } + void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btTransform& trans, const btVector3& color) + { + drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), color); + drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), color); + drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), color); + drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), color); + drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color); + drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color); + } }; diff --git a/extern/bullet2/src/LinearMath/btMatrix3x3.h b/extern/bullet2/src/LinearMath/btMatrix3x3.h index 14aa4ae2348..e45afc3c055 100644 --- a/extern/bullet2/src/LinearMath/btMatrix3x3.h +++ b/extern/bullet2/src/LinearMath/btMatrix3x3.h @@ -23,14 +23,16 @@ subject to the following restrictions: -///The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with btQuaternion, btTransform and btVector3. -///Make sure to only include a pure orthogonal matrix without scaling. +/**@brief The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with btQuaternion, btTransform and btVector3. + * Make sure to only include a pure orthogonal matrix without scaling. */ class btMatrix3x3 { public: + /** @brief No initializaion constructor */ btMatrix3x3 () {} // explicit btMatrix3x3(const btScalar *m) { setFromOpenGLSubMatrix(m); } + /**@brief Constructor from Quaternion */ explicit btMatrix3x3(const btQuaternion& q) { setRotation(q); } /* template @@ -39,6 +41,7 @@ class btMatrix3x3 { setEulerYPR(yaw, pitch, roll); } */ + /** @brief Constructor with row major formatting */ btMatrix3x3(const btScalar& xx, const btScalar& xy, const btScalar& xz, const btScalar& yx, const btScalar& yy, const btScalar& yz, const btScalar& zx, const btScalar& zy, const btScalar& zz) @@ -47,14 +50,14 @@ class btMatrix3x3 { yx, yy, yz, zx, zy, zz); } - + /** @brief Copy constructor */ SIMD_FORCE_INLINE btMatrix3x3 (const btMatrix3x3& other) { m_el[0] = other.m_el[0]; m_el[1] = other.m_el[1]; m_el[2] = other.m_el[2]; } - + /** @brief Assignment Operator */ SIMD_FORCE_INLINE btMatrix3x3& operator=(const btMatrix3x3& other) { m_el[0] = other.m_el[0]; @@ -63,34 +66,45 @@ class btMatrix3x3 { return *this; } + /** @brief Get a column of the matrix as a vector + * @param i Column number 0 indexed */ SIMD_FORCE_INLINE btVector3 getColumn(int i) const { return btVector3(m_el[0][i],m_el[1][i],m_el[2][i]); } - + /** @brief Get a row of the matrix as a vector + * @param i Row number 0 indexed */ SIMD_FORCE_INLINE const btVector3& getRow(int i) const { + btFullAssert(0 <= i && i < 3); return m_el[i]; } - + /** @brief Get a mutable reference to a row of the matrix as a vector + * @param i Row number 0 indexed */ SIMD_FORCE_INLINE btVector3& operator[](int i) { btFullAssert(0 <= i && i < 3); return m_el[i]; } + /** @brief Get a const reference to a row of the matrix as a vector + * @param i Row number 0 indexed */ SIMD_FORCE_INLINE const btVector3& operator[](int i) const { btFullAssert(0 <= i && i < 3); return m_el[i]; } + /** @brief Multiply by the target matrix on the right + * @param m Rotation matrix to be applied + * Equivilant to this = this * m */ btMatrix3x3& operator*=(const btMatrix3x3& m); - + /** @brief Set from a carray of btScalars + * @param m A pointer to the beginning of an array of 9 btScalars */ void setFromOpenGLSubMatrix(const btScalar *m) { m_el[0].setValue(m[0],m[4],m[8]); @@ -98,7 +112,16 @@ class btMatrix3x3 { m_el[2].setValue(m[2],m[6],m[10]); } - + /** @brief Set the values of the matrix explicitly (row major) + * @param xx Top left + * @param xy Top Middle + * @param xz Top Right + * @param yx Middle Left + * @param yy Middle Middle + * @param yz Middle Right + * @param zx Bottom Left + * @param zy Bottom Middle + * @param zz Bottom Right*/ void setValue(const btScalar& xx, const btScalar& xy, const btScalar& xz, const btScalar& yx, const btScalar& yy, const btScalar& yz, const btScalar& zx, const btScalar& zy, const btScalar& zz) @@ -107,7 +130,9 @@ class btMatrix3x3 { m_el[1].setValue(yx,yy,yz); m_el[2].setValue(zx,zy,zz); } - + + /** @brief Set the matrix from a quaternion + * @param q The Quaternion to match */ void setRotation(const btQuaternion& q) { btScalar d = q.length2(); @@ -123,35 +148,27 @@ class btMatrix3x3 { } - + /** @brief Set the matrix from euler angles using YPR around YXZ respectively + * @param yaw Yaw about Y axis + * @param pitch Pitch about X axis + * @param roll Roll about Z axis + */ void setEulerYPR(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) { - - btScalar cy(btCos(yaw)); - btScalar sy(btSin(yaw)); - btScalar cp(btCos(pitch)); - btScalar sp(btSin(pitch)); - btScalar cr(btCos(roll)); - btScalar sr(btSin(roll)); - btScalar cc = cy * cr; - btScalar cs = cy * sr; - btScalar sc = sy * cr; - btScalar ss = sy * sr; - setValue(cc - sp * ss, -cs - sp * sc, -sy * cp, - cp * sr, cp * cr, -sp, - sc + sp * cs, -ss + sp * cc, cy * cp); - + setEulerZYX(roll, pitch, yaw); } - /** - * setEulerZYX - * @param euler a const reference to a btVector3 of euler angles + /** @brief Set the matrix from euler angles YPR around ZYX axes + * @param eulerX Roll about X axis + * @param eulerY Pitch around Y axis + * @param eulerZ Yaw aboud Z axis + * * These angles are used to produce a rotation matrix. The euler * angles are applied in ZYX order. I.e a vector is first rotated * about X then Y and then Z **/ - - void setEulerZYX(btScalar eulerX,btScalar eulerY,btScalar eulerZ) { + void setEulerZYX(btScalar eulerX,btScalar eulerY,btScalar eulerZ) { + ///@todo proposed to reverse this since it's labeled zyx but takes arguments xyz and it will match all other parts of the code btScalar ci ( btCos(eulerX)); btScalar cj ( btCos(eulerY)); btScalar ch ( btCos(eulerZ)); @@ -168,13 +185,24 @@ class btMatrix3x3 { -sj, cj * si, cj * ci); } + /**@brief Set the matrix to the identity */ void setIdentity() { setValue(btScalar(1.0), btScalar(0.0), btScalar(0.0), btScalar(0.0), btScalar(1.0), btScalar(0.0), btScalar(0.0), btScalar(0.0), btScalar(1.0)); } - + + static const btMatrix3x3& getIdentity() + { + static const btMatrix3x3 identityMatrix(btScalar(1.0), btScalar(0.0), btScalar(0.0), + btScalar(0.0), btScalar(1.0), btScalar(0.0), + btScalar(0.0), btScalar(0.0), btScalar(1.0)); + return identityMatrix; + } + + /**@brief Fill the values of the matrix into a 9 element array + * @param m The array to be filled */ void getOpenGLSubMatrix(btScalar *m) const { m[0] = btScalar(m_el[0].x()); @@ -191,6 +219,8 @@ class btMatrix3x3 { m[11] = btScalar(0.0); } + /**@brief Get the matrix represented as a quaternion + * @param q The quaternion which will be set */ void getRotation(btQuaternion& q) const { btScalar trace = m_el[0].x() + m_el[1].y() + m_el[2].z(); @@ -224,35 +254,102 @@ class btMatrix3x3 { } q.setValue(temp[0],temp[1],temp[2],temp[3]); } - - void getEuler(btScalar& yaw, btScalar& pitch, btScalar& roll) const + + /**@brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR + * @param yaw Yaw around Y axis + * @param pitch Pitch around X axis + * @param roll around Z axis */ + void getEulerYPR(btScalar& yaw, btScalar& pitch, btScalar& roll) const { - if (btScalar(m_el[1].z()) < btScalar(1)) - { - if (btScalar(m_el[1].z()) > -btScalar(1)) - { - yaw = btScalar(btAtan2(m_el[1].x(), m_el[0].x())); - pitch = btScalar(btAsin(-m_el[1].y())); - roll = btScalar(btAtan2(m_el[2].y(), m_el[2].z())); - } - else - { - yaw = btScalar(-btAtan2(-m_el[0].y(), m_el[0].z())); - pitch = SIMD_HALF_PI; - roll = btScalar(0.0); - } - } - else - { - yaw = btScalar(btAtan2(-m_el[0].y(), m_el[0].z())); - pitch = -SIMD_HALF_PI; - roll = btScalar(0.0); - } - } - + // first use the normal calculus + yaw = btScalar(btAtan2(m_el[1].x(), m_el[0].x())); + pitch = btScalar(btAsin(-m_el[2].x())); + roll = btScalar(btAtan2(m_el[2].y(), m_el[2].z())); + // on pitch = +/-HalfPI + if (btFabs(pitch)==SIMD_HALF_PI) + { + if (yaw>0) + yaw-=SIMD_PI; + else + yaw+=SIMD_PI; + + if (roll>0) + roll-=SIMD_PI; + else + roll+=SIMD_PI; + } + }; + + + /**@brief Get the matrix represented as euler angles around ZYX + * @param yaw Yaw around X axis + * @param pitch Pitch around Y axis + * @param roll around X axis + * @param solution_number Which solution of two possible solutions ( 1 or 2) are possible values*/ + void getEulerZYX(btScalar& yaw, btScalar& pitch, btScalar& roll, unsigned int solution_number = 1) const + { + struct Euler{btScalar yaw, pitch, roll;}; + Euler euler_out; + Euler euler_out2; //second solution + //get the pointer to the raw data + + // Check that pitch is not at a singularity + if (btFabs(m_el[2].x()) >= 1) + { + euler_out.yaw = 0; + euler_out2.yaw = 0; + // From difference of angles formula + btScalar delta = btAtan2(m_el[0].x(),m_el[0].z()); + if (m_el[2].x() > 0) //gimbal locked up + { + euler_out.pitch = SIMD_PI / btScalar(2.0); + euler_out2.pitch = SIMD_PI / btScalar(2.0); + euler_out.roll = euler_out.pitch + delta; + euler_out2.roll = euler_out.pitch + delta; + } + else // gimbal locked down + { + euler_out.pitch = -SIMD_PI / btScalar(2.0); + euler_out2.pitch = -SIMD_PI / btScalar(2.0); + euler_out.roll = -euler_out.pitch + delta; + euler_out2.roll = -euler_out.pitch + delta; + } + } + else + { + euler_out.pitch = - btAsin(m_el[2].x()); + euler_out2.pitch = SIMD_PI - euler_out.pitch; + + euler_out.roll = btAtan2(m_el[2].y()/btCos(euler_out.pitch), + m_el[2].z()/btCos(euler_out.pitch)); + euler_out2.roll = btAtan2(m_el[2].y()/btCos(euler_out2.pitch), + m_el[2].z()/btCos(euler_out2.pitch)); + + euler_out.yaw = btAtan2(m_el[1].x()/btCos(euler_out.pitch), + m_el[0].x()/btCos(euler_out.pitch)); + euler_out2.yaw = btAtan2(m_el[1].x()/btCos(euler_out2.pitch), + m_el[0].x()/btCos(euler_out2.pitch)); + } + + if (solution_number == 1) + { + yaw = euler_out.yaw; + pitch = euler_out.pitch; + roll = euler_out.roll; + } + else + { + yaw = euler_out2.yaw; + pitch = euler_out2.pitch; + roll = euler_out2.roll; + } + } + + /**@brief Create a scaled copy of the matrix + * @param s Scaling vector The elements of the vector will scale each column */ btMatrix3x3 scaled(const btVector3& s) const { @@ -261,10 +358,15 @@ class btMatrix3x3 { m_el[2].x() * s.x(), m_el[2].y() * s.y(), m_el[2].z() * s.z()); } + /**@brief Return the determinant of the matrix */ btScalar determinant() const; + /**@brief Return the adjoint of the matrix */ btMatrix3x3 adjoint() const; + /**@brief Return the matrix with all values non negative */ btMatrix3x3 absolute() const; + /**@brief Return the transpose of the matrix */ btMatrix3x3 transpose() const; + /**@brief Return the inverse of the matrix */ btMatrix3x3 inverse() const; btMatrix3x3 transposeTimes(const btMatrix3x3& m) const; @@ -284,12 +386,15 @@ class btMatrix3x3 { } - ///diagonalizes this matrix by the Jacobi method. rot stores the rotation - ///from the coordinate system in which the matrix is diagonal to the original - ///coordinate system, i.e., old_this = rot * new_this * rot^T. The iteration - ///stops when all off-diagonal elements are less than the threshold multiplied - ///by the sum of the absolute values of the diagonal, or when maxSteps have - ///been executed. Note that this matrix is assumed to be symmetric. + /**@brief diagonalizes this matrix by the Jacobi method. + * @param rot stores the rotation from the coordinate system in which the matrix is diagonal to the original + * coordinate system, i.e., old_this = rot * new_this * rot^T. + * @param threshold See iteration + * @param iteration The iteration stops when all off-diagonal elements are less than the threshold multiplied + * by the sum of the absolute values of the diagonal, or when maxSteps have been executed. + * + * Note that this matrix is assumed to be symmetric. + */ void diagonalize(btMatrix3x3& rot, btScalar threshold, int maxSteps) { rot.setIdentity(); @@ -371,11 +476,18 @@ class btMatrix3x3 { protected: + /**@brief Calculate the matrix cofactor + * @param r1 The first row to use for calculating the cofactor + * @param c1 The first column to use for calculating the cofactor + * @param r1 The second row to use for calculating the cofactor + * @param c1 The second column to use for calculating the cofactor + * See http://en.wikipedia.org/wiki/Cofactor_(linear_algebra) for more details + */ btScalar cofac(int r1, int c1, int r2, int c2) const { return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1]; } - + ///Data storage for the matrix, each vector is a row of the matrix btVector3 m_el[3]; }; @@ -494,6 +606,8 @@ class btMatrix3x3 { } */ +/**@brief Equality operator between two matrices + * It will test all elements are equal. */ SIMD_FORCE_INLINE bool operator==(const btMatrix3x3& m1, const btMatrix3x3& m2) { return ( m1[0][0] == m2[0][0] && m1[1][0] == m2[1][0] && m1[2][0] == m2[2][0] && diff --git a/extern/bullet2/src/LinearMath/btQuadWord.h b/extern/bullet2/src/LinearMath/btQuadWord.h index 2e80fc2ca47..c657afd2bb1 100644 --- a/extern/bullet2/src/LinearMath/btQuadWord.h +++ b/extern/bullet2/src/LinearMath/btQuadWord.h @@ -18,121 +18,159 @@ subject to the following restrictions: #include "btScalar.h" #include "btMinMax.h" -#include +#if defined (__CELLOS_LV2) && defined (__SPU__) +#include +#endif -///The btQuadWordStorage class is base class for btVector3 and btQuaternion. -///Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. todo: look into this -///ATTRIBUTE_ALIGNED16(class) btQuadWordStorage -class btQuadWordStorage +/**@brief The btQuadWord class is base class for btVector3 and btQuaternion. + * Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. + */ +#ifndef USE_LIBSPE2 +ATTRIBUTE_ALIGNED16(class) btQuadWord +#else +class btQuadWord +#endif { protected: - btScalar m_x; - btScalar m_y; - btScalar m_z; - btScalar m_unusedW; - +#if defined (__SPU__) && defined (__CELLOS_LV2__) + union { + vec_float4 mVec128; + btScalar m_floats[4]; + }; public: + vec_float4 get128() const + { + return mVec128; + } +protected: +#else //__CELLOS_LV2__ __SPU__ + btScalar m_floats[4]; +#endif //__CELLOS_LV2__ __SPU__ -}; - - -///btQuadWord is base-class for vectors, points -class btQuadWord : public btQuadWordStorage -{ public: - -// SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_x)[i]; } -// SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_x)[i]; } + - SIMD_FORCE_INLINE const btScalar& getX() const { return m_x; } + /**@brief Return the x value */ + SIMD_FORCE_INLINE const btScalar& getX() const { return m_floats[0]; } + /**@brief Return the y value */ + SIMD_FORCE_INLINE const btScalar& getY() const { return m_floats[1]; } + /**@brief Return the z value */ + SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; } + /**@brief Set the x value */ + SIMD_FORCE_INLINE void setX(btScalar x) { m_floats[0] = x;}; + /**@brief Set the y value */ + SIMD_FORCE_INLINE void setY(btScalar y) { m_floats[1] = y;}; + /**@brief Set the z value */ + SIMD_FORCE_INLINE void setZ(btScalar z) { m_floats[2] = z;}; + /**@brief Set the w value */ + SIMD_FORCE_INLINE void setW(btScalar w) { m_floats[3] = w;}; + /**@brief Return the x value */ + SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; } + /**@brief Return the y value */ + SIMD_FORCE_INLINE const btScalar& y() const { return m_floats[1]; } + /**@brief Return the z value */ + SIMD_FORCE_INLINE const btScalar& z() const { return m_floats[2]; } + /**@brief Return the w value */ + SIMD_FORCE_INLINE const btScalar& w() const { return m_floats[3]; } - SIMD_FORCE_INLINE const btScalar& getY() const { return m_y; } - - SIMD_FORCE_INLINE const btScalar& getZ() const { return m_z; } - - SIMD_FORCE_INLINE void setX(btScalar x) { m_x = x;}; - - SIMD_FORCE_INLINE void setY(btScalar y) { m_y = y;}; - - SIMD_FORCE_INLINE void setZ(btScalar z) { m_z = z;}; - - SIMD_FORCE_INLINE void setW(btScalar w) { m_unusedW = w;}; - - SIMD_FORCE_INLINE const btScalar& x() const { return m_x; } - - SIMD_FORCE_INLINE const btScalar& y() const { return m_y; } - - SIMD_FORCE_INLINE const btScalar& z() const { return m_z; } - - SIMD_FORCE_INLINE const btScalar& w() const { return m_unusedW; } - - - SIMD_FORCE_INLINE operator btScalar *() { return &m_x; } - SIMD_FORCE_INLINE operator const btScalar *() const { return &m_x; } + //SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_floats[0])[i]; } + //SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_floats[0])[i]; } + ///operator btScalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons. + SIMD_FORCE_INLINE operator btScalar *() { return &m_floats[0]; } + SIMD_FORCE_INLINE operator const btScalar *() const { return &m_floats[0]; } + SIMD_FORCE_INLINE bool operator==(const btQuadWord& other) const + { + return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0])); + } + SIMD_FORCE_INLINE bool operator!=(const btQuadWord& other) const + { + return !(*this == other); + } + /**@brief Set x,y,z and zero w + * @param x Value of x + * @param y Value of y + * @param z Value of z + */ SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z) { - m_x=x; - m_y=y; - m_z=z; - m_unusedW = 0.f; + m_floats[0]=x; + m_floats[1]=y; + m_floats[2]=z; + m_floats[3] = 0.f; } /* void getValue(btScalar *m) const { - m[0] = m_x; - m[1] = m_y; - m[2] = m_z; + m[0] = m_floats[0]; + m[1] = m_floats[1]; + m[2] = m_floats[2]; } */ +/**@brief Set the values + * @param x Value of x + * @param y Value of y + * @param z Value of z + * @param w Value of w + */ SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) { - m_x=x; - m_y=y; - m_z=z; - m_unusedW=w; + m_floats[0]=x; + m_floats[1]=y; + m_floats[2]=z; + m_floats[3]=w; } - + /**@brief No initialization constructor */ SIMD_FORCE_INLINE btQuadWord() - // :m_x(btScalar(0.)),m_y(btScalar(0.)),m_z(btScalar(0.)),m_unusedW(btScalar(0.)) + // :m_floats[0](btScalar(0.)),m_floats[1](btScalar(0.)),m_floats[2](btScalar(0.)),m_floats[3](btScalar(0.)) { } - - SIMD_FORCE_INLINE btQuadWord(const btQuadWordStorage& q) - { - *((btQuadWordStorage*)this) = q; - } - + + /**@brief Three argument constructor (zeros w) + * @param x Value of x + * @param y Value of y + * @param z Value of z + */ SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z) { - m_x = x, m_y = y, m_z = z, m_unusedW = 0.0f; + m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = 0.0f; } +/**@brief Initializing constructor + * @param x Value of x + * @param y Value of y + * @param z Value of z + * @param w Value of w + */ SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) { - m_x = x, m_y = y, m_z = z, m_unusedW = w; + m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = w; } - + /**@brief Set each element to the max of the current values and the values of another btQuadWord + * @param other The other btQuadWord to compare with + */ SIMD_FORCE_INLINE void setMax(const btQuadWord& other) { - btSetMax(m_x, other.m_x); - btSetMax(m_y, other.m_y); - btSetMax(m_z, other.m_z); - btSetMax(m_unusedW, other.m_unusedW); + btSetMax(m_floats[0], other.m_floats[0]); + btSetMax(m_floats[1], other.m_floats[1]); + btSetMax(m_floats[2], other.m_floats[2]); + btSetMax(m_floats[3], other.m_floats[3]); } - + /**@brief Set each element to the min of the current values and the values of another btQuadWord + * @param other The other btQuadWord to compare with + */ SIMD_FORCE_INLINE void setMin(const btQuadWord& other) { - btSetMin(m_x, other.m_x); - btSetMin(m_y, other.m_y); - btSetMin(m_z, other.m_z); - btSetMin(m_unusedW, other.m_unusedW); + btSetMin(m_floats[0], other.m_floats[0]); + btSetMin(m_floats[1], other.m_floats[1]); + btSetMin(m_floats[2], other.m_floats[2]); + btSetMin(m_floats[3], other.m_floats[3]); } diff --git a/extern/bullet2/src/LinearMath/btQuaternion.h b/extern/bullet2/src/LinearMath/btQuaternion.h index 264751b33e7..cbeca2681cc 100644 --- a/extern/bullet2/src/LinearMath/btQuaternion.h +++ b/extern/bullet2/src/LinearMath/btQuaternion.h @@ -17,39 +17,56 @@ subject to the following restrictions: #ifndef SIMD__QUATERNION_H_ #define SIMD__QUATERNION_H_ -#include "btVector3.h" -///The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. +#include "btVector3.h" +#include "btQuadWord.h" + +/**@brief The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. */ class btQuaternion : public btQuadWord { public: + /**@brief No initialization constructor */ btQuaternion() {} // template // explicit Quaternion(const btScalar *v) : Tuple4(v) {} - + /**@brief Constructor from scalars */ btQuaternion(const btScalar& x, const btScalar& y, const btScalar& z, const btScalar& w) : btQuadWord(x, y, z, w) {} - + /**@brief Axis angle Constructor + * @param axis The axis which the rotation is around + * @param angle The magnitude of the rotation around the angle (Radians) */ btQuaternion(const btVector3& axis, const btScalar& angle) { setRotation(axis, angle); } - + /**@brief Constructor from Euler angles + * @param yaw Angle around Y unless BT_EULER_DEFAULT_ZYX defined then Z + * @param pitch Angle around X unless BT_EULER_DEFAULT_ZYX defined then Y + * @param roll Angle around Z unless BT_EULER_DEFAULT_ZYX defined then X */ btQuaternion(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) { +#ifndef BT_EULER_DEFAULT_ZYX setEuler(yaw, pitch, roll); +#else + setEulerZYX(yaw, pitch, roll); +#endif } - + /**@brief Set the rotation using axis angle notation + * @param axis The axis around which to rotate + * @param angle The magnitude of the rotation in Radians */ void setRotation(const btVector3& axis, const btScalar& angle) { btScalar d = axis.length(); - assert(d != btScalar(0.0)); + btAssert(d != btScalar(0.0)); btScalar s = btSin(angle * btScalar(0.5)) / d; setValue(axis.x() * s, axis.y() * s, axis.z() * s, btCos(angle * btScalar(0.5))); } - + /**@brief Set the quaternion using Euler angles + * @param yaw Angle around Y + * @param pitch Angle around X + * @param roll Angle around Z */ void setEuler(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) { btScalar halfYaw = btScalar(yaw) * btScalar(0.5); @@ -66,122 +83,165 @@ public: sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); } - - btQuaternion& operator+=(const btQuaternion& q) + /**@brief Set the quaternion using euler angles + * @param yaw Angle around Z + * @param pitch Angle around Y + * @param roll Angle around X */ + void setEulerZYX(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) { - m_x += q.x(); m_y += q.y(); m_z += q.z(); m_unusedW += q.m_unusedW; + btScalar halfYaw = btScalar(yaw) * btScalar(0.5); + btScalar halfPitch = btScalar(pitch) * btScalar(0.5); + btScalar halfRoll = btScalar(roll) * btScalar(0.5); + btScalar cosYaw = btCos(halfYaw); + btScalar sinYaw = btSin(halfYaw); + btScalar cosPitch = btCos(halfPitch); + btScalar sinPitch = btSin(halfPitch); + btScalar cosRoll = btCos(halfRoll); + btScalar sinRoll = btSin(halfRoll); + setValue(sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, //x + cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, //y + cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, //z + cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); //formerly yzx + } + /**@brief Add two quaternions + * @param q The quaternion to add to this one */ + SIMD_FORCE_INLINE btQuaternion& operator+=(const btQuaternion& q) + { + m_floats[0] += q.x(); m_floats[1] += q.y(); m_floats[2] += q.z(); m_floats[3] += q.m_floats[3]; return *this; } + /**@brief Subtract out a quaternion + * @param q The quaternion to subtract from this one */ btQuaternion& operator-=(const btQuaternion& q) { - m_x -= q.x(); m_y -= q.y(); m_z -= q.z(); m_unusedW -= q.m_unusedW; + m_floats[0] -= q.x(); m_floats[1] -= q.y(); m_floats[2] -= q.z(); m_floats[3] -= q.m_floats[3]; return *this; } + /**@brief Scale this quaternion + * @param s The scalar to scale by */ btQuaternion& operator*=(const btScalar& s) { - m_x *= s; m_y *= s; m_z *= s; m_unusedW *= s; + m_floats[0] *= s; m_floats[1] *= s; m_floats[2] *= s; m_floats[3] *= s; return *this; } - + /**@brief Multiply this quaternion by q on the right + * @param q The other quaternion + * Equivilant to this = this * q */ btQuaternion& operator*=(const btQuaternion& q) { - setValue(m_unusedW * q.x() + m_x * q.m_unusedW + m_y * q.z() - m_z * q.y(), - m_unusedW * q.y() + m_y * q.m_unusedW + m_z * q.x() - m_x * q.z(), - m_unusedW * q.z() + m_z * q.m_unusedW + m_x * q.y() - m_y * q.x(), - m_unusedW * q.m_unusedW - m_x * q.x() - m_y * q.y() - m_z * q.z()); + setValue(m_floats[3] * q.x() + m_floats[0] * q.m_floats[3] + m_floats[1] * q.z() - m_floats[2] * q.y(), + m_floats[3] * q.y() + m_floats[1] * q.m_floats[3] + m_floats[2] * q.x() - m_floats[0] * q.z(), + m_floats[3] * q.z() + m_floats[2] * q.m_floats[3] + m_floats[0] * q.y() - m_floats[1] * q.x(), + m_floats[3] * q.m_floats[3] - m_floats[0] * q.x() - m_floats[1] * q.y() - m_floats[2] * q.z()); return *this; } - + /**@brief Return the dot product between this quaternion and another + * @param q The other quaternion */ btScalar dot(const btQuaternion& q) const { - return m_x * q.x() + m_y * q.y() + m_z * q.z() + m_unusedW * q.m_unusedW; + return m_floats[0] * q.x() + m_floats[1] * q.y() + m_floats[2] * q.z() + m_floats[3] * q.m_floats[3]; } + /**@brief Return the length squared of the quaternion */ btScalar length2() const { return dot(*this); } + /**@brief Return the length of the quaternion */ btScalar length() const { return btSqrt(length2()); } + /**@brief Normalize the quaternion + * Such that x^2 + y^2 + z^2 +w^2 = 1 */ btQuaternion& normalize() { return *this /= length(); } + /**@brief Return a scaled version of this quaternion + * @param s The scale factor */ SIMD_FORCE_INLINE btQuaternion operator*(const btScalar& s) const { - return btQuaternion(x() * s, y() * s, z() * s, m_unusedW * s); + return btQuaternion(x() * s, y() * s, z() * s, m_floats[3] * s); } - + /**@brief Return an inversely scaled versionof this quaternion + * @param s The inverse scale factor */ btQuaternion operator/(const btScalar& s) const { - assert(s != btScalar(0.0)); + btAssert(s != btScalar(0.0)); return *this * (btScalar(1.0) / s); } - + /**@brief Inversely scale this quaternion + * @param s The scale factor */ btQuaternion& operator/=(const btScalar& s) { - assert(s != btScalar(0.0)); + btAssert(s != btScalar(0.0)); return *this *= btScalar(1.0) / s; } - + /**@brief Return a normalized version of this quaternion */ btQuaternion normalized() const { return *this / length(); } - + /**@brief Return the angle between this quaternion and the other + * @param q The other quaternion */ btScalar angle(const btQuaternion& q) const { btScalar s = btSqrt(length2() * q.length2()); - assert(s != btScalar(0.0)); + btAssert(s != btScalar(0.0)); return btAcos(dot(q) / s); } - + /**@brief Return the angle of rotation represented by this quaternion */ btScalar getAngle() const { - btScalar s = btScalar(2.) * btAcos(m_unusedW); + btScalar s = btScalar(2.) * btAcos(m_floats[3]); return s; } - + /**@brief Return the inverse of this quaternion */ btQuaternion inverse() const { - return btQuaternion(-m_x, -m_y, -m_z, m_unusedW); + return btQuaternion(-m_floats[0], -m_floats[1], -m_floats[2], m_floats[3]); } + /**@brief Return the sum of this quaternion and the other + * @param q2 The other quaternion */ SIMD_FORCE_INLINE btQuaternion operator+(const btQuaternion& q2) const { const btQuaternion& q1 = *this; - return btQuaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_unusedW + q2.m_unusedW); + return btQuaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_floats[3] + q2.m_floats[3]); } + /**@brief Return the difference between this quaternion and the other + * @param q2 The other quaternion */ SIMD_FORCE_INLINE btQuaternion operator-(const btQuaternion& q2) const { const btQuaternion& q1 = *this; - return btQuaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_unusedW - q2.m_unusedW); + return btQuaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_floats[3] - q2.m_floats[3]); } + /**@brief Return the negative of this quaternion + * This simply negates each element */ SIMD_FORCE_INLINE btQuaternion operator-() const { const btQuaternion& q2 = *this; - return btQuaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_unusedW); + return btQuaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_floats[3]); } - + /**@todo document this and it's use */ SIMD_FORCE_INLINE btQuaternion farthest( const btQuaternion& qd) const { btQuaternion diff,sum; @@ -192,6 +252,10 @@ public: return (-qd); } + /**@brief Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion + * @param q The other quaternion to interpolate with + * @param t The ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q. + * Slerp interpolates assuming constant velocity. */ btQuaternion slerp(const btQuaternion& q, const btScalar& t) const { btScalar theta = angle(q); @@ -200,10 +264,10 @@ public: btScalar d = btScalar(1.0) / btSin(theta); btScalar s0 = btSin((btScalar(1.0) - t) * theta); btScalar s1 = btSin(t * theta); - return btQuaternion((m_x * s0 + q.x() * s1) * d, - (m_y * s0 + q.y() * s1) * d, - (m_z * s0 + q.z() * s1) * d, - (m_unusedW * s0 + q.m_unusedW * s1) * d); + return btQuaternion((m_floats[0] * s0 + q.x() * s1) * d, + (m_floats[1] * s0 + q.y() * s1) * d, + (m_floats[2] * s0 + q.z() * s1) * d, + (m_floats[3] * s0 + q.m_floats[3] * s1) * d); } else { @@ -211,13 +275,19 @@ public: } } - SIMD_FORCE_INLINE const btScalar& getW() const { return m_unusedW; } + static const btQuaternion& getIdentity() + { + static const btQuaternion identityQuat(btScalar(0.),btScalar(0.),btScalar(0.),btScalar(1.)); + return identityQuat; + } + + SIMD_FORCE_INLINE const btScalar& getW() const { return m_floats[3]; } }; - +/**@brief Return the negative of a quaternion */ SIMD_FORCE_INLINE btQuaternion operator-(const btQuaternion& q) { @@ -226,7 +296,7 @@ operator-(const btQuaternion& q) - +/**@brief Return the product of two quaternions */ SIMD_FORCE_INLINE btQuaternion operator*(const btQuaternion& q1, const btQuaternion& q2) { return btQuaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(), @@ -253,6 +323,7 @@ operator*(const btVector3& w, const btQuaternion& q) -w.x() * q.x() - w.y() * q.y() - w.z() * q.z()); } +/**@brief Calculate the dot product between two quaternions */ SIMD_FORCE_INLINE btScalar dot(const btQuaternion& q1, const btQuaternion& q2) { @@ -260,25 +331,32 @@ dot(const btQuaternion& q1, const btQuaternion& q2) } +/**@brief Return the length of a quaternion */ SIMD_FORCE_INLINE btScalar length(const btQuaternion& q) { return q.length(); } +/**@brief Return the angle between two quaternions*/ SIMD_FORCE_INLINE btScalar angle(const btQuaternion& q1, const btQuaternion& q2) { return q1.angle(q2); } - +/**@brief Return the inverse of a quaternion*/ SIMD_FORCE_INLINE btQuaternion inverse(const btQuaternion& q) { return q.inverse(); } +/**@brief Return the result of spherical linear interpolation betwen two quaternions + * @param q1 The first quaternion + * @param q2 The second quaternion + * @param t The ration between q1 and q2. t = 0 return q1, t=1 returns q2 + * Slerp assumes constant velocity between positions. */ SIMD_FORCE_INLINE btQuaternion slerp(const btQuaternion& q1, const btQuaternion& q2, const btScalar& t) { diff --git a/extern/bullet2/src/LinearMath/btQuickprof.cpp b/extern/bullet2/src/LinearMath/btQuickprof.cpp index e5b1196149b..fa45d02b3d3 100644 --- a/extern/bullet2/src/LinearMath/btQuickprof.cpp +++ b/extern/bullet2/src/LinearMath/btQuickprof.cpp @@ -110,7 +110,7 @@ void CProfileNode::Reset( void ) { TotalCalls = 0; TotalTime = 0.0f; - gProfileClock.reset(); + if ( Child ) { Child->Reset(); @@ -251,6 +251,7 @@ void CProfileManager::Stop_Profile( void ) *=============================================================================================*/ void CProfileManager::Reset( void ) { + gProfileClock.reset(); Root.Reset(); Root.Call(); FrameCounter = 0; @@ -278,5 +279,68 @@ float CProfileManager::Get_Time_Since_Reset( void ) return (float)time / Profile_Get_Tick_Rate(); } +#include + +void CProfileManager::dumpRecursive(CProfileIterator* profileIterator, int spacing) +{ + profileIterator->First(); + if (profileIterator->Is_Done()) + return; + + float accumulated_time=0,parent_time = profileIterator->Is_Root() ? CProfileManager::Get_Time_Since_Reset() : profileIterator->Get_Current_Parent_Total_Time(); + int i; + int frames_since_reset = CProfileManager::Get_Frame_Count_Since_Reset(); + for (i=0;iGet_Current_Parent_Name(), parent_time ); + float totalTime = 0.f; + + + int numChildren = 0; + + for (i = 0; !profileIterator->Is_Done(); i++,profileIterator->Next()) + { + numChildren++; + float current_total_time = profileIterator->Get_Current_Total_Time(); + accumulated_time += current_total_time; + float fraction = parent_time > SIMD_EPSILON ? (current_total_time / parent_time) * 100 : 0.f; + { + int i; for (i=0;iGet_Current_Name(), fraction,(current_total_time / (double)frames_since_reset),profileIterator->Get_Current_Total_Calls()); + totalTime += current_total_time; + //recurse into children + } + + if (parent_time < accumulated_time) + { + printf("what's wrong\n"); + } + for (i=0;i SIMD_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time); + + for (i=0;iEnter_Child(i); + dumpRecursive(profileIterator,spacing+3); + profileIterator->Enter_Parent(); + } +} + + + +void CProfileManager::dumpAll() +{ + CProfileIterator* profileIterator = 0; + profileIterator = CProfileManager::Get_Iterator(); + + dumpRecursive(profileIterator,0); + + CProfileManager::Release_Iterator(profileIterator); +} + + + #endif //USE_BT_CLOCK diff --git a/extern/bullet2/src/LinearMath/btQuickprof.h b/extern/bullet2/src/LinearMath/btQuickprof.h index b033940ca5c..f8d47c36861 100644 --- a/extern/bullet2/src/LinearMath/btQuickprof.h +++ b/extern/bullet2/src/LinearMath/btQuickprof.h @@ -10,14 +10,20 @@ // Credits: The Clock class was inspired by the Timer classes in // Ogre (www.ogre3d.org). + + #ifndef QUICK_PROF_H #define QUICK_PROF_H +//To disable built-in profiling, please comment out next line +//#define BT_NO_PROFILE 1 +#ifndef BT_NO_PROFILE + #include "btScalar.h" #include "LinearMath/btAlignedAllocator.h" #include -//To disable built-in profiling, please comment out next line -//#define BT_NO_PROFILE 1 + + //if you don't need btClock, you can comment next line @@ -321,6 +327,10 @@ public: } static void Release_Iterator( CProfileIterator * iterator ) { delete ( iterator); } + static void dumpRecursive(CProfileIterator* profileIterator, int spacing); + + static void dumpAll(); + private: static CProfileNode Root; static CProfileNode * CurrentNode; @@ -344,12 +354,14 @@ public: } }; -#if !defined(BT_NO_PROFILE) -#define BT_PROFILE( name ) CProfileSample __profile( name ) -#else -#define BT_PROFILE( name ) -#endif +#define BT_PROFILE( name ) CProfileSample __profile( name ) + +#else + +#define BT_PROFILE( name ) + +#endif //#ifndef BT_NO_PROFILE diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h index e8433405b20..08b2dee8af3 100644 --- a/extern/bullet2/src/LinearMath/btScalar.h +++ b/extern/bullet2/src/LinearMath/btScalar.h @@ -18,13 +18,14 @@ subject to the following restrictions: #define SIMD___SCALAR_H #include + #include //size_t for MSVC 6.0 #include #include #include -#define BT_BULLET_VERSION 272 +#define BT_BULLET_VERSION 274 inline int btGetVersion() { @@ -44,7 +45,7 @@ inline int btGetVersion() #define ATTRIBUTE_ALIGNED16(a) a #define ATTRIBUTE_ALIGNED128(a) a #else - #define BT_HAS_ALIGNED_ALLOCATOR + //#define BT_HAS_ALIGNED_ALLOCATOR #pragma warning(disable : 4324) // disable padding warning // #pragma warning(disable:4530) // Disable the exception disable but used in MSCV Stl warning. // #pragma warning(disable:4996) //Turn off warnings about deprecated C routines @@ -60,12 +61,18 @@ inline int btGetVersion() #define BT_HAVE_NATIVE_FSEL #define btFsel(a,b,c) __fsel((a),(b),(c)) #else + +#if (defined (WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION)) #define BT_USE_SSE - #endif + #include +#endif + + #endif//_XBOX + #endif //__MINGW32__ #include -#if defined(DEBUG) || defined (_DEBUG) +#ifdef BT_DEBUG #define btAssert assert #else #define btAssert(x) @@ -85,7 +92,11 @@ inline int btGetVersion() #ifndef assert #include #endif +#ifdef BT_DEBUG #define btAssert assert +#else + #define btAssert(x) +#endif //btFullAssert is optional, slows down a lot #define btFullAssert(x) @@ -102,7 +113,11 @@ inline int btGetVersion() #ifndef assert #include #endif +#ifdef BT_DEBUG #define btAssert assert +#else + #define btAssert(x) +#endif //btFullAssert is optional, slows down a lot #define btFullAssert(x) @@ -115,6 +130,9 @@ inline int btGetVersion() //non-windows systems #define SIMD_FORCE_INLINE inline + ///@todo: check out alignment methods for other platforms/compilers + ///#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16))) + ///#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128))) #define ATTRIBUTE_ALIGNED16(a) a #define ATTRIBUTE_ALIGNED128(a) a #ifndef assert @@ -141,10 +159,6 @@ inline int btGetVersion() /// older compilers (gcc 3.x) and Sun needs double version of sqrt etc. /// exclude Apple Intel (i's assumed to be a Macbook or new Intel Dual Core Processor) #if defined (__sun) || defined (__sun__) || defined (__sparc) || (defined (__APPLE__) && ! defined (__i386__)) -/* XXX Need to fix these... needed for SunOS 5.8 */ -#define sinf(a) sin((double)(a)) -#define cosf(a) cos((double)(a)) -#define fabsf(a) fabs((double)(a)) //use slow double float precision operation on those platforms #ifndef BT_USE_DOUBLE_PRECISION #define BT_FORCE_DOUBLE_FUNCTIONS @@ -154,8 +168,12 @@ inline int btGetVersion() ///The btScalar type abstracts floating point numbers, to easily switch between double and single floating point precision. #if defined(BT_USE_DOUBLE_PRECISION) typedef double btScalar; +//this number could be bigger in double precision +#define BT_LARGE_FLOAT 1e30 #else typedef float btScalar; +//keep BT_LARGE_FLOAT*BT_LARGE_FLOAT < FLT_MAX +#define BT_LARGE_FLOAT 1e18f #endif @@ -198,7 +216,7 @@ SIMD_FORCE_INLINE btScalar btSqrt(btScalar y) tempf = y; *tfptr = (0xbfcdd90a - *tfptr)>>1; /* estimate of 1/sqrt(y) */ x = tempf; - z = y*btScalar(0.5); /* hoist out the ô/2ö */ + z = y*btScalar(0.5); /* hoist out the “/2” */ x = (btScalar(1.5)*x)-(x*x)*(x*z); /* iteration formula */ x = (btScalar(1.5)*x)-(x*x)*(x*z); x = (btScalar(1.5)*x)-(x*x)*(x*z); diff --git a/extern/bullet2/src/LinearMath/btStackAlloc.h b/extern/bullet2/src/LinearMath/btStackAlloc.h index 050d44bdfe9..397b084877f 100644 --- a/extern/bullet2/src/LinearMath/btStackAlloc.h +++ b/extern/bullet2/src/LinearMath/btStackAlloc.h @@ -23,6 +23,7 @@ Nov.2006 #include "btScalar.h" //for btAssert #include "btAlignedAllocator.h" +///The btBlock class is an internal structure for the btStackAlloc memory allocator. struct btBlock { btBlock* previous; diff --git a/extern/bullet2/src/LinearMath/btTransform.h b/extern/bullet2/src/LinearMath/btTransform.h index a8cdb428100..c4fe33eecd7 100644 --- a/extern/bullet2/src/LinearMath/btTransform.h +++ b/extern/bullet2/src/LinearMath/btTransform.h @@ -21,34 +21,39 @@ subject to the following restrictions: #include "btMatrix3x3.h" -///The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear. -///It can be used in combination with btVector3, btQuaternion and btMatrix3x3 linear algebra classes. +/**@brief The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear. + *It can be used in combination with btVector3, btQuaternion and btMatrix3x3 linear algebra classes. */ class btTransform { public: - + /**@brief No initialization constructor */ btTransform() {} - + /**@brief Constructor from btQuaternion (optional btVector3 ) + * @param q Rotation from quaternion + * @param c Translation from Vector (default 0,0,0) */ explicit SIMD_FORCE_INLINE btTransform(const btQuaternion& q, const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) : m_basis(q), m_origin(c) {} + /**@brief Constructor from btMatrix3x3 (optional btVector3) + * @param b Rotation from Matrix + * @param c Translation from Vector default (0,0,0)*/ explicit SIMD_FORCE_INLINE btTransform(const btMatrix3x3& b, const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) : m_basis(b), m_origin(c) {} - + /**@brief Copy constructor */ SIMD_FORCE_INLINE btTransform (const btTransform& other) : m_basis(other.m_basis), m_origin(other.m_origin) { } - + /**@brief Assignment Operator */ SIMD_FORCE_INLINE btTransform& operator=(const btTransform& other) { m_basis = other.m_basis; @@ -57,6 +62,10 @@ public: } + /**@brief Set the current transform as the value of the product of two transforms + * @param t1 Transform 1 + * @param t2 Transform 2 + * This = Transform1 * Transform2 */ SIMD_FORCE_INLINE void mult(const btTransform& t1, const btTransform& t2) { m_basis = t1.m_basis * t2.m_basis; m_origin = t1(t2.m_origin); @@ -69,7 +78,7 @@ public: } */ - +/**@brief Return the transform of the vector */ SIMD_FORCE_INLINE btVector3 operator()(const btVector3& x) const { return btVector3(m_basis[0].dot(x) + m_origin.x(), @@ -77,17 +86,29 @@ public: m_basis[2].dot(x) + m_origin.z()); } + /**@brief Return the transform of the vector */ SIMD_FORCE_INLINE btVector3 operator*(const btVector3& x) const { return (*this)(x); } + /**@brief Return the transform of the btQuaternion */ + SIMD_FORCE_INLINE btQuaternion operator*(const btQuaternion& q) const + { + return getRotation() * q; + } + + /**@brief Return the basis matrix for the rotation */ SIMD_FORCE_INLINE btMatrix3x3& getBasis() { return m_basis; } + /**@brief Return the basis matrix for the rotation */ SIMD_FORCE_INLINE const btMatrix3x3& getBasis() const { return m_basis; } + /**@brief Return the origin vector translation */ SIMD_FORCE_INLINE btVector3& getOrigin() { return m_origin; } + /**@brief Return the origin vector translation */ SIMD_FORCE_INLINE const btVector3& getOrigin() const { return m_origin; } + /**@brief Return a quaternion representing the rotation */ btQuaternion getRotation() const { btQuaternion q; m_basis.getRotation(q); @@ -95,12 +116,16 @@ public: } + /**@brief Set from an array + * @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */ void setFromOpenGLMatrix(const btScalar *m) { m_basis.setFromOpenGLSubMatrix(m); m_origin.setValue(m[12],m[13],m[14]); } + /**@brief Fill an array representation + * @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */ void getOpenGLMatrix(btScalar *m) const { m_basis.getOpenGLSubMatrix(m); @@ -110,6 +135,8 @@ public: m[15] = btScalar(1.0); } + /**@brief Set the translational element + * @param origin The vector to set the translation to */ SIMD_FORCE_INLINE void setOrigin(const btVector3& origin) { m_origin = origin; @@ -118,26 +145,28 @@ public: SIMD_FORCE_INLINE btVector3 invXform(const btVector3& inVec) const; - + /**@brief Set the rotational element by btMatrix3x3 */ SIMD_FORCE_INLINE void setBasis(const btMatrix3x3& basis) { m_basis = basis; } + /**@brief Set the rotational element by btQuaternion */ SIMD_FORCE_INLINE void setRotation(const btQuaternion& q) { m_basis.setRotation(q); } - + /**@brief Set this transformation to the identity */ void setIdentity() { m_basis.setIdentity(); m_origin.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); } - + /**@brief Multiply this Transform by another(this = this * another) + * @param t The other transform */ btTransform& operator*=(const btTransform& t) { m_origin += m_basis * t.m_origin; @@ -145,26 +174,32 @@ public: return *this; } + /**@brief Return the inverse of this transform */ btTransform inverse() const { btMatrix3x3 inv = m_basis.transpose(); return btTransform(inv, inv * -m_origin); } + /**@brief Return the inverse of this transform times the other transform + * @param t The other transform + * return this.inverse() * the other */ btTransform inverseTimes(const btTransform& t) const; + /**@brief Return the product of this transform and the other */ btTransform operator*(const btTransform& t) const; - static btTransform getIdentity() + /**@brief Return an identity transform */ + static const btTransform& getIdentity() { - btTransform tr; - tr.setIdentity(); - return tr; + static const btTransform identityTransform(btMatrix3x3::getIdentity()); + return identityTransform; } private: - + ///Storage for the rotation btMatrix3x3 m_basis; + ///Storage for the translation btVector3 m_origin; }; @@ -191,6 +226,7 @@ btTransform::operator*(const btTransform& t) const (*this)(t.m_origin)); } +/**@brief Test if two transforms have all elements equal */ SIMD_FORCE_INLINE bool operator==(const btTransform& t1, const btTransform& t2) { return ( t1.getBasis() == t2.getBasis() && diff --git a/extern/bullet2/src/LinearMath/btTransformUtil.h b/extern/bullet2/src/LinearMath/btTransformUtil.h index 86ee1da5edf..e8328da4ca6 100644 --- a/extern/bullet2/src/LinearMath/btTransformUtil.h +++ b/extern/bullet2/src/LinearMath/btTransformUtil.h @@ -100,6 +100,38 @@ public: predictedTransform.setRotation(predictedOrn); } + static void calculateVelocityQuaternion(const btVector3& pos0,const btVector3& pos1,const btQuaternion& orn0,const btQuaternion& orn1,btScalar timeStep,btVector3& linVel,btVector3& angVel) + { + linVel = (pos1 - pos0) / timeStep; + btVector3 axis; + btScalar angle; + if (orn0 != orn1) + { + calculateDiffAxisAngleQuaternion(orn0,orn1,axis,angle); + angVel = axis * angle / timeStep; + } else + { + angVel.setValue(0,0,0); + } + } + + static void calculateDiffAxisAngleQuaternion(const btQuaternion& orn0,const btQuaternion& orn1a,btVector3& axis,btScalar& angle) + { + btQuaternion orn1 = orn0.farthest(orn1a); + btQuaternion dorn = orn1 * orn0.inverse(); + ///floating point inaccuracy can lead to w component > 1..., which breaks + dorn.normalize(); + angle = dorn.getAngle(); + axis = btVector3(dorn.x(),dorn.y(),dorn.z()); + axis[3] = btScalar(0.); + //check for axis length + btScalar len = axis.length2(); + if (len < SIMD_EPSILON*SIMD_EPSILON) + axis = btVector3(btScalar(1.),btScalar(0.),btScalar(0.)); + else + axis /= btSqrt(len); + } + static void calculateVelocity(const btTransform& transform0,const btTransform& transform1,btScalar timeStep,btVector3& linVel,btVector3& angVel) { linVel = (transform1.getOrigin() - transform0.getOrigin()) / timeStep; @@ -111,20 +143,11 @@ public: static void calculateDiffAxisAngle(const btTransform& transform0,const btTransform& transform1,btVector3& axis,btScalar& angle) { - - #ifdef USE_QUATERNION_DIFF - btQuaternion orn0 = transform0.getRotation(); - btQuaternion orn1a = transform1.getRotation(); - btQuaternion orn1 = orn0.farthest(orn1a); - btQuaternion dorn = orn1 * orn0.inverse(); -#else btMatrix3x3 dmat = transform1.getBasis() * transform0.getBasis().inverse(); btQuaternion dorn; dmat.getRotation(dorn); -#endif//USE_QUATERNION_DIFF - - ///floating point inaccuracy can lead to w component > 1..., which breaks + ///floating point inaccuracy can lead to w component > 1..., which breaks dorn.normalize(); angle = dorn.getAngle(); @@ -140,5 +163,85 @@ public: }; + +///The btConvexSeparatingDistanceUtil can help speed up convex collision detection +///by conservatively updating a cached separating distance/vector instead of re-calculating the closest distance +class btConvexSeparatingDistanceUtil +{ + btQuaternion m_ornA; + btQuaternion m_ornB; + btVector3 m_posA; + btVector3 m_posB; + + btVector3 m_separatingNormal; + + btScalar m_boundingRadiusA; + btScalar m_boundingRadiusB; + btScalar m_separatingDistance; + +public: + + btConvexSeparatingDistanceUtil(btScalar boundingRadiusA,btScalar boundingRadiusB) + :m_boundingRadiusA(boundingRadiusA), + m_boundingRadiusB(boundingRadiusB), + m_separatingDistance(0.f) + { + } + + btScalar getConservativeSeparatingDistance() + { + return m_separatingDistance; + } + + void updateSeparatingDistance(const btTransform& transA,const btTransform& transB) + { + const btVector3& toPosA = transA.getOrigin(); + const btVector3& toPosB = transB.getOrigin(); + btQuaternion toOrnA = transA.getRotation(); + btQuaternion toOrnB = transB.getRotation(); + + if (m_separatingDistance>0.f) + { + + + btVector3 linVelA,angVelA,linVelB,angVelB; + btTransformUtil::calculateVelocityQuaternion(m_posA,toPosA,m_ornA,toOrnA,btScalar(1.),linVelA,angVelA); + btTransformUtil::calculateVelocityQuaternion(m_posB,toPosB,m_ornB,toOrnB,btScalar(1.),linVelB,angVelB); + btScalar maxAngularProjectedVelocity = angVelA.length() * m_boundingRadiusA + angVelB.length() * m_boundingRadiusB; + btVector3 relLinVel = (linVelB-linVelA); + btScalar relLinVelocLength = (linVelB-linVelA).dot(m_separatingNormal); + if (relLinVelocLength<0.f) + { + relLinVelocLength = 0.f; + } + + btScalar projectedMotion = maxAngularProjectedVelocity +relLinVelocLength; + m_separatingDistance -= projectedMotion; + } + + m_posA = toPosA; + m_posB = toPosB; + m_ornA = toOrnA; + m_ornB = toOrnB; + } + + void initSeparatingDistance(const btVector3& separatingVector,btScalar separatingDistance,const btTransform& transA,const btTransform& transB) + { + m_separatingNormal = separatingVector; + m_separatingDistance = separatingDistance; + + const btVector3& toPosA = transA.getOrigin(); + const btVector3& toPosB = transB.getOrigin(); + btQuaternion toOrnA = transA.getRotation(); + btQuaternion toOrnB = transB.getRotation(); + m_posA = toPosA; + m_posB = toPosB; + m_ornA = toOrnA; + m_ornB = toOrnB; + } + +}; + + #endif //SIMD_TRANSFORM_UTIL_H diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h index 96548c6ba60..5d5c39e8587 100644 --- a/extern/bullet2/src/LinearMath/btVector3.h +++ b/extern/bullet2/src/LinearMath/btVector3.h @@ -17,127 +17,190 @@ subject to the following restrictions: #ifndef SIMD__VECTOR3_H #define SIMD__VECTOR3_H -#include "btQuadWord.h" -///btVector3 can be used to represent 3D points and vectors. -///It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user -///Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers -class btVector3 : public btQuadWord { +#include "btScalar.h" +#include "btScalar.h" +#include "btMinMax.h" +/**@brief btVector3 can be used to represent 3D points and vectors. + * It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user + * Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers + */ +ATTRIBUTE_ALIGNED16(class) btVector3 +{ public: + +#if defined (__SPU__) && defined (__CELLOS_LV2__) + union { + vec_float4 mVec128; + btScalar m_floats[4]; + }; +public: + vec_float4 get128() const + { + return mVec128; + } +public: +#else //__CELLOS_LV2__ __SPU__ +#ifdef BT_USE_SSE // WIN32 + union { + __m128 mVec128; + btScalar m_floats[4]; + }; + SIMD_FORCE_INLINE __m128 get128() const + { + return mVec128; + } + SIMD_FORCE_INLINE void set128(__m128 v128) + { + mVec128 = v128; + } +#else + btScalar m_floats[4]; +#endif +#endif //__CELLOS_LV2__ __SPU__ + + public: + + /**@brief No initialization constructor */ SIMD_FORCE_INLINE btVector3() {} - SIMD_FORCE_INLINE btVector3(const btQuadWordStorage& q) - : btQuadWord(q) - { - } + - - SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z) - :btQuadWord(x,y,z,btScalar(0.)) + /**@brief Constructor from scalars + * @param x X value + * @param y Y value + * @param z Z value + */ + SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z) { + m_floats[0] = x; + m_floats[1] = y; + m_floats[2] = z; + m_floats[3] = btScalar(0.); } -// SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) -// : btQuadWord(x,y,z,w) -// { -// } - - +/**@brief Add a vector to this one + * @param The vector to add to this one */ SIMD_FORCE_INLINE btVector3& operator+=(const btVector3& v) { - m_x += v.x(); m_y += v.y(); m_z += v.z(); + m_floats[0] += v.m_floats[0]; m_floats[1] += v.m_floats[1];m_floats[2] += v.m_floats[2]; return *this; } - + /**@brief Subtract a vector from this one + * @param The vector to subtract */ SIMD_FORCE_INLINE btVector3& operator-=(const btVector3& v) { - m_x -= v.x(); m_y -= v.y(); m_z -= v.z(); + m_floats[0] -= v.m_floats[0]; m_floats[1] -= v.m_floats[1];m_floats[2] -= v.m_floats[2]; return *this; } - + /**@brief Scale the vector + * @param s Scale factor */ SIMD_FORCE_INLINE btVector3& operator*=(const btScalar& s) { - m_x *= s; m_y *= s; m_z *= s; + m_floats[0] *= s; m_floats[1] *= s;m_floats[2] *= s; return *this; } + /**@brief Inversely scale the vector + * @param s Scale factor to divide by */ SIMD_FORCE_INLINE btVector3& operator/=(const btScalar& s) { btFullAssert(s != btScalar(0.0)); return *this *= btScalar(1.0) / s; } + /**@brief Return the dot product + * @param v The other vector in the dot product */ SIMD_FORCE_INLINE btScalar dot(const btVector3& v) const { - return m_x * v.x() + m_y * v.y() + m_z * v.z(); + return m_floats[0] * v.m_floats[0] + m_floats[1] * v.m_floats[1] +m_floats[2] * v.m_floats[2]; } + /**@brief Return the length of the vector squared */ SIMD_FORCE_INLINE btScalar length2() const { return dot(*this); } + /**@brief Return the length of the vector */ SIMD_FORCE_INLINE btScalar length() const { return btSqrt(length2()); } + /**@brief Return the distance squared between the ends of this and another vector + * This is symantically treating the vector like a point */ SIMD_FORCE_INLINE btScalar distance2(const btVector3& v) const; + /**@brief Return the distance between the ends of this and another vector + * This is symantically treating the vector like a point */ SIMD_FORCE_INLINE btScalar distance(const btVector3& v) const; + /**@brief Normalize this vector + * x^2 + y^2 + z^2 = 1 */ SIMD_FORCE_INLINE btVector3& normalize() { return *this /= length(); } + /**@brief Return a normalized version of this vector */ SIMD_FORCE_INLINE btVector3 normalized() const; + /**@brief Rotate this vector + * @param wAxis The axis to rotate about + * @param angle The angle to rotate by */ SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ); + /**@brief Return the angle between this and another vector + * @param v The other vector */ SIMD_FORCE_INLINE btScalar angle(const btVector3& v) const { btScalar s = btSqrt(length2() * v.length2()); btFullAssert(s != btScalar(0.0)); return btAcos(dot(v) / s); } - + /**@brief Return a vector will the absolute values of each element */ SIMD_FORCE_INLINE btVector3 absolute() const { return btVector3( - btFabs(m_x), - btFabs(m_y), - btFabs(m_z)); + btFabs(m_floats[0]), + btFabs(m_floats[1]), + btFabs(m_floats[2])); } - + /**@brief Return the cross product between this and another vector + * @param v The other vector */ SIMD_FORCE_INLINE btVector3 cross(const btVector3& v) const { return btVector3( - m_y * v.z() - m_z * v.y(), - m_z * v.x() - m_x * v.z(), - m_x * v.y() - m_y * v.x()); + m_floats[1] * v.m_floats[2] -m_floats[2] * v.m_floats[1], + m_floats[2] * v.m_floats[0] - m_floats[0] * v.m_floats[2], + m_floats[0] * v.m_floats[1] - m_floats[1] * v.m_floats[0]); } SIMD_FORCE_INLINE btScalar triple(const btVector3& v1, const btVector3& v2) const { - return m_x * (v1.y() * v2.z() - v1.z() * v2.y()) + - m_y * (v1.z() * v2.x() - v1.x() * v2.z()) + - m_z * (v1.x() * v2.y() - v1.y() * v2.x()); + return m_floats[0] * (v1.m_floats[1] * v2.m_floats[2] - v1.m_floats[2] * v2.m_floats[1]) + + m_floats[1] * (v1.m_floats[2] * v2.m_floats[0] - v1.m_floats[0] * v2.m_floats[2]) + + m_floats[2] * (v1.m_floats[0] * v2.m_floats[1] - v1.m_floats[1] * v2.m_floats[0]); } + /**@brief Return the axis with the smallest value + * Note return values are 0,1,2 for x, y, or z */ SIMD_FORCE_INLINE int minAxis() const { - return m_x < m_y ? (m_x < m_z ? 0 : 2) : (m_y < m_z ? 1 : 2); + return m_floats[0] < m_floats[1] ? (m_floats[0] return this, t=1 => return other) */ SIMD_FORCE_INLINE btVector3 lerp(const btVector3& v, const btScalar& t) const { - return btVector3(m_x + (v.x() - m_x) * t, - m_y + (v.y() - m_y) * t, - m_z + (v.z() - m_z) * t); + return btVector3(m_floats[0] + (v.m_floats[0] - m_floats[0]) * t, + m_floats[1] + (v.m_floats[1] - m_floats[1]) * t, + m_floats[2] + (v.m_floats[2] -m_floats[2]) * t); } - + /**@brief Elementwise multiply this vector by the other + * @param v The other vector */ SIMD_FORCE_INLINE btVector3& operator*=(const btVector3& v) { - m_x *= v.x(); m_y *= v.y(); m_z *= v.z(); + m_floats[0] *= v.m_floats[0]; m_floats[1] *= v.m_floats[1];m_floats[2] *= v.m_floats[2]; return *this; } - + /**@brief Return the x value */ + SIMD_FORCE_INLINE const btScalar& getX() const { return m_floats[0]; } + /**@brief Return the y value */ + SIMD_FORCE_INLINE const btScalar& getY() const { return m_floats[1]; } + /**@brief Return the z value */ + SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; } + /**@brief Set the x value */ + SIMD_FORCE_INLINE void setX(btScalar x) { m_floats[0] = x;}; + /**@brief Set the y value */ + SIMD_FORCE_INLINE void setY(btScalar y) { m_floats[1] = y;}; + /**@brief Set the z value */ + SIMD_FORCE_INLINE void setZ(btScalar z) {m_floats[2] = z;}; + /**@brief Set the w value */ + SIMD_FORCE_INLINE void setW(btScalar w) { m_floats[3] = w;}; + /**@brief Return the x value */ + SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; } + /**@brief Return the y value */ + SIMD_FORCE_INLINE const btScalar& y() const { return m_floats[1]; } + /**@brief Return the z value */ + SIMD_FORCE_INLINE const btScalar& z() const { return m_floats[2]; } + /**@brief Return the w value */ + SIMD_FORCE_INLINE const btScalar& w() const { return m_floats[3]; } + + //SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_floats[0])[i]; } + //SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_floats[0])[i]; } + ///operator btScalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons. + SIMD_FORCE_INLINE operator btScalar *() { return &m_floats[0]; } + SIMD_FORCE_INLINE operator const btScalar *() const { return &m_floats[0]; } + + SIMD_FORCE_INLINE bool operator==(const btVector3& other) const + { + return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0])); + } + + SIMD_FORCE_INLINE bool operator!=(const btVector3& other) const + { + return !(*this == other); + } + + /**@brief Set each element to the max of the current values and the values of another btVector3 + * @param other The other btVector3 to compare with + */ + SIMD_FORCE_INLINE void setMax(const btVector3& other) + { + btSetMax(m_floats[0], other.m_floats[0]); + btSetMax(m_floats[1], other.m_floats[1]); + btSetMax(m_floats[2], other.m_floats[2]); + btSetMax(m_floats[3], other.w()); + } + /**@brief Set each element to the min of the current values and the values of another btVector3 + * @param other The other btVector3 to compare with + */ + SIMD_FORCE_INLINE void setMin(const btVector3& other) + { + btSetMin(m_floats[0], other.m_floats[0]); + btSetMin(m_floats[1], other.m_floats[1]); + btSetMin(m_floats[2], other.m_floats[2]); + btSetMin(m_floats[3], other.w()); + } + + SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z) + { + m_floats[0]=x; + m_floats[1]=y; + m_floats[2]=z; + m_floats[3] = 0.f; + } + + void getSkewSymmetricMatrix(btVector3* v0,btVector3* v1,btVector3* v2) const + { + v0->setValue(0. ,-z() ,y()); + v1->setValue(z() ,0. ,-x()); + v2->setValue(-y() ,x() ,0.); + } }; +/**@brief Return the sum of two vectors (Point symantics)*/ SIMD_FORCE_INLINE btVector3 operator+(const btVector3& v1, const btVector3& v2) { - return btVector3(v1.x() + v2.x(), v1.y() + v2.y(), v1.z() + v2.z()); + return btVector3(v1.m_floats[0] + v2.m_floats[0], v1.m_floats[1] + v2.m_floats[1], v1.m_floats[2] + v2.m_floats[2]); } +/**@brief Return the elementwise product of two vectors */ SIMD_FORCE_INLINE btVector3 operator*(const btVector3& v1, const btVector3& v2) { - return btVector3(v1.x() * v2.x(), v1.y() * v2.y(), v1.z() * v2.z()); + return btVector3(v1.m_floats[0] * v2.m_floats[0], v1.m_floats[1] * v2.m_floats[1], v1.m_floats[2] * v2.m_floats[2]); } +/**@brief Return the difference between two vectors */ SIMD_FORCE_INLINE btVector3 operator-(const btVector3& v1, const btVector3& v2) { - return btVector3(v1.x() - v2.x(), v1.y() - v2.y(), v1.z() - v2.z()); + return btVector3(v1.m_floats[0] - v2.m_floats[0], v1.m_floats[1] - v2.m_floats[1], v1.m_floats[2] - v2.m_floats[2]); } - +/**@brief Return the negative of the vector */ SIMD_FORCE_INLINE btVector3 operator-(const btVector3& v) { - return btVector3(-v.x(), -v.y(), -v.z()); + return btVector3(-v.m_floats[0], -v.m_floats[1], -v.m_floats[2]); } +/**@brief Return the vector scaled by s */ SIMD_FORCE_INLINE btVector3 operator*(const btVector3& v, const btScalar& s) { - return btVector3(v.x() * s, v.y() * s, v.z() * s); + return btVector3(v.m_floats[0] * s, v.m_floats[1] * s, v.m_floats[2] * s); } +/**@brief Return the vector scaled by s */ SIMD_FORCE_INLINE btVector3 operator*(const btScalar& s, const btVector3& v) { return v * s; } +/**@brief Return the vector inversely scaled by s */ SIMD_FORCE_INLINE btVector3 operator/(const btVector3& v, const btScalar& s) { @@ -221,12 +367,14 @@ operator/(const btVector3& v, const btScalar& s) return v * (btScalar(1.0) / s); } +/**@brief Return the vector inversely scaled by s */ SIMD_FORCE_INLINE btVector3 operator/(const btVector3& v1, const btVector3& v2) { - return btVector3(v1.x() / v2.x(),v1.y() / v2.y(),v1.z() / v2.z()); + return btVector3(v1.m_floats[0] / v2.m_floats[0],v1.m_floats[1] / v2.m_floats[1],v1.m_floats[2] / v2.m_floats[2]); } +/**@brief Return the dot product between two vectors */ SIMD_FORCE_INLINE btScalar dot(const btVector3& v1, const btVector3& v2) { @@ -234,7 +382,7 @@ dot(const btVector3& v1, const btVector3& v2) } - +/**@brief Return the distance squared between two vectors */ SIMD_FORCE_INLINE btScalar distance2(const btVector3& v1, const btVector3& v2) { @@ -242,18 +390,21 @@ distance2(const btVector3& v1, const btVector3& v2) } +/**@brief Return the distance between two vectors */ SIMD_FORCE_INLINE btScalar distance(const btVector3& v1, const btVector3& v2) { return v1.distance(v2); } +/**@brief Return the angle between two vectors */ SIMD_FORCE_INLINE btScalar angle(const btVector3& v1, const btVector3& v2) { return v1.angle(v2); } +/**@brief Return the cross product of two vectors */ SIMD_FORCE_INLINE btVector3 cross(const btVector3& v1, const btVector3& v2) { @@ -266,6 +417,10 @@ triple(const btVector3& v1, const btVector3& v2, const btVector3& v3) return v1.triple(v2, v3); } +/**@brief Return the linear interpolation between two vectors + * @param v1 One vector + * @param v2 The other vector + * @param t The ration of this to v (t = 0 => return v1, t=1 => return v2) */ SIMD_FORCE_INLINE btVector3 lerp(const btVector3& v1, const btVector3& v2, const btScalar& t) { @@ -273,10 +428,6 @@ lerp(const btVector3& v1, const btVector3& v2, const btScalar& t) } -SIMD_FORCE_INLINE bool operator==(const btVector3& p1, const btVector3& p2) -{ - return p1.x() == p2.x() && p1.y() == p2.y() && p1.z() == p2.z(); -} SIMD_FORCE_INLINE btScalar btVector3::distance2(const btVector3& v) const { @@ -316,47 +467,47 @@ public: SIMD_FORCE_INLINE btVector4(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) : btVector3(x,y,z) { - m_unusedW = w; + m_floats[3] = w; } SIMD_FORCE_INLINE btVector4 absolute4() const { return btVector4( - btFabs(m_x), - btFabs(m_y), - btFabs(m_z), - btFabs(m_unusedW)); + btFabs(m_floats[0]), + btFabs(m_floats[1]), + btFabs(m_floats[2]), + btFabs(m_floats[3])); } - btScalar getW() const { return m_unusedW;} + btScalar getW() const { return m_floats[3];} SIMD_FORCE_INLINE int maxAxis4() const { int maxIndex = -1; btScalar maxVal = btScalar(-1e30); - if (m_x > maxVal) + if (m_floats[0] > maxVal) { maxIndex = 0; - maxVal = m_x; + maxVal = m_floats[0]; } - if (m_y > maxVal) + if (m_floats[1] > maxVal) { maxIndex = 1; - maxVal = m_y; + maxVal = m_floats[1]; } - if (m_z > maxVal) + if (m_floats[2] > maxVal) { maxIndex = 2; - maxVal = m_z; + maxVal =m_floats[2]; } - if (m_unusedW > maxVal) + if (m_floats[3] > maxVal) { maxIndex = 3; - maxVal = m_unusedW; + maxVal = m_floats[3]; } @@ -371,25 +522,25 @@ public: { int minIndex = -1; btScalar minVal = btScalar(1e30); - if (m_x < minVal) + if (m_floats[0] < minVal) { minIndex = 0; - minVal = m_x; + minVal = m_floats[0]; } - if (m_y < minVal) + if (m_floats[1] < minVal) { minIndex = 1; - minVal = m_y; + minVal = m_floats[1]; } - if (m_z < minVal) + if (m_floats[2] < minVal) { minIndex = 2; - minVal = m_z; + minVal =m_floats[2]; } - if (m_unusedW < minVal) + if (m_floats[3] < minVal) { minIndex = 3; - minVal = m_unusedW; + minVal = m_floats[3]; } return minIndex; @@ -402,6 +553,40 @@ public: return absolute4().maxAxis4(); } + + + + /**@brief Set x,y,z and zero w + * @param x Value of x + * @param y Value of y + * @param z Value of z + */ + + +/* void getValue(btScalar *m) const + { + m[0] = m_floats[0]; + m[1] = m_floats[1]; + m[2] =m_floats[2]; + } +*/ +/**@brief Set the values + * @param x Value of x + * @param y Value of y + * @param z Value of z + * @param w Value of w + */ + SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) + { + m_floats[0]=x; + m_floats[1]=y; + m_floats[2]=z; + m_floats[3]=w; + } + + + + }; diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript index 203407569b1..3d0c645e7a0 100644 --- a/extern/bullet2/src/SConscript +++ b/extern/bullet2/src/SConscript @@ -7,10 +7,10 @@ Import('env') defs = 'USE_DOUBLES QHULL _LIB' cflags = [] -if env['OURPLATFORM']=='win32-vc': +if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): defs += ' WIN32 NDEBUG _WINDOWS _LIB' #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] - cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6'] + cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs'] elif env['OURPLATFORM']=='win32-mingw': defs += ' NDEBUG' cflags += ['-O2'] @@ -35,11 +35,11 @@ softbody_src = env.Glob("BulletSoftBody/*.cpp") incs = '. BulletCollision BulletDynamics LinearMath BulletSoftBody' -env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[19, 169], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[25, 175], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[18,168], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,137], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[19,136], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[25,145], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[18,135], compileflags=cflags ) diff --git a/extern/glew/CMakeLists.txt b/extern/glew/CMakeLists.txt index 53ef014927c..26d10a6ca9f 100644 --- a/extern/glew/CMakeLists.txt +++ b/extern/glew/CMakeLists.txt @@ -26,8 +26,13 @@ SET(INC include src) +IF(UNIX) + SET(INC ${INC} ${X11_X11_INCLUDE_PATH}) +ENDIF(UNIX) + SET(SRC - src/glew.c + src/glew.c ) BLENDERLIB(extern_glew "${SRC}" "${INC}") + diff --git a/extern/glew/SConscript b/extern/glew/SConscript index 3badbeb040e..81a2fc67ccc 100644 --- a/extern/glew/SConscript +++ b/extern/glew/SConscript @@ -9,4 +9,4 @@ sources = ['src/glew.c'] defs = '' incs = 'include' -env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['blender', 'player'], priority=[50, 50]) +env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[50,230]) diff --git a/extern/glew/make/msvc_9_0/glew.vcproj b/extern/glew/make/msvc_9_0/glew.vcproj new file mode 100644 index 00000000000..f9d8df478ca --- /dev/null +++ b/extern/glew/make/msvc_9_0/glew.vcproj @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/glew/src/Makefile b/extern/glew/src/Makefile index 55cc7cfccad..ebcecae45c8 100644 --- a/extern/glew/src/Makefile +++ b/extern/glew/src/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -25,7 +27,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): none yet. +# Contributor(s): GSR # # ***** END GPL/BL DUAL LICENSE BLOCK ***** # @@ -42,15 +44,13 @@ CSRCS = glew.c CCSRCS = include nan_compile.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_GLEW) ] || mkdir -p $(NAN_GLEW) @[ -d $(NAN_GLEW)/include/GL ] || mkdir -p $(NAN_GLEW)/include/GL - @[ -d $(NAN_GLEW)/lib ] || mkdir -p $(NAN_GLEW)/lib - @[ -d $(NAN_GLEW)/lib/debug ] || mkdir -p $(NAN_GLEW)/lib/debug - @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/lib$(LIBNAME).a $(NAN_GLEW)/lib/ + @[ -d $(NAN_GLEW)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_GLEW)/lib/$(DEBUG_DIR) + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_GLEW)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_GLEW)/lib/lib$(LIBNAME).a - ranlib $(NAN_GLEW)/lib/lib$(LIBNAME).a + ranlib $(NAN_GLEW)/lib/$(DEBUG_DIR)lib$(LIBNAME).a endif @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh ../include/GL/*.h $(NAN_GLEW)/include/GL diff --git a/extern/libopenjpeg/CMakeLists.txt b/extern/libopenjpeg/CMakeLists.txt new file mode 100644 index 00000000000..0a985aceb37 --- /dev/null +++ b/extern/libopenjpeg/CMakeLists.txt @@ -0,0 +1,32 @@ +# $Id: CMakeLists.txt 14444 2008-04-16 22:40:48Z hos $ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Jacques Beaurain. +# +# ***** END GPL LICENSE BLOCK ***** + +SET(INC . src) + +FILE(GLOB SRC *.c except t1_generate_luts.c) +ADD_DEFINITIONS(-DWITH_OPENJPEG) +BLENDERLIB(extern_libopenjpeg "${SRC}" "${INC}") +#, libtype=['international','player'], priority=[5, 210]) diff --git a/extern/libopenjpeg/Makefile b/extern/libopenjpeg/Makefile new file mode 100644 index 00000000000..15d9d9c7c01 --- /dev/null +++ b/extern/libopenjpeg/Makefile @@ -0,0 +1,43 @@ +# +# $Id: Makefile 14444 2008-04-16 22:40:48Z hos $ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = openjpeg +DIR = $(OCGDIR)/extern/$(LIBNAME) + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +TCSRCS = $(wildcard *.c) +CSRCS = $(filter-out t1_generate_luts.c,$(TCSRCS)) + +include nan_compile.mk +CPPFLAGS += -I. + +install: all debug + diff --git a/extern/libopenjpeg/SConscript b/extern/libopenjpeg/SConscript index f0a93f6e2d9..da661739783 100644 --- a/extern/libopenjpeg/SConscript +++ b/extern/libopenjpeg/SConscript @@ -5,16 +5,24 @@ import sys Import('env') sources = env.Glob('*.c') + incs = '.' +flags = [] +defs = [] -flags = "-Wall -O3 -ffast-math -std=c99" +if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + flags = [] + defs.append('OPJ_STATIC') +else: + flags = ['-Wall', '-O3', '-ffast-math', '-std=c99'] -oj_env = env.Copy(); -oj_env.Replace(CCFLAGS = '') -oj_env.Replace(BF_DEBUG_FLAGS = '') +oj_env = env.Clone() +if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + oj_env.Replace(CCFLAGS = '') + oj_env.Replace(BF_DEBUG_FLAGS = '') oj_env.BlenderLib ( libname='extern_openjpeg', sources=sources, includes=Split(incs), - defines=[], - libtype=['core','intern','player'], - priority=[10, 10, 300], compileflags = Split(flags)) + defines=defs, + libtype=['extern','player'], + priority=[10,185], compileflags = flags) diff --git a/extern/libopenjpeg/jp2.c b/extern/libopenjpeg/jp2.c index 14f9493c401..b2831cfb0b5 100644 --- a/extern/libopenjpeg/jp2.c +++ b/extern/libopenjpeg/jp2.c @@ -561,6 +561,7 @@ opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *c image = j2k_decode(jp2->j2k, cio, cstr_info); if(!image) { opj_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n"); + return NULL; } /* Set Image Color Space */ diff --git a/extern/libopenjpeg/openjpeg.h b/extern/libopenjpeg/openjpeg.h index ffcaacaf6e5..ae7764eab2f 100644 --- a/extern/libopenjpeg/openjpeg.h +++ b/extern/libopenjpeg/openjpeg.h @@ -40,25 +40,8 @@ ========================================================== */ -#if defined(OPJ_STATIC) || !(defined(WIN32) || defined(__WIN32__)) #define OPJ_API #define OPJ_CALLCONV -#else -#define OPJ_CALLCONV __stdcall -/* -The following ifdef block is the standard way of creating macros which make exporting -from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS -symbol defined on the command line. this symbol should not be defined on any project -that uses this DLL. This way any other project whose source files include this file see -OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols -defined with this macro as being exported. -*/ -#ifdef OPJ_EXPORTS -#define OPJ_API __declspec(dllexport) -#else -#define OPJ_API __declspec(dllimport) -#endif /* OPJ_EXPORTS */ -#endif /* !OPJ_STATIC || !WIN32 */ #ifndef __cplusplus #if defined(HAVE_STDBOOL_H) diff --git a/extern/libopenjpeg/opj_includes.h b/extern/libopenjpeg/opj_includes.h index 80d43df990f..3464cfcf9ed 100644 --- a/extern/libopenjpeg/opj_includes.h +++ b/extern/libopenjpeg/opj_includes.h @@ -88,6 +88,12 @@ Most compilers implement their own version of this keyword ... /* MSVC does not have lrintf */ #ifdef _MSC_VER +#ifdef _M_X64 +#include +static INLINE long lrintf(float f) { + return _mm_cvtss_si32(_mm_load_ss(&f)); +} +#else static INLINE long lrintf(float f){ int i; @@ -99,6 +105,7 @@ static INLINE long lrintf(float f){ return i; } #endif +#endif #include "j2k_lib.h" #include "opj_malloc.h" diff --git a/extern/libopenjpeg/t1_generate_luts.c b/extern/libopenjpeg/t1_generate_luts.c deleted file mode 100644 index 1925b951f1b..00000000000 --- a/extern/libopenjpeg/t1_generate_luts.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq - * Copyright (c) 2001-2003, David Janssens - * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe - * Copyright (c) 2005, Herve Drolon, FreeImage Team - * Copyright (c) 2007, Callum Lerwick - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "opj_includes.h" -#include - -static int t1_init_ctxno_zc(int f, int orient) { - int h, v, d, n, t, hv; - n = 0; - h = ((f & T1_SIG_W) != 0) + ((f & T1_SIG_E) != 0); - v = ((f & T1_SIG_N) != 0) + ((f & T1_SIG_S) != 0); - d = ((f & T1_SIG_NW) != 0) + ((f & T1_SIG_NE) != 0) + ((f & T1_SIG_SE) != 0) + ((f & T1_SIG_SW) != 0); - - switch (orient) { - case 2: - t = h; - h = v; - v = t; - case 0: - case 1: - if (!h) { - if (!v) { - if (!d) - n = 0; - else if (d == 1) - n = 1; - else - n = 2; - } else if (v == 1) { - n = 3; - } else { - n = 4; - } - } else if (h == 1) { - if (!v) { - if (!d) - n = 5; - else - n = 6; - } else { - n = 7; - } - } else - n = 8; - break; - case 3: - hv = h + v; - if (!d) { - if (!hv) { - n = 0; - } else if (hv == 1) { - n = 1; - } else { - n = 2; - } - } else if (d == 1) { - if (!hv) { - n = 3; - } else if (hv == 1) { - n = 4; - } else { - n = 5; - } - } else if (d == 2) { - if (!hv) { - n = 6; - } else { - n = 7; - } - } else { - n = 8; - } - break; - } - - return (T1_CTXNO_ZC + n); -} - -static int t1_init_ctxno_sc(int f) { - int hc, vc, n; - n = 0; - - hc = int_min(((f & (T1_SIG_E | T1_SGN_E)) == - T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), - 1) - int_min(((f & (T1_SIG_E | T1_SGN_E)) == - (T1_SIG_E | T1_SGN_E)) + - ((f & (T1_SIG_W | T1_SGN_W)) == - (T1_SIG_W | T1_SGN_W)), 1); - - vc = int_min(((f & (T1_SIG_N | T1_SGN_N)) == - T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), - 1) - int_min(((f & (T1_SIG_N | T1_SGN_N)) == - (T1_SIG_N | T1_SGN_N)) + - ((f & (T1_SIG_S | T1_SGN_S)) == - (T1_SIG_S | T1_SGN_S)), 1); - - if (hc < 0) { - hc = -hc; - vc = -vc; - } - if (!hc) { - if (vc == -1) - n = 1; - else if (!vc) - n = 0; - else - n = 1; - } else if (hc == 1) { - if (vc == -1) - n = 2; - else if (!vc) - n = 3; - else - n = 4; - } - - return (T1_CTXNO_SC + n); -} - -static int t1_init_spb(int f) { - int hc, vc, n; - - hc = int_min(((f & (T1_SIG_E | T1_SGN_E)) == - T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), - 1) - int_min(((f & (T1_SIG_E | T1_SGN_E)) == - (T1_SIG_E | T1_SGN_E)) + - ((f & (T1_SIG_W | T1_SGN_W)) == - (T1_SIG_W | T1_SGN_W)), 1); - - vc = int_min(((f & (T1_SIG_N | T1_SGN_N)) == - T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), - 1) - int_min(((f & (T1_SIG_N | T1_SGN_N)) == - (T1_SIG_N | T1_SGN_N)) + - ((f & (T1_SIG_S | T1_SGN_S)) == - (T1_SIG_S | T1_SGN_S)), 1); - - if (!hc && !vc) - n = 0; - else - n = (!(hc > 0 || (!hc && vc > 0))); - - return n; -} - -void dump_array16(int array[],int size){ - int i; - --size; - for (i = 0; i < size; ++i) { - printf("0x%04x, ", array[i]); - if(!((i+1)&0x7)) - printf("\n "); - } - printf("0x%04x\n};\n\n", array[size]); -} - -int main(){ - int i, j; - double u, v, t; - - int lut_ctxno_zc[1024]; - int lut_nmsedec_sig[1 << T1_NMSEDEC_BITS]; - int lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS]; - int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS]; - int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS]; - - printf("/* This file was automatically generated by t1_generate_luts.c */\n\n"); - - // lut_ctxno_zc - for (j = 0; j < 4; ++j) { - for (i = 0; i < 256; ++i) { - int orient = j; - if (orient == 2) { - orient = 1; - } else if (orient == 1) { - orient = 2; - } - lut_ctxno_zc[(orient << 8) | i] = t1_init_ctxno_zc(i, j); - } - } - - printf("static char lut_ctxno_zc[1024] = {\n "); - for (i = 0; i < 1023; ++i) { - printf("%i, ", lut_ctxno_zc[i]); - if(!((i+1)&0x1f)) - printf("\n "); - } - printf("%i\n};\n\n", lut_ctxno_zc[1023]); - - // lut_ctxno_sc - printf("static char lut_ctxno_sc[256] = {\n "); - for (i = 0; i < 255; ++i) { - printf("0x%x, ", t1_init_ctxno_sc(i << 4)); - if(!((i+1)&0xf)) - printf("\n "); - } - printf("0x%x\n};\n\n", t1_init_ctxno_sc(255 << 4)); - - // lut_spb - printf("static char lut_spb[256] = {\n "); - for (i = 0; i < 255; ++i) { - printf("%i, ", t1_init_spb(i << 4)); - if(!((i+1)&0x1f)) - printf("\n "); - } - printf("%i\n};\n\n", t1_init_spb(255 << 4)); - - /* FIXME FIXME FIXME */ - /* fprintf(stdout,"nmsedec luts:\n"); */ - for (i = 0; i < (1 << T1_NMSEDEC_BITS); ++i) { - t = i / pow(2, T1_NMSEDEC_FRACBITS); - u = t; - v = t - 1.5; - lut_nmsedec_sig[i] = - int_max(0, - (int) (floor((u * u - v * v) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - lut_nmsedec_sig0[i] = - int_max(0, - (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - u = t - 1.0; - if (i & (1 << (T1_NMSEDEC_BITS - 1))) { - v = t - 1.5; - } else { - v = t - 0.5; - } - lut_nmsedec_ref[i] = - int_max(0, - (int) (floor((u * u - v * v) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - lut_nmsedec_ref0[i] = - int_max(0, - (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); - } - - printf("static short lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(&lut_nmsedec_sig, 1 << T1_NMSEDEC_BITS); - - printf("static short lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(&lut_nmsedec_sig0, 1 << T1_NMSEDEC_BITS); - - printf("static short lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(&lut_nmsedec_ref, 1 << T1_NMSEDEC_BITS); - - printf("static short lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\n "); - dump_array16(&lut_nmsedec_ref0, 1 << T1_NMSEDEC_BITS); - - return 0; -} diff --git a/extern/libredcode/SConscript b/extern/libredcode/SConscript index 4e83ba5cbb4..3fb78dbea0f 100644 --- a/extern/libredcode/SConscript +++ b/extern/libredcode/SConscript @@ -9,20 +9,8 @@ Import('env') sources = env.Glob('*.c') incs = '. ../libopenjpeg' -root = "extern/libredcode" - -if not os.path.isdir(root + "/include"): - os.mkdir(root + "/include"); -if not os.path.isdir(root + "/include/redcode"): - os.mkdir(root + "/include/redcode"); - -for h in env.Glob('*.h'): - shutil.copyfile(root + "/" + h, - root + "/include/redcode/" + h) - - env.BlenderLib ( libname='extern_redcode', sources=sources, includes=Split(incs), defines=[], - libtype=['core','intern','player'], - priority=[5, 5, 200], compileflags = []) + libtype=['core','intern'], + priority=[5, 5], compileflags = []) diff --git a/extern/libredcode/codec.c b/extern/libredcode/codec.c index e0b79119e80..f47a85cbb13 100644 --- a/extern/libredcode/codec.c +++ b/extern/libredcode/codec.c @@ -64,7 +64,7 @@ struct redcode_frame_raw * redcode_decode_video_raw( /* setup the decoder decoding parameters using the current image and user parameters */ opj_setup_decoder(dinfo, ¶meters); - + /* open a byte stream */ cio = opj_cio_open((opj_common_ptr)dinfo, frame->data + frame->offset, frame->length); diff --git a/extern/libredcode/format.c b/extern/libredcode/format.c index 35410e9e269..cf8f9d5faa7 100644 --- a/extern/libredcode/format.c +++ b/extern/libredcode/format.c @@ -1,44 +1,50 @@ -#include #include #include #include #include "format.h" struct red_reob { - unsigned long len; - char head[4]; + unsigned int len; + unsigned int head; - unsigned long rdvo; - unsigned long rdvs; - unsigned long rdao; - unsigned long rdas; + unsigned int rdvo; + unsigned int rdvs; + unsigned int rdao; + unsigned int rdas; - unsigned long unknown1; - unsigned long unknown2; - unsigned long totlen; + unsigned int unknown1; + unsigned int unknown2; + unsigned int totlen; - unsigned long avgv; - unsigned long avgs; + unsigned int avgv; + unsigned int avgs; - unsigned long unknown3; - unsigned long unknown4; - unsigned long unknown5; + unsigned int unknown3; + unsigned int unknown4; + unsigned int unknown5; }; struct redcode_handle { FILE * fp; struct red_reob * reob; - unsigned long * rdvo; - unsigned long * rdvs; - unsigned long * rdao; - unsigned long * rdas; + unsigned int * rdvo; + unsigned int * rdvs; + unsigned int * rdao; + unsigned int * rdas; long cfra; + long length; }; +unsigned int read_be32(unsigned int val) +{ + unsigned char * v = (unsigned char*) & val; + + return (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]; +} static unsigned char* read_packet(FILE * fp, char * expect) { - unsigned long len; + unsigned int len; char head[5]; unsigned char * rv; @@ -47,7 +53,7 @@ static unsigned char* read_packet(FILE * fp, char * expect) head[4] = 0; - len = ntohl(len); + len = read_be32(len); if (strcmp(expect, head) != 0) { fprintf(stderr, "Read: %s, expect: %s\n", head, expect); @@ -64,9 +70,9 @@ static unsigned char* read_packet(FILE * fp, char * expect) return rv; } -static unsigned long * read_index_packet(FILE * fp, char * expect) +static unsigned int * read_index_packet(FILE * fp, char * expect) { - unsigned long * rv = (unsigned long*) read_packet(fp, expect); + unsigned int * rv = (unsigned int*) read_packet(fp, expect); int i; if (!rv) { @@ -74,7 +80,7 @@ static unsigned long * read_index_packet(FILE * fp, char * expect) } for (i = 2; i < rv[0]/4; i++) { - rv[i] = ntohl(rv[i]); + rv[i] = read_be32(rv[i]); } return rv; } @@ -86,14 +92,14 @@ static struct red_reob * read_reob(FILE * fp) return (struct red_reob *) read_index_packet(fp, "REOB"); } -static unsigned long * read_index(FILE * fp, unsigned long i, char * expect) +static unsigned int * read_index(FILE * fp, unsigned int i, char * expect) { fseek(fp, i, SEEK_SET); - return (unsigned long*) read_index_packet(fp, expect); + return (unsigned int*) read_index_packet(fp, expect); } -static unsigned char * read_data(FILE * fp, unsigned long i, char * expect) +static unsigned char * read_data(FILE * fp, unsigned int i, char * expect) { fseek(fp, i, SEEK_SET); @@ -104,6 +110,7 @@ struct redcode_handle * redcode_open(const char * fname) { struct redcode_handle * rv = NULL; struct red_reob * reob = NULL; + int i; FILE * fp = fopen(fname, "rb"); @@ -131,6 +138,12 @@ struct redcode_handle * redcode_open(const char * fname) return NULL; } + for (i = 0; i < (rv->rdvo[0] - 8)/4; i++) { + if (rv->rdvo[i + 2]) { + rv->length = i; + } + } + return rv; } @@ -157,7 +170,7 @@ void redcode_close(struct redcode_handle * handle) long redcode_get_length(struct redcode_handle * handle) { - return handle->rdvo[0]/4; + return handle->length; } struct redcode_frame * redcode_read_video_frame( @@ -177,7 +190,7 @@ struct redcode_frame * redcode_read_video_frame( rv = (struct redcode_frame*) calloc(1, sizeof(struct redcode_frame)); rv->offset = 12+8; - rv->length = *(unsigned long*)data - rv->offset; + rv->length = *(unsigned int*)data - rv->offset; rv->data = data; return rv; @@ -200,7 +213,7 @@ struct redcode_frame * redcode_read_audio_frame( rv = (struct redcode_frame*) calloc(1, sizeof(struct redcode_frame)); rv->offset = 24+8; - rv->length = *(unsigned long*)data - rv->offset; + rv->length = *(unsigned int*)data - rv->offset; rv->data = data; return rv; diff --git a/extern/libredcode/format.h b/extern/libredcode/format.h index e09ea8a3b64..b2c6b2d885b 100644 --- a/extern/libredcode/format.h +++ b/extern/libredcode/format.h @@ -3,8 +3,8 @@ struct redcode_handle; struct redcode_frame { - unsigned long length; - unsigned long offset; + unsigned int length; + unsigned int offset; unsigned char * data; }; diff --git a/extern/lzma/Alloc.c b/extern/lzma/Alloc.c new file mode 100644 index 00000000000..358a7b52650 --- /dev/null +++ b/extern/lzma/Alloc.c @@ -0,0 +1,127 @@ +/* Alloc.c -- Memory allocation functions +2008-09-24 +Igor Pavlov +Public domain */ + +#ifdef _WIN32 +#include +#endif +#include + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; +#endif + +void *MyAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); + #endif + free(address); +} + +#ifdef _WIN32 + +void *MidAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); + #endif + return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); +} + +void MidFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); + #endif + if (address == 0) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#ifndef MEM_LARGE_PAGES +#undef _7ZIP_LARGE_PAGES +#endif + +#ifdef _7ZIP_LARGE_PAGES +SIZE_T g_LargePageSize = 0; +typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); +#endif + +void SetLargePageSize() +{ + #ifdef _7ZIP_LARGE_PAGES + SIZE_T size = 0; + GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); + if (largePageMinimum == 0) + return; + size = largePageMinimum(); + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); + #endif + + #ifdef _7ZIP_LARGE_PAGES + if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) + { + void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), + MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); + if (res != 0) + return res; + } + #endif + return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); +} + +void BigFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); + #endif + + if (address == 0) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#endif diff --git a/extern/lzma/Alloc.h b/extern/lzma/Alloc.h new file mode 100644 index 00000000000..ff0669cad8d --- /dev/null +++ b/extern/lzma/Alloc.h @@ -0,0 +1,32 @@ +/* Alloc.h -- Memory allocation functions +2008-03-13 +Igor Pavlov +Public domain */ + +#ifndef __COMMON_ALLOC_H +#define __COMMON_ALLOC_H + +#include + +void *MyAlloc(size_t size); +void MyFree(void *address); + +#ifdef _WIN32 + +void SetLargePageSize(); + +void *MidAlloc(size_t size); +void MidFree(void *address); +void *BigAlloc(size_t size); +void BigFree(void *address); + +#else + +#define MidAlloc(size) MyAlloc(size) +#define MidFree(address) MyFree(address) +#define BigAlloc(size) MyAlloc(size) +#define BigFree(address) MyFree(address) + +#endif + +#endif diff --git a/extern/lzma/CMakeLists.txt b/extern/lzma/CMakeLists.txt new file mode 100644 index 00000000000..235cd8c7f8e --- /dev/null +++ b/extern/lzma/CMakeLists.txt @@ -0,0 +1,34 @@ +# $Id$ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Daniel Genrich +# +# ***** END GPL LICENSE BLOCK ***** + +SET(INC . ) + +FILE(GLOB SRC ./*.c) + + + +BLENDERLIB(bf_lzma "${SRC}" "${INC}") +#, libtype='blender', priority = 0 ) diff --git a/extern/lzma/LzFind.c b/extern/lzma/LzFind.c new file mode 100644 index 00000000000..34f4f09ea58 --- /dev/null +++ b/extern/lzma/LzFind.c @@ -0,0 +1,751 @@ +/* LzFind.c -- Match finder for LZ algorithms +2008-10-04 : Igor Pavlov : Public domain */ + +#include + +#include "LzFind.h" +#include "LzHash.h" + +#define kEmptyHashValue 0 +#define kMaxValForNormalize ((UInt32)0xFFFFFFFF) +#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ +#define kNormalizeMask (~(kNormalizeStepMin - 1)) +#define kMaxHistorySize ((UInt32)3 << 30) + +#define kStartMaxLen 3 + +static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc) +{ + if (!p->directInput) + { + alloc->Free(alloc, p->bufferBase); + p->bufferBase = 0; + } +} + +/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ + +static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc) +{ + UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; + if (p->directInput) + { + p->blockSize = blockSize; + return 1; + } + if (p->bufferBase == 0 || p->blockSize != blockSize) + { + LzInWindow_Free(p, alloc); + p->blockSize = blockSize; + p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize); + } + return (p->bufferBase != 0); +} + +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } +Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; } + +UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } + +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue) +{ + p->posLimit -= subValue; + p->pos -= subValue; + p->streamPos -= subValue; +} + +static void MatchFinder_ReadBlock(CMatchFinder *p) +{ + if (p->streamEndWasReached || p->result != SZ_OK) + return; + for (;;) + { + Byte *dest = p->buffer + (p->streamPos - p->pos); + size_t size = (p->bufferBase + p->blockSize - dest); + if (size == 0) + return; + p->result = p->stream->Read(p->stream, dest, &size); + if (p->result != SZ_OK) + return; + if (size == 0) + { + p->streamEndWasReached = 1; + return; + } + p->streamPos += (UInt32)size; + if (p->streamPos - p->pos > p->keepSizeAfter) + return; + } +} + +void MatchFinder_MoveBlock(CMatchFinder *p) +{ + memmove(p->bufferBase, + p->buffer - p->keepSizeBefore, + (size_t)(p->streamPos - p->pos + p->keepSizeBefore)); + p->buffer = p->bufferBase + p->keepSizeBefore; +} + +int MatchFinder_NeedMove(CMatchFinder *p) +{ + /* if (p->streamEndWasReached) return 0; */ + return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); +} + +void MatchFinder_ReadIfRequired(CMatchFinder *p) +{ + if (p->streamEndWasReached) + return; + if (p->keepSizeAfter >= p->streamPos - p->pos) + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) +{ + if (MatchFinder_NeedMove(p)) + MatchFinder_MoveBlock(p); + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_SetDefaultSettings(CMatchFinder *p) +{ + p->cutValue = 32; + p->btMode = 1; + p->numHashBytes = 4; + /* p->skipModeBits = 0; */ + p->directInput = 0; + p->bigHash = 0; +} + +#define kCrcPoly 0xEDB88320 + +void MatchFinder_Construct(CMatchFinder *p) +{ + UInt32 i; + p->bufferBase = 0; + p->directInput = 0; + p->hash = 0; + MatchFinder_SetDefaultSettings(p); + + for (i = 0; i < 256; i++) + { + UInt32 r = i; + int j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); + p->crc[i] = r; + } +} + +static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->hash); + p->hash = 0; +} + +void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc) +{ + MatchFinder_FreeThisClassMemory(p, alloc); + LzInWindow_Free(p, alloc); +} + +static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc) +{ + size_t sizeInBytes = (size_t)num * sizeof(CLzRef); + if (sizeInBytes / sizeof(CLzRef) != num) + return 0; + return (CLzRef *)alloc->Alloc(alloc, sizeInBytes); +} + +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAlloc *alloc) +{ + UInt32 sizeReserv; + if (historySize > kMaxHistorySize) + { + MatchFinder_Free(p, alloc); + return 0; + } + sizeReserv = historySize >> 1; + if (historySize > ((UInt32)2 << 30)) + sizeReserv = historySize >> 2; + sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); + + p->keepSizeBefore = historySize + keepAddBufferBefore + 1; + p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; + /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ + if (LzInWindow_Create(p, sizeReserv, alloc)) + { + UInt32 newCyclicBufferSize = (historySize /* >> p->skipModeBits */) + 1; + UInt32 hs; + p->matchMaxLen = matchMaxLen; + { + p->fixedHashSize = 0; + if (p->numHashBytes == 2) + hs = (1 << 16) - 1; + else + { + hs = historySize - 1; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + /* hs >>= p->skipModeBits; */ + hs |= 0xFFFF; /* don't change it! It's required for Deflate */ + if (hs > (1 << 24)) + { + if (p->numHashBytes == 3) + hs = (1 << 24) - 1; + else + hs >>= 1; + } + } + p->hashMask = hs; + hs++; + if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; + if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; + if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; + hs += p->fixedHashSize; + } + + { + UInt32 prevSize = p->hashSizeSum + p->numSons; + UInt32 newSize; + p->historySize = historySize; + p->hashSizeSum = hs; + p->cyclicBufferSize = newCyclicBufferSize; + p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize); + newSize = p->hashSizeSum + p->numSons; + if (p->hash != 0 && prevSize == newSize) + return 1; + MatchFinder_FreeThisClassMemory(p, alloc); + p->hash = AllocRefs(newSize, alloc); + if (p->hash != 0) + { + p->son = p->hash + p->hashSizeSum; + return 1; + } + } + } + MatchFinder_Free(p, alloc); + return 0; +} + +static void MatchFinder_SetLimits(CMatchFinder *p) +{ + UInt32 limit = kMaxValForNormalize - p->pos; + UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; + if (limit2 < limit) + limit = limit2; + limit2 = p->streamPos - p->pos; + if (limit2 <= p->keepSizeAfter) + { + if (limit2 > 0) + limit2 = 1; + } + else + limit2 -= p->keepSizeAfter; + if (limit2 < limit) + limit = limit2; + { + UInt32 lenLimit = p->streamPos - p->pos; + if (lenLimit > p->matchMaxLen) + lenLimit = p->matchMaxLen; + p->lenLimit = lenLimit; + } + p->posLimit = p->pos + limit; +} + +void MatchFinder_Init(CMatchFinder *p) +{ + UInt32 i; + for (i = 0; i < p->hashSizeSum; i++) + p->hash[i] = kEmptyHashValue; + p->cyclicBufferPos = 0; + p->buffer = p->bufferBase; + p->pos = p->streamPos = p->cyclicBufferSize; + p->result = SZ_OK; + p->streamEndWasReached = 0; + MatchFinder_ReadBlock(p); + MatchFinder_SetLimits(p); +} + +static UInt32 MatchFinder_GetSubValue(CMatchFinder *p) +{ + return (p->pos - p->historySize - 1) & kNormalizeMask; +} + +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems) +{ + UInt32 i; + for (i = 0; i < numItems; i++) + { + UInt32 value = items[i]; + if (value <= subValue) + value = kEmptyHashValue; + else + value -= subValue; + items[i] = value; + } +} + +static void MatchFinder_Normalize(CMatchFinder *p) +{ + UInt32 subValue = MatchFinder_GetSubValue(p); + MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons); + MatchFinder_ReduceOffsets(p, subValue); +} + +static void MatchFinder_CheckLimits(CMatchFinder *p) +{ + if (p->pos == kMaxValForNormalize) + MatchFinder_Normalize(p); + if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) + MatchFinder_CheckAndMoveAndRead(p); + if (p->cyclicBufferPos == p->cyclicBufferSize) + p->cyclicBufferPos = 0; + MatchFinder_SetLimits(p); +} + +static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, UInt32 maxLen) +{ + son[_cyclicBufferPos] = curMatch; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + return distances; + { + const Byte *pb = cur - delta; + curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; + if (pb[maxLen] == cur[maxLen] && *pb == *cur) + { + UInt32 len = 0; + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + *distances++ = maxLen = len; + *distances++ = delta - 1; + if (len == lenLimit) + return distances; + } + } + } + } +} + +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, UInt32 maxLen) +{ + CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + (_cyclicBufferPos << 1); + UInt32 len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return distances; + } + { + CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + UInt32 len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + if (++len != lenLimit && pb[len] == cur[len]) + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + *distances++ = maxLen = len; + *distances++ = delta - 1; + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + return distances; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue) +{ + CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + (_cyclicBufferPos << 1); + UInt32 len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return; + } + { + CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + UInt32 len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + { + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + return; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +#define MOVE_POS \ + ++p->cyclicBufferPos; \ + p->buffer++; \ + if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); + +#define MOVE_POS_RET MOVE_POS return offset; + +static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } + +#define GET_MATCHES_HEADER2(minLen, ret_op) \ + UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \ + lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ + cur = p->buffer; + +#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) +#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) + +#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue + +#define GET_MATCHES_FOOTER(offset, maxLen) \ + offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \ + distances + offset, maxLen) - distances); MOVE_POS_RET; + +#define SKIP_FOOTER \ + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; + +static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 offset; + GET_MATCHES_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 1) +} + +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 2) +} + +static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 hash2Value, delta2, maxLen, offset; + GET_MATCHES_HEADER(3) + + HASH3_CALC; + + delta2 = p->pos - p->hash[hash2Value]; + curMatch = p->hash[kFix3HashSize + hashValue]; + + p->hash[hash2Value] = + p->hash[kFix3HashSize + hashValue] = p->pos; + + + maxLen = 2; + offset = 0; + if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) + { + for (; maxLen != lenLimit; maxLen++) + if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) + break; + distances[0] = maxLen; + distances[1] = delta2 - 1; + offset = 2; + if (maxLen == lenLimit) + { + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + GET_MATCHES_FOOTER(offset, maxLen) +} + +static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + delta2 = p->pos - p->hash[ hash2Value]; + delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; + curMatch = p->hash[kFix4HashSize + hashValue]; + + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = + p->hash[kFix4HashSize + hashValue] = p->pos; + + maxLen = 1; + offset = 0; + if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = delta2 - 1; + offset = 2; + } + if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) + { + maxLen = 3; + distances[offset + 1] = delta3 - 1; + offset += 2; + delta2 = delta3; + } + if (offset != 0) + { + for (; maxLen != lenLimit; maxLen++) + if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) + break; + distances[offset - 2] = maxLen; + if (maxLen == lenLimit) + { + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + if (maxLen < 3) + maxLen = 3; + GET_MATCHES_FOOTER(offset, maxLen) +} + +static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + delta2 = p->pos - p->hash[ hash2Value]; + delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; + curMatch = p->hash[kFix4HashSize + hashValue]; + + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = + p->hash[kFix4HashSize + hashValue] = p->pos; + + maxLen = 1; + offset = 0; + if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = delta2 - 1; + offset = 2; + } + if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) + { + maxLen = 3; + distances[offset + 1] = delta3 - 1; + offset += 2; + delta2 = delta3; + } + if (offset != 0) + { + for (; maxLen != lenLimit; maxLen++) + if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) + break; + distances[offset - 2] = maxLen; + if (maxLen == lenLimit) + { + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS_RET; + } + } + if (maxLen < 3) + maxLen = 3; + offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances + offset, maxLen) - (distances)); + MOVE_POS_RET +} + +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances, 2) - (distances)); + MOVE_POS_RET +} + +static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 hash2Value; + SKIP_HEADER(3) + HASH3_CALC; + curMatch = p->hash[kFix3HashSize + hashValue]; + p->hash[hash2Value] = + p->hash[kFix3HashSize + hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 hash2Value, hash3Value; + SKIP_HEADER(4) + HASH4_CALC; + curMatch = p->hash[kFix4HashSize + hashValue]; + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = p->pos; + p->hash[kFix4HashSize + hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 hash2Value, hash3Value; + SKIP_HEADER(4) + HASH4_CALC; + curMatch = p->hash[kFix4HashSize + hashValue]; + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = + p->hash[kFix4HashSize + hashValue] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) +{ + vTable->Init = (Mf_Init_Func)MatchFinder_Init; + vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte; + vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; + if (!p->btMode) + { + vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; + } + else if (p->numHashBytes == 2) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; + } + else if (p->numHashBytes == 3) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; + } + else + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; + } +} diff --git a/extern/lzma/LzFind.h b/extern/lzma/LzFind.h new file mode 100644 index 00000000000..5b9cebfdffe --- /dev/null +++ b/extern/lzma/LzFind.h @@ -0,0 +1,107 @@ +/* LzFind.h -- Match finder for LZ algorithms +2008-10-04 : Igor Pavlov : Public domain */ + +#ifndef __LZFIND_H +#define __LZFIND_H + +#include "Types.h" + +typedef UInt32 CLzRef; + +typedef struct _CMatchFinder +{ + Byte *buffer; + UInt32 pos; + UInt32 posLimit; + UInt32 streamPos; + UInt32 lenLimit; + + UInt32 cyclicBufferPos; + UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ + + UInt32 matchMaxLen; + CLzRef *hash; + CLzRef *son; + UInt32 hashMask; + UInt32 cutValue; + + Byte *bufferBase; + ISeqInStream *stream; + int streamEndWasReached; + + UInt32 blockSize; + UInt32 keepSizeBefore; + UInt32 keepSizeAfter; + + UInt32 numHashBytes; + int directInput; + int btMode; + /* int skipModeBits; */ + int bigHash; + UInt32 historySize; + UInt32 fixedHashSize; + UInt32 hashSizeSum; + UInt32 numSons; + SRes result; + UInt32 crc[256]; +} CMatchFinder; + +#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) +#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)]) + +#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) + +int MatchFinder_NeedMove(CMatchFinder *p); +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); +void MatchFinder_MoveBlock(CMatchFinder *p); +void MatchFinder_ReadIfRequired(CMatchFinder *p); + +void MatchFinder_Construct(CMatchFinder *p); + +/* Conditions: + historySize <= 3 GB + keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB +*/ +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAlloc *alloc); +void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc); +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems); +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue); + +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, + UInt32 *distances, UInt32 maxLen); + +/* +Conditions: + Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. + Mf_GetPointerToCurrentPos_Func's result must be used only before any other function +*/ + +typedef void (*Mf_Init_Func)(void *object); +typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index); +typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); +typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); +typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances); +typedef void (*Mf_Skip_Func)(void *object, UInt32); + +typedef struct _IMatchFinder +{ + Mf_Init_Func Init; + Mf_GetIndexByte_Func GetIndexByte; + Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; + Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; + Mf_GetMatches_Func GetMatches; + Mf_Skip_Func Skip; +} IMatchFinder; + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); + +void MatchFinder_Init(CMatchFinder *p); +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); + +#endif diff --git a/extern/lzma/LzHash.h b/extern/lzma/LzHash.h new file mode 100644 index 00000000000..9f4173e7e33 --- /dev/null +++ b/extern/lzma/LzHash.h @@ -0,0 +1,54 @@ +/* LzHash.h -- HASH functions for LZ algorithms +2008-10-04 : Igor Pavlov : Public domain */ + +#ifndef __LZHASH_H +#define __LZHASH_H + +#define kHash2Size (1 << 10) +#define kHash3Size (1 << 16) +#define kHash4Size (1 << 20) + +#define kFix3HashSize (kHash2Size) +#define kFix4HashSize (kHash2Size + kHash3Size) +#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) + +#define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8); + +#define HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } + +#define HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ + hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; } + +#define HASH5_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ + hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \ + hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \ + hash4Value &= (kHash4Size - 1); } + +/* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ +#define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; + + +#define MT_HASH2_CALC \ + hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); + +#define MT_HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } + +#define MT_HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ + hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } + +#endif diff --git a/extern/lzma/LzmaDec.c b/extern/lzma/LzmaDec.c new file mode 100644 index 00000000000..d87eb1914ea --- /dev/null +++ b/extern/lzma/LzmaDec.c @@ -0,0 +1,1007 @@ +/* LzmaDec.c -- LZMA Decoder +2008-11-06 : Igor Pavlov : Public domain */ + +#include "LzmaDec.h" + +#include + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_INIT_SIZE 5 + +#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); +#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ + { UPDATE_0(p); i = (i + i); A0; } else \ + { UPDATE_1(p); i = (i + i) + 1; A1; } +#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) + +#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } +#define TREE_DECODE(probs, limit, i) \ + { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } + +/* #define _LZMA_SIZE_OPT */ + +#ifdef _LZMA_SIZE_OPT +#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) +#else +#define TREE_6_DECODE(probs, i) \ + { i = 1; \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + i -= 0x40; } +#endif + +#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0_CHECK range = bound; +#define UPDATE_1_CHECK range -= bound; code -= bound; +#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ + { UPDATE_0_CHECK; i = (i + i); A0; } else \ + { UPDATE_1_CHECK; i = (i + i) + 1; A1; } +#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) +#define TREE_DECODE_CHECK(probs, limit, i) \ + { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } + + +#define kNumPosBitsMax 4 +#define kNumPosStatesMax (1 << kNumPosBitsMax) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumMidBits 3 +#define kLenNumMidSymbols (1 << kLenNumMidBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define LenChoice 0 +#define LenChoice2 (LenChoice + 1) +#define LenLow (LenChoice2 + 1) +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols) + + +#define kNumStates 12 +#define kNumLitStates 7 + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#define kNumPosSlotBits 6 +#define kNumLenToPosStates 4 + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) + +#define kMatchMinLen 2 +#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) + +#define IsMatch 0 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) +#define IsRepG0 (IsRep + kNumStates) +#define IsRepG1 (IsRepG0 + kNumStates) +#define IsRepG2 (IsRepG1 + kNumStates) +#define IsRep0Long (IsRepG2 + kNumStates) +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) +#define LenCoder (Align + kAlignTableSize) +#define RepLenCoder (LenCoder + kNumLenProbs) +#define Literal (RepLenCoder + kNumLenProbs) + +#define LZMA_BASE_SIZE 1846 +#define LZMA_LIT_SIZE 768 + +#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) + +#if Literal != LZMA_BASE_SIZE +StopCompilingDueBUG +#endif + +static const Byte kLiteralNextStates[kNumStates * 2] = +{ + 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5, + 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10 +}; + +#define LZMA_DIC_MIN (1 << 12) + +/* First LZMA-symbol is always decoded. +And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization +Out: + Result: + SZ_OK - OK + SZ_ERROR_DATA - Error + p->remainLen: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished + = kMatchSpecLenStart + 1 : Flush marker + = kMatchSpecLenStart + 2 : State Init Marker +*/ + +static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + CLzmaProb *probs = p->probs; + + unsigned state = p->state; + UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; + unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; + unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; + unsigned lc = p->prop.lc; + + Byte *dic = p->dic; + SizeT dicBufSize = p->dicBufSize; + SizeT dicPos = p->dicPos; + + UInt32 processedPos = p->processedPos; + UInt32 checkDicSize = p->checkDicSize; + unsigned len = 0; + + const Byte *buf = p->buf; + UInt32 range = p->range; + UInt32 code = p->code; + + do + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = processedPos & pbMask; + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + unsigned symbol; + UPDATE_0(prob); + prob = probs + Literal; + if (checkDicSize != 0 || processedPos != 0) + prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); + + if (state < kNumLitStates) + { + symbol = 1; + do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + unsigned offs = 0x100; + symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + dic[dicPos++] = (Byte)symbol; + processedPos++; + + state = kLiteralNextStates[state]; + /* if (state < 4) state = 0; else if (state < 10) state -= 3; else state -= 6; */ + continue; + } + else + { + UPDATE_1(prob); + prob = probs + IsRep + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + state += kNumStates; + prob = probs + LenCoder; + } + else + { + UPDATE_1(prob); + if (checkDicSize == 0 && processedPos == 0) + return SZ_ERROR_DATA; + prob = probs + IsRepG0 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + UPDATE_0(prob); + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + processedPos++; + state = state < kNumLitStates ? 9 : 11; + continue; + } + UPDATE_1(prob); + } + else + { + UInt32 distance; + UPDATE_1(prob); + prob = probs + IsRepG1 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep1; + } + else + { + UPDATE_1(prob); + prob = probs + IsRepG2 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep2; + } + else + { + UPDATE_1(prob); + distance = rep3; + rep3 = rep2; + } + rep2 = rep1; + } + rep1 = rep0; + rep0 = distance; + } + state = state < kNumLitStates ? 8 : 11; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = (1 << kLenNumMidBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = (1 << kLenNumHighBits); + } + } + TREE_DECODE(probLen, limit, len); + len += offset; + } + + if (state >= kNumStates) + { + UInt32 distance; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); + TREE_6_DECODE(prob, distance); + if (distance >= kStartPosModelIndex) + { + unsigned posSlot = (unsigned)distance; + int numDirectBits = (int)(((distance >> 1) - 1)); + distance = (2 | (distance & 1)); + if (posSlot < kEndPosModelIndex) + { + distance <<= numDirectBits; + prob = probs + SpecPos + distance - posSlot - 1; + { + UInt32 mask = 1; + unsigned i = 1; + do + { + GET_BIT2(prob + i, i, ; , distance |= mask); + mask <<= 1; + } + while (--numDirectBits != 0); + } + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE + range >>= 1; + + { + UInt32 t; + code -= range; + t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ + distance = (distance << 1) + (t + 1); + code += range & t; + } + /* + distance <<= 1; + if (code >= range) + { + code -= range; + distance |= 1; + } + */ + } + while (--numDirectBits != 0); + prob = probs + Align; + distance <<= kNumAlignBits; + { + unsigned i = 1; + GET_BIT2(prob + i, i, ; , distance |= 1); + GET_BIT2(prob + i, i, ; , distance |= 2); + GET_BIT2(prob + i, i, ; , distance |= 4); + GET_BIT2(prob + i, i, ; , distance |= 8); + } + if (distance == (UInt32)0xFFFFFFFF) + { + len += kMatchSpecLenStart; + state -= kNumStates; + break; + } + } + } + rep3 = rep2; + rep2 = rep1; + rep1 = rep0; + rep0 = distance + 1; + if (checkDicSize == 0) + { + if (distance >= processedPos) + return SZ_ERROR_DATA; + } + else if (distance >= checkDicSize) + return SZ_ERROR_DATA; + state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; + /* state = kLiteralNextStates[state]; */ + } + + len += kMatchMinLen; + + if (limit == dicPos) + return SZ_ERROR_DATA; + { + SizeT rem = limit - dicPos; + unsigned curLen = ((rem < len) ? (unsigned)rem : len); + SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); + + processedPos += curLen; + + len -= curLen; + if (pos + curLen <= dicBufSize) + { + Byte *dest = dic + dicPos; + ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; + const Byte *lim = dest + curLen; + dicPos += curLen; + do + *(dest) = (Byte)*(dest + src); + while (++dest != lim); + } + else + { + do + { + dic[dicPos++] = dic[pos]; + if (++pos == dicBufSize) + pos = 0; + } + while (--curLen != 0); + } + } + } + } + while (dicPos < limit && buf < bufLimit); + NORMALIZE; + p->buf = buf; + p->range = range; + p->code = code; + p->remainLen = len; + p->dicPos = dicPos; + p->processedPos = processedPos; + p->reps[0] = rep0; + p->reps[1] = rep1; + p->reps[2] = rep2; + p->reps[3] = rep3; + p->state = state; + + return SZ_OK; +} + +static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) +{ + if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) + { + Byte *dic = p->dic; + SizeT dicPos = p->dicPos; + SizeT dicBufSize = p->dicBufSize; + unsigned len = p->remainLen; + UInt32 rep0 = p->reps[0]; + if (limit - dicPos < len) + len = (unsigned)(limit - dicPos); + + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) + p->checkDicSize = p->prop.dicSize; + + p->processedPos += len; + p->remainLen -= len; + while (len-- != 0) + { + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + } + p->dicPos = dicPos; + } +} + +static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + do + { + SizeT limit2 = limit; + if (p->checkDicSize == 0) + { + UInt32 rem = p->prop.dicSize - p->processedPos; + if (limit - p->dicPos > rem) + limit2 = p->dicPos + rem; + } + RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); + if (p->processedPos >= p->prop.dicSize) + p->checkDicSize = p->prop.dicSize; + LzmaDec_WriteRem(p, limit); + } + while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + + if (p->remainLen > kMatchSpecLenStart) + { + p->remainLen = kMatchSpecLenStart; + } + return 0; +} + +typedef enum +{ + DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_LIT, + DUMMY_MATCH, + DUMMY_REP +} ELzmaDummy; + +static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) +{ + UInt32 range = p->range; + UInt32 code = p->code; + const Byte *bufLimit = buf + inSize; + CLzmaProb *probs = p->probs; + unsigned state = p->state; + ELzmaDummy res; + + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK + + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += (LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) + { + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[p->dicPos - p->reps[0] + + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; + + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG1 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG2 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + } + } + } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumMidBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = 1 << kLenNumHighBits; + } + } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } + + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) + { + int numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) + { + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE_CHECK + range >>= 1; + code -= range & (((code - range) >> 31) - 1); + /* if (code >= range) code -= range; */ + } + while (--numDirectBits != 0); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + do + { + GET_BIT_CHECK(prob + i, i); + } + while (--numDirectBits != 0); + } + } + } + } + } + NORMALIZE_CHECK; + return res; +} + + +static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) +{ + p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]); + p->range = 0xFFFFFFFF; + p->needFlush = 0; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState) +{ + p->needFlush = 1; + p->remainLen = 0; + p->tempBufSize = 0; + + if (initDic) + { + p->processedPos = 0; + p->checkDicSize = 0; + p->needInitState = 1; + } + if (initState) + p->needInitState = 1; +} + +void LzmaDec_Init(CLzmaDec *p) +{ + p->dicPos = 0; + LzmaDec_InitDicAndState(p, True, True); +} + +static void LzmaDec_InitStateReal(CLzmaDec *p) +{ + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); + UInt32 i; + CLzmaProb *probs = p->probs; + for (i = 0; i < numProbs; i++) + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + p->needInitState = 0; +} + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, + ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + (*srcLen) = 0; + LzmaDec_WriteRem(p, dicLimit); + + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->remainLen != kMatchSpecLenStart) + { + int checkEndMarkNow; + + if (p->needFlush != 0) + { + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + p->tempBuf[p->tempBufSize++] = *src++; + if (p->tempBufSize < RC_INIT_SIZE) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (p->tempBuf[0] != 0) + return SZ_ERROR_DATA; + + LzmaDec_InitRc(p, p->tempBuf); + p->tempBufSize = 0; + } + + checkEndMarkNow = 0; + if (p->dicPos >= dicLimit) + { + if (p->remainLen == 0 && p->code == 0) + { + *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; + return SZ_OK; + } + if (finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->remainLen != 0) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + checkEndMarkNow = 1; + } + + if (p->needInitState) + LzmaDec_InitStateReal(p); + + if (p->tempBufSize == 0) + { + SizeT processed; + const Byte *bufLimit; + if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, src, inSize); + if (dummyRes == DUMMY_ERROR) + { + memcpy(p->tempBuf, src, inSize); + p->tempBufSize = (unsigned)inSize; + (*srcLen) += inSize; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + bufLimit = src; + } + else + bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; + p->buf = src; + if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) + return SZ_ERROR_DATA; + processed = (SizeT)(p->buf - src); + (*srcLen) += processed; + src += processed; + inSize -= processed; + } + else + { + unsigned rem = p->tempBufSize, lookAhead = 0; + while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) + p->tempBuf[rem++] = src[lookAhead++]; + p->tempBufSize = rem; + if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); + if (dummyRes == DUMMY_ERROR) + { + (*srcLen) += lookAhead; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + } + p->buf = p->tempBuf; + if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) + return SZ_ERROR_DATA; + lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf)); + (*srcLen) += lookAhead; + src += lookAhead; + inSize -= lookAhead; + p->tempBufSize = 0; + } + } + if (p->code == 0) + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; +} + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen; + SizeT inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT inSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->dicPos == p->dicBufSize) + p->dicPos = 0; + dicPos = p->dicPos; + if (outSize > p->dicBufSize - dicPos) + { + outSizeCur = p->dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; + memcpy(dest, p->dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->probs); + p->probs = 0; +} + +static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->dic); + p->dic = 0; +} + +void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) +{ + LzmaDec_FreeProbs(p, alloc); + LzmaDec_FreeDict(p, alloc); +} + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) +{ + UInt32 dicSize; + Byte d; + + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else + dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; + p->dicSize = dicSize; + + d = data[0]; + if (d >= (9 * 5 * 5)) + return SZ_ERROR_UNSUPPORTED; + + p->lc = d % 9; + d /= 9; + p->pb = d / 5; + p->lp = d % 5; + + return SZ_OK; +} + +static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) +{ + UInt32 numProbs = LzmaProps_GetNumProbs(propNew); + if (p->probs == 0 || numProbs != p->numProbs) + { + LzmaDec_FreeProbs(p, alloc); + p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); + p->numProbs = numProbs; + if (p->probs == 0) + return SZ_ERROR_MEM; + } + return SZ_OK; +} + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + SizeT dicBufSize; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + dicBufSize = propNew.dicSize; + if (p->dic == 0 || dicBufSize != p->dicBufSize) + { + LzmaDec_FreeDict(p, alloc); + p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); + if (p->dic == 0) + { + LzmaDec_FreeProbs(p, alloc); + return SZ_ERROR_MEM; + } + } + p->dicBufSize = dicBufSize; + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc) +{ + CLzmaDec p; + SRes res; + SizeT inSize = *srcLen; + SizeT outSize = *destLen; + *srcLen = *destLen = 0; + if (inSize < RC_INIT_SIZE) + return SZ_ERROR_INPUT_EOF; + + LzmaDec_Construct(&p); + res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); + if (res != 0) + return res; + p.dic = dest; + p.dicBufSize = outSize; + + LzmaDec_Init(&p); + + *srcLen = inSize; + res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + + (*destLen) = p.dicPos; + LzmaDec_FreeProbs(&p, alloc); + return res; +} diff --git a/extern/lzma/LzmaDec.h b/extern/lzma/LzmaDec.h new file mode 100644 index 00000000000..98cdbe94949 --- /dev/null +++ b/extern/lzma/LzmaDec.h @@ -0,0 +1,223 @@ +/* LzmaDec.h -- LZMA Decoder +2008-10-04 : Igor Pavlov : Public domain */ + +#ifndef __LZMADEC_H +#define __LZMADEC_H + +#include "Types.h" + +/* #define _LZMA_PROB32 */ +/* _LZMA_PROB32 can increase the speed on some CPUs, + but memory usage for CLzmaDec::probs will be doubled in that case */ + +#ifdef _LZMA_PROB32 +#define CLzmaProb UInt32 +#else +#define CLzmaProb UInt16 +#endif + + +/* ---------- LZMA Properties ---------- */ + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaProps +{ + unsigned lc, lp, pb; + UInt32 dicSize; +} CLzmaProps; + +/* LzmaProps_Decode - decodes properties +Returns: + SZ_OK + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); + + +/* ---------- LZMA Decoder state ---------- */ + +/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. + Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ + +#define LZMA_REQUIRED_INPUT_MAX 20 + +typedef struct +{ + CLzmaProps prop; + CLzmaProb *probs; + Byte *dic; + const Byte *buf; + UInt32 range, code; + SizeT dicPos; + SizeT dicBufSize; + UInt32 processedPos; + UInt32 checkDicSize; + unsigned state; + UInt32 reps[4]; + unsigned remainLen; + int needFlush; + int needInitState; + UInt32 numProbs; + unsigned tempBufSize; + Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; +} CLzmaDec; + +#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } + +void LzmaDec_Init(CLzmaDec *p); + +/* There are two types of LZMA streams: + 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. + 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ + +typedef enum +{ + LZMA_FINISH_ANY, /* finish at any point */ + LZMA_FINISH_END /* block must be finished at the end */ +} ELzmaFinishMode; + +/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! + + You must use LZMA_FINISH_END, when you know that current output buffer + covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. + + If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, + and output value of destLen will be less than output buffer size limit. + You can check status result also. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + +typedef enum +{ + LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ + LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ + LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ +} ELzmaStatus; + +/* ELzmaStatus is used only as output value for function call */ + + +/* ---------- Interfaces ---------- */ + +/* There are 3 levels of interfaces: + 1) Dictionary Interface + 2) Buffer Interface + 3) One Call Interface + You can select any of these interfaces, but don't mix functions from different + groups for same object. */ + + +/* There are two variants to allocate state for Dictionary Interface: + 1) LzmaDec_Allocate / LzmaDec_Free + 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs + You can use variant 2, if you set dictionary buffer manually. + For Buffer Interface you must always use variant 1. + +LzmaDec_Allocate* can return: + SZ_OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); + +SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc); + +/* ---------- Dictionary Interface ---------- */ + +/* You can use it, if you want to eliminate the overhead for data copying from + dictionary to some other external buffer. + You must work with CLzmaDec variables directly in this interface. + + STEPS: + LzmaDec_Constr() + LzmaDec_Allocate() + for (each new stream) + { + LzmaDec_Init() + while (it needs more decompression) + { + LzmaDec_DecodeToDic() + use data from CLzmaDec::dic and update CLzmaDec::dicPos + } + } + LzmaDec_Free() +*/ + +/* LzmaDec_DecodeToDic + + The decoding to internal dictionary buffer (CLzmaDec::dic). + You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! + +finishMode: + It has meaning only if the decoding reaches output limit (dicLimit). + LZMA_FINISH_ANY - Decode just dicLimit bytes. + LZMA_FINISH_END - Stream must be finished after dicLimit. + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error +*/ + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- Buffer Interface ---------- */ + +/* It's zlib-like interface. + See LzmaDec_DecodeToDic description for information about STEPS and return results, + but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need + to work with CLzmaDec variables manually. + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). +*/ + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* LzmaDecode + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc); + +#endif diff --git a/extern/lzma/LzmaEnc.c b/extern/lzma/LzmaEnc.c new file mode 100644 index 00000000000..9196c43f64b --- /dev/null +++ b/extern/lzma/LzmaEnc.c @@ -0,0 +1,2281 @@ +/* LzmaEnc.c -- LZMA Encoder +2009-02-02 : Igor Pavlov : Public domain */ + +#include + +/* #define SHOW_STAT */ +/* #define SHOW_STAT2 */ + +#if defined(SHOW_STAT) || defined(SHOW_STAT2) +#include +#endif + +#include "LzmaEnc.h" + +#include "LzFind.h" +#ifdef COMPRESS_MF_MT +#include "LzFindMt.h" +#endif + +#ifdef SHOW_STAT +static int ttt = 0; +#endif + +#define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1) + +#define kBlockSize (9 << 10) +#define kUnpackBlockSize (1 << 18) +#define kMatchArraySize (1 << 21) +#define kMatchRecordMaxSize ((LZMA_MATCH_LEN_MAX * 2 + 3) * LZMA_MATCH_LEN_MAX) + +#define kNumMaxDirectBits (31) + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 +#define kProbInitValue (kBitModelTotal >> 1) + +#define kNumMoveReducingBits 4 +#define kNumBitPriceShiftBits 4 +#define kBitPrice (1 << kNumBitPriceShiftBits) + +void LzmaEncProps_Init(CLzmaEncProps *p) +{ + p->level = 5; + p->dictSize = p->mc = 0; + p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; + p->writeEndMark = 0; +} + +void LzmaEncProps_Normalize(CLzmaEncProps *p) +{ + int level = p->level; + if (level < 0) level = 5; + p->level = level; + if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); + if (p->lc < 0) p->lc = 3; + if (p->lp < 0) p->lp = 0; + if (p->pb < 0) p->pb = 2; + if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); + if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); + if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); + if (p->numHashBytes < 0) p->numHashBytes = 4; + if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); + if (p->numThreads < 0) + p->numThreads = + #ifdef COMPRESS_MF_MT + ((p->btMode && p->algo) ? 2 : 1); + #else + 1; + #endif +} + +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) +{ + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + return props.dictSize; +} + +/* #define LZMA_LOG_BSR */ +/* Define it for Intel's CPU */ + + +#ifdef LZMA_LOG_BSR + +#define kDicLogSizeMaxCompress 30 + +#define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); } + +UInt32 GetPosSlot1(UInt32 pos) +{ + UInt32 res; + BSR2_RET(pos, res); + return res; +} +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } + +#else + +#define kNumLogBits (9 + (int)sizeof(size_t) / 2) +#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) + +void LzmaEnc_FastPosInit(Byte *g_FastPos) +{ + int c = 2, slotFast; + g_FastPos[0] = 0; + g_FastPos[1] = 1; + + for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++) + { + UInt32 k = (1 << ((slotFast >> 1) - 1)); + UInt32 j; + for (j = 0; j < k; j++, c++) + g_FastPos[c] = (Byte)slotFast; + } +} + +#define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \ + (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ + res = p->g_FastPos[pos >> i] + (i * 2); } +/* +#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ + p->g_FastPos[pos >> 6] + 12 : \ + p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } +*/ + +#define GetPosSlot1(pos) p->g_FastPos[pos] +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos]; else BSR2_RET(pos, res); } + +#endif + + +#define LZMA_NUM_REPS 4 + +typedef unsigned CState; + +typedef struct _COptimal +{ + UInt32 price; + + CState state; + int prev1IsChar; + int prev2; + + UInt32 posPrev2; + UInt32 backPrev2; + + UInt32 posPrev; + UInt32 backPrev; + UInt32 backs[LZMA_NUM_REPS]; +} COptimal; + +#define kNumOpts (1 << 12) + +#define kNumLenToPosStates 4 +#define kNumPosSlotBits 6 +#define kDicLogSizeMin 0 +#define kDicLogSizeMax 32 +#define kDistTableSizeMax (kDicLogSizeMax * 2) + + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) +#define kAlignMask (kAlignTableSize - 1) + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumPosModels (kEndPosModelIndex - kStartPosModelIndex) + +#define kNumFullDistances (1 << (kEndPosModelIndex / 2)) + +#ifdef _LZMA_PROB32 +#define CLzmaProb UInt32 +#else +#define CLzmaProb UInt16 +#endif + +#define LZMA_PB_MAX 4 +#define LZMA_LC_MAX 8 +#define LZMA_LP_MAX 4 + +#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) + + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumMidBits 3 +#define kLenNumMidSymbols (1 << kLenNumMidBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define kLenNumSymbolsTotal (kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) + +#define LZMA_MATCH_LEN_MIN 2 +#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) + +#define kNumStates 12 + +typedef struct +{ + CLzmaProb choice; + CLzmaProb choice2; + CLzmaProb low[LZMA_NUM_PB_STATES_MAX << kLenNumLowBits]; + CLzmaProb mid[LZMA_NUM_PB_STATES_MAX << kLenNumMidBits]; + CLzmaProb high[kLenNumHighSymbols]; +} CLenEnc; + +typedef struct +{ + CLenEnc p; + UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; + UInt32 tableSize; + UInt32 counters[LZMA_NUM_PB_STATES_MAX]; +} CLenPriceEnc; + +typedef struct _CRangeEnc +{ + UInt32 range; + Byte cache; + UInt64 low; + UInt64 cacheSize; + Byte *buf; + Byte *bufLim; + Byte *bufBase; + ISeqOutStream *outStream; + UInt64 processed; + SRes res; +} CRangeEnc; + +typedef struct _CSeqInStreamBuf +{ + ISeqInStream funcTable; + const Byte *data; + SizeT rem; +} CSeqInStreamBuf; + +static SRes MyRead(void *pp, void *data, size_t *size) +{ + size_t curSize = *size; + CSeqInStreamBuf *p = (CSeqInStreamBuf *)pp; + if (p->rem < curSize) + curSize = p->rem; + memcpy(data, p->data, curSize); + p->rem -= curSize; + p->data += curSize; + *size = curSize; + return SZ_OK; +} + +typedef struct +{ + CLzmaProb *litProbs; + + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; + + UInt32 reps[LZMA_NUM_REPS]; + UInt32 state; +} CSaveState; + +typedef struct _CLzmaEnc +{ + IMatchFinder matchFinder; + void *matchFinderObj; + + #ifdef COMPRESS_MF_MT + Bool mtMode; + CMatchFinderMt matchFinderMt; + #endif + + CMatchFinder matchFinderBase; + + #ifdef COMPRESS_MF_MT + Byte pad[128]; + #endif + + UInt32 optimumEndIndex; + UInt32 optimumCurrentIndex; + + UInt32 longestMatchLength; + UInt32 numPairs; + UInt32 numAvail; + COptimal opt[kNumOpts]; + + #ifndef LZMA_LOG_BSR + Byte g_FastPos[1 << kNumLogBits]; + #endif + + UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; + UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; + UInt32 numFastBytes; + UInt32 additionalOffset; + UInt32 reps[LZMA_NUM_REPS]; + UInt32 state; + + UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; + UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; + UInt32 alignPrices[kAlignTableSize]; + UInt32 alignPriceCount; + + UInt32 distTableSize; + + unsigned lc, lp, pb; + unsigned lpMask, pbMask; + + CLzmaProb *litProbs; + + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; + + unsigned lclp; + + Bool fastMode; + + CRangeEnc rc; + + Bool writeEndMark; + UInt64 nowPos64; + UInt32 matchPriceCount; + Bool finished; + Bool multiThread; + + SRes result; + UInt32 dictSize; + UInt32 matchFinderCycles; + + ISeqInStream *inStream; + CSeqInStreamBuf seqBufInStream; + + CSaveState saveState; +} CLzmaEnc; + +void LzmaEnc_SaveState(CLzmaEncHandle pp) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CSaveState *dest = &p->saveState; + int i; + dest->lenEnc = p->lenEnc; + dest->repLenEnc = p->repLenEnc; + dest->state = p->state; + + for (i = 0; i < kNumStates; i++) + { + memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); + memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); + } + for (i = 0; i < kNumLenToPosStates; i++) + memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); + memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); + memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); + memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); + memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); + memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); + memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); + memcpy(dest->reps, p->reps, sizeof(p->reps)); + memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb)); +} + +void LzmaEnc_RestoreState(CLzmaEncHandle pp) +{ + CLzmaEnc *dest = (CLzmaEnc *)pp; + const CSaveState *p = &dest->saveState; + int i; + dest->lenEnc = p->lenEnc; + dest->repLenEnc = p->repLenEnc; + dest->state = p->state; + + for (i = 0; i < kNumStates; i++) + { + memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); + memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); + } + for (i = 0; i < kNumLenToPosStates; i++) + memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); + memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); + memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); + memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); + memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); + memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); + memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); + memcpy(dest->reps, p->reps, sizeof(p->reps)); + memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb)); +} + +SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + + if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX || + props.dictSize > (1 << kDicLogSizeMaxCompress) || props.dictSize > (1 << 30)) + return SZ_ERROR_PARAM; + p->dictSize = props.dictSize; + p->matchFinderCycles = props.mc; + { + unsigned fb = props.fb; + if (fb < 5) + fb = 5; + if (fb > LZMA_MATCH_LEN_MAX) + fb = LZMA_MATCH_LEN_MAX; + p->numFastBytes = fb; + } + p->lc = props.lc; + p->lp = props.lp; + p->pb = props.pb; + p->fastMode = (props.algo == 0); + p->matchFinderBase.btMode = props.btMode; + { + UInt32 numHashBytes = 4; + if (props.btMode) + { + if (props.numHashBytes < 2) + numHashBytes = 2; + else if (props.numHashBytes < 4) + numHashBytes = props.numHashBytes; + } + p->matchFinderBase.numHashBytes = numHashBytes; + } + + p->matchFinderBase.cutValue = props.mc; + + p->writeEndMark = props.writeEndMark; + + #ifdef COMPRESS_MF_MT + /* + if (newMultiThread != _multiThread) + { + ReleaseMatchFinder(); + _multiThread = newMultiThread; + } + */ + p->multiThread = (props.numThreads > 1); + #endif + + return SZ_OK; +} + +static const int kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; +static const int kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; +static const int kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; +static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; + +#define IsCharState(s) ((s) < 7) + +#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) + +#define kInfinityPrice (1 << 30) + +static void RangeEnc_Construct(CRangeEnc *p) +{ + p->outStream = 0; + p->bufBase = 0; +} + +#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) + +#define RC_BUF_SIZE (1 << 16) +static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc) +{ + if (p->bufBase == 0) + { + p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE); + if (p->bufBase == 0) + return 0; + p->bufLim = p->bufBase + RC_BUF_SIZE; + } + return 1; +} + +static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->bufBase); + p->bufBase = 0; +} + +static void RangeEnc_Init(CRangeEnc *p) +{ + /* Stream.Init(); */ + p->low = 0; + p->range = 0xFFFFFFFF; + p->cacheSize = 1; + p->cache = 0; + + p->buf = p->bufBase; + + p->processed = 0; + p->res = SZ_OK; +} + +static void RangeEnc_FlushStream(CRangeEnc *p) +{ + size_t num; + if (p->res != SZ_OK) + return; + num = p->buf - p->bufBase; + if (num != p->outStream->Write(p->outStream, p->bufBase, num)) + p->res = SZ_ERROR_WRITE; + p->processed += num; + p->buf = p->bufBase; +} + +static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) +{ + if ((UInt32)p->low < (UInt32)0xFF000000 || (int)(p->low >> 32) != 0) + { + Byte temp = p->cache; + do + { + Byte *buf = p->buf; + *buf++ = (Byte)(temp + (Byte)(p->low >> 32)); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + temp = 0xFF; + } + while (--p->cacheSize != 0); + p->cache = (Byte)((UInt32)p->low >> 24); + } + p->cacheSize++; + p->low = (UInt32)p->low << 8; +} + +static void RangeEnc_FlushData(CRangeEnc *p) +{ + int i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + +static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int numBits) +{ + do + { + p->range >>= 1; + p->low += p->range & (0 - ((value >> --numBits) & 1)); + if (p->range < kTopValue) + { + p->range <<= 8; + RangeEnc_ShiftLow(p); + } + } + while (numBits != 0); +} + +static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol) +{ + UInt32 ttt = *prob; + UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt; + if (symbol == 0) + { + p->range = newBound; + ttt += (kBitModelTotal - ttt) >> kNumMoveBits; + } + else + { + p->low += newBound; + p->range -= newBound; + ttt -= ttt >> kNumMoveBits; + } + *prob = (CLzmaProb)ttt; + if (p->range < kTopValue) + { + p->range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol) +{ + symbol |= 0x100; + do + { + RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1); + symbol <<= 1; + } + while (symbol < 0x10000); +} + +static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte) +{ + UInt32 offs = 0x100; + symbol |= 0x100; + do + { + matchByte <<= 1; + RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1); + symbol <<= 1; + offs &= ~(matchByte ^ symbol); + } + while (symbol < 0x10000); +} + +void LzmaEnc_InitPriceTables(UInt32 *ProbPrices) +{ + UInt32 i; + for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits)) + { + const int kCyclesBits = kNumBitPriceShiftBits; + UInt32 w = i; + UInt32 bitCount = 0; + int j; + for (j = 0; j < kCyclesBits; j++) + { + w = w * w; + bitCount <<= 1; + while (w >= ((UInt32)1 << 16)) + { + w >>= 1; + bitCount++; + } + } + ProbPrices[i >> kNumMoveReducingBits] = ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); + } +} + + +#define GET_PRICE(prob, symbol) \ + p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICEa(prob, symbol) \ + ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + +#define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + +static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices) +{ + UInt32 price = 0; + symbol |= 0x100; + do + { + price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1); + symbol <<= 1; + } + while (symbol < 0x10000); + return price; +} + +static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices) +{ + UInt32 price = 0; + UInt32 offs = 0x100; + symbol |= 0x100; + do + { + matchByte <<= 1; + price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1); + symbol <<= 1; + offs &= ~(matchByte ^ symbol); + } + while (symbol < 0x10000); + return price; +} + + +static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) +{ + UInt32 m = 1; + int i; + for (i = numBitLevels; i != 0;) + { + UInt32 bit; + i--; + bit = (symbol >> i) & 1; + RangeEnc_EncodeBit(rc, probs + m, bit); + m = (m << 1) | bit; + } +} + +static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) +{ + UInt32 m = 1; + int i; + for (i = 0; i < numBitLevels; i++) + { + UInt32 bit = symbol & 1; + RangeEnc_EncodeBit(rc, probs + m, bit); + m = (m << 1) | bit; + symbol >>= 1; + } +} + +static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices) +{ + UInt32 price = 0; + symbol |= (1 << numBitLevels); + while (symbol != 1) + { + price += GET_PRICEa(probs[symbol >> 1], symbol & 1); + symbol >>= 1; + } + return price; +} + +static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices) +{ + UInt32 price = 0; + UInt32 m = 1; + int i; + for (i = numBitLevels; i != 0; i--) + { + UInt32 bit = symbol & 1; + symbol >>= 1; + price += GET_PRICEa(probs[m], bit); + m = (m << 1) | bit; + } + return price; +} + + +static void LenEnc_Init(CLenEnc *p) +{ + unsigned i; + p->choice = p->choice2 = kProbInitValue; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++) + p->low[i] = kProbInitValue; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++) + p->mid[i] = kProbInitValue; + for (i = 0; i < kLenNumHighSymbols; i++) + p->high[i] = kProbInitValue; +} + +static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) +{ + if (symbol < kLenNumLowSymbols) + { + RangeEnc_EncodeBit(rc, &p->choice, 0); + RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); + } + else + { + RangeEnc_EncodeBit(rc, &p->choice, 1); + if (symbol < kLenNumLowSymbols + kLenNumMidSymbols) + { + RangeEnc_EncodeBit(rc, &p->choice2, 0); + RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols); + } + else + { + RangeEnc_EncodeBit(rc, &p->choice2, 1); + RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols); + } + } +} + +static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 *ProbPrices) +{ + UInt32 a0 = GET_PRICE_0a(p->choice); + UInt32 a1 = GET_PRICE_1a(p->choice); + UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); + UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); + UInt32 i = 0; + for (i = 0; i < kLenNumLowSymbols; i++) + { + if (i >= numSymbols) + return; + prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices); + } + for (; i < kLenNumLowSymbols + kLenNumMidSymbols; i++) + { + if (i >= numSymbols) + return; + prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices); + } + for (; i < numSymbols; i++) + prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices); +} + +static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPrices) +{ + LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); + p->counters[posState] = p->tableSize; +} + +static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices) +{ + UInt32 posState; + for (posState = 0; posState < numPosStates; posState++) + LenPriceEnc_UpdateTable(p, posState, ProbPrices); +} + +static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices) +{ + LenEnc_Encode(&p->p, rc, symbol, posState); + if (updatePrice) + if (--p->counters[posState] == 0) + LenPriceEnc_UpdateTable(p, posState, ProbPrices); +} + + + + +static void MovePos(CLzmaEnc *p, UInt32 num) +{ + #ifdef SHOW_STAT + ttt += num; + printf("\n MovePos %d", num); + #endif + if (num != 0) + { + p->additionalOffset += num; + p->matchFinder.Skip(p->matchFinderObj, num); + } +} + +static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes) +{ + UInt32 lenRes = 0, numPairs; + p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); + numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); + #ifdef SHOW_STAT + printf("\n i = %d numPairs = %d ", ttt, numPairs / 2); + ttt++; + { + UInt32 i; + for (i = 0; i < numPairs; i += 2) + printf("%2d %6d | ", p->matches[i], p->matches[i + 1]); + } + #endif + if (numPairs > 0) + { + lenRes = p->matches[numPairs - 2]; + if (lenRes == p->numFastBytes) + { + const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + UInt32 distance = p->matches[numPairs - 1] + 1; + UInt32 numAvail = p->numAvail; + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + { + const Byte *pby2 = pby - distance; + for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++); + } + } + } + p->additionalOffset++; + *numDistancePairsRes = numPairs; + return lenRes; +} + + +#define MakeAsChar(p) (p)->backPrev = (UInt32)(-1); (p)->prev1IsChar = False; +#define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False; +#define IsShortRep(p) ((p)->backPrev == 0) + +static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState) +{ + return + GET_PRICE_0(p->isRepG0[state]) + + GET_PRICE_0(p->isRep0Long[state][posState]); +} + +static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState) +{ + UInt32 price; + if (repIndex == 0) + { + price = GET_PRICE_0(p->isRepG0[state]); + price += GET_PRICE_1(p->isRep0Long[state][posState]); + } + else + { + price = GET_PRICE_1(p->isRepG0[state]); + if (repIndex == 1) + price += GET_PRICE_0(p->isRepG1[state]); + else + { + price += GET_PRICE_1(p->isRepG1[state]); + price += GET_PRICE(p->isRepG2[state], repIndex - 2); + } + } + return price; +} + +static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState) +{ + return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] + + GetPureRepPrice(p, repIndex, state, posState); +} + +static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur) +{ + UInt32 posMem = p->opt[cur].posPrev; + UInt32 backMem = p->opt[cur].backPrev; + p->optimumEndIndex = cur; + do + { + if (p->opt[cur].prev1IsChar) + { + MakeAsChar(&p->opt[posMem]) + p->opt[posMem].posPrev = posMem - 1; + if (p->opt[cur].prev2) + { + p->opt[posMem - 1].prev1IsChar = False; + p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2; + p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2; + } + } + { + UInt32 posPrev = posMem; + UInt32 backCur = backMem; + + backMem = p->opt[posPrev].backPrev; + posMem = p->opt[posPrev].posPrev; + + p->opt[posPrev].backPrev = backCur; + p->opt[posPrev].posPrev = cur; + cur = posPrev; + } + } + while (cur != 0); + *backRes = p->opt[0].backPrev; + p->optimumCurrentIndex = p->opt[0].posPrev; + return p->optimumCurrentIndex; +} + +#define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300) + +static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes) +{ + UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; + UInt32 matchPrice, repMatchPrice, normalMatchPrice; + UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS]; + UInt32 *matches; + const Byte *data; + Byte curByte, matchByte; + if (p->optimumEndIndex != p->optimumCurrentIndex) + { + const COptimal *opt = &p->opt[p->optimumCurrentIndex]; + UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex; + *backRes = opt->backPrev; + p->optimumCurrentIndex = opt->posPrev; + return lenRes; + } + p->optimumCurrentIndex = p->optimumEndIndex = 0; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLength; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + if (numAvail < 2) + { + *backRes = (UInt32)(-1); + return 1; + } + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + repMaxIndex = 0; + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 lenTest; + const Byte *data2; + reps[i] = p->reps[i]; + data2 = data - (reps[i] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + { + repLens[i] = 0; + continue; + } + for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); + repLens[i] = lenTest; + if (lenTest > repLens[repMaxIndex]) + repMaxIndex = i; + } + if (repLens[repMaxIndex] >= p->numFastBytes) + { + UInt32 lenRes; + *backRes = repMaxIndex; + lenRes = repLens[repMaxIndex]; + MovePos(p, lenRes - 1); + return lenRes; + } + + matches = p->matches; + if (mainLen >= p->numFastBytes) + { + *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; + MovePos(p, mainLen - 1); + return mainLen; + } + curByte = *data; + matchByte = *(data - (reps[0] + 1)); + + if (mainLen < 2 && curByte != matchByte && repLens[repMaxIndex] < 2) + { + *backRes = (UInt32)-1; + return 1; + } + + p->opt[0].state = (CState)p->state; + + posState = (position & p->pbMask); + + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + + (!IsCharState(p->state) ? + LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + } + + MakeAsChar(&p->opt[1]); + + matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); + + if (matchByte == curByte) + { + UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); + if (shortRepPrice < p->opt[1].price) + { + p->opt[1].price = shortRepPrice; + MakeAsShortRep(&p->opt[1]); + } + } + lenEnd = ((mainLen >= repLens[repMaxIndex]) ? mainLen : repLens[repMaxIndex]); + + if (lenEnd < 2) + { + *backRes = p->opt[1].backPrev; + return 1; + } + + p->opt[1].posPrev = 0; + for (i = 0; i < LZMA_NUM_REPS; i++) + p->opt[0].backs[i] = reps[i]; + + len = lenEnd; + do + p->opt[len--].price = kInfinityPrice; + while (len >= 2); + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 repLen = repLens[i]; + UInt32 price; + if (repLen < 2) + continue; + price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState); + do + { + UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; + COptimal *opt = &p->opt[repLen]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = 0; + opt->backPrev = i; + opt->prev1IsChar = False; + } + } + while (--repLen >= 2); + } + + normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); + + len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2); + if (len <= mainLen) + { + UInt32 offs = 0; + while (len > matches[offs]) + offs += 2; + for (; ; len++) + { + COptimal *opt; + UInt32 distance = matches[offs + 1]; + + UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; + UInt32 lenToPosState = GetLenToPosState(len); + if (distance < kNumFullDistances) + curAndLenPrice += p->distancesPrices[lenToPosState][distance]; + else + { + UInt32 slot; + GetPosSlot2(distance, slot); + curAndLenPrice += p->alignPrices[distance & kAlignMask] + p->posSlotPrices[lenToPosState][slot]; + } + opt = &p->opt[len]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = 0; + opt->backPrev = distance + LZMA_NUM_REPS; + opt->prev1IsChar = False; + } + if (len == matches[offs]) + { + offs += 2; + if (offs == numPairs) + break; + } + } + } + + cur = 0; + + #ifdef SHOW_STAT2 + if (position >= 0) + { + unsigned i; + printf("\n pos = %4X", position); + for (i = cur; i <= lenEnd; i++) + printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price); + } + #endif + + for (;;) + { + UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; + UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice; + Bool nextIsChar; + Byte curByte, matchByte; + const Byte *data; + COptimal *curOpt; + COptimal *nextOpt; + + cur++; + if (cur == lenEnd) + return Backward(p, backRes, cur); + + newLen = ReadMatchDistances(p, &numPairs); + if (newLen >= p->numFastBytes) + { + p->numPairs = numPairs; + p->longestMatchLength = newLen; + return Backward(p, backRes, cur); + } + position++; + curOpt = &p->opt[cur]; + posPrev = curOpt->posPrev; + if (curOpt->prev1IsChar) + { + posPrev--; + if (curOpt->prev2) + { + state = p->opt[curOpt->posPrev2].state; + if (curOpt->backPrev2 < LZMA_NUM_REPS) + state = kRepNextStates[state]; + else + state = kMatchNextStates[state]; + } + else + state = p->opt[posPrev].state; + state = kLiteralNextStates[state]; + } + else + state = p->opt[posPrev].state; + if (posPrev == cur - 1) + { + if (IsShortRep(curOpt)) + state = kShortRepNextStates[state]; + else + state = kLiteralNextStates[state]; + } + else + { + UInt32 pos; + const COptimal *prevOpt; + if (curOpt->prev1IsChar && curOpt->prev2) + { + posPrev = curOpt->posPrev2; + pos = curOpt->backPrev2; + state = kRepNextStates[state]; + } + else + { + pos = curOpt->backPrev; + if (pos < LZMA_NUM_REPS) + state = kRepNextStates[state]; + else + state = kMatchNextStates[state]; + } + prevOpt = &p->opt[posPrev]; + if (pos < LZMA_NUM_REPS) + { + UInt32 i; + reps[0] = prevOpt->backs[pos]; + for (i = 1; i <= pos; i++) + reps[i] = prevOpt->backs[i - 1]; + for (; i < LZMA_NUM_REPS; i++) + reps[i] = prevOpt->backs[i]; + } + else + { + UInt32 i; + reps[0] = (pos - LZMA_NUM_REPS); + for (i = 1; i < LZMA_NUM_REPS; i++) + reps[i] = prevOpt->backs[i - 1]; + } + } + curOpt->state = (CState)state; + + curOpt->backs[0] = reps[0]; + curOpt->backs[1] = reps[1]; + curOpt->backs[2] = reps[2]; + curOpt->backs[3] = reps[3]; + + curPrice = curOpt->price; + nextIsChar = False; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + curByte = *data; + matchByte = *(data - (reps[0] + 1)); + + posState = (position & p->pbMask); + + curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]); + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + curAnd1Price += + (!IsCharState(state) ? + LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + } + + nextOpt = &p->opt[cur + 1]; + + if (curAnd1Price < nextOpt->price) + { + nextOpt->price = curAnd1Price; + nextOpt->posPrev = cur; + MakeAsChar(nextOpt); + nextIsChar = True; + } + + matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]); + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); + + if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0)) + { + UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); + if (shortRepPrice <= nextOpt->price) + { + nextOpt->price = shortRepPrice; + nextOpt->posPrev = cur; + MakeAsShortRep(nextOpt); + nextIsChar = True; + } + } + numAvailFull = p->numAvail; + { + UInt32 temp = kNumOpts - 1 - cur; + if (temp < numAvailFull) + numAvailFull = temp; + } + + if (numAvailFull < 2) + continue; + numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); + + if (!nextIsChar && matchByte != curByte) /* speed optimization */ + { + /* try Literal + rep0 */ + UInt32 temp; + UInt32 lenTest2; + const Byte *data2 = data - (reps[0] + 1); + UInt32 limit = p->numFastBytes + 1; + if (limit > numAvailFull) + limit = numAvailFull; + + for (temp = 1; temp < limit && data[temp] == data2[temp]; temp++); + lenTest2 = temp - 1; + if (lenTest2 >= 2) + { + UInt32 state2 = kLiteralNextStates[state]; + UInt32 posStateNext = (position + 1) & p->pbMask; + UInt32 nextRepMatchPrice = curAnd1Price + + GET_PRICE_1(p->isMatch[state2][posStateNext]) + + GET_PRICE_1(p->isRep[state2]); + /* for (; lenTest2 >= 2; lenTest2--) */ + { + UInt32 curAndLenPrice; + COptimal *opt; + UInt32 offset = cur + 1 + lenTest2; + while (lenEnd < offset) + p->opt[++lenEnd].price = kInfinityPrice; + curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); + opt = &p->opt[offset]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur + 1; + opt->backPrev = 0; + opt->prev1IsChar = True; + opt->prev2 = False; + } + } + } + } + + startLen = 2; /* speed optimization */ + { + UInt32 repIndex; + for (repIndex = 0; repIndex < LZMA_NUM_REPS; repIndex++) + { + UInt32 lenTest; + UInt32 lenTestTemp; + UInt32 price; + const Byte *data2 = data - (reps[repIndex] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); + while (lenEnd < cur + lenTest) + p->opt[++lenEnd].price = kInfinityPrice; + lenTestTemp = lenTest; + price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState); + do + { + UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; + COptimal *opt = &p->opt[cur + lenTest]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur; + opt->backPrev = repIndex; + opt->prev1IsChar = False; + } + } + while (--lenTest >= 2); + lenTest = lenTestTemp; + + if (repIndex == 0) + startLen = lenTest + 1; + + /* if (_maxMode) */ + { + UInt32 lenTest2 = lenTest + 1; + UInt32 limit = lenTest2 + p->numFastBytes; + UInt32 nextRepMatchPrice; + if (limit > numAvailFull) + limit = numAvailFull; + for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); + lenTest2 -= lenTest + 1; + if (lenTest2 >= 2) + { + UInt32 state2 = kRepNextStates[state]; + UInt32 posStateNext = (position + lenTest) & p->pbMask; + UInt32 curAndLenCharPrice = + price + p->repLenEnc.prices[posState][lenTest - 2] + + GET_PRICE_0(p->isMatch[state2][posStateNext]) + + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), + data[lenTest], data2[lenTest], p->ProbPrices); + state2 = kLiteralNextStates[state2]; + posStateNext = (position + lenTest + 1) & p->pbMask; + nextRepMatchPrice = curAndLenCharPrice + + GET_PRICE_1(p->isMatch[state2][posStateNext]) + + GET_PRICE_1(p->isRep[state2]); + + /* for (; lenTest2 >= 2; lenTest2--) */ + { + UInt32 curAndLenPrice; + COptimal *opt; + UInt32 offset = cur + lenTest + 1 + lenTest2; + while (lenEnd < offset) + p->opt[++lenEnd].price = kInfinityPrice; + curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); + opt = &p->opt[offset]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur + lenTest + 1; + opt->backPrev = 0; + opt->prev1IsChar = True; + opt->prev2 = True; + opt->posPrev2 = cur; + opt->backPrev2 = repIndex; + } + } + } + } + } + } + /* for (UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */ + if (newLen > numAvail) + { + newLen = numAvail; + for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); + matches[numPairs] = newLen; + numPairs += 2; + } + if (newLen >= startLen) + { + UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); + UInt32 offs, curBack, posSlot; + UInt32 lenTest; + while (lenEnd < cur + newLen) + p->opt[++lenEnd].price = kInfinityPrice; + + offs = 0; + while (startLen > matches[offs]) + offs += 2; + curBack = matches[offs + 1]; + GetPosSlot2(curBack, posSlot); + for (lenTest = /*2*/ startLen; ; lenTest++) + { + UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN]; + UInt32 lenToPosState = GetLenToPosState(lenTest); + COptimal *opt; + if (curBack < kNumFullDistances) + curAndLenPrice += p->distancesPrices[lenToPosState][curBack]; + else + curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask]; + + opt = &p->opt[cur + lenTest]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur; + opt->backPrev = curBack + LZMA_NUM_REPS; + opt->prev1IsChar = False; + } + + if (/*_maxMode && */lenTest == matches[offs]) + { + /* Try Match + Literal + Rep0 */ + const Byte *data2 = data - (curBack + 1); + UInt32 lenTest2 = lenTest + 1; + UInt32 limit = lenTest2 + p->numFastBytes; + UInt32 nextRepMatchPrice; + if (limit > numAvailFull) + limit = numAvailFull; + for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); + lenTest2 -= lenTest + 1; + if (lenTest2 >= 2) + { + UInt32 state2 = kMatchNextStates[state]; + UInt32 posStateNext = (position + lenTest) & p->pbMask; + UInt32 curAndLenCharPrice = curAndLenPrice + + GET_PRICE_0(p->isMatch[state2][posStateNext]) + + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), + data[lenTest], data2[lenTest], p->ProbPrices); + state2 = kLiteralNextStates[state2]; + posStateNext = (posStateNext + 1) & p->pbMask; + nextRepMatchPrice = curAndLenCharPrice + + GET_PRICE_1(p->isMatch[state2][posStateNext]) + + GET_PRICE_1(p->isRep[state2]); + + /* for (; lenTest2 >= 2; lenTest2--) */ + { + UInt32 offset = cur + lenTest + 1 + lenTest2; + UInt32 curAndLenPrice; + COptimal *opt; + while (lenEnd < offset) + p->opt[++lenEnd].price = kInfinityPrice; + curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); + opt = &p->opt[offset]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur + lenTest + 1; + opt->backPrev = 0; + opt->prev1IsChar = True; + opt->prev2 = True; + opt->posPrev2 = cur; + opt->backPrev2 = curBack + LZMA_NUM_REPS; + } + } + } + offs += 2; + if (offs == numPairs) + break; + curBack = matches[offs + 1]; + if (curBack >= kNumFullDistances) + GetPosSlot2(curBack, posSlot); + } + } + } + } +} + +#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) + +static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes) +{ + UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i; + const Byte *data; + const UInt32 *matches; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLength; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + *backRes = (UInt32)-1; + if (numAvail < 2) + return 1; + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + + repLen = repIndex = 0; + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 len; + const Byte *data2 = data - (p->reps[i] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + for (len = 2; len < numAvail && data[len] == data2[len]; len++); + if (len >= p->numFastBytes) + { + *backRes = i; + MovePos(p, len - 1); + return len; + } + if (len > repLen) + { + repIndex = i; + repLen = len; + } + } + + matches = p->matches; + if (mainLen >= p->numFastBytes) + { + *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; + MovePos(p, mainLen - 1); + return mainLen; + } + + mainDist = 0; /* for GCC */ + if (mainLen >= 2) + { + mainDist = matches[numPairs - 1]; + while (numPairs > 2 && mainLen == matches[numPairs - 4] + 1) + { + if (!ChangePair(matches[numPairs - 3], mainDist)) + break; + numPairs -= 2; + mainLen = matches[numPairs - 2]; + mainDist = matches[numPairs - 1]; + } + if (mainLen == 2 && mainDist >= 0x80) + mainLen = 1; + } + + if (repLen >= 2 && ( + (repLen + 1 >= mainLen) || + (repLen + 2 >= mainLen && mainDist >= (1 << 9)) || + (repLen + 3 >= mainLen && mainDist >= (1 << 15)))) + { + *backRes = repIndex; + MovePos(p, repLen - 1); + return repLen; + } + + if (mainLen < 2 || numAvail <= 2) + return 1; + + p->longestMatchLength = ReadMatchDistances(p, &p->numPairs); + if (p->longestMatchLength >= 2) + { + UInt32 newDistance = matches[p->numPairs - 1]; + if ((p->longestMatchLength >= mainLen && newDistance < mainDist) || + (p->longestMatchLength == mainLen + 1 && !ChangePair(mainDist, newDistance)) || + (p->longestMatchLength > mainLen + 1) || + (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist))) + return 1; + } + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 len, limit; + const Byte *data2 = data - (p->reps[i] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + limit = mainLen - 1; + for (len = 2; len < limit && data[len] == data2[len]; len++); + if (len >= limit) + return 1; + } + *backRes = mainDist + LZMA_NUM_REPS; + MovePos(p, mainLen - 2); + return mainLen; +} + +static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) +{ + UInt32 len; + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); + p->state = kMatchNextStates[p->state]; + len = LZMA_MATCH_LEN_MIN; + LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1); + RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits); + RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); +} + +static SRes CheckErrors(CLzmaEnc *p) +{ + if (p->result != SZ_OK) + return p->result; + if (p->rc.res != SZ_OK) + p->result = SZ_ERROR_WRITE; + if (p->matchFinderBase.result != SZ_OK) + p->result = SZ_ERROR_READ; + if (p->result != SZ_OK) + p->finished = True; + return p->result; +} + +static SRes Flush(CLzmaEnc *p, UInt32 nowPos) +{ + /* ReleaseMFStream(); */ + p->finished = True; + if (p->writeEndMark) + WriteEndMarker(p, nowPos & p->pbMask); + RangeEnc_FlushData(&p->rc); + RangeEnc_FlushStream(&p->rc); + return CheckErrors(p); +} + +static void FillAlignPrices(CLzmaEnc *p) +{ + UInt32 i; + for (i = 0; i < kAlignTableSize; i++) + p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); + p->alignPriceCount = 0; +} + +static void FillDistancesPrices(CLzmaEnc *p) +{ + UInt32 tempPrices[kNumFullDistances]; + UInt32 i, lenToPosState; + for (i = kStartPosModelIndex; i < kNumFullDistances; i++) + { + UInt32 posSlot = GetPosSlot1(i); + UInt32 footerBits = ((posSlot >> 1) - 1); + UInt32 base = ((2 | (posSlot & 1)) << footerBits); + tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base - posSlot - 1, footerBits, i - base, p->ProbPrices); + } + + for (lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++) + { + UInt32 posSlot; + const CLzmaProb *encoder = p->posSlotEncoder[lenToPosState]; + UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState]; + for (posSlot = 0; posSlot < p->distTableSize; posSlot++) + posSlotPrices[posSlot] = RcTree_GetPrice(encoder, kNumPosSlotBits, posSlot, p->ProbPrices); + for (posSlot = kEndPosModelIndex; posSlot < p->distTableSize; posSlot++) + posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << kNumBitPriceShiftBits); + + { + UInt32 *distancesPrices = p->distancesPrices[lenToPosState]; + UInt32 i; + for (i = 0; i < kStartPosModelIndex; i++) + distancesPrices[i] = posSlotPrices[i]; + for (; i < kNumFullDistances; i++) + distancesPrices[i] = posSlotPrices[GetPosSlot1(i)] + tempPrices[i]; + } + } + p->matchPriceCount = 0; +} + +void LzmaEnc_Construct(CLzmaEnc *p) +{ + RangeEnc_Construct(&p->rc); + MatchFinder_Construct(&p->matchFinderBase); + #ifdef COMPRESS_MF_MT + MatchFinderMt_Construct(&p->matchFinderMt); + p->matchFinderMt.MatchFinder = &p->matchFinderBase; + #endif + + { + CLzmaEncProps props; + LzmaEncProps_Init(&props); + LzmaEnc_SetProps(p, &props); + } + + #ifndef LZMA_LOG_BSR + LzmaEnc_FastPosInit(p->g_FastPos); + #endif + + LzmaEnc_InitPriceTables(p->ProbPrices); + p->litProbs = 0; + p->saveState.litProbs = 0; +} + +CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc) +{ + void *p; + p = alloc->Alloc(alloc, sizeof(CLzmaEnc)); + if (p != 0) + LzmaEnc_Construct((CLzmaEnc *)p); + return p; +} + +void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->litProbs); + alloc->Free(alloc, p->saveState.litProbs); + p->litProbs = 0; + p->saveState.litProbs = 0; +} + +void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + #ifdef COMPRESS_MF_MT + MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); + #endif + MatchFinder_Free(&p->matchFinderBase, allocBig); + LzmaEnc_FreeLits(p, alloc); + RangeEnc_Free(&p->rc, alloc); +} + +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); + alloc->Free(alloc, p); +} + +static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackSize) +{ + UInt32 nowPos32, startPos32; + if (p->inStream != 0) + { + p->matchFinderBase.stream = p->inStream; + p->matchFinder.Init(p->matchFinderObj); + p->inStream = 0; + } + + if (p->finished) + return p->result; + RINOK(CheckErrors(p)); + + nowPos32 = (UInt32)p->nowPos64; + startPos32 = nowPos32; + + if (p->nowPos64 == 0) + { + UInt32 numPairs; + Byte curByte; + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + return Flush(p, nowPos32); + ReadMatchDistances(p, &numPairs); + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0); + p->state = kLiteralNextStates[p->state]; + curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset); + LitEnc_Encode(&p->rc, p->litProbs, curByte); + p->additionalOffset--; + nowPos32++; + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) + for (;;) + { + UInt32 pos, len, posState; + + if (p->fastMode) + len = GetOptimumFast(p, &pos); + else + len = GetOptimum(p, nowPos32, &pos); + + #ifdef SHOW_STAT2 + printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos); + #endif + + posState = nowPos32 & p->pbMask; + if (len == 1 && pos == (UInt32)-1) + { + Byte curByte; + CLzmaProb *probs; + const Byte *data; + + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; + curByte = *data; + probs = LIT_PROBS(nowPos32, *(data - 1)); + if (IsCharState(p->state)) + LitEnc_Encode(&p->rc, probs, curByte); + else + LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1)); + p->state = kLiteralNextStates[p->state]; + } + else + { + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); + if (pos < LZMA_NUM_REPS) + { + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1); + if (pos == 0) + { + RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0); + RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); + } + else + { + UInt32 distance = p->reps[pos]; + RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1); + if (pos == 1) + RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0); + else + { + RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1); + RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2); + if (pos == 3) + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + } + p->reps[1] = p->reps[0]; + p->reps[0] = distance; + } + if (len == 1) + p->state = kShortRepNextStates[p->state]; + else + { + LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + p->state = kRepNextStates[p->state]; + } + } + else + { + UInt32 posSlot; + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); + p->state = kMatchNextStates[p->state]; + LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + pos -= LZMA_NUM_REPS; + GetPosSlot(pos, posSlot); + RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); + + if (posSlot >= kStartPosModelIndex) + { + UInt32 footerBits = ((posSlot >> 1) - 1); + UInt32 base = ((2 | (posSlot & 1)) << footerBits); + UInt32 posReduced = pos - base; + + if (posSlot < kEndPosModelIndex) + RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced); + else + { + RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); + RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); + p->alignPriceCount++; + } + } + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + p->reps[1] = p->reps[0]; + p->reps[0] = pos; + p->matchPriceCount++; + } + } + p->additionalOffset -= len; + nowPos32 += len; + if (p->additionalOffset == 0) + { + UInt32 processed; + if (!p->fastMode) + { + if (p->matchPriceCount >= (1 << 7)) + FillDistancesPrices(p); + if (p->alignPriceCount >= kAlignTableSize) + FillAlignPrices(p); + } + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + break; + processed = nowPos32 - startPos32; + if (useLimits) + { + if (processed + kNumOpts + 300 >= maxUnpackSize || + RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize) + break; + } + else if (processed >= (1 << 15)) + { + p->nowPos64 += nowPos32 - startPos32; + return CheckErrors(p); + } + } + } + p->nowPos64 += nowPos32 - startPos32; + return Flush(p, nowPos32); +} + +#define kBigHashDicLimit ((UInt32)1 << 24) + +static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + UInt32 beforeSize = kNumOpts; + Bool btMode; + if (!RangeEnc_Alloc(&p->rc, alloc)) + return SZ_ERROR_MEM; + btMode = (p->matchFinderBase.btMode != 0); + #ifdef COMPRESS_MF_MT + p->mtMode = (p->multiThread && !p->fastMode && btMode); + #endif + + { + unsigned lclp = p->lc + p->lp; + if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp) + { + LzmaEnc_FreeLits(p, alloc); + p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); + p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); + if (p->litProbs == 0 || p->saveState.litProbs == 0) + { + LzmaEnc_FreeLits(p, alloc); + return SZ_ERROR_MEM; + } + p->lclp = lclp; + } + } + + p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit); + + if (beforeSize + p->dictSize < keepWindowSize) + beforeSize = keepWindowSize - p->dictSize; + + #ifdef COMPRESS_MF_MT + if (p->mtMode) + { + RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)); + p->matchFinderObj = &p->matchFinderMt; + MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); + } + else + #endif + { + if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) + return SZ_ERROR_MEM; + p->matchFinderObj = &p->matchFinderBase; + MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); + } + return SZ_OK; +} + +void LzmaEnc_Init(CLzmaEnc *p) +{ + UInt32 i; + p->state = 0; + for (i = 0 ; i < LZMA_NUM_REPS; i++) + p->reps[i] = 0; + + RangeEnc_Init(&p->rc); + + + for (i = 0; i < kNumStates; i++) + { + UInt32 j; + for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) + { + p->isMatch[i][j] = kProbInitValue; + p->isRep0Long[i][j] = kProbInitValue; + } + p->isRep[i] = kProbInitValue; + p->isRepG0[i] = kProbInitValue; + p->isRepG1[i] = kProbInitValue; + p->isRepG2[i] = kProbInitValue; + } + + { + UInt32 num = 0x300 << (p->lp + p->lc); + for (i = 0; i < num; i++) + p->litProbs[i] = kProbInitValue; + } + + { + for (i = 0; i < kNumLenToPosStates; i++) + { + CLzmaProb *probs = p->posSlotEncoder[i]; + UInt32 j; + for (j = 0; j < (1 << kNumPosSlotBits); j++) + probs[j] = kProbInitValue; + } + } + { + for (i = 0; i < kNumFullDistances - kEndPosModelIndex; i++) + p->posEncoders[i] = kProbInitValue; + } + + LenEnc_Init(&p->lenEnc.p); + LenEnc_Init(&p->repLenEnc.p); + + for (i = 0; i < (1 << kNumAlignBits); i++) + p->posAlignEncoder[i] = kProbInitValue; + + p->optimumEndIndex = 0; + p->optimumCurrentIndex = 0; + p->additionalOffset = 0; + + p->pbMask = (1 << p->pb) - 1; + p->lpMask = (1 << p->lp) - 1; +} + +void LzmaEnc_InitPrices(CLzmaEnc *p) +{ + if (!p->fastMode) + { + FillDistancesPrices(p); + FillAlignPrices(p); + } + + p->lenEnc.tableSize = + p->repLenEnc.tableSize = + p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices); + LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices); +} + +static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + UInt32 i; + for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++) + if (p->dictSize <= ((UInt32)1 << i)) + break; + p->distTableSize = i * 2; + + p->finished = False; + p->result = SZ_OK; + RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + p->nowPos64 = 0; + return SZ_OK; +} + +static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqInStream *inStream, ISeqOutStream *outStream, + ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->inStream = inStream; + p->rc.outStream = outStream; + return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); +} + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, + ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->inStream = inStream; + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) +{ + p->seqBufInStream.funcTable.Read = MyRead; + p->seqBufInStream.data = src; + p->seqBufInStream.rem = srcLen; +} + +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + LzmaEnc_SetInputBuf(p, src, srcLen); + p->inStream = &p->seqBufInStream.funcTable; + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +void LzmaEnc_Finish(CLzmaEncHandle pp) +{ + #ifdef COMPRESS_MF_MT + CLzmaEnc *p = (CLzmaEnc *)pp; + if (p->mtMode) + MatchFinderMt_ReleaseStream(&p->matchFinderMt); + #else + pp = pp; + #endif +} + +typedef struct _CSeqOutStreamBuf +{ + ISeqOutStream funcTable; + Byte *data; + SizeT rem; + Bool overflow; +} CSeqOutStreamBuf; + +static size_t MyWrite(void *pp, const void *data, size_t size) +{ + CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp; + if (p->rem < size) + { + size = p->rem; + p->overflow = True; + } + memcpy(p->data, data, size); + p->rem -= size; + p->data += size; + return size; +} + + +UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); +} + +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; +} + +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + UInt64 nowPos64; + SRes res; + CSeqOutStreamBuf outStream; + + outStream.funcTable.Write = MyWrite; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = False; + p->finished = False; + p->result = SZ_OK; + + if (reInit) + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + nowPos64 = p->nowPos64; + RangeEnc_Init(&p->rc); + p->rc.outStream = &outStream.funcTable; + + res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize); + + *unpackSize = (UInt32)(p->nowPos64 - nowPos64); + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + + return res; +} + +SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, + ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + SRes res = SZ_OK; + + #ifdef COMPRESS_MF_MT + Byte allocaDummy[0x300]; + int i = 0; + for (i = 0; i < 16; i++) + allocaDummy[i] = (Byte)i; + #endif + + RINOK(LzmaEnc_Prepare(pp, inStream, outStream, alloc, allocBig)); + + for (;;) + { + res = LzmaEnc_CodeOneBlock(p, False, 0, 0); + if (res != SZ_OK || p->finished != 0) + break; + if (progress != 0) + { + res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); + if (res != SZ_OK) + { + res = SZ_ERROR_PROGRESS; + break; + } + } + } + LzmaEnc_Finish(pp); + return res; +} + +SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + int i; + UInt32 dictSize = p->dictSize; + if (*size < LZMA_PROPS_SIZE) + return SZ_ERROR_PARAM; + *size = LZMA_PROPS_SIZE; + props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); + + for (i = 11; i <= 30; i++) + { + if (dictSize <= ((UInt32)2 << i)) + { + dictSize = (2 << i); + break; + } + if (dictSize <= ((UInt32)3 << i)) + { + dictSize = (3 << i); + break; + } + } + + for (i = 0; i < 4; i++) + props[1 + i] = (Byte)(dictSize >> (8 * i)); + return SZ_OK; +} + +SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + SRes res; + CLzmaEnc *p = (CLzmaEnc *)pp; + + CSeqOutStreamBuf outStream; + + LzmaEnc_SetInputBuf(p, src, srcLen); + + outStream.funcTable.Write = MyWrite; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = writeEndMark; + res = LzmaEnc_Encode(pp, &outStream.funcTable, &p->seqBufInStream.funcTable, + progress, alloc, allocBig); + + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + return res; +} + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); + SRes res; + if (p == 0) + return SZ_ERROR_MEM; + + res = LzmaEnc_SetProps(p, props); + if (res == SZ_OK) + { + res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); + if (res == SZ_OK) + res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, + writeEndMark, progress, alloc, allocBig); + } + + LzmaEnc_Destroy(p, alloc, allocBig); + return res; +} diff --git a/extern/lzma/LzmaEnc.h b/extern/lzma/LzmaEnc.h new file mode 100644 index 00000000000..bfbc7d2b9c3 --- /dev/null +++ b/extern/lzma/LzmaEnc.h @@ -0,0 +1,72 @@ +/* LzmaEnc.h -- LZMA Encoder +2008-10-04 : Igor Pavlov : Public domain */ + +#ifndef __LZMAENC_H +#define __LZMAENC_H + +#include "Types.h" + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaEncProps +{ + int level; /* 0 <= level <= 9 */ + UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version + (1 << 12) <= dictSize <= (1 << 30) for 64-bit version + default = (1 << 24) */ + int lc; /* 0 <= lc <= 8, default = 3 */ + int lp; /* 0 <= lp <= 4, default = 0 */ + int pb; /* 0 <= pb <= 4, default = 2 */ + int algo; /* 0 - fast, 1 - normal, default = 1 */ + int fb; /* 5 <= fb <= 273, default = 32 */ + int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ + int numHashBytes; /* 2, 3 or 4, default = 4 */ + UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ + unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ + int numThreads; /* 1 or 2, default = 2 */ +} CLzmaEncProps; + +void LzmaEncProps_Init(CLzmaEncProps *p); +void LzmaEncProps_Normalize(CLzmaEncProps *p); +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); + + +/* ---------- CLzmaEncHandle Interface ---------- */ + +/* LzmaEnc_* functions can return the following exit codes: +Returns: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - Write callback error. + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +typedef void * CLzmaEncHandle; + +CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc); +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig); +SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); +SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); +SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); +SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); + +/* ---------- One Call Interface ---------- */ + +/* LzmaEncode +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); + +#endif diff --git a/extern/lzma/LzmaLib.c b/extern/lzma/LzmaLib.c new file mode 100644 index 00000000000..02a511857c9 --- /dev/null +++ b/extern/lzma/LzmaLib.c @@ -0,0 +1,46 @@ +/* LzmaLib.c -- LZMA library wrapper +2008-08-05 +Igor Pavlov +Public domain */ + +#include "LzmaEnc.h" +#include "LzmaDec.h" +#include "Alloc.h" +#include "LzmaLib.h" + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, + unsigned char *outProps, size_t *outPropsSize, + int level, /* 0 <= level <= 9, default = 5 */ + unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ + int lc, /* 0 <= lc <= 8, default = 3 */ + int lp, /* 0 <= lp <= 4, default = 0 */ + int pb, /* 0 <= pb <= 4, default = 2 */ + int fb, /* 5 <= fb <= 273, default = 32 */ + int numThreads /* 1 or 2, default = 2 */ +) +{ + CLzmaEncProps props; + LzmaEncProps_Init(&props); + props.level = level; + props.dictSize = dictSize; + props.lc = lc; + props.lp = lp; + props.pb = pb; + props.fb = fb; + props.numThreads = numThreads; + + return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, + NULL, &g_Alloc, &g_Alloc); +} + + +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, + const unsigned char *props, size_t propsSize) +{ + ELzmaStatus status; + return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); +} diff --git a/extern/lzma/LzmaLib.h b/extern/lzma/LzmaLib.h new file mode 100644 index 00000000000..5c9eeec73ca --- /dev/null +++ b/extern/lzma/LzmaLib.h @@ -0,0 +1,135 @@ +/* LzmaLib.h -- LZMA library interface +2008-08-05 +Igor Pavlov +Public domain */ + +#ifndef __LZMALIB_H +#define __LZMALIB_H + +#include "Types.h" + +#ifdef __cplusplus + #define MY_EXTERN_C extern "C" +#else + #define MY_EXTERN_C extern +#endif + +#define MY_STDAPI MY_EXTERN_C int MY_STD_CALL + +#define LZMA_PROPS_SIZE 5 + +/* +RAM requirements for LZMA: + for compression: (dictSize * 11.5 + 6 MB) + state_size + for decompression: dictSize + state_size + state_size = (4 + (1.5 << (lc + lp))) KB + by default (lc=3, lp=0), state_size = 16 KB. + +LZMA properties (5 bytes) format + Offset Size Description + 0 1 lc, lp and pb in encoded form. + 1 4 dictSize (little endian). +*/ + +/* +LzmaCompress +------------ + +outPropsSize - + In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. + Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. + + LZMA Encoder will use defult values for any parameter, if it is + -1 for any from: level, loc, lp, pb, fb, numThreads + 0 for dictSize + +level - compression level: 0 <= level <= 9; + + level dictSize algo fb + 0: 16 KB 0 32 + 1: 64 KB 0 32 + 2: 256 KB 0 32 + 3: 1 MB 0 32 + 4: 4 MB 0 32 + 5: 16 MB 1 32 + 6: 32 MB 1 32 + 7+: 64 MB 1 64 + + The default value for "level" is 5. + + algo = 0 means fast method + algo = 1 means normal method + +dictSize - The dictionary size in bytes. The maximum value is + 128 MB = (1 << 27) bytes for 32-bit version + 1 GB = (1 << 30) bytes for 64-bit version + The default value is 16 MB = (1 << 24) bytes. + It's recommended to use the dictionary that is larger than 4 KB and + that can be calculated as (1 << N) or (3 << N) sizes. + +lc - The number of literal context bits (high bits of previous literal). + It can be in the range from 0 to 8. The default value is 3. + Sometimes lc=4 gives the gain for big files. + +lp - The number of literal pos bits (low bits of current position for literals). + It can be in the range from 0 to 4. The default value is 0. + The lp switch is intended for periodical data when the period is equal to 2^lp. + For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's + better to set lc=0, if you change lp switch. + +pb - The number of pos bits (low bits of current position). + It can be in the range from 0 to 4. The default value is 2. + The pb switch is intended for periodical data when the period is equal 2^pb. + +fb - Word size (the number of fast bytes). + It can be in the range from 5 to 273. The default value is 32. + Usually, a big number gives a little bit better compression ratio and + slower compression process. + +numThreads - The number of thereads. 1 or 2. The default value is 2. + Fast mode (algo = 0) can use only 1 thread. + +Out: + destLen - processed output size +Returns: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, + unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */ + int level, /* 0 <= level <= 9, default = 5 */ + unsigned dictSize, /* default = (1 << 24) */ + int lc, /* 0 <= lc <= 8, default = 3 */ + int lp, /* 0 <= lp <= 4, default = 0 */ + int pb, /* 0 <= pb <= 4, default = 2 */ + int fb, /* 5 <= fb <= 273, default = 32 */ + int numThreads /* 1 or 2, default = 2 */ + ); + +/* +LzmaUncompress +-------------- +In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size +Out: + destLen - processed output size + srcLen - processed input size +Returns: + SZ_OK - OK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation arror + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) +*/ + +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, + const unsigned char *props, size_t propsSize); + +#endif diff --git a/extern/lzma/Makefile b/extern/lzma/Makefile new file mode 100644 index 00000000000..11d70dc7847 --- /dev/null +++ b/extern/lzma/Makefile @@ -0,0 +1,46 @@ +# +# $Id$ +# +# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. The Blender +# Foundation also sells licenses for use in proprietary software under +# the Blender License. See http://www.blender.org/BL/ for information +# about this. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): +# +# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# +# + +LIBNAME = lzma +DIR = $(OCGDIR)/extern/$(LIBNAME) + +include nan_compile.mk + +install: $(ALL_OR_DEBUG) + @[ -d $(NAN_LZMA) ] || mkdir -p $(NAN_LZMA) + @[ -d $(NAN_LZMA)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_LZMA)/lib/$(DEBUG_DIR) + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_LZMA)/lib/$(DEBUG_DIR) +ifeq ($(OS),darwin) + ranlib $(NAN_LZMA)/lib/$(DEBUG_DIR)lib$(LIBNAME).a +endif + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh *.h $(NAN_LZMA) diff --git a/extern/lzma/SConscript b/extern/lzma/SConscript new file mode 100644 index 00000000000..015cdfe339f --- /dev/null +++ b/extern/lzma/SConscript @@ -0,0 +1,9 @@ +#!/usr/bin/python +Import ('env') + +sources = env.Glob('./*.c') + +defs = '' +incs = ' . ' + +env.BlenderLib ('bf_lzma', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] ) diff --git a/extern/lzma/Types.h b/extern/lzma/Types.h new file mode 100644 index 00000000000..1af5cfc4d86 --- /dev/null +++ b/extern/lzma/Types.h @@ -0,0 +1,208 @@ +/* Types.h -- Basic types +2008-11-23 : Igor Pavlov : Public domain */ + +#ifndef __7Z_TYPES_H +#define __7Z_TYPES_H + +#include + +#ifdef _WIN32 +#include +#endif + +#define SZ_OK 0 + +#define SZ_ERROR_DATA 1 +#define SZ_ERROR_MEM 2 +#define SZ_ERROR_CRC 3 +#define SZ_ERROR_UNSUPPORTED 4 +#define SZ_ERROR_PARAM 5 +#define SZ_ERROR_INPUT_EOF 6 +#define SZ_ERROR_OUTPUT_EOF 7 +#define SZ_ERROR_READ 8 +#define SZ_ERROR_WRITE 9 +#define SZ_ERROR_PROGRESS 10 +#define SZ_ERROR_FAIL 11 +#define SZ_ERROR_THREAD 12 + +#define SZ_ERROR_ARCHIVE 16 +#define SZ_ERROR_NO_ARCHIVE 17 + +typedef int SRes; + +#ifdef _WIN32 +typedef DWORD WRes; +#else +typedef int WRes; +#endif + +#ifndef RINOK +#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } +#endif + +typedef unsigned char Byte; +typedef short Int16; +typedef unsigned short UInt16; + +#ifdef _LZMA_UINT32_IS_ULONG +typedef long Int32; +typedef unsigned long UInt32; +#else +typedef int Int32; +typedef unsigned int UInt32; +#endif + +#ifdef _SZ_NO_INT_64 + +/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. + NOTES: Some code will work incorrectly in that case! */ + +typedef long Int64; +typedef unsigned long UInt64; + +#else + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#else +typedef long long int Int64; +typedef unsigned long long int UInt64; +#endif + +#endif + +#ifdef _LZMA_NO_SYSTEM_SIZE_T +typedef UInt32 SizeT; +#else +typedef size_t SizeT; +#endif + +typedef int Bool; +#define True 1 +#define False 0 + + +#ifdef _MSC_VER + +#if _MSC_VER >= 1300 +#define MY_NO_INLINE __declspec(noinline) +#else +#define MY_NO_INLINE +#endif + +#define MY_CDECL __cdecl +#define MY_STD_CALL __stdcall +#define MY_FAST_CALL MY_NO_INLINE __fastcall + +#else + +#define MY_CDECL +#define MY_STD_CALL +#define MY_FAST_CALL + +#endif + + +/* The following interfaces use first parameter as pointer to structure */ + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) < input(*size)) is allowed */ +} ISeqInStream; + +/* it can return SZ_ERROR_INPUT_EOF */ +SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); +SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); +SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); + +typedef struct +{ + size_t (*Write)(void *p, const void *buf, size_t size); + /* Returns: result - the number of actually written bytes. + (result < size) means error */ +} ISeqOutStream; + +typedef enum +{ + SZ_SEEK_SET = 0, + SZ_SEEK_CUR = 1, + SZ_SEEK_END = 2 +} ESzSeek; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ISeekInStream; + +typedef struct +{ + SRes (*Look)(void *p, void **buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) > input(*size)) is not allowed + (output(*size) < input(*size)) is allowed */ + SRes (*Skip)(void *p, size_t offset); + /* offset must be <= output(*size) of Look */ + + SRes (*Read)(void *p, void *buf, size_t *size); + /* reads directly (without buffer). It's same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ILookInStream; + +SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); +SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset); + +/* reads via ILookInStream::Read */ +SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); +SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); + +#define LookToRead_BUF_SIZE (1 << 14) + +typedef struct +{ + ILookInStream s; + ISeekInStream *realStream; + size_t pos; + size_t size; + Byte buf[LookToRead_BUF_SIZE]; +} CLookToRead; + +void LookToRead_CreateVTable(CLookToRead *p, int lookahead); +void LookToRead_Init(CLookToRead *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToLook; + +void SecToLook_CreateVTable(CSecToLook *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToRead; + +void SecToRead_CreateVTable(CSecToRead *p); + +typedef struct +{ + SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize); + /* Returns: result. (result != SZ_OK) means break. + Value (UInt64)(Int64)-1 for size means unknown value. */ +} ICompressProgress; + +typedef struct +{ + void *(*Alloc)(void *p, size_t size); + void (*Free)(void *p, void *address); /* address can be 0 */ +} ISzAlloc; + +#define IAlloc_Alloc(p, size) (p)->Alloc((p), size) +#define IAlloc_Free(p, a) (p)->Free((p), a) + +#endif diff --git a/extern/lzma/history.txt b/extern/lzma/history.txt new file mode 100644 index 00000000000..014186717da --- /dev/null +++ b/extern/lzma/history.txt @@ -0,0 +1,236 @@ +HISTORY of the LZMA SDK +----------------------- + +4.65 2009-02-03 +------------------------- +- Some minor fixes + + +4.63 2008-12-31 +------------------------- +- Some minor fixes + + +4.61 beta 2008-11-23 +------------------------- +- The bug in ANSI-C LZMA Decoder was fixed: + If encoded stream was corrupted, decoder could access memory + outside of allocated range. +- Some changes in ANSI-C 7z Decoder interfaces. +- LZMA SDK is placed in the public domain. + + +4.60 beta 2008-08-19 +------------------------- +- Some minor fixes. + + +4.59 beta 2008-08-13 +------------------------- +- The bug was fixed: + LZMA Encoder in fast compression mode could access memory outside of + allocated range in some rare cases. + + +4.58 beta 2008-05-05 +------------------------- +- ANSI-C LZMA Decoder was rewritten for speed optimizations. +- ANSI-C LZMA Encoder was included to LZMA SDK. +- C++ LZMA code now is just wrapper over ANSI-C code. + + +4.57 2007-12-12 +------------------------- +- Speed optimizations in Ñ++ LZMA Decoder. +- Small changes for more compatibility with some C/C++ compilers. + + +4.49 beta 2007-07-05 +------------------------- +- .7z ANSI-C Decoder: + - now it supports BCJ and BCJ2 filters + - now it supports files larger than 4 GB. + - now it supports "Last Write Time" field for files. +- C++ code for .7z archives compressing/decompressing from 7-zip + was included to LZMA SDK. + + +4.43 2006-06-04 +------------------------- +- Small changes for more compatibility with some C/C++ compilers. + + +4.42 2006-05-15 +------------------------- +- Small changes in .h files in ANSI-C version. + + +4.39 beta 2006-04-14 +------------------------- +- The bug in versions 4.33b:4.38b was fixed: + C++ version of LZMA encoder could not correctly compress + files larger than 2 GB with HC4 match finder (-mfhc4). + + +4.37 beta 2005-04-06 +------------------------- +- Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined. + + +4.35 beta 2005-03-02 +------------------------- +- The bug was fixed in C++ version of LZMA Decoder: + If encoded stream was corrupted, decoder could access memory + outside of allocated range. + + +4.34 beta 2006-02-27 +------------------------- +- Compressing speed and memory requirements for compressing were increased +- LZMA now can use only these match finders: HC4, BT2, BT3, BT4 + + +4.32 2005-12-09 +------------------------- +- Java version of LZMA SDK was included + + +4.30 2005-11-20 +------------------------- +- Compression ratio was improved in -a2 mode +- Speed optimizations for compressing in -a2 mode +- -fb switch now supports values up to 273 +- The bug in 7z_C (7zIn.c) was fixed: + It used Alloc/Free functions from different memory pools. + So if program used two memory pools, it worked incorrectly. +- 7z_C: .7z format supporting was improved +- LZMA# SDK (C#.NET version) was included + + +4.27 (Updated) 2005-09-21 +------------------------- +- Some GUIDs/interfaces in C++ were changed. + IStream.h: + ISequentialInStream::Read now works as old ReadPart + ISequentialOutStream::Write now works as old WritePart + + +4.27 2005-08-07 +------------------------- +- The bug in LzmaDecodeSize.c was fixed: + if _LZMA_IN_CB and _LZMA_OUT_READ were defined, + decompressing worked incorrectly. + + +4.26 2005-08-05 +------------------------- +- Fixes in 7z_C code and LzmaTest.c: + previous versions could work incorrectly, + if malloc(0) returns 0 + + +4.23 2005-06-29 +------------------------- +- Small fixes in C++ code + + +4.22 2005-06-10 +------------------------- +- Small fixes + + +4.21 2005-06-08 +------------------------- +- Interfaces for ANSI-C LZMA Decoder (LzmaDecode.c) were changed +- New additional version of ANSI-C LZMA Decoder with zlib-like interface: + - LzmaStateDecode.h + - LzmaStateDecode.c + - LzmaStateTest.c +- ANSI-C LZMA Decoder now can decompress files larger than 4 GB + + +4.17 2005-04-18 +------------------------- +- New example for RAM->RAM compressing/decompressing: + LZMA + BCJ (filter for x86 code): + - LzmaRam.h + - LzmaRam.cpp + - LzmaRamDecode.h + - LzmaRamDecode.c + - -f86 switch for lzma.exe + + +4.16 2005-03-29 +------------------------- +- The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): + If _LZMA_OUT_READ was defined, and if encoded stream was corrupted, + decoder could access memory outside of allocated range. +- Speed optimization of ANSI-C LZMA Decoder (now it's about 20% faster). + Old version of LZMA Decoder now is in file LzmaDecodeSize.c. + LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c +- Small speed optimization in LZMA C++ code +- filter for SPARC's code was added +- Simplified version of .7z ANSI-C Decoder was included + + +4.06 2004-09-05 +------------------------- +- The bug in v4.05 was fixed: + LZMA-Encoder didn't release output stream in some cases. + + +4.05 2004-08-25 +------------------------- +- Source code of filters for x86, IA-64, ARM, ARM-Thumb + and PowerPC code was included to SDK +- Some internal minor changes + + +4.04 2004-07-28 +------------------------- +- More compatibility with some C++ compilers + + +4.03 2004-06-18 +------------------------- +- "Benchmark" command was added. It measures compressing + and decompressing speed and shows rating values. + Also it checks hardware errors. + + +4.02 2004-06-10 +------------------------- +- C++ LZMA Encoder/Decoder code now is more portable + and it can be compiled by GCC on Linux. + + +4.01 2004-02-15 +------------------------- +- Some detection of data corruption was enabled. + LzmaDecode.c / RangeDecoderReadByte + ..... + { + rd->ExtraBytes = 1; + return 0xFF; + } + + +4.00 2004-02-13 +------------------------- +- Original version of LZMA SDK + + + +HISTORY of the LZMA +------------------- + 2001-2008: Improvements to LZMA compressing/decompressing code, + keeping compatibility with original LZMA format + 1996-2001: Development of LZMA compression format + + Some milestones: + + 2001-08-30: LZMA compression was added to 7-Zip + 1999-01-02: First version of 7-Zip was released + + +End of document diff --git a/extern/lzma/lzma.txt b/extern/lzma/lzma.txt new file mode 100644 index 00000000000..715792d6c17 --- /dev/null +++ b/extern/lzma/lzma.txt @@ -0,0 +1,594 @@ +LZMA SDK 4.65 +------------- + +LZMA SDK provides the documentation, samples, header files, libraries, +and tools you need to develop applications that use LZMA compression. + +LZMA is default and general compression method of 7z format +in 7-Zip compression program (www.7-zip.org). LZMA provides high +compression ratio and very fast decompression. + +LZMA is an improved version of famous LZ77 compression algorithm. +It was improved in way of maximum increasing of compression ratio, +keeping high decompression speed and low memory requirements for +decompressing. + + + +LICENSE +------- + +LZMA SDK is written and placed in the public domain by Igor Pavlov. + + +LZMA SDK Contents +----------------- + +LZMA SDK includes: + + - ANSI-C/C++/C#/Java source code for LZMA compressing and decompressing + - Compiled file->file LZMA compressing/decompressing program for Windows system + + +UNIX/Linux version +------------------ +To compile C++ version of file->file LZMA encoding, go to directory +C++/7zip/Compress/LZMA_Alone +and call make to recompile it: + make -f makefile.gcc clean all + +In some UNIX/Linux versions you must compile LZMA with static libraries. +To compile with static libraries, you can use +LIB = -lm -static + + +Files +--------------------- +lzma.txt - LZMA SDK description (this file) +7zFormat.txt - 7z Format description +7zC.txt - 7z ANSI-C Decoder description +methods.txt - Compression method IDs for .7z +lzma.exe - Compiled file->file LZMA encoder/decoder for Windows +history.txt - history of the LZMA SDK + + +Source code structure +--------------------- + +C/ - C files + 7zCrc*.* - CRC code + Alloc.* - Memory allocation functions + Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code + LzFind.* - Match finder for LZ (LZMA) encoders + LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding + LzHash.h - Additional file for LZ match finder + LzmaDec.* - LZMA decoding + LzmaEnc.* - LZMA encoding + LzmaLib.* - LZMA Library for DLL calling + Types.h - Basic types for another .c files + Threads.* - The code for multithreading. + + LzmaLib - LZMA Library (.DLL for Windows) + + LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder). + + Archive - files related to archiving + 7z - 7z ANSI-C Decoder + +CPP/ -- CPP files + + Common - common files for C++ projects + Windows - common files for Windows related code + + 7zip - files related to 7-Zip Project + + Common - common files for 7-Zip + + Compress - files related to compression/decompression + + Copy - Copy coder + RangeCoder - Range Coder (special code of compression/decompression) + LZMA - LZMA compression/decompression on C++ + LZMA_Alone - file->file LZMA compression/decompression + Branch - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code + + Archive - files related to archiving + + Common - common files for archive handling + 7z - 7z C++ Encoder/Decoder + + Bundles - Modules that are bundles of other modules + + Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2 + Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2 + Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2. + + UI - User Interface files + + Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll + Common - Common UI files + Console - Code for console archiver + + + +CS/ - C# files + 7zip + Common - some common files for 7-Zip + Compress - files related to compression/decompression + LZ - files related to LZ (Lempel-Ziv) compression algorithm + LZMA - LZMA compression/decompression + LzmaAlone - file->file LZMA compression/decompression + RangeCoder - Range Coder (special code of compression/decompression) + +Java/ - Java files + SevenZip + Compression - files related to compression/decompression + LZ - files related to LZ (Lempel-Ziv) compression algorithm + LZMA - LZMA compression/decompression + RangeCoder - Range Coder (special code of compression/decompression) + + +C/C++ source code of LZMA SDK is part of 7-Zip project. +7-Zip source code can be downloaded from 7-Zip's SourceForge page: + + http://sourceforge.net/projects/sevenzip/ + + + +LZMA features +------------- + - Variable dictionary size (up to 1 GB) + - Estimated compressing speed: about 2 MB/s on 2 GHz CPU + - Estimated decompressing speed: + - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64 + - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC + - Small memory requirements for decompressing (16 KB + DictionarySize) + - Small code size for decompressing: 5-8 KB + +LZMA decoder uses only integer operations and can be +implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions). + +Some critical operations that affect the speed of LZMA decompression: + 1) 32*16 bit integer multiply + 2) Misspredicted branches (penalty mostly depends from pipeline length) + 3) 32-bit shift and arithmetic operations + +The speed of LZMA decompressing mostly depends from CPU speed. +Memory speed has no big meaning. But if your CPU has small data cache, +overall weight of memory speed will slightly increase. + + +How To Use +---------- + +Using LZMA encoder/decoder executable +-------------------------------------- + +Usage: LZMA inputFile outputFile [...] + + e: encode file + + d: decode file + + b: Benchmark. There are two tests: compressing and decompressing + with LZMA method. Benchmark shows rating in MIPS (million + instructions per second). Rating value is calculated from + measured speed and it is normalized with Intel's Core 2 results. + Also Benchmark checks possible hardware errors (RAM + errors in most cases). Benchmark uses these settings: + (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. + Also you can change the number of iterations. Example for 30 iterations: + LZMA b 30 + Default number of iterations is 10. + + + + + -a{N}: set compression mode 0 = fast, 1 = normal + default: 1 (normal) + + d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB) + The maximum value for dictionary size is 1 GB = 2^30 bytes. + Dictionary size is calculated as DictionarySize = 2^N bytes. + For decompressing file compressed by LZMA method with dictionary + size D = 2^N you need about D bytes of memory (RAM). + + -fb{N}: set number of fast bytes - [5, 273], default: 128 + Usually big number gives a little bit better compression ratio + and slower compression process. + + -lc{N}: set number of literal context bits - [0, 8], default: 3 + Sometimes lc=4 gives gain for big files. + + -lp{N}: set number of literal pos bits - [0, 4], default: 0 + lp switch is intended for periodical data when period is + equal 2^N. For example, for 32-bit (4 bytes) + periodical data you can use lp=2. Often it's better to set lc0, + if you change lp switch. + + -pb{N}: set number of pos bits - [0, 4], default: 2 + pb switch is intended for periodical data + when period is equal 2^N. + + -mf{MF_ID}: set Match Finder. Default: bt4. + Algorithms from hc* group doesn't provide good compression + ratio, but they often works pretty fast in combination with + fast mode (-a0). + + Memory requirements depend from dictionary size + (parameter "d" in table below). + + MF_ID Memory Description + + bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing. + bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing. + bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing. + hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing. + + -eos: write End Of Stream marker. By default LZMA doesn't write + eos marker, since LZMA decoder knows uncompressed size + stored in .lzma file header. + + -si: Read data from stdin (it will write End Of Stream marker). + -so: Write data to stdout + + +Examples: + +1) LZMA e file.bin file.lzma -d16 -lc0 + +compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) +and 0 literal context bits. -lc0 allows to reduce memory requirements +for decompression. + + +2) LZMA e file.bin file.lzma -lc0 -lp2 + +compresses file.bin to file.lzma with settings suitable +for 32-bit periodical data (for example, ARM or MIPS code). + +3) LZMA d file.lzma file.bin + +decompresses file.lzma to file.bin. + + +Compression ratio hints +----------------------- + +Recommendations +--------------- + +To increase the compression ratio for LZMA compressing it's desirable +to have aligned data (if it's possible) and also it's desirable to locate +data in such order, where code is grouped in one place and data is +grouped in other place (it's better than such mixing: code, data, code, +data, ...). + + +Filters +------- +You can increase the compression ratio for some data types, using +special filters before compressing. For example, it's possible to +increase the compression ratio on 5-10% for code for those CPU ISAs: +x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC. + +You can find C source code of such filters in C/Bra*.* files + +You can check the compression ratio gain of these filters with such +7-Zip commands (example for ARM code): +No filter: + 7z a a1.7z a.bin -m0=lzma + +With filter for little-endian ARM code: + 7z a a2.7z a.bin -m0=arm -m1=lzma + +It works in such manner: +Compressing = Filter_encoding + LZMA_encoding +Decompressing = LZMA_decoding + Filter_decoding + +Compressing and decompressing speed of such filters is very high, +so it will not increase decompressing time too much. +Moreover, it reduces decompression time for LZMA_decoding, +since compression ratio with filtering is higher. + +These filters convert CALL (calling procedure) instructions +from relative offsets to absolute addresses, so such data becomes more +compressible. + +For some ISAs (for example, for MIPS) it's impossible to get gain from such filter. + + +LZMA compressed file format +--------------------------- +Offset Size Description + 0 1 Special LZMA properties (lc,lp, pb in encoded form) + 1 4 Dictionary size (little endian) + 5 8 Uncompressed size (little endian). -1 means unknown size + 13 Compressed data + + +ANSI-C LZMA Decoder +~~~~~~~~~~~~~~~~~~~ + +Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58. +If you want to use old interfaces you can download previous version of LZMA SDK +from sourceforge.net site. + +To use ANSI-C LZMA Decoder you need the following files: +1) LzmaDec.h + LzmaDec.c + Types.h +LzmaUtil/LzmaUtil.c is example application that uses these files. + + +Memory requirements for LZMA decoding +------------------------------------- + +Stack usage of LZMA decoding function for local variables is not +larger than 200-400 bytes. + +LZMA Decoder uses dictionary buffer and internal state structure. +Internal state structure consumes + state_size = (4 + (1.5 << (lc + lp))) KB +by default (lc=3, lp=0), state_size = 16 KB. + + +How To decompress data +---------------------- + +LZMA Decoder (ANSI-C version) now supports 2 interfaces: +1) Single-call Decompressing +2) Multi-call State Decompressing (zlib-like interface) + +You must use external allocator: +Example: +void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); } +void SzFree(void *p, void *address) { p = p; free(address); } +ISzAlloc alloc = { SzAlloc, SzFree }; + +You can use p = p; operator to disable compiler warnings. + + +Single-call Decompressing +------------------------- +When to use: RAM->RAM decompressing +Compile files: LzmaDec.h + LzmaDec.c + Types.h +Compile defines: no defines +Memory Requirements: + - Input buffer: compressed size + - Output buffer: uncompressed size + - LZMA Internal Structures: state_size (16 KB for default settings) + +Interface: + int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc); + In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size + propData - LZMA properties (5 bytes) + propSize - size of propData buffer (5 bytes) + finishMode - It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + You can use LZMA_FINISH_END, when you know that + current output buffer covers last bytes of stream. + alloc - Memory allocator. + + Out: + destLen - processed output size + srcLen - processed input size + + Output: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). + + If LZMA decoder sees end_marker before reaching output limit, it returns OK result, + and output value of destLen will be less than output buffer size limit. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + + +Multi-call State Decompressing (zlib-like interface) +---------------------------------------------------- + +When to use: file->file decompressing +Compile files: LzmaDec.h + LzmaDec.c + Types.h + +Memory Requirements: + - Buffer for input stream: any size (for example, 16 KB) + - Buffer for output stream: any size (for example, 16 KB) + - LZMA Internal Structures: state_size (16 KB for default settings) + - LZMA dictionary (dictionary size is encoded in LZMA properties header) + +1) read LZMA properties (5 bytes) and uncompressed size (8 bytes, little-endian) to header: + unsigned char header[LZMA_PROPS_SIZE + 8]; + ReadFile(inFile, header, sizeof(header) + +2) Allocate CLzmaDec structures (state + dictionary) using LZMA properties + + CLzmaDec state; + LzmaDec_Constr(&state); + res = LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc); + if (res != SZ_OK) + return res; + +3) Init LzmaDec structure before any new LZMA stream. And call LzmaDec_DecodeToBuf in loop + + LzmaDec_Init(&state); + for (;;) + { + ... + int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode); + ... + } + + +4) Free all allocated structures + LzmaDec_Free(&state, &g_Alloc); + +For full code example, look at C/LzmaUtil/LzmaUtil.c code. + + +How To compress data +-------------------- + +Compile files: LzmaEnc.h + LzmaEnc.c + Types.h + +LzFind.c + LzFind.h + LzFindMt.c + LzFindMt.h + LzHash.h + +Memory Requirements: + - (dictSize * 11.5 + 6 MB) + state_size + +Lzma Encoder can use two memory allocators: +1) alloc - for small arrays. +2) allocBig - for big arrays. + +For example, you can use Large RAM Pages (2 MB) in allocBig allocator for +better compression speed. Note that Windows has bad implementation for +Large RAM Pages. +It's OK to use same allocator for alloc and allocBig. + + +Single-call Compression with callbacks +-------------------------------------- + +Check C/LzmaUtil/LzmaUtil.c as example, + +When to use: file->file decompressing + +1) you must implement callback structures for interfaces: +ISeqInStream +ISeqOutStream +ICompressProgress +ISzAlloc + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + + CFileSeqInStream inStream; + CFileSeqOutStream outStream; + + inStream.funcTable.Read = MyRead; + inStream.file = inFile; + outStream.funcTable.Write = MyWrite; + outStream.file = outFile; + + +2) Create CLzmaEncHandle object; + + CLzmaEncHandle enc; + + enc = LzmaEnc_Create(&g_Alloc); + if (enc == 0) + return SZ_ERROR_MEM; + + +3) initialize CLzmaEncProps properties; + + LzmaEncProps_Init(&props); + + Then you can change some properties in that structure. + +4) Send LZMA properties to LZMA Encoder + + res = LzmaEnc_SetProps(enc, &props); + +5) Write encoded properties to header + + Byte header[LZMA_PROPS_SIZE + 8]; + size_t headerSize = LZMA_PROPS_SIZE; + UInt64 fileSize; + int i; + + res = LzmaEnc_WriteProperties(enc, header, &headerSize); + fileSize = MyGetFileLength(inFile); + for (i = 0; i < 8; i++) + header[headerSize++] = (Byte)(fileSize >> (8 * i)); + MyWriteFileAndCheck(outFile, header, headerSize) + +6) Call encoding function: + res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, + NULL, &g_Alloc, &g_Alloc); + +7) Destroy LZMA Encoder Object + LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc); + + +If callback function return some error code, LzmaEnc_Encode also returns that code. + + +Single-call RAM->RAM Compression +-------------------------------- + +Single-call RAM->RAM Compression is similar to Compression with callbacks, +but you provide pointers to buffers instead of pointers to stream callbacks: + +HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); + +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) + + + +LZMA Defines +------------ + +_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code. + +_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for + some structures will be doubled in that case. + +_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit. + +_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type. + + +C++ LZMA Encoder/Decoder +~~~~~~~~~~~~~~~~~~~~~~~~ +C++ LZMA code use COM-like interfaces. So if you want to use it, +you can study basics of COM/OLE. +C++ LZMA code is just wrapper over ANSI-C code. + + +C++ Notes +~~~~~~~~~~~~~~~~~~~~~~~~ +If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling), +you must check that you correctly work with "new" operator. +7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator. +So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator: +operator new(size_t size) +{ + void *p = ::malloc(size); + if (p == 0) + throw CNewException(); + return p; +} +If you use MSCV that throws exception for "new" operator, you can compile without +"NewHandler.cpp". So standard exception will be used. Actually some code of +7-Zip catches any exception in internal code and converts it to HRESULT code. +So you don't need to catch CNewException, if you call COM interfaces of 7-Zip. + +--- + +http://www.7-zip.org +http://www.7-zip.org/sdk.html +http://www.7-zip.org/support.html diff --git a/extern/lzma/make/msvc_9_0/lzma.vcproj b/extern/lzma/make/msvc_9_0/lzma.vcproj new file mode 100644 index 00000000000..ec0676f6ca6 --- /dev/null +++ b/extern/lzma/make/msvc_9_0/lzma.vcproj @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/lzo/CMakeLists.txt b/extern/lzo/CMakeLists.txt new file mode 100644 index 00000000000..b640cf658da --- /dev/null +++ b/extern/lzo/CMakeLists.txt @@ -0,0 +1,34 @@ +# $Id$ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Daniel Genrich +# +# ***** END GPL LICENSE BLOCK ***** + +SET(INC include) + +FILE(GLOB SRC minilzo/*.c) + + + +BLENDERLIB(bf_minilzo "${SRC}" "${INC}") +#, libtype='blender', priority = 0 ) diff --git a/extern/lzo/SConscript b/extern/lzo/SConscript new file mode 100644 index 00000000000..81bedad25d8 --- /dev/null +++ b/extern/lzo/SConscript @@ -0,0 +1,9 @@ +#!/usr/bin/python +Import ('env') + +sources = env.Glob('minilzo/*.c') + +defs = '' +incs = ' include ' + +env.BlenderLib ('bf_minilzo', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] ) diff --git a/extern/lzo/make/msvc_9_0/lzo.vcproj b/extern/lzo/make/msvc_9_0/lzo.vcproj new file mode 100644 index 00000000000..80516ef964e --- /dev/null +++ b/extern/lzo/make/msvc_9_0/lzo.vcproj @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/lzo/minilzo/COPYING b/extern/lzo/minilzo/COPYING new file mode 100644 index 00000000000..5ee49f42e91 --- /dev/null +++ b/extern/lzo/minilzo/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/extern/lzo/minilzo/Makefile b/extern/lzo/minilzo/Makefile new file mode 100644 index 00000000000..8f3d5042579 --- /dev/null +++ b/extern/lzo/minilzo/Makefile @@ -0,0 +1,40 @@ +# +# $Id: +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2009 Blender Foundation +# All rights reserved. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** + +LIBNAME = minilzo +DIR = $(OCGDIR)/extern/$(LIBNAME) + +include nan_compile.mk + +install: $(ALL_OR_DEBUG) + @[ -d $(NAN_LZO) ] || mkdir -p $(NAN_LZO) + @[ -d $(NAN_LZO)/minilzo ] || mkdir -p $(NAN_LZO)/minilzo + @[ -d $(NAN_LZO)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_LZO)/lib/$(DEBUG_DIR) + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_LZO)/lib/$(DEBUG_DIR) +ifeq ($(OS),darwin) + ranlib $(NAN_LZO)/lib/$(DEBUG_DIR)lib$(LIBNAME).a +endif + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh *.h $(NAN_LZO)/minilzo diff --git a/extern/lzo/minilzo/README.LZO b/extern/lzo/minilzo/README.LZO new file mode 100644 index 00000000000..3700f28e310 --- /dev/null +++ b/extern/lzo/minilzo/README.LZO @@ -0,0 +1,123 @@ + + ============================================================================ + miniLZO -- mini subset of the LZO real-time data compression library + ============================================================================ + + Author : Markus Franz Xaver Johannes Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + Version : 2.03 + Date : 30 Apr 2008 + + I've created miniLZO for projects where it is inconvenient to + include (or require) the full LZO source code just because you + want to add a little bit of data compression to your application. + + miniLZO implements the LZO1X-1 compressor and both the standard and + safe LZO1X decompressor. Apart from fast compression it also useful + for situations where you want to use pre-compressed data files (which + must have been compressed with LZO1X-999). + + miniLZO consists of one C source file and three header files: + minilzo.c + minilzo.h, lzoconf.h, lzodefs.h + + To use miniLZO just copy these files into your source directory, add + minilzo.c to your Makefile and #include minilzo.h from your program. + Note: you also must distribute this file (`README.LZO') with your project. + + minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and + the sources are about 30 kB when packed with zip - so there's no more + excuse that your application doesn't support data compression :-) + + For more information, documentation, example programs and other support + files (like Makefiles and build scripts) please download the full LZO + package from + http://www.oberhumer.com/opensource/lzo/ + + Have fun, + Markus + + + P.S. minilzo.c is generated automatically from the LZO sources and + therefore functionality is completely identical + + + Appendix A: building miniLZO + ---------------------------- + miniLZO is written such a way that it should compile and run + out-of-the-box on most machines. + + If you are running on a very unusual architecture and lzo_init() fails then + you should first recompile with `-DLZO_DEBUG' to see what causes the failure. + The most probable case is something like `sizeof(char *) != sizeof(long)'. + After identifying the problem you can compile by adding some defines + like `-DSIZEOF_CHAR_P=8' to your Makefile. + + The best solution is (of course) using Autoconf - if your project uses + Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler + flags when compiling minilzo.c. See the LZO distribution for an example + how to set up configure.in. + + + Appendix B: list of public functions available in miniLZO + --------------------------------------------------------- + Library initialization + lzo_init() + + Compression + lzo1x_1_compress() + + Decompression + lzo1x_decompress() + lzo1x_decompress_safe() + + Checksum functions + lzo_adler32() + + Version functions + lzo_version() + lzo_version_string() + lzo_version_date() + + Portable (but slow) string functions + lzo_memcmp() + lzo_memcpy() + lzo_memmove() + lzo_memset() + + + Appendix C: suggested macros for `configure.in' when using Autoconf + ------------------------------------------------------------------- + Checks for typedefs and structures + AC_CHECK_TYPE(ptrdiff_t,long) + AC_TYPE_SIZE_T + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + AC_CHECK_SIZEOF(__int64) + AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(size_t) + AC_CHECK_SIZEOF(ptrdiff_t) + + Checks for compiler characteristics + AC_C_CONST + + Checks for library functions + AC_CHECK_FUNCS(memcmp memcpy memmove memset) + + + Appendix D: Copyright + --------------------- + LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer + + LZO and miniLZO are distributed under the terms of the GNU General + Public License (GPL). See the file COPYING. + + Special licenses for commercial and other applications which + are not willing to accept the GNU General Public License + are available by contacting the author. + + diff --git a/extern/lzo/minilzo/lzoconf.h b/extern/lzo/minilzo/lzoconf.h new file mode 100644 index 00000000000..cc437f1ebfe --- /dev/null +++ b/extern/lzo/minilzo/lzoconf.h @@ -0,0 +1,417 @@ +/* lzoconf.h -- configuration for the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __LZOCONF_H_INCLUDED +#define __LZOCONF_H_INCLUDED + +#define LZO_VERSION 0x2030 +#define LZO_VERSION_STRING "2.03" +#define LZO_VERSION_DATE "Apr 30 2008" + +/* internal Autoconf configuration file - only used when building LZO */ +#if defined(LZO_HAVE_CONFIG_H) +# include +#endif +#include +#include + + +/*********************************************************************** +// LZO requires a conforming +************************************************************************/ + +#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +# error "invalid CHAR_BIT" +#endif +#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) +# error "check your compiler installation" +#endif +#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) +# error "your limits.h macros are broken" +#endif + +/* get OS and architecture defines */ +#ifndef __LZODEFS_H_INCLUDED +#include "lzodefs.h" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// some core defines +************************************************************************/ + +#if !defined(LZO_UINT32_C) +# if (UINT_MAX < LZO_0xffffffffL) +# define LZO_UINT32_C(c) c ## UL +# else +# define LZO_UINT32_C(c) ((c) + 0U) +# endif +#endif + +/* memory checkers */ +#if !defined(__LZO_CHECKER) +# if defined(__BOUNDS_CHECKING_ON) +# define __LZO_CHECKER 1 +# elif defined(__CHECKER__) +# define __LZO_CHECKER 1 +# elif defined(__INSURE__) +# define __LZO_CHECKER 1 +# elif defined(__PURIFY__) +# define __LZO_CHECKER 1 +# endif +#endif + + +/*********************************************************************** +// integral and pointer types +************************************************************************/ + +/* lzo_uint should match size_t */ +#if !defined(LZO_UINT_MAX) +# if defined(LZO_ABI_LLP64) /* WIN64 */ +# if defined(LZO_OS_WIN64) + typedef unsigned __int64 lzo_uint; + typedef __int64 lzo_int; +# else + typedef unsigned long long lzo_uint; + typedef long long lzo_int; +# endif +# define LZO_UINT_MAX 0xffffffffffffffffull +# define LZO_INT_MAX 9223372036854775807LL +# define LZO_INT_MIN (-1LL - LZO_INT_MAX) +# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */ + typedef unsigned int lzo_uint; + typedef int lzo_int; +# define LZO_UINT_MAX UINT_MAX +# define LZO_INT_MAX INT_MAX +# define LZO_INT_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint; + typedef long lzo_int; +# define LZO_UINT_MAX ULONG_MAX +# define LZO_INT_MAX LONG_MAX +# define LZO_INT_MIN LONG_MIN +# else +# error "lzo_uint" +# endif +#endif + +/* Integral types with 32 bits or more. */ +#if !defined(LZO_UINT32_MAX) +# if (UINT_MAX >= LZO_0xffffffffL) + typedef unsigned int lzo_uint32; + typedef int lzo_int32; +# define LZO_UINT32_MAX UINT_MAX +# define LZO_INT32_MAX INT_MAX +# define LZO_INT32_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint32; + typedef long lzo_int32; +# define LZO_UINT32_MAX ULONG_MAX +# define LZO_INT32_MAX LONG_MAX +# define LZO_INT32_MIN LONG_MIN +# else +# error "lzo_uint32" +# endif +#endif + +/* The larger type of lzo_uint and lzo_uint32. */ +#if (LZO_UINT_MAX >= LZO_UINT32_MAX) +# define lzo_xint lzo_uint +#else +# define lzo_xint lzo_uint32 +#endif + +/* Memory model that allows to access memory at offsets of lzo_uint. */ +#if !defined(__LZO_MMODEL) +# if (LZO_UINT_MAX <= UINT_MAX) +# define __LZO_MMODEL +# elif defined(LZO_HAVE_MM_HUGE_PTR) +# define __LZO_MMODEL_HUGE 1 +# define __LZO_MMODEL __huge +# else +# define __LZO_MMODEL +# endif +#endif + +/* no typedef here because of const-pointer issues */ +#define lzo_bytep unsigned char __LZO_MMODEL * +#define lzo_charp char __LZO_MMODEL * +#define lzo_voidp void __LZO_MMODEL * +#define lzo_shortp short __LZO_MMODEL * +#define lzo_ushortp unsigned short __LZO_MMODEL * +#define lzo_uint32p lzo_uint32 __LZO_MMODEL * +#define lzo_int32p lzo_int32 __LZO_MMODEL * +#define lzo_uintp lzo_uint __LZO_MMODEL * +#define lzo_intp lzo_int __LZO_MMODEL * +#define lzo_xintp lzo_xint __LZO_MMODEL * +#define lzo_voidpp lzo_voidp __LZO_MMODEL * +#define lzo_bytepp lzo_bytep __LZO_MMODEL * +/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */ +#define lzo_byte unsigned char __LZO_MMODEL + +typedef int lzo_bool; + + +/*********************************************************************** +// function types +************************************************************************/ + +/* name mangling */ +#if !defined(__LZO_EXTERN_C) +# ifdef __cplusplus +# define __LZO_EXTERN_C extern "C" +# else +# define __LZO_EXTERN_C extern +# endif +#endif + +/* calling convention */ +#if !defined(__LZO_CDECL) +# define __LZO_CDECL __lzo_cdecl +#endif + +/* DLL export information */ +#if !defined(__LZO_EXPORT1) +# define __LZO_EXPORT1 +#endif +#if !defined(__LZO_EXPORT2) +# define __LZO_EXPORT2 +#endif + +/* __cdecl calling convention for public C and assembly functions */ +#if !defined(LZO_PUBLIC) +# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +#endif +#if !defined(LZO_EXTERN) +# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) +#endif +#if !defined(LZO_PRIVATE) +# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL +#endif + +/* function types */ +typedef int +(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +typedef int +(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem, + const lzo_bytep dict, lzo_uint dict_len ); + +typedef int +(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem, + const lzo_bytep dict, lzo_uint dict_len ); + + +/* Callback interface. Currently only the progress indicator ("nprogress") + * is used, but this may change in a future release. */ + +struct lzo_callback_t; +typedef struct lzo_callback_t lzo_callback_t; +#define lzo_callback_p lzo_callback_t __LZO_MMODEL * + +/* malloc & free function types */ +typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) + (lzo_callback_p self, lzo_uint items, lzo_uint size); +typedef void (__LZO_CDECL *lzo_free_func_t) + (lzo_callback_p self, lzo_voidp ptr); + +/* a progress indicator callback function */ +typedef void (__LZO_CDECL *lzo_progress_func_t) + (lzo_callback_p, lzo_uint, lzo_uint, int); + +struct lzo_callback_t +{ + /* custom allocators (set to 0 to disable) */ + lzo_alloc_func_t nalloc; /* [not used right now] */ + lzo_free_func_t nfree; /* [not used right now] */ + + /* a progress indicator callback function (set to 0 to disable) */ + lzo_progress_func_t nprogress; + + /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress + * callbacks points back to this struct, so you are free to store + * some extra info in the following variables. */ + lzo_voidp user1; + lzo_xint user2; + lzo_xint user3; +}; + + +/*********************************************************************** +// error codes and prototypes +************************************************************************/ + +/* Error codes for the compression/decompression functions. Negative + * values are errors, positive values will be used for special but + * normal events. + */ +#define LZO_E_OK 0 +#define LZO_E_ERROR (-1) +#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ +#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ +#define LZO_E_INPUT_OVERRUN (-4) +#define LZO_E_OUTPUT_OVERRUN (-5) +#define LZO_E_LOOKBEHIND_OVERRUN (-6) +#define LZO_E_EOF_NOT_FOUND (-7) +#define LZO_E_INPUT_NOT_CONSUMED (-8) +#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ + + +#ifndef lzo_sizeof_dict_t +# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) +#endif + +/* lzo_init() should be the first function you call. + * Check the return code ! + * + * lzo_init() is a macro to allow checking that the library and the + * compiler's view of various types are consistent. + */ +#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ + (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ + (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ + (int)sizeof(lzo_callback_t)) +LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); + +/* version functions (useful for shared libraries) */ +LZO_EXTERN(unsigned) lzo_version(void); +LZO_EXTERN(const char *) lzo_version_string(void); +LZO_EXTERN(const char *) lzo_version_date(void); +LZO_EXTERN(const lzo_charp) _lzo_version_string(void); +LZO_EXTERN(const lzo_charp) _lzo_version_date(void); + +/* string functions */ +LZO_EXTERN(int) +lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); +LZO_EXTERN(lzo_voidp) +lzo_memset(lzo_voidp _s, int _c, lzo_uint _len); + +/* checksum functions */ +LZO_EXTERN(lzo_uint32) +lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len); +LZO_EXTERN(lzo_uint32) +lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len); +LZO_EXTERN(const lzo_uint32p) +lzo_get_crc32_table(void); + +/* misc. */ +LZO_EXTERN(int) _lzo_config_check(void); +typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; +typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; +typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t; + +/* align a char pointer on a boundary that is a multiple of `size' */ +LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); +#define LZO_PTR_ALIGN_UP(_ptr,_size) \ + ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size))) + + +/*********************************************************************** +// deprecated macros - only for backward compatibility with LZO v1.xx +************************************************************************/ + +#if defined(LZO_CFG_COMPAT) + +#define __LZOCONF_H 1 + +#if defined(LZO_ARCH_I086) +# define __LZO_i386 1 +#elif defined(LZO_ARCH_I386) +# define __LZO_i386 1 +#endif + +#if defined(LZO_OS_DOS16) +# define __LZO_DOS 1 +# define __LZO_DOS16 1 +#elif defined(LZO_OS_DOS32) +# define __LZO_DOS 1 +#elif defined(LZO_OS_WIN16) +# define __LZO_WIN 1 +# define __LZO_WIN16 1 +#elif defined(LZO_OS_WIN32) +# define __LZO_WIN 1 +#endif + +#define __LZO_CMODEL +#define __LZO_DMODEL +#define __LZO_ENTRY __LZO_CDECL +#define LZO_EXTERN_CDECL LZO_EXTERN +#define LZO_ALIGN LZO_PTR_ALIGN_UP + +#define lzo_compress_asm_t lzo_compress_t +#define lzo_decompress_asm_t lzo_decompress_t + +#endif /* LZO_CFG_COMPAT */ + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + + +/* vim:set ts=4 et: */ diff --git a/extern/lzo/minilzo/lzodefs.h b/extern/lzo/minilzo/lzodefs.h new file mode 100644 index 00000000000..180563723e5 --- /dev/null +++ b/extern/lzo/minilzo/lzodefs.h @@ -0,0 +1,1807 @@ +/* lzodefs.h -- architecture, OS and compiler specific defines + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __LZODEFS_H_INCLUDED +#define __LZODEFS_H_INCLUDED 1 + +#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +# define __CYGWIN__ __CYGWIN32__ +#endif +#if defined(__IBMCPP__) && !defined(__IBMC__) +# define __IBMC__ __IBMCPP__ +#endif +#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +# define __INTEL_COMPILER __ICL +#endif +#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +# define _ALL_SOURCE 1 +#endif +#if defined(__mips__) && defined(__R5900__) +# if !defined(__LONG_MAX__) +# define __LONG_MAX__ 9223372036854775807L +# endif +#endif +#if defined(__INTEL_COMPILER) && defined(__linux__) +# pragma warning(disable: 193) +#endif +#if defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif 0 && defined(__C251__) +# pragma warning disable = 322 +#endif +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if (_MSC_VER >= 1300) +# pragma warning(disable: 4668) +# endif +#endif +#if 0 && defined(__WATCOMC__) +# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +# pragma warning 203 9 +# endif +#endif +#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +# pragma option -h +#endif +#if 0 +#define LZO_0xffffL 0xfffful +#define LZO_0xffffffffL 0xfffffffful +#else +#define LZO_0xffffL 65535ul +#define LZO_0xffffffffL 4294967295ul +#endif +#if (LZO_0xffffL == LZO_0xffffffffL) +# error "your preprocessor is broken 1" +#endif +#if (16ul * 16384ul != 262144ul) +# error "your preprocessor is broken 2" +#endif +#if 0 +#if (32767 >= 4294967295ul) +# error "your preprocessor is broken 3" +#endif +#if (65535u >= 4294967295ul) +# error "your preprocessor is broken 4" +#endif +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +# if !defined(MSDOS) +# define MSDOS 1 +# endif +# if !defined(_MSDOS) +# define _MSDOS 1 +# endif +#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +# if (__VERSION == 520) && (MB_LEN_MAX == 1) +# if !defined(__AZTEC_C__) +# define __AZTEC_C__ __VERSION +# endif +# if !defined(__DOS__) +# define __DOS__ 1 +# endif +# endif +#endif +#endif +#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +# define ptrdiff_t long +# define _PTRDIFF_T_DEFINED +#endif +#if (UINT_MAX == LZO_0xffffL) +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +# if defined(__AZTEC_C__) && defined(__DOS__) +# define __LZO_RENAME_A 1 +# elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define __LZO_RENAME_A 1 +# elif (_MSC_VER < 700) +# define __LZO_RENAME_B 1 +# endif +# elif defined(__TSC__) && defined(__OS2__) +# define __LZO_RENAME_A 1 +# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +# define __LZO_RENAME_A 1 +# elif defined(__PACIFIC__) && defined(DOS) +# if !defined(__far) +# define __far far +# endif +# if !defined(__near) +# define __near near +# endif +# endif +# if defined(__LZO_RENAME_A) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__far) +# define __far far +# endif +# if !defined(__huge) +# define __huge huge +# endif +# if !defined(__near) +# define __near near +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# if !defined(__huge) +# define __huge huge +# endif +# elif defined(__LZO_RENAME_B) +# if !defined(__cdecl) +# define __cdecl _cdecl +# endif +# if !defined(__far) +# define __far _far +# endif +# if !defined(__huge) +# define __huge _huge +# endif +# if !defined(__near) +# define __near _near +# endif +# if !defined(__pascal) +# define __pascal _pascal +# endif +# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# endif +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__AZTEC_C__) && defined(__DOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +#elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# endif +# if (_MSC_VER < 700) +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# define LZO_BROKEN_SIZEOF 1 +# endif +#elif defined(__PACIFIC__) && defined(DOS) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#elif defined(__TURBOC__) && defined(__MSDOS__) +# if (__TURBOC__ < 0x0150) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# endif +# if (__TURBOC__ < 0x0200) +# define LZO_BROKEN_SIZEOF 1 +# endif +# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# endif +#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_SIZEOF 1 +#endif +#endif +#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#endif +#if defined(_CRAY) && defined(_CRAY1) +# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 +#endif +#define LZO_PP_STRINGIZE(x) #x +#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) +#define LZO_PP_CONCAT2(a,b) a ## b +#define LZO_PP_CONCAT3(a,b,c) a ## b ## c +#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) +#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) +#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) +#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) +#if 1 +#define LZO_CPP_STRINGIZE(x) #x +#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +#define LZO_CPP_CONCAT2(a,b) a ## b +#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +#endif +#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#if 1 && defined(__cplusplus) +# if !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS 1 +# endif +# if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +# endif +#endif +#if defined(__cplusplus) +# define LZO_EXTERN_C extern "C" +#else +# define LZO_EXTERN_C extern +#endif +#if !defined(__LZO_OS_OVERRIDE) +#if defined(LZO_OS_FREESTANDING) +# define LZO_INFO_OS "freestanding" +#elif defined(LZO_OS_EMBEDDED) +# define LZO_INFO_OS "embedded" +#elif 1 && defined(__IAR_SYSTEMS_ICC__) +# define LZO_OS_EMBEDDED 1 +# define LZO_INFO_OS "embedded" +#elif defined(__CYGWIN__) && defined(__GNUC__) +# define LZO_OS_CYGWIN 1 +# define LZO_INFO_OS "cygwin" +#elif defined(__EMX__) && defined(__GNUC__) +# define LZO_OS_EMX 1 +# define LZO_INFO_OS "emx" +#elif defined(__BEOS__) +# define LZO_OS_BEOS 1 +# define LZO_INFO_OS "beos" +#elif defined(__Lynx__) +# define LZO_OS_LYNXOS 1 +# define LZO_INFO_OS "lynxos" +#elif defined(__OS400__) +# define LZO_OS_OS400 1 +# define LZO_INFO_OS "os400" +#elif defined(__QNX__) +# define LZO_OS_QNX 1 +# define LZO_INFO_OS "qnx" +#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__BORLANDC__) && defined(__DPMI16__) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +#elif defined(__ZTC__) && defined(DOS386) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__OS2__) || defined(__OS2V2__) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_OS216 1 +# define LZO_INFO_OS "os216" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_OS2 1 +# define LZO_INFO_OS "os2" +# else +# error "check your limits.h header" +# endif +#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +# define LZO_OS_WIN64 1 +# define LZO_INFO_OS "win64" +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__MWERKS__) && defined(__INTEL__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_WIN16 1 +# define LZO_INFO_OS "win16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "check your limits.h header" +# endif +#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +# else +# error "check your limits.h header" +# endif +#elif defined(__WATCOMC__) +# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif defined(__NT__) && (__WATCOMC__ < 1100) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# elif defined(__linux__) || defined(__LINUX__) +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +# else +# error "please specify a target using the -bt compiler option" +# endif +#elif defined(__palmos__) +# define LZO_OS_PALMOS 1 +# define LZO_INFO_OS "palmos" +#elif defined(__TOS__) || defined(__atarist__) +# define LZO_OS_TOS 1 +# define LZO_INFO_OS "tos" +#elif defined(macintosh) && !defined(__ppc__) +# define LZO_OS_MACCLASSIC 1 +# define LZO_INFO_OS "macclassic" +#elif defined(__VMS) +# define LZO_OS_VMS 1 +# define LZO_INFO_OS "vms" +#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PS2 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "ps2" +#elif (defined(__mips__) && defined(__psp__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PSP 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "psp" +#else +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +#endif +#if (LZO_OS_POSIX) +# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +# define LZO_OS_POSIX_AIX 1 +# define LZO_INFO_OS_POSIX "aix" +# elif defined(__FreeBSD__) +# define LZO_OS_POSIX_FREEBSD 1 +# define LZO_INFO_OS_POSIX "freebsd" +# elif defined(__hpux__) || defined(__hpux) +# define LZO_OS_POSIX_HPUX 1 +# define LZO_INFO_OS_POSIX "hpux" +# elif defined(__INTERIX) +# define LZO_OS_POSIX_INTERIX 1 +# define LZO_INFO_OS_POSIX "interix" +# elif defined(__IRIX__) || defined(__irix__) +# define LZO_OS_POSIX_IRIX 1 +# define LZO_INFO_OS_POSIX "irix" +# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) +# define LZO_OS_POSIX_LINUX 1 +# define LZO_INFO_OS_POSIX "linux" +# elif defined(__APPLE__) || defined(__MACOS__) +# define LZO_OS_POSIX_MACOSX 1 +# define LZO_INFO_OS_POSIX "macosx" +# elif defined(__minix__) || defined(__minix) +# define LZO_OS_POSIX_MINIX 1 +# define LZO_INFO_OS_POSIX "minix" +# elif defined(__NetBSD__) +# define LZO_OS_POSIX_NETBSD 1 +# define LZO_INFO_OS_POSIX "netbsd" +# elif defined(__OpenBSD__) +# define LZO_OS_POSIX_OPENBSD 1 +# define LZO_INFO_OS_POSIX "openbsd" +# elif defined(__osf__) +# define LZO_OS_POSIX_OSF 1 +# define LZO_INFO_OS_POSIX "osf" +# elif defined(__solaris__) || defined(__sun) +# if defined(__SVR4) || defined(__svr4__) +# define LZO_OS_POSIX_SOLARIS 1 +# define LZO_INFO_OS_POSIX "solaris" +# else +# define LZO_OS_POSIX_SUNOS 1 +# define LZO_INFO_OS_POSIX "sunos" +# endif +# elif defined(__ultrix__) || defined(__ultrix) +# define LZO_OS_POSIX_ULTRIX 1 +# define LZO_INFO_OS_POSIX "ultrix" +# elif defined(_UNICOS) +# define LZO_OS_POSIX_UNICOS 1 +# define LZO_INFO_OS_POSIX "unicos" +# else +# define LZO_OS_POSIX_UNKNOWN 1 +# define LZO_INFO_OS_POSIX "unknown" +# endif +#endif +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (UINT_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +# define LZO_CC_CILLY 1 +# define LZO_INFO_CC "Cilly" +# if defined(__CILLY__) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +# define LZO_CC_SDCC 1 +# define LZO_INFO_CC "sdcc" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) +#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define LZO_INFO_CC "Pathscale C" +# define LZO_INFO_CCVER __PATHSCALE__ +#elif defined(__INTEL_COMPILER) +# define LZO_CC_INTELC 1 +# define LZO_INFO_CC "Intel C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) +# if defined(_WIN32) || defined(_WIN64) +# define LZO_CC_SYNTAX_MSC 1 +# else +# define LZO_CC_SYNTAX_GNUC 1 +# endif +#elif defined(__POCC__) && defined(_WIN32) +# define LZO_CC_PELLESC 1 +# define LZO_INFO_CC "Pelles C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) +#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# else +# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# endif +# define LZO_INFO_CC "llvm-gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define LZO_INFO_CC "gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__ACK__) && defined(_ACK) +# define LZO_CC_ACK 1 +# define LZO_INFO_CC "Amsterdam Compiler Kit C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__AZTEC_C__) +# define LZO_CC_AZTECC 1 +# define LZO_INFO_CC "Aztec C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) +#elif defined(__BORLANDC__) +# define LZO_CC_BORLANDC 1 +# define LZO_INFO_CC "Borland C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) +#elif defined(_CRAYC) && defined(_RELEASE) +# define LZO_CC_CRAYC 1 +# define LZO_INFO_CC "Cray C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) +#elif defined(__DMC__) && defined(__SC__) +# define LZO_CC_DMC 1 +# define LZO_INFO_CC "Digital Mars C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) +#elif defined(__DECC) +# define LZO_CC_DECC 1 +# define LZO_INFO_CC "DEC C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) +#elif defined(__HIGHC__) +# define LZO_CC_HIGHC 1 +# define LZO_INFO_CC "MetaWare High C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__IAR_SYSTEMS_ICC__) +# define LZO_CC_IARC 1 +# define LZO_INFO_CC "IAR C" +# if defined(__VER__) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(__IBMC__) +# define LZO_CC_IBMC 1 +# define LZO_INFO_CC "IBM C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) +#elif defined(__KEIL__) && defined(__C166__) +# define LZO_CC_KEILC 1 +# define LZO_INFO_CC "Keil C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) +#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +# define LZO_CC_LCCWIN32 1 +# define LZO_INFO_CC "lcc-win32" +# define LZO_INFO_CCVER "unknown" +#elif defined(__LCC__) +# define LZO_CC_LCC 1 +# define LZO_INFO_CC "lcc" +# if defined(__LCC_VERSION__) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(_MSC_VER) +# define LZO_CC_MSC 1 +# define LZO_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) +# endif +#elif defined(__MWERKS__) +# define LZO_CC_MWERKS 1 +# define LZO_INFO_CC "Metrowerks C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) +#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +# define LZO_CC_NDPC 1 +# define LZO_INFO_CC "Microway NDP C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PACIFIC__) +# define LZO_CC_PACIFICC 1 +# define LZO_INFO_CC "Pacific C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +# define LZO_CC_PGI 1 +# define LZO_INFO_CC "Portland Group PGI C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PUREC__) && defined(__TOS__) +# define LZO_CC_PUREC 1 +# define LZO_INFO_CC "Pure C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) +#elif defined(__SC__) && defined(__ZTC__) +# define LZO_CC_SYMANTECC 1 +# define LZO_INFO_CC "Symantec C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) +#elif defined(__SUNPRO_C) +# define LZO_INFO_CC "SunPro C" +# if ((__SUNPRO_C)+0 > 0) +# define LZO_CC_SUNPROC __SUNPRO_C +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) +# else +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(__SUNPRO_CC) +# define LZO_INFO_CC "SunPro C" +# if ((__SUNPRO_CC)+0 > 0) +# define LZO_CC_SUNPROC __SUNPRO_CC +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) +# else +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(__TINYC__) +# define LZO_CC_TINYC 1 +# define LZO_INFO_CC "Tiny C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) +#elif defined(__TSC__) +# define LZO_CC_TOPSPEEDC 1 +# define LZO_INFO_CC "TopSpeed C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) +#elif defined(__WATCOMC__) +# define LZO_CC_WATCOMC 1 +# define LZO_INFO_CC "Watcom C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) +#elif defined(__TURBOC__) +# define LZO_CC_TURBOC 1 +# define LZO_INFO_CC "Turbo C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) +#elif defined(__ZTC__) +# define LZO_CC_ZORTECHC 1 +# define LZO_INFO_CC "Zortech C" +# if (__ZTC__ == 0x310) +# define LZO_INFO_CCVER "0x310" +# else +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) +# endif +#else +# define LZO_CC_UNKNOWN 1 +# define LZO_INFO_CC "unknown" +# define LZO_INFO_CCVER "unknown" +#endif +#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +#endif +#if !defined(__LZO_ARCH_OVERRIDE) && !defined(LZO_ARCH_GENERIC) && defined(_CRAY) +# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) +# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) +# define LZO_ARCH_CRAY_MPP 1 +# elif defined(_CRAY1) +# define LZO_ARCH_CRAY_PVP 1 +# endif +# endif +#endif +#if !defined(__LZO_ARCH_OVERRIDE) +#if defined(LZO_ARCH_GENERIC) +# define LZO_INFO_ARCH "generic" +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086 1 +# define LZO_ARCH_IA16 1 +# define LZO_INFO_ARCH "i086" +#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define LZO_ARCH_AMD64 1 +# define LZO_INFO_ARCH "amd64" +#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +# define LZO_ARCH_ARM 1 +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) +# define LZO_ARCH_ARM 1 +# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) +# define LZO_INFO_ARCH "arm" +# else +# define LZO_INFO_ARCH "arm" +# endif +#elif defined(__arm__) || defined(_M_ARM) +# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm" +#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +# define LZO_ARCH_AVR 1 +# define LZO_INFO_ARCH "avr" +#elif defined(__bfin__) +# define LZO_ARCH_BLACKFIN 1 +# define LZO_INFO_ARCH "blackfin" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +# define LZO_ARCH_C166 1 +# define LZO_INFO_ARCH "c166" +#elif defined(__cris__) +# define LZO_ARCH_CRIS 1 +# define LZO_INFO_ARCH "cris" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) +# define LZO_ARCH_EZ80 1 +# define LZO_INFO_ARCH "ez80" +#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define LZO_ARCH_H8300 1 +# define LZO_INFO_ARCH "h8300" +#elif defined(__hppa__) || defined(__hppa) +# define LZO_ARCH_HPPA 1 +# define LZO_INFO_ARCH "hppa" +#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_CC_ZORTECHC && defined(__I86__)) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +# define LZO_ARCH_IA64 1 +# define LZO_INFO_ARCH "ia64" +#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__m32r__) +# define LZO_ARCH_M32R 1 +# define LZO_INFO_ARCH "m32r" +#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) +# define LZO_ARCH_M68K 1 +# define LZO_INFO_ARCH "m68k" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +# define LZO_ARCH_MCS251 1 +# define LZO_INFO_ARCH "mcs251" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +# define LZO_ARCH_MIPS 1 +# define LZO_INFO_ARCH "mips" +#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) +# define LZO_ARCH_POWERPC 1 +# define LZO_INFO_ARCH "powerpc" +#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +# define LZO_ARCH_S390 1 +# define LZO_INFO_ARCH "s390" +#elif defined(__sh__) || defined(_M_SH) +# define LZO_ARCH_SH 1 +# define LZO_INFO_ARCH "sh" +#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +# define LZO_ARCH_SPARC 1 +# define LZO_INFO_ARCH "sparc" +#elif defined(__SPU__) +# define LZO_ARCH_SPU 1 +# define LZO_INFO_ARCH "spu" +#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +# define LZO_ARCH_Z80 1 +# define LZO_INFO_ARCH "z80" +#elif (LZO_ARCH_CRAY_PVP) +# if defined(_CRAYSV1) +# define LZO_ARCH_CRAY_SV1 1 +# define LZO_INFO_ARCH "cray_sv1" +# elif (_ADDR64) +# define LZO_ARCH_CRAY_T90 1 +# define LZO_INFO_ARCH "cray_t90" +# elif (_ADDR32) +# define LZO_ARCH_CRAY_YMP 1 +# define LZO_INFO_ARCH "cray_ymp" +# else +# define LZO_ARCH_CRAY_XMP 1 +# define LZO_INFO_ARCH "cray_xmp" +# endif +#else +# define LZO_ARCH_UNKNOWN 1 +# define LZO_INFO_ARCH "unknown" +#endif +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +# error "FIXME - missing define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +# error "FIXME - missing WIN32 define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +# error "FIXME - missing WIN64 define for CPU architecture" +#endif +#if (LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#endif +#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) +# error "this should not happen" +#endif +#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) +# error "this should not happen" +#endif +#if (LZO_ARCH_I086) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_ARCH_I386) +# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +# error "this should not happen" +# endif +# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if !defined(__LZO_MM_OVERRIDE) +#if (LZO_ARCH_I086) +#if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +#endif +#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +# define LZO_MM_TINY 1 +#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +# define LZO_MM_HUGE 1 +#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +# define LZO_MM_SMALL 1 +#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +# define LZO_MM_MEDIUM 1 +#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +# define LZO_MM_COMPACT 1 +#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +# define LZO_MM_LARGE 1 +#elif (LZO_CC_AZTECC) +# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +# define LZO_MM_LARGE 1 +# elif defined(_LARGE_CODE) +# define LZO_MM_MEDIUM 1 +# elif defined(_LARGE_DATA) +# define LZO_MM_COMPACT 1 +# else +# define LZO_MM_SMALL 1 +# endif +#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +# define LZO_MM_LARGE 1 +#else +# error "unknown memory model" +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +#define LZO_HAVE_MM_HUGE_PTR 1 +#define LZO_HAVE_MM_HUGE_ARRAY 1 +#if (LZO_MM_TINY) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +# undef LZO_HAVE_MM_HUGE_PTR +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_MSC && defined(_QC)) +# undef LZO_HAVE_MM_HUGE_ARRAY +# if (_MSC_VER < 600) +# undef LZO_HAVE_MM_HUGE_PTR +# endif +#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) +# if (LZO_OS_DOS16) +# error "this should not happen" +# elif (LZO_CC_ZORTECHC) +# else +# error "this should not happen" +# endif +#endif +#ifdef __cplusplus +extern "C" { +#endif +#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +# define LZO_MM_AHSHIFT 12 +#elif (LZO_CC_WATCOMC) + extern unsigned char _HShift; +# define LZO_MM_AHSHIFT ((unsigned) _HShift) +#else +# error "FIXME - implement LZO_MM_AHSHIFT" +#endif +#ifdef __cplusplus +} +#endif +#endif +#elif (LZO_ARCH_C166) +#if !defined(__MODEL__) +# error "FIXME - C166 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - C166 __MODEL__" +#endif +#elif (LZO_ARCH_MCS251) +#if !defined(__MODEL__) +# error "FIXME - MCS251 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS251 __MODEL__" +#endif +#elif (LZO_ARCH_MCS51) +#if !defined(__MODEL__) +# error "FIXME - MCS51 __MODEL__" +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS51 __MODEL__" +#endif +#elif (LZO_ARCH_CRAY_PVP) +# define LZO_MM_PVP 1 +#else +# define LZO_MM_FLAT 1 +#endif +#if (LZO_MM_COMPACT) +# define LZO_INFO_MM "compact" +#elif (LZO_MM_FLAT) +# define LZO_INFO_MM "flat" +#elif (LZO_MM_HUGE) +# define LZO_INFO_MM "huge" +#elif (LZO_MM_LARGE) +# define LZO_INFO_MM "large" +#elif (LZO_MM_MEDIUM) +# define LZO_INFO_MM "medium" +#elif (LZO_MM_PVP) +# define LZO_INFO_MM "pvp" +#elif (LZO_MM_SMALL) +# define LZO_INFO_MM "small" +#elif (LZO_MM_TINY) +# define LZO_INFO_MM "tiny" +#else +# error "unknown memory model" +#endif +#endif +#if defined(SIZEOF_SHORT) +# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +#endif +#if defined(SIZEOF_INT) +# define LZO_SIZEOF_INT (SIZEOF_INT) +#endif +#if defined(SIZEOF_LONG) +# define LZO_SIZEOF_LONG (SIZEOF_LONG) +#endif +#if defined(SIZEOF_LONG_LONG) +# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#endif +#if defined(SIZEOF___INT16) +# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +#endif +#if defined(SIZEOF___INT32) +# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +#endif +#if defined(SIZEOF___INT64) +# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +#endif +#if defined(SIZEOF_VOID_P) +# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +#endif +#if defined(SIZEOF_SIZE_T) +# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#endif +#if defined(SIZEOF_PTRDIFF_T) +# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#endif +#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +#if !defined(LZO_SIZEOF_SHORT) +# if (LZO_ARCH_CRAY_PVP) +# define LZO_SIZEOF_SHORT 8 +# elif (USHRT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,7) == 1) +# define LZO_SIZEOF_SHORT 1 +# elif (__LZO_LSR(USHRT_MAX,15) == 1) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,31) == 1) +# define LZO_SIZEOF_SHORT 4 +# elif (__LZO_LSR(USHRT_MAX,63) == 1) +# define LZO_SIZEOF_SHORT 8 +# elif (__LZO_LSR(USHRT_MAX,127) == 1) +# define LZO_SIZEOF_SHORT 16 +# else +# error "LZO_SIZEOF_SHORT" +# endif +#endif +#if !defined(LZO_SIZEOF_INT) +# if (LZO_ARCH_CRAY_PVP) +# define LZO_SIZEOF_INT 8 +# elif (UINT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_INT 2 +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,7) == 1) +# define LZO_SIZEOF_INT 1 +# elif (__LZO_LSR(UINT_MAX,15) == 1) +# define LZO_SIZEOF_INT 2 +# elif (__LZO_LSR(UINT_MAX,31) == 1) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,63) == 1) +# define LZO_SIZEOF_INT 8 +# elif (__LZO_LSR(UINT_MAX,127) == 1) +# define LZO_SIZEOF_INT 16 +# else +# error "LZO_SIZEOF_INT" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG) +# if (ULONG_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,7) == 1) +# define LZO_SIZEOF_LONG 1 +# elif (__LZO_LSR(ULONG_MAX,15) == 1) +# define LZO_SIZEOF_LONG 2 +# elif (__LZO_LSR(ULONG_MAX,31) == 1) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,63) == 1) +# define LZO_SIZEOF_LONG 8 +# elif (__LZO_LSR(ULONG_MAX,127) == 1) +# define LZO_SIZEOF_LONG 16 +# else +# error "LZO_SIZEOF_LONG" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +# if (LZO_CC_GNUC >= 0x030300ul) +# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) +# define LZO_SIZEOF_LONG_LONG 4 +# endif +# endif +# endif +#endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +#if (LZO_ARCH_I086 && LZO_CC_DMC) +#elif (LZO_CC_CILLY) && defined(__GNUC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_SIZEOF_LONG_LONG 8 +#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_OS_WIN64 || defined(_WIN64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define LZO_SIZEOF_LONG_LONG 8 +#endif +#endif +#endif +#if defined(__cplusplus) && defined(LZO_CC_GNUC) +# if (LZO_CC_GNUC < 0x020800ul) +# undef LZO_SIZEOF_LONG_LONG +# endif +#endif +#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +# undef LZO_SIZEOF_LONG_LONG +#endif +#if !defined(LZO_SIZEOF_VOID_P) +#if (LZO_ARCH_I086) +# define __LZO_WORDSIZE 2 +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +# define LZO_SIZEOF_VOID_P 2 +# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +# define LZO_SIZEOF_VOID_P 4 +# else +# error "LZO_MM" +# endif +#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +# define __LZO_WORDSIZE 1 +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_H8300) +# if defined(__NORMAL_MODE__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 2 +# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 4 +# else +# define __LZO_WORDSIZE 2 +# define LZO_SIZEOF_VOID_P 2 +# endif +# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +# endif +#elif (LZO_ARCH_M16C) +# define __LZO_WORDSIZE 2 +# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +# define LZO_SIZEOF_VOID_P 4 +# else +# define LZO_SIZEOF_VOID_P 2 +# endif +#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 4 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 8 +#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_OS_OS400 || defined(__OS400__)) +# define __LZO_WORDSIZE LZO_SIZEOF_LONG +# define LZO_SIZEOF_VOID_P 16 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_VOID_P 8 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_ARCH_SPU) +# if 0 +# define __LZO_WORDSIZE 16 +# endif +# define LZO_SIZEOF_VOID_P 4 +#else +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +#endif +#endif +#if !defined(LZO_WORDSIZE) +# if defined(__LZO_WORDSIZE) +# define LZO_WORDSIZE __LZO_WORDSIZE +# else +# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +# endif +#endif +#if !defined(LZO_SIZEOF_SIZE_T) +#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +# define LZO_SIZEOF_SIZE_T 2 +#else +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +#endif +#endif +#if !defined(LZO_SIZEOF_PTRDIFF_T) +#if (LZO_ARCH_I086) +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +# define LZO_SIZEOF_PTRDIFF_T 4 +# else +# define LZO_SIZEOF_PTRDIFF_T 2 +# endif +# else +# error "LZO_MM" +# endif +#else +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +#endif +#endif +#if defined(LZO_ABI_NEUTRAL_ENDIAN) +# undef LZO_ABI_BIG_ENDIAN +# undef LZO_ABI_LITTLE_ENDIAN +#elif !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) +#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) +# define LZO_ABI_BIG_ENDIAN 1 +#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif (LZO_ARCH_M68K || LZO_ARCH_S390) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) +# if (__LITTLE_ENDIAN__ == 1) +# define LZO_ABI_LITTLE_ENDIAN 1 +# else +# define LZO_ABI_BIG_ENDIAN 1 +# endif +#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#endif +#endif +#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) +# error "this should not happen" +#endif +#if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "be" +#elif defined(LZO_ABI_LITTLE_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "le" +#elif defined(LZO_ABI_NEUTRAL_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "neutral" +#endif +#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_I8LP16 1 +# define LZO_INFO_ABI_PM "i8lp16" +#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_ILP16 1 +# define LZO_INFO_ABI_PM "ilp16" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_ILP32 1 +# define LZO_INFO_ABI_PM "ilp32" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +# define LZO_ABI_LLP64 1 +# define LZO_INFO_ABI_PM "llp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_LP64 1 +# define LZO_INFO_ABI_PM "lp64" +#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_ILP64 1 +# define LZO_INFO_ABI_PM "ilp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_IP32L64 1 +# define LZO_INFO_ABI_PM "ip32l64" +#endif +#if !defined(__LZO_LIBC_OVERRIDE) +#if defined(LZO_LIBC_NAKED) +# define LZO_INFO_LIBC "naked" +#elif defined(LZO_LIBC_FREESTANDING) +# define LZO_INFO_LIBC "freestanding" +#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) +# define LZO_INFO_LIBC "mfreestanding" +#elif defined(LZO_LIBC_ISOC90) +# define LZO_INFO_LIBC "isoc90" +#elif defined(LZO_LIBC_ISOC99) +# define LZO_INFO_LIBC "isoc99" +#elif defined(__dietlibc__) +# define LZO_LIBC_DIETLIBC 1 +# define LZO_INFO_LIBC "dietlibc" +#elif defined(_NEWLIB_VERSION) +# define LZO_LIBC_NEWLIB 1 +# define LZO_INFO_LIBC "newlib" +#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +# if defined(__UCLIBC_SUBLEVEL__) +# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# else +# define LZO_LIBC_UCLIBC 0x00090bL +# endif +# define LZO_INFO_LIBC "uclibc" +#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define LZO_INFO_LIBC "glibc" +#elif (LZO_CC_MWERKS) && defined(__MSL__) +# define LZO_LIBC_MSL __MSL__ +# define LZO_INFO_LIBC "msl" +#elif 1 && defined(__IAR_SYSTEMS_ICC__) +# define LZO_LIBC_ISOC90 1 +# define LZO_INFO_LIBC "isoc90" +#else +# define LZO_LIBC_DEFAULT 1 +# define LZO_INFO_LIBC "default" +#endif +#endif +#if !defined(__lzo_gnuc_extension__) +#if (LZO_CC_GNUC >= 0x020800ul) +# define __lzo_gnuc_extension__ __extension__ +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_gnuc_extension__ __extension__ +#else +# define __lzo_gnuc_extension__ +#endif +#endif +#if !defined(__lzo_ua_volatile) +# define __lzo_ua_volatile volatile +#endif +#if !defined(__lzo_alignof) +#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define __lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_alignof(e) __alignof(e) +#endif +#endif +#if defined(__lzo_alignof) +# define __lzo_HAVE_alignof 1 +#endif +#if !defined(__lzo_constructor) +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_constructor __attribute__((__constructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_constructor __attribute__((__constructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_constructor __attribute__((__constructor__)) +#endif +#endif +#if defined(__lzo_constructor) +# define __lzo_HAVE_constructor 1 +#endif +#if !defined(__lzo_destructor) +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_destructor __attribute__((__destructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_destructor __attribute__((__destructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_destructor __attribute__((__destructor__)) +#endif +#endif +#if defined(__lzo_destructor) +# define __lzo_HAVE_destructor 1 +#endif +#if defined(__lzo_HAVE_destructor) && !defined(__lzo_HAVE_constructor) +# error "this should not happen" +#endif +#if !defined(__lzo_inline) +#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __lzo_inline inline +#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __lzo_inline __inline +#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_inline __inline__ +#elif (LZO_CC_DMC) +# define __lzo_inline __inline +#elif (LZO_CC_INTELC) +# define __lzo_inline __inline +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __lzo_inline __inline +#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +# define __lzo_inline __inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define __lzo_inline inline +#endif +#endif +#if defined(__lzo_inline) +# define __lzo_HAVE_inline 1 +#else +# define __lzo_inline +#endif +#if !defined(__lzo_forceinline) +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +# define __lzo_forceinline __forceinline +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_forceinline __forceinline +#endif +#endif +#if defined(__lzo_forceinline) +# define __lzo_HAVE_forceinline 1 +#else +# define __lzo_forceinline +#endif +#if !defined(__lzo_noinline) +#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) +# define __lzo_noinline __attribute__((__noinline__,__used__)) +#elif (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __lzo_noinline __declspec(noinline) +# endif +#endif +#endif +#if defined(__lzo_noinline) +# define __lzo_HAVE_noinline 1 +#else +# define __lzo_noinline +#endif +#if (defined(__lzo_HAVE_forceinline) || defined(__lzo_HAVE_noinline)) && !defined(__lzo_HAVE_inline) +# error "this should not happen" +#endif +#if !defined(__lzo_noreturn) +#if (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +# define __lzo_noreturn __declspec(noreturn) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_noreturn __declspec(noreturn) +#endif +#endif +#if defined(__lzo_noreturn) +# define __lzo_HAVE_noreturn 1 +#else +# define __lzo_noreturn +#endif +#if !defined(__lzo_nothrow) +#if (LZO_CC_GNUC >= 0x030300ul) +# define __lzo_nothrow __attribute__((__nothrow__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) +# define __lzo_nothrow __declspec(nothrow) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +# define __lzo_nothrow __attribute__((__nothrow__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_nothrow __attribute__((__nothrow__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) +# define __lzo_nothrow __declspec(nothrow) +#endif +#endif +#if defined(__lzo_nothrow) +# define __lzo_HAVE_nothrow 1 +#else +# define __lzo_nothrow +#endif +#if !defined(__lzo_restrict) +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_restrict __restrict__ +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +# define __lzo_restrict __restrict__ +#elif (LZO_CC_LLVM) +# define __lzo_restrict __restrict__ +#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) +# define __lzo_restrict __restrict +#endif +#endif +#if defined(__lzo_restrict) +# define __lzo_HAVE_restrict 1 +#else +# define __lzo_restrict +#endif +#if !defined(__lzo_likely) && !defined(__lzo_unlikely) +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#endif +#endif +#if defined(__lzo_likely) +# define __lzo_HAVE_likely 1 +#else +# define __lzo_likely(e) (e) +#endif +#if defined(__lzo_unlikely) +# define __lzo_HAVE_unlikely 1 +#else +# define __lzo_unlikely(e) (e) +#endif +#if !defined(LZO_UNUSED) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED(var) ((void) &var) +# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_UNUSED(var) ((void) var) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_KEILC) +# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +# elif (LZO_CC_PACIFICC) +# define LZO_UNUSED(var) ((void) sizeof(var)) +# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED(var) ((void) var) +# else +# define LZO_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(LZO_UNUSED_FUNC) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED_FUNC(func) ((void) func) +# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_LLVM) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_MSC) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +# else +# define LZO_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(LZO_UNUSED_LABEL) +# if (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) +# define LZO_UNUSED_LABEL(l) if (0) goto l +# else +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# endif +#endif +#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) +# if 0 +# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var +# elif 0 && (LZO_CC_GNUC) +# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var +# else +# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# else +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT) +# if (LZO_CC_AZTECC) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +# endif +#endif +#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit +# define __lzo_cdecl_main __cdecl +# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_qsort __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_qsort _stdcall +# else +# define __lzo_cdecl_qsort __cdecl +# endif +# elif (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +# else +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit __cdecl +# define __lzo_cdecl_main __cdecl +# define __lzo_cdecl_qsort __cdecl +# endif +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_sighandler __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_sighandler _stdcall +# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __lzo_cdecl_sighandler __clrcall +# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __lzo_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __lzo_cdecl_sighandler _far _cdecl +# else +# define __lzo_cdecl_sighandler _cdecl +# endif +# else +# define __lzo_cdecl_sighandler __cdecl +# endif +#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +# define __lzo_cdecl cdecl +#endif +#if !defined(__lzo_cdecl) +# define __lzo_cdecl +#endif +#if !defined(__lzo_cdecl_atexit) +# define __lzo_cdecl_atexit +#endif +#if !defined(__lzo_cdecl_main) +# define __lzo_cdecl_main +#endif +#if !defined(__lzo_cdecl_qsort) +# define __lzo_cdecl_qsort +#endif +#if !defined(__lzo_cdecl_sighandler) +# define __lzo_cdecl_sighandler +#endif +#if !defined(__lzo_cdecl_va) +# define __lzo_cdecl_va __lzo_cdecl +#endif +#if !defined(LZO_CFG_NO_WINDOWS_H) +#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +# else +# define LZO_HAVE_WINDOWS_H 1 +# endif +#endif +#endif +#if (LZO_ARCH_ALPHA) +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_AMD64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# define LZO_OPT_UNALIGNED64 1 +#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +#elif (LZO_ARCH_ARM) +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_CRIS) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_I386) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_IA64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_PREFER_POSTINC 1 +#elif (LZO_ARCH_M68K) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(__mc68020__) && !defined(__mcoldfire__) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_MIPS) +# define LZO_OPT_AVOID_UINT_INDEX 1 +#elif (LZO_ARCH_POWERPC) +# define LZO_OPT_PREFER_PREINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_S390) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# if (LZO_SIZEOF_SIZE_T == 8) +# define LZO_OPT_UNALIGNED64 1 +# endif +#elif (LZO_ARCH_SH) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +#endif +#if !defined(LZO_CFG_NO_INLINE_ASM) +#if defined(LZO_CC_LLVM) +# define LZO_CFG_NO_INLINE_ASM 1 +#endif +#endif +#if !defined(LZO_CFG_NO_UNALIGNED) +#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) +# define LZO_CFG_NO_UNALIGNED 1 +#endif +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# undef LZO_OPT_UNALIGNED16 +# undef LZO_OPT_UNALIGNED32 +# undef LZO_OPT_UNALIGNED64 +#endif +#if defined(LZO_CFG_NO_INLINE_ASM) +#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +# define LZO_ASM_SYNTAX_MSC 1 +#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#endif +#if (LZO_ASM_SYNTAX_GNUC) +#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +# define __LZO_ASM_CLOBBER "ax" +#elif (LZO_CC_INTELC) +# define __LZO_ASM_CLOBBER "memory" +#else +# define __LZO_ASM_CLOBBER "cc", "memory" +#endif +#endif +#if defined(__LZO_INFOSTR_MM) +#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +# define __LZO_INFOSTR_MM "" +#elif defined(LZO_INFO_MM) +# define __LZO_INFOSTR_MM "." LZO_INFO_MM +#else +# define __LZO_INFOSTR_MM "" +#endif +#if defined(__LZO_INFOSTR_PM) +#elif defined(LZO_INFO_ABI_PM) +# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +#else +# define __LZO_INFOSTR_PM "" +#endif +#if defined(__LZO_INFOSTR_ENDIAN) +#elif defined(LZO_INFO_ABI_ENDIAN) +# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +#else +# define __LZO_INFOSTR_ENDIAN "" +#endif +#if defined(__LZO_INFOSTR_OSNAME) +#elif defined(LZO_INFO_OS_CONSOLE) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +#elif defined(LZO_INFO_OS_POSIX) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +#else +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +#endif +#if defined(__LZO_INFOSTR_LIBC) +#elif defined(LZO_INFO_LIBC) +# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +#else +# define __LZO_INFOSTR_LIBC "" +#endif +#if defined(__LZO_INFOSTR_CCVER) +#elif defined(LZO_INFO_CCVER) +# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +#else +# define __LZO_INFOSTR_CCVER "" +#endif +#define LZO_INFO_STRING \ + LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ + " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER + +#endif /* already included */ + +/* vim:set ts=4 et: */ diff --git a/extern/lzo/minilzo/minilzo.c b/extern/lzo/minilzo/minilzo.c new file mode 100644 index 00000000000..6a62b31b94a --- /dev/null +++ b/extern/lzo/minilzo/minilzo.c @@ -0,0 +1,4112 @@ +/* minilzo.c -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://www.oberhumer.com/opensource/lzo/ + */ + +#define __LZO_IN_MINILZO +#define LZO_BUILD + +#if defined(LZO_CFG_FREESTANDING) +# undef MINILZO_HAVE_CONFIG_H +# define LZO_LIBC_FREESTANDING 1 +# define LZO_OS_FREESTANDING 1 +#endif + +#ifdef MINILZO_HAVE_CONFIG_H +# include +#endif +#include +#include +#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS) + +#ifndef __LZODEFS_H_INCLUDED +#define __LZODEFS_H_INCLUDED 1 + +#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +# define __CYGWIN__ __CYGWIN32__ +#endif +#if defined(__IBMCPP__) && !defined(__IBMC__) +# define __IBMC__ __IBMCPP__ +#endif +#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +# define __INTEL_COMPILER __ICL +#endif +#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +# define _ALL_SOURCE 1 +#endif +#if defined(__mips__) && defined(__R5900__) +# if !defined(__LONG_MAX__) +# define __LONG_MAX__ 9223372036854775807L +# endif +#endif +#if defined(__INTEL_COMPILER) && defined(__linux__) +# pragma warning(disable: 193) +#endif +#if defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif 0 && defined(__C251__) +# pragma warning disable = 322 +#endif +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if (_MSC_VER >= 1300) +# pragma warning(disable: 4668) +# endif +#endif +#if 0 && defined(__WATCOMC__) +# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +# pragma warning 203 9 +# endif +#endif +#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +# pragma option -h +#endif +#if 0 +#define LZO_0xffffL 0xfffful +#define LZO_0xffffffffL 0xfffffffful +#else +#define LZO_0xffffL 65535ul +#define LZO_0xffffffffL 4294967295ul +#endif +#if (LZO_0xffffL == LZO_0xffffffffL) +# error "your preprocessor is broken 1" +#endif +#if (16ul * 16384ul != 262144ul) +# error "your preprocessor is broken 2" +#endif +#if 0 +#if (32767 >= 4294967295ul) +# error "your preprocessor is broken 3" +#endif +#if (65535u >= 4294967295ul) +# error "your preprocessor is broken 4" +#endif +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +# if !defined(MSDOS) +# define MSDOS 1 +# endif +# if !defined(_MSDOS) +# define _MSDOS 1 +# endif +#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +# if (__VERSION == 520) && (MB_LEN_MAX == 1) +# if !defined(__AZTEC_C__) +# define __AZTEC_C__ __VERSION +# endif +# if !defined(__DOS__) +# define __DOS__ 1 +# endif +# endif +#endif +#endif +#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +# define ptrdiff_t long +# define _PTRDIFF_T_DEFINED +#endif +#if (UINT_MAX == LZO_0xffffL) +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +# if defined(__AZTEC_C__) && defined(__DOS__) +# define __LZO_RENAME_A 1 +# elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define __LZO_RENAME_A 1 +# elif (_MSC_VER < 700) +# define __LZO_RENAME_B 1 +# endif +# elif defined(__TSC__) && defined(__OS2__) +# define __LZO_RENAME_A 1 +# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +# define __LZO_RENAME_A 1 +# elif defined(__PACIFIC__) && defined(DOS) +# if !defined(__far) +# define __far far +# endif +# if !defined(__near) +# define __near near +# endif +# endif +# if defined(__LZO_RENAME_A) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__far) +# define __far far +# endif +# if !defined(__huge) +# define __huge huge +# endif +# if !defined(__near) +# define __near near +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# if !defined(__huge) +# define __huge huge +# endif +# elif defined(__LZO_RENAME_B) +# if !defined(__cdecl) +# define __cdecl _cdecl +# endif +# if !defined(__far) +# define __far _far +# endif +# if !defined(__huge) +# define __huge _huge +# endif +# if !defined(__near) +# define __near _near +# endif +# if !defined(__pascal) +# define __pascal _pascal +# endif +# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# if !defined(__cdecl) +# define __cdecl cdecl +# endif +# if !defined(__pascal) +# define __pascal pascal +# endif +# endif +# undef __LZO_RENAME_A +# undef __LZO_RENAME_B +#endif +#if (UINT_MAX == LZO_0xffffL) +#if defined(__AZTEC_C__) && defined(__DOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +#elif defined(_MSC_VER) && defined(MSDOS) +# if (_MSC_VER < 600) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# endif +# if (_MSC_VER < 700) +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# define LZO_BROKEN_SIZEOF 1 +# endif +#elif defined(__PACIFIC__) && defined(DOS) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#elif defined(__TURBOC__) && defined(__MSDOS__) +# if (__TURBOC__ < 0x0150) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +# endif +# if (__TURBOC__ < 0x0200) +# define LZO_BROKEN_SIZEOF 1 +# endif +# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# endif +#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +# define LZO_BROKEN_SIZEOF 1 +#endif +#endif +#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +#endif +#if defined(_CRAY) && defined(_CRAY1) +# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 +#endif +#define LZO_PP_STRINGIZE(x) #x +#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) +#define LZO_PP_CONCAT2(a,b) a ## b +#define LZO_PP_CONCAT3(a,b,c) a ## b ## c +#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) +#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) +#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) +#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) +#if 1 +#define LZO_CPP_STRINGIZE(x) #x +#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +#define LZO_CPP_CONCAT2(a,b) a ## b +#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +#endif +#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#if 1 && defined(__cplusplus) +# if !defined(__STDC_CONSTANT_MACROS) +# define __STDC_CONSTANT_MACROS 1 +# endif +# if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +# endif +#endif +#if defined(__cplusplus) +# define LZO_EXTERN_C extern "C" +#else +# define LZO_EXTERN_C extern +#endif +#if !defined(__LZO_OS_OVERRIDE) +#if defined(LZO_OS_FREESTANDING) +# define LZO_INFO_OS "freestanding" +#elif defined(LZO_OS_EMBEDDED) +# define LZO_INFO_OS "embedded" +#elif 1 && defined(__IAR_SYSTEMS_ICC__) +# define LZO_OS_EMBEDDED 1 +# define LZO_INFO_OS "embedded" +#elif defined(__CYGWIN__) && defined(__GNUC__) +# define LZO_OS_CYGWIN 1 +# define LZO_INFO_OS "cygwin" +#elif defined(__EMX__) && defined(__GNUC__) +# define LZO_OS_EMX 1 +# define LZO_INFO_OS "emx" +#elif defined(__BEOS__) +# define LZO_OS_BEOS 1 +# define LZO_INFO_OS "beos" +#elif defined(__Lynx__) +# define LZO_OS_LYNXOS 1 +# define LZO_INFO_OS "lynxos" +#elif defined(__OS400__) +# define LZO_OS_OS400 1 +# define LZO_INFO_OS "os400" +#elif defined(__QNX__) +# define LZO_OS_QNX 1 +# define LZO_INFO_OS "qnx" +#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__BORLANDC__) && defined(__DPMI16__) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +#elif defined(__ZTC__) && defined(DOS386) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +#elif defined(__OS2__) || defined(__OS2V2__) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_OS216 1 +# define LZO_INFO_OS "os216" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_OS2 1 +# define LZO_INFO_OS "os2" +# else +# error "check your limits.h header" +# endif +#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +# define LZO_OS_WIN64 1 +# define LZO_INFO_OS "win64" +#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__MWERKS__) && defined(__INTEL__) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_WIN16 1 +# define LZO_INFO_OS "win16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# else +# error "check your limits.h header" +# endif +#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +# if (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_OS_DOS32 1 +# define LZO_INFO_OS "dos32" +# else +# error "check your limits.h header" +# endif +#elif defined(__WATCOMC__) +# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +# define LZO_OS_DOS16 1 +# define LZO_INFO_OS "dos16" +# elif defined(__NT__) && (__WATCOMC__ < 1100) +# define LZO_OS_WIN32 1 +# define LZO_INFO_OS "win32" +# elif defined(__linux__) || defined(__LINUX__) +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +# else +# error "please specify a target using the -bt compiler option" +# endif +#elif defined(__palmos__) +# define LZO_OS_PALMOS 1 +# define LZO_INFO_OS "palmos" +#elif defined(__TOS__) || defined(__atarist__) +# define LZO_OS_TOS 1 +# define LZO_INFO_OS "tos" +#elif defined(macintosh) && !defined(__ppc__) +# define LZO_OS_MACCLASSIC 1 +# define LZO_INFO_OS "macclassic" +#elif defined(__VMS) +# define LZO_OS_VMS 1 +# define LZO_INFO_OS "vms" +#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PS2 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "ps2" +#elif (defined(__mips__) && defined(__psp__)) +# define LZO_OS_CONSOLE 1 +# define LZO_OS_CONSOLE_PSP 1 +# define LZO_INFO_OS "console" +# define LZO_INFO_OS_CONSOLE "psp" +#else +# define LZO_OS_POSIX 1 +# define LZO_INFO_OS "posix" +#endif +#if (LZO_OS_POSIX) +# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +# define LZO_OS_POSIX_AIX 1 +# define LZO_INFO_OS_POSIX "aix" +# elif defined(__FreeBSD__) +# define LZO_OS_POSIX_FREEBSD 1 +# define LZO_INFO_OS_POSIX "freebsd" +# elif defined(__hpux__) || defined(__hpux) +# define LZO_OS_POSIX_HPUX 1 +# define LZO_INFO_OS_POSIX "hpux" +# elif defined(__INTERIX) +# define LZO_OS_POSIX_INTERIX 1 +# define LZO_INFO_OS_POSIX "interix" +# elif defined(__IRIX__) || defined(__irix__) +# define LZO_OS_POSIX_IRIX 1 +# define LZO_INFO_OS_POSIX "irix" +# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) +# define LZO_OS_POSIX_LINUX 1 +# define LZO_INFO_OS_POSIX "linux" +# elif defined(__APPLE__) || defined(__MACOS__) +# define LZO_OS_POSIX_MACOSX 1 +# define LZO_INFO_OS_POSIX "macosx" +# elif defined(__minix__) || defined(__minix) +# define LZO_OS_POSIX_MINIX 1 +# define LZO_INFO_OS_POSIX "minix" +# elif defined(__NetBSD__) +# define LZO_OS_POSIX_NETBSD 1 +# define LZO_INFO_OS_POSIX "netbsd" +# elif defined(__OpenBSD__) +# define LZO_OS_POSIX_OPENBSD 1 +# define LZO_INFO_OS_POSIX "openbsd" +# elif defined(__osf__) +# define LZO_OS_POSIX_OSF 1 +# define LZO_INFO_OS_POSIX "osf" +# elif defined(__solaris__) || defined(__sun) +# if defined(__SVR4) || defined(__svr4__) +# define LZO_OS_POSIX_SOLARIS 1 +# define LZO_INFO_OS_POSIX "solaris" +# else +# define LZO_OS_POSIX_SUNOS 1 +# define LZO_INFO_OS_POSIX "sunos" +# endif +# elif defined(__ultrix__) || defined(__ultrix) +# define LZO_OS_POSIX_ULTRIX 1 +# define LZO_INFO_OS_POSIX "ultrix" +# elif defined(_UNICOS) +# define LZO_OS_POSIX_UNICOS 1 +# define LZO_INFO_OS_POSIX "unicos" +# else +# define LZO_OS_POSIX_UNKNOWN 1 +# define LZO_INFO_OS_POSIX "unknown" +# endif +#endif +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (UINT_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +# define LZO_CC_CILLY 1 +# define LZO_INFO_CC "Cilly" +# if defined(__CILLY__) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +# define LZO_CC_SDCC 1 +# define LZO_INFO_CC "sdcc" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) +#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define LZO_INFO_CC "Pathscale C" +# define LZO_INFO_CCVER __PATHSCALE__ +#elif defined(__INTEL_COMPILER) +# define LZO_CC_INTELC 1 +# define LZO_INFO_CC "Intel C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) +# if defined(_WIN32) || defined(_WIN64) +# define LZO_CC_SYNTAX_MSC 1 +# else +# define LZO_CC_SYNTAX_GNUC 1 +# endif +#elif defined(__POCC__) && defined(_WIN32) +# define LZO_CC_PELLESC 1 +# define LZO_INFO_CC "Pelles C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) +#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# else +# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# endif +# define LZO_INFO_CC "llvm-gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define LZO_INFO_CC "gcc" +# define LZO_INFO_CCVER __VERSION__ +#elif defined(__ACK__) && defined(_ACK) +# define LZO_CC_ACK 1 +# define LZO_INFO_CC "Amsterdam Compiler Kit C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__AZTEC_C__) +# define LZO_CC_AZTECC 1 +# define LZO_INFO_CC "Aztec C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) +#elif defined(__BORLANDC__) +# define LZO_CC_BORLANDC 1 +# define LZO_INFO_CC "Borland C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) +#elif defined(_CRAYC) && defined(_RELEASE) +# define LZO_CC_CRAYC 1 +# define LZO_INFO_CC "Cray C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) +#elif defined(__DMC__) && defined(__SC__) +# define LZO_CC_DMC 1 +# define LZO_INFO_CC "Digital Mars C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) +#elif defined(__DECC) +# define LZO_CC_DECC 1 +# define LZO_INFO_CC "DEC C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) +#elif defined(__HIGHC__) +# define LZO_CC_HIGHC 1 +# define LZO_INFO_CC "MetaWare High C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__IAR_SYSTEMS_ICC__) +# define LZO_CC_IARC 1 +# define LZO_INFO_CC "IAR C" +# if defined(__VER__) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(__IBMC__) +# define LZO_CC_IBMC 1 +# define LZO_INFO_CC "IBM C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) +#elif defined(__KEIL__) && defined(__C166__) +# define LZO_CC_KEILC 1 +# define LZO_INFO_CC "Keil C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) +#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +# define LZO_CC_LCCWIN32 1 +# define LZO_INFO_CC "lcc-win32" +# define LZO_INFO_CCVER "unknown" +#elif defined(__LCC__) +# define LZO_CC_LCC 1 +# define LZO_INFO_CC "lcc" +# if defined(__LCC_VERSION__) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) +# else +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(_MSC_VER) +# define LZO_CC_MSC 1 +# define LZO_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) +# endif +#elif defined(__MWERKS__) +# define LZO_CC_MWERKS 1 +# define LZO_INFO_CC "Metrowerks C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) +#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +# define LZO_CC_NDPC 1 +# define LZO_INFO_CC "Microway NDP C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PACIFIC__) +# define LZO_CC_PACIFICC 1 +# define LZO_INFO_CC "Pacific C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +# define LZO_CC_PGI 1 +# define LZO_INFO_CC "Portland Group PGI C" +# define LZO_INFO_CCVER "unknown" +#elif defined(__PUREC__) && defined(__TOS__) +# define LZO_CC_PUREC 1 +# define LZO_INFO_CC "Pure C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) +#elif defined(__SC__) && defined(__ZTC__) +# define LZO_CC_SYMANTECC 1 +# define LZO_INFO_CC "Symantec C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) +#elif defined(__SUNPRO_C) +# define LZO_INFO_CC "SunPro C" +# if ((__SUNPRO_C)+0 > 0) +# define LZO_CC_SUNPROC __SUNPRO_C +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) +# else +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(__SUNPRO_CC) +# define LZO_INFO_CC "SunPro C" +# if ((__SUNPRO_CC)+0 > 0) +# define LZO_CC_SUNPROC __SUNPRO_CC +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) +# else +# define LZO_CC_SUNPROC 1 +# define LZO_INFO_CCVER "unknown" +# endif +#elif defined(__TINYC__) +# define LZO_CC_TINYC 1 +# define LZO_INFO_CC "Tiny C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) +#elif defined(__TSC__) +# define LZO_CC_TOPSPEEDC 1 +# define LZO_INFO_CC "TopSpeed C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) +#elif defined(__WATCOMC__) +# define LZO_CC_WATCOMC 1 +# define LZO_INFO_CC "Watcom C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) +#elif defined(__TURBOC__) +# define LZO_CC_TURBOC 1 +# define LZO_INFO_CC "Turbo C" +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) +#elif defined(__ZTC__) +# define LZO_CC_ZORTECHC 1 +# define LZO_INFO_CC "Zortech C" +# if (__ZTC__ == 0x310) +# define LZO_INFO_CCVER "0x310" +# else +# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) +# endif +#else +# define LZO_CC_UNKNOWN 1 +# define LZO_INFO_CC "unknown" +# define LZO_INFO_CCVER "unknown" +#endif +#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +#endif +#if !defined(__LZO_ARCH_OVERRIDE) && !defined(LZO_ARCH_GENERIC) && defined(_CRAY) +# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) +# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) +# define LZO_ARCH_CRAY_MPP 1 +# elif defined(_CRAY1) +# define LZO_ARCH_CRAY_PVP 1 +# endif +# endif +#endif +#if !defined(__LZO_ARCH_OVERRIDE) +#if defined(LZO_ARCH_GENERIC) +# define LZO_INFO_ARCH "generic" +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086 1 +# define LZO_ARCH_IA16 1 +# define LZO_INFO_ARCH "i086" +#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) +# define LZO_ARCH_ALPHA 1 +# define LZO_INFO_ARCH "alpha" +#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +# define LZO_ARCH_AMD64 1 +# define LZO_INFO_ARCH "amd64" +#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +# define LZO_ARCH_ARM 1 +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) +# define LZO_ARCH_ARM 1 +# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) +# define LZO_ARCH_ARM_THUMB 1 +# define LZO_INFO_ARCH "arm_thumb" +# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) +# define LZO_INFO_ARCH "arm" +# else +# define LZO_INFO_ARCH "arm" +# endif +#elif defined(__arm__) || defined(_M_ARM) +# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm" +#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +# define LZO_ARCH_AVR 1 +# define LZO_INFO_ARCH "avr" +#elif defined(__bfin__) +# define LZO_ARCH_BLACKFIN 1 +# define LZO_INFO_ARCH "blackfin" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +# define LZO_ARCH_C166 1 +# define LZO_INFO_ARCH "c166" +#elif defined(__cris__) +# define LZO_ARCH_CRIS 1 +# define LZO_INFO_ARCH "cris" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) +# define LZO_ARCH_EZ80 1 +# define LZO_INFO_ARCH "ez80" +#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define LZO_ARCH_H8300 1 +# define LZO_INFO_ARCH "h8300" +#elif defined(__hppa__) || defined(__hppa) +# define LZO_ARCH_HPPA 1 +# define LZO_INFO_ARCH "hppa" +#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_CC_ZORTECHC && defined(__I86__)) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +# define LZO_ARCH_I386 1 +# define LZO_ARCH_IA32 1 +# define LZO_INFO_ARCH "i386" +#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +# define LZO_ARCH_IA64 1 +# define LZO_INFO_ARCH "ia64" +#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) +# define LZO_ARCH_M16C 1 +# define LZO_INFO_ARCH "m16c" +#elif defined(__m32r__) +# define LZO_ARCH_M32R 1 +# define LZO_INFO_ARCH "m32r" +#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) +# define LZO_ARCH_M68K 1 +# define LZO_INFO_ARCH "m68k" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +# define LZO_ARCH_MCS251 1 +# define LZO_INFO_ARCH "mcs251" +#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) +# define LZO_ARCH_MCS51 1 +# define LZO_INFO_ARCH "mcs51" +#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +# define LZO_ARCH_MIPS 1 +# define LZO_INFO_ARCH "mips" +#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) +# define LZO_ARCH_MSP430 1 +# define LZO_INFO_ARCH "msp430" +#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) +# define LZO_ARCH_POWERPC 1 +# define LZO_INFO_ARCH "powerpc" +#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +# define LZO_ARCH_S390 1 +# define LZO_INFO_ARCH "s390" +#elif defined(__sh__) || defined(_M_SH) +# define LZO_ARCH_SH 1 +# define LZO_INFO_ARCH "sh" +#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +# define LZO_ARCH_SPARC 1 +# define LZO_INFO_ARCH "sparc" +#elif defined(__SPU__) +# define LZO_ARCH_SPU 1 +# define LZO_INFO_ARCH "spu" +#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +# define LZO_ARCH_Z80 1 +# define LZO_INFO_ARCH "z80" +#elif (LZO_ARCH_CRAY_PVP) +# if defined(_CRAYSV1) +# define LZO_ARCH_CRAY_SV1 1 +# define LZO_INFO_ARCH "cray_sv1" +# elif (_ADDR64) +# define LZO_ARCH_CRAY_T90 1 +# define LZO_INFO_ARCH "cray_t90" +# elif (_ADDR32) +# define LZO_ARCH_CRAY_YMP 1 +# define LZO_INFO_ARCH "cray_ymp" +# else +# define LZO_ARCH_CRAY_XMP 1 +# define LZO_INFO_ARCH "cray_xmp" +# endif +#else +# define LZO_ARCH_UNKNOWN 1 +# define LZO_INFO_ARCH "unknown" +#endif +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +# error "FIXME - missing define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +# error "FIXME - missing WIN32 define for CPU architecture" +#endif +#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +# error "FIXME - missing WIN64 define for CPU architecture" +#endif +#if (LZO_OS_OS216 || LZO_OS_WIN16) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +# define LZO_ARCH_I086PM 1 +# define LZO_ARCH_IA16PM 1 +#endif +#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM) +# error "this should not happen" +#endif +#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086) +# error "this should not happen" +#endif +#if (LZO_ARCH_I086) +# if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if (LZO_ARCH_I386) +# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +# error "this should not happen" +# endif +# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +# error "this should not happen" +# endif +# if (ULONG_MAX != LZO_0xffffffffL) +# error "this should not happen" +# endif +#endif +#if !defined(__LZO_MM_OVERRIDE) +#if (LZO_ARCH_I086) +#if (UINT_MAX != LZO_0xffffL) +# error "this should not happen" +#endif +#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +# define LZO_MM_TINY 1 +#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +# define LZO_MM_HUGE 1 +#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +# define LZO_MM_SMALL 1 +#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +# define LZO_MM_MEDIUM 1 +#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +# define LZO_MM_COMPACT 1 +#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +# define LZO_MM_LARGE 1 +#elif (LZO_CC_AZTECC) +# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +# define LZO_MM_LARGE 1 +# elif defined(_LARGE_CODE) +# define LZO_MM_MEDIUM 1 +# elif defined(_LARGE_DATA) +# define LZO_MM_COMPACT 1 +# else +# define LZO_MM_SMALL 1 +# endif +#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +# define LZO_MM_LARGE 1 +#else +# error "unknown memory model" +#endif +#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +#define LZO_HAVE_MM_HUGE_PTR 1 +#define LZO_HAVE_MM_HUGE_ARRAY 1 +#if (LZO_MM_TINY) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +# undef LZO_HAVE_MM_HUGE_PTR +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# undef LZO_HAVE_MM_HUGE_ARRAY +#elif (LZO_CC_MSC && defined(_QC)) +# undef LZO_HAVE_MM_HUGE_ARRAY +# if (_MSC_VER < 600) +# undef LZO_HAVE_MM_HUGE_PTR +# endif +#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +# undef LZO_HAVE_MM_HUGE_ARRAY +#endif +#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR) +# if (LZO_OS_DOS16) +# error "this should not happen" +# elif (LZO_CC_ZORTECHC) +# else +# error "this should not happen" +# endif +#endif +#ifdef __cplusplus +extern "C" { +#endif +#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) + extern void __near __cdecl _AHSHIFT(void); +# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +# define LZO_MM_AHSHIFT 12 +#elif (LZO_CC_WATCOMC) + extern unsigned char _HShift; +# define LZO_MM_AHSHIFT ((unsigned) _HShift) +#else +# error "FIXME - implement LZO_MM_AHSHIFT" +#endif +#ifdef __cplusplus +} +#endif +#endif +#elif (LZO_ARCH_C166) +#if !defined(__MODEL__) +# error "FIXME - C166 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - C166 __MODEL__" +#endif +#elif (LZO_ARCH_MCS251) +#if !defined(__MODEL__) +# error "FIXME - MCS251 __MODEL__" +#elif ((__MODEL__) == 0) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS251 __MODEL__" +#endif +#elif (LZO_ARCH_MCS51) +#if !defined(__MODEL__) +# error "FIXME - MCS51 __MODEL__" +#elif ((__MODEL__) == 1) +# define LZO_MM_SMALL 1 +#elif ((__MODEL__) == 2) +# define LZO_MM_LARGE 1 +#elif ((__MODEL__) == 3) +# define LZO_MM_TINY 1 +#elif ((__MODEL__) == 4) +# define LZO_MM_XTINY 1 +#elif ((__MODEL__) == 5) +# define LZO_MM_XSMALL 1 +#else +# error "FIXME - MCS51 __MODEL__" +#endif +#elif (LZO_ARCH_CRAY_PVP) +# define LZO_MM_PVP 1 +#else +# define LZO_MM_FLAT 1 +#endif +#if (LZO_MM_COMPACT) +# define LZO_INFO_MM "compact" +#elif (LZO_MM_FLAT) +# define LZO_INFO_MM "flat" +#elif (LZO_MM_HUGE) +# define LZO_INFO_MM "huge" +#elif (LZO_MM_LARGE) +# define LZO_INFO_MM "large" +#elif (LZO_MM_MEDIUM) +# define LZO_INFO_MM "medium" +#elif (LZO_MM_PVP) +# define LZO_INFO_MM "pvp" +#elif (LZO_MM_SMALL) +# define LZO_INFO_MM "small" +#elif (LZO_MM_TINY) +# define LZO_INFO_MM "tiny" +#else +# error "unknown memory model" +#endif +#endif +#if defined(SIZEOF_SHORT) +# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +#endif +#if defined(SIZEOF_INT) +# define LZO_SIZEOF_INT (SIZEOF_INT) +#endif +#if defined(SIZEOF_LONG) +# define LZO_SIZEOF_LONG (SIZEOF_LONG) +#endif +#if defined(SIZEOF_LONG_LONG) +# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#endif +#if defined(SIZEOF___INT16) +# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +#endif +#if defined(SIZEOF___INT32) +# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +#endif +#if defined(SIZEOF___INT64) +# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +#endif +#if defined(SIZEOF_VOID_P) +# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +#endif +#if defined(SIZEOF_SIZE_T) +# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#endif +#if defined(SIZEOF_PTRDIFF_T) +# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#endif +#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +#if !defined(LZO_SIZEOF_SHORT) +# if (LZO_ARCH_CRAY_PVP) +# define LZO_SIZEOF_SHORT 8 +# elif (USHRT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,7) == 1) +# define LZO_SIZEOF_SHORT 1 +# elif (__LZO_LSR(USHRT_MAX,15) == 1) +# define LZO_SIZEOF_SHORT 2 +# elif (__LZO_LSR(USHRT_MAX,31) == 1) +# define LZO_SIZEOF_SHORT 4 +# elif (__LZO_LSR(USHRT_MAX,63) == 1) +# define LZO_SIZEOF_SHORT 8 +# elif (__LZO_LSR(USHRT_MAX,127) == 1) +# define LZO_SIZEOF_SHORT 16 +# else +# error "LZO_SIZEOF_SHORT" +# endif +#endif +#if !defined(LZO_SIZEOF_INT) +# if (LZO_ARCH_CRAY_PVP) +# define LZO_SIZEOF_INT 8 +# elif (UINT_MAX == LZO_0xffffL) +# define LZO_SIZEOF_INT 2 +# elif (UINT_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,7) == 1) +# define LZO_SIZEOF_INT 1 +# elif (__LZO_LSR(UINT_MAX,15) == 1) +# define LZO_SIZEOF_INT 2 +# elif (__LZO_LSR(UINT_MAX,31) == 1) +# define LZO_SIZEOF_INT 4 +# elif (__LZO_LSR(UINT_MAX,63) == 1) +# define LZO_SIZEOF_INT 8 +# elif (__LZO_LSR(UINT_MAX,127) == 1) +# define LZO_SIZEOF_INT 16 +# else +# error "LZO_SIZEOF_INT" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG) +# if (ULONG_MAX == LZO_0xffffffffL) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,7) == 1) +# define LZO_SIZEOF_LONG 1 +# elif (__LZO_LSR(ULONG_MAX,15) == 1) +# define LZO_SIZEOF_LONG 2 +# elif (__LZO_LSR(ULONG_MAX,31) == 1) +# define LZO_SIZEOF_LONG 4 +# elif (__LZO_LSR(ULONG_MAX,63) == 1) +# define LZO_SIZEOF_LONG 8 +# elif (__LZO_LSR(ULONG_MAX,127) == 1) +# define LZO_SIZEOF_LONG 16 +# else +# error "LZO_SIZEOF_LONG" +# endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +# if (LZO_CC_GNUC >= 0x030300ul) +# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) +# define LZO_SIZEOF_LONG_LONG 4 +# endif +# endif +# endif +#endif +#endif +#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +#if (LZO_ARCH_I086 && LZO_CC_DMC) +#elif (LZO_CC_CILLY) && defined(__GNUC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_SIZEOF_LONG_LONG 8 +#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_OS_WIN64 || defined(_WIN64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +# define LZO_SIZEOF___INT64 8 +#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_LONG_LONG 8 +#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define LZO_SIZEOF_LONG_LONG 8 +#endif +#endif +#endif +#if defined(__cplusplus) && defined(LZO_CC_GNUC) +# if (LZO_CC_GNUC < 0x020800ul) +# undef LZO_SIZEOF_LONG_LONG +# endif +#endif +#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +# undef LZO_SIZEOF_LONG_LONG +#endif +#if !defined(LZO_SIZEOF_VOID_P) +#if (LZO_ARCH_I086) +# define __LZO_WORDSIZE 2 +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +# define LZO_SIZEOF_VOID_P 2 +# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +# define LZO_SIZEOF_VOID_P 4 +# else +# error "LZO_MM" +# endif +#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +# define __LZO_WORDSIZE 1 +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +# define LZO_SIZEOF_VOID_P 2 +#elif (LZO_ARCH_H8300) +# if defined(__NORMAL_MODE__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 2 +# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define __LZO_WORDSIZE 4 +# define LZO_SIZEOF_VOID_P 4 +# else +# define __LZO_WORDSIZE 2 +# define LZO_SIZEOF_VOID_P 2 +# endif +# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +# endif +#elif (LZO_ARCH_M16C) +# define __LZO_WORDSIZE 2 +# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +# define LZO_SIZEOF_VOID_P 4 +# else +# define LZO_SIZEOF_VOID_P 2 +# endif +#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 4 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +# define __LZO_WORDSIZE 8 +# define LZO_SIZEOF_VOID_P 8 +#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_OS_OS400 || defined(__OS400__)) +# define __LZO_WORDSIZE LZO_SIZEOF_LONG +# define LZO_SIZEOF_VOID_P 16 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define LZO_SIZEOF_VOID_P 8 +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +#elif (LZO_ARCH_SPU) +# if 0 +# define __LZO_WORDSIZE 16 +# endif +# define LZO_SIZEOF_VOID_P 4 +#else +# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +#endif +#endif +#if !defined(LZO_WORDSIZE) +# if defined(__LZO_WORDSIZE) +# define LZO_WORDSIZE __LZO_WORDSIZE +# else +# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +# endif +#endif +#if !defined(LZO_SIZEOF_SIZE_T) +#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +# define LZO_SIZEOF_SIZE_T 2 +#else +# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +#endif +#endif +#if !defined(LZO_SIZEOF_PTRDIFF_T) +#if (LZO_ARCH_I086) +# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +# define LZO_SIZEOF_PTRDIFF_T 4 +# else +# define LZO_SIZEOF_PTRDIFF_T 2 +# endif +# else +# error "LZO_MM" +# endif +#else +# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +#endif +#endif +#if defined(LZO_ABI_NEUTRAL_ENDIAN) +# undef LZO_ABI_BIG_ENDIAN +# undef LZO_ABI_LITTLE_ENDIAN +#elif !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN) +#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) +# define LZO_ABI_BIG_ENDIAN 1 +#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif (LZO_ARCH_M68K || LZO_ARCH_S390) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) +# if (__LITTLE_ENDIAN__ == 1) +# define LZO_ABI_LITTLE_ENDIAN 1 +# else +# define LZO_ABI_BIG_ENDIAN 1 +# endif +#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +# define LZO_ABI_BIG_ENDIAN 1 +#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +# define LZO_ABI_LITTLE_ENDIAN 1 +#endif +#endif +#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN) +# error "this should not happen" +#endif +#if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "be" +#elif defined(LZO_ABI_LITTLE_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "le" +#elif defined(LZO_ABI_NEUTRAL_ENDIAN) +# define LZO_INFO_ABI_ENDIAN "neutral" +#endif +#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_I8LP16 1 +# define LZO_INFO_ABI_PM "i8lp16" +#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +# define LZO_ABI_ILP16 1 +# define LZO_INFO_ABI_PM "ilp16" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_ILP32 1 +# define LZO_INFO_ABI_PM "ilp32" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +# define LZO_ABI_LLP64 1 +# define LZO_INFO_ABI_PM "llp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_LP64 1 +# define LZO_INFO_ABI_PM "lp64" +#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +# define LZO_ABI_ILP64 1 +# define LZO_INFO_ABI_PM "ilp64" +#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +# define LZO_ABI_IP32L64 1 +# define LZO_INFO_ABI_PM "ip32l64" +#endif +#if !defined(__LZO_LIBC_OVERRIDE) +#if defined(LZO_LIBC_NAKED) +# define LZO_INFO_LIBC "naked" +#elif defined(LZO_LIBC_FREESTANDING) +# define LZO_INFO_LIBC "freestanding" +#elif defined(LZO_LIBC_MOSTLY_FREESTANDING) +# define LZO_INFO_LIBC "mfreestanding" +#elif defined(LZO_LIBC_ISOC90) +# define LZO_INFO_LIBC "isoc90" +#elif defined(LZO_LIBC_ISOC99) +# define LZO_INFO_LIBC "isoc99" +#elif defined(__dietlibc__) +# define LZO_LIBC_DIETLIBC 1 +# define LZO_INFO_LIBC "dietlibc" +#elif defined(_NEWLIB_VERSION) +# define LZO_LIBC_NEWLIB 1 +# define LZO_INFO_LIBC "newlib" +#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +# if defined(__UCLIBC_SUBLEVEL__) +# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# else +# define LZO_LIBC_UCLIBC 0x00090bL +# endif +# define LZO_INFO_LIBC "uclibc" +#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define LZO_INFO_LIBC "glibc" +#elif (LZO_CC_MWERKS) && defined(__MSL__) +# define LZO_LIBC_MSL __MSL__ +# define LZO_INFO_LIBC "msl" +#elif 1 && defined(__IAR_SYSTEMS_ICC__) +# define LZO_LIBC_ISOC90 1 +# define LZO_INFO_LIBC "isoc90" +#else +# define LZO_LIBC_DEFAULT 1 +# define LZO_INFO_LIBC "default" +#endif +#endif +#if !defined(__lzo_gnuc_extension__) +#if (LZO_CC_GNUC >= 0x020800ul) +# define __lzo_gnuc_extension__ __extension__ +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_gnuc_extension__ __extension__ +#else +# define __lzo_gnuc_extension__ +#endif +#endif +#if !defined(__lzo_ua_volatile) +# define __lzo_ua_volatile volatile +#endif +#if !defined(__lzo_alignof) +#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define __lzo_alignof(e) __alignof__(e) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_alignof(e) __alignof(e) +#endif +#endif +#if defined(__lzo_alignof) +# define __lzo_HAVE_alignof 1 +#endif +#if !defined(__lzo_constructor) +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_constructor __attribute__((__constructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_constructor __attribute__((__constructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_constructor __attribute__((__constructor__)) +#endif +#endif +#if defined(__lzo_constructor) +# define __lzo_HAVE_constructor 1 +#endif +#if !defined(__lzo_destructor) +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_destructor __attribute__((__destructor__,__used__)) +#elif (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_destructor __attribute__((__destructor__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_destructor __attribute__((__destructor__)) +#endif +#endif +#if defined(__lzo_destructor) +# define __lzo_HAVE_destructor 1 +#endif +#if defined(__lzo_HAVE_destructor) && !defined(__lzo_HAVE_constructor) +# error "this should not happen" +#endif +#if !defined(__lzo_inline) +#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __lzo_inline inline +#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __lzo_inline __inline +#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +# define __lzo_inline __inline__ +#elif (LZO_CC_DMC) +# define __lzo_inline __inline +#elif (LZO_CC_INTELC) +# define __lzo_inline __inline +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __lzo_inline __inline +#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +# define __lzo_inline __inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +# define __lzo_inline inline +#endif +#endif +#if defined(__lzo_inline) +# define __lzo_HAVE_inline 1 +#else +# define __lzo_inline +#endif +#if !defined(__lzo_forceinline) +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +# define __lzo_forceinline __forceinline +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_forceinline __forceinline +#endif +#endif +#if defined(__lzo_forceinline) +# define __lzo_HAVE_forceinline 1 +#else +# define __lzo_forceinline +#endif +#if !defined(__lzo_noinline) +#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) +# define __lzo_noinline __attribute__((__noinline__,__used__)) +#elif (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noinline __attribute__((__noinline__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +# define __lzo_noinline __declspec(noinline) +#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __lzo_noinline __declspec(noinline) +# endif +#endif +#endif +#if defined(__lzo_noinline) +# define __lzo_HAVE_noinline 1 +#else +# define __lzo_noinline +#endif +#if (defined(__lzo_HAVE_forceinline) || defined(__lzo_HAVE_noinline)) && !defined(__lzo_HAVE_inline) +# error "this should not happen" +#endif +#if !defined(__lzo_noreturn) +#if (LZO_CC_GNUC >= 0x020700ul) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +# define __lzo_noreturn __declspec(noreturn) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_noreturn __attribute__((__noreturn__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +# define __lzo_noreturn __declspec(noreturn) +#endif +#endif +#if defined(__lzo_noreturn) +# define __lzo_HAVE_noreturn 1 +#else +# define __lzo_noreturn +#endif +#if !defined(__lzo_nothrow) +#if (LZO_CC_GNUC >= 0x030300ul) +# define __lzo_nothrow __attribute__((__nothrow__)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) +# define __lzo_nothrow __declspec(nothrow) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +# define __lzo_nothrow __attribute__((__nothrow__)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_nothrow __attribute__((__nothrow__)) +#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) +# define __lzo_nothrow __declspec(nothrow) +#endif +#endif +#if defined(__lzo_nothrow) +# define __lzo_HAVE_nothrow 1 +#else +# define __lzo_nothrow +#endif +#if !defined(__lzo_restrict) +#if (LZO_CC_GNUC >= 0x030400ul) +# define __lzo_restrict __restrict__ +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +# define __lzo_restrict __restrict__ +#elif (LZO_CC_LLVM) +# define __lzo_restrict __restrict__ +#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) +# define __lzo_restrict __restrict +#endif +#endif +#if defined(__lzo_restrict) +# define __lzo_HAVE_restrict 1 +#else +# define __lzo_restrict +#endif +#if !defined(__lzo_likely) && !defined(__lzo_unlikely) +#if (LZO_CC_GNUC >= 0x030200ul) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +#endif +#endif +#if defined(__lzo_likely) +# define __lzo_HAVE_likely 1 +#else +# define __lzo_likely(e) (e) +#endif +#if defined(__lzo_unlikely) +# define __lzo_HAVE_unlikely 1 +#else +# define __lzo_unlikely(e) (e) +#endif +#if !defined(LZO_UNUSED) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED(var) ((void) &var) +# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +# define LZO_UNUSED(var) ((void) var) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED(var) if (&var) ; else +# elif (LZO_CC_KEILC) +# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +# elif (LZO_CC_PACIFICC) +# define LZO_UNUSED(var) ((void) sizeof(var)) +# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED(var) ((void) var) +# else +# define LZO_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(LZO_UNUSED_FUNC) +# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define LZO_UNUSED_FUNC(func) ((void) func) +# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_LLVM) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_UNUSED_FUNC(func) if (func) ; else +# elif (LZO_CC_MSC) +# define LZO_UNUSED_FUNC(func) ((void) &func) +# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +# else +# define LZO_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(LZO_UNUSED_LABEL) +# if (LZO_CC_WATCOMC) && defined(__cplusplus) +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# elif (LZO_CC_INTELC || LZO_CC_WATCOMC) +# define LZO_UNUSED_LABEL(l) if (0) goto l +# else +# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +# endif +#endif +#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) +# if 0 +# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var +# elif 0 && (LZO_CC_GNUC) +# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var +# else +# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +# else +# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +# endif +#endif +#if !defined(LZO_COMPILE_TIME_ASSERT) +# if (LZO_CC_AZTECC) +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_MSC && (_MSC_VER < 900)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +# endif +#endif +#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit +# define __lzo_cdecl_main __cdecl +# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_qsort __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_qsort _stdcall +# else +# define __lzo_cdecl_qsort __cdecl +# endif +# elif (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +# else +# define __lzo_cdecl __cdecl +# define __lzo_cdecl_atexit __cdecl +# define __lzo_cdecl_main __cdecl +# define __lzo_cdecl_qsort __cdecl +# endif +# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +# define __lzo_cdecl_sighandler __pascal +# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +# define __lzo_cdecl_sighandler _stdcall +# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __lzo_cdecl_sighandler __clrcall +# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __lzo_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __lzo_cdecl_sighandler _far _cdecl +# else +# define __lzo_cdecl_sighandler _cdecl +# endif +# else +# define __lzo_cdecl_sighandler __cdecl +# endif +#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) +# define __lzo_cdecl __cdecl +#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +# define __lzo_cdecl cdecl +#endif +#if !defined(__lzo_cdecl) +# define __lzo_cdecl +#endif +#if !defined(__lzo_cdecl_atexit) +# define __lzo_cdecl_atexit +#endif +#if !defined(__lzo_cdecl_main) +# define __lzo_cdecl_main +#endif +#if !defined(__lzo_cdecl_qsort) +# define __lzo_cdecl_qsort +#endif +#if !defined(__lzo_cdecl_sighandler) +# define __lzo_cdecl_sighandler +#endif +#if !defined(__lzo_cdecl_va) +# define __lzo_cdecl_va __lzo_cdecl +#endif +#if !defined(LZO_CFG_NO_WINDOWS_H) +#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +# else +# define LZO_HAVE_WINDOWS_H 1 +# endif +#endif +#endif +#if (LZO_ARCH_ALPHA) +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_AMD64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# define LZO_OPT_UNALIGNED64 1 +#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +#elif (LZO_ARCH_ARM) +# define LZO_OPT_AVOID_SHORT 1 +# define LZO_OPT_AVOID_USHORT 1 +#elif (LZO_ARCH_CRIS) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_I386) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +#elif (LZO_ARCH_IA64) +# define LZO_OPT_AVOID_INT_INDEX 1 +# define LZO_OPT_AVOID_UINT_INDEX 1 +# define LZO_OPT_PREFER_POSTINC 1 +#elif (LZO_ARCH_M68K) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(__mc68020__) && !defined(__mcoldfire__) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_MIPS) +# define LZO_OPT_AVOID_UINT_INDEX 1 +#elif (LZO_ARCH_POWERPC) +# define LZO_OPT_PREFER_PREINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +# if defined(LZO_ABI_BIG_ENDIAN) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# endif +#elif (LZO_ARCH_S390) +# define LZO_OPT_UNALIGNED16 1 +# define LZO_OPT_UNALIGNED32 1 +# if (LZO_SIZEOF_SIZE_T == 8) +# define LZO_OPT_UNALIGNED64 1 +# endif +#elif (LZO_ARCH_SH) +# define LZO_OPT_PREFER_POSTINC 1 +# define LZO_OPT_PREFER_PREDEC 1 +#endif +#if !defined(LZO_CFG_NO_INLINE_ASM) +#if defined(LZO_CC_LLVM) +# define LZO_CFG_NO_INLINE_ASM 1 +#endif +#endif +#if !defined(LZO_CFG_NO_UNALIGNED) +#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC) +# define LZO_CFG_NO_UNALIGNED 1 +#endif +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# undef LZO_OPT_UNALIGNED16 +# undef LZO_OPT_UNALIGNED32 +# undef LZO_OPT_UNALIGNED64 +#endif +#if defined(LZO_CFG_NO_INLINE_ASM) +#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +# define LZO_ASM_SYNTAX_MSC 1 +#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +# define LZO_ASM_SYNTAX_GNUC 1 +#endif +#if (LZO_ASM_SYNTAX_GNUC) +#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +# define __LZO_ASM_CLOBBER "ax" +#elif (LZO_CC_INTELC) +# define __LZO_ASM_CLOBBER "memory" +#else +# define __LZO_ASM_CLOBBER "cc", "memory" +#endif +#endif +#if defined(__LZO_INFOSTR_MM) +#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +# define __LZO_INFOSTR_MM "" +#elif defined(LZO_INFO_MM) +# define __LZO_INFOSTR_MM "." LZO_INFO_MM +#else +# define __LZO_INFOSTR_MM "" +#endif +#if defined(__LZO_INFOSTR_PM) +#elif defined(LZO_INFO_ABI_PM) +# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +#else +# define __LZO_INFOSTR_PM "" +#endif +#if defined(__LZO_INFOSTR_ENDIAN) +#elif defined(LZO_INFO_ABI_ENDIAN) +# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +#else +# define __LZO_INFOSTR_ENDIAN "" +#endif +#if defined(__LZO_INFOSTR_OSNAME) +#elif defined(LZO_INFO_OS_CONSOLE) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +#elif defined(LZO_INFO_OS_POSIX) +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +#else +# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +#endif +#if defined(__LZO_INFOSTR_LIBC) +#elif defined(LZO_INFO_LIBC) +# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +#else +# define __LZO_INFOSTR_LIBC "" +#endif +#if defined(__LZO_INFOSTR_CCVER) +#elif defined(LZO_INFO_CCVER) +# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +#else +# define __LZO_INFOSTR_CCVER "" +#endif +#define LZO_INFO_STRING \ + LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ + " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER + +#endif + +#endif + +#undef LZO_HAVE_CONFIG_H +#include "minilzo.h" + +#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2030) +# error "version mismatch in miniLZO source files" +#endif + +#ifdef MINILZO_HAVE_CONFIG_H +# define LZO_HAVE_CONFIG_H +#endif + +#ifndef __LZO_CONF_H +#define __LZO_CONF_H + +#if !defined(__LZO_IN_MINILZO) +#if defined(LZO_CFG_FREESTANDING) +# define LZO_LIBC_FREESTANDING 1 +# define LZO_OS_FREESTANDING 1 +# define ACC_LIBC_FREESTANDING 1 +# define ACC_OS_FREESTANDING 1 +#endif +#if defined(LZO_CFG_NO_UNALIGNED) +# define ACC_CFG_NO_UNALIGNED 1 +#endif +#if defined(LZO_ARCH_GENERIC) +# define ACC_ARCH_GENERIC 1 +#endif +#if defined(LZO_ABI_NEUTRAL_ENDIAN) +# define ACC_ABI_NEUTRAL_ENDIAN 1 +#endif +#if defined(LZO_HAVE_CONFIG_H) +# define ACC_CONFIG_NO_HEADER 1 +#endif +#if defined(LZO_CFG_EXTRA_CONFIG_HEADER) +# include LZO_CFG_EXTRA_CONFIG_HEADER +#endif +#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) +# error "include this file first" +#endif +#include "lzo/lzoconf.h" +#endif + +#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED) +# error "version mismatch" +#endif + +#if (LZO_CC_BORLANDC && LZO_ARCH_I086) +# pragma option -h +#endif + +#if (LZO_CC_MSC && (_MSC_VER >= 1000)) +# pragma warning(disable: 4127 4701) +#endif +#if (LZO_CC_MSC && (_MSC_VER >= 1300)) +# pragma warning(disable: 4820) +# pragma warning(disable: 4514 4710 4711) +#endif + +#if (LZO_CC_SUNPROC) +# pragma error_messages(off,E_END_OF_LOOP_CODE_NOT_REACHED) +# pragma error_messages(off,E_LOOP_NOT_ENTERED_AT_TOP) +#endif + +#if defined(__LZO_MMODEL_HUGE) && (!LZO_HAVE_MM_HUGE_PTR) +# error "this should not happen - check defines for __huge" +#endif + +#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING) +#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +# define ACC_WANT_ACC_INCD_H 1 +# define ACC_WANT_ACC_INCE_H 1 +# define ACC_WANT_ACC_INCI_H 1 +#elif 1 +# include +#else +# define ACC_WANT_ACC_INCD_H 1 +#endif + +#if (LZO_ARCH_I086) +# define ACC_MM_AHSHIFT LZO_MM_AHSHIFT +# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) +# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) +# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) +#endif + +#if !defined(lzo_uintptr_t) +# if defined(__LZO_MMODEL_HUGE) +# define lzo_uintptr_t unsigned long +# elif 1 && defined(LZO_OS_OS400) && (LZO_SIZEOF_VOID_P == 16) +# define __LZO_UINTPTR_T_IS_POINTER 1 + typedef char* lzo_uintptr_t; +# define lzo_uintptr_t lzo_uintptr_t +# elif (LZO_SIZEOF_SIZE_T == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t size_t +# elif (LZO_SIZEOF_LONG == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned long +# elif (LZO_SIZEOF_INT == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned int +# elif (LZO_SIZEOF_LONG_LONG == LZO_SIZEOF_VOID_P) +# define lzo_uintptr_t unsigned long long +# else +# define lzo_uintptr_t size_t +# endif +#endif +LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) + +#if 1 && !defined(LZO_CFG_FREESTANDING) +#if 1 && !defined(HAVE_STRING_H) +#define HAVE_STRING_H 1 +#endif +#if 1 && !defined(HAVE_MEMCMP) +#define HAVE_MEMCMP 1 +#endif +#if 1 && !defined(HAVE_MEMCPY) +#define HAVE_MEMCPY 1 +#endif +#if 1 && !defined(HAVE_MEMMOVE) +#define HAVE_MEMMOVE 1 +#endif +#if 1 && !defined(HAVE_MEMSET) +#define HAVE_MEMSET 1 +#endif +#endif + +#if 1 && defined(HAVE_STRING_H) +#include +#endif + +#if defined(LZO_CFG_FREESTANDING) +# undef HAVE_MEMCMP +# undef HAVE_MEMCPY +# undef HAVE_MEMMOVE +# undef HAVE_MEMSET +#endif + +#if !defined(HAVE_MEMCMP) +# undef memcmp +# define memcmp(a,b,c) lzo_memcmp(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memcmp(a,b,c) memcmp(a,b,c) +#endif +#if !defined(HAVE_MEMCPY) +# undef memcpy +# define memcpy(a,b,c) lzo_memcpy(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memcpy(a,b,c) memcpy(a,b,c) +#endif +#if !defined(HAVE_MEMMOVE) +# undef memmove +# define memmove(a,b,c) lzo_memmove(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memmove(a,b,c) memmove(a,b,c) +#endif +#if !defined(HAVE_MEMSET) +# undef memset +# define memset(a,b,c) lzo_memset(a,b,c) +#elif !defined(__LZO_MMODEL_HUGE) +# define lzo_memset(a,b,c) memset(a,b,c) +#endif + +#undef NDEBUG +#if defined(LZO_CFG_FREESTANDING) +# undef LZO_DEBUG +# define NDEBUG 1 +# undef assert +# define assert(e) ((void)0) +#else +# if !defined(LZO_DEBUG) +# define NDEBUG 1 +# endif +# include +#endif + +#if 0 && defined(__BOUNDS_CHECKING_ON) +# include +#else +# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt +# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) +#endif + +#if !defined(__lzo_inline) +# define __lzo_inline +#endif +#if !defined(__lzo_forceinline) +# define __lzo_forceinline +#endif +#if !defined(__lzo_noinline) +# define __lzo_noinline +#endif + +#if 1 +# define LZO_BYTE(x) ((unsigned char) (x)) +#else +# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) +#endif + +#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) +#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) +#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) +#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) + +#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) + +#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) + +#define LZO_SIZE(bits) (1u << (bits)) +#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) + +#define LZO_LSIZE(bits) (1ul << (bits)) +#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1) + +#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) +#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) + +#if !defined(DMUL) +#if 0 + +# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b))) +#else +# define DMUL(a,b) ((lzo_xint) ((a) * (b))) +#endif +#endif + +#if 1 && !defined(LZO_CFG_NO_UNALIGNED) +#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386) +# if (LZO_SIZEOF_SHORT == 2) +# define LZO_UNALIGNED_OK_2 +# endif +# if (LZO_SIZEOF_INT == 4) +# define LZO_UNALIGNED_OK_4 +# endif +#endif +#endif + +#if defined(LZO_UNALIGNED_OK_2) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2) +#endif +#if defined(LZO_UNALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +#elif defined(LZO_ALIGNED_OK_4) + LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +#endif + +#define MEMCPY8_DS(dest,src,len) \ + lzo_memcpy(dest,src,len); dest += len; src += len + +#define BZERO8_PTR(s,l,n) \ + lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) + +#define MEMCPY_DS(dest,src,len) \ + do *dest++ = *src++; while (--len > 0) + +__LZO_EXTERN_C int __lzo_init_done; +__LZO_EXTERN_C const char __lzo_copyright[]; +LZO_EXTERN(const lzo_bytep) lzo_copyright(void); + +#ifndef __LZO_PTR_H +#define __LZO_PTR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(lzo_uintptr_t) +# if defined(__LZO_MMODEL_HUGE) +# define lzo_uintptr_t unsigned long +# else +# define lzo_uintptr_t acc_uintptr_t +# ifdef __ACC_INTPTR_T_IS_POINTER +# define __LZO_UINTPTR_T_IS_POINTER 1 +# endif +# endif +#endif + +#if (LZO_ARCH_I086) +#define PTR(a) ((lzo_bytep) (a)) +#define PTR_ALIGNED_4(a) ((ACC_PTR_FP_OFF(a) & 3) == 0) +#define PTR_ALIGNED2_4(a,b) (((ACC_PTR_FP_OFF(a) | ACC_PTR_FP_OFF(b)) & 3) == 0) +#elif (LZO_MM_PVP) +#define PTR(a) ((lzo_bytep) (a)) +#define PTR_ALIGNED_8(a) ((((lzo_uintptr_t)(a)) >> 61) == 0) +#define PTR_ALIGNED2_8(a,b) ((((lzo_uintptr_t)(a)|(lzo_uintptr_t)(b)) >> 61) == 0) +#else +#define PTR(a) ((lzo_uintptr_t) (a)) +#define PTR_LINEAR(a) PTR(a) +#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) +#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) +#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) +#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) +#endif + +#define PTR_LT(a,b) (PTR(a) < PTR(b)) +#define PTR_GE(a,b) (PTR(a) >= PTR(b)) +#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) +#define pd(a,b) ((lzo_uint) ((a)-(b))) + +LZO_EXTERN(lzo_uintptr_t) +__lzo_ptr_linear(const lzo_voidp ptr); + +typedef union +{ + char a_char; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long a_long; + unsigned long a_ulong; + lzo_int a_lzo_int; + lzo_uint a_lzo_uint; + lzo_int32 a_lzo_int32; + lzo_uint32 a_lzo_uint32; + ptrdiff_t a_ptrdiff_t; + lzo_uintptr_t a_lzo_uintptr_t; + lzo_voidp a_lzo_voidp; + void * a_void_p; + lzo_bytep a_lzo_bytep; + lzo_bytepp a_lzo_bytepp; + lzo_uintp a_lzo_uintp; + lzo_uint * a_lzo_uint_p; + lzo_uint32p a_lzo_uint32p; + lzo_uint32 * a_lzo_uint32_p; + unsigned char * a_uchar_p; + char * a_char_p; +} +lzo_full_align_t; + +#ifdef __cplusplus +} +#endif + +#endif + +#define LZO_DETERMINISTIC + +#define LZO_DICT_USE_PTR +#if 0 && (LZO_ARCH_I086) +# undef LZO_DICT_USE_PTR +#endif + +#if defined(LZO_DICT_USE_PTR) +# define lzo_dict_t const lzo_bytep +# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +#else +# define lzo_dict_t lzo_uint +# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +#endif + +#endif + +#if !defined(MINILZO_CFG_SKIP_LZO_PTR) + +LZO_PUBLIC(lzo_uintptr_t) +__lzo_ptr_linear(const lzo_voidp ptr) +{ + lzo_uintptr_t p; + +#if (LZO_ARCH_I086) + p = (((lzo_uintptr_t)(ACC_PTR_FP_SEG(ptr))) << (16 - ACC_MM_AHSHIFT)) + (ACC_PTR_FP_OFF(ptr)); +#elif (LZO_MM_PVP) + p = (lzo_uintptr_t) (ptr); + p = (p << 3) | (p >> 61); +#else + p = (lzo_uintptr_t) PTR_LINEAR(ptr); +#endif + + return p; +} + +LZO_PUBLIC(unsigned) +__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) +{ +#if defined(__LZO_UINTPTR_T_IS_POINTER) + size_t n = (size_t) ptr; + n = (((n + size - 1) / size) * size) - n; +#else + lzo_uintptr_t p, n; + p = __lzo_ptr_linear(ptr); + n = (((p + size - 1) / size) * size) - p; +#endif + + assert(size > 0); + assert((long)n >= 0); + assert(n <= size); + return (unsigned)n; +} + +#endif + +/* If you use the LZO library in a product, I would appreciate that you + * keep this copyright string in the executable of your product. + */ + +const char __lzo_copyright[] = +#if !defined(__LZO_IN_MINLZO) + LZO_VERSION_STRING; +#else + "\r\n\n" + "LZO data compression library.\n" + "$Copyright: LZO (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer\n" + "\n" + "http://www.oberhumer.com $\n\n" + "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" + "$Built: " __DATE__ " " __TIME__ " $\n" + "$Info: " LZO_INFO_STRING " $\n"; +#endif + +LZO_PUBLIC(const lzo_bytep) +lzo_copyright(void) +{ +#if (LZO_OS_DOS16 && LZO_CC_TURBOC) + return (lzo_voidp) __lzo_copyright; +#else + return (const lzo_bytep) __lzo_copyright; +#endif +} + +LZO_PUBLIC(unsigned) +lzo_version(void) +{ + return LZO_VERSION; +} + +LZO_PUBLIC(const char *) +lzo_version_string(void) +{ + return LZO_VERSION_STRING; +} + +LZO_PUBLIC(const char *) +lzo_version_date(void) +{ + return LZO_VERSION_DATE; +} + +LZO_PUBLIC(const lzo_charp) +_lzo_version_string(void) +{ + return LZO_VERSION_STRING; +} + +LZO_PUBLIC(const lzo_charp) +_lzo_version_date(void) +{ + return LZO_VERSION_DATE; +} + +#define LZO_BASE 65521u +#define LZO_NMAX 5552 + +#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 +#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); +#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); +#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); +#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); + +LZO_PUBLIC(lzo_uint32) +lzo_adler32(lzo_uint32 adler, const lzo_bytep buf, lzo_uint len) +{ + lzo_uint32 s1 = adler & 0xffff; + lzo_uint32 s2 = (adler >> 16) & 0xffff; + unsigned k; + + if (buf == NULL) + return 1; + + while (len > 0) + { + k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX; + len -= k; + if (k >= 16) do + { + LZO_DO16(buf,0); + buf += 16; + k -= 16; + } while (k >= 16); + if (k != 0) do + { + s1 += *buf++; + s2 += s1; + } while (--k > 0); + s1 %= LZO_BASE; + s2 %= LZO_BASE; + } + return (s2 << 16) | s1; +} + +#undef LZO_DO1 +#undef LZO_DO2 +#undef LZO_DO4 +#undef LZO_DO8 +#undef LZO_DO16 + +#if !defined(MINILZO_CFG_SKIP_LZO_STRING) +#undef lzo_memcmp +#undef lzo_memcpy +#undef lzo_memmove +#undef lzo_memset +#if !defined(__LZO_MMODEL_HUGE) +# undef LZO_HAVE_MM_HUGE_PTR +#endif +#define lzo_hsize_t lzo_uint +#define lzo_hvoid_p lzo_voidp +#define lzo_hbyte_p lzo_bytep +#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f +#define lzo_hmemcmp lzo_memcmp +#define lzo_hmemcpy lzo_memcpy +#define lzo_hmemmove lzo_memmove +#define lzo_hmemset lzo_memset +#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 +#if !defined(LZOLIB_PUBLIC) +# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) +#endif +LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCMP) + const lzo_hbyte_p p1 = (const lzo_hbyte_p) s1; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) s2; + if __lzo_likely(len > 0) do + { + int d = *p1 - *p2; + if (d != 0) + return d; + p1++; p2++; + } while __lzo_likely(--len > 0); + return 0; +#else + return memcmp(s1, s2, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCPY) + lzo_hbyte_p p1 = (lzo_hbyte_p) dest; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; + if (!(len > 0) || p1 == p2) + return dest; + do + *p1++ = *p2++; + while __lzo_likely(--len > 0); + return dest; +#else + return memcpy(dest, src, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMMOVE) + lzo_hbyte_p p1 = (lzo_hbyte_p) dest; + const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; + if (!(len > 0) || p1 == p2) + return dest; + if (p1 < p2) + { + do + *p1++ = *p2++; + while __lzo_likely(--len > 0); + } + else + { + p1 += len; + p2 += len; + do + *--p1 = *--p2; + while __lzo_likely(--len > 0); + } + return dest; +#else + return memmove(dest, src, len); +#endif +} +LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) +{ +#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMSET) + lzo_hbyte_p p = (lzo_hbyte_p) s; + if __lzo_likely(len > 0) do + *p++ = (unsigned char) c; + while __lzo_likely(--len > 0); + return s; +#else + return memset(s, c, len); +#endif +} +#undef LZOLIB_PUBLIC +#endif + +#if !defined(__LZO_IN_MINILZO) + +#define ACC_WANT_ACC_CHK_CH 1 +#undef ACCCHK_ASSERT + + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint) + + ACCCHK_ASSERT_IS_SIGNED_T(lzo_int32) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32) + ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) + ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4) + +#if !defined(__LZO_UINTPTR_T_IS_POINTER) + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) +#endif + ACCCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) + + ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_xint) + ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint32)) + ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint)) + ACCCHK_ASSERT(sizeof(lzo_xint) == sizeof(lzo_uint32) || sizeof(lzo_xint) == sizeof(lzo_uint)) + +#endif +#undef ACCCHK_ASSERT + +LZO_PUBLIC(int) +_lzo_config_check(void) +{ + lzo_bool r = 1; + union { unsigned char c[2*sizeof(lzo_xint)]; lzo_xint l[2]; } u; + lzo_uintptr_t p; + +#if !defined(LZO_CFG_NO_CONFIG_CHECK) +#if defined(LZO_ABI_BIG_ENDIAN) + u.l[0] = u.l[1] = 0; u.c[sizeof(lzo_xint) - 1] = 128; + r &= (u.l[0] == 128); +#endif +#if defined(LZO_ABI_LITTLE_ENDIAN) + u.l[0] = u.l[1] = 0; u.c[0] = 128; + r &= (u.l[0] == 128); +#endif +#if defined(LZO_UNALIGNED_OK_2) + p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0]; + u.l[0] = u.l[1] = 0; + r &= ((* (const lzo_ushortp) (p+1)) == 0); +#endif +#if defined(LZO_UNALIGNED_OK_4) + p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0]; + u.l[0] = u.l[1] = 0; + r &= ((* (const lzo_uint32p) (p+1)) == 0); +#endif +#endif + + LZO_UNUSED(u); LZO_UNUSED(p); + return r == 1 ? LZO_E_OK : LZO_E_ERROR; +} + +int __lzo_init_done = 0; + +LZO_PUBLIC(int) +__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, + int s6, int s7, int s8, int s9) +{ + int r; + +#if defined(__LZO_IN_MINILZO) +#elif (LZO_CC_MSC && ((_MSC_VER) < 700)) +#else +#define ACC_WANT_ACC_CHK_CH 1 +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) +#endif +#undef ACCCHK_ASSERT + + __lzo_init_done = 1; + + if (v == 0) + return LZO_E_ERROR; + + r = (s1 == -1 || s1 == (int) sizeof(short)) && + (s2 == -1 || s2 == (int) sizeof(int)) && + (s3 == -1 || s3 == (int) sizeof(long)) && + (s4 == -1 || s4 == (int) sizeof(lzo_uint32)) && + (s5 == -1 || s5 == (int) sizeof(lzo_uint)) && + (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) && + (s7 == -1 || s7 == (int) sizeof(char *)) && + (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) && + (s9 == -1 || s9 == (int) sizeof(lzo_callback_t)); + if (!r) + return LZO_E_ERROR; + + r = _lzo_config_check(); + if (r != LZO_E_OK) + return r; + + return r; +} + +#if !defined(__LZO_IN_MINILZO) + +#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD) + +#if 0 +BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment, + WORD wHeapSize, LPSTR lpszCmdLine ) +#else +int __far __pascal LibMain ( int a, short b, short c, long d ) +#endif +{ + LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d); + return 1; +} + +#endif + +#endif + +#define do_compress _lzo1x_1_do_compress + +#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) + +#define LZO_NEED_DICT_H +#define D_BITS 14 +#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) +#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) + +#ifndef __LZO_CONFIG1X_H +#define __LZO_CONFIG1X_H + +#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) +# define LZO1X +#endif + +#if !defined(__LZO_IN_MINILZO) +#include "lzo/lzo1x.h" +#endif + +#define LZO_EOF_CODE +#undef LZO_DETERMINISTIC + +#define M1_MAX_OFFSET 0x0400 +#ifndef M2_MAX_OFFSET +#define M2_MAX_OFFSET 0x0800 +#endif +#define M3_MAX_OFFSET 0x4000 +#define M4_MAX_OFFSET 0xbfff + +#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) + +#define M1_MIN_LEN 2 +#define M1_MAX_LEN 2 +#define M2_MIN_LEN 3 +#ifndef M2_MAX_LEN +#define M2_MAX_LEN 8 +#endif +#define M3_MIN_LEN 3 +#define M3_MAX_LEN 33 +#define M4_MIN_LEN 3 +#define M4_MAX_LEN 9 + +#define M1_MARKER 0 +#define M2_MARKER 64 +#define M3_MARKER 32 +#define M4_MARKER 16 + +#ifndef MIN_LOOKAHEAD +#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) +#endif + +#if defined(LZO_NEED_DICT_H) + +#ifndef LZO_HASH +#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B +#endif +#define DL_MIN_LEN M2_MIN_LEN + +#ifndef __LZO_DICT_H +#define __LZO_DICT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(D_BITS) && defined(DBITS) +# define D_BITS DBITS +#endif +#if !defined(D_BITS) +# error "D_BITS is not defined" +#endif +#if (D_BITS < 16) +# define D_SIZE LZO_SIZE(D_BITS) +# define D_MASK LZO_MASK(D_BITS) +#else +# define D_SIZE LZO_USIZE(D_BITS) +# define D_MASK LZO_UMASK(D_BITS) +#endif +#define D_HIGH ((D_MASK >> 1) + 1) + +#if !defined(DD_BITS) +# define DD_BITS 0 +#endif +#define DD_SIZE LZO_SIZE(DD_BITS) +#define DD_MASK LZO_MASK(DD_BITS) + +#if !defined(DL_BITS) +# define DL_BITS (D_BITS - DD_BITS) +#endif +#if (DL_BITS < 16) +# define DL_SIZE LZO_SIZE(DL_BITS) +# define DL_MASK LZO_MASK(DL_BITS) +#else +# define DL_SIZE LZO_USIZE(DL_BITS) +# define DL_MASK LZO_UMASK(DL_BITS) +#endif + +#if (D_BITS != DL_BITS + DD_BITS) +# error "D_BITS does not match" +#endif +#if (D_BITS < 8 || D_BITS > 18) +# error "invalid D_BITS" +#endif +#if (DL_BITS < 8 || DL_BITS > 20) +# error "invalid DL_BITS" +#endif +#if (DD_BITS < 0 || DD_BITS > 6) +# error "invalid DD_BITS" +#endif + +#if !defined(DL_MIN_LEN) +# define DL_MIN_LEN 3 +#endif +#if !defined(DL_SHIFT) +# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) +#endif + +#define LZO_HASH_GZIP 1 +#define LZO_HASH_GZIP_INCREMENTAL 2 +#define LZO_HASH_LZO_INCREMENTAL_A 3 +#define LZO_HASH_LZO_INCREMENTAL_B 4 + +#if !defined(LZO_HASH) +# error "choose a hashing strategy" +#endif + +#undef DM +#undef DX + +#if (DL_MIN_LEN == 3) +# define _DV2_A(p,shift1,shift2) \ + (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) +# define _DV2_B(p,shift1,shift2) \ + (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) +# define _DV3_B(p,shift1,shift2,shift3) \ + ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) +#elif (DL_MIN_LEN == 2) +# define _DV2_A(p,shift1,shift2) \ + (( (lzo_xint)(p[0]) << shift1) ^ p[1]) +# define _DV2_B(p,shift1,shift2) \ + (( (lzo_xint)(p[1]) << shift1) ^ p[2]) +#else +# error "invalid DL_MIN_LEN" +#endif +#define _DV_A(p,shift) _DV2_A(p,shift,shift) +#define _DV_B(p,shift) _DV2_B(p,shift,shift) +#define DA2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) +#define DS2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) +#define DX2(p,s1,s2) \ + (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) +#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) +#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) +#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) +#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) +#define DM(v) DMS(v,0) + +#if (LZO_HASH == LZO_HASH_GZIP) +# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) + +#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) +# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) +# define _DINDEX(dv,p) (dv) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) +# define DVAL_NEXT(dv,p) \ + dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) +# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) +# define __LZO_HASH_INCREMENTAL +# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) +# define DVAL_NEXT(dv,p) \ + dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) +# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +# define DVAL_LOOKAHEAD DL_MIN_LEN + +#else +# error "choose a hashing strategy" +#endif + +#ifndef DINDEX +#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) +#endif +#if !defined(DINDEX1) && defined(D_INDEX1) +#define DINDEX1 D_INDEX1 +#endif +#if !defined(DINDEX2) && defined(D_INDEX2) +#define DINDEX2 D_INDEX2 +#endif + +#if !defined(__LZO_HASH_INCREMENTAL) +# define DVAL_FIRST(dv,p) ((void) 0) +# define DVAL_NEXT(dv,p) ((void) 0) +# define DVAL_LOOKAHEAD 0 +#endif + +#if !defined(DVAL_ASSERT) +#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) +static void DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) +{ + lzo_xint df; + DVAL_FIRST(df,(p)); + assert(DINDEX(dv,p) == DINDEX(df,p)); +} +#else +# define DVAL_ASSERT(dv,p) ((void) 0) +#endif +#endif + +#if defined(LZO_DICT_USE_PTR) +# define DENTRY(p,in) (p) +# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] +#else +# define DENTRY(p,in) ((lzo_uint) ((p)-(in))) +# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] +#endif + +#if (DD_BITS == 0) + +# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) +# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) +# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) + +#else + +# define UPDATE_D(dict,drun,dv,p,in) \ + dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +# define UPDATE_I(dict,drun,index,p,in) \ + dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +# define UPDATE_P(ptr,drun,p,in) \ + (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK + +#endif + +#if defined(LZO_DICT_USE_PTR) + +#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ + (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) + +#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ + (BOUNDS_CHECKING_OFF_IN_EXPR(( \ + m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ + PTR_LT(m_pos,in) || \ + (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) <= 0 || \ + m_off > max_offset ))) + +#else + +#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ + (m_off == 0 || \ + ((m_off = pd(ip, in) - m_off) > max_offset) || \ + (m_pos = (ip) - (m_off), 0) ) + +#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ + (pd(ip, in) <= m_off || \ + ((m_off = pd(ip, in) - m_off) > max_offset) || \ + (m_pos = (ip) - (m_off), 0) ) + +#endif + +#if defined(LZO_DETERMINISTIC) +# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET +#else +# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +#endif + +#endif + +#define DO_COMPRESS lzo1x_1_compress + +static __lzo_noinline lzo_uint +do_compress ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +{ + register const lzo_bytep ip; + lzo_bytep op; + const lzo_bytep const in_end = in + in_len; + const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5; + const lzo_bytep ii; + lzo_dict_p const dict = (lzo_dict_p) wrkmem; + + op = out; + ip = in; + ii = ip; + + ip += 4; + for (;;) + { + register const lzo_bytep m_pos; + lzo_uint m_off; + lzo_uint m_len; + lzo_uint dindex; + + DINDEX1(dindex,ip); + GINDEX(m_pos,m_off,dict,dindex,in); + if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) + goto literal; +#if 1 + if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) + goto try_match; + DINDEX2(dindex,ip); +#endif + GINDEX(m_pos,m_off,dict,dindex,in); + if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) + goto literal; + if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) + goto try_match; + goto literal; + +try_match: +#if 1 && defined(LZO_UNALIGNED_OK_2) + if (* (const lzo_ushortp) m_pos != * (const lzo_ushortp) ip) +#else + if (m_pos[0] != ip[0] || m_pos[1] != ip[1]) +#endif + { + } + else + { + if __lzo_likely(m_pos[2] == ip[2]) + { +#if 0 + if (m_off <= M2_MAX_OFFSET) + goto match; + if (lit <= 3) + goto match; + if (lit == 3) + { + assert(op - 2 > out); op[-2] |= LZO_BYTE(3); + *op++ = *ii++; *op++ = *ii++; *op++ = *ii++; + goto code_match; + } + if (m_pos[3] == ip[3]) +#endif + goto match; + } + else + { +#if 0 +#if 0 + if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3) +#else + if (m_off <= M1_MAX_OFFSET && lit == 3) +#endif + { + register lzo_uint t; + + t = lit; + assert(op - 2 > out); op[-2] |= LZO_BYTE(t); + do *op++ = *ii++; while (--t > 0); + assert(ii == ip); + m_off -= 1; + *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); + ip += 2; + goto match_done; + } +#endif + } + } + +literal: + UPDATE_I(dict,0,dindex,ip,in); + ++ip; + if __lzo_unlikely(ip >= ip_end) + break; + continue; + +match: + UPDATE_I(dict,0,dindex,ip,in); + if (pd(ip,ii) > 0) + { + register lzo_uint t = pd(ip,ii); + + if (t <= 3) + { + assert(op - 2 > out); + op[-2] |= LZO_BYTE(t); + } + else if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else + { + register lzo_uint tt = t - 18; + + *op++ = 0; + while (tt > 255) + { + tt -= 255; + *op++ = 0; + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); + } + do *op++ = *ii++; while (--t > 0); + } + + assert(ii == ip); + ip += 3; + if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ || + m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++ +#ifdef LZO1Y + || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++ + || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++ +#endif + ) + { + --ip; + m_len = pd(ip, ii); + assert(m_len >= 3); assert(m_len <= M2_MAX_LEN); + + if (m_off <= M2_MAX_OFFSET) + { + m_off -= 1; +#if defined(LZO1X) + *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); + *op++ = LZO_BYTE(m_off >> 3); +#elif defined(LZO1Y) + *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); + *op++ = LZO_BYTE(m_off >> 2); +#endif + } + else if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); + goto m3_m4_offset; + } + else +#if defined(LZO1X) + { + m_off -= 0x4000; + assert(m_off > 0); assert(m_off <= 0x7fff); + *op++ = LZO_BYTE(M4_MARKER | + ((m_off & 0x4000) >> 11) | (m_len - 2)); + goto m3_m4_offset; + } +#elif defined(LZO1Y) + goto m4_match; +#endif + } + else + { + { + const lzo_bytep end = in_end; + const lzo_bytep m = m_pos + M2_MAX_LEN + 1; + while (ip < end && *m == *ip) + m++, ip++; + m_len = pd(ip, ii); + } + assert(m_len > M2_MAX_LEN); + + if (m_off <= M3_MAX_OFFSET) + { + m_off -= 1; + if (m_len <= 33) + *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); + else + { + m_len -= 33; + *op++ = M3_MARKER | 0; + goto m3_m4_len; + } + } + else + { +#if defined(LZO1Y) +m4_match: +#endif + m_off -= 0x4000; + assert(m_off > 0); assert(m_off <= 0x7fff); + if (m_len <= M4_MAX_LEN) + *op++ = LZO_BYTE(M4_MARKER | + ((m_off & 0x4000) >> 11) | (m_len - 2)); + else + { + m_len -= M4_MAX_LEN; + *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11)); +m3_m4_len: + while (m_len > 255) + { + m_len -= 255; + *op++ = 0; + } + assert(m_len > 0); + *op++ = LZO_BYTE(m_len); + } + } + +m3_m4_offset: + *op++ = LZO_BYTE((m_off & 63) << 2); + *op++ = LZO_BYTE(m_off >> 6); + } + +#if 0 +match_done: +#endif + ii = ip; + if __lzo_unlikely(ip >= ip_end) + break; + } + + *out_len = pd(op, out); + return pd(in_end,ii); +} + +LZO_PUBLIC(int) +DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +{ + lzo_bytep op = out; + lzo_uint t; + + if __lzo_unlikely(in_len <= M2_MAX_LEN + 5) + t = in_len; + else + { + t = do_compress(in,in_len,op,out_len,wrkmem); + op += *out_len; + } + + if (t > 0) + { + const lzo_bytep ii = in + in_len - t; + + if (op == out && t <= 238) + *op++ = LZO_BYTE(17 + t); + else if (t <= 3) + op[-2] |= LZO_BYTE(t); + else if (t <= 18) + *op++ = LZO_BYTE(t - 3); + else + { + lzo_uint tt = t - 18; + + *op++ = 0; + while (tt > 255) + { + tt -= 255; + *op++ = 0; + } + assert(tt > 0); + *op++ = LZO_BYTE(tt); + } + do *op++ = *ii++; while (--t > 0); + } + + *op++ = M4_MARKER | 1; + *op++ = 0; + *op++ = 0; + + *out_len = pd(op, out); + return LZO_E_OK; +} + +#endif + +#undef do_compress +#undef DO_COMPRESS +#undef LZO_HASH + +#undef LZO_TEST_OVERRUN +#undef DO_DECOMPRESS +#define DO_DECOMPRESS lzo1x_decompress + +#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS) + +#if defined(LZO_TEST_OVERRUN) +# if !defined(LZO_TEST_OVERRUN_INPUT) +# define LZO_TEST_OVERRUN_INPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_OUTPUT) +# define LZO_TEST_OVERRUN_OUTPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define LZO_TEST_OVERRUN_LOOKBEHIND +# endif +#endif + +#undef TEST_IP +#undef TEST_OP +#undef TEST_LB +#undef TEST_LBO +#undef NEED_IP +#undef NEED_OP +#undef HAVE_TEST_IP +#undef HAVE_TEST_OP +#undef HAVE_NEED_IP +#undef HAVE_NEED_OP +#undef HAVE_ANY_IP +#undef HAVE_ANY_OP + +#if defined(LZO_TEST_OVERRUN_INPUT) +# if (LZO_TEST_OVERRUN_INPUT >= 1) +# define TEST_IP (ip < ip_end) +# endif +# if (LZO_TEST_OVERRUN_INPUT >= 2) +# define NEED_IP(x) \ + if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_OUTPUT) +# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +# define TEST_OP (op <= op_end) +# endif +# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +# undef TEST_OP +# define NEED_OP(x) \ + if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +#else +# define TEST_LB(m_pos) ((void) 0) +# define TEST_LBO(m_pos,o) ((void) 0) +#endif + +#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +# define TEST_IP (ip < ip_end) +#endif + +#if defined(TEST_IP) +# define HAVE_TEST_IP +#else +# define TEST_IP 1 +#endif +#if defined(TEST_OP) +# define HAVE_TEST_OP +#else +# define TEST_OP 1 +#endif + +#if defined(NEED_IP) +# define HAVE_NEED_IP +#else +# define NEED_IP(x) ((void) 0) +#endif +#if defined(NEED_OP) +# define HAVE_NEED_OP +#else +# define NEED_OP(x) ((void) 0) +#endif + +#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +# define HAVE_ANY_IP +#endif +#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +# define HAVE_ANY_OP +#endif + +#undef __COPY4 +#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src) + +#undef COPY4 +#if defined(LZO_UNALIGNED_OK_4) +# define COPY4(dst,src) __COPY4(dst,src) +#elif defined(LZO_ALIGNED_OK_4) +# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src)) +#endif + +#if defined(DO_DECOMPRESS) +LZO_PUBLIC(int) +DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +#endif +{ + register lzo_bytep op; + register const lzo_bytep ip; + register lzo_uint t; +#if defined(COPY_DICT) + lzo_uint m_off; + const lzo_bytep dict_end; +#else + register const lzo_bytep m_pos; +#endif + + const lzo_bytep const ip_end = in + in_len; +#if defined(HAVE_ANY_OP) + lzo_bytep const op_end = out + *out_len; +#endif +#if defined(LZO1Z) + lzo_uint last_m_off = 0; +#endif + + LZO_UNUSED(wrkmem); + +#if defined(COPY_DICT) + if (dict) + { + if (dict_len > M4_MAX_OFFSET) + { + dict += dict_len - M4_MAX_OFFSET; + dict_len = M4_MAX_OFFSET; + } + dict_end = dict + dict_len; + } + else + { + dict_len = 0; + dict_end = NULL; + } +#endif + + *out_len = 0; + + op = out; + ip = in; + + if (*ip > 17) + { + t = *ip++ - 17; + if (t < 4) + goto match_next; + assert(t > 0); NEED_OP(t); NEED_IP(t+1); + do *op++ = *ip++; while (--t > 0); + goto first_literal_run; + } + + while (TEST_IP && TEST_OP) + { + t = *ip++; + if (t >= 16) + goto match; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 15 + *ip++; + } + assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (PTR_ALIGNED2_4(op,ip)) + { +#endif + COPY4(op,ip); + op += 4; ip += 4; + if (--t > 0) + { + if (t >= 4) + { + do { + COPY4(op,ip); + op += 4; ip += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *ip++; while (--t > 0); + } + else + do *op++ = *ip++; while (--t > 0); + } +#if !defined(LZO_UNALIGNED_OK_4) + } + else +#endif +#endif +#if !defined(LZO_UNALIGNED_OK_4) + { + *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; + do *op++ = *ip++; while (--t > 0); + } +#endif + +first_literal_run: + + t = *ip++; + if (t >= 16) + goto match; +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(3); + t = 3; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - (1 + M2_MAX_OFFSET); + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(3); + *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + + do { +match: + if (t >= 64) + { +#if defined(COPY_DICT) +#if defined(LZO1X) + m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); + t = (t >> 4) - 3; +#elif defined(LZO1Z) + m_off = t & 0x1f; + if (m_off >= 0x1c) + m_off = last_m_off; + else + { + m_off = 1 + (m_off << 6) + (*ip++ >> 2); + last_m_off = m_off; + } + t = (t >> 5) - 1; +#endif +#else +#if defined(LZO1X) + m_pos = op - 1; + m_pos -= (t >> 2) & 7; + m_pos -= *ip++ << 3; + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_pos = op - 1; + m_pos -= (t >> 2) & 3; + m_pos -= *ip++ << 2; + t = (t >> 4) - 3; +#elif defined(LZO1Z) + { + lzo_uint off = t & 0x1f; + m_pos = op; + if (off >= 0x1c) + { + assert(last_m_off > 0); + m_pos -= last_m_off; + } + else + { + off = 1 + (off << 6) + (*ip++ >> 2); + m_pos -= off; + last_m_off = off; + } + } + t = (t >> 5) - 1; +#endif + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + goto copy_match; +#endif + } + else if (t >= 32) + { + t &= 31; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 31 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); + last_m_off = m_off; +#else + m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +#endif +#else +#if defined(LZO1Z) + { + lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); + m_pos = op - off; + last_m_off = off; + } +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos = op - 1; + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos = op - 1; + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif +#endif + ip += 2; + } + else if (t >= 16) + { +#if defined(COPY_DICT) + m_off = (t & 8) << 11; +#else + m_pos = op; + m_pos -= (t & 8) << 11; +#endif + t &= 7; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 7 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off += (ip[0] << 6) + (ip[1] >> 2); +#else + m_off += (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_off == 0) + goto eof_found; + m_off += 0x4000; +#if defined(LZO1Z) + last_m_off = m_off; +#endif +#else +#if defined(LZO1Z) + m_pos -= (ip[0] << 6) + (ip[1] >> 2); +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_pos == op) + goto eof_found; + m_pos -= 0x4000; +#if defined(LZO1Z) + last_m_off = pd((const lzo_bytep)op, m_pos); +#endif +#endif + } + else + { +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = 1 + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(2); + t = 2; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = 1 + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - 1; + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(2); + *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + } + +#if defined(COPY_DICT) + + NEED_OP(t+3-1); + t += 3-1; COPY_DICT(t,m_off) + +#else + + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) + { + assert((op - m_pos) >= 4); +#else + if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) + { +#endif + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4 - (3 - 1); + do { + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *m_pos++; while (--t > 0); + } + else +#endif + { +copy_match: + *op++ = *m_pos++; *op++ = *m_pos++; + do *op++ = *m_pos++; while (--t > 0); + } + +#endif + +match_done: +#if defined(LZO1Z) + t = ip[-1] & 3; +#else + t = ip[-2] & 3; +#endif + if (t == 0) + break; + +match_next: + assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +#if 0 + do *op++ = *ip++; while (--t > 0); +#else + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +#endif + t = *ip++; + } while (TEST_IP && TEST_OP); + } + +#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) + *out_len = pd(op, out); + return LZO_E_EOF_NOT_FOUND; +#endif + +eof_found: + assert(t == 1); + *out_len = pd(op, out); + return (ip == ip_end ? LZO_E_OK : + (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); + +#if defined(HAVE_NEED_IP) +input_overrun: + *out_len = pd(op, out); + return LZO_E_INPUT_OVERRUN; +#endif + +#if defined(HAVE_NEED_OP) +output_overrun: + *out_len = pd(op, out); + return LZO_E_OUTPUT_OVERRUN; +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +lookbehind_overrun: + *out_len = pd(op, out); + return LZO_E_LOOKBEHIND_OVERRUN; +#endif +} + +#endif + +#define LZO_TEST_OVERRUN +#undef DO_DECOMPRESS +#define DO_DECOMPRESS lzo1x_decompress_safe + +#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE) + +#if defined(LZO_TEST_OVERRUN) +# if !defined(LZO_TEST_OVERRUN_INPUT) +# define LZO_TEST_OVERRUN_INPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_OUTPUT) +# define LZO_TEST_OVERRUN_OUTPUT 2 +# endif +# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define LZO_TEST_OVERRUN_LOOKBEHIND +# endif +#endif + +#undef TEST_IP +#undef TEST_OP +#undef TEST_LB +#undef TEST_LBO +#undef NEED_IP +#undef NEED_OP +#undef HAVE_TEST_IP +#undef HAVE_TEST_OP +#undef HAVE_NEED_IP +#undef HAVE_NEED_OP +#undef HAVE_ANY_IP +#undef HAVE_ANY_OP + +#if defined(LZO_TEST_OVERRUN_INPUT) +# if (LZO_TEST_OVERRUN_INPUT >= 1) +# define TEST_IP (ip < ip_end) +# endif +# if (LZO_TEST_OVERRUN_INPUT >= 2) +# define NEED_IP(x) \ + if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_OUTPUT) +# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +# define TEST_OP (op <= op_end) +# endif +# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +# undef TEST_OP +# define NEED_OP(x) \ + if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +# endif +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +#else +# define TEST_LB(m_pos) ((void) 0) +# define TEST_LBO(m_pos,o) ((void) 0) +#endif + +#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +# define TEST_IP (ip < ip_end) +#endif + +#if defined(TEST_IP) +# define HAVE_TEST_IP +#else +# define TEST_IP 1 +#endif +#if defined(TEST_OP) +# define HAVE_TEST_OP +#else +# define TEST_OP 1 +#endif + +#if defined(NEED_IP) +# define HAVE_NEED_IP +#else +# define NEED_IP(x) ((void) 0) +#endif +#if defined(NEED_OP) +# define HAVE_NEED_OP +#else +# define NEED_OP(x) ((void) 0) +#endif + +#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +# define HAVE_ANY_IP +#endif +#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +# define HAVE_ANY_OP +#endif + +#undef __COPY4 +#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src) + +#undef COPY4 +#if defined(LZO_UNALIGNED_OK_4) +# define COPY4(dst,src) __COPY4(dst,src) +#elif defined(LZO_ALIGNED_OK_4) +# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src)) +#endif + +#if defined(DO_DECOMPRESS) +LZO_PUBLIC(int) +DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, + lzo_bytep out, lzo_uintp out_len, + lzo_voidp wrkmem ) +#endif +{ + register lzo_bytep op; + register const lzo_bytep ip; + register lzo_uint t; +#if defined(COPY_DICT) + lzo_uint m_off; + const lzo_bytep dict_end; +#else + register const lzo_bytep m_pos; +#endif + + const lzo_bytep const ip_end = in + in_len; +#if defined(HAVE_ANY_OP) + lzo_bytep const op_end = out + *out_len; +#endif +#if defined(LZO1Z) + lzo_uint last_m_off = 0; +#endif + + LZO_UNUSED(wrkmem); + +#if defined(COPY_DICT) + if (dict) + { + if (dict_len > M4_MAX_OFFSET) + { + dict += dict_len - M4_MAX_OFFSET; + dict_len = M4_MAX_OFFSET; + } + dict_end = dict + dict_len; + } + else + { + dict_len = 0; + dict_end = NULL; + } +#endif + + *out_len = 0; + + op = out; + ip = in; + + if (*ip > 17) + { + t = *ip++ - 17; + if (t < 4) + goto match_next; + assert(t > 0); NEED_OP(t); NEED_IP(t+1); + do *op++ = *ip++; while (--t > 0); + goto first_literal_run; + } + + while (TEST_IP && TEST_OP) + { + t = *ip++; + if (t >= 16) + goto match; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 15 + *ip++; + } + assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (PTR_ALIGNED2_4(op,ip)) + { +#endif + COPY4(op,ip); + op += 4; ip += 4; + if (--t > 0) + { + if (t >= 4) + { + do { + COPY4(op,ip); + op += 4; ip += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *ip++; while (--t > 0); + } + else + do *op++ = *ip++; while (--t > 0); + } +#if !defined(LZO_UNALIGNED_OK_4) + } + else +#endif +#endif +#if !defined(LZO_UNALIGNED_OK_4) + { + *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; + do *op++ = *ip++; while (--t > 0); + } +#endif + +first_literal_run: + + t = *ip++; + if (t >= 16) + goto match; +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(3); + t = 3; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - (1 + M2_MAX_OFFSET); + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(3); + *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + + do { +match: + if (t >= 64) + { +#if defined(COPY_DICT) +#if defined(LZO1X) + m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); + t = (t >> 4) - 3; +#elif defined(LZO1Z) + m_off = t & 0x1f; + if (m_off >= 0x1c) + m_off = last_m_off; + else + { + m_off = 1 + (m_off << 6) + (*ip++ >> 2); + last_m_off = m_off; + } + t = (t >> 5) - 1; +#endif +#else +#if defined(LZO1X) + m_pos = op - 1; + m_pos -= (t >> 2) & 7; + m_pos -= *ip++ << 3; + t = (t >> 5) - 1; +#elif defined(LZO1Y) + m_pos = op - 1; + m_pos -= (t >> 2) & 3; + m_pos -= *ip++ << 2; + t = (t >> 4) - 3; +#elif defined(LZO1Z) + { + lzo_uint off = t & 0x1f; + m_pos = op; + if (off >= 0x1c) + { + assert(last_m_off > 0); + m_pos -= last_m_off; + } + else + { + off = 1 + (off << 6) + (*ip++ >> 2); + m_pos -= off; + last_m_off = off; + } + } + t = (t >> 5) - 1; +#endif + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + goto copy_match; +#endif + } + else if (t >= 32) + { + t &= 31; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 31 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); + last_m_off = m_off; +#else + m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +#endif +#else +#if defined(LZO1Z) + { + lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); + m_pos = op - off; + last_m_off = off; + } +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos = op - 1; + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos = op - 1; + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif +#endif + ip += 2; + } + else if (t >= 16) + { +#if defined(COPY_DICT) + m_off = (t & 8) << 11; +#else + m_pos = op; + m_pos -= (t & 8) << 11; +#endif + t &= 7; + if (t == 0) + { + NEED_IP(1); + while (*ip == 0) + { + t += 255; + ip++; + NEED_IP(1); + } + t += 7 + *ip++; + } +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off += (ip[0] << 6) + (ip[1] >> 2); +#else + m_off += (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_off == 0) + goto eof_found; + m_off += 0x4000; +#if defined(LZO1Z) + last_m_off = m_off; +#endif +#else +#if defined(LZO1Z) + m_pos -= (ip[0] << 6) + (ip[1] >> 2); +#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) + m_pos -= (* (const lzo_ushortp) ip) >> 2; +#else + m_pos -= (ip[0] >> 2) + (ip[1] << 6); +#endif + ip += 2; + if (m_pos == op) + goto eof_found; + m_pos -= 0x4000; +#if defined(LZO1Z) + last_m_off = pd((const lzo_bytep)op, m_pos); +#endif +#endif + } + else + { +#if defined(COPY_DICT) +#if defined(LZO1Z) + m_off = 1 + (t << 6) + (*ip++ >> 2); + last_m_off = m_off; +#else + m_off = 1 + (t >> 2) + (*ip++ << 2); +#endif + NEED_OP(2); + t = 2; COPY_DICT(t,m_off) +#else +#if defined(LZO1Z) + t = 1 + (t << 6) + (*ip++ >> 2); + m_pos = op - t; + last_m_off = t; +#else + m_pos = op - 1; + m_pos -= t >> 2; + m_pos -= *ip++ << 2; +#endif + TEST_LB(m_pos); NEED_OP(2); + *op++ = *m_pos++; *op++ = *m_pos; +#endif + goto match_done; + } + +#if defined(COPY_DICT) + + NEED_OP(t+3-1); + t += 3-1; COPY_DICT(t,m_off) + +#else + + TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +#if !defined(LZO_UNALIGNED_OK_4) + if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) + { + assert((op - m_pos) >= 4); +#else + if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) + { +#endif + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4 - (3 - 1); + do { + COPY4(op,m_pos); + op += 4; m_pos += 4; t -= 4; + } while (t >= 4); + if (t > 0) do *op++ = *m_pos++; while (--t > 0); + } + else +#endif + { +copy_match: + *op++ = *m_pos++; *op++ = *m_pos++; + do *op++ = *m_pos++; while (--t > 0); + } + +#endif + +match_done: +#if defined(LZO1Z) + t = ip[-1] & 3; +#else + t = ip[-2] & 3; +#endif + if (t == 0) + break; + +match_next: + assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +#if 0 + do *op++ = *ip++; while (--t > 0); +#else + *op++ = *ip++; + if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +#endif + t = *ip++; + } while (TEST_IP && TEST_OP); + } + +#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) + *out_len = pd(op, out); + return LZO_E_EOF_NOT_FOUND; +#endif + +eof_found: + assert(t == 1); + *out_len = pd(op, out); + return (ip == ip_end ? LZO_E_OK : + (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); + +#if defined(HAVE_NEED_IP) +input_overrun: + *out_len = pd(op, out); + return LZO_E_INPUT_OVERRUN; +#endif + +#if defined(HAVE_NEED_OP) +output_overrun: + *out_len = pd(op, out); + return LZO_E_OUTPUT_OVERRUN; +#endif + +#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +lookbehind_overrun: + *out_len = pd(op, out); + return LZO_E_LOOKBEHIND_OVERRUN; +#endif +} + +#endif + +/***** End of minilzo.c *****/ + diff --git a/extern/lzo/minilzo/minilzo.h b/extern/lzo/minilzo/minilzo.h new file mode 100644 index 00000000000..93916bc89b2 --- /dev/null +++ b/extern/lzo/minilzo/minilzo.h @@ -0,0 +1,112 @@ +/* minilzo.h -- mini subset of the LZO real-time data compression library + + This file is part of the LZO real-time data compression library. + + Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + All Rights Reserved. + + The LZO library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + The LZO library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with the LZO library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Markus F.X.J. Oberhumer + + http://www.oberhumer.com/opensource/lzo/ + */ + +/* + * NOTE: + * the full LZO package can be found at + * http://www.oberhumer.com/opensource/lzo/ + */ + + +#ifndef __MINILZO_H +#define __MINILZO_H + +#define MINILZO_VERSION 0x2030 + +#ifdef __LZOCONF_H +# error "you cannot use both LZO and miniLZO" +#endif + +#undef LZO_HAVE_CONFIG_H +#include "lzoconf.h" + +#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) +# error "version mismatch in header files" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/*********************************************************************** +// +************************************************************************/ + +/* Memory required for the wrkmem parameter. + * When the required size is 0, you can also pass a NULL pointer. + */ + +#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS +#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) +#define LZO1X_MEM_DECOMPRESS (0) + + +/* compression */ +LZO_EXTERN(int) +lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem ); + +/* decompression */ +LZO_EXTERN(int) +lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + +/* safe decompression with overrun testing */ +LZO_EXTERN(int) +lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, + lzo_bytep dst, lzo_uintp dst_len, + lzo_voidp wrkmem /* NOT USED */ ); + + +#define LZO_OUT_LEN(size) ((size) + (size) / 16 + 64 + 3) + +#define LZO_HEAP_ALLOC(var,size) \ + lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ] + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* already included */ + diff --git a/extern/make/msvc_9_0/build_install_all.vcproj b/extern/make/msvc_9_0/build_install_all.vcproj new file mode 100644 index 00000000000..7909bbe63a0 --- /dev/null +++ b/extern/make/msvc_9_0/build_install_all.vcproj @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/ode/Makefile b/extern/ode/Makefile deleted file mode 100644 index 51be666aa69..00000000000 --- a/extern/ode/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2002 by Hans Lambermont -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** - -include nan_definitions.mk - -DISTDIR = dist -CP = ../../intern/tools/cpifdiff.sh -USERSETTINGS = ./dist/config/user-settings -TEMPSETTINGS = ./user-settings - -all: - [ -d $(DISTDIR)/lib ] || mkdir $(DISTDIR)/lib - # prepare settings for patching, clean in case of interruption - ifeq ($(OS),$(findstring $(OS), "darwin windows")) - [ ! -f $(TEMPSETTINGS) ] || mv $(TEMPSETTINGS) $(USERSETTINGS) - cp $(USERSETTINGS) $(TEMPSETTINGS) - endif - ifeq ($(OS),freebsd) - (grep FreeBSD $(DISTDIR)/Makefile >/dev/null ; \ - [ $$? -eq 0 ] || patch < patchfile.FreeBSD ) - endif - ifeq ($(OS),darwin) - cat $(TEMPSETTINGS) | sed s/unix-gcc/osx/ > $(USERSETTINGS) - endif - ifeq ($(OS),windows) - # compile with MSVC - cat $(TEMPSETTINGS) | sed s/unix-gcc/msvc/ > $(USERSETTINGS) - env PATH=".:$(PATH)" $(MAKE) -C $(DISTDIR) - endif - ifeq ($(OS),$(findstring $(OS), "freebsd linux darwin")) - $(MAKE) -C $(DISTDIR) - endif - # restore settings - ifeq ($(OS),$(findstring $(OS), "darwin windows")) - mv $(TEMPSETTINGS) $(USERSETTINGS) - endif - -# fake debug target -debug: - -install: all - ifeq ($(OS),$(findstring $(OS), "freebsd linux darwin")) - [ -d $(LCGDIR) ] || mkdir $(LCGDIR) - [ -d $(NAN_ODE) ] || mkdir $(NAN_ODE) - [ -d $(NAN_ODE)/include ] || mkdir $(NAN_ODE)/include - [ -d $(NAN_ODE)/include/ode ] || mkdir $(NAN_ODE)/include/ode - [ -d $(NAN_ODE)/lib ] || mkdir $(NAN_ODE)/lib - [ -d $(NAN_ODE)/ode ] || mkdir $(NAN_ODE)/ode - [ -d $(NAN_ODE)/ode/src ] || mkdir $(NAN_ODE)/ode/src - @$(CP) $(DISTDIR)/lib/libode.a $(NAN_ODE)/lib/ - @$(CP) $(DISTDIR)/include/ode/*.h $(NAN_ODE)/include/ode/ - @$(CP) $(DISTDIR)/ode/src/array.h $(NAN_ODE)/ode/src/ - @$(CP) $(DISTDIR)/ode/src/joint.h $(NAN_ODE)/ode/src/ - @$(CP) $(DISTDIR)/ode/src/objects.h $(NAN_ODE)/ode/src/ - @$(CP) $(DISTDIR)/ode/src/obstack.h $(NAN_ODE)/ode/src/ - ifeq ($(OS),darwin) - ranlib $(NAN_ODE)/lib/libode.a - endif - endif - ifeq ($(OS),windows) - @echo "====> $(MAKE) $@ in $(SOURCEDIR)" - [ -d $(LCGDIR) ] || mkdir $(LCGDIR) - [ -d $(NAN_ODE) ] || mkdir $(NAN_ODE) - [ -d $(NAN_ODE)/include ] || mkdir $(NAN_ODE)/include - [ -d $(NAN_ODE)/include/ode ] || mkdir $(NAN_ODE)/include/ode - [ -d $(NAN_ODE)/lib ] || mkdir $(NAN_ODE)/lib - [ -d $(NAN_ODE)/ode ] || mkdir $(NAN_ODE)/ode - [ -d $(NAN_ODE)/ode/src ] || mkdir $(NAN_ODE)/ode/src - cp $(DISTDIR)/lib/ode.lib $(NAN_ODE)/lib/libode.a - cp $(DISTDIR)/include/ode/*.h $(NAN_ODE)/include/ode/ - cp $(DISTDIR)/ode/src/array.h $(NAN_ODE)/ode/src/ - cp $(DISTDIR)/ode/src/joint.h $(NAN_ODE)/ode/src/ - cp $(DISTDIR)/ode/src/objects.h $(NAN_ODE)/ode/src/ - cp $(DISTDIR)/ode/src/obstack.h $(NAN_ODE)/ode/src/ - endif - -clean: - ifeq ($(OS),$(findstring $(OS), "freebsd linux darwin")) - [ ! -f dist/Makefile ] || $(MAKE) -C dist clean - endif - ifeq ($(OS),freebsd) - (grep FreeBSD $(DISTDIR)/Makefile >/dev/null ; \ - [ $$? -ne 0 ] || patch -R < patchfile.FreeBSD ) - endif - diff --git a/extern/ode/dist/INSTALL b/extern/ode/dist/INSTALL deleted file mode 100644 index f82285db1b2..00000000000 --- a/extern/ode/dist/INSTALL +++ /dev/null @@ -1,44 +0,0 @@ - -here are the steps to buid ODE: - -(1) get the GNU 'make' tool. many unix platforms come with this, although - sometimes it is called 'gmake'. i have provided a version of GNU make - for windows at: http://q12.org/ode/bin/make.exe - -(2) edit the settings in the file config/user-settings. the list of supported - platforms is given in that file. - -(3) run 'make' to configure and build ODE and the graphical test programs. - to build parts of ODE the make targets are: - - make configure create configuration file include/ode/config.h - make ode-lib build the core ODE library - make drawstuff-lib build the OpenGL-based graphics library - make ode-test build some ODE tests (they need drawstuff) - make drawstuff-test build a test app for the drawstuff library - - all of these targets will do an implicit 'make configure'. if the - configurator screws up then you can edit the settings directly in - include/ode/config.h. - -(4) to install the ODE library onto your system you should copy the 'lib' and - 'include' directories to a suitable place, e.g. on unix: - - include/ode --> /usr/local/include/ode - lib/libode.a --> /usr/local/lib/libode.a - -ODE has been verified to build on the following platforms: - - config ode-lib ode-test - ------ ------- -------- - windows - MSVC msvc * * - MinGW mingw * * - CygWin cygwin * * - linux (x86, mandrake 8.1) unix-gcc * * - linux (alpha, debian 2.2) unix-gcc * ? - linux (RS/6000, debian 2.2) unix-gcc * ? - linux (Sparc U60, debian 2.2) unix-gcc * ? - freebsd 4.3 unix-gcc * ? - Mac OS-X osx * ? - Solaris 8 (Sparc R220) unix-gcc * ? diff --git a/extern/ode/dist/LICENSE-BSD.TXT b/extern/ode/dist/LICENSE-BSD.TXT deleted file mode 100644 index 05929239487..00000000000 --- a/extern/ode/dist/LICENSE-BSD.TXT +++ /dev/null @@ -1,34 +0,0 @@ - -This is the BSD-style license for the Open Dynamics Engine ----------------------------------------------------------- - -Open Dynamics Engine -Copyright (c) 2001,2002, Russell L. Smith. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -Neither the names of ODE's copyright owner nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/extern/ode/dist/LICENSE.TXT b/extern/ode/dist/LICENSE.TXT deleted file mode 100644 index cfe59bcadb8..00000000000 --- a/extern/ode/dist/LICENSE.TXT +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/extern/ode/dist/Makefile b/extern/ode/dist/Makefile deleted file mode 100644 index 34fbd53f792..00000000000 --- a/extern/ode/dist/Makefile +++ /dev/null @@ -1,280 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -USER_SETTINGS=config/user-settings -include $(USER_SETTINGS) -PLATFORM_MAKEFILE=config/makefile.$(PLATFORM) -include $(PLATFORM_MAKEFILE) - -############################################################################## -# check some variables that were supposed to be defined - -ifneq ($(BUILD),debug) -ifneq ($(BUILD),release) -$(error the BUILD variable is not set properly) -endif -endif - -ifneq ($(PRECISION),SINGLE) -ifneq ($(PRECISION),DOUBLE) -$(error the PRECISION variable is not set properly) -endif -endif - -############################################################################## -# package settings - -ODE_SRC = \ - ode/src/array.cpp \ - ode/src/error.cpp \ - ode/src/memory.cpp \ - ode/src/obstack.cpp \ - ode/src/odemath.cpp \ - ode/src/matrix.cpp \ - ode/src/misc.cpp \ - ode/src/rotation.cpp \ - ode/src/mass.cpp \ - ode/src/ode.cpp \ - ode/src/step.cpp \ - ode/src/lcp.cpp \ - ode/src/joint.cpp \ - ode/src/space.cpp \ - ode/src/geom.cpp \ - ode/src/timer.cpp \ - ode/src/mat.cpp \ - ode/src/testing.cpp -ODE_PREGEN_SRC = \ - ode/src/fastldlt.c \ - ode/src/fastlsolve.c \ - ode/src/fastltsolve.c \ - ode/src/fastdot.c - -ifeq ($(WINDOWS),1) -DRAWSTUFF_SRC = drawstuff/src/drawstuff.cpp drawstuff/src/windows.cpp -RESOURCE_FILE=lib/resources.RES -else -DRAWSTUFF_SRC = drawstuff/src/drawstuff.cpp drawstuff/src/x11.cpp -endif - -ODE_LIB_NAME=ode -DRAWSTUFF_LIB_NAME=drawstuff - -INCPATH=include -LIBPATH=lib - -ODE_TEST_SRC_CPP = \ - ode/test/test_ode.cpp \ - ode/test/test_chain2.cpp \ - ode/test/test_hinge.cpp \ - ode/test/test_slider.cpp \ - ode/test/test_collision.cpp \ - ode/test/test_boxstack.cpp \ - ode/test/test_buggy.cpp \ - ode/test/test_joints.cpp \ - ode/test/test_space.cpp \ - ode/test/test_I.cpp \ - ode/test/test_step.cpp \ - ode/test/test_friction.cpp -ODE_TEST_SRC_C = \ - ode/test/test_chain1.c -DRAWSTUFF_TEST_SRC_CPP = \ - drawstuff/dstest/dstest.cpp - -CONFIGURATOR_SRC=configurator.c -CONFIG_H=include/ode/config.h - -############################################################################## -# derived things - -DEFINES= - -# add some defines depending on the build mode -ifeq ($(BUILD),release) -DEFINES+=$(C_DEF)dNODEBUG -endif -ifeq ($(BUILD),debug) -DEFINES+=$(C_DEF)dDEBUG_ALLOC -endif - -# object file names -ODE_PREGEN_OBJECTS=$(ODE_PREGEN_SRC:%.c=%$(OBJ)) -ODE_OBJECTS=$(ODE_SRC:%.cpp=%$(OBJ)) $(ODE_PREGEN_OBJECTS) -DRAWSTUFF_OBJECTS=$(DRAWSTUFF_SRC:%.cpp=%$(OBJ)) $(RESOURCE_FILE) - -# side-effect variables causing creation of files containing lists of -# filenames to be linked, to work around command-line-length limitations -# on outdated 16-bit operating systems. because of command-line length -# limitations we cannot issue a link command with all object filenames -# specified (because this command is too long and overflows the command -# buffer), but instead must create a file containing all object filenames -# to be linked, and specify this list-file with @listfile on the command-line. -# -# the difficult part is doing this in a flexible way; we don't want to -# hard-code the to-be-linked object filenames in a file, but instead -# want to dynamically create a file containing a list of all object filenames -# within the $XXX_OBJECTS makefile variables. to do this, we use side-effect -# variables. -# -# idea: when these variables are EVALUATED (i.e. later during rule execution, -# not now during variable definition), they cause a SIDE EFFECT which creates -# a file with the list of all ODE object files. why the chicanery??? because -# if we have a command-line length limitation, no SINGLE command we issue will -# be able to create a file containing all object files to be linked -# (because that command itself would need to include all filenames, making -# it too long to be executed). instead, we must use the gnu-make "foreach" -# function, combined - probably in an unintended way - with the "shell" -# function. this is probably unintended because we are not using the "shell" -# function to return a string value for variable evaluation, but are instead -# using the "shell" function to cause a side effect (appending of each filename -# to the filename-list-file). -# -# one possible snag is that, forbidding use of any external EXE utilities and -# relying only on the facilities provided by the outdated 16-bit operating -# system, there is no way to issue a SERIES of commands which append text to -# the end of a file WITHOUT adding newlines. therefore, the list of to-be- -# linked object files is separated by newlines in the list file. fortunately, -# the linker utility for this outdated 16-bit operating system accepts -# filenames on separate lines in the list file. - -# remember: when we evaluate these variables later, this causes the creation -# of the appropriate list file. -ifeq ($(WINDOWS16),1) -SIDE_EFFECT_ODE_OBJLIST = $(foreach o,$(ODE_OBJECTS),$(shell echo $(o) >> odeobj.txt )) -SIDE_EFFECT_DRAWSTUFF_OBJLIST = $(foreach o,$(DRAWSTUFF_OBJECTS),$(shell echo $(o) >> dsobj.txt )) -endif - -# library file names -ODE_LIB=$(LIBPATH)/$(LIB_PREFIX)$(ODE_LIB_NAME)$(LIB_SUFFIX) -DRAWSTUFF_LIB=$(LIBPATH)/$(LIB_PREFIX)$(DRAWSTUFF_LIB_NAME)$(LIB_SUFFIX) - -# executable file names -ODE_TEST_EXE=$(ODE_TEST_SRC_CPP:%.cpp=%.exe) $(ODE_TEST_SRC_C:%.c=%.exe) -DRAWSTUFF_TEST_EXE=$(DRAWSTUFF_TEST_SRC_CPP:%.cpp=%.exe) -CONFIGURATOR_EXE=$(CONFIGURATOR_SRC:%.c=%.exe) - -############################################################################## -# rules -# -# NOTE: the '.c' files are pregenerated sources, and must be compiled with -# -O1 optimization. that is why the rule for .c files is a bit different. -# why should it be compiled with O1? it is numerical code that is generated -# by fbuild. O1 optimization is used to preserve the operation orders that -# were discovered by fbuild to be the fastest on that platform. believe it or -# not, O2 makes this code run much slower for most compilers. - -debug: all -all: ode-lib drawstuff-lib ode-test drawstuff-test - @echo SUCCESS - -ode-lib: configure $(ODE_LIB) -drawstuff-lib: configure $(DRAWSTUFF_LIB) -ode-test: ode-lib drawstuff-lib $(ODE_TEST_EXE) -drawstuff-test: drawstuff-lib $(DRAWSTUFF_TEST_EXE) - -ifndef ODE_LIB_AR_RULE -ODE_LIB_AR_RULE=$(AR)$@ -endif - -$(ODE_LIB): pre_ode_lib $(ODE_OBJECTS) -ifeq ($(WINDOWS16),1) -# if we have a command-line-length limitation, then dynamically create -# a file containing all object filenames, and pass this file to the linker -# instead of directly specifying the object filenames on the command line. -# the very evaluation of the following variable causes creation of file -# odeobj.txt - $(SIDE_EFFECT_ODE_OBJLIST) - $(ODE_LIB_AR_RULE) @odeobj.txt -else -# if we have no command-line-length limitation, directly specify all -# object files to be linked. - $(ODE_LIB_AR_RULE) $(ODE_OBJECTS) -endif - -ifdef RANLIB - $(RANLIB) $@ -endif - -$(DRAWSTUFF_LIB): pre_drawstuff_lib $(DRAWSTUFF_OBJECTS) -ifeq ($WINDOWS16),1) -# if we have a command-line-length limitation, then do the same as above. - $(SIDE_EFFECT_DRAWSTUFF_OBJLIST) - $(AR)$@ @dsobj.txt -else -# if we have no command-line-length limitation, directly specify all object -# files to be linked. - $(AR)$@ $(DRAWSTUFF_OBJECTS) -endif -ifdef RANLIB - $(RANLIB) $@ -endif - -# rules to be executed before library linking starts: delete list file (if one is used) - -pre_ode_lib: -ifeq ($WINDOWS16),1) - $(DEL_CMD) odeobj.txt -endif - -pre_drawstuff_lib: -ifeq ($WINDOWS16),1) - $(DEL_CMD) dsobj.txt -endif - -clean: - -$(DEL_CMD) $(ODE_OBJECTS) $(ODE_TEST_EXE) $(ODE_LIB) $(DRAWSTUFF_OBJECTS) $(DRAWSTUFF_TEST_EXE) $(DRAWSTUFF_LIB) ode/test/*$(OBJ) drawstuff/dstest/*$(OBJ) $(CONFIGURATOR_EXE) $(CONFIG_H) - -%$(OBJ): %.c - $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $< - -%$(OBJ): %.cpp - $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)$(OPT) $(C_OUT)$@ $< - -%.exe: %$(OBJ) - $(CC) $(C_EXEOUT)$@ $< $(ODE_LIB) $(DRAWSTUFF_LIB) $(RESOURCE_FILE) $(LINK_OPENGL) $(LINK_MATH) - -# windows specific rules - -lib/resources.RES: drawstuff/src/resources.rc - $(RC_RULE) - - -# configurator rules - -configure: $(CONFIG_H) - -$(CONFIG_H): $(CONFIGURATOR_EXE) $(USER_SETTINGS) $(PLATFORM_MAKEFILE) - $(THIS_DIR)$(CONFIGURATOR_EXE) $(CONFIG_H) "$(CC) $(DEFINES) $(C_EXEOUT)" "$(DEL_CMD)" $(THIS_DIR) - -$(CONFIGURATOR_EXE): $(CONFIGURATOR_SRC) $(USER_SETTINGS) $(PLATFORM_MAKEFILE) - $(CC) $(C_DEF)d$(PRECISION) $(DEFINES) $(C_EXEOUT)$@ $< - - -# unix-gcc specific dependency making - -DEP_RULE=gcc -M $(C_INC)$(INCPATH) $(DEFINES) -depend: $(ODE_SRC) $(ODE_PREGEN_SRC) $(DRAWSTUFF_SRC) $(ODE_TEST_SRC_CPP) $(ODE_TEST_SRC_C) $(DRAWSTUFF_TEST_SRC_CPP) - $(DEP_RULE) $(ODE_SRC) $(ODE_PREGEN_SRC) | tools/process_deps ode/src/ > Makefile.deps - $(DEP_RULE) $(DRAWSTUFF_SRC) | tools/process_deps drawstuff/src/ >> Makefile.deps - $(DEP_RULE) $(ODE_TEST_SRC_CPP) | tools/process_deps ode/test/ >> Makefile.deps - $(DEP_RULE) $(DRAWSTUFF_TEST_SRC_CPP) | tools/process_deps drawstuff/dstest/ >> Makefile.deps - -include Makefile.deps diff --git a/extern/ode/dist/Makefile.deps b/extern/ode/dist/Makefile.deps deleted file mode 100644 index ad11f01353f..00000000000 --- a/extern/ode/dist/Makefile.deps +++ /dev/null @@ -1,456 +0,0 @@ -ode/src/array.o: \ - ode/src/array.cpp \ - include/ode/config.h \ - include/ode/memory.h \ - include/ode/error.h \ - ode/src/array.h -ode/src/error.o: \ - ode/src/error.cpp \ - include/ode/config.h \ - include/ode/error.h -ode/src/memory.o: \ - ode/src/memory.cpp \ - include/ode/config.h \ - include/ode/memory.h \ - include/ode/error.h -ode/src/obstack.o: \ - ode/src/obstack.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - ode/src/obstack.h \ - ode/src/objects.h \ - include/ode/mass.h \ - ode/src/array.h -ode/src/odemath.o: \ - ode/src/odemath.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/odemath.h -ode/src/matrix.o: \ - ode/src/matrix.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/matrix.h -ode/src/misc.o: \ - ode/src/misc.cpp \ - include/ode/config.h \ - include/ode/misc.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/matrix.h -ode/src/rotation.o: \ - ode/src/rotation.cpp \ - include/ode/rotation.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/mass.o: \ - ode/src/mass.cpp \ - include/ode/config.h \ - include/ode/mass.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/odemath.h \ - include/ode/matrix.h -ode/src/ode.o: \ - ode/src/ode.cpp \ - ode/src/objects.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - include/ode/ode.h \ - include/ode/contact.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - ode/src/joint.h \ - ode/src/obstack.h \ - ode/src/step.h -ode/src/step.o: \ - ode/src/step.cpp \ - ode/src/objects.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/joint.h \ - include/ode/contact.h \ - ode/src/obstack.h \ - include/ode/odemath.h \ - include/ode/rotation.h \ - include/ode/timer.h \ - include/ode/matrix.h \ - ode/src/lcp.h -ode/src/lcp.o: \ - ode/src/lcp.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - ode/src/lcp.h \ - include/ode/matrix.h \ - include/ode/misc.h \ - ode/src/mat.h \ - include/ode/timer.h -ode/src/joint.o: \ - ode/src/joint.cpp \ - include/ode/odemath.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/rotation.h \ - include/ode/matrix.h \ - ode/src/joint.h \ - ode/src/objects.h \ - include/ode/memory.h \ - include/ode/mass.h \ - ode/src/array.h \ - include/ode/contact.h \ - ode/src/obstack.h -ode/src/space.o: \ - ode/src/space.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/contact.h \ - include/ode/memory.h \ - ode/src/objects.h \ - include/ode/mass.h \ - ode/src/array.h \ - ode/src/geom_internal.h -ode/src/geom.o: \ - ode/src/geom.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/geom.h \ - include/ode/space.h \ - include/ode/contact.h \ - include/ode/rotation.h \ - include/ode/odemath.h \ - include/ode/memory.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/mass.h \ - include/ode/matrix.h \ - ode/src/objects.h \ - ode/src/array.h \ - ode/src/geom_internal.h -ode/src/timer.o: \ - ode/src/timer.cpp \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h \ - include/ode/timer.h -ode/src/mat.o: \ - ode/src/mat.cpp \ - include/ode/config.h \ - include/ode/misc.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/matrix.h \ - include/ode/memory.h \ - ode/src/mat.h -ode/src/testing.o: \ - ode/src/testing.cpp \ - include/ode/config.h \ - include/ode/misc.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - ode/src/testing.h \ - ode/src/array.h -ode/src/fastldlt.o: \ - ode/src/fastldlt.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/fastlsolve.o: \ - ode/src/fastlsolve.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/fastltsolve.o: \ - ode/src/fastltsolve.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -ode/src/fastdot.o: \ - ode/src/fastdot.c \ - include/ode/matrix.h \ - include/ode/common.h \ - include/ode/config.h \ - include/ode/error.h -drawstuff/src/drawstuff.o: \ - drawstuff/src/drawstuff.cpp \ - include/ode/config.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h \ - drawstuff/src/internal.h -drawstuff/src/x11.o: \ - drawstuff/src/x11.cpp \ - include/ode/config.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h \ - drawstuff/src/internal.h -ode/test/test_ode.o: \ - ode/test/test_ode.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h -ode/test/test_chain2.o: \ - ode/test/test_chain2.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_hinge.o: \ - ode/test/test_hinge.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_slider.o: \ - ode/test/test_slider.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_collision.o: \ - ode/test/test_collision.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_boxstack.o: \ - ode/test/test_boxstack.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_buggy.o: \ - ode/test/test_buggy.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_joints.o: \ - ode/test/test_joints.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_space.o: \ - ode/test/test_space.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_I.o: \ - ode/test/test_I.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_step.o: \ - ode/test/test_step.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -ode/test/test_friction.o: \ - ode/test/test_friction.cpp \ - include/ode/ode.h \ - include/ode/config.h \ - include/ode/contact.h \ - include/ode/common.h \ - include/ode/error.h \ - include/ode/memory.h \ - include/ode/odemath.h \ - include/ode/matrix.h \ - include/ode/timer.h \ - include/ode/rotation.h \ - include/ode/mass.h \ - include/ode/space.h \ - include/ode/geom.h \ - include/ode/misc.h \ - include/ode/objects.h \ - include/ode/odecpp.h \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h -drawstuff/dstest/dstest.o: \ - drawstuff/dstest/dstest.cpp \ - include/drawstuff/drawstuff.h \ - include/drawstuff/version.h diff --git a/extern/ode/dist/README b/extern/ode/dist/README deleted file mode 100644 index 6b151d1a27b..00000000000 --- a/extern/ode/dist/README +++ /dev/null @@ -1,30 +0,0 @@ -The Open Dynamics Engine (ODE), Copyright (C) 2001,2002 Russell L. Smith. -------------------------------------------------------------------------- - -ODE is a free, industrial quality library for simulating articulated -rigid body dynamics - for example ground vehicles, legged creatures, -and moving objects in VR environments. It is fast, flexible, robust -and platform independent, with advanced joints, contact with friction, -and built-in collision detection. - -This library is free software; you can redistribute it and/or -modify it under the terms of EITHER: - (1) The GNU Lesser General Public License as published by the Free - Software Foundation; either version 2.1 of the License, or (at - your option) any later version. The text of the GNU Lesser - General Public License is included with this library in the - file LICENSE.TXT. - (2) The BSD-style license that is included with this library in - the file LICENSE-BSD.TXT. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files -LICENSE.TXT and LICENSE-BSD.TXT for more details. - - * Installation instructions are in the INSTALL file - - * The ODE web pages are at http://q12.org/ode/ - - * The ODE documentation is in the file ode/doc/ode.html, or you - can view it on the web at http://q12.org/ode/ode-docs.html diff --git a/extern/ode/dist/README_BLENDER b/extern/ode/dist/README_BLENDER deleted file mode 100644 index 64d97624a55..00000000000 --- a/extern/ode/dist/README_BLENDER +++ /dev/null @@ -1,18 +0,0 @@ -Checked out from ODE cvs (http://q12.org) on or around -Fri Oct 18 14:24:11 GMT 2002 - -Note that ODE has its own build system. The source/ode/ -directory is traversed by Blender's source/Makefile. However -source/ode/config/user-settings has to be set correctly -depending on the target platform. This needs to be done in the -source/Makefile which determines the proper platform, then copies -the appropriate platform-specific user-settings.platform file to -source/ode/config/user-settings. Currently source/ode/user-settings is -for Linux. - -Don't change the source in this directory. This source code is -maintained on the CVS server at http://q12.org and is provided here -so that Blender developers can compile ODE without having to separately -download and install it. This source code can and should periodically -be synchronized (manually) with the source code at http://q12.org. - diff --git a/extern/ode/dist/config/README b/extern/ode/dist/config/README deleted file mode 100644 index 0fa18062a4e..00000000000 --- a/extern/ode/dist/config/README +++ /dev/null @@ -1,41 +0,0 @@ - -variable names used in the per-platform makefile configuration files: - -platform stuff --------------- - -WINDOWS set to 1 if this is a microsoft windows based platform - -filesystem stuff and commands ------------------------------ - -THIS_DIR prefix to run a command from the current directory -DEL_CMD the name of the delete command - -compiler stuff --------------- - -CC the C/C++ compiler to use -OBJ the object file extension -C_FLAGS the standard set of compiler flags -C_INC flag to add an include path -C_OUT flag to specify the object file output -C_EXEOUT flag to specify the executable file output -C_DEF flag to add a define -C_OPT flag to set the optimization level -OPT the optimization level to use - -library archiver ----------------- - -AR library archiver command -RANLIB ranlib command, if necessary -LIB_PREFIX library file prefix -LIB_SUFFIX library file suffix -LINK_OPENGL link flags to link in windowing stuff and opengl -LINK_MATH link flags to link in the system math library - -windows specific stuff ----------------------- - -RC_RULE makefile rule to use for the resource compiler diff --git a/extern/ode/dist/config/makefile.cygwin b/extern/ode/dist/config/makefile.cygwin deleted file mode 100644 index de23b71a29f..00000000000 --- a/extern/ode/dist/config/makefile.cygwin +++ /dev/null @@ -1,28 +0,0 @@ -WINDOWS=1 -THIS_DIR=./ -DEL_CMD=rm -f -CC=gcc -OBJ=.o -C_FLAGS=-c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN -C_INC=-I -C_OUT=-o -C_EXEOUT=-o -C_DEF=-D -C_OPT=-O -AR=ar rc -RANLIB= -LIB_PREFIX=lib -LIB_SUFFIX=.a -LINK_OPENGL=-lComctl32 -lkernel32 -luser32 -lgdi32 -lOpenGL32 -lGlu32 -LINK_MATH=-lm -RC_RULE=windres -I rc -O coff $< $@ - -ifeq ($(BUILD),release) -OPT=2 -C_FLAGS+=-fomit-frame-pointer -ffast-math -endif - -ifeq ($(BUILD),debug) -OPT=0 -C_FLAGS+=-g -endif diff --git a/extern/ode/dist/config/makefile.mingw b/extern/ode/dist/config/makefile.mingw deleted file mode 100644 index 4b18fb6bcdc..00000000000 --- a/extern/ode/dist/config/makefile.mingw +++ /dev/null @@ -1,28 +0,0 @@ -WINDOWS=1 -THIS_DIR= -DEL_CMD=tools\rm -CC=gcc -OBJ=.o -C_FLAGS=-c -Wall -fno-exceptions -fno-rtti -DWIN32 -C_INC=-I -C_OUT=-o -C_EXEOUT=-o -C_DEF=-D -C_OPT=-O -AR=ar rc -RANLIB= -LIB_PREFIX=lib -LIB_SUFFIX=.a -LINK_OPENGL=-lComctl32 -lkernel32 -luser32 -lgdi32 -lOpenGL32 -lGlu32 -LINK_MATH=-lm -RC_RULE=windres -I rc -O coff $< $@ - -ifeq ($(BUILD),release) -OPT=2 -C_FLAGS+=-fomit-frame-pointer -ffast-math -endif - -ifeq ($(BUILD),debug) -OPT=0 -C_FLAGS+=-g -endif diff --git a/extern/ode/dist/config/makefile.msvc b/extern/ode/dist/config/makefile.msvc deleted file mode 100644 index 9d4da0bf912..00000000000 --- a/extern/ode/dist/config/makefile.msvc +++ /dev/null @@ -1,27 +0,0 @@ -WINDOWS=1 -THIS_DIR= -DEL_CMD=tools\rm -CC=cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= -OBJ=.obj -C_FLAGS=/c /GR- /GX- /W3 /GF -C_INC=/I -C_OUT=/Fo -C_EXEOUT=/Fe -C_DEF=/D -C_OPT=/O -AR=lib /nologo /OUT: -RANLIB= -LIB_PREFIX= -LIB_SUFFIX=.lib -LINK_OPENGL=Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32.lib Glu32.lib -LINK_MATH= -RC_RULE=rc /r /fo$@ $< - -ifeq ($(BUILD),release) -OPT=2 -C_FLAGS+=/Oy -endif - -ifeq ($(BUILD),debug) -OPT=d -endif diff --git a/extern/ode/dist/config/makefile.msvc-dll b/extern/ode/dist/config/makefile.msvc-dll deleted file mode 100644 index fe495893616..00000000000 --- a/extern/ode/dist/config/makefile.msvc-dll +++ /dev/null @@ -1,29 +0,0 @@ -WINDOWS=1 -THIS_DIR= -DEL_CMD=tools\rm -CC=cl /nologo /DWIN32 /DMSVC /DSHAREDLIBIMPORT=__declspec(dllimport) /DSHAREDLIBEXPORT=__declspec(dllexport) -OBJ=.obj -C_FLAGS=/c /GR- /GX- /W3 /GF -C_INC=/I -C_OUT=/Fo -C_EXEOUT=/Fe -C_DEF=/D -C_OPT=/O -AR=lib /nologo /OUT: -RANLIB= -LIB_PREFIX= -LIB_SUFFIX=.lib -LINK_OPENGL=Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32.lib Glu32.lib -LINK_MATH= -RC_RULE=rc /r /fo$@ $< - -ifeq ($(BUILD),release) -OPT=2 -C_FLAGS+=/Oy -endif - -ifeq ($(BUILD),debug) -OPT=d -endif - -ODE_LIB_AR_RULE=link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" /def:config/msvcdefs.def $(LINK_OPENGL) /OUT:$(patsubst %.lib,%.dll,$@) diff --git a/extern/ode/dist/config/makefile.osx b/extern/ode/dist/config/makefile.osx deleted file mode 100644 index 1d5e0f42252..00000000000 --- a/extern/ode/dist/config/makefile.osx +++ /dev/null @@ -1,26 +0,0 @@ -THIS_DIR=./ -DEL_CMD=rm -f -CC=cc -OBJ=.o -C_FLAGS=-c -Wall -fno-rtti -fno-exceptions -Wall -I/usr/X11R6/include -C_INC=-I -C_OUT=-o -C_EXEOUT=-o -C_DEF=-D -C_OPT=-O -AR=ar rc -RANLIB=ranlib -LIB_PREFIX=lib -LIB_SUFFIX=.a -LINK_OPENGL=-L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -lstdc++ -LINK_MATH=-lm - -ifeq ($(BUILD),release) -OPT=2 -C_FLAGS+=-fomit-frame-pointer -ffast-math -endif - -ifeq ($(BUILD),debug) -OPT=0 -C_FLAGS+=-g -endif diff --git a/extern/ode/dist/config/makefile.unix-gcc b/extern/ode/dist/config/makefile.unix-gcc deleted file mode 100644 index b9d07632353..00000000000 --- a/extern/ode/dist/config/makefile.unix-gcc +++ /dev/null @@ -1,29 +0,0 @@ -THIS_DIR=./ -DEL_CMD=rm -f -CC=gcc -OBJ=.o -C_FLAGS=-c -Wall -fno-rtti -fno-exceptions -Wall -C_INC=-I -C_OUT=-o -C_EXEOUT=-o -C_DEF=-D -C_OPT=-O -AR=ar rc -RANLIB= -LIB_PREFIX=lib -LIB_SUFFIX=.a -LINK_OPENGL=-L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -LINK_MATH=-lm - -ifeq ($(BUILD),release) -OPT=2 -C_FLAGS+=-fomit-frame-pointer -ffast-math -endif - -ifeq ($(BUILD),debug) -OPT=0 -C_FLAGS+=-g -endif - -# some other possible flags: -# -malign-double -mpentiumpro -march=pentiumpro diff --git a/extern/ode/dist/config/makefile.unix-generic b/extern/ode/dist/config/makefile.unix-generic deleted file mode 100644 index f435e1a0db8..00000000000 --- a/extern/ode/dist/config/makefile.unix-generic +++ /dev/null @@ -1,24 +0,0 @@ -THIS_DIR=./ -DEL_CMD=rm -f -CC=CC -OBJ=.o -C_FLAGS=-c -C_INC=-I -C_OUT=-o -C_EXEOUT=-o -C_DEF=-D -C_OPT=-O -AR=ar rc -RANLIB= -LIB_PREFIX=lib -LIB_SUFFIX=.a -LINK_OPENGL=-L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU -LINK_MATH=-lm - -ifeq ($(BUILD),release) -OPT=2 -endif - -ifeq ($(BUILD),debug) -OPT=0 -endif diff --git a/extern/ode/dist/config/msvcdefs.def b/extern/ode/dist/config/msvcdefs.def deleted file mode 100644 index 11258ab9aa8..00000000000 --- a/extern/ode/dist/config/msvcdefs.def +++ /dev/null @@ -1,228 +0,0 @@ -LIBRARY ODE -EXPORTS -dAreConnected -dBodyAddForce -dBodyAddForceAtPos -dBodyAddForceAtRelPos -dBodyAddRelForce -dBodyAddRelForceAtPos -dBodyAddRelForceAtRelPos -dBodyAddRelTorque -dBodyAddTorque -dBodyCreate -dBodyDestroy -dBodyDisable -dBodyEnable -dBodyGetAngularVel -dBodyGetData -dBodyGetFiniteRotationAxis -dBodyGetFiniteRotationMode -dBodyGetForce -dBodyGetGravityMode -dBodyGetJoint -dBodyGetLinearVel -dBodyGetMass -dBodyGetNumJoints -dBodyGetPointVel -dBodyGetPosRelPoint -dBodyGetPosition -dBodyGetQuaternion -dBodyGetRelPointPos -dBodyGetRelPointVel -dBodyGetRotation -dBodyGetTorque -dBodyIsEnabled -dBodySetAngularVel -dBodySetData -dBodySetFiniteRotationAxis -dBodySetFiniteRotationMode -dBodySetForce -dBodySetGravityMode -dBodySetLinearVel -dBodySetMass -dBodySetPosition -dBodySetQuaternion -dBodySetRotation -dBodySetTorque -dBodyVectorFromWorld -dBodyVectorToWorld -dBoxBox -dBoxClass -dBoxTouchesBox -dCCylinderClass -dClearUpperTriangle -dCloseODE -dClosestLineSegmentPoints -dCollide -dCreateBox -dCreateCCylinder -dCreateGeom -dCreateGeomClass -dCreateGeomGroup -dCreateGeomTransform -dCreatePlane -dCreateSphere -dError -dFactorCholesky -dFactorLDLT -dGeomBoxGetLengths -dGeomBoxSetLengths -dGeomCCylinderGetParams -dGeomCCylinderSetParams -dGeomDestroy -dGeomGetAABB -dGeomGetBody -dGeomGetClass -dGeomGetClassData -dGeomGetData -dGeomGetPosition -dGeomGetRotation -dGeomGetSpaceAABB -dGeomGroupAdd -dGeomGroupGetGeom -dGeomGroupGetNumGeoms -dGeomGroupRemove -dGeomPlaneGetParams -dGeomPlaneSetParams -dGeomSetBody -dGeomSetData -dGeomSetPosition -dGeomSetRotation -dGeomSphereGetRadius -dGeomSphereSetRadius -dGeomTransformClass -dGeomTransformGetCleanup -dGeomTransformGetGeom -dGeomTransformSetCleanup -dGeomTransformSetGeom -dHashSpaceCreate -dHashSpaceSetLevels -dInfiniteAABB -dInfinityValue -dInvertPDMatrix -dIsPositiveDefinite -dJointAttach -dJointCreateAMotor -dJointCreateBall -dJointCreateContact -dJointCreateFixed -dJointCreateHinge -dJointCreateHinge2 -dJointCreateSlider -dJointCreateUniversal -dJointDestroy -dJointGetAMotorAngle -dJointGetAMotorAngleRate -dJointGetAMotorAxis -dJointGetAMotorAxisRel -dJointGetAMotorMode -dJointGetAMotorNumAxes -dJointGetAMotorParam -dJointGetBallAnchor -dJointGetBody -dJointGetData -dJointGetHinge2Anchor -dJointGetHinge2Angle1 -dJointGetHinge2Angle1Rate -dJointGetHinge2Angle2Rate -dJointGetHinge2Axis1 -dJointGetHinge2Axis2 -dJointGetHinge2Param -dJointGetHingeAnchor -dJointGetHingeAngle -dJointGetHingeAngleRate -dJointGetHingeAxis -dJointGetHingeParam -dJointGetSliderAxis -dJointGetSliderParam -dJointGetSliderPosition -dJointGetSliderPositionRate -dJointGetType -dJointGetUniversalAnchor -dJointGetUniversalAxis1 -dJointGetUniversalAxis2 -dJointGroupCreate -dJointGroupDestroy -dJointGroupEmpty -dJointSetAMotorAngle -dJointSetAMotorAxis -dJointSetAMotorMode -dJointSetAMotorNumAxes -dJointSetAMotorParam -dJointSetBallAnchor -dJointSetData -dJointSetFixed -dJointSetHinge2Anchor -dJointSetHinge2Axis1 -dJointSetHinge2Axis2 -dJointSetHinge2Param -dJointSetHingeAnchor -dJointSetHingeAxis -dJointSetHingeParam -dJointSetSliderAxis -dJointSetSliderParam -dJointSetUniversalAnchor -dJointSetUniversalAxis1 -dJointSetUniversalAxis2 -dLDLTAddTL -dLDLTRemove -dMakeRandomMatrix -dMakeRandomVector -dMassAdd -dMassAdjust -dMassRotate -dMassSetBox -dMassSetCappedCylinder -dMassSetParameters -dMassSetSphere -dMassSetZero -dMassTranslate -dMaxDifference -dMultiply0 -dMultiply1 -dMultiply2 -dNormalize3 -dNormalize4 -dPlaneSpace -dQFromAxisAndAngle -dQMultiply0 -dQMultiply1 -dQMultiply2 -dQMultiply3 -dQSetIdentity -dQtoR -dRFrom2Axes -dRFromAxisAndAngle -dRFromEulerAngles -dRSetIdentity -dRandInt -dRandReal -dRandSetSeed -dRemoveRowCol -dRtoQ -dSetMessageHandler -dSetZero -dSimpleSpaceCreate -dSolveCholesky -dSolveLDLT -dSpaceAdd -dSpaceCollide -dSpaceDestroy -dSpaceQuery -dSpaceRemove -dSphereClass -dTestMatrixComparison -dTestRand -dTestSolveLCP -dWorldCreate -dWorldDestroy -dWorldGetCFM -dWorldGetERP -dWorldGetGravity -dWorldImpulseToForce -dWorldSetCFM -dWorldSetERP -dWorldSetGravity -dWorldStep -dWorldStep -dWtoDQ diff --git a/extern/ode/dist/config/user-settings b/extern/ode/dist/config/user-settings deleted file mode 100644 index d632eba9678..00000000000 --- a/extern/ode/dist/config/user-settings +++ /dev/null @@ -1,31 +0,0 @@ -# ODE user settings: the following variables must be set by the user - -# (1) the platform to use. this name should have a corresponding -# makefile.PLATFORM file. currently supported platforms are: -# msvc microsoft visual C/C++ -# msvc-dll microsoft visual C/C++, create a DLL -# mingw minimalist GNU for windows -# cygwin cygnus GNU for windows -# unix-gcc GNU gcc on unix -# unix-generic generic unix compiler. you may need to edit the CC -# variable in makefile.unix-generic -# osx Mac OS-X, with the gnu compiler. - -PLATFORM=unix-gcc - -# (2) the floating point precision to use (either "SINGLE" or "DOUBLE") - -PRECISION=SINGLE -#PRECISION=DOUBLE - -# (3) the library type to build (either "debug" if you are doing development, -# or "release" for the optimized library) - -#BUILD=debug -BUILD=release - -# (4) if you are using an old version of MS-Windows that has command line -# length limitations then you will need to set this to "1". otherwise, -# leave it at "0". - -WINDOWS16=0 diff --git a/extern/ode/dist/config/user-settings.example b/extern/ode/dist/config/user-settings.example deleted file mode 100644 index 0b0d480a25a..00000000000 --- a/extern/ode/dist/config/user-settings.example +++ /dev/null @@ -1,31 +0,0 @@ -# ODE user settings: the following variables must be set by the user - -# (1) the platform to use. this name should have a corresponding -# makefile.PLATFORM file. currently supported platforms are: -# msvc microsoft visual C/C++ -# msvc-dll microsoft visual C/C++, create a DLL -# mingw minimalist GNU for windows -# cygwin cygnus GNU for windows -# unix-gcc GNU gcc on unix -# unix-generic generic unix compiler. you may need to edit the CC -# variable in makefile.unix-generic -# osx Mac OS-X, with the gnu compiler. - -PLATFORM=unix-gcc - -# (2) the floating point precision to use (either "SINGLE" or "DOUBLE") - -#PRECISION=SINGLE -PRECISION=DOUBLE - -# (3) the library type to build (either "debug" if you are doing development, -# or "release" for the optimized library) - -#BUILD=debug -BUILD=release - -# (4) if you are using an old version of MS-Windows that has command line -# length limitations then you will need to set this to "1". otherwise, -# leave it at "0". - -WINDOWS16=0 diff --git a/extern/ode/dist/configurator.c b/extern/ode/dist/configurator.c deleted file mode 100644 index 8129716881d..00000000000 --- a/extern/ode/dist/configurator.c +++ /dev/null @@ -1,437 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -this program discovers some system configuration stuff, prior to compiling -ODE. the usage is: - - configurator - - -this program looks long, but it really has an extremely simple structure and -should be very easy for anyone to modify. it should be very portable as it -is written in straight ANSI C and only uses the following library functions: - * printf - * fopen (assumes 0 returned on failure) - * fclose - * fprintf - * system - * exit -except where stated, we do not assume anything about the return codes from -these functions. - -why didn't i just use GNU autoconf? : - * autoconf needs a bourne shell and a bunch of other tools that windows - users may not have. - * i like reinventing the wheel. - -*/ - -#include - -/****************************************************************************/ -/* project constants */ - -#define SETUP_SHLIB_DEFS \ - "#ifndef SHAREDLIBIMPORT\n" \ - "#define SHAREDLIBIMPORT\n" \ - "#endif\n" \ - "#ifndef SHAREDLIBEXPORT\n" \ - "#define SHAREDLIBEXPORT\n" \ - "#endif\n" - -/* the config.h header */ -char *config_h_part1 = -"/* per-machine configuration. this file is automatically generated. */\n" -"\n" -"#ifndef _ODE_CONFIG_H_\n" -"#define _ODE_CONFIG_H_\n" -"\n" -"/* shared lib definitions */\n" -SETUP_SHLIB_DEFS -"\n" -"/* standard system headers */\n"; - - -char *config_h_part2 = -"\n" -"#ifdef __cplusplus\n" -"extern \"C\" {\n" -"#endif\n" -"\n"; - -/* the config.h footer */ -char *config_h_footer = -"#ifdef __cplusplus\n" -"}\n" -"#endif\n" -"#endif\n"; - -/****************************************************************************/ -/* implementations of some string functions. these are prefixed with 'x' - * to prevent any conflicts with built-in functions. - */ - -#define strcpy xstrcpy -void xstrcpy (char *dest, char *src) -{ - while (*src) *dest++ = *src++; - *dest = 0; -} - - -#define strcat xstrcat -void xstrcat (char *dest, char *src) -{ - while (*dest) dest++; - while (*src) *dest++ = *src++; - *dest = 0; -} - -/****************************************************************************/ -/* utility functions */ - -/* print an error message and exit */ - -void fatal_error (char *message) -{ - printf ("\n*** configurator failed: %s.\n\n" - "please fix your configuration and try again.\n" - "if you have to fix the configurator program or the makefiles, " - "please email\n" - "your changes to the ODE mailing list (ode@q12.org).\n\n", message); - exit (0); -} - - -/* open a file, generate an error if it can't be done */ - -FILE * xfopen (char *filename, char *mode) -{ - FILE *f; - f = fopen (filename,mode); - if (!f) fatal_error ("can not open a file"); - return f; -} - - -/* return 1 if the file exists or 0 if not */ - -int file_exists (char *filename) -{ - FILE *f; - f = fopen (filename,"rb"); - if (f) fclose (f); - return (f != 0); -} - - -/* write a string to a new file */ - -void write_to_file (char *filename, char *s) -{ - FILE *f = xfopen (filename,"wt"); - fprintf (f,"%s",s); - fclose (f); -} - - -/* write a comment to a header file */ - -void write_header_comment (FILE *file, char *description) -{ - fprintf (file,"/* %s */\n",description); - printf ("%s ...\n",description); -} - - -/* delete a file */ - -char *delete_cmd_line = 0; -void delete_file (char *filename) -{ - char cmd[1000]; - strcpy (cmd,delete_cmd_line); - strcat (cmd," "); - strcat (cmd,filename); - printf ("%s\n",cmd); - system (cmd); -} - - -/* run a compile command */ - -char *compile_cmd_line = 0; -void compile (char *output, char *input) -{ - char cmd[1000]; - strcpy (cmd,compile_cmd_line); - strcat (cmd,output); - strcat (cmd," "); - strcat (cmd,input); - printf ("%s\n",cmd); - system (cmd); -} - - -/* run a program we've just compiled */ - -char *run_prefix = ""; -void run (char *filename) -{ - char cmd[1000]; - strcpy (cmd,run_prefix); - strcat (cmd,filename); - printf ("%s\n",cmd); - system (cmd); -} - -/****************************************************************************/ -/* system tests */ - -void check_if_this_is_a_pentium (FILE *file) -{ - write_header_comment (file,"is this a pentium on a gcc-based platform?"); - write_to_file ("ctest.c", - "int main() {\n" - " asm (\"mov $0,%%eax\\n cpuid\\n\" : : : \"%eax\");\n" - " return 0;\n" - "}\n"); - delete_file ("ctest.exe"); - compile ("ctest.exe","ctest.c"); - if (file_exists ("ctest.exe")) { - fprintf (file,"#define PENTIUM 1\n\n"); - } - else { - fprintf (file,"/* #define PENTIUM 1 -- not a pentium */\n\n"); - } - - delete_file ("ctest.c"); - delete_file ("ctest.exe"); -} - -/****************************************************************************/ -/* tests: standard headers */ - -void get_all_standard_headers (FILE *file) -{ - int i; - FILE *f; - char *header[7] = {"stdio.h", "stdlib.h", "math.h", "string.h", - "stdarg.h", "malloc.h", "alloca.h"}; - - for (i=0; i < sizeof(header)/sizeof(char*); i++) { - FILE *f = xfopen ("ctest.c","wt"); - fprintf (f,"#include <%s>\nint main() { return 0; }\n",header[i]); - fclose (f); - delete_file ("ctest.exe"); - compile ("ctest.exe","ctest.c"); - if (file_exists ("ctest.exe")) { - fprintf (file,"#include <%s>\n",header[i]); - } - } - - delete_file ("ctest.c"); - delete_file ("ctest.exe"); -} - -/****************************************************************************/ -/* tests: typedefs and constants for ODE */ - -void get_ODE_integer_typedefs (FILE *file) -{ - write_header_comment (file,"integer types (we assume int >= 32 bits)"); - if (sizeof(char) != 1) fatal_error ("expecting sizeof(char) == 1"); - if (sizeof(int) < 4) fatal_error ("expecting sizeof(int) >= 4"); - fprintf (file,"typedef char int8;\ntypedef unsigned char uint8;\n"); - if (sizeof(short) == 4) { - fprintf (file,"typedef short int32;\ntypedef unsigned short uint32;\n"); - } - else if (sizeof(int) == 4) { - fprintf (file,"typedef int int32;\ntypedef unsigned int uint32;\n"); - } - else { - fatal_error ("can not find 4 byte integer type"); - } - fprintf (file,"\n" - "/* an integer type that we can safely cast a pointer to and\n" - " * from without loss of bits.\n" - " */\n"); - if (sizeof(short) == sizeof(void*)) { - fprintf (file,"typedef unsigned short intP;\n"); - } - else if (sizeof(int) == sizeof(void*)) { - fprintf (file,"typedef unsigned int intP;\n"); - } - else if (sizeof(long int) == sizeof(void*)) { - fprintf (file,"typedef unsigned long int intP;\n"); - } - fprintf (file,"\n"); -} - - -void get_ODE_float_stuff (FILE *file) -{ - char *suffix,*type; - int i; - FILE *f; - -#define SHARED_LIB_SPEC_DECISION \ - "#if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE\n" \ - " #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT\n" \ - "#else \n" \ - " #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT\n" \ - "#endif\n" - -#define UNDEF_SHAREDLIB_SPEC "\n#undef GLOBAL_SHAREDLIB_SPEC\n" - -#ifdef dSINGLE - -#define INFBYTES SHARED_LIB_SPEC_DECISION "union dInfBytes { unsigned char c[4]; float f; };\nextern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue;\n#define dInfinity (dInfinityValue.f)" - - char *inc[6] = {"#include ", - "#include ", - "", - "", - "", - ""}; - char *decl[6] = { - "SHAREDLIBEXPORT double dInfinityValue = HUGE_VALF;", - "SHAREDLIBEXPORT double dInfinityValue = HUGE_VAL;", - "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0x7f,0x80,0,0}};", - "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0x80,0x7f}};", - "SHAREDLIBEXPORT double dInfinityValue = 1.0f/0.0f;", - "SHAREDLIBEXPORT double dInfinityValue = 1e20f;"}; - char *inf[6] = { - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC, - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC, - INFBYTES UNDEF_SHAREDLIB_SPEC, - INFBYTES UNDEF_SHAREDLIB_SPEC, - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC, - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC}; - -#else /* not dSINGLE, must be dDOUBLE */ - -#define INFBYTES SHARED_LIB_SPEC_DECISION "union dInfBytes { unsigned char c[8]; double d; };\nextern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue;\n#define dInfinity (dInfinityValue.d)" - - char *inc[5] = { - "#include ", - "", - "", - "", - ""}; - char *decl[5] = { - "SHAREDLIBEXPORT double dInfinityValue = HUGE_VAL;", - "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0x7f,0xf0,0,0,0,0,0,0}};", - "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}};", - "SHAREDLIBEXPORT double dInfinityValue = 1.0/0.0;", - "SHAREDLIBEXPORT double dInfinityValue = 1e20;"}; - char *inf[5] = { - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC, - INFBYTES UNDEF_SHAREDLIB_SPEC, - INFBYTES UNDEF_SHAREDLIB_SPEC, - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC, - SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC}; -#endif - - write_header_comment (file,"select the base floating point type"); -#ifdef dSINGLE - fprintf (file,"#define dSINGLE 1\n\n"); - type = "float"; - suffix = "f"; -#else - fprintf (file,"#define dDOUBLE 1\n\n"); - type = "double"; - suffix = ""; -#endif - - /* infinity */ - write_header_comment (file,"the floating point infinity"); - - /* try the different infinity constants until one works */ - for (i=0; i < sizeof(inf)/sizeof(char*); i++) { - f = xfopen ("ctest.c","wt"); - fprintf (f, - "#include \n" - "#define SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE 1\n" - SETUP_SHLIB_DEFS - "%s\n" - "%s\n" - "%s\n" - "int main() {\n" - " if (dInfinity > 1e10%s && -dInfinity < -1e10%s &&\n" - " -dInfinity < dInfinity) {\n" - " FILE *f = fopen (\"data\",\"wt\");\n" - " fprintf (f,\"foo\\n\");\n" - " fclose (f);\n" - " }\n" - " return 0;\n" - "}\n" - ,inc[i],inf[i],decl[i],suffix,suffix); - fclose (f); - delete_file ("data"); - compile ("ctest.exe","ctest.c"); - run ("ctest.exe"); - if (file_exists ("data")) { - fprintf (file,"#define DINFINITY_DECL %s\n",decl[i]); - fprintf (file,"%s\n\n",inf[i]); - delete_file ("ctest.c"); - delete_file ("ctest.exe"); - delete_file ("data"); - return; - } - } - - fatal_error ("can't determine dInfinity constant"); -} - -/****************************************************************************/ - -int main (int argc, char **argv) -{ - FILE *file; - - if (argc < 4 || argc > 5) - fatal_error ("configurator expects 3 or 4 arguments"); - compile_cmd_line = argv[2]; - delete_cmd_line = argv[3]; - if (argc >= 5) run_prefix = argv[4]; - - /* check some defines we should have been compiled with */ -#if !defined(dSINGLE) && !defined(dDOUBLE) - fatal_error ("you must set PRECISION to either SINGLE or DOUBLE"); -#endif - - file = xfopen (argv[1],"wt"); - fprintf (file,config_h_part1); - get_all_standard_headers (file); - fprintf (file,config_h_part2); - check_if_this_is_a_pentium (file); - get_ODE_integer_typedefs (file); - get_ODE_float_stuff (file); - fprintf (file,config_h_footer); - fclose (file); - - printf ("\n*** configurator succeeded ***\n\n"); - return 0; -} diff --git a/extern/ode/dist/include/ode/README b/extern/ode/dist/include/ode/README deleted file mode 100644 index aaedfcc38fe..00000000000 --- a/extern/ode/dist/include/ode/README +++ /dev/null @@ -1,18 +0,0 @@ - -this is the public C interface to the ODE library. - -all these files should be includable from C, i.e. they should not use any -C++ features. everything should be protected with - - #ifdef __cplusplus - extern "C" { - #endif - - ... - - #ifdef __cplusplus - } - #endif - -the only exception is the odecpp.h file, which defines a C++ wrapper for -the C interface. remember to keep this in sync! diff --git a/extern/ode/dist/include/ode/common.h b/extern/ode/dist/include/ode/common.h deleted file mode 100644 index bd29d904028..00000000000 --- a/extern/ode/dist/include/ode/common.h +++ /dev/null @@ -1,307 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_COMMON_H_ -#define _ODE_COMMON_H_ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* configuration stuff */ - -/* the efficient alignment. most platforms align data structures to some - * number of bytes, but this is not always the most efficient alignment. - * for example, many x86 compilers align to 4 bytes, but on a pentium it - * is important to align doubles to 8 byte boundaries (for speed), and - * the 4 floats in a SIMD register to 16 byte boundaries. many other - * platforms have similar behavior. setting a larger alignment can waste - * a (very) small amount of memory. NOTE: this number must be a power of - * two. this is set to 16 by default. - */ -#define EFFICIENT_ALIGNMENT 16 - - -/* constants */ - -/* pi and 1/sqrt(2) are defined here if necessary because they don't get - * defined in on some platforms (like MS-Windows) - */ - -#ifndef M_PI -#define M_PI REAL(3.1415926535897932384626433832795029) -#endif -#ifndef M_SQRT1_2 -#define M_SQRT1_2 REAL(0.7071067811865475244008443621048490) -#endif - - -/* debugging: - * IASSERT is an internal assertion, i.e. a consistency check. if it fails - * we want to know where. - * UASSERT is a user assertion, i.e. if it fails a nice error message - * should be printed for the user. - * AASSERT is an arguments assertion, i.e. if it fails "bad argument(s)" - * is printed. - * DEBUGMSG just prints out a message - */ - -#ifndef dNODEBUG -#ifdef __GNUC__ -#define dIASSERT(a) if (!(a)) dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s() [%s]",__FUNCTION__,__FILE__); -#define dUASSERT(a,msg) if (!(a)) dDebug (d_ERR_UASSERT, \ - msg " in %s()", __FUNCTION__); -#define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ - msg " in %s()", __FUNCTION__); -#else -#define dIASSERT(a) if (!(a)) dDebug (d_ERR_IASSERT, \ - "assertion \"" #a "\" failed in %s:%d",__FILE__,__LINE__); -#define dUASSERT(a,msg) if (!(a)) dDebug (d_ERR_UASSERT, \ - msg " (%s:%d)", __FILE__,__LINE__); -#define dDEBUGMSG(msg) dMessage (d_ERR_UASSERT, \ - msg " (%s:%d)", __FILE__,__LINE__); -#endif -#else -#define dIASSERT(a) ; -#define dUASSERT(a,msg) ; -#define dDEBUGMSG(msg) ; -#endif -#define dAASSERT(a) dUASSERT(a,"Bad argument(s)") - -/* floating point data type, vector, matrix and quaternion types */ - -#if defined(dSINGLE) -typedef float dReal; -#elif defined(dDOUBLE) -typedef double dReal; -#else -#error You must #define dSINGLE or dDOUBLE -#endif - - -/* round an integer up to a multiple of 4, except that 0 and 1 are unmodified - * (used to compute matrix leading dimensions) - */ -#define dPAD(a) (((a) > 1) ? ((((a)-1)|3)+1) : (a)) - -/* these types are mainly just used in headers */ -typedef dReal dVector3[4]; -typedef dReal dVector4[4]; -typedef dReal dMatrix3[4*3]; -typedef dReal dMatrix4[4*4]; -typedef dReal dMatrix6[8*6]; -typedef dReal dQuaternion[4]; - - -/* precision dependent scalar math functions */ - -#if defined(dSINGLE) - -#define REAL(x) (x ## f) /* form a constant */ -#define dRecip(x) ((float)(1.0f/(x))) /* reciprocal */ -#define dSqrt(x) ((float)sqrt(x)) /* square root */ -#define dRecipSqrt(x) ((float)(1.0f/sqrt(x))) /* reciprocal square root */ -#define dSin(x) ((float)sin(x)) /* sine */ -#define dCos(x) ((float)cos(x)) /* cosine */ -#define dFabs(x) ((float)fabs(x)) /* absolute value */ -#define dAtan2(y,x) ((float)atan2((y),(x))) /* arc tangent with 2 args */ - -#elif defined(dDOUBLE) - -#define REAL(x) (x) -#define dRecip(x) (1.0/(x)) -#define dSqrt(x) sqrt(x) -#define dRecipSqrt(x) (1.0/sqrt(x)) -#define dSin(x) sin(x) -#define dCos(x) cos(x) -#define dFabs(x) fabs(x) -#define dAtan2(y,x) atan2((y),(x)) - -#else -#error You must #define dSINGLE or dDOUBLE -#endif - - -/* utility */ - - -/* round something up to be a multiple of the EFFICIENT_ALIGNMENT */ - -#define dEFFICIENT_SIZE(x) ((((x)-1)|(EFFICIENT_ALIGNMENT-1))+1) - - -/* alloca aligned to the EFFICIENT_ALIGNMENT. note that this can waste - * up to 15 bytes per allocation, depending on what alloca() returns. - */ - -#define dALLOCA16(n) \ - ((char*)dEFFICIENT_SIZE(((int)(alloca((n)+(EFFICIENT_ALIGNMENT-1)))))) - - -/* internal object types (all prefixed with `dx') */ - -struct dxWorld; /* dynamics world */ -struct dxSpace; /* collision space */ -struct dxBody; /* rigid body (dynamics object) */ -struct dxGeom; /* geometry (collision object) */ -struct dxJoint; -struct dxJointNode; -struct dxJointGroup; - -typedef struct dxWorld *dWorldID; -typedef struct dxSpace *dSpaceID; -typedef struct dxBody *dBodyID; -typedef struct dxGeom *dGeomID; -typedef struct dxJoint *dJointID; -typedef struct dxJointGroup *dJointGroupID; - - -/* error numbers */ - -enum { - d_ERR_UNKNOWN = 0, /* unknown error */ - d_ERR_IASSERT, /* internal assertion failed */ - d_ERR_UASSERT, /* user assertion failed */ - d_ERR_LCP /* user assertion failed */ -}; - - -/* joint type numbers */ - -enum { - dJointTypeNone = 0, /* or "unknown" */ - dJointTypeBall, - dJointTypeHinge, - dJointTypeSlider, - dJointTypeContact, - dJointTypeUniversal, - dJointTypeHinge2, - dJointTypeFixed, - dJointTypeNull, - dJointTypeAMotor -}; - - -/* an alternative way of setting joint parameters, using joint parameter - * structures and member constants. we don't actually do this yet. - */ - -/* -typedef struct dLimot { - int mode; - dReal lostop, histop; - dReal vel, fmax; - dReal fudge_factor; - dReal bounce, soft; - dReal suspension_erp, suspension_cfm; -} dLimot; - -enum { - dLimotLoStop = 0x0001, - dLimotHiStop = 0x0002, - dLimotVel = 0x0004, - dLimotFMax = 0x0008, - dLimotFudgeFactor = 0x0010, - dLimotBounce = 0x0020, - dLimotSoft = 0x0040 -}; -*/ - - -/* standard joint parameter names. why are these here? - because we don't want - * to include all the joint function definitions in joint.cpp. hmmmm. - * MSVC complains if we call D_ALL_PARAM_NAMES_X with a blank second argument, - * which is why we have the D_ALL_PARAM_NAMES macro as well. please copy and - * paste between these two. - */ - -#define D_ALL_PARAM_NAMES(start) \ - /* parameters for limits and motors */ \ - dParamLoStop = start, \ - dParamHiStop, \ - dParamVel, \ - dParamFMax, \ - dParamFudgeFactor, \ - dParamBounce, \ - dParamCFM, \ - dParamStopERP, \ - dParamStopCFM, \ - /* parameters for suspension */ \ - dParamSuspensionERP, \ - dParamSuspensionCFM, - -#define D_ALL_PARAM_NAMES_X(start,x) \ - /* parameters for limits and motors */ \ - dParamLoStop ## x = start, \ - dParamHiStop ## x, \ - dParamVel ## x, \ - dParamFMax ## x, \ - dParamFudgeFactor ## x, \ - dParamBounce ## x, \ - dParamCFM ## x, \ - dParamStopERP ## x, \ - dParamStopCFM ## x, \ - /* parameters for suspension */ \ - dParamSuspensionERP ## x, \ - dParamSuspensionCFM ## x, - -enum { - D_ALL_PARAM_NAMES(0) - D_ALL_PARAM_NAMES_X(0x100,2) - D_ALL_PARAM_NAMES_X(0x200,3) - - /* add a multiple of this constant to the basic parameter numbers to get - * the parameters for the second, third etc axes. - */ - dParamGroup=0x100 -}; - - -/* angular motor mode numbers */ - -enum{ - dAMotorUser = 0, - dAMotorEuler = 1 -}; - - -/* joint force feedback information */ - -typedef struct dJointFeedback { - dVector3 f1; // force applied to body 1 - dVector3 t1; // torque applied to body 1 - dVector3 f2; // force applied to body 2 - dVector3 t2; // torque applied to body 2 -} dJointFeedback; - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/contact.h b/extern/ode/dist/include/ode/contact.h deleted file mode 100644 index 6fc66a179c0..00000000000 --- a/extern/ode/dist/include/ode/contact.h +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_CONTACT_H_ -#define _ODE_CONTACT_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -enum { - dContactMu2 = 0x001, - dContactFDir1 = 0x002, - dContactBounce = 0x004, - dContactSoftERP = 0x008, - dContactSoftCFM = 0x010, - dContactMotion1 = 0x020, - dContactMotion2 = 0x040, - dContactSlip1 = 0x080, - dContactSlip2 = 0x100, - - dContactApprox0 = 0x0000, - dContactApprox1_1 = 0x1000, - dContactApprox1_2 = 0x2000, - dContactApprox1 = 0x3000 -}; - - -typedef struct dSurfaceParameters { - /* must always be defined */ - int mode; - dReal mu; - - /* only defined if the corresponding flag is set in mode */ - dReal mu2; - dReal bounce; - dReal bounce_vel; - dReal soft_erp; - dReal soft_cfm; - dReal motion1,motion2; - dReal slip1,slip2; -} dSurfaceParameters; - - -/* contact info set by collision functions */ - -typedef struct dContactGeom { - dVector3 pos; - dVector3 normal; - dReal depth; - dGeomID g1,g2; -} dContactGeom; - - -/* contact info used by contact joint */ - -typedef struct dContact { - dSurfaceParameters surface; - dContactGeom geom; - dVector3 fdir1; -} dContact; - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/error.h b/extern/ode/dist/include/ode/error.h deleted file mode 100644 index 1350bbc8427..00000000000 --- a/extern/ode/dist/include/ode/error.h +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this comes from the `reuse' library. copy any changes back to the source */ - -#ifndef _ODE_ERROR_H_ -#define _ODE_ERROR_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* all user defined error functions have this type. error and debug functions - * should not return. - */ -typedef void dMessageFunction (int errnum, const char *msg, va_list ap); - -/* set a new error, debug or warning handler. if fn is 0, the default handlers - * are used. - */ -void dSetErrorHandler (dMessageFunction *fn); -void dSetDebugHandler (dMessageFunction *fn); -void dSetMessageHandler (dMessageFunction *fn); - -/* return the current error, debug or warning handler. if the return value is - * 0, the default handlers are in place. - */ -dMessageFunction *dGetErrorHandler(); -dMessageFunction *dGetDebugHandler(); -dMessageFunction *dGetMessageHandler(); - -/* generate a fatal error, debug trap or a message. */ -void dError (int num, const char *msg, ...); -void dDebug (int num, const char *msg, ...); -void dMessage (int num, const char *msg, ...); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/geom.h b/extern/ode/dist/include/ode/geom.h deleted file mode 100644 index 20fc8998ded..00000000000 --- a/extern/ode/dist/include/ode/geom.h +++ /dev/null @@ -1,153 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_GEOM_H_ -#define _ODE_GEOM_H_ - -#include -#include -#include - -#if defined SHARED_GEOM_H_INCLUDED_FROM_DEFINING_FILE -#define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT -#else -#define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* ************************************************************************ */ -/* utility functions */ - -void dClosestLineSegmentPoints (const dVector3 a1, const dVector3 a2, - const dVector3 b1, const dVector3 b2, - dVector3 cp1, dVector3 cp2); - -int dBoxTouchesBox (const dVector3 _p1, const dMatrix3 R1, - const dVector3 side1, const dVector3 _p2, - const dMatrix3 R2, const dVector3 side2); - -void dInfiniteAABB (dGeomID geom, dReal aabb[6]); -void dCloseODE(); - -/* ************************************************************************ */ -/* standard classes */ - -/* class numbers */ -extern GLOBAL_SHAREDLIB_SPEC int dSphereClass; -extern GLOBAL_SHAREDLIB_SPEC int dBoxClass; -extern GLOBAL_SHAREDLIB_SPEC int dCCylinderClass; -extern GLOBAL_SHAREDLIB_SPEC int dPlaneClass; -extern GLOBAL_SHAREDLIB_SPEC int dGeomGroupClass; -extern GLOBAL_SHAREDLIB_SPEC int dGeomTransformClass; - -/* constructors */ -dGeomID dCreateSphere (dSpaceID space, dReal radius); -dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz); -dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d); -dGeomID dCreateCCylinder (dSpaceID space, dReal radius, dReal length); -dGeomID dCreateGeomGroup (dSpaceID space); - -/* set geometry parameters */ -void dGeomSphereSetRadius (dGeomID sphere, dReal radius); -void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz); -void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d); -void dGeomCCylinderSetParams (dGeomID ccylinder, dReal radius, dReal length); - -/* get geometry parameters */ -int dGeomGetClass (dGeomID); -dReal dGeomSphereGetRadius (dGeomID sphere); -void dGeomBoxGetLengths (dGeomID box, dVector3 result); -void dGeomPlaneGetParams (dGeomID plane, dVector4 result); -void dGeomCCylinderGetParams (dGeomID ccylinder, - dReal *radius, dReal *length); - -/* general functions */ -void dGeomSetData (dGeomID, void *); -void *dGeomGetData (dGeomID); -void dGeomSetBody (dGeomID, dBodyID); -dBodyID dGeomGetBody (dGeomID); -void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z); -void dGeomSetRotation (dGeomID, const dMatrix3 R); -const dReal * dGeomGetPosition (dGeomID); -const dReal * dGeomGetRotation (dGeomID); -void dGeomDestroy (dGeomID); -void dGeomGetAABB (dGeomID, dReal aabb[6]); -dReal *dGeomGetSpaceAABB (dGeomID); - -/* ************************************************************************ */ -/* geometry group functions */ - -void dGeomGroupAdd (dGeomID group, dGeomID x); -void dGeomGroupRemove (dGeomID group, dGeomID x); -int dGeomGroupGetNumGeoms (dGeomID group); -dGeomID dGeomGroupGetGeom (dGeomID group, int i); - -/* ************************************************************************ */ -/* transformed geometry functions */ - -dGeomID dCreateGeomTransform (dSpaceID space); -void dGeomTransformSetGeom (dGeomID g, dGeomID obj); -dGeomID dGeomTransformGetGeom (dGeomID g); -void dGeomTransformSetCleanup (dGeomID g, int mode); -int dGeomTransformGetCleanup (dGeomID g); -void dGeomTransformSetInfo (dGeomID g, int mode); -int dGeomTransformGetInfo (dGeomID g); - -/* ************************************************************************ */ -/* general collision */ - -int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact, - int skip); - -/* ************************************************************************ */ -/* custom classes */ - -typedef void dGetAABBFn (dGeomID, dReal aabb[6]); -typedef int dColliderFn (dGeomID o1, dGeomID o2, - int flags, dContactGeom *contact, int skip); -typedef dColliderFn * dGetColliderFnFn (int num); -typedef void dGeomDtorFn (dGeomID o); -typedef int dAABBTestFn (dGeomID o1, dGeomID o2, dReal aabb[6]); - -typedef struct dGeomClass { - int bytes; - dGetColliderFnFn *collider; - dGetAABBFn *aabb; - dAABBTestFn *aabb_test; - dGeomDtorFn *dtor; -} dGeomClass; - -int dCreateGeomClass (const dGeomClass *classptr); -void * dGeomGetClassData (dGeomID); -dGeomID dCreateGeom (int classnum); - -/* ************************************************************************ */ - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/mass.h b/extern/ode/dist/include/ode/mass.h deleted file mode 100644 index 8e75da0c1eb..00000000000 --- a/extern/ode/dist/include/ode/mass.h +++ /dev/null @@ -1,98 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_MASS_H_ -#define _ODE_MASS_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct dMass; -typedef struct dMass dMass; - - -void dMassSetZero (dMass *); - -void dMassSetParameters (dMass *, dReal themass, - dReal cgx, dReal cgy, dReal cgz, - dReal I11, dReal I22, dReal I33, - dReal I12, dReal I13, dReal I23); - -void dMassSetSphere (dMass *, dReal density, dReal radius); - -void dMassSetCappedCylinder (dMass *, dReal density, int direction, - dReal a, dReal b); - -void dMassSetBox (dMass *, dReal density, - dReal lx, dReal ly, dReal lz); - -void dMassAdjust (dMass *, dReal newmass); - -void dMassTranslate (dMass *, dReal x, dReal y, dReal z); - -void dMassRotate (dMass *, const dMatrix3 R); - -void dMassAdd (dMass *a, const dMass *b); - - - -struct dMass { - dReal mass; - dVector4 c; - dMatrix3 I; - -#ifdef __cplusplus - dMass() - { dMassSetZero (this); } - void setZero() - { dMassSetZero (this); } - void setParameters (dReal themass, dReal cgx, dReal cgy, dReal cgz, - dReal I11, dReal I22, dReal I33, - dReal I12, dReal I13, dReal I23) - { dMassSetParameters (this,themass,cgx,cgy,cgz,I11,I22,I33,I12,I13,I23); } - void setSphere (dReal density, dReal radius) - { dMassSetSphere (this,density,radius); } - void setCappedCylinder (dReal density, int direction, dReal a, dReal b) - { dMassSetCappedCylinder (this,density,direction,a,b); } - void setBox (dReal density, dReal lx, dReal ly, dReal lz) - { dMassSetBox (this,density,lx,ly,lz); } - void adjust (dReal newmass) - { dMassAdjust (this,newmass); } - void translate (dReal x, dReal y, dReal z) - { dMassTranslate (this,x,y,z); } - void rotate (const dMatrix3 R) - { dMassRotate (this,R); } - void add (const dMass *b) - { dMassAdd (this,b); } -#endif -}; - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/matrix.h b/extern/ode/dist/include/ode/matrix.h deleted file mode 100644 index 94d830095cd..00000000000 --- a/extern/ode/dist/include/ode/matrix.h +++ /dev/null @@ -1,195 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* optimized and unoptimized vector and matrix functions */ - -#ifndef _ODE_MATRIX_H_ -#define _ODE_MATRIX_H_ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* set a vector/matrix of size n to all zeros, or to a specific value. */ - -void dSetZero (dReal *a, int n); -void dSetValue (dReal *a, int n, dReal value); - - -/* get the dot product of two n*1 vectors. if n <= 0 then - * zero will be returned (in which case a and b need not be valid). - */ - -dReal dDot (const dReal *a, const dReal *b, int n); - - -/* get the dot products of (a0,b), (a1,b), etc and return them in outsum. - * all vectors are n*1. if n <= 0 then zeroes will be returned (in which case - * the input vectors need not be valid). this function is somewhat faster - * than calling dDot() for all of the combinations separately. - */ - -/* NOT INCLUDED in the library for now. -void dMultidot2 (const dReal *a0, const dReal *a1, - const dReal *b, dReal *outsum, int n); -*/ - - -/* matrix multiplication. all matrices are stored in standard row format. - * the digit refers to the argument that is transposed: - * 0: A = B * C (sizes: A:p*r B:p*q C:q*r) - * 1: A = B' * C (sizes: A:p*r B:q*p C:q*r) - * 2: A = B * C' (sizes: A:p*r B:p*q C:r*q) - * case 1,2 are equivalent to saying that the operation is A=B*C but - * B or C are stored in standard column format. - */ - -void dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -void dMultiply1 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); -void dMultiply2 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); - - -/* do an in-place cholesky decomposition on the lower triangle of the n*n - * symmetric matrix A (which is stored by rows). the resulting lower triangle - * will be such that L*L'=A. return 1 on success and 0 on failure (on failure - * the matrix is not positive definite). - */ - -int dFactorCholesky (dReal *A, int n); - - -/* solve for x: L*L'*x = b, and put the result back into x. - * L is size n*n, b is size n*1. only the lower triangle of L is considered. - */ - -void dSolveCholesky (const dReal *L, dReal *b, int n); - - -/* compute the inverse of the n*n positive definite matrix A and put it in - * Ainv. this is not especially fast. this returns 1 on success (A was - * positive definite) or 0 on failure (not PD). - */ - -int dInvertPDMatrix (const dReal *A, dReal *Ainv, int n); - - -/* check whether an n*n matrix A is positive definite, return 1/0 (yes/no). - * positive definite means that x'*A*x > 0 for any x. this performs a - * cholesky decomposition of A. if the decomposition fails then the matrix - * is not positive definite. A is stored by rows. A is not altered. - */ - -int dIsPositiveDefinite (const dReal *A, int n); - - -/* factorize a matrix A into L*D*L', where L is lower triangular with ones on - * the diagonal, and D is diagonal. - * A is an n*n matrix stored by rows, with a leading dimension of n rounded - * up to 4. L is written into the strict lower triangle of A (the ones are not - * written) and the reciprocal of the diagonal elements of D are written into - * d. - */ -void dFactorLDLT (dReal *A, dReal *d, int n, int nskip); - - -/* solve L*x=b, where L is n*n lower triangular with ones on the diagonal, - * and x,b are n*1. b is overwritten with x. - * the leading dimension of L is `nskip'. - */ -void dSolveL1 (const dReal *L, dReal *b, int n, int nskip); - - -/* solve L'*x=b, where L is n*n lower triangular with ones on the diagonal, - * and x,b are n*1. b is overwritten with x. - * the leading dimension of L is `nskip'. - */ -void dSolveL1T (const dReal *L, dReal *b, int n, int nskip); - - -/* in matlab syntax: a(1:n) = a(1:n) .* d(1:n) */ - -void dVectorScale (dReal *a, const dReal *d, int n); - - -/* given `L', a n*n lower triangular matrix with ones on the diagonal, - * and `d', a n*1 vector of the reciprocal diagonal elements of an n*n matrix - * D, solve L*D*L'*x=b where x,b are n*1. x overwrites b. - * the leading dimension of L is `nskip'. - */ - -void dSolveLDLT (const dReal *L, const dReal *d, dReal *b, int n, int nskip); - - -/* given an L*D*L' factorization of an n*n matrix A, return the updated - * factorization L2*D2*L2' of A plus the following "top left" matrix: - * - * [ b a' ] <-- b is a[0] - * [ a 0 ] <-- a is a[1..n-1] - * - * - L has size n*n, its leading dimension is nskip. L is lower triangular - * with ones on the diagonal. only the lower triangle of L is referenced. - * - d has size n. d contains the reciprocal diagonal elements of D. - * - a has size n. - * the result is written into L, except that the left column of L and d[0] - * are not actually modified. see ldltaddTL.m for further comments. - */ -void dLDLTAddTL (dReal *L, dReal *d, const dReal *a, int n, int nskip); - - -/* given an L*D*L' factorization of a permuted matrix A, produce a new - * factorization for row and column `r' removed. - * - A has size n1*n1, its leading dimension in nskip. A is symmetric and - * positive definite. only the lower triangle of A is referenced. - * A itself may actually be an array of row pointers. - * - L has size n2*n2, its leading dimension in nskip. L is lower triangular - * with ones on the diagonal. only the lower triangle of L is referenced. - * - d has size n2. d contains the reciprocal diagonal elements of D. - * - p is a permutation vector. it contains n2 indexes into A. each index - * must be in the range 0..n1-1. - * - r is the row/column of L to remove. - * the new L will be written within the old L, i.e. will have the same leading - * dimension. the last row and column of L, and the last element of d, are - * undefined on exit. - * - * a fast O(n^2) algorithm is used. see ldltremove.m for further comments. - */ -void dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, - int n1, int n2, int r, int nskip); - - -/* given an n*n matrix A (with leading dimension nskip), remove the r'th row - * and column by moving elements. the new matrix will have the same leading - * dimension. the last row and column of A are untouched on exit. - */ -void dRemoveRowCol (dReal *A, int n, int nskip, int r); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/memory.h b/extern/ode/dist/include/ode/memory.h deleted file mode 100644 index 7ea668e4d39..00000000000 --- a/extern/ode/dist/include/ode/memory.h +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this comes from the `reuse' library. copy any changes back to the source */ - -#ifndef _ODE_MEMORY_H_ -#define _ODE_MEMORY_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* function types to allocate and free memory */ -typedef void * dAllocFunction (int size); -typedef void * dReallocFunction (void *ptr, int oldsize, int newsize); -typedef void dFreeFunction (void *ptr, int size); - -/* set new memory management functions. if fn is 0, the default handlers are - * used. */ -void dSetAllocHandler (dAllocFunction *fn); -void dSetReallocHandler (dReallocFunction *fn); -void dSetFreeHandler (dFreeFunction *fn); - -/* get current memory management functions */ -dAllocFunction *dGetAllocHandler (); -dReallocFunction *dGetReallocHandler (); -dFreeFunction *dGetFreeHandler (); - -/* allocate and free memory. */ -void * dAlloc (int size); -void * dRealloc (void *ptr, int oldsize, int newsize); -void dFree (void *ptr, int size); - -/* when alloc debugging is turned on, this indicates that the given block of - * alloc()ed memory should not be reported as "still in use" when the program - * exits. - */ -void dAllocDontReport (void *ptr); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/misc.h b/extern/ode/dist/include/ode/misc.h deleted file mode 100644 index 241ad71ed9e..00000000000 --- a/extern/ode/dist/include/ode/misc.h +++ /dev/null @@ -1,86 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* miscellaneous math functions. these are mostly useful for testing */ - -#ifndef _ODE_MISC_H_ -#define _ODE_MISC_H_ - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* return 1 if the random number generator is working. */ -int dTestRand(); - -/* return next 32 bit random number. this uses a not-very-random linear - * congruential method. - */ -unsigned long dRand(); - -/* get and set the current random number seed. */ -unsigned long dRandGetSeed(); -void dRandSetSeed (unsigned long s); - -/* return a random integer between 0..n-1. the distribution will get worse - * as n approaches 2^32. - */ -int dRandInt (int n); - -/* return a random real number between 0..1 */ -dReal dRandReal(); - -/* print out a matrix */ -#ifdef __cplusplus -void dPrintMatrix (dReal *A, int n, int m, char *fmt = "%10.4f ", - FILE *f=stdout); -#else -void dPrintMatrix (dReal *A, int n, int m, char *fmt, FILE *f); -#endif - -/* make a random vector with entries between +/- range. A has n elements. */ -void dMakeRandomVector (dReal *A, int n, dReal range); - -/* make a random matrix with entries between +/- range. A has size n*m. */ -void dMakeRandomMatrix (dReal *A, int n, int m, dReal range); - -/* clear the upper triangle of a square matrix */ -void dClearUpperTriangle (dReal *A, int n); - -/* return the maximum element difference between the two n*m matrices */ -dReal dMaxDifference (const dReal *A, const dReal *B, int n, int m); - -/* return the maximum element difference between the lower triangle of two - * n*n matrices */ -dReal dMaxDifferenceLowerTriangle (const dReal *A, const dReal *B, int n); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/objects.h b/extern/ode/dist/include/ode/objects.h deleted file mode 100644 index 606051ead34..00000000000 --- a/extern/ode/dist/include/ode/objects.h +++ /dev/null @@ -1,202 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_OBJECTS_H_ -#define _ODE_OBJECTS_H_ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* world */ - -dWorldID dWorldCreate(); -void dWorldDestroy (dWorldID); - -void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z); -void dWorldGetGravity (dWorldID, dVector3 gravity); -void dWorldSetERP (dWorldID, dReal erp); -dReal dWorldGetERP (dWorldID); -void dWorldSetCFM (dWorldID, dReal cfm); -dReal dWorldGetCFM (dWorldID); -void dWorldStep (dWorldID, dReal stepsize); -void dWorldImpulseToForce (dWorldID, dReal stepsize, - dReal ix, dReal iy, dReal iz, dVector3 force); - -/* bodies */ - -dBodyID dBodyCreate (dWorldID); -void dBodyDestroy (dBodyID); - -void dBodySetData (dBodyID, void *data); -void *dBodyGetData (dBodyID); - -void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z); -void dBodySetRotation (dBodyID, const dMatrix3 R); -void dBodySetQuaternion (dBodyID, const dQuaternion q); -void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z); -void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z); -const dReal * dBodyGetPosition (dBodyID); -const dReal * dBodyGetRotation (dBodyID); /* ptr to 4x3 rot matrix */ -const dReal * dBodyGetQuaternion (dBodyID); -const dReal * dBodyGetLinearVel (dBodyID); -const dReal * dBodyGetAngularVel (dBodyID); - -void dBodySetMass (dBodyID, const dMass *mass); -void dBodyGetMass (dBodyID, dMass *mass); - -void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz); -void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz); -void dBodyAddRelForce (dBodyID, dReal fx, dReal fy, dReal fz); -void dBodyAddRelTorque (dBodyID, dReal fx, dReal fy, dReal fz); -void dBodyAddForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); -void dBodyAddForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); -void dBodyAddRelForceAtPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); -void dBodyAddRelForceAtRelPos (dBodyID, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz); - -const dReal * dBodyGetForce (dBodyID); -const dReal * dBodyGetTorque (dBodyID); -void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z); -void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z); - -void dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz, - dVector3 result); -void dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz, - dVector3 result); -void dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz, - dVector3 result); -void dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz, - dVector3 result); -void dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz, - dVector3 result); -void dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz, - dVector3 result); - -void dBodySetFiniteRotationMode (dBodyID, int mode); -void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z); - -int dBodyGetFiniteRotationMode (dBodyID); -void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result); - -int dBodyGetNumJoints (dBodyID b); -dJointID dBodyGetJoint (dBodyID, int index); - -void dBodyEnable (dBodyID); -void dBodyDisable (dBodyID); -int dBodyIsEnabled (dBodyID); - -void dBodySetGravityMode (dBodyID b, int mode); -int dBodyGetGravityMode (dBodyID b); - - -/* joints */ - -dJointID dJointCreateBall (dWorldID, dJointGroupID); -dJointID dJointCreateHinge (dWorldID, dJointGroupID); -dJointID dJointCreateSlider (dWorldID, dJointGroupID); -dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *); -dJointID dJointCreateHinge2 (dWorldID, dJointGroupID); -dJointID dJointCreateUniversal (dWorldID, dJointGroupID); -dJointID dJointCreateFixed (dWorldID, dJointGroupID); -dJointID dJointCreateNull (dWorldID, dJointGroupID); -dJointID dJointCreateAMotor (dWorldID, dJointGroupID); - -void dJointDestroy (dJointID); - -dJointGroupID dJointGroupCreate (int max_size); -void dJointGroupDestroy (dJointGroupID); -void dJointGroupEmpty (dJointGroupID); - -void dJointAttach (dJointID, dBodyID body1, dBodyID body2); -void dJointSetData (dJointID, void *data); -void *dJointGetData (dJointID); -int dJointGetType (dJointID); -dBodyID dJointGetBody (dJointID, int index); - -void dJointSetFeedback (dJointID, dJointFeedback *); -dJointFeedback *dJointGetFeedback (dJointID); - -void dJointSetBallAnchor (dJointID, dReal x, dReal y, dReal z); -void dJointSetHingeAnchor (dJointID, dReal x, dReal y, dReal z); -void dJointSetHingeAxis (dJointID, dReal x, dReal y, dReal z); -void dJointSetHingeParam (dJointID, int parameter, dReal value); -void dJointSetSliderAxis (dJointID, dReal x, dReal y, dReal z); -void dJointSetSliderParam (dJointID, int parameter, dReal value); -void dJointSetHinge2Anchor (dJointID, dReal x, dReal y, dReal z); -void dJointSetHinge2Axis1 (dJointID, dReal x, dReal y, dReal z); -void dJointSetHinge2Axis2 (dJointID, dReal x, dReal y, dReal z); -void dJointSetHinge2Param (dJointID, int parameter, dReal value); -void dJointSetUniversalAnchor (dJointID, dReal x, dReal y, dReal z); -void dJointSetUniversalAxis1 (dJointID, dReal x, dReal y, dReal z); -void dJointSetUniversalAxis2 (dJointID, dReal x, dReal y, dReal z); -void dJointSetFixed (dJointID); -void dJointSetAMotorNumAxes (dJointID, int num); -void dJointSetAMotorAxis (dJointID, int anum, int rel, - dReal x, dReal y, dReal z); -void dJointSetAMotorAngle (dJointID, int anum, dReal angle); -void dJointSetAMotorParam (dJointID, int parameter, dReal value); -void dJointSetAMotorMode (dJointID, int mode); - -void dJointGetBallAnchor (dJointID, dVector3 result); -void dJointGetHingeAnchor (dJointID, dVector3 result); -void dJointGetHingeAxis (dJointID, dVector3 result); -dReal dJointGetHingeParam (dJointID, int parameter); -dReal dJointGetHingeAngle (dJointID); -dReal dJointGetHingeAngleRate (dJointID); -dReal dJointGetSliderPosition (dJointID); -dReal dJointGetSliderPositionRate (dJointID); -void dJointGetSliderAxis (dJointID, dVector3 result); -dReal dJointGetSliderParam (dJointID, int parameter); -void dJointGetHinge2Anchor (dJointID, dVector3 result); -void dJointGetHinge2Axis1 (dJointID, dVector3 result); -void dJointGetHinge2Axis2 (dJointID, dVector3 result); -dReal dJointGetHinge2Param (dJointID, int parameter); -dReal dJointGetHinge2Angle1 (dJointID); -dReal dJointGetHinge2Angle1Rate (dJointID); -dReal dJointGetHinge2Angle2Rate (dJointID); -void dJointGetUniversalAnchor (dJointID, dVector3 result); -void dJointGetUniversalAxis1 (dJointID, dVector3 result); -void dJointGetUniversalAxis2 (dJointID, dVector3 result); -int dJointGetAMotorNumAxes (dJointID); -void dJointGetAMotorAxis (dJointID, int anum, dVector3 result); -int dJointGetAMotorAxisRel (dJointID, int anum); -dReal dJointGetAMotorAngle (dJointID, int anum); -dReal dJointGetAMotorAngleRate (dJointID, int anum); -dReal dJointGetAMotorParam (dJointID, int parameter); -int dJointGetAMotorMode (dJointID); - -int dAreConnected (dBodyID, dBodyID); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/ode.h b/extern/ode/dist/include/ode/ode.h deleted file mode 100644 index da7f2e1a0e7..00000000000 --- a/extern/ode/dist/include/ode/ode.h +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ODE_H_ -#define _ODE_ODE_H_ - -/* include *everything* here */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - diff --git a/extern/ode/dist/include/ode/odecpp.h b/extern/ode/dist/include/ode/odecpp.h deleted file mode 100644 index 35712236d1d..00000000000 --- a/extern/ode/dist/include/ode/odecpp.h +++ /dev/null @@ -1,797 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -// C++ interface for everything - - -#ifndef _ODE_ODECPP_H_ -#define _ODE_ODECPP_H_ -#ifdef __cplusplus - -#include - - -class dWorld { - dWorldID _id; - - // intentionally undefined, don't use these - dWorld (const dWorld &); - void operator= (const dWorld &); - -public: - dWorld() - { _id = dWorldCreate(); } - ~dWorld() - { dWorldDestroy (_id); } - - dWorldID id() const - { return _id; } - operator dWorldID() const - { return _id; } - - void setGravity (dReal x, dReal y, dReal z) - { dWorldSetGravity (_id,x,y,z); } - void getGravity (dVector3 g) const - { dWorldGetGravity (_id,g); } - - void setERP (dReal erp) - { dWorldSetERP(_id, erp); } - dReal getERP() const - { return dWorldGetERP(_id); } - - void setCFM (dReal cfm) - { dWorldSetCFM(_id, cfm); } - dReal getCFM() const - { return dWorldGetCFM(_id); } - - void step (dReal stepsize) - { dWorldStep (_id,stepsize); } - - void impulseToForce (dReal stepsize, dReal ix, dReal iy, dReal iz, - dVector3 force) - { dWorldImpulseToForce (_id,stepsize,ix,iy,iz,force); } -}; - - -class dBody { - dBodyID _id; - - // intentionally undefined, don't use these - dBody (const dBody &); - void operator= (const dBody &); - -public: - dBody() - { _id = 0; } - dBody (dWorldID world) - { _id = dBodyCreate (world); } - ~dBody() - { if (_id) dBodyDestroy (_id); } - - void create (dWorldID world) { - if (_id) dBodyDestroy (_id); - _id = dBodyCreate (world); - } - - dBodyID id() const - { return _id; } - operator dBodyID() const - { return _id; } - - void setData (void *data) - { dBodySetData (_id,data); } - void *getData() const - { return dBodyGetData (_id); } - - void setPosition (dReal x, dReal y, dReal z) - { dBodySetPosition (_id,x,y,z); } - void setRotation (const dMatrix3 R) - { dBodySetRotation (_id,R); } - void setQuaternion (const dQuaternion q) - { dBodySetQuaternion (_id,q); } - void setLinearVel (dReal x, dReal y, dReal z) - { dBodySetLinearVel (_id,x,y,z); } - void setAngularVel (dReal x, dReal y, dReal z) - { dBodySetAngularVel (_id,x,y,z); } - - const dReal * getPosition() const - { return dBodyGetPosition (_id); } - const dReal * getRotation() const - { return dBodyGetRotation (_id); } - const dReal * getQuaternion() const - { return dBodyGetQuaternion (_id); } - const dReal * getLinearVel() const - { return dBodyGetLinearVel (_id); } - const dReal * getAngularVel() const - { return dBodyGetAngularVel (_id); } - - void setMass (const dMass *mass) - { dBodySetMass (_id,mass); } - void getMass (dMass *mass) const - { dBodyGetMass (_id,mass); } - - void addForce (dReal fx, dReal fy, dReal fz) - { dBodyAddForce (_id, fx, fy, fz); } - void addTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddTorque (_id, fx, fy, fz); } - void addRelForce (dReal fx, dReal fy, dReal fz) - { dBodyAddRelForce (_id, fx, fy, fz); } - void addRelTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddRelTorque (_id, fx, fy, fz); } - void addForceAtPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddForceAtPos (_id, fx, fy, fz, px, py, pz); } - void addForceAtRelPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddForceAtRelPos (_id, fx, fy, fz, px, py, pz); } - void addRelForceAtPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtPos (_id, fx, fy, fz, px, py, pz); } - void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtRelPos (_id, fx, fy, fz, px, py, pz); } - - const dReal * getForce() const - { return dBodyGetForce(_id); } - const dReal * getTorque() const - { return dBodyGetTorque(_id); } - void setForce (dReal x, dReal y, dReal z) - { dBodySetForce (_id,x,y,z); } - void setTorque (dReal x, dReal y, dReal z) - { dBodySetTorque (_id,x,y,z); } - - void enable() - { dBodyEnable (_id); } - void disable() - { dBodyDisable (_id); } - int isEnabled() const - { return dBodyIsEnabled (_id); } - - void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetRelPointPos (_id, px, py, pz, result); } - void getRelPointVel (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetRelPointVel (_id, px, py, pz, result); } - void getPointVel (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetPointVel (_id,px,py,pz,result); } - void getPosRelPoint (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyGetPosRelPoint (_id,px,py,pz,result); } - void vectorToWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyVectorToWorld (_id,px,py,pz,result); } - void vectorFromWorld (dReal px, dReal py, dReal pz, dVector3 result) const - { dBodyVectorFromWorld (_id,px,py,pz,result); } - - void setFiniteRotationMode (int mode) - { dBodySetFiniteRotationMode (_id, mode); } - void setFiniteRotationAxis (dReal x, dReal y, dReal z) - { dBodySetFiniteRotationAxis (_id, x, y, z); } - - int getFiniteRotationMode() const - { return dBodyGetFiniteRotationMode (_id); } - void getFiniteRotationAxis (dVector3 result) const - { dBodyGetFiniteRotationAxis (_id, result); } - - int getNumJoints() const - { return dBodyGetNumJoints (_id); } - dJointID getJoint (int index) const - { return dBodyGetJoint (_id, index); } - - void setGravityMode (int mode) - { dBodySetGravityMode (_id,mode); } - int getGravityMode() const - { return dBodyGetGravityMode (_id); } - - int isConnectedTo (dBodyID body) const - { return dAreConnected (_id, body); } -}; - - -class dJointGroup { - dJointGroupID _id; - - // intentionally undefined, don't use these - dJointGroup (const dJointGroup &); - void operator= (const dJointGroup &); - -public: - dJointGroup (int dummy_arg=0) - { _id = dJointGroupCreate (0); } - ~dJointGroup() - { dJointGroupDestroy (_id); } - void create (int dummy_arg=0) { - if (_id) dJointGroupDestroy (_id); - _id = dJointGroupCreate (0); - } - - dJointGroupID id() const - { return _id; } - operator dJointGroupID() const - { return _id; } - - void empty() - { dJointGroupEmpty (_id); } -}; - - -class dJoint { -private: - // intentionally undefined, don't use these - dJoint (const dJoint &) ; - void operator= (const dJoint &); - -protected: - dJointID _id; - -public: - dJoint() - { _id = 0; } - ~dJoint() - { if (_id) dJointDestroy (_id); } - - dJointID id() const - { return _id; } - operator dJointID() const - { return _id; } - - void attach (dBodyID body1, dBodyID body2) - { dJointAttach (_id, body1, body2); } - - void setData (void *data) - { dJointSetData (_id, data); } - void *getData (void *data) const - { return dJointGetData (_id); } - - int getType() const - { return dJointGetType (_id); } - - dBodyID getBody (int index) const - { return dJointGetBody (_id, index); } -}; - - -class dBallJoint : public dJoint { -private: - // intentionally undefined, don't use these - dBallJoint (const dBallJoint &); - void operator= (const dBallJoint &); - -public: - dBallJoint() { } - dBallJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateBall (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateBall (world, group); - } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetBallAnchor (_id, x, y, z); } - void getAnchor (dVector3 result) const - { dJointGetBallAnchor (_id, result); } -} ; - - -class dHingeJoint : public dJoint { - // intentionally undefined, don't use these - dHingeJoint (const dHingeJoint &); - void operator = (const dHingeJoint &); - -public: - dHingeJoint() { } - dHingeJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateHinge (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateHinge (world, group); - } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetHingeAnchor (_id, x, y, z); } - void getAnchor (dVector3 result) const - { dJointGetHingeAnchor (_id, result); } - - void setAxis (dReal x, dReal y, dReal z) - { dJointSetHingeAxis (_id, x, y, z); } - void getAxis (dVector3 result) const - { dJointGetHingeAxis (_id, result); } - - dReal getAngle() const - { return dJointGetHingeAngle (_id); } - dReal getAngleRate() const - { return dJointGetHingeAngleRate (_id); } - - void setParam (int parameter, dReal value) - { dJointSetHingeParam (_id, parameter, value); } - dReal getParam (int parameter) const - { return dJointGetHingeParam (_id, parameter); } -}; - - -class dSliderJoint : public dJoint { - // intentionally undefined, don't use these - dSliderJoint (const dSliderJoint &); - void operator = (const dSliderJoint &); - -public: - dSliderJoint() { } - dSliderJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateSlider (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateSlider (world, group); - } - - void setAxis (dReal x, dReal y, dReal z) - { dJointSetSliderAxis (_id, x, y, z); } - void getAxis (dVector3 result) const - { dJointGetSliderAxis (_id, result); } - - dReal getPosition() const - { return dJointGetSliderPosition (_id); } - dReal getPositionRate() const - { return dJointGetSliderPositionRate (_id); } - - void setParam (int parameter, dReal value) - { dJointSetSliderParam (_id, parameter, value); } - dReal getParam (int parameter) const - { return dJointGetSliderParam (_id, parameter); } -}; - - -class dUniversalJoint : public dJoint { - // intentionally undefined, don't use these - dUniversalJoint (const dUniversalJoint &); - void operator = (const dUniversalJoint &); - -public: - dUniversalJoint() { } - dUniversalJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateUniversal (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateUniversal (world, group); - } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetUniversalAnchor (_id, x, y, z); } - void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetUniversalAxis1 (_id, x, y, z); } - void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetUniversalAxis2 (_id, x, y, z); } - - void getAnchor (dVector3 result) const - { dJointGetUniversalAnchor (_id, result); } - void getAxis1 (dVector3 result) const - { dJointGetUniversalAxis1 (_id, result); } - void getAxis2 (dVector3 result) const - { dJointGetUniversalAxis2 (_id, result); } -}; - - -class dHinge2Joint : public dJoint { - // intentionally undefined, don't use these - dHinge2Joint (const dHinge2Joint &); - void operator = (const dHinge2Joint &); - -public: - dHinge2Joint() { } - dHinge2Joint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateHinge2 (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateHinge2 (world, group); - } - - void setAnchor (dReal x, dReal y, dReal z) - { dJointSetHinge2Anchor (_id, x, y, z); } - void setAxis1 (dReal x, dReal y, dReal z) - { dJointSetHinge2Axis1 (_id, x, y, z); } - void setAxis2 (dReal x, dReal y, dReal z) - { dJointSetHinge2Axis2 (_id, x, y, z); } - - void getAnchor (dVector3 result) const - { dJointGetHinge2Anchor (_id, result); } - void getAxis1 (dVector3 result) const - { dJointGetHinge2Axis1 (_id, result); } - void getAxis2 (dVector3 result) const - { dJointGetHinge2Axis2 (_id, result); } - - dReal getAngle1() const - { return dJointGetHinge2Angle1 (_id); } - dReal getAngle1Rate() const - { return dJointGetHinge2Angle1Rate (_id); } - dReal getAngle2Rate() const - { return dJointGetHinge2Angle2Rate (_id); } - - void setParam (int parameter, dReal value) - { dJointSetHinge2Param (_id, parameter, value); } - dReal getParam (int parameter) const - { return dJointGetHinge2Param (_id, parameter); } -}; - - -class dFixedJoint : public dJoint { - // intentionally undefined, don't use these - dFixedJoint (const dFixedJoint &); - void operator = (const dFixedJoint &); - -public: - dFixedJoint() { } - dFixedJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateFixed (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateFixed (world, group); - } - - void set() - { dJointSetFixed (_id); } -}; - - -class dContactJoint : public dJoint { - // intentionally undefined, don't use these - dContactJoint (const dContactJoint &); - void operator = (const dContactJoint &); - -public: - dContactJoint() { } - dContactJoint (dWorldID world, dJointGroupID group, dContact *contact) - { _id = dJointCreateContact (world, group, contact); } - - void create (dWorldID world, dJointGroupID group, dContact *contact) { - if (_id) dJointDestroy (_id); - _id = dJointCreateContact (world, group, contact); - } -}; - - -class dNullJoint : public dJoint { - // intentionally undefined, don't use these - dNullJoint (const dNullJoint &); - void operator = (const dNullJoint &); - -public: - dNullJoint() { } - dNullJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateNull (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateNull (world, group); - } -}; - - -class dAMotorJoint : public dJoint { - // intentionally undefined, don't use these - dAMotorJoint (const dAMotorJoint &); - void operator = (const dAMotorJoint &); - -public: - dAMotorJoint() { } - dAMotorJoint (dWorldID world, dJointGroupID group=0) - { _id = dJointCreateAMotor (world, group); } - - void create (dWorldID world, dJointGroupID group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateAMotor (world, group); - } - - void setMode (int mode) - { dJointSetAMotorMode (_id, mode); } - int getMode() const - { return dJointGetAMotorMode (_id); } - - void setNumAxes (int num) - { dJointSetAMotorNumAxes (_id, num); } - int getNumAxes() const - { return dJointGetAMotorNumAxes (_id); } - - void setAxis (int anum, int rel, dReal x, dReal y, dReal z) - { dJointSetAMotorAxis (_id, anum, rel, x, y, z); } - void getAxis (int anum, dVector3 result) const - { dJointGetAMotorAxis (_id, anum, result); } - int getAxisRel (int anum) const - { return dJointGetAMotorAxisRel (_id, anum); } - - void setAngle (int anum, dReal angle) - { dJointSetAMotorAngle (_id, anum, angle); } - dReal getAngle (int anum) const - { return dJointGetAMotorAngle (_id, anum); } - dReal getAngleRate (int anum) - { return dJointGetAMotorAngleRate (_id,anum); } - - void setParam (int parameter, dReal value) - { dJointSetAMotorParam (_id, parameter, value); } - dReal getParam (int parameter) const - { return dJointGetAMotorParam (_id, parameter); } -}; - - -class dGeom { - // intentionally undefined, don't use these - dGeom (dGeom &); - void operator= (dGeom &); - -protected: - dGeomID _id; - -public: - dGeom() - { _id = 0; } - ~dGeom() - { if (_id) dGeomDestroy (_id); } - - dGeomID id() const - { return _id; } - operator dGeomID() const - { return _id; } - - void destroy() { - if (_id) dGeomDestroy (_id); - _id = 0; - } - - int getClass() const - { return dGeomGetClass (_id); } - - void setData (void *data) - { dGeomSetData (_id,data); } - void *getData() const - { return dGeomGetData (_id); } - - void setBody (dBodyID b) - { dGeomSetBody (_id,b); } - dBodyID getBody() const - { return dGeomGetBody (_id); } - - void setPosition (dReal x, dReal y, dReal z) - { dGeomSetPosition (_id,x,y,z); } - const dReal * getPosition() const - { return dGeomGetPosition (_id); } - - void setRotation (const dMatrix3 R) - { dGeomSetRotation (_id,R); } - const dReal * getRotation() const - { return dGeomGetRotation (_id); } - - void getAABB (dReal aabb[6]) const - { dGeomGetAABB (_id, aabb); } - const dReal *getSpaceAABB() const - { return dGeomGetSpaceAABB (_id); } -}; - - -class dSpace { - // intentionally undefined, don't use these - dSpace (dSpace &); - void operator= (dSpace &); - -protected: - dSpaceID _id; - - // the default constructor is protected so that you - // can't instance this class. you must instance one - // of its subclasses instead. - dSpace () { _id = 0; } - -public: - ~dSpace() - { dSpaceDestroy (_id); } - - dSpaceID id() const - { return _id; } - operator dSpaceID() const - { return _id; } - - void add (dGeomID x) - { dSpaceAdd (_id, x); } - void remove (dGeomID x) - { dSpaceRemove (_id, x); } - int query (dGeomID x) - { return dSpaceQuery (_id,x); } - - void collide (void *data, dNearCallback *callback) - { dSpaceCollide (_id,data,callback); } -}; - - -class dSimpleSpace : public dSpace { - // intentionally undefined, don't use these - dSimpleSpace (dSimpleSpace &); - void operator= (dSimpleSpace &); - -public: - dSimpleSpace () - { _id = dSimpleSpaceCreate(); } -}; - - -class dHashSpace : public dSpace { - // intentionally undefined, don't use these - dHashSpace (dHashSpace &); - void operator= (dHashSpace &); - -public: - dHashSpace () - { _id = dHashSpaceCreate(); } - void setLevels (int minlevel, int maxlevel) - { dHashSpaceSetLevels (_id,minlevel,maxlevel); } -}; - - -class dSphere : public dGeom { - // intentionally undefined, don't use these - dSphere (dSphere &); - void operator= (dSphere &); - -public: - dSphere () { } - dSphere (dSpaceID space, dReal radius) - { _id = dCreateSphere (space, radius); } - - void create (dSpaceID space, dReal radius) { - if (_id) dGeomDestroy (_id); - _id = dCreateSphere (space, radius); - } - - void setRadius (dReal radius) - { dGeomSphereSetRadius (_id, radius); } - dReal getRadius() const - { return dGeomSphereGetRadius (_id); } -}; - - -class dBox : public dGeom { - // intentionally undefined, don't use these - dBox (dBox &); - void operator= (dBox &); - -public: - dBox () { } - dBox (dSpaceID space, dReal lx, dReal ly, dReal lz) - { _id = dCreateBox (space,lx,ly,lz); } - - void create (dSpaceID space, dReal lx, dReal ly, dReal lz) { - if (_id) dGeomDestroy (_id); - _id = dCreateBox (space,lx,ly,lz); - } - - void setLengths (dReal lx, dReal ly, dReal lz) - { dGeomBoxSetLengths (_id, lx, ly, lz); } - void getLengths (dVector3 result) const - { dGeomBoxGetLengths (_id,result); } -}; - - -class dPlane : public dGeom { - // intentionally undefined, don't use these - dPlane (dPlane &); - void operator= (dPlane &); - -public: - dPlane() { } - dPlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d) - { _id = dCreatePlane (space,a,b,c,d); } - - void create (dSpaceID space, dReal a, dReal b, dReal c, dReal d) { - if (_id) dGeomDestroy (_id); - _id = dCreatePlane (space,a,b,c,d); - } - - void setParams (dReal a, dReal b, dReal c, dReal d) - { dGeomPlaneSetParams (_id, a, b, c, d); } - void getParams (dVector4 result) const - { dGeomPlaneGetParams (_id,result); } -}; - - -class dCCylinder : public dGeom { - // intentionally undefined, don't use these - dCCylinder (dCCylinder &); - void operator= (dCCylinder &); - -public: - dCCylinder() { } - dCCylinder (dSpaceID space, dReal radius, dReal length) - { _id = dCreateCCylinder (space,radius,length); } - - void create (dSpaceID space, dReal radius, dReal length) { - if (_id) dGeomDestroy (_id); - _id = dCreateCCylinder (space,radius,length); - } - - void setParams (dReal radius, dReal length) - { dGeomCCylinderSetParams (_id, radius, length); } - void getParams (dReal *radius, dReal *length) const - { dGeomCCylinderGetParams (_id,radius,length); } -}; - - -class dGeomGroup : public dGeom { - // intentionally undefined, don't use these - dGeomGroup (dGeomGroup &); - void operator= (dGeomGroup &); - -public: - dGeomGroup() { } - dGeomGroup (dSpaceID space) - { _id = dCreateGeomGroup (space); } - - void create (dSpaceID space=0) { - if (_id) dGeomDestroy (_id); - _id = dCreateGeomGroup (space); - } - - void add (dGeomID x) - { dGeomGroupAdd (_id, x); } - void remove (dGeomID x) - { dGeomGroupRemove (_id, x); } - - int getNumGeoms() const - { return dGeomGroupGetNumGeoms (_id); } - dGeomID getGeom (int i) const - { return dGeomGroupGetGeom (_id, i); } -}; - - -class dGeomTransform : public dGeom { - // intentionally undefined, don't use these - dGeomTransform (dGeomTransform &); - void operator= (dGeomTransform &); - -public: - dGeomTransform() { } - dGeomTransform (dSpaceID space) - { _id = dCreateGeomTransform (space); } - - void create (dSpaceID space=0) { - if (_id) dGeomDestroy (_id); - _id = dCreateGeomTransform (space); - } - - void setGeom (dGeomID geom) - { dGeomTransformSetGeom (_id, geom); } - dGeomID getGeom() const - { return dGeomTransformGetGeom (_id); } - - void setCleanup (int mode) - { dGeomTransformSetCleanup (_id,mode); } - int getCleanup (dGeomID g) - { return dGeomTransformGetCleanup (_id); } - - void setInfo (int mode) - { dGeomTransformSetInfo (_id,mode); } - int getInfo() - { return dGeomTransformGetInfo (_id); } -}; - -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/odecpp_old.h b/extern/ode/dist/include/ode/odecpp_old.h deleted file mode 100644 index b7b55232f89..00000000000 --- a/extern/ode/dist/include/ode/odecpp_old.h +++ /dev/null @@ -1,317 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this is the old C++ interface, the new C++ interface is not quite - * compatible with this. but this file is kept around in case you were - * using the old interface. - */ - -#ifndef _ODE_ODECPP_H_ -#define _ODE_ODECPP_H_ -#ifdef __cplusplus - -#include - - -class dWorld { - dWorldID _id; - - dWorld (dWorld &) { dDebug (0,"bad"); } - void operator= (dWorld &) { dDebug (0,"bad"); } - -public: - dWorld() - { _id = dWorldCreate(); } - ~dWorld() - { dWorldDestroy (_id); } - dWorldID id() - { return _id; } - - void setGravity (dReal x, dReal y, dReal z) - { dWorldSetGravity (_id,x,y,z); } - void getGravity (dVector3 g) - { dWorldGetGravity (_id,g); } - void step (dReal stepsize) - { dWorldStep (_id,stepsize); } -}; - - -class dBody { - dBodyID _id; - - dBody (dBody &) { dDebug (0,"bad"); } - void operator= (dBody &) { dDebug (0,"bad"); } - -public: - dBody() - { _id = 0; } - dBody (dWorld &world) - { _id = dBodyCreate (world.id()); } - ~dBody() - { dBodyDestroy (_id); } - void create (dWorld &world) - { if (_id) dBodyDestroy (_id); _id = dBodyCreate (world.id()); } - dBodyID id() - { return _id; } - - void setData (void *data) - { dBodySetData (_id,data); } - void *getData() - { return dBodyGetData (_id); } - - void setPosition (dReal x, dReal y, dReal z) - { dBodySetPosition (_id,x,y,z); } - void setRotation (const dMatrix3 R) - { dBodySetRotation (_id,R); } - void setQuaternion (const dQuaternion q) - { dBodySetQuaternion (_id,q); } - void setLinearVel (dReal x, dReal y, dReal z) - { dBodySetLinearVel (_id,x,y,z); } - void setAngularVel (dReal x, dReal y, dReal z) - { dBodySetAngularVel (_id,x,y,z); } - - const dReal * getPosition() - { return dBodyGetPosition (_id); } - const dReal * getRotation() - { return dBodyGetRotation (_id); } - const dReal * getQuaternion() - { return dBodyGetQuaternion (_id); } - const dReal * getLinearVel() - { return dBodyGetLinearVel (_id); } - const dReal * getAngularVel() - { return dBodyGetAngularVel (_id); } - - void setMass (const dMass *mass) - { dBodySetMass (_id,mass); } - void getMass (dMass *mass) - { dBodyGetMass (_id,mass); } - - void addForce (dReal fx, dReal fy, dReal fz) - { dBodyAddForce (_id, fx, fy, fz); } - void addTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddTorque (_id, fx, fy, fz); } - void addRelForce (dReal fx, dReal fy, dReal fz) - { dBodyAddRelForce (_id, fx, fy, fz); } - void addRelTorque (dReal fx, dReal fy, dReal fz) - { dBodyAddRelTorque (_id, fx, fy, fz); } - void addForceAtPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddForceAtPos (_id, fx, fy, fz, px, py, pz); } - void addRelForceAtPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtPos (_id, fx, fy, fz, px, py, pz); } - void addRelForceAtRelPos (dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) - { dBodyAddRelForceAtRelPos (_id, fx, fy, fz, px, py, pz); } - - void getRelPointPos (dReal px, dReal py, dReal pz, dVector3 result) - { dBodyGetRelPointPos (_id, px, py, pz, result); } - void getRelPointVel (dReal px, dReal py, dReal pz, dVector3 result) - { dBodyGetRelPointVel (_id, px, py, pz, result); } - - int isConnectedTo (const dBody &b) - { return dAreConnected (_id,b._id); } -}; - - -class dJointGroup { - dJointGroupID _id; - - dJointGroup (dJointGroup &) { dDebug (0,"bad"); } - void operator= (dJointGroup &) { dDebug (0,"bad"); } - -public: - dJointGroup() - { _id = 0; } - dJointGroup (int max_size) - { _id = dJointGroupCreate (max_size); } - ~dJointGroup() - { dJointGroupDestroy (_id); } - void create (int max_size) - { if (_id) dJointGroupDestroy (_id); _id = dJointGroupCreate (max_size); } - dJointGroupID id() - { return _id; } - - void empty() - { dJointGroupEmpty (_id); } -}; - - -class dJoint { - dJointID _id; - - dJoint (dJoint &) { dDebug (0,"bad"); } - void operator= (dJoint &) { dDebug (0,"bad"); } - -public: - dJoint() - { _id = 0; } - ~dJoint() - { dJointDestroy (_id); } - dJointID id() - { return _id; } - - void createBall (dWorld &world, dJointGroup *group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateBall (world.id(), group ? group->id() : 0); - } - void createHinge (dWorld &world, dJointGroup *group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateHinge (world.id(), group ? group->id() : 0); - } - void createSlider (dWorld &world, dJointGroup *group=0) { - if (_id) dJointDestroy (_id); - _id = dJointCreateSlider (world.id(), group ? group->id() : 0); - } - void createContact (dWorld &world, dJointGroup *group, dContact *contact) { - if (_id) dJointDestroy (_id); - _id = dJointCreateContact (world.id(), group ? group->id() : 0, contact); - } - - void attach (dBody &body1, dBody &body2) - { dJointAttach (_id, body1.id(), body2.id()); } - - void setBallAnchor (dReal x, dReal y, dReal z) - { dJointSetBallAnchor (_id, x, y, z); } - void setHingeAnchor (dReal x, dReal y, dReal z) - { dJointSetHingeAnchor (_id, x, y, z); } - - void setHingeAxis (dReal x, dReal y, dReal z) - { dJointSetHingeAxis (_id, x, y, z); } - void setSliderAxis (dReal x, dReal y, dReal z) - { dJointSetSliderAxis (_id, x, y, z); } - - void getBallAnchor (dVector3 result) - { dJointGetBallAnchor (_id, result); } - void getHingeAnchor (dVector3 result) - { dJointGetHingeAnchor (_id, result); } - - void getHingeAxis (dVector3 result) - { dJointGetHingeAxis (_id, result); } - void getSliderAxis (dVector3 result) - { dJointGetSliderAxis (_id, result); } -}; - - -class dSpace { - dSpaceID _id; - - dSpace (dSpace &) { dDebug (0,"bad"); } - void operator= (dSpace &) { dDebug (0,"bad"); } - -public: - dSpace () - { _id = dHashSpaceCreate(); } - ~dSpace() - { dSpaceDestroy (_id); } - dSpaceID id() - { return _id; } - void collide (void *data, dNearCallback *callback) - { dSpaceCollide (_id,data,callback); } -}; - - -class dGeom { - dGeomID _id; - - dGeom (dGeom &) { dDebug (0,"bad"); } - void operator= (dGeom &) { dDebug (0,"bad"); } - -public: - dGeom() - { _id = 0; } - ~dGeom() - { dGeomDestroy (_id); } - dGeomID id() - { return _id; } - - void createSphere (dSpace &space, dReal radius) { - if (_id) dGeomDestroy (_id); - _id = dCreateSphere (space.id(),radius); - } - - void createBox (dSpace &space, dReal lx, dReal ly, dReal lz) { - if (_id) dGeomDestroy (_id); - _id = dCreateBox (space.id(),lx,ly,lz); - } - - void createPlane (dSpace &space, dReal a, dReal b, dReal c, dReal d) { - if (_id) dGeomDestroy (_id); - _id = dCreatePlane (space.id(),a,b,c,d); - } - - void createCCylinder (dSpace &space, dReal radius, dReal length) { - if (_id) dGeomDestroy (_id); - _id = dCreateCCylinder (space.id(),radius,length); - } - - void destroy() { - if (_id) dGeomDestroy (_id); - _id = 0; - } - - int getClass() - { return dGeomGetClass (_id); } - - dReal sphereGetRadius() - { return dGeomSphereGetRadius (_id); } - - void boxGetLengths (dVector3 result) - { dGeomBoxGetLengths (_id,result); } - - void planeGetParams (dVector4 result) - { dGeomPlaneGetParams (_id,result); } - - void CCylinderGetParams (dReal *radius, dReal *length) - { dGeomCCylinderGetParams (_id,radius,length); } - - void setData (void *data) - { dGeomSetData (_id,data); } - - void *getData() - { return dGeomGetData (_id); } - - void setBody (dBody &b) - { dGeomSetBody (_id,b.id()); } - void setBody (dBodyID b) - { dGeomSetBody (_id,b); } - - dBodyID getBody() - { return dGeomGetBody (_id); } - - void setPosition (dReal x, dReal y, dReal z) - { dGeomSetPosition (_id,x,y,z); } - - void setRotation (const dMatrix3 R) - { dGeomSetRotation (_id,R); } - - const dReal * getPosition() - { return dGeomGetPosition (_id); } - - const dReal * getRotation() - { return dGeomGetRotation (_id); } -}; - -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/odemath.h b/extern/ode/dist/include/ode/odemath.h deleted file mode 100644 index 5f41a27b5a1..00000000000 --- a/extern/ode/dist/include/ode/odemath.h +++ /dev/null @@ -1,217 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ODEMATH_H_ -#define _ODE_ODEMATH_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* 3-way dot product. dDOTpq means that elements of `a' and `b' are spaced - * p and q indexes apart respectively. dDOT() means dDOT11. - */ - -#ifdef __cplusplus -inline dReal dDOT (const dReal *a, const dReal *b) - { return ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2]); } -inline dReal dDOT14(const dReal *a, const dReal *b) - { return ((a)[0]*(b)[0] + (a)[1]*(b)[4] + (a)[2]*(b)[8]); } -inline dReal dDOT41(const dReal *a, const dReal *b) - { return ((a)[0]*(b)[0] + (a)[4]*(b)[1] + (a)[8]*(b)[2]); } -inline dReal dDOT44(const dReal *a, const dReal *b) - { return ((a)[0]*(b)[0] + (a)[4]*(b)[4] + (a)[8]*(b)[8]); } -#else -#define dDOT(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2]) -#define dDOT14(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[4] + (a)[2]*(b)[8]) -#define dDOT41(a,b) ((a)[0]*(b)[0] + (a)[4]*(b)[1] + (a)[8]*(b)[2]) -#define dDOT44(a,b) ((a)[0]*(b)[0] + (a)[4]*(b)[4] + (a)[8]*(b)[8]) -#endif - - -/* cross product, set a = b x c. dCROSSpqr means that elements of `a', `b' - * and `c' are spaced p, q and r indexes apart respectively. - * dCROSS() means dCROSS111. `op' is normally `=', but you can set it to - * +=, -= etc to get other effects. - */ - -#define dCROSS(a,op,b,c) \ - (a)[0] op ((b)[1]*(c)[2] - (b)[2]*(c)[1]); \ - (a)[1] op ((b)[2]*(c)[0] - (b)[0]*(c)[2]); \ - (a)[2] op ((b)[0]*(c)[1] - (b)[1]*(c)[0]); -#define dCROSSpqr(a,op,b,c,p,q,r) \ - (a)[ 0] op ((b)[ q]*(c)[2*r] - (b)[2*q]*(c)[ r]); \ - (a)[ p] op ((b)[2*q]*(c)[ 0] - (b)[ 0]*(c)[2*r]); \ - (a)[2*p] op ((b)[ 0]*(c)[ r] - (b)[ q]*(c)[ 0]); -#define dCROSS114(a,op,b,c) dCROSSpqr(a,op,b,c,1,1,4) -#define dCROSS141(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,1) -#define dCROSS144(a,op,b,c) dCROSSpqr(a,op,b,c,1,4,4) -#define dCROSS411(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,1) -#define dCROSS414(a,op,b,c) dCROSSpqr(a,op,b,c,4,1,4) -#define dCROSS441(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,1) -#define dCROSS444(a,op,b,c) dCROSSpqr(a,op,b,c,4,4,4) - - -/* set a 3x3 submatrix of A to a matrix such that submatrix(A)*b = a x b. - * A is stored by rows, and has `skip' elements per row. the matrix is - * assumed to be already zero, so this does not write zero elements! - * if (plus,minus) is (+,-) then a positive version will be written. - * if (plus,minus) is (-,+) then a negative version will be written. - */ - -#define dCROSSMAT(A,a,skip,plus,minus) \ - (A)[1] = minus (a)[2]; \ - (A)[2] = plus (a)[1]; \ - (A)[(skip)+0] = plus (a)[2]; \ - (A)[(skip)+2] = minus (a)[0]; \ - (A)[2*(skip)+0] = minus (a)[1]; \ - (A)[2*(skip)+1] = plus (a)[0]; - - -/* compute the distance between two 3-vectors (oops, C++!) */ -#ifdef __cplusplus -inline dReal dDISTANCE (const dVector3 a, const dVector3 b) - { return dSqrt( (a[0]-b[0])*(a[0]-b[0]) + (a[1]-b[1])*(a[1]-b[1]) + - (a[2]-b[2])*(a[2]-b[2]) ); } -#else -#define dDISTANCE(a,b) \ - (dSqrt( ((a)[0]-(b)[0])*((a)[0]-(b)[0]) + ((a)[1]-(b)[1])*((a)[1]-(b)[1]) + \ - ((a)[2]-(b)[2])*((a)[2]-(b)[2]) )) -#endif - - -/* normalize 3x1 and 4x1 vectors (i.e. scale them to unit length) */ -void dNormalize3 (dVector3 a); -void dNormalize4 (dVector4 a); - - -/* given a unit length "normal" vector n, generate vectors p and q vectors - * that are an orthonormal basis for the plane space perpendicular to n. - * i.e. this makes p,q such that n,p,q are all perpendicular to each other. - * q will equal n x p. if n is not unit length then p will be unit length but - * q wont be. - */ - -void dPlaneSpace (const dVector3 n, dVector3 p, dVector3 q); - - -/* special case matrix multipication, with operator selection */ - -#define dMULTIPLYOP0_331(A,op,B,C) \ - (A)[0] op dDOT((B),(C)); \ - (A)[1] op dDOT((B+4),(C)); \ - (A)[2] op dDOT((B+8),(C)); -#define dMULTIPLYOP1_331(A,op,B,C) \ - (A)[0] op dDOT41((B),(C)); \ - (A)[1] op dDOT41((B+1),(C)); \ - (A)[2] op dDOT41((B+2),(C)); -#define dMULTIPLYOP0_133(A,op,B,C) \ - (A)[0] op dDOT14((B),(C)); \ - (A)[1] op dDOT14((B),(C+1)); \ - (A)[2] op dDOT14((B),(C+2)); -#define dMULTIPLYOP0_333(A,op,B,C) \ - (A)[0] op dDOT14((B),(C)); \ - (A)[1] op dDOT14((B),(C+1)); \ - (A)[2] op dDOT14((B),(C+2)); \ - (A)[4] op dDOT14((B+4),(C)); \ - (A)[5] op dDOT14((B+4),(C+1)); \ - (A)[6] op dDOT14((B+4),(C+2)); \ - (A)[8] op dDOT14((B+8),(C)); \ - (A)[9] op dDOT14((B+8),(C+1)); \ - (A)[10] op dDOT14((B+8),(C+2)); -#define dMULTIPLYOP1_333(A,op,B,C) \ - (A)[0] op dDOT44((B),(C)); \ - (A)[1] op dDOT44((B),(C+1)); \ - (A)[2] op dDOT44((B),(C+2)); \ - (A)[4] op dDOT44((B+1),(C)); \ - (A)[5] op dDOT44((B+1),(C+1)); \ - (A)[6] op dDOT44((B+1),(C+2)); \ - (A)[8] op dDOT44((B+2),(C)); \ - (A)[9] op dDOT44((B+2),(C+1)); \ - (A)[10] op dDOT44((B+2),(C+2)); -#define dMULTIPLYOP2_333(A,op,B,C) \ - (A)[0] op dDOT((B),(C)); \ - (A)[1] op dDOT((B),(C+4)); \ - (A)[2] op dDOT((B),(C+8)); \ - (A)[4] op dDOT((B+4),(C)); \ - (A)[5] op dDOT((B+4),(C+4)); \ - (A)[6] op dDOT((B+4),(C+8)); \ - (A)[8] op dDOT((B+8),(C)); \ - (A)[9] op dDOT((B+8),(C+4)); \ - (A)[10] op dDOT((B+8),(C+8)); - -#ifdef __cplusplus - -inline void dMULTIPLY0_331(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP0_331(A,=,B,C) } -inline void dMULTIPLY1_331(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP1_331(A,=,B,C) } -inline void dMULTIPLY0_133(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP0_133(A,=,B,C) } -inline void dMULTIPLY0_333(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP0_333(A,=,B,C) } -inline void dMULTIPLY1_333(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP1_333(A,=,B,C) } -inline void dMULTIPLY2_333(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP2_333(A,=,B,C) } - -inline void dMULTIPLYADD0_331(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP0_331(A,+=,B,C) } -inline void dMULTIPLYADD1_331(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP1_331(A,+=,B,C) } -inline void dMULTIPLYADD0_133(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP0_133(A,+=,B,C) } -inline void dMULTIPLYADD0_333(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP0_333(A,+=,B,C) } -inline void dMULTIPLYADD1_333(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP1_333(A,+=,B,C) } -inline void dMULTIPLYADD2_333(dReal *A, const dReal *B, const dReal *C) - { dMULTIPLYOP2_333(A,+=,B,C) } - -#else - -#define dMULTIPLY0_331(A,B,C) dMULTIPLYOP0_331(A,=,B,C) -#define dMULTIPLY1_331(A,B,C) dMULTIPLYOP1_331(A,=,B,C) -#define dMULTIPLY0_133(A,B,C) dMULTIPLYOP0_133(A,=,B,C) -#define dMULTIPLY0_333(A,B,C) dMULTIPLYOP0_333(A,=,B,C) -#define dMULTIPLY1_333(A,B,C) dMULTIPLYOP1_333(A,=,B,C) -#define dMULTIPLY2_333(A,B,C) dMULTIPLYOP2_333(A,=,B,C) - -#define dMULTIPLYADD0_331(A,B,C) dMULTIPLYOP0_331(A,+=,B,C) -#define dMULTIPLYADD1_331(A,B,C) dMULTIPLYOP1_331(A,+=,B,C) -#define dMULTIPLYADD0_133(A,B,C) dMULTIPLYOP0_133(A,+=,B,C) -#define dMULTIPLYADD0_333(A,B,C) dMULTIPLYOP0_333(A,+=,B,C) -#define dMULTIPLYADD1_333(A,B,C) dMULTIPLYOP1_333(A,+=,B,C) -#define dMULTIPLYADD2_333(A,B,C) dMULTIPLYOP2_333(A,+=,B,C) - -#endif - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/rotation.h b/extern/ode/dist/include/ode/rotation.h deleted file mode 100644 index 19204c651f3..00000000000 --- a/extern/ode/dist/include/ode/rotation.h +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_ROTATION_H_ -#define _ODE_ROTATION_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -void dRSetIdentity (dMatrix3 R); - -void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az, - dReal angle); - -void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi); - -void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az, - dReal bx, dReal by, dReal bz); - -void dQSetIdentity (dQuaternion q); - -void dQFromAxisAndAngle (dQuaternion q, dReal ax, dReal ay, dReal az, - dReal angle); - -void dQMultiply0 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); -void dQMultiply1 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); -void dQMultiply2 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); -void dQMultiply3 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); - -void dQtoR (const dQuaternion q, dMatrix3 R); - -void dRtoQ (const dMatrix3 R, dQuaternion q); - -void dWtoDQ (const dVector3 w, const dQuaternion q, dVector4 dq); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/space.h b/extern/ode/dist/include/ode/space.h deleted file mode 100644 index c540cd69d6e..00000000000 --- a/extern/ode/dist/include/ode/space.h +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_SPACE_H_ -#define _ODE_SPACE_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct dContactGeom; - -typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); - - -/* extra information the space needs in every geometry object */ - -typedef struct dGeomSpaceData { - dGeomID next; -} dGeomSpaceData; - - -dSpaceID dSimpleSpaceCreate(); -dSpaceID dHashSpaceCreate(); - -void dSpaceDestroy (dSpaceID); -void dSpaceAdd (dSpaceID, dGeomID); -void dSpaceRemove (dSpaceID, dGeomID); -void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback); -int dSpaceQuery (dSpaceID, dGeomID); - -void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel); - - -/* @@@ NOT FLEXIBLE ENOUGH - * - * generate contacts for those objects in the space that touch each other. - * an array of contacts is created on the alternative stack using - * StackAlloc(), and a pointer to the array is returned. the size of the - * array is returned by the function. - */ -/* int dSpaceCollide (dSpaceID space, dContactGeom **contact_array); */ - - -/* HMMMMM... i dont think so. - * tell the space that an object has moved, so its representation in the - * space should be changed. - */ -/* void dSpaceObjectMoved (dSpaceID, dGeomID); */ - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/include/ode/timer.h b/extern/ode/dist/include/ode/timer.h deleted file mode 100644 index fe2574feb3c..00000000000 --- a/extern/ode/dist/include/ode/timer.h +++ /dev/null @@ -1,77 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_TIMER_H_ -#define _ODE_TIMER_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* stop watch objects */ - -typedef struct dStopwatch { - double time; /* total clock count */ - unsigned long cc[2]; /* clock count since last `start' */ -} dStopwatch; - -void dStopwatchReset (dStopwatch *); -void dStopwatchStart (dStopwatch *); -void dStopwatchStop (dStopwatch *); -double dStopwatchTime (dStopwatch *); /* returns total time in secs */ - - -/* code timers */ - -void dTimerStart (const char *description); /* pass a static string here */ -void dTimerNow (const char *description); /* pass a static string here */ -void dTimerEnd(); - -/* print out a timer report. if `average' is nonzero, print out the average - * time for each slot (this is only meaningful if the same start-now-end - * calls are being made repeatedly. - */ -void dTimerReport (FILE *fout, int average); - - -/* resolution */ - -/* returns the timer ticks per second implied by the timing hardware or API. - * the actual timer resolution may not be this great. - */ -double dTimerTicksPerSecond(); - -/* returns an estimate of the actual timer resolution, in seconds. this may - * be greater than 1/ticks_per_second. - */ -double dTimerResolution(); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/extern/ode/dist/ode/README b/extern/ode/dist/ode/README deleted file mode 100644 index dd4596f9935..00000000000 --- a/extern/ode/dist/ode/README +++ /dev/null @@ -1,158 +0,0 @@ -Dynamics Library. -================= - -CONVENTIONS ------------ - -matrix storage --------------- - -matrix operations like factorization are expensive, so we must store the data -in a way that is most useful to the matrix code. we want the ability to update -the dynamics library without recompiling applications, e.g. so users can take -advantage of new floating point hardware. so we must settle on a single -format. because of the prevalence of 4-way SIMD, the format is this: store -the matrix by rows or columns, and each column is rounded up to a multiple of -4 elements. the extra "padding" elements at the end of each row/column are set -to 0. this is called the "standard format". to indicate if the data is stored -by rows or columns, we will say "standard row format" or "standard column -format". hopefully this decision will remain good in the future, as more and -more processors have 4-way SIMD, and 3D graphics always needs fast 4x4 -matrices. - -exception: matrices that have only one column or row (vectors), are always -stored as consecutive elements in standard row format, i.e. there is no -interior padding, only padding at the end. - -thus: all 3x1 floating point vectors are stored as 4x1 vectors: (x,x,x,0). -also: all 6x1 spatial velocities and accelerations are split into 3x1 position - and angular components, which are stored as contiguous 4x1 vectors. - -ALL matrices are stored by in standard row format. - - -arguments ---------- - -3x1 vector arguments to set() functions are supplied as x,y,z. -3x1 vector result arguments to get() function are pointers to arrays. -larger vectors are always supplied and returned as pointers. -all coordinates are in the global frame except where otherwise specified. -output-only arguments are usually supplied at the end. - - -memory allocation ------------------ - -with many C/C++ libraries memory allocation is a difficult problem to solve. -who allocates the memory? who frees it? must objects go on the heap or can -they go on the stack or in static storage? to provide the maximum flexibility, -the dynamics and collision libraries do not do their own memory allocation. -you must pass in pointers to externally allocated chunks of the right sizes. -the body, joint and colllision object structures are all exported, so you -can make instances of those structure and pass pointers to them. - -there are helper functions which allocate objects out of areans, in case you -need loots of dynamic creation and deletion. - -BUT!!! this ties us down to the body/joint/collision representation. - -a better approach is to supply custom memory allocation functions -(e.g. dlAlloc() etc). - - -C versus C++ ... ? ------------------- - -everything should be C linkable, and there should be C header files for -everything. but we want to develop in C++. so do this: - * all comments are "//". automatically convert to /**/ for distribution. - * structures derived from other structures --> automatically convert? - - -WORLDS ------- - -might want better terminology here. - -the dynamics world (DWorld) is a list of systems. each system corresponds to -one or more bodies, or perhaps some other kinds of physical object. -each system corresponds to one or more objects in the collision world -(there does not have to be a one-to-one correspondence between bodies and -collision objects). - -systems are simulated separately, perhaps using completely different -techniques. we must do something special when systems collide. -systems collide when collision objects belonging to system A touch -collision objects belonging to system B. - -for each collision point, the system must provide matrix equation data -that is used to compute collision forces. once those forces are computed, -the system must incorporate the forces into its timestep. -PROBLEM: what if we intertwine the LCP problems of the two systems - then -this simple approach wont work. - -the dynamics world contains two kinds of objects: bodies and joints. -joints connect two bodies together. - -the world contains one of more partitions. each partition is a collection of -bodies and joints such that each body is attached (through one or more joints) -to every other body. - -Joints ------- - -a joint can be connected to one or two bodies. -if the joint is only connected to one body, joint.node[1].body == 0. -joint.node[0].body is always valid. - - -Linkage -------- - -this library will always be statically linked with the app, for these reasons: - * collision space is selected at compile time, it adds data to the geom - objects. - - -Optimization ------------- - -doubles must be aligned on 8 byte boundaries! - - -MinGW on Windows issues ------------------------ - -* the .rc file for drawstuff needs a different include, try winresrc.h. - -* it seems we can't have both main() and WinMain() without the entry point - defaulting to main() and having resource loading problems. this screws up - what i was trying to do in the drawstuff library. perhaps main2() ? - -* remember to compile resources to COFF format RES files. - - - -Collision ---------- - -to plug in your own collision handling, replace (some of?) these functions -with your own. collision should be a separate library that you can link in -or not. your own library can call components in this collision library, e.g. -if you want polymorphic spaces instead of a single statically called space. - -creating an object will automatically register the appropriate -class (if necessary). how can we ensure that the minimum amount of code is -linked in? e.g. only one space handler, and sphere-sphere and sphere-box and -box-box collision code (if spheres and boxes instanced). - -the user creates a collision space, and for each dynamics object that is -created a collision object is inserted into the space. the collision -object's pos and R pointers are set to the corresponding dynamics -variables. - -there should be utility functions which create the dynamics and collision -objects at the same time, e.g. dMakeSphere(). - -collision objects and dynamics objects keep pointers to each other. diff --git a/extern/ode/dist/ode/fbuild/BuildDot b/extern/ode/dist/ode/fbuild/BuildDot deleted file mode 100644 index 09b49274da8..00000000000 --- a/extern/ode/dist/ode/fbuild/BuildDot +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# dot product code generator. -# -# code generation parameters, set in a parameters file: -# FNAME : name of source file to generate - a .c file will be made -# UNROLL1 : inner loop unrolling factor (1..) -# FETCH : max num of a[i]'s and b[i]'s to load ahead of muls -# LAT1 : load -> mul latency (>=1) -# LAT2 : mul -> add latency (>=1). if this is 1, use fused mul-add -# -############################################################################# - -require ("BuildUtil"); - -# get and check code generation parameters -error ("Usage: BuildDot ") if $#ARGV != 0; -do $ARGV[0]; - -if (!defined($FNAME) || !defined($UNROLL1) || !defined($FETCH) || - !defined($LAT1) || !defined($LAT2)) { - error ("code generation parameters not defined"); -} - -# check parameters -error ("bad UNROLL1") if $UNROLL1 < 1; -error ("bad FETCH") if $FETCH < 1; -error ("bad LAT1") if $LAT1 < 1; -error ("bad LAT2") if $LAT2 < 1; - -############################################################################# - -open (FOUT,">$FNAME.c") or die "can't open $FNAME.c for writing"; - -# file and function header -output (<= 0) { -END - -@load = (); # slot where a[i]'s and b[i]'s loaded -@mul = (); # slot where multiply i happened -@add = (); # slow where add i happened - -# in the future we may want to reduce the number of variables declared, -# so these arrays will be useful. -@pqused = (); # 1 if p/q[i] loaded with data, 0 once that data's used -@mused = (); # 1 if m[i] loaded with data, 0 once that data's used -@pqmap = (); # map virtual p/q variables to actual p/q variables -@mmap = (); # map virtual m variables to actual m variables - -output ("p0 = a[0]; q0 = b[0];\n"); -push (@load,0); - -$slot=0; # one slot for every load/mul/add/nop issued -for (;;) { - $startslot = $slot; - - # do next load - if (($#load - $#mul) < $FETCH && ($#load+1) < $UNROLL1) { - push (@load,$slot); - output ("p$#load = a[$#load]; q$#load = b[$#load];\n"); - $slot++; - } - # do next multiply - if ($#load > $#mul && $slot >= ($load[$#mul+1] + $LAT1) && - ($#mul+1) < $UNROLL1) { - push (@mul,$slot); - if ($LAT2 > 1) { - output ("m$#mul = p$#mul * q$#mul;\n"); - } - else { - output ("sum += p$#mul * q$#mul;\n"); - last if ($#mul+1) >= $UNROLL1; - } - $slot++; - } - # do next add - if ($LAT2 > 1) { - if ($#mul > $#add && $slot >= ($mul[$#add+1] + $LAT2)) { - push (@add,$slot); - output ("sum += m$#add;\n"); - $slot++; - last if ($#add+1) >= $UNROLL1; - } - } - - if ($slot == $startslot) { - # comment ("nop"); - $slot++; - } -} - -output ("a += $UNROLL1;\n"); -output ("b += $UNROLL1;\n"); -output ("n -= $UNROLL1;\n"); -output ("}\n"); - -output (< 0) { -sum += (*a) * (*b); -a++; -b++; -n--; -} -return sum; -} -END diff --git a/extern/ode/dist/ode/fbuild/BuildLDLT b/extern/ode/dist/ode/fbuild/BuildLDLT deleted file mode 100644 index fd74faf18df..00000000000 --- a/extern/ode/dist/ode/fbuild/BuildLDLT +++ /dev/null @@ -1,654 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# -# triangular matrix solver and factorizer code generator. -# -# SOLVER -# ------ -# -# if L is an n x n lower triangular matrix (with ones on the diagonal), the -# solver solves L*X=B where X and B are n x m matrices. this is the core -# step in L*D*L' factorization. the algorithm is (in matlab): -# -# for i=1:n -# for j=1:m -# X(i,j) = B(i,j) - L(i,1:i-1)*X(1:i-1,j); -# end -# end -# -# note that the ordering of the (i,j) loop is somewhat arbitrary. the only -# prerequisite to calculating element (i,j) of X is that all X(1:i-1,j) have -# have already been calcuated. this gives us some flexibility. -# -# the code generated below calculates X in N1 x N1 blocks. to speed up the -# innermost dot product loop, the outer product trick is used. for instance, -# to calculate the value of the 2x2 matrix ABCD below we first iterate over -# the vectors (a,b,c,d) and (e,f,g,h), computing ABCD = a*e+b*f+c*g+d*h. -# then A and B contain the dot product values needed in the algorithm, and -# C and D have almost all of it. the outer product trick reduces the number -# of memory loads required. in this example 16 loads are required, but if -# the simple dot product in the above algorithm is used then 32 loads are -# required. increasing N1 decreases the total number of loads, but only as long -# as we have enough temporary registers to keep the matrix blocks and vectors. -# -# L * X = B -# -# [ . ] [ e e ] [ . . ] -# [ . . ] [ f f ] [ . . ] -# [ . . . ] [ g g ] [ . . ] -# [ . . . . ] [ h h ] [ . . ] -# [ a b c d . ] [ A B ] = [ . . ] -# [ a b c d . . ] [ C D ] [ . . ] -# [ . . . . . . . ] [ . . ] [ . . ] -# [ . . . . . . . . ] [ . . ] [ . . ] -# [ . . . . . . . . . ] [ . . ] [ . . ] -# -# note that L is stored by rows but X and B are stored by columns. -# the outer product loops are unrolled for extra speed. -# -# LDLT FACTORIZATION -# ------------------ -# -# the factorization algorithm builds L incrementally by repeatedly solving -# the following equation: -# -# [ L 0 ] [ D 0 ] [ L' l ] = [ A a ] <-- n rows -# [ l' e ] [ 0 d ] [ 0 e' ] [ a' b ] <-- m rows -# -# [ L*D*L' L*D*l ] = [ A a ] -# [ l'*D*L' l'*D*l+e*d*e' ] [ a' b ] -# -# L*D*L'=A is an existing solution, and a,b are new rows/columns to add to A. -# we compute: -# -# L * (Dl) = a -# l = inv(D) * Dl -# e*d*e' = b - l'*Dl (m*m LDLT factorization) -# -# -# L-transpose solver -# ------------------ -# -# the LT (L-transpose) solver uses the same logic as the standard L-solver, -# with a few tricks to make it work. to solve L^T*X=B we first remap: -# L to Lhat : Lhat(i,j) = L(n-j,n-i) -# X to Xhat : Xhat(i) = X(n-i) -# B to Bhat : Bhat(i) = B(n-i) -# and then solve Lhat*Xhat = Bhat. the current LT solver only supports one -# right hand side, but that's okay as it is not used in the factorizer. -# -############################################################################# -# -# code generation parameters, set in a parameters file: -# FNAME : name of source file to generate - a .c file will be made -# TYPE : 'f' to build factorizer, 's' to build solver, 't' to build the -# transpose solver. -# N1 : block size (size of outer product matrix) (1..9) -# UNROLL1 : solver inner loop unrolling factor (1..) -# UNROLL2 : factorizer inner loop unrolling factor (1..) -# MADD : if nonzero, generate code for fused multiply-add (0,1) -# FETCH : how to fetch data in the inner loop: -# 0 - load in a batch (the `normal way') -# 1 - delay inner loop loads until just before they're needed -# -############################################################################# -# -# TODO -# ---- -# -# * dFactorLDLT() is not so efficient for matrix sizes < block size, e.g. -# redundant calls, zero loads, adds etc -# -############################################################################# -# -# NOTES: -# -# * on the pentium we can prefetch like this: -# asm ("prefetcht0 %0" : : "m" (*Ai) ); -# but it doesn't seem to help much - -require ("BuildUtil"); - -# get and check code generation parameters -error ("Usage: BuildLDLT ") if $#ARGV != 0; -do $ARGV[0]; - -if (!defined($FNAME) || !defined($TYPE) || !defined($N1) || - !defined($UNROLL1) || !defined($UNROLL2) || !defined($MADD) || - !defined($FETCH)) { - error ("code generation parameters not defined"); -} - -# check parameters -error ("bad TYPE") if $TYPE ne 'f' && $TYPE ne 's' && $TYPE ne 't'; -error ("bad N1") if $N1 < 1 || $N1 > 9; -error ("bad UNROLL1") if $UNROLL1 < 1; -error ("bad UNROLL2") if $UNROLL2 < 1; -error ("bad MADD") if $MADD != 0 && $MADD != 1; -error ("bad FETCH") if $FETCH < 0 && $FETCH > 1; - -############################################################################# -# utility - -# functions to handle delayed loading of p and q values. -# bit in the the `ploaded' and `qloaded' numbers record what has been loaded, -# so we dont load it again. - -sub newLoads -{ - # bits in these numbers say what registers p and q have been loaded so far - $ploaded = 0; - $qloaded = 0; -} - -sub loadedEverything -{ - $ploaded = 0xffffffff; - $qloaded = 0xffffffff; -} - -sub loadP # (i,loadcmd) -{ - my $i = $_[0]; - my $loadcmd = $_[1]; - return if ($ploaded & (1 << $i)); - output ($loadcmd); - $ploaded |= (1 << $i); -} - -sub loadQ # (i,loadcmd) -{ - my $i = $_[0]; - my $loadcmd = $_[1]; - return if ($qloaded & (1 << $i)); - output ($loadcmd); - $qloaded |= (1 << $i); -} - -############################################################################# -# make a fast L solve function. -# this function has a restriction that the leading dimension of X and B must -# be a multiple of the block size. - -sub innerOuterProductLoop # (M,k,nrhs,increment) -{ - my $M=$_[0]; - my $k=$_[1]; - my $nrhs=$_[2]; - my $increment=$_[3]; - my ($i,$j); - newLoads; - if ($FETCH==0) { - comment ("load p and q values"); - for ($i=1; $i<=$M; $i++) { - if ($TYPE eq 't') { - output ("p$i=ell[".ofs2(-($i-1),0,'lskip')."];\n"); - output ("q$i=ex[".ofs2(-($k),$i-1,'lskip')."];\n") if $i <= $nrhs; - } - else { - output ("p$i=ell[".ofs2($k,$i-1,'lskip')."];\n"); - output ("q$i=ex[".ofs2($k,$i-1,'lskip')."];\n") if $i <= $nrhs; - } - } - loadedEverything; - } - - comment ("compute outer product and add it to the Z matrix"); - for ($i=1; $i<=$M; $i++) { - for ($j=1; $j<=$nrhs; $j++) { - if ($TYPE eq 't') { - loadP ($i,"p$i=ell[".ofs2(-($i-1),0,'lskip')."];\n"); - loadQ ($j,"q$j=ex[".ofs2(-($k),$j-1,'lskip')."];\n"); - } - else { - loadP ($i,"p$i=ell[".ofs2($k,$i-1,'lskip')."];\n"); - loadQ ($j,"q$j=ex[".ofs2($k,$j-1,'lskip')."];\n"); - } - my $var = $MADD ? "Z$i$j +=" : "m$i$j ="; - output ("$var p$i * q$j;\n"); - } - } - - if ($TYPE eq 't') { - if ($increment > 0) { - output ("ell += lskip1;\n"); - output ("ex -= $increment;\n"); - } - else { - output ("ell += lskip1;\n"); - } - } - else { - if ($increment > 0) { - comment ("advance pointers"); - output ("ell += $increment;\n"); - output ("ex += $increment;\n"); - } - } - - if ($MADD==0) { - for ($i=1; $i<=$M; $i++) { - for ($j=1; $j<=$nrhs; $j++) { - output ("Z$i$j += m$i$j;\n"); - } - } - } -} - - -sub computeRows # (nrhs,rows) -{ - my $nrhs = $_[0]; - my $rows = $_[1]; - my ($i,$j,$k); - - comment ("compute all $rows x $nrhs block of X, from rows i..i+$rows-1"); - - comment ("set the Z matrix to 0"); - for ($i=1; $i<=$rows; $i++) { - for ($j=1; $j<=$nrhs; $j++) { - output ("Z$i$j=0;\n"); - } - } - if ($TYPE eq 't') { - output ("ell = L - i;\n"); - } - else { - output ("ell = L + i*lskip1;\n"); - } - output ("ex = B;\n"); - - comment ("the inner loop that computes outer products and adds them to Z"); - output ("for (j=i-$UNROLL1; j >= 0; j -= $UNROLL1) {\n"); - for ($k=0; $k < $UNROLL1; $k++) { - innerOuterProductLoop ($rows,$k,$nrhs,($k==$UNROLL1-1) ? $UNROLL1 : 0); - } - - comment ("end of inner loop"); - output ("}\n"); - - if ($UNROLL1 > 1) { - comment ("compute left-over iterations"); - output ("j += $UNROLL1;\n"); - output ("for (; j > 0; j--) {\n"); - innerOuterProductLoop ($rows,'0',$nrhs,1); - output ("}\n"); - } - - comment ("finish computing the X(i) block"); - - for ($j=1; $j<=$nrhs; $j++) { - if ($TYPE eq 't') { - output ("Z1$j = ex[".ofs1(-($j-1),'lskip')."] - Z1$j;\n"); - output ("ex[".ofs1(-($j-1),'lskip')."] = Z1$j;\n"); - } - else { - output ("Z1$j = ex[".ofs1($j-1,'lskip')."] - Z1$j;\n"); - output ("ex[".ofs1($j-1,'lskip')."] = Z1$j;\n"); - } - } - - for ($i=2; $i<=$rows; $i++) { - for ($j=1; $j<$i; $j++) { - if ($TYPE eq 't') { - output ("p$j = ell[".ofs2(-($i-1),$j-1,'lskip')."];\n"); - } - else { - output ("p$j = ell[".ofs2($j-1,$i-1,'lskip')."];\n"); - } - } - for ($j=1; $j<=$nrhs; $j++) { - if ($TYPE eq 't') { - output ("Z$i$j = ex[".ofs2(-($i-1),$j-1,'lskip')."] - Z$i$j"); - } - else { - output ("Z$i$j = ex[".ofs2($i-1,$j-1,'lskip')."] - Z$i$j"); - } - for ($k=1; $k < $i; $k++) { - output (" - p$k*Z$k$j"); - } - output (";\n"); - if ($TYPE eq 't') { - output ("ex[".ofs2(-($i-1),$j-1,'lskip')."] = Z$i$j;\n"); - } - else { - output ("ex[".ofs2($i-1,$j-1,'lskip')."] = Z$i$j;\n"); - } - } - } -} - - -sub makeFastL1Solve # ( number-of-right-hand-sides ) -{ - my $nrhs = $_[0]; - my ($i,$j,$k); - my $funcsuffix = ($TYPE eq 'f') ? "_$nrhs" : ''; - my $staticvoid = ($TYPE eq 'f') ? 'static void' : 'void'; - - # function header - if ($TYPE eq 't') { - output (< 2) { - comment ("compute lskip values"); - for ($i=2; $i<$N1; $i++) { - output ("lskip$i = $i*lskip1;\n"); - } - } - - comment ("compute all $N1 x $nrhs blocks of X"); - if ($TYPE eq 's' or $TYPE eq 't') { - output ("for (i=0; i <= n-$N1; i+=$N1) {\n"); - } - else { - output ("for (i=0; i < n; i+=$N1) {\n"); - } - computeRows ($nrhs,$N1); - comment ("end of outer loop"); - output ("}\n"); - - if ($TYPE eq 's' or $TYPE eq 't') { - comment ("compute rows at end that are not a multiple of block size"); - output ("for (; i < n; i++) {\n"); - computeRows ($nrhs,1); - output ("}\n"); - } - - output ("}\n"); -} - -############################################################################# -# make a fast L*D*L' factorizer - -# code fragment: this factors an M x M block. if A_or_Z is 0 then it works -# on the $A matrix otherwise it works on the Z matrix. in either case it -# writes the diagonal entries into the `dee' vector. -# it is a simple implementation of the LDLT algorithm, with no tricks. - -sub getA # (i,j,A,A_or_Z) -{ - my $i = $_[0]; - my $j = $_[1]; - my $A = $_[2]; - return $_[3] ? ('Z'.($i+1).($j+1)) : ($A.'['.ofs2($j,$i,'nskip').']'); -} - -sub miniLDLT # (A,A_or_Z,M) -{ - my ($i,$j,$k); - my $A = $_[0]; - my $AZ = $_[1]; - my $M = $_[2]; - comment ("factorize $M x $M block " . ($AZ ? "Z,dee" : "$A,dee")); - comment ("factorize row 1"); - output ("dee[0] = dRecip(".getA(0,0,$A,$AZ).");\n"); - for ($i=1; $i<$M; $i++) { - comment ("factorize row ".($i+1)); - for ($j=1; $j<$i; $j++) { - output (getA($i,$j,$A,$AZ)." -= "); - for ($k=0; $k<$j; $k++) { - output (" + ") if $k > 0; - output (getA($i,$k,$A,$AZ)."*".getA($j,$k,$A,$AZ)); - } - output (";\n"); - } - output ("sum = 0;\n"); - for ($j=0; $j<$i; $j++) { - output ("q1 = ".getA($i,$j,$A,$AZ).";\n"); - output ("q2 = q1 * dee[$j];\n"); - output (getA($i,$j,$A,$AZ)." = q2;\n"); - output ("sum += q1*q2;\n"); - } - output ("dee[$i] = dRecip(".getA($i,$i,$A,$AZ)." - sum);\n"); - } - comment ("done factorizing $M x $M block"); -} - - -sub innerScaleAndOuterProductLoop # (M,k) -{ - my $M = $_[0]; - my $k = $_[1]; - my ($i,$j); - for ($i=1; $i<=$M; $i++) { - output ("p$i = ell[".ofs2($k,$i-1,'nskip')."];\n"); - } - output ("dd = dee[$k];\n"); - for ($i=1; $i<=$M; $i++) { - output ("q$i = p$i*dd;\n"); - } - for ($i=1; $i<=$M; $i++) { - output ("ell[".ofs2($k,$i-1,'nskip')."] = q$i;\n"); - } - for ($i=1; $i<=$M; $i++) { - for ($j=1; $j<=$i; $j++) { - my $var = $MADD ? "Z$i$j +=" : "m$i$j ="; - output ("$var p$i*q$j;\n"); - } - } - if ($MADD==0) { - for ($i=1; $i<=$M; $i++) { - for ($j=1; $j<=$i; $j++) { - output ("Z$i$j += m$i$j;\n"); - } - } - } -} - - -sub diagRows # (M) -{ - my $M=$_[0]; - comment ("scale the elements in a $M x i block at A(i,0), and also"); - comment ("compute Z = the outer product matrix that we'll need."); - for ($i=1; $i<=$M; $i++) { - for ($j=1; $j<=$i; $j++) { - output ("Z$i$j = 0;\n"); - } - } - output ("ell = A+i*nskip1;\n"); - output ("dee = d;\n"); - output ("for (j=i-$UNROLL2; j >= 0; j -= $UNROLL2) {\n"); - for ($i=0; $i < $UNROLL2; $i++) { - innerScaleAndOuterProductLoop ($M,$i); - } - output ("ell += $UNROLL2;\n"); - output ("dee += $UNROLL2;\n"); - output ("}\n"); - - if ($UNROLL2 > 1) { - comment ("compute left-over iterations"); - output ("j += $UNROLL2;\n"); - output ("for (; j > 0; j--) {\n"); - innerScaleAndOuterProductLoop ($M,0); - output ("ell++;\n"); - output ("dee++;\n"); - output ("}\n"); - } -} - - -sub diagBlock # (M) -{ - my $M = $_[0]; - comment ("solve for diagonal $M x $M block at A(i,i)"); - for ($i=1; $i<=$M; $i++) { - for ($j=1; $j<=$i; $j++) { - output ("Z$i$j = ell[".ofs2($j-1,$i-1,'nskip')."] - Z$i$j;\n"); - } - } - output ("dee = d + i;\n"); - miniLDLT ('',1,$M); - for ($i=2; $i<=$M; $i++) { - for ($j=1; $j<$i; $j++) { - output ("ell[".ofs2($j-1,$i-1,'nskip')."] = Z$i$j;\n"); - } - } -} - - -sub makeFastLDLT -{ - my ($i,$j,$k); - - # function header - output (<$FNAME.c") or die "can't open $FNAME.c for writing"; - -# file and function header -output (< mul latency (>=1) -# LAT2 : mul -> add latency (>=1). if this is 1, use fused mul-add -# -############################################################################# - -require ("BuildUtil"); - -# get and check code generation parameters -error ("Usage: BuildMultidot ") if $#ARGV != 0; -do $ARGV[0]; - -if (!defined($FNAME) || !defined($N1) || !defined($UNROLL1) || - !defined($FETCH) || !defined($LAT1) || !defined($LAT2)) { - error ("code generation parameters not defined"); -} - -# check parameters -error ("bad N1") if $N1 < 2; -error ("bad UNROLL1") if $UNROLL1 < 1; -error ("bad FETCH") if $FETCH < 1; -error ("bad LAT1") if $LAT1 < 1; -error ("bad LAT2") if $LAT2 < 1; - -############################################################################# - -open (FOUT,">$FNAME.c") or die "can't open $FNAME.c for writing"; - -# file and function header -output (< 1; - } - output ("q$i,"); -} -for ($i=0; $i<$N1; $i++) { - output ("sum$i"); - output (",") if $i < ($N1-1); -} -output (";\n"); -for ($i=0; $i<$N1; $i++) { - output ("sum$i = 0;\n"); -} -output (<= 0) { -END - -@load = (); # slot where a[i]'s and b[i]'s loaded -@mul = (); # slot where multiply i happened -@add = (); # slow where add i happened - -for ($i=0; $i<$N1; $i++) { - output ("p0$i = a$i [0];\n"); -} -output ("q0 = b[0];\n"); -push (@load,0); - -$slot=0; # one slot for every load/mul/add/nop issued -for (;;) { - $startslot = $slot; - - # do next load - if (($#load - $#mul) < $FETCH && ($#load+1) < $UNROLL1) { - push (@load,$slot); - for ($j=0; $j<$N1; $j++) { - output ("p$#load$j = a$j [$#load];\n"); - } - output ("q$#load = b[$#load];\n"); - $slot++; - } - - # do next multiply - if ($#load > $#mul && $slot >= ($load[$#mul+1] + $LAT1) && - ($#mul+1) < $UNROLL1) { - push (@mul,$slot); - if ($LAT2 > 1) { - for ($j=0; $j<$N1; $j++) { - output ("m$#mul$j = p$#mul$j * q$#mul;\n"); - } - } - else { - for ($j=0; $j<$N1; $j++) { - output ("sum$j += p$#mul$j * q$#mul;\n"); - } - last if ($#mul+1) >= $UNROLL1; - } - $slot++; - } - # do next add - if ($LAT2 > 1) { - if ($#mul > $#add && $slot >= ($mul[$#add+1] + $LAT2)) { - push (@add,$slot); - for ($j=0; $j<$N1; $j++) { - output ("sum$j += m$#add$j;\n"); - } - $slot++; - last if ($#add+1) >= $UNROLL1; - } - } - - if ($slot == $startslot) { - # comment ("nop"); - $slot++; - } -} - -for ($j=0; $j<$N1; $j++) { - output ("a$j += $UNROLL1;\n"); -} -output ("b += $UNROLL1;\n"); -output ("n -= $UNROLL1;\n"); -output ("}\n"); - -output ("n += $UNROLL1;\n"); -output ("while (n > 0) {\n"); -output ("q0 = *b;\n"); -for ($j=0; $j<$N1; $j++) { - output ("sum$j += (*a$j) * q0;\n"); - output ("a$j++;\n"); -} -output ("b++;\n"); -output ("n--;\n"); -output ("}\n"); -for ($j=0; $j<$N1; $j++) { - output ("outsum[$j] = sum$j;\n"); -} -output ("}\n"); diff --git a/extern/ode/dist/ode/fbuild/BuildUtil b/extern/ode/dist/ode/fbuild/BuildUtil deleted file mode 100644 index b0828ff5ec1..00000000000 --- a/extern/ode/dist/ode/fbuild/BuildUtil +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/perl -w -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -package BuildUtil; - - -# print out code. after newlines, indent according to the number of curly -# brackets we've seen - -my $indent = 0; -my $startofline = 1; - - -sub main::output -{ - my $line = $_[0]; - my ($i,$j,$c); - for ($i=0; $i < length ($line); $i++) { - $c = substr ($line,$i,1); - print main::FOUT $c if $c eq '{'; - $indent++ if $c eq '{'; - $indent-- if $c eq '}'; - if ($startofline) { - for ($j=0; $j < $indent; $j++) { - print main::FOUT " "; - } - $startofline = 0; - } - print main::FOUT $c if $c ne '{'; - $startofline = 1 if $c eq "\n"; - } -} - - -# write a C comment with the correct indenting - -sub main::comment -{ - main::output ("/* $_[0] */\n"); -} - - -# return an offset: N*skip = skipN where N=0,1,2,... - -sub main::ofs1 # (N,skip) -{ - my $N = $_[0]; - my $skip = $_[1]; - return '0' if $N==0; - return $skip . $N; -} - - -# return an offset: M+N*skip = M+skipN where N=0,1,2,... - -sub main::ofs2 # (M,N,skip) -{ - my $M = $_[0]; - my $N = $_[1]; - my $skip = $_[2]; - $M = '0' if $M eq '-0'; - my $a = $M; - $a .= '+' . $skip . $N if ($N > 0); - substr ($a,0,2)='' if substr ($a,0,2) eq '0+'; - return $a; -} - - -# print an error message and exit - -sub main::error -{ - print "ERROR: $_[0]\n"; - exit 1; -} - - -1; diff --git a/extern/ode/dist/ode/fbuild/Dependencies b/extern/ode/dist/ode/fbuild/Dependencies deleted file mode 100644 index 86f5cd4417b..00000000000 --- a/extern/ode/dist/ode/fbuild/Dependencies +++ /dev/null @@ -1,16 +0,0 @@ -test_dot.o: test_dot.cpp ../../include/ode/ode.h \ - ../../include/ode/config.h ../../include/ode/contact.h \ - ../../include/ode/common.h ../../include/ode/error.h \ - ../../include/ode/memory.h ../../include/ode/odemath.h \ - ../../include/ode/matrix.h ../../include/ode/timer.h \ - ../../include/ode/rotation.h ../../include/ode/mass.h \ - ../../include/ode/space.h ../../include/ode/geom.h \ - ../../include/ode/misc.h -test_ldlt.o: test_ldlt.cpp ../../include/ode/ode.h \ - ../../include/ode/config.h ../../include/ode/contact.h \ - ../../include/ode/common.h ../../include/ode/error.h \ - ../../include/ode/memory.h ../../include/ode/odemath.h \ - ../../include/ode/matrix.h ../../include/ode/timer.h \ - ../../include/ode/rotation.h ../../include/ode/mass.h \ - ../../include/ode/space.h ../../include/ode/geom.h \ - ../../include/ode/misc.h diff --git a/extern/ode/dist/ode/fbuild/Makefile b/extern/ode/dist/ode/fbuild/Makefile deleted file mode 100644 index f988c3739af..00000000000 --- a/extern/ode/dist/ode/fbuild/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# currently this only works under linux, and it's a bit of a mess! - -MAKEFILE_INC=../../build/Makefile.inc -include $(MAKEFILE_INC) - -INCLUDE_PATHS=../../include -LIB_PATHS = ../../lib -DEFINES=dDOUBLE - -SOURCES_CPP=test_ldlt.cpp -SOURCES_C=fastldlt.c fastlsolve.c fastltsolve.c -APPS=$(call fEXENAME,test_ldlt) $(call fEXENAME,test_dot) $(call fEXENAME,test_multidot) -EXTRA_CLEAN=test_ldlt test_dot test_multidot fastldlt.c fastlsolve.c fastltsolve.c fastdot.c fastmultidot.c - - -all: $(APPS) - -$(call fEXENAME,test_ldlt): $(call fTARGETS,$(SOURCES_CPP) $(SOURCES_C)) - gcc -o $@ $^ -L $(LIB_PATHS) $(call fLIB,ode) -lm - -$(call fEXENAME,test_dot): test_dot.o fastdot.o - gcc -o $@ test_dot.o fastdot.o -L $(LIB_PATHS) $(call fLIB,ode) -lm - -$(call fEXENAME,test_multidot): test_multidot.o fastmultidot.o - gcc -o $@ test_multidot.o fastmultidot.o -L $(LIB_PATHS) $(call fLIB,ode) -lm - -fastldlt.o: fastldlt.c - gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $< - -fastlsolve.o: fastlsolve.c - gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $< - -fastltsolve.o: fastltsolve.c - gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $< - -fastdot.o: fastdot.c - gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $< - -fastmultidot.o: fastmultidot.c - gcc -O1 -I$(INCLUDE_PATHS) -ffast-math -fomit-frame-pointer -c -D$(DEFINES) $< - -fastldlt.c: BuildLDLT BuildUtil ParametersF - ./BuildLDLT ParametersF - -fastlsolve.c: BuildLDLT BuildUtil ParametersS - ./BuildLDLT ParametersS - -fastltsolve.c: BuildLDLT BuildUtil ParametersT - ./BuildLDLT ParametersT - -fastdot.c: BuildDot BuildUtil ParametersD - ./BuildDot ParametersD - -fastmultidot.c: BuildMultidot BuildUtil ParametersM - ./BuildMultidot ParametersM diff --git a/extern/ode/dist/ode/fbuild/OptimizeDot b/extern/ode/dist/ode/fbuild/OptimizeDot deleted file mode 100644 index 1dc178262aa..00000000000 --- a/extern/ode/dist/ode/fbuild/OptimizeDot +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# optimize the dot product built by BuildDot - -############################################################################## - -require ("OptimizeUtil"); - -# unused standard parameters -$TYPE='unused'; -$N1=0; # unused -$UNROLL2=0; # unused -$MADD=0; # unused - -############################################################################## - -sub testDot # (filename) -{ - my $filename = $_[0]; - createParametersFile ('ParametersD'); - $params = "$N1 $UNROLL1 $UNROLL2 $MADD $FETCH $LAT1 $LAT2"; - print "***** TESTING $params\n"; - doit ("rm -f fastdot.c fastdot.o test_dot"); - doit ("make test_dot"); - doit ("./test_dot >> $filename"); - open (FILE,">>$filename"); - print FILE " $params\n"; - close FILE; -} - -# find optimal parameters. write results to data4.txt - -open (FILE,">data4.txt"); -print FILE "# dot product data from OptimizeDot\n"; -close FILE; -$FNAME='fastdot'; - -for ($UNROLL1=1; $UNROLL1 <= 10; $UNROLL1++) { - for ($LAT1=1; $LAT1 <= 5; $LAT1++) { - for ($LAT2=1; $LAT2 <= 5; $LAT2++) { - for ($FETCH=1; $FETCH<=5; $FETCH++) { - testDot ('data4.txt'); - } - } - } -} - -readBackDataFile ('data4.txt'); -createParametersFile ('ParametersD'); diff --git a/extern/ode/dist/ode/fbuild/OptimizeLDLT b/extern/ode/dist/ode/fbuild/OptimizeLDLT deleted file mode 100644 index 612633e00c2..00000000000 --- a/extern/ode/dist/ode/fbuild/OptimizeLDLT +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# optimize the factorizer built by BuildLDLT -# -# FNAME : name of source file to generate - .h and .c files will be made -# N1 : block size (size of outer product matrix) (1..9) -# UNROLL1 : solver inner loop unrolling factor (1..) -# UNROLL2 : factorizer inner loop unrolling factor (1..) -# MADD : if nonzero, generate code for fused multiply-add (0,1) -# FETCH : how to fetch data in the inner loop: -# 0 - load in a batch (the `normal way') -# 1 - delay inner loop loads until just before they're needed - -############################################################################## - -require ("OptimizeUtil"); - -############################################################################## -# optimize factorizer - -sub testFactorizer # (filename) -{ - my $filename = $_[0]; - createParametersFile ('ParametersF'); - $params = "$N1 $UNROLL1 $UNROLL2 $MADD $FETCH"; - print "***** TESTING $params\n"; - doit ("rm -f fastldlt.c fastldlt.o test_ldlt"); - doit ("make test_ldlt"); - doit ("./test_ldlt f >> $filename"); - open (FILE,">>$filename"); - print FILE " $params\n"; - close FILE; -} - - -# first find optimal parameters ignoring UNROLL1 and UNROLL2, write results -# to data1.txt - -open (FILE,">data1.txt"); -print FILE "# factorizer data from OptimizeLDLT\n"; -close FILE; -$FNAME='fastldlt'; -$TYPE='f'; -$UNROLL1=4; -$UNROLL2=4; -for ($N1=1; $N1 <= 4; $N1++) { - for ($MADD=0; $MADD<=1; $MADD++) { - for ($FETCH=0; $FETCH<=1; $FETCH++) { - testFactorizer ('data1.txt'); - } - } -} - -readBackDataFile ('data1.txt'); -createParametersFile ('ParametersF'); - -# now find optimal UNROLL1 and UNROLL2 values, write results to data2.txt - -open (FILE,">data2.txt"); -print FILE "# factorizer data from OptimizeLDLT\n"; -close FILE; -for ($UNROLL1=1; $UNROLL1 <= 10; $UNROLL1++) { - for ($UNROLL2=1; $UNROLL2 <= 10; $UNROLL2++) { - testFactorizer ('data2.txt'); - } -} - -readBackDataFile ('data2.txt'); -createParametersFile ('ParametersF'); diff --git a/extern/ode/dist/ode/fbuild/OptimizeLSolve b/extern/ode/dist/ode/fbuild/OptimizeLSolve deleted file mode 100644 index bba6b495f2c..00000000000 --- a/extern/ode/dist/ode/fbuild/OptimizeLSolve +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# optimize the solver built by BuildLDLT -# -# FNAME : name of source file to generate - .h and .c files will be made -# N1 : block size (size of outer product matrix) (1..9) -# UNROLL1 : solver inner loop unrolling factor (1..) -# UNROLL2 : factorizer inner loop unrolling factor (1..) -# MADD : if nonzero, generate code for fused multiply-add (0,1) -# FETCH : how to fetch data in the inner loop: -# 0 - load in a batch (the `normal way') -# 1 - delay inner loop loads until just before they're needed - -############################################################################## - -require ("OptimizeUtil"); - -############################################################################## -# optimize solver - -sub testSolver # (filename) -{ - my $filename = $_[0]; - createParametersFile ('ParametersS'); - $params = "$N1 $UNROLL1 $UNROLL2 $MADD $FETCH"; - print "***** TESTING $params\n"; - doit ("rm -f fastlsolve.c fastlsolve.o test_ldlt"); - doit ("make test_ldlt"); - doit ("./test_ldlt s >> $filename"); - open (FILE,">>$filename"); - print FILE " $params\n"; - close FILE; -} - -# find optimal parameters. UNROLL2 has no effect. write results to data3.txt - -open (FILE,">data3.txt"); -print FILE "# solver data from OptimizeLDLT\n"; -close FILE; -$FNAME='fastlsolve'; -$TYPE='s'; -$UNROLL2=1; -for ($N1=1; $N1 <= 5; $N1++) { - for ($UNROLL1=1; $UNROLL1 <= 15; $UNROLL1++) { - for ($MADD=0; $MADD<=1; $MADD++) { - for ($FETCH=0; $FETCH<=1; $FETCH++) { - testSolver ('data3.txt'); - } - } - } -} - -readBackDataFile ('data3.txt'); -createParametersFile ('ParametersS'); diff --git a/extern/ode/dist/ode/fbuild/OptimizeLTSolve b/extern/ode/dist/ode/fbuild/OptimizeLTSolve deleted file mode 100644 index a10109e2d2c..00000000000 --- a/extern/ode/dist/ode/fbuild/OptimizeLTSolve +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# optimize the transpose solver built by BuildLDLT -# -# FNAME : name of source file to generate - .h and .c files will be made -# N1 : block size (size of outer product matrix) (1..9) -# UNROLL1 : solver inner loop unrolling factor (1..) -# UNROLL2 : factorizer inner loop unrolling factor (1..) -# MADD : if nonzero, generate code for fused multiply-add (0,1) -# FETCH : how to fetch data in the inner loop: -# 0 - load in a batch (the `normal way') -# 1 - delay inner loop loads until just before they're needed - -############################################################################## - -require ("OptimizeUtil"); - -############################################################################## -# optimize solver - -sub testSolver # (filename) -{ - my $filename = $_[0]; - createParametersFile ('ParametersT'); - $params = "$N1 $UNROLL1 $UNROLL2 $MADD $FETCH"; - print "***** TESTING $params\n"; - doit ("rm -f fastltsolve.c fastltsolve.o test_ldlt"); - doit ("make test_ldlt"); - doit ("./test_ldlt t >> $filename"); - open (FILE,">>$filename"); - print FILE " $params\n"; - close FILE; -} - -# find optimal parameters. UNROLL2 has no effect. write results to data5.txt - -open (FILE,">data5.txt"); -print FILE "# solver data from OptimizeLDLT\n"; -close FILE; -$FNAME='fastltsolve'; -$TYPE='t'; -$UNROLL2=1; -for ($N1=1; $N1 <= 5; $N1++) { - for ($UNROLL1=1; $UNROLL1 <= 15; $UNROLL1++) { - for ($MADD=0; $MADD<=1; $MADD++) { - for ($FETCH=0; $FETCH<=1; $FETCH++) { - testSolver ('data5.txt'); - } - } - } -} - -readBackDataFile ('data5.txt'); -createParametersFile ('ParametersT'); diff --git a/extern/ode/dist/ode/fbuild/OptimizeMultidot b/extern/ode/dist/ode/fbuild/OptimizeMultidot deleted file mode 100644 index f2b54383312..00000000000 --- a/extern/ode/dist/ode/fbuild/OptimizeMultidot +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/perl -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# optimize the dot product built by BuildMultidot - -############################################################################## - -require ("OptimizeUtil"); - -# multiple -$N1=2; - -# unused standard parameters -$TYPE='unused'; -$UNROLL2=0; # unused -$MADD=0; # unused - -############################################################################## - -sub testMultidot # (filename) -{ - my $filename = $_[0]; - createParametersFile ('ParametersM'); - $params = "$N1 $UNROLL1 $UNROLL2 $MADD $FETCH $LAT1 $LAT2"; - print "***** TESTING $params\n"; - doit ("rm -f fastmultidot.c fastmultidot.o test_multidot"); - doit ("make test_multidot"); - doit ("./test_multidot >> $filename"); - open (FILE,">>$filename"); - print FILE " $params\n"; - close FILE; -} - -# find optimal parameters. write results to data6.txt - -open (FILE,">data6.txt"); -print FILE "# multi-dot product data from OptimizeMultidot\n"; -close FILE; -$FNAME='fastmultidot'; - -for ($UNROLL1=1; $UNROLL1 <= 10; $UNROLL1++) { - for ($LAT1=1; $LAT1 <= 5; $LAT1++) { - for ($LAT2=1; $LAT2 <= 5; $LAT2++) { - for ($FETCH=1; $FETCH<=5; $FETCH++) { - testMultidot ('data6.txt'); - } - } - } -} - -readBackDataFile ('data6.txt'); -createParametersFile ('ParametersM'); diff --git a/extern/ode/dist/ode/fbuild/OptimizeUtil b/extern/ode/dist/ode/fbuild/OptimizeUtil deleted file mode 100644 index 2b882fcba65..00000000000 --- a/extern/ode/dist/ode/fbuild/OptimizeUtil +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/perl -w -# -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -package BuildUtil; - - -sub main::doit -{ - my $cmd = $_[0]; - print "$cmd\n"; - system ($cmd)==0 or die "FAILED"; -} - - -sub main::createParametersFile # (filename) -{ - open (PARAM,">$_[0]"); - print PARAM "# perl script to set parameters required by the code generator\n"; - print PARAM "\$FNAME=\"$main::FNAME\";\n" if defined($main::FNAME); - print PARAM "\$TYPE=\"$main::TYPE\";\n" if defined($main::TYPE); - print PARAM "\$N1=$main::N1;\n" if defined($main::N1); - print PARAM "\$UNROLL1=$main::UNROLL1;\n" if defined($main::UNROLL1); - print PARAM "\$UNROLL2=$main::UNROLL2;\n" if defined($main::UNROLL2); - print PARAM "\$MADD=$main::MADD;\n" if defined($main::MADD); - print PARAM "\$FETCH=$main::FETCH;\n" if defined($main::FETCH); - print PARAM "\$LAT1=$main::LAT1;\n" if defined($main::LAT1); - print PARAM "\$LAT2=$main::LAT2;\n" if defined($main::LAT2); - close PARAM; -} - - -# read back a data file and find best parameters - -sub main::readBackDataFile # (filename) -{ - my $filename = $_[0]; - my $maxtime = 1e10; - open (FILE,$filename); - while () { - next if /^\#/; - my $line = lc $_; - if ($line =~ /error/) { - print "ERRORS FOUND IN $filename\n"; - exit 1; - } - $line =~ s/^\s*//; - $line =~ s/\s*$//; - my @nums = split (/\s+/,$line); - $time = $nums[0]; - if ($time < $maxtime) { - $main::N1 = $nums[1]; - $main::UNROLL1 = $nums[2]; - $main::UNROLL2 = $nums[3]; - $main::MADD = $nums[4]; - $main::FETCH = $nums[5]; - $main::LAT1 = $nums[6]; - $main::LAT2 = $nums[7]; - $maxtime = $time; - } - } - close FILE; -} - - -1; diff --git a/extern/ode/dist/ode/fbuild/ParametersD.example b/extern/ode/dist/ode/fbuild/ParametersD.example deleted file mode 100644 index e58f279f7d7..00000000000 --- a/extern/ode/dist/ode/fbuild/ParametersD.example +++ /dev/null @@ -1,32 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# perl script to set parameters required by the code generator -$FNAME="fastdot"; -$TYPE="unused"; -$N1=0; -$UNROLL1=2; -$UNROLL2=0; -$MADD=0; -$FETCH=1; -$LAT1=1; -$LAT2=2; diff --git a/extern/ode/dist/ode/fbuild/ParametersF.example b/extern/ode/dist/ode/fbuild/ParametersF.example deleted file mode 100644 index 9881b09ad81..00000000000 --- a/extern/ode/dist/ode/fbuild/ParametersF.example +++ /dev/null @@ -1,30 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# perl script to set parameters required by the code generator -$FNAME="fastldlt"; -$TYPE="f"; -$N1=2; -$UNROLL1=2; -$UNROLL2=6; -$MADD=0; -$FETCH=1; diff --git a/extern/ode/dist/ode/fbuild/ParametersM.example b/extern/ode/dist/ode/fbuild/ParametersM.example deleted file mode 100644 index bb81d6b83f1..00000000000 --- a/extern/ode/dist/ode/fbuild/ParametersM.example +++ /dev/null @@ -1,32 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# perl script to set parameters required by the code generator -$FNAME="fastmultidot"; -$TYPE="unused"; -$N1=2; -$UNROLL1=1; -$UNROLL2=0; -$MADD=0; -$FETCH=5; -$LAT1=1; -$LAT2=1; diff --git a/extern/ode/dist/ode/fbuild/ParametersS.example b/extern/ode/dist/ode/fbuild/ParametersS.example deleted file mode 100644 index 29c9a91fc16..00000000000 --- a/extern/ode/dist/ode/fbuild/ParametersS.example +++ /dev/null @@ -1,30 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# perl script to set parameters required by the code generator -$FNAME="fastlsolve"; -$TYPE="s"; -$N1=4; -$UNROLL1=12; -$UNROLL2=1; -$MADD=1; -$FETCH=0; diff --git a/extern/ode/dist/ode/fbuild/ParametersT.example b/extern/ode/dist/ode/fbuild/ParametersT.example deleted file mode 100644 index 3aa92a31dd2..00000000000 --- a/extern/ode/dist/ode/fbuild/ParametersT.example +++ /dev/null @@ -1,30 +0,0 @@ -######################################################################### -# # -# Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. # -# All rights reserved. Email: russ@q12.org Web: www.q12.org # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of EITHER: # -# (1) The GNU Lesser General Public License as published by the Free # -# Software Foundation; either version 2.1 of the License, or (at # -# your option) any later version. The text of the GNU Lesser # -# General Public License is included with this library in the # -# file LICENSE.TXT. # -# (2) The BSD-style license that is included with this library in # -# the file LICENSE-BSD.TXT. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files # -# LICENSE.TXT and LICENSE-BSD.TXT for more details. # -# # -######################################################################### - -# perl script to set parameters required by the code generator -$FNAME="fastltsolve"; -$TYPE="t"; -$N1=4; -$UNROLL1=12; -$UNROLL2=1; -$MADD=1; -$FETCH=0; diff --git a/extern/ode/dist/ode/fbuild/README b/extern/ode/dist/ode/fbuild/README deleted file mode 100644 index bcf7f5aa8b5..00000000000 --- a/extern/ode/dist/ode/fbuild/README +++ /dev/null @@ -1,41 +0,0 @@ - -factorizer/solver builder - -before running `make', copy the following files: - ParametersD.example --> ParametersD - ParametersF.example --> ParametersF - ParametersS.example --> ParametersS - -the files Parameters[D|F|S] don't exist in the CVS archive because -they are changable. - - - -STATS - for chol ------ - -* all with -O1 - -128x128 matrix -atlas = 1724779 clocks -my chol = 1164629 clocks (parameters: 2 2 2 1) with Ai++, Aj++ -my chol = 1140786 clocks (parameters: 2 6 8 0) with Ai++, Aj++ -my chol = 1118968 clocks (parameters: 2 6 8 0) with +ofs - -64x64 matrix -atlas = 374020 clocks -my chol = 157076 clocks (parameters = 2 2 2 1) - -32x32 matrix (12961 flops) -atlas = 83827 clocks -my chol = 25945 clocks (parameters: 2 2 2 1) - - - - -TODO ----- - -* doc! - -* iterate blocks by partial rows to try and keep more data in cache diff --git a/extern/ode/dist/ode/fbuild/ldlt.m b/extern/ode/dist/ode/fbuild/ldlt.m deleted file mode 100644 index 19ae2d1c94e..00000000000 --- a/extern/ode/dist/ode/fbuild/ldlt.m +++ /dev/null @@ -1,26 +0,0 @@ -function [L,d] = ldlt(A) - -n=length(A); -d=zeros(n,1); - -d(1) = 1/A(1,1); -for i=2:n - for j=2:i-1 - A(i,j) = A(i,j) - A(j,1:j-1) * A(i,1:j-1)'; - end - sum = 0; - for j=1:i-1 - q1 = A(i,j); - q2 = q1 * d(j); - A(i,j) = q2; - sum = sum + q1*q2; - end - d(i) = 1/(A(i,i) - sum); -end - -L=A; -for i=1:n - L(i,i:n)=zeros(1,n+1-i); - L(i,i)=1; -end -d = d .\ 1; diff --git a/extern/ode/dist/ode/fbuild/test_dot.cpp b/extern/ode/dist/ode/fbuild/test_dot.cpp deleted file mode 100644 index 62aec32e509..00000000000 --- a/extern/ode/dist/ode/fbuild/test_dot.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include "ode/ode.h" - -#define ALLOCA dALLOCA16 -#define SIZE 1000 - - -// correct dot product, for accuracy testing - -dReal goodDot (dReal *a, dReal *b, int n) -{ - dReal sum=0; - while (n > 0) { - sum += (*a) * (*b); - a++; - b++; - n--; - } - return sum; -} - - -// test dot product accuracy - -void testAccuracy() -{ - // allocate vectors a and b and fill them with random data - dReal *a = (dReal*) ALLOCA (SIZE*sizeof(dReal)); - dReal *b = (dReal*) ALLOCA (SIZE*sizeof(dReal)); - dMakeRandomMatrix (a,1,SIZE,1.0); - dMakeRandomMatrix (b,1,SIZE,1.0); - - for (int n=1; n<100; n++) { - dReal good = goodDot (a,b,n); - dReal test = dDot (a,b,n); - dReal diff = fabs(good-test); - //printf ("diff = %e\n",diff); - if (diff > 1e-10) printf ("ERROR: accuracy test failed\n"); - } -} - - -// test dot product factorizer speed. - -void testSpeed() -{ - // allocate vectors a and b and fill them with random data - dReal *a = (dReal*) ALLOCA (SIZE*sizeof(dReal)); - dReal *b = (dReal*) ALLOCA (SIZE*sizeof(dReal)); - dMakeRandomMatrix (a,1,SIZE,1.0); - dMakeRandomMatrix (b,1,SIZE,1.0); - - // time several dot products, return the minimum timing - double mintime = 1e100; - dStopwatch sw; - for (int i=0; i<1000; i++) { - dStopwatchReset (&sw); - dStopwatchStart (&sw); - - // try a bunch of prime sizes up to 101 - dDot (a,b,2); - dDot (a,b,3); - dDot (a,b,5); - dDot (a,b,7); - dDot (a,b,11); - dDot (a,b,13); - dDot (a,b,17); - dDot (a,b,19); - dDot (a,b,23); - dDot (a,b,29); - dDot (a,b,31); - dDot (a,b,37); - dDot (a,b,41); - dDot (a,b,43); - dDot (a,b,47); - dDot (a,b,53); - dDot (a,b,59); - dDot (a,b,61); - dDot (a,b,67); - dDot (a,b,71); - dDot (a,b,73); - dDot (a,b,79); - dDot (a,b,83); - dDot (a,b,89); - dDot (a,b,97); - dDot (a,b,101); - - dStopwatchStop (&sw); - double time = dStopwatchTime (&sw); - if (time < mintime) mintime = time; - } - - printf ("%.0f",mintime * dTimerTicksPerSecond()); -} - - -int main() -{ - testAccuracy(); - testSpeed(); - return 0; -} diff --git a/extern/ode/dist/ode/fbuild/test_ldlt.cpp b/extern/ode/dist/ode/fbuild/test_ldlt.cpp deleted file mode 100644 index 3b795b9ee7f..00000000000 --- a/extern/ode/dist/ode/fbuild/test_ldlt.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include "ode/ode.h" - -#define ALLOCA dALLOCA16 - -//**************************************************************************** -// constants - -#ifdef dSINGLE -#define TOL (1e-4) -#else -#define TOL (1e-10) -#endif - -//**************************************************************************** -// test L*X=B solver accuracy. - -void testSolverAccuracy (int n) -{ - int i; - int npad = dPAD(n); - dReal *L = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dReal *B = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *B2 = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *X = (dReal*) ALLOCA (n*sizeof(dReal)); - - // L is a random lower triangular matrix with 1's on the diagonal - dMakeRandomMatrix (L,n,n,1.0); - dClearUpperTriangle (L,n); - for (i=0; i TOL) { - printf ("error = %e, size = %d\n",error,n); - } -} - -//**************************************************************************** -// test L^T*X=B solver accuracy. - -void testTransposeSolverAccuracy (int n) -{ - int i; - int npad = dPAD(n); - dReal *L = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dReal *B = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *B2 = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *X = (dReal*) ALLOCA (n*sizeof(dReal)); - - // L is a random lower triangular matrix with 1's on the diagonal - dMakeRandomMatrix (L,n,n,1.0); - dClearUpperTriangle (L,n); - for (i=0; i TOL) { - printf ("error = %e, size = %d\n",error,n); - } -} - -//**************************************************************************** -// test L*D*L' factorizer accuracy. - -void testLDLTAccuracy (int n) -{ - int i,j; - int npad = dPAD(n); - dReal *A = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dReal *L = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dReal *d = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *Atest = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dReal *DL = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - - dMakeRandomMatrix (A,n,n,1.0); - dMultiply2 (L,A,A,n,n,n); - memcpy (A,L,n*npad*sizeof(dReal)); - dSetZero (d,n); - - dFactorLDLT (L,d,n,npad); - - // make L lower triangular, and convert d into diagonal of D - dClearUpperTriangle (L,n); - for (i=0; i TOL) { - printf ("error = %e, size = %d\n",error,n); - } - - /* - printf ("\n"); - dPrintMatrix (A,n,n); - printf ("\n"); - dPrintMatrix (L,n,n); - printf ("\n"); - dPrintMatrix (d,1,n); - */ -} - -//**************************************************************************** -// test L*D*L' factorizer speed. - -void testLDLTSpeed (int n) -{ - int npad = dPAD(n); - - // allocate A - dReal *A = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - - // make B a symmetric positive definite matrix - dMakeRandomMatrix (A,n,n,1.0); - dReal *B = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dSetZero (B,n*npad); - dMultiply2 (B,A,A,n,n,n); - - // make d - dReal *d = (dReal*) ALLOCA (n*sizeof(dReal)); - dSetZero (d,n); - - // time several factorizations, return the minimum timing - double mintime = 1e100; - dStopwatch sw; - for (int i=0; i<100; i++) { - memcpy (A,B,n*npad*sizeof(dReal)); - dStopwatchReset (&sw); - dStopwatchStart (&sw); - - dFactorLDLT (A,d,n,npad); - - dStopwatchStop (&sw); - double time = dStopwatchTime (&sw); - if (time < mintime) mintime = time; - } - - printf ("%.0f",mintime * dTimerTicksPerSecond()); -} - -//**************************************************************************** -// test solver speed. - -void testSolverSpeed (int n, int transpose) -{ - int i; - int npad = dPAD(n); - - // allocate L,B,X - dReal *L = (dReal*) ALLOCA (n*npad*sizeof(dReal)); - dReal *B = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *X = (dReal*) ALLOCA (n*sizeof(dReal)); - - // L is a random lower triangular matrix with 1's on the diagonal - dMakeRandomMatrix (L,n,n,1.0); - dClearUpperTriangle (L,n); - for (i=0; i -#include "ode/ode.h" - -#define NUM_A 2 -#define ALLOCA dALLOCA16 -#define SIZE 1000 - - -extern "C" void dMultidot2 (const dReal *a0, const dReal *a1, - const dReal *b, dReal *outsum, int n); -/* -extern "C" void dMultidot4 (const dReal *a0, const dReal *a1, - const dReal *a2, const dReal *a3, - const dReal *b, dReal *outsum, int n); -*/ - - -// correct dot product, for accuracy testing - -dReal goodDot (dReal *a, dReal *b, int n) -{ - dReal sum=0; - while (n > 0) { - sum += (*a) * (*b); - a++; - b++; - n--; - } - return sum; -} - - -// test multi-dot product accuracy - -void testAccuracy() -{ - int j; - - // allocate vectors a and b and fill them with random data - dReal *a[NUM_A]; - for (j=0; j 1e-10) printf ("ERROR: accuracy test failed\n"); - } -} - - -// test multi-dot product factorizer speed. - -void testSpeed() -{ - int j; - dReal sum[NUM_A]; - - // allocate vectors a and b and fill them with random data - dReal *a[NUM_A]; - for (j=0; j -#include -#include -#include "array.h" - - -static inline int roundUpToPowerOfTwo (int x) -{ - int i = 1; - while (i < x) i <<= 1; - return i; -} - - -void dArrayBase::_freeAll (int sizeofT) -{ - if (_data) { - if (_data == this+1) return; // if constructLocalArray() was called - dFree (_data,_anum * sizeofT); - } -} - - -void dArrayBase::_setSize (int newsize, int sizeofT) -{ - if (newsize < 0) return; - if (newsize > _anum) { - if (_data == this+1) { - // this is a no-no, because constructLocalArray() was called - dDebug (0,"setSize() out of space in LOCAL array"); - } - int newanum = roundUpToPowerOfTwo (newsize); - if (_data) _data = dRealloc (_data, _anum*sizeofT, newanum*sizeofT); - else _data = dAlloc (newanum*sizeofT); - _anum = newanum; - } - _size = newsize; -} - - -void * dArrayBase::operator new (size_t size) -{ - return dAlloc (size); -} - - -void dArrayBase::operator delete (void *ptr, size_t size) -{ - dFree (ptr,size); -} - - -void dArrayBase::constructLocalArray (int __anum) -{ - _size = 0; - _anum = __anum; - _data = this+1; -} diff --git a/extern/ode/dist/ode/src/array.h b/extern/ode/dist/ode/src/array.h deleted file mode 100644 index 97c2cebc2f4..00000000000 --- a/extern/ode/dist/ode/src/array.h +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this comes from the `reuse' library. copy any changes back to the source. - * - * Variable sized array template. The array is always stored in a contiguous - * chunk. The array can be resized. A size increase will cause more memory - * to be allocated, and may result in relocation of the array memory. - * A size decrease has no effect on the memory allocation. - * - * Array elements with constructors or destructors are not supported! - * But if you must have such elements, here's what to know/do: - * - Bitwise copy is used when copying whole arrays. - * - When copying individual items (via push(), insert() etc) the `=' - * (equals) operator is used. Thus you should define this operator to do - * a bitwise copy. You should probably also define the copy constructor. - */ - - -#ifndef _ODE_ARRAY_H_ -#define _ODE_ARRAY_H_ - -#include - - -// this base class has no constructors or destructor, for your convenience. - -class dArrayBase { -protected: - int _size; // number of elements in `data' - int _anum; // allocated number of elements in `data' - void *_data; // array data - - void _freeAll (int sizeofT); - void _setSize (int newsize, int sizeofT); - // set the array size to `newsize', allocating more memory if necessary. - // if newsize>_anum and is a power of two then this is guaranteed to - // set _size and _anum to newsize. - -public: - // not: dArrayBase () { _size=0; _anum=0; _data=0; } - - int size() const { return _size; } - int allocatedSize() const { return _anum; } - void * operator new (size_t size); - void operator delete (void *ptr, size_t size); - - void constructor() { _size=0; _anum=0; _data=0; } - // if this structure is allocated with malloc() instead of new, you can - // call this to set it up. - - void constructLocalArray (int __anum); - // this helper function allows non-reallocating arrays to be constructed - // on the stack (or in the heap if necessary). this is something of a - // kludge and should be used with extreme care. this function acts like - // a constructor - it is called on uninitialized memory that will hold the - // Array structure and the data. __anum is the number of elements that - // are allocated. the memory MUST be allocated with size: - // sizeof(ArrayBase) + __anum*sizeof(T) - // arrays allocated this way will never try to reallocate or free the - // memory - that's your job. -}; - - -template class dArray : public dArrayBase { -public: - void equals (const dArray &x) { - setSize (x.size()); - memcpy (_data,x._data,x._size * sizeof(T)); - } - - dArray () { constructor(); } - dArray (const dArray &x) { constructor(); equals (x); } - ~dArray () { _freeAll(sizeof(T)); } - void setSize (int newsize) { _setSize (newsize,sizeof(T)); } - T *data() const { return (T*) _data; } - T & operator[] (int i) const { return ((T*)_data)[i]; } - void operator = (const dArray &x) { equals (x); } - - void push (const T item) { - if (_size < _anum) _size++; else _setSize (_size+1,sizeof(T)); - ((T*)_data)[_size-1] = item; - } - - void swap (dArray &x) { - int tmp1; - void *tmp2; - tmp1=_size; _size=x._size; x._size=tmp1; - tmp1=_anum; _anum=x._anum; x._anum=tmp1; - tmp2=_data; _data=x._data; x._data=tmp2; - } - - // insert the item at the position `i'. if i<0 then add the item to the - // start, if i >= size then add the item to the end of the array. - void insert (int i, const T item) { - if (_size < _anum) _size++; else _setSize (_size+1,sizeof(T)); - if (i >= (_size-1)) i = _size-1; // add to end - else { - if (i < 0) i=0; // add to start - int n = _size-1-i; - if (n>0) memmove (((T*)_data) + i+1, ((T*)_data) + i, n*sizeof(T)); - } - ((T*)_data)[i] = item; - } - - void remove (int i) { - if (i >= 0 && i < _size) { // passing this test guarantees size>0 - int n = _size-1-i; - if (n>0) memmove (((T*)_data) + i, ((T*)_data) + i+1, n*sizeof(T)); - _size--; - } - } -}; - -#endif - diff --git a/extern/ode/dist/ode/src/error.cpp b/extern/ode/dist/ode/src/error.cpp deleted file mode 100644 index 9b33db55f0c..00000000000 --- a/extern/ode/dist/ode/src/error.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include - - -static dMessageFunction *error_function = 0; -static dMessageFunction *debug_function = 0; -static dMessageFunction *message_function = 0; - - -extern "C" void dSetErrorHandler (dMessageFunction *fn) -{ - error_function = fn; -} - - -extern "C" void dSetDebugHandler (dMessageFunction *fn) -{ - debug_function = fn; -} - - -extern "C" void dSetMessageHandler (dMessageFunction *fn) -{ - message_function = fn; -} - - -extern "C" dMessageFunction *dGetErrorHandler() -{ - return error_function; -} - - -extern "C" dMessageFunction *dGetDebugHandler() -{ - return debug_function; -} - - -extern "C" dMessageFunction *dGetMessageHandler() -{ - return message_function; -} - - -static void printMessage (int num, const char *msg1, const char *msg2, - va_list ap) -{ - fflush (stderr); - fflush (stdout); - if (num) fprintf (stderr,"\n%s %d: ",msg1,num); - else fprintf (stderr,"\n%s: ",msg1); - vfprintf (stderr,msg2,ap); - fprintf (stderr,"\n"); - fflush (stderr); -} - -//**************************************************************************** -// unix - -#ifndef WIN32 - -extern "C" void dError (int num, const char *msg, ...) -{ - va_list ap; - va_start (ap,msg); - if (error_function) error_function (num,msg,ap); - else printMessage (num,"ODE Error",msg,ap); - exit (1); -} - - -extern "C" void dDebug (int num, const char *msg, ...) -{ - va_list ap; - va_start (ap,msg); - if (debug_function) debug_function (num,msg,ap); - else printMessage (num,"ODE INTERNAL ERROR",msg,ap); - // *((char *)0) = 0; ... commit SEGVicide - abort(); -} - - -extern "C" void dMessage (int num, const char *msg, ...) -{ - va_list ap; - va_start (ap,msg); - if (message_function) message_function (num,msg,ap); - else printMessage (num,"ODE Message",msg,ap); -} - -#endif - -//**************************************************************************** -// windows - -#ifdef WIN32 - -// isn't cygwin annoying! -#ifdef CYGWIN -#define _snprintf snprintf -#define _vsnprintf vsnprintf -#endif - - -#include "windows.h" - - -extern "C" void dError (int num, const char *msg, ...) -{ - va_list ap; - va_start (ap,msg); - if (error_function) error_function (num,msg,ap); - else { - char s[1000],title[100]; - _snprintf (title,sizeof(title),"ODE Error %d",num); - _vsnprintf (s,sizeof(s),msg,ap); - s[sizeof(s)-1] = 0; - MessageBox(0,s,title,MB_OK | MB_ICONWARNING); - } - exit (1); -} - - -extern "C" void dDebug (int num, const char *msg, ...) -{ - va_list ap; - va_start (ap,msg); - if (debug_function) debug_function (num,msg,ap); - else { - char s[1000],title[100]; - _snprintf (title,sizeof(title),"ODE INTERNAL ERROR %d",num); - _vsnprintf (s,sizeof(s),msg,ap); - s[sizeof(s)-1] = 0; - MessageBox(0,s,title,MB_OK | MB_ICONSTOP); - } - abort(); -} - - -extern "C" void dMessage (int num, const char *msg, ...) -{ - va_list ap; - va_start (ap,msg); - if (message_function) message_function (num,msg,ap); - else printMessage (num,"ODE Message",msg,ap); -} - - -#endif diff --git a/extern/ode/dist/ode/src/fastdot.c b/extern/ode/dist/ode/src/fastdot.c deleted file mode 100644 index 148d2dd9e17..00000000000 --- a/extern/ode/dist/ode/src/fastdot.c +++ /dev/null @@ -1,30 +0,0 @@ -/* generated code, do not edit. */ - -#include "ode/matrix.h" - - -dReal dDot (const dReal *a, const dReal *b, int n) -{ - dReal p0,q0,m0,p1,q1,m1,sum; - sum = 0; - n -= 2; - while (n >= 0) { - p0 = a[0]; q0 = b[0]; - m0 = p0 * q0; - p1 = a[1]; q1 = b[1]; - m1 = p1 * q1; - sum += m0; - sum += m1; - a += 2; - b += 2; - n -= 2; - } - n += 2; - while (n > 0) { - sum += (*a) * (*b); - a++; - b++; - n--; - } - return sum; -} diff --git a/extern/ode/dist/ode/src/fastldlt.c b/extern/ode/dist/ode/src/fastldlt.c deleted file mode 100644 index df2ea6ec229..00000000000 --- a/extern/ode/dist/ode/src/fastldlt.c +++ /dev/null @@ -1,381 +0,0 @@ -/* generated code, do not edit. */ - -#include "ode/matrix.h" - -/* solve L*X=B, with B containing 1 right hand sides. - * L is an n*n lower triangular matrix with ones on the diagonal. - * L is stored by rows and its leading dimension is lskip. - * B is an n*1 matrix that contains the right hand sides. - * B is stored by columns and its leading dimension is also lskip. - * B is overwritten with X. - * this processes blocks of 2*2. - * if this is in the factorizer source file, n must be a multiple of 2. - */ - -static void dSolveL1_1 (const dReal *L, dReal *B, int n, int lskip1) -{ - /* declare variables - Z matrix, p and q vectors, etc */ - dReal Z11,m11,Z21,m21,p1,q1,p2,*ex; - const dReal *ell; - int i,j; - /* compute all 2 x 1 blocks of X */ - for (i=0; i < n; i+=2) { - /* compute all 2 x 1 block of X, from rows i..i+2-1 */ - /* set the Z matrix to 0 */ - Z11=0; - Z21=0; - ell = L + i*lskip1; - ex = B; - /* the inner loop that computes outer products and adds them to Z */ - for (j=i-2; j >= 0; j -= 2) { - /* compute outer product and add it to the Z matrix */ - p1=ell[0]; - q1=ex[0]; - m11 = p1 * q1; - p2=ell[lskip1]; - m21 = p2 * q1; - Z11 += m11; - Z21 += m21; - /* compute outer product and add it to the Z matrix */ - p1=ell[1]; - q1=ex[1]; - m11 = p1 * q1; - p2=ell[1+lskip1]; - m21 = p2 * q1; - /* advance pointers */ - ell += 2; - ex += 2; - Z11 += m11; - Z21 += m21; - /* end of inner loop */ - } - /* compute left-over iterations */ - j += 2; - for (; j > 0; j--) { - /* compute outer product and add it to the Z matrix */ - p1=ell[0]; - q1=ex[0]; - m11 = p1 * q1; - p2=ell[lskip1]; - m21 = p2 * q1; - /* advance pointers */ - ell += 1; - ex += 1; - Z11 += m11; - Z21 += m21; - } - /* finish computing the X(i) block */ - Z11 = ex[0] - Z11; - ex[0] = Z11; - p1 = ell[lskip1]; - Z21 = ex[1] - Z21 - p1*Z11; - ex[1] = Z21; - /* end of outer loop */ - } -} - -/* solve L*X=B, with B containing 2 right hand sides. - * L is an n*n lower triangular matrix with ones on the diagonal. - * L is stored by rows and its leading dimension is lskip. - * B is an n*2 matrix that contains the right hand sides. - * B is stored by columns and its leading dimension is also lskip. - * B is overwritten with X. - * this processes blocks of 2*2. - * if this is in the factorizer source file, n must be a multiple of 2. - */ - -static void dSolveL1_2 (const dReal *L, dReal *B, int n, int lskip1) -{ - /* declare variables - Z matrix, p and q vectors, etc */ - dReal Z11,m11,Z12,m12,Z21,m21,Z22,m22,p1,q1,p2,q2,*ex; - const dReal *ell; - int i,j; - /* compute all 2 x 2 blocks of X */ - for (i=0; i < n; i+=2) { - /* compute all 2 x 2 block of X, from rows i..i+2-1 */ - /* set the Z matrix to 0 */ - Z11=0; - Z12=0; - Z21=0; - Z22=0; - ell = L + i*lskip1; - ex = B; - /* the inner loop that computes outer products and adds them to Z */ - for (j=i-2; j >= 0; j -= 2) { - /* compute outer product and add it to the Z matrix */ - p1=ell[0]; - q1=ex[0]; - m11 = p1 * q1; - q2=ex[lskip1]; - m12 = p1 * q2; - p2=ell[lskip1]; - m21 = p2 * q1; - m22 = p2 * q2; - Z11 += m11; - Z12 += m12; - Z21 += m21; - Z22 += m22; - /* compute outer product and add it to the Z matrix */ - p1=ell[1]; - q1=ex[1]; - m11 = p1 * q1; - q2=ex[1+lskip1]; - m12 = p1 * q2; - p2=ell[1+lskip1]; - m21 = p2 * q1; - m22 = p2 * q2; - /* advance pointers */ - ell += 2; - ex += 2; - Z11 += m11; - Z12 += m12; - Z21 += m21; - Z22 += m22; - /* end of inner loop */ - } - /* compute left-over iterations */ - j += 2; - for (; j > 0; j--) { - /* compute outer product and add it to the Z matrix */ - p1=ell[0]; - q1=ex[0]; - m11 = p1 * q1; - q2=ex[lskip1]; - m12 = p1 * q2; - p2=ell[lskip1]; - m21 = p2 * q1; - m22 = p2 * q2; - /* advance pointers */ - ell += 1; - ex += 1; - Z11 += m11; - Z12 += m12; - Z21 += m21; - Z22 += m22; - } - /* finish computing the X(i) block */ - Z11 = ex[0] - Z11; - ex[0] = Z11; - Z12 = ex[lskip1] - Z12; - ex[lskip1] = Z12; - p1 = ell[lskip1]; - Z21 = ex[1] - Z21 - p1*Z11; - ex[1] = Z21; - Z22 = ex[1+lskip1] - Z22 - p1*Z12; - ex[1+lskip1] = Z22; - /* end of outer loop */ - } -} - - -void dFactorLDLT (dReal *A, dReal *d, int n, int nskip1) -{ - int i,j; - dReal sum,*ell,*dee,dd,p1,p2,q1,q2,Z11,m11,Z21,m21,Z22,m22; - if (n < 1) return; - - for (i=0; i<=n-2; i += 2) { - /* solve L*(D*l)=a, l is scaled elements in 2 x i block at A(i,0) */ - dSolveL1_2 (A,A+i*nskip1,i,nskip1); - /* scale the elements in a 2 x i block at A(i,0), and also */ - /* compute Z = the outer product matrix that we'll need. */ - Z11 = 0; - Z21 = 0; - Z22 = 0; - ell = A+i*nskip1; - dee = d; - for (j=i-6; j >= 0; j -= 6) { - p1 = ell[0]; - p2 = ell[nskip1]; - dd = dee[0]; - q1 = p1*dd; - q2 = p2*dd; - ell[0] = q1; - ell[nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - p1 = ell[1]; - p2 = ell[1+nskip1]; - dd = dee[1]; - q1 = p1*dd; - q2 = p2*dd; - ell[1] = q1; - ell[1+nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - p1 = ell[2]; - p2 = ell[2+nskip1]; - dd = dee[2]; - q1 = p1*dd; - q2 = p2*dd; - ell[2] = q1; - ell[2+nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - p1 = ell[3]; - p2 = ell[3+nskip1]; - dd = dee[3]; - q1 = p1*dd; - q2 = p2*dd; - ell[3] = q1; - ell[3+nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - p1 = ell[4]; - p2 = ell[4+nskip1]; - dd = dee[4]; - q1 = p1*dd; - q2 = p2*dd; - ell[4] = q1; - ell[4+nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - p1 = ell[5]; - p2 = ell[5+nskip1]; - dd = dee[5]; - q1 = p1*dd; - q2 = p2*dd; - ell[5] = q1; - ell[5+nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - ell += 6; - dee += 6; - } - /* compute left-over iterations */ - j += 6; - for (; j > 0; j--) { - p1 = ell[0]; - p2 = ell[nskip1]; - dd = dee[0]; - q1 = p1*dd; - q2 = p2*dd; - ell[0] = q1; - ell[nskip1] = q2; - m11 = p1*q1; - m21 = p2*q1; - m22 = p2*q2; - Z11 += m11; - Z21 += m21; - Z22 += m22; - ell++; - dee++; - } - /* solve for diagonal 2 x 2 block at A(i,i) */ - Z11 = ell[0] - Z11; - Z21 = ell[nskip1] - Z21; - Z22 = ell[1+nskip1] - Z22; - dee = d + i; - /* factorize 2 x 2 block Z,dee */ - /* factorize row 1 */ - dee[0] = dRecip(Z11); - /* factorize row 2 */ - sum = 0; - q1 = Z21; - q2 = q1 * dee[0]; - Z21 = q2; - sum += q1*q2; - dee[1] = dRecip(Z22 - sum); - /* done factorizing 2 x 2 block */ - ell[nskip1] = Z21; - } - /* compute the (less than 2) rows at the bottom */ - switch (n-i) { - case 0: - break; - - case 1: - dSolveL1_1 (A,A+i*nskip1,i,nskip1); - /* scale the elements in a 1 x i block at A(i,0), and also */ - /* compute Z = the outer product matrix that we'll need. */ - Z11 = 0; - ell = A+i*nskip1; - dee = d; - for (j=i-6; j >= 0; j -= 6) { - p1 = ell[0]; - dd = dee[0]; - q1 = p1*dd; - ell[0] = q1; - m11 = p1*q1; - Z11 += m11; - p1 = ell[1]; - dd = dee[1]; - q1 = p1*dd; - ell[1] = q1; - m11 = p1*q1; - Z11 += m11; - p1 = ell[2]; - dd = dee[2]; - q1 = p1*dd; - ell[2] = q1; - m11 = p1*q1; - Z11 += m11; - p1 = ell[3]; - dd = dee[3]; - q1 = p1*dd; - ell[3] = q1; - m11 = p1*q1; - Z11 += m11; - p1 = ell[4]; - dd = dee[4]; - q1 = p1*dd; - ell[4] = q1; - m11 = p1*q1; - Z11 += m11; - p1 = ell[5]; - dd = dee[5]; - q1 = p1*dd; - ell[5] = q1; - m11 = p1*q1; - Z11 += m11; - ell += 6; - dee += 6; - } - /* compute left-over iterations */ - j += 6; - for (; j > 0; j--) { - p1 = ell[0]; - dd = dee[0]; - q1 = p1*dd; - ell[0] = q1; - m11 = p1*q1; - Z11 += m11; - ell++; - dee++; - } - /* solve for diagonal 1 x 1 block at A(i,i) */ - Z11 = ell[0] - Z11; - dee = d + i; - /* factorize 1 x 1 block Z,dee */ - /* factorize row 1 */ - dee[0] = dRecip(Z11); - /* done factorizing 1 x 1 block */ - break; - - default: *((char*)0)=0; /* this should never happen! */ - } -} diff --git a/extern/ode/dist/ode/src/fastlsolve.c b/extern/ode/dist/ode/src/fastlsolve.c deleted file mode 100644 index 0ae99d62d0b..00000000000 --- a/extern/ode/dist/ode/src/fastlsolve.c +++ /dev/null @@ -1,298 +0,0 @@ -/* generated code, do not edit. */ - -#include "ode/matrix.h" - -/* solve L*X=B, with B containing 1 right hand sides. - * L is an n*n lower triangular matrix with ones on the diagonal. - * L is stored by rows and its leading dimension is lskip. - * B is an n*1 matrix that contains the right hand sides. - * B is stored by columns and its leading dimension is also lskip. - * B is overwritten with X. - * this processes blocks of 4*4. - * if this is in the factorizer source file, n must be a multiple of 4. - */ - -void dSolveL1 (const dReal *L, dReal *B, int n, int lskip1) -{ - /* declare variables - Z matrix, p and q vectors, etc */ - dReal Z11,Z21,Z31,Z41,p1,q1,p2,p3,p4,*ex; - const dReal *ell; - int lskip2,lskip3,i,j; - /* compute lskip values */ - lskip2 = 2*lskip1; - lskip3 = 3*lskip1; - /* compute all 4 x 1 blocks of X */ - for (i=0; i <= n-4; i+=4) { - /* compute all 4 x 1 block of X, from rows i..i+4-1 */ - /* set the Z matrix to 0 */ - Z11=0; - Z21=0; - Z31=0; - Z41=0; - ell = L + i*lskip1; - ex = B; - /* the inner loop that computes outer products and adds them to Z */ - for (j=i-12; j >= 0; j -= 12) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - p2=ell[lskip1]; - p3=ell[lskip2]; - p4=ell[lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[1]; - q1=ex[1]; - p2=ell[1+lskip1]; - p3=ell[1+lskip2]; - p4=ell[1+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[2]; - q1=ex[2]; - p2=ell[2+lskip1]; - p3=ell[2+lskip2]; - p4=ell[2+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[3]; - q1=ex[3]; - p2=ell[3+lskip1]; - p3=ell[3+lskip2]; - p4=ell[3+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[4]; - q1=ex[4]; - p2=ell[4+lskip1]; - p3=ell[4+lskip2]; - p4=ell[4+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[5]; - q1=ex[5]; - p2=ell[5+lskip1]; - p3=ell[5+lskip2]; - p4=ell[5+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[6]; - q1=ex[6]; - p2=ell[6+lskip1]; - p3=ell[6+lskip2]; - p4=ell[6+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[7]; - q1=ex[7]; - p2=ell[7+lskip1]; - p3=ell[7+lskip2]; - p4=ell[7+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[8]; - q1=ex[8]; - p2=ell[8+lskip1]; - p3=ell[8+lskip2]; - p4=ell[8+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[9]; - q1=ex[9]; - p2=ell[9+lskip1]; - p3=ell[9+lskip2]; - p4=ell[9+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[10]; - q1=ex[10]; - p2=ell[10+lskip1]; - p3=ell[10+lskip2]; - p4=ell[10+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* load p and q values */ - p1=ell[11]; - q1=ex[11]; - p2=ell[11+lskip1]; - p3=ell[11+lskip2]; - p4=ell[11+lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* advance pointers */ - ell += 12; - ex += 12; - /* end of inner loop */ - } - /* compute left-over iterations */ - j += 12; - for (; j > 0; j--) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - p2=ell[lskip1]; - p3=ell[lskip2]; - p4=ell[lskip3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - Z21 += p2 * q1; - Z31 += p3 * q1; - Z41 += p4 * q1; - /* advance pointers */ - ell += 1; - ex += 1; - } - /* finish computing the X(i) block */ - Z11 = ex[0] - Z11; - ex[0] = Z11; - p1 = ell[lskip1]; - Z21 = ex[1] - Z21 - p1*Z11; - ex[1] = Z21; - p1 = ell[lskip2]; - p2 = ell[1+lskip2]; - Z31 = ex[2] - Z31 - p1*Z11 - p2*Z21; - ex[2] = Z31; - p1 = ell[lskip3]; - p2 = ell[1+lskip3]; - p3 = ell[2+lskip3]; - Z41 = ex[3] - Z41 - p1*Z11 - p2*Z21 - p3*Z31; - ex[3] = Z41; - /* end of outer loop */ - } - /* compute rows at end that are not a multiple of block size */ - for (; i < n; i++) { - /* compute all 1 x 1 block of X, from rows i..i+1-1 */ - /* set the Z matrix to 0 */ - Z11=0; - ell = L + i*lskip1; - ex = B; - /* the inner loop that computes outer products and adds them to Z */ - for (j=i-12; j >= 0; j -= 12) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[1]; - q1=ex[1]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[2]; - q1=ex[2]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[3]; - q1=ex[3]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[4]; - q1=ex[4]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[5]; - q1=ex[5]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[6]; - q1=ex[6]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[7]; - q1=ex[7]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[8]; - q1=ex[8]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[9]; - q1=ex[9]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[10]; - q1=ex[10]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* load p and q values */ - p1=ell[11]; - q1=ex[11]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* advance pointers */ - ell += 12; - ex += 12; - /* end of inner loop */ - } - /* compute left-over iterations */ - j += 12; - for (; j > 0; j--) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - /* compute outer product and add it to the Z matrix */ - Z11 += p1 * q1; - /* advance pointers */ - ell += 1; - ex += 1; - } - /* finish computing the X(i) block */ - Z11 = ex[0] - Z11; - ex[0] = Z11; - } -} diff --git a/extern/ode/dist/ode/src/fastltsolve.c b/extern/ode/dist/ode/src/fastltsolve.c deleted file mode 100644 index eb950f6076a..00000000000 --- a/extern/ode/dist/ode/src/fastltsolve.c +++ /dev/null @@ -1,199 +0,0 @@ -/* generated code, do not edit. */ - -#include "ode/matrix.h" - -/* solve L^T * x=b, with b containing 1 right hand side. - * L is an n*n lower triangular matrix with ones on the diagonal. - * L is stored by rows and its leading dimension is lskip. - * b is an n*1 matrix that contains the right hand side. - * b is overwritten with x. - * this processes blocks of 4. - */ - -void dSolveL1T (const dReal *L, dReal *B, int n, int lskip1) -{ - /* declare variables - Z matrix, p and q vectors, etc */ - dReal Z11,m11,Z21,m21,Z31,m31,Z41,m41,p1,q1,p2,p3,p4,*ex; - const dReal *ell; - int lskip2,lskip3,i,j; - /* special handling for L and B because we're solving L1 *transpose* */ - L = L + (n-1)*(lskip1+1); - B = B + n-1; - lskip1 = -lskip1; - /* compute lskip values */ - lskip2 = 2*lskip1; - lskip3 = 3*lskip1; - /* compute all 4 x 1 blocks of X */ - for (i=0; i <= n-4; i+=4) { - /* compute all 4 x 1 block of X, from rows i..i+4-1 */ - /* set the Z matrix to 0 */ - Z11=0; - Z21=0; - Z31=0; - Z41=0; - ell = L - i; - ex = B; - /* the inner loop that computes outer products and adds them to Z */ - for (j=i-4; j >= 0; j -= 4) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - p2=ell[-1]; - p3=ell[-2]; - p4=ell[-3]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - m21 = p2 * q1; - m31 = p3 * q1; - m41 = p4 * q1; - ell += lskip1; - Z11 += m11; - Z21 += m21; - Z31 += m31; - Z41 += m41; - /* load p and q values */ - p1=ell[0]; - q1=ex[-1]; - p2=ell[-1]; - p3=ell[-2]; - p4=ell[-3]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - m21 = p2 * q1; - m31 = p3 * q1; - m41 = p4 * q1; - ell += lskip1; - Z11 += m11; - Z21 += m21; - Z31 += m31; - Z41 += m41; - /* load p and q values */ - p1=ell[0]; - q1=ex[-2]; - p2=ell[-1]; - p3=ell[-2]; - p4=ell[-3]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - m21 = p2 * q1; - m31 = p3 * q1; - m41 = p4 * q1; - ell += lskip1; - Z11 += m11; - Z21 += m21; - Z31 += m31; - Z41 += m41; - /* load p and q values */ - p1=ell[0]; - q1=ex[-3]; - p2=ell[-1]; - p3=ell[-2]; - p4=ell[-3]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - m21 = p2 * q1; - m31 = p3 * q1; - m41 = p4 * q1; - ell += lskip1; - ex -= 4; - Z11 += m11; - Z21 += m21; - Z31 += m31; - Z41 += m41; - /* end of inner loop */ - } - /* compute left-over iterations */ - j += 4; - for (; j > 0; j--) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - p2=ell[-1]; - p3=ell[-2]; - p4=ell[-3]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - m21 = p2 * q1; - m31 = p3 * q1; - m41 = p4 * q1; - ell += lskip1; - ex -= 1; - Z11 += m11; - Z21 += m21; - Z31 += m31; - Z41 += m41; - } - /* finish computing the X(i) block */ - Z11 = ex[0] - Z11; - ex[0] = Z11; - p1 = ell[-1]; - Z21 = ex[-1] - Z21 - p1*Z11; - ex[-1] = Z21; - p1 = ell[-2]; - p2 = ell[-2+lskip1]; - Z31 = ex[-2] - Z31 - p1*Z11 - p2*Z21; - ex[-2] = Z31; - p1 = ell[-3]; - p2 = ell[-3+lskip1]; - p3 = ell[-3+lskip2]; - Z41 = ex[-3] - Z41 - p1*Z11 - p2*Z21 - p3*Z31; - ex[-3] = Z41; - /* end of outer loop */ - } - /* compute rows at end that are not a multiple of block size */ - for (; i < n; i++) { - /* compute all 1 x 1 block of X, from rows i..i+1-1 */ - /* set the Z matrix to 0 */ - Z11=0; - ell = L - i; - ex = B; - /* the inner loop that computes outer products and adds them to Z */ - for (j=i-4; j >= 0; j -= 4) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - ell += lskip1; - Z11 += m11; - /* load p and q values */ - p1=ell[0]; - q1=ex[-1]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - ell += lskip1; - Z11 += m11; - /* load p and q values */ - p1=ell[0]; - q1=ex[-2]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - ell += lskip1; - Z11 += m11; - /* load p and q values */ - p1=ell[0]; - q1=ex[-3]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - ell += lskip1; - ex -= 4; - Z11 += m11; - /* end of inner loop */ - } - /* compute left-over iterations */ - j += 4; - for (; j > 0; j--) { - /* load p and q values */ - p1=ell[0]; - q1=ex[0]; - /* compute outer product and add it to the Z matrix */ - m11 = p1 * q1; - ell += lskip1; - ex -= 1; - Z11 += m11; - } - /* finish computing the X(i) block */ - Z11 = ex[0] - Z11; - ex[0] = Z11; - } -} diff --git a/extern/ode/dist/ode/src/geom.cpp b/extern/ode/dist/ode/src/geom.cpp deleted file mode 100644 index 1818814a791..00000000000 --- a/extern/ode/dist/ode/src/geom.cpp +++ /dev/null @@ -1,2207 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -the rule is that only the low level primitive collision functions should set -dContactGeom::g1 and dContactGeom::g2. - -*/ - -#define SHARED_GEOM_H_INCLUDED_FROM_DEFINING_FILE 1 -#include -#include -#include -#include -#include -#include -#include -#include -#include "objects.h" -#include "array.h" -#include "geom_internal.h" - -//**************************************************************************** -// collision utilities. - -// given a pointer `p' to a dContactGeom, return the dContactGeom at -// p + skip bytes. - -#define CONTACT(p,skip) ((dContactGeom*) (((char*)p) + (skip))) - - -// if the spheres (p1,r1) and (p2,r2) collide, set the contact `c' and -// return 1, else return 0. - -static int dCollideSpheres (dVector3 p1, dReal r1, - dVector3 p2, dReal r2, dContactGeom *c) -{ - // printf ("d=%.2f (%.2f %.2f %.2f) (%.2f %.2f %.2f) r1=%.2f r2=%.2f\n", - // d,p1[0],p1[1],p1[2],p2[0],p2[1],p2[2],r1,r2); - - dReal d = dDISTANCE (p1,p2); - if (d > (r1 + r2)) return 0; - if (d <= 0) { - c->pos[0] = p1[0]; - c->pos[1] = p1[1]; - c->pos[2] = p1[2]; - c->normal[0] = 1; - c->normal[1] = 0; - c->normal[2] = 0; - c->depth = r1 + r2; - } - else { - dReal d1 = dRecip (d); - c->normal[0] = (p1[0]-p2[0])*d1; - c->normal[1] = (p1[1]-p2[1])*d1; - c->normal[2] = (p1[2]-p2[2])*d1; - dReal k = REAL(0.5) * (r2 - r1 - d); - c->pos[0] = p1[0] + c->normal[0]*k; - c->pos[1] = p1[1] + c->normal[1]*k; - c->pos[2] = p1[2] + c->normal[2]*k; - c->depth = r1 + r2 - d; - } - return 1; -} - - -// given two lines -// qa = pa + alpha* ua -// qb = pb + beta * ub -// where pa,pb are two points, ua,ub are two unit length vectors, and alpha, -// beta go from [-inf,inf], return alpha and beta such that qa and qb are -// as close as possible - -static void lineClosestApproach (const dVector3 pa, const dVector3 ua, - const dVector3 pb, const dVector3 ub, - dReal *alpha, dReal *beta) -{ - dVector3 p; - p[0] = pb[0] - pa[0]; - p[1] = pb[1] - pa[1]; - p[2] = pb[2] - pa[2]; - dReal uaub = dDOT(ua,ub); - dReal q1 = dDOT(ua,p); - dReal q2 = -dDOT(ub,p); - dReal d = 1-uaub*uaub; - if (d <= 0) { - // @@@ this needs to be made more robust - *alpha = 0; - *beta = 0; - } - else { - d = dRecip(d); - *alpha = (q1 + uaub*q2)*d; - *beta = (uaub*q1 + q2)*d; - } -} - - -// given two line segments A and B with endpoints a1-a2 and b1-b2, return the -// points on A and B that are closest to each other (in cp1 and cp2). -// in the case of parallel lines where there are multiple solutions, a -// solution involving the endpoint of at least one line will be returned. -// this will work correctly for zero length lines, e.g. if a1==a2 and/or -// b1==b2. -// -// the algorithm works by applying the voronoi clipping rule to the features -// of the line segments. the three features of each line segment are the two -// endpoints and the line between them. the voronoi clipping rule states that, -// for feature X on line A and feature Y on line B, the closest points PA and -// PB between X and Y are globally the closest points if PA is in V(Y) and -// PB is in V(X), where V(X) is the voronoi region of X. - - -void dClosestLineSegmentPoints (dVector3 const a1, dVector3 const a2, - dVector3 const b1, dVector3 const b2, - dVector3 cp1, dVector3 cp2) -{ - dVector3 a1a2,b1b2,a1b1,a1b2,a2b1,a2b2,n; - dReal la,lb,k,da1,da2,da3,da4,db1,db2,db3,db4,det; - -#define SET2(a,b) a[0]=b[0]; a[1]=b[1]; a[2]=b[2]; -#define SET3(a,b,op,c) a[0]=b[0] op c[0]; a[1]=b[1] op c[1]; a[2]=b[2] op c[2]; - - // check vertex-vertex features - - SET3 (a1a2,a2,-,a1); - SET3 (b1b2,b2,-,b1); - SET3 (a1b1,b1,-,a1); - da1 = dDOT(a1a2,a1b1); - db1 = dDOT(b1b2,a1b1); - if (da1 <= 0 && db1 >= 0) { - SET2 (cp1,a1); - SET2 (cp2,b1); - return; - } - - SET3 (a1b2,b2,-,a1); - da2 = dDOT(a1a2,a1b2); - db2 = dDOT(b1b2,a1b2); - if (da2 <= 0 && db2 <= 0) { - SET2 (cp1,a1); - SET2 (cp2,b2); - return; - } - - SET3 (a2b1,b1,-,a2); - da3 = dDOT(a1a2,a2b1); - db3 = dDOT(b1b2,a2b1); - if (da3 >= 0 && db3 >= 0) { - SET2 (cp1,a2); - SET2 (cp2,b1); - return; - } - - SET3 (a2b2,b2,-,a2); - da4 = dDOT(a1a2,a2b2); - db4 = dDOT(b1b2,a2b2); - if (da4 >= 0 && db4 <= 0) { - SET2 (cp1,a2); - SET2 (cp2,b2); - return; - } - - // check edge-vertex features. - // if one or both of the lines has zero length, we will never get to here, - // so we do not have to worry about the following divisions by zero. - - la = dDOT(a1a2,a1a2); - if (da1 >= 0 && da3 <= 0) { - k = da1 / la; - SET3 (n,a1b1,-,k*a1a2); - if (dDOT(b1b2,n) >= 0) { - SET3 (cp1,a1,+,k*a1a2); - SET2 (cp2,b1); - return; - } - } - - if (da2 >= 0 && da4 <= 0) { - k = da2 / la; - SET3 (n,a1b2,-,k*a1a2); - if (dDOT(b1b2,n) <= 0) { - SET3 (cp1,a1,+,k*a1a2); - SET2 (cp2,b2); - return; - } - } - - lb = dDOT(b1b2,b1b2); - if (db1 <= 0 && db2 >= 0) { - k = -db1 / lb; - SET3 (n,-a1b1,-,k*b1b2); - if (dDOT(a1a2,n) >= 0) { - SET2 (cp1,a1); - SET3 (cp2,b1,+,k*b1b2); - return; - } - } - - if (db3 <= 0 && db4 >= 0) { - k = -db3 / lb; - SET3 (n,-a2b1,-,k*b1b2); - if (dDOT(a1a2,n) <= 0) { - SET2 (cp1,a2); - SET3 (cp2,b1,+,k*b1b2); - return; - } - } - - // it must be edge-edge - - k = dDOT(a1a2,b1b2); - det = la*lb - k*k; - if (det <= 0) { - // this should never happen, but just in case... - SET2(cp1,a1); - SET2(cp2,b1); - return; - } - det = dRecip (det); - dReal alpha = (lb*da1 - k*db1) * det; - dReal beta = ( k*da1 - la*db1) * det; - SET3 (cp1,a1,+,alpha*a1a2); - SET3 (cp2,b1,+,beta*b1b2); - -# undef SET2 -# undef SET3 -} - - -// given a line segment p1-p2 and a box (center 'c', rotation 'R', side length -// vector 'side'), compute the points of closest approach between the box -// and the line. return these points in 'lret' (the point on the line) and -// 'bret' (the point on the box). if the line actually penetrates the box -// then the solution is not unique, but only one solution will be returned. -// in this case the solution points will coincide. -// -// a simple root finding algorithm is used to find the value of 't' that -// satisfies: -// d|D(t)|^2/dt = 0 -// where: -// |D(t)| = |p(t)-b(t)| -// where p(t) is a point on the line parameterized by t: -// p(t) = p1 + t*(p2-p1) -// and b(t) is that same point clipped to the boundary of the box. in box- -// relative coordinates d|D(t)|^2/dt is the sum of three x,y,z components -// each of which looks like this: -// -// t_lo / -// ______/ -->t -// / t_hi -// / -// -// t_lo and t_hi are the t values where the line passes through the planes -// corresponding to the sides of the box. the algorithm computes d|D(t)|^2/dt -// in a piecewise fashion from t=0 to t=1, stopping at the point where -// d|D(t)|^2/dt crosses from negative to positive. - -static void dClosestLineBoxPoints (const dVector3 p1, const dVector3 p2, - const dVector3 c, const dMatrix3 R, - const dVector3 side, - dVector3 lret, dVector3 bret) -{ - int i; - - // compute the start and delta of the line p1-p2 relative to the box. - // we will do all subsequent computations in this box-relative coordinate - // system. we have to do a translation and rotation for each point. - dVector3 tmp,s,v; - tmp[0] = p1[0] - c[0]; - tmp[1] = p1[1] - c[1]; - tmp[2] = p1[2] - c[2]; - dMULTIPLY1_331 (s,R,tmp); - tmp[0] = p2[0] - p1[0]; - tmp[1] = p2[1] - p1[1]; - tmp[2] = p2[2] - p1[2]; - dMULTIPLY1_331 (v,R,tmp); - - // mirror the line so that v has all components >= 0 - dVector3 sign; - for (i=0; i<3; i++) { - if (v[i] < 0) { - s[i] = -s[i]; - v[i] = -v[i]; - sign[i] = -1; - } - else sign[i] = 1; - } - - // compute v^2 - dVector3 v2; - v2[0] = v[0]*v[0]; - v2[1] = v[1]*v[1]; - v2[2] = v[2]*v[2]; - - // compute the half-sides of the box - dReal h[3]; - h[0] = REAL(0.5) * side[0]; - h[1] = REAL(0.5) * side[1]; - h[2] = REAL(0.5) * side[2]; - - // region is -1,0,+1 depending on which side of the box planes each - // coordinate is on. tanchor in the next t value at which there is a - // transition, or the last one if there are no more. - int region[3]; - dReal tanchor[3]; - - // find the region and tanchor values for p1 - for (i=0; i<3; i++) { - if (v[i] > 0) { - if (s[i] < -h[i]) { - region[i] = -1; - tanchor[i] = (-h[i]-s[i])/v[i]; - } - else { - region[i] = (s[i] > h[i]); - tanchor[i] = (h[i]-s[i])/v[i]; - } - } - else { - region[i] = 0; - tanchor[i] = 2; // this will never be a valid tanchor - } - } - - // compute d|d|^2/dt for t=0. if it's >= 0 then p1 is the closest point - dReal t=0; - dReal dd2dt = 0; - for (i=0; i<3; i++) dd2dt -= (region[i] ? v2[i] : 0) * tanchor[i]; - if (dd2dt >= 0) goto got_answer; - - do { - // find the point on the line that is at the next clip plane boundary - dReal next_t = 1; - for (i=0; i<3; i++) { - if (tanchor[i] > t && tanchor[i] < 1 && tanchor[i] < next_t) - next_t = tanchor[i]; - } - - // compute d|d|^2/dt for the next t - dReal next_dd2dt = 0; - for (i=0; i<3; i++) { - next_dd2dt += (region[i] ? v2[i] : 0) * (next_t - tanchor[i]); - } - - // if the sign of d|d|^2/dt has changed, solution = the crossover point - if (next_dd2dt >= 0) { - dReal m = (next_dd2dt-dd2dt)/(next_t - t); - t -= dd2dt/m; - goto got_answer; - } - - // advance to the next anchor point / region - for (i=0; i<3; i++) { - if (tanchor[i] == next_t) { - tanchor[i] = (h[i]-s[i])/v[i]; - region[i]++; - } - } - t = next_t; - dd2dt = next_dd2dt; - } - while (t < 1); - t = 1; - - got_answer: - - // compute closest point on the line - for (i=0; i<3; i++) lret[i] = p1[i] + t*tmp[i]; // note: tmp=p2-p1 - - // compute closest point on the box - for (i=0; i<3; i++) { - tmp[i] = sign[i] * (s[i] + t*v[i]); - if (tmp[i] < -h[i]) tmp[i] = -h[i]; - else if (tmp[i] > h[i]) tmp[i] = h[i]; - } - dMULTIPLY0_331 (s,R,tmp); - for (i=0; i<3; i++) bret[i] = s[i] + c[i]; -} - - -// given a box (R,side), `R' is the rotation matrix for the box, and `side' -// is a vector of x/y/z side lengths, return the size of the interval of the -// box projected along the given axis. if the axis has unit length then the -// return value will be the actual diameter, otherwise the result will be -// scaled by the axis length. - -static inline dReal boxDiameter (const dMatrix3 R, const dVector3 side, - const dVector3 axis) -{ - dVector3 q; - dMULTIPLY1_331 (q,R,axis); // transform axis to body-relative - return dFabs(q[0])*side[0] + dFabs(q[1])*side[1] + dFabs(q[2])*side[2]; -} - - -// given boxes (p1,R1,side1) and (p1,R1,side1), return 1 if they intersect -// or 0 if not. - -int dBoxTouchesBox (const dVector3 p1, const dMatrix3 R1, - const dVector3 side1, const dVector3 p2, - const dMatrix3 R2, const dVector3 side2) -{ - // two boxes are disjoint if (and only if) there is a separating axis - // perpendicular to a face from one box or perpendicular to an edge from - // either box. the following tests are derived from: - // "OBB Tree: A Hierarchical Structure for Rapid Interference Detection", - // S.Gottschalk, M.C.Lin, D.Manocha., Proc of ACM Siggraph 1996. - - // Rij is R1'*R2, i.e. the relative rotation between R1 and R2. - // Qij is abs(Rij) - dVector3 p,pp; - dReal A1,A2,A3,B1,B2,B3,R11,R12,R13,R21,R22,R23,R31,R32,R33, - Q11,Q12,Q13,Q21,Q22,Q23,Q31,Q32,Q33; - - // get vector from centers of box 1 to box 2, relative to box 1 - p[0] = p2[0] - p1[0]; - p[1] = p2[1] - p1[1]; - p[2] = p2[2] - p1[2]; - dMULTIPLY1_331 (pp,R1,p); // get pp = p relative to body 1 - - // get side lengths / 2 - A1 = side1[0]*REAL(0.5); A2 = side1[1]*REAL(0.5); A3 = side1[2]*REAL(0.5); - B1 = side2[0]*REAL(0.5); B2 = side2[1]*REAL(0.5); B3 = side2[2]*REAL(0.5); - - // for the following tests, excluding computation of Rij, in the worst case, - // 15 compares, 60 adds, 81 multiplies, and 24 absolutes. - // notation: R1=[u1 u2 u3], R2=[v1 v2 v3] - - // separating axis = u1,u2,u3 - R11 = dDOT44(R1+0,R2+0); R12 = dDOT44(R1+0,R2+1); R13 = dDOT44(R1+0,R2+2); - Q11 = dFabs(R11); Q12 = dFabs(R12); Q13 = dFabs(R13); - if (dFabs(pp[0]) > (A1 + B1*Q11 + B2*Q12 + B3*Q13)) return 0; - R21 = dDOT44(R1+1,R2+0); R22 = dDOT44(R1+1,R2+1); R23 = dDOT44(R1+1,R2+2); - Q21 = dFabs(R21); Q22 = dFabs(R22); Q23 = dFabs(R23); - if (dFabs(pp[1]) > (A2 + B1*Q21 + B2*Q22 + B3*Q23)) return 0; - R31 = dDOT44(R1+2,R2+0); R32 = dDOT44(R1+2,R2+1); R33 = dDOT44(R1+2,R2+2); - Q31 = dFabs(R31); Q32 = dFabs(R32); Q33 = dFabs(R33); - if (dFabs(pp[2]) > (A3 + B1*Q31 + B2*Q32 + B3*Q33)) return 0; - - // separating axis = v1,v2,v3 - if (dFabs(dDOT41(R2+0,p)) > (A1*Q11 + A2*Q21 + A3*Q31 + B1)) return 0; - if (dFabs(dDOT41(R2+1,p)) > (A1*Q12 + A2*Q22 + A3*Q32 + B2)) return 0; - if (dFabs(dDOT41(R2+2,p)) > (A1*Q13 + A2*Q23 + A3*Q33 + B3)) return 0; - - // separating axis = u1 x (v1,v2,v3) - if (dFabs(pp[2]*R21-pp[1]*R31) > A2*Q31 + A3*Q21 + B2*Q13 + B3*Q12) return 0; - if (dFabs(pp[2]*R22-pp[1]*R32) > A2*Q32 + A3*Q22 + B1*Q13 + B3*Q11) return 0; - if (dFabs(pp[2]*R23-pp[1]*R33) > A2*Q33 + A3*Q23 + B1*Q12 + B2*Q11) return 0; - - // separating axis = u2 x (v1,v2,v3) - if (dFabs(pp[0]*R31-pp[2]*R11) > A1*Q31 + A3*Q11 + B2*Q23 + B3*Q22) return 0; - if (dFabs(pp[0]*R32-pp[2]*R12) > A1*Q32 + A3*Q12 + B1*Q23 + B3*Q21) return 0; - if (dFabs(pp[0]*R33-pp[2]*R13) > A1*Q33 + A3*Q13 + B1*Q22 + B2*Q21) return 0; - - // separating axis = u3 x (v1,v2,v3) - if (dFabs(pp[1]*R11-pp[0]*R21) > A1*Q21 + A2*Q11 + B2*Q33 + B3*Q32) return 0; - if (dFabs(pp[1]*R12-pp[0]*R22) > A1*Q22 + A2*Q12 + B1*Q33 + B3*Q31) return 0; - if (dFabs(pp[1]*R13-pp[0]*R23) > A1*Q23 + A2*Q13 + B1*Q32 + B2*Q31) return 0; - - return 1; -} - - -// given two boxes (p1,R1,side1) and (p2,R2,side2), collide them together and -// generate contact points. this returns 0 if there is no contact otherwise -// it returns the number of contacts generated. -// `normal' returns the contact normal. -// `depth' returns the maximum penetration depth along that normal. -// `code' returns a number indicating the type of contact that was detected: -// 1,2,3 = box 2 intersects with a face of box 1 -// 4,5,6 = box 1 intersects with a face of box 2 -// 7..15 = edge-edge contact -// `maxc' is the maximum number of contacts allowed to be generated, i.e. -// the size of the `contact' array. -// `contact' and `skip' are the contact array information provided to the -// collision functions. this function only fills in the position and depth -// fields. -// -// @@@ some stuff to optimize here, reuse code in contact point calculations. - -extern "C" int dBoxBox (const dVector3 p1, const dMatrix3 R1, - const dVector3 side1, const dVector3 p2, - const dMatrix3 R2, const dVector3 side2, - dVector3 normal, dReal *depth, int *code, - int maxc, dContactGeom *contact, int skip) -{ - dVector3 p,pp,normalC; - const dReal *normalR = 0; - dReal A1,A2,A3,B1,B2,B3,R11,R12,R13,R21,R22,R23,R31,R32,R33, - Q11,Q12,Q13,Q21,Q22,Q23,Q31,Q32,Q33,s,s2,l; - int i,invert_normal; - - // get vector from centers of box 1 to box 2, relative to box 1 - p[0] = p2[0] - p1[0]; - p[1] = p2[1] - p1[1]; - p[2] = p2[2] - p1[2]; - dMULTIPLY1_331 (pp,R1,p); // get pp = p relative to body 1 - - // get side lengths / 2 - A1 = side1[0]*REAL(0.5); A2 = side1[1]*REAL(0.5); A3 = side1[2]*REAL(0.5); - B1 = side2[0]*REAL(0.5); B2 = side2[1]*REAL(0.5); B3 = side2[2]*REAL(0.5); - - // Rij is R1'*R2, i.e. the relative rotation between R1 and R2 - R11 = dDOT44(R1+0,R2+0); R12 = dDOT44(R1+0,R2+1); R13 = dDOT44(R1+0,R2+2); - R21 = dDOT44(R1+1,R2+0); R22 = dDOT44(R1+1,R2+1); R23 = dDOT44(R1+1,R2+2); - R31 = dDOT44(R1+2,R2+0); R32 = dDOT44(R1+2,R2+1); R33 = dDOT44(R1+2,R2+2); - - Q11 = dFabs(R11); Q12 = dFabs(R12); Q13 = dFabs(R13); - Q21 = dFabs(R21); Q22 = dFabs(R22); Q23 = dFabs(R23); - Q31 = dFabs(R31); Q32 = dFabs(R32); Q33 = dFabs(R33); - - // for all 15 possible separating axes: - // * see if the axis separates the boxes. if so, return 0. - // * find the depth of the penetration along the separating axis (s2) - // * if this is the largest depth so far, record it. - // the normal vector will be set to the separating axis with the smallest - // depth. note: normalR is set to point to a column of R1 or R2 if that is - // the smallest depth normal so far. otherwise normalR is 0 and normalC is - // set to a vector relative to body 1. invert_normal is 1 if the sign of - // the normal should be flipped. - -#define TEST(expr1,expr2,norm,cc) \ - s2 = dFabs(expr1) - (expr2); \ - if (s2 > 0) return 0; \ - if (s2 > s) { \ - s = s2; \ - normalR = norm; \ - invert_normal = ((expr1) < 0); \ - *code = (cc); \ - } - - s = -dInfinity; - invert_normal = 0; - *code = 0; - - // separating axis = u1,u2,u3 - TEST (pp[0],(A1 + B1*Q11 + B2*Q12 + B3*Q13),R1+0,1); - TEST (pp[1],(A2 + B1*Q21 + B2*Q22 + B3*Q23),R1+1,2); - TEST (pp[2],(A3 + B1*Q31 + B2*Q32 + B3*Q33),R1+2,3); - - // separating axis = v1,v2,v3 - TEST (dDOT41(R2+0,p),(A1*Q11 + A2*Q21 + A3*Q31 + B1),R2+0,4); - TEST (dDOT41(R2+1,p),(A1*Q12 + A2*Q22 + A3*Q32 + B2),R2+1,5); - TEST (dDOT41(R2+2,p),(A1*Q13 + A2*Q23 + A3*Q33 + B3),R2+2,6); - - // note: cross product axes need to be scaled when s is computed. - // normal (n1,n2,n3) is relative to box 1. -#undef TEST -#define TEST(expr1,expr2,n1,n2,n3,cc) \ - s2 = dFabs(expr1) - (expr2); \ - if (s2 > 0) return 0; \ - l = dSqrt ((n1)*(n1) + (n2)*(n2) + (n3)*(n3)); \ - if (l > 0) { \ - s2 /= l; \ - if (s2 > s) { \ - s = s2; \ - normalR = 0; \ - normalC[0] = (n1)/l; normalC[1] = (n2)/l; normalC[2] = (n3)/l; \ - invert_normal = ((expr1) < 0); \ - *code = (cc); \ - } \ - } - - // separating axis = u1 x (v1,v2,v3) - TEST(pp[2]*R21-pp[1]*R31,(A2*Q31+A3*Q21+B2*Q13+B3*Q12),0,-R31,R21,7); - TEST(pp[2]*R22-pp[1]*R32,(A2*Q32+A3*Q22+B1*Q13+B3*Q11),0,-R32,R22,8); - TEST(pp[2]*R23-pp[1]*R33,(A2*Q33+A3*Q23+B1*Q12+B2*Q11),0,-R33,R23,9); - - // separating axis = u2 x (v1,v2,v3) - TEST(pp[0]*R31-pp[2]*R11,(A1*Q31+A3*Q11+B2*Q23+B3*Q22),R31,0,-R11,10); - TEST(pp[0]*R32-pp[2]*R12,(A1*Q32+A3*Q12+B1*Q23+B3*Q21),R32,0,-R12,11); - TEST(pp[0]*R33-pp[2]*R13,(A1*Q33+A3*Q13+B1*Q22+B2*Q21),R33,0,-R13,12); - - // separating axis = u3 x (v1,v2,v3) - TEST(pp[1]*R11-pp[0]*R21,(A1*Q21+A2*Q11+B2*Q33+B3*Q32),-R21,R11,0,13); - TEST(pp[1]*R12-pp[0]*R22,(A1*Q22+A2*Q12+B1*Q33+B3*Q31),-R22,R12,0,14); - TEST(pp[1]*R13-pp[0]*R23,(A1*Q23+A2*Q13+B1*Q32+B2*Q31),-R23,R13,0,15); - -#undef TEST - - // if we get to this point, the boxes interpenetrate. compute the normal - // in global coordinates. - if (normalR) { - normal[0] = normalR[0]; - normal[1] = normalR[4]; - normal[2] = normalR[8]; - } - else { - dMULTIPLY0_331 (normal,R1,normalC); - } - if (invert_normal) { - normal[0] = -normal[0]; - normal[1] = -normal[1]; - normal[2] = -normal[2]; - } - *depth = -s; - - // compute contact point(s) - - if (*code > 6) { - // an edge from box 1 touches an edge from box 2. - // find a point pa on the intersecting edge of box 1 - dVector3 pa; - dReal sign; - for (i=0; i<3; i++) pa[i] = p1[i]; - sign = (dDOT14(normal,R1+0) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) pa[i] += sign * A1 * R1[i*4]; - sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) pa[i] += sign * A2 * R1[i*4+1]; - sign = (dDOT14(normal,R1+2) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) pa[i] += sign * A3 * R1[i*4+2]; - - // find a point pb on the intersecting edge of box 2 - dVector3 pb; - for (i=0; i<3; i++) pb[i] = p2[i]; - sign = (dDOT14(normal,R2+0) > 0) ? REAL(-1.0) : REAL(1.0); - for (i=0; i<3; i++) pb[i] += sign * B1 * R2[i*4]; - sign = (dDOT14(normal,R2+1) > 0) ? REAL(-1.0) : REAL(1.0); - for (i=0; i<3; i++) pb[i] += sign * B2 * R2[i*4+1]; - sign = (dDOT14(normal,R2+2) > 0) ? REAL(-1.0) : REAL(1.0); - for (i=0; i<3; i++) pb[i] += sign * B3 * R2[i*4+2]; - - dReal alpha,beta; - dVector3 ua,ub; - for (i=0; i<3; i++) ua[i] = R1[((*code)-7)/3 + i*4]; - for (i=0; i<3; i++) ub[i] = R2[((*code)-7)%3 + i*4]; - - lineClosestApproach (pa,ua,pb,ub,&alpha,&beta); - for (i=0; i<3; i++) pa[i] += ua[i]*alpha; - for (i=0; i<3; i++) pb[i] += ub[i]*beta; - - for (i=0; i<3; i++) contact[0].pos[i] = REAL(0.5)*(pa[i]+pb[i]); - contact[0].depth = *depth; - return 1; - } - - // okay, we have a face-something intersection (because the separating - // axis is perpendicular to a face). - - // @@@ temporary: make deepest vertex on the "other" box the contact point. - // @@@ this kind of works, but we need multiple contact points for stability, - // @@@ especially for face-face contact. - - dVector3 vertex; - if (*code <= 3) { - // face from box 1 touches a vertex/edge/face from box 2. - dReal sign; - for (i=0; i<3; i++) vertex[i] = p2[i]; - sign = (dDOT14(normal,R2+0) > 0) ? REAL(-1.0) : REAL(1.0); - for (i=0; i<3; i++) vertex[i] += sign * B1 * R2[i*4]; - sign = (dDOT14(normal,R2+1) > 0) ? REAL(-1.0) : REAL(1.0); - for (i=0; i<3; i++) vertex[i] += sign * B2 * R2[i*4+1]; - sign = (dDOT14(normal,R2+2) > 0) ? REAL(-1.0) : REAL(1.0); - for (i=0; i<3; i++) vertex[i] += sign * B3 * R2[i*4+2]; - } - else { - // face from box 2 touches a vertex/edge/face from box 1. - dReal sign; - for (i=0; i<3; i++) vertex[i] = p1[i]; - sign = (dDOT14(normal,R1+0) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) vertex[i] += sign * A1 * R1[i*4]; - sign = (dDOT14(normal,R1+1) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) vertex[i] += sign * A2 * R1[i*4+1]; - sign = (dDOT14(normal,R1+2) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) vertex[i] += sign * A3 * R1[i*4+2]; - } - for (i=0; i<3; i++) contact[0].pos[i] = vertex[i]; - contact[0].depth = *depth; - return 1; -} - -//**************************************************************************** -// general support for geometry objects and classes - -struct dColliderEntry { - dColliderFn *fn; // collider function - int mode; // 1 = reverse o1 and o2, 2 = no function available -}; - -static dArray *classes=0; - -// function pointers and modes for n^2 class collider functions. this is an -// n*n matrix stored by row. the functions pointers are extracted from the -// class get-collider-function function. -static dArray *colliders=0; - - -static inline void initCollisionArrays() -{ - if (classes==0) { - // old way: - // classes = (dArray *) dAllocNoFree (sizeof(dArrayBase)); - // classes->constructor(); - classes = new dArray; - classes->setSize (1); // force allocation of array data memory - dAllocDontReport (classes); - dAllocDontReport (classes->data()); - classes->setSize (0); - } - if (colliders==0) { - // old way: - // colliders=(dArray *)dAllocNoFree (sizeof(dArrayBase)); - // colliders->constructor(); - colliders = new dArray; - colliders->setSize (1); // force allocation of array data memory - dAllocDontReport (colliders); - dAllocDontReport (colliders->data()); - colliders->setSize (0); - } -} - - -int dCreateGeomClass (const dGeomClass *c) -{ - dUASSERT(c && c->bytes >= 0 && c->collider && c->aabb,"bad geom class"); - initCollisionArrays(); - - int n = classes->size(); - dxGeomClass *gc = (dxGeomClass*) dAlloc (sizeof(dxGeomClass)); - dAllocDontReport (gc); - gc->collider = c->collider; - gc->aabb = c->aabb; - gc->aabb_test = c->aabb_test; - gc->dtor = c->dtor; - gc->num = n; - gc->size = SIZEOF_DXGEOM + c->bytes; - classes->push (gc); - - // make room for n^2 class collider function pointers - these entries will - // be filled as dCollide() is called. - colliders->setSize ((n+1)*(n+1)); - memset (colliders->data(),0,(n+1)*(n+1)*sizeof(dColliderEntry)); - - return n; -} - - -int dCollide (dxGeom *o1, dxGeom *o2, int flags, dContactGeom *contact, - int skip) -{ - int i,c1,c2,a1,a2,count,swap; - dColliderFn *fn; - dAASSERT(o1 && o2 && contact); - dUASSERT(classes && colliders,"no registered geometry classes"); - - // no contacts if both geoms on the same body, and the body is not 0 - if (o1->body == o2->body && o1->body) return 0; - - dColliderEntry *colliders2 = colliders->data(); - c1 = o1->_class->num; - c2 = o2->_class->num; - a1 = c1 * classes->size() + c2; // address 1 in collider array - a2 = c2 * classes->size() + c1; // address 2 in collider array - swap = 0; // set to 1 to swap normals before returning - - // return if there are no collider functions available - if ((colliders2[a1].mode==2) || (colliders2[a2].mode==2)) return 0; - - if ((fn = colliders2[a1].fn)) { - swap = colliders2[a1].mode; - if (swap) count = (*fn) (o2,o1,flags,contact,skip); - else count = (*fn) (o1,o2,flags,contact,skip); - } - else if ((fn = (*classes)[c1]->collider (c2))) { - colliders2 [a2].fn = fn; - colliders2 [a2].mode = 1; - colliders2 [a1].fn = fn; // do mode=0 assignment second so that - colliders2 [a1].mode = 0; // diagonal entries will have mode 0 - count = (*fn) (o1,o2,flags,contact,skip); - swap = 0; - } - else if ((fn = (*classes)[c2]->collider (c1))) { - colliders2 [a1].fn = fn; - colliders2 [a1].mode = 1; - colliders2 [a2].fn = fn; // do mode=0 assignment second so that - colliders2 [a2].mode = 0; // diagonal entries will have mode 0 - count = (*fn) (o2,o1,flags,contact,skip); - swap = 1; - } - else { - colliders2[a1].mode = 2; - colliders2[a2].mode = 2; - return 0; - } - - if (swap) { - for (i=0; inormal[0] = -c->normal[0]; - c->normal[1] = -c->normal[1]; - c->normal[2] = -c->normal[2]; - dxGeom *tmp = c->g1; - c->g1 = c->g2; - c->g2 = tmp; - } - } - - return count; -} - - -int dGeomGetClass (dxGeom *g) -{ - dAASSERT (g); - return g->_class->num; -} - - -void dGeomSetData (dxGeom *g, void *data) -{ - dAASSERT (g); - g->data = data; -} - - -void *dGeomGetData (dxGeom *g) -{ - dAASSERT (g); - return g->data; -} - - -void dGeomSetBody (dxGeom *g, dBodyID b) -{ - dAASSERT (g); - if (b) { - if (!g->body) dFree (g->pos,sizeof(dxPosR)); - g->body = b; - g->pos = b->pos; - g->R = b->R; - } - else { - if (g->body) { - dxPosR *pr = (dxPosR*) dAlloc (sizeof(dxPosR)); - g->pos = pr->pos; - g->R = pr->R; - memcpy (g->pos,g->body->pos,sizeof(g->pos)); - memcpy (g->R,g->body->R,sizeof(g->R)); - g->body = 0; - } - } -} - - -dBodyID dGeomGetBody (dxGeom *g) -{ - dAASSERT (g); - return g->body; -} - - -void dGeomSetPosition (dxGeom *g, dReal x, dReal y, dReal z) -{ - dAASSERT (g); - if (g->body) dBodySetPosition (g->body,x,y,z); - else { - g->pos[0] = x; - g->pos[1] = y; - g->pos[2] = z; - } -} - - -void dGeomSetRotation (dxGeom *g, const dMatrix3 R) -{ - dAASSERT (g); - if (g->body) dBodySetRotation (g->body,R); - else memcpy (g->R,R,sizeof(dMatrix3)); -} - - -const dReal * dGeomGetPosition (dxGeom *g) -{ - dAASSERT (g); - return g->pos; -} - - -const dReal * dGeomGetRotation (dxGeom *g) -{ - dAASSERT (g); - return g->R; -} - - -// for external use only. use the CLASSDATA macro inside ODE. - -void * dGeomGetClassData (dxGeom *g) -{ - dAASSERT (g); - return (void*) CLASSDATA(g); -} - - -dxGeom * dCreateGeom (int classnum) -{ - dUASSERT (classes && colliders && classnum >= 0 && - classnum < classes->size(),"bad class number"); - int size = (*classes)[classnum]->size; - dxGeom *geom = (dxGeom*) dAlloc (size); - memset (geom,0,size); // everything is initially zeroed - - geom->_class = (*classes)[classnum]; - geom->data = 0; - geom->body = 0; - - dxPosR *pr = (dxPosR*) dAlloc (sizeof(dxPosR)); - geom->pos = pr->pos; - geom->R = pr->R; - dSetZero (geom->pos,4); - dRSetIdentity (geom->R); - - return geom; -} - - -void dGeomDestroy (dxGeom *g) -{ - dAASSERT (g); - if (g->spaceid) dSpaceRemove (g->spaceid,g); - if (g->_class->dtor) g->_class->dtor (g); - if (!g->body) dFree (g->pos,sizeof(dxPosR)); - dFree (g,g->_class->size); -} - - -void dGeomGetAABB (dxGeom *g, dReal aabb[6]) -{ - dAASSERT (g); - g->_class->aabb (g,aabb); -} - - -dReal *dGeomGetSpaceAABB (dxGeom *g) -{ - dAASSERT (g); - return g->space_aabb; -} - -//**************************************************************************** -// data for the standard classes - -struct dxSphere { - dReal radius; // sphere radius -}; - -struct dxBox { - dVector3 side; // side lengths (x,y,z) -}; - -struct dxCCylinder { // capped cylinder - dReal radius,lz; // radius, length along z axis */ -}; - -struct dxPlane { - dReal p[4]; -}; - -struct dxGeomGroup { - dArray parts; // all the geoms that make up the group -}; - -//**************************************************************************** -// primitive collision functions -// same interface as dCollide(). -// S=sphere, B=box, C=capped cylinder, P=plane, G=group, T=transform - -int dCollideSS (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dSphereClass); - dIASSERT (o2->_class->num == dSphereClass); - dxSphere *s1 = (dxSphere*) CLASSDATA(o1); - dxSphere *s2 = (dxSphere*) CLASSDATA(o2); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - return dCollideSpheres (o1->pos,s1->radius, - o2->pos,s2->radius,contact); -} - - -int dCollideSB (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - // this is easy. get the sphere center `p' relative to the box, and then clip - // that to the boundary of the box (call that point `q'). if q is on the - // boundary of the box and |p-q| is <= sphere radius, they touch. - // if q is inside the box, the sphere is inside the box, so set a contact - // normal to push the sphere to the closest box edge. - - dVector3 l,t,p,q,r; - dReal depth; - int onborder = 0; - - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dSphereClass); - dIASSERT (o2->_class->num == dBoxClass); - dxSphere *sphere = (dxSphere*) CLASSDATA(o1); - dxBox *box = (dxBox*) CLASSDATA(o2); - - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - - p[0] = o1->pos[0] - o2->pos[0]; - p[1] = o1->pos[1] - o2->pos[1]; - p[2] = o1->pos[2] - o2->pos[2]; - - l[0] = box->side[0]*REAL(0.5); - t[0] = dDOT14(p,o2->R); - if (t[0] < -l[0]) { t[0] = -l[0]; onborder = 1; } - if (t[0] > l[0]) { t[0] = l[0]; onborder = 1; } - - l[1] = box->side[1]*REAL(0.5); - t[1] = dDOT14(p,o2->R+1); - if (t[1] < -l[1]) { t[1] = -l[1]; onborder = 1; } - if (t[1] > l[1]) { t[1] = l[1]; onborder = 1; } - - t[2] = dDOT14(p,o2->R+2); - l[2] = box->side[2]*REAL(0.5); - if (t[2] < -l[2]) { t[2] = -l[2]; onborder = 1; } - if (t[2] > l[2]) { t[2] = l[2]; onborder = 1; } - - if (!onborder) { - // sphere center inside box. find largest `t' value - dReal max = dFabs(t[0]); - int maxi = 0; - for (int i=1; i<3; i++) { - dReal tt = dFabs(t[i]); - if (tt > max) { - max = tt; - maxi = i; - } - } - // contact position = sphere center - contact->pos[0] = o1->pos[0]; - contact->pos[1] = o1->pos[1]; - contact->pos[2] = o1->pos[2]; - // contact normal aligned with box edge along largest `t' value - dVector3 tmp; - tmp[0] = 0; - tmp[1] = 0; - tmp[2] = 0; - tmp[maxi] = (t[maxi] > 0) ? REAL(1.0) : REAL(-1.0); - dMULTIPLY0_331 (contact->normal,o2->R,tmp); - // contact depth = distance to wall along normal plus radius - contact->depth = l[maxi] - max + sphere->radius; - return 1; - } - - t[3] = 0; //@@@ hmmm - dMULTIPLY0_331 (q,o2->R,t); - r[0] = p[0] - q[0]; - r[1] = p[1] - q[1]; - r[2] = p[2] - q[2]; - depth = sphere->radius - dSqrt(dDOT(r,r)); - if (depth < 0) return 0; - contact->pos[0] = q[0] + o2->pos[0]; - contact->pos[1] = q[1] + o2->pos[1]; - contact->pos[2] = q[2] + o2->pos[2]; - contact->normal[0] = r[0]; - contact->normal[1] = r[1]; - contact->normal[2] = r[2]; - dNormalize3 (contact->normal); - contact->depth = depth; - return 1; -} - - -int dCollideSP (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dSphereClass); - dIASSERT (o2->_class->num == dPlaneClass); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - dxSphere *sphere = (dxSphere*) CLASSDATA(o1); - dxPlane *plane = (dxPlane*) CLASSDATA(o2); - dReal k = dDOT (o1->pos,plane->p); - dReal depth = plane->p[3] - k + sphere->radius; - if (depth >= 0) { - contact->normal[0] = plane->p[0]; - contact->normal[1] = plane->p[1]; - contact->normal[2] = plane->p[2]; - contact->pos[0] = o1->pos[0] - plane->p[0] * sphere->radius; - contact->pos[1] = o1->pos[1] - plane->p[1] * sphere->radius; - contact->pos[2] = o1->pos[2] - plane->p[2] * sphere->radius; - contact->depth = depth; - return 1; - } - else return 0; -} - - -int dCollideBB (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dVector3 normal; - dReal depth; - int code; - dxBox *b1 = (dxBox*) CLASSDATA(o1); - dxBox *b2 = (dxBox*) CLASSDATA(o2); - int num = dBoxBox (o1->pos,o1->R,b1->side, o2->pos,o2->R,b2->side, - normal,&depth,&code,flags & NUMC_MASK,contact,skip); - for (int i=0; inormal[0] = -normal[0]; - CONTACT(contact,i*skip)->normal[1] = -normal[1]; - CONTACT(contact,i*skip)->normal[2] = -normal[2]; - CONTACT(contact,i*skip)->g1 = const_cast (o1); - CONTACT(contact,i*skip)->g2 = const_cast (o2); - } - return num; -} - - -int dCollideBP (const dxGeom *o1, const dxGeom *o2, - int flags, dContactGeom *contact, int skip) -{ - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dBoxClass); - dIASSERT (o2->_class->num == dPlaneClass); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - dxBox *box = (dxBox*) CLASSDATA(o1); - dxPlane *plane = (dxPlane*) CLASSDATA(o2); - int ret = 0; - - //@@@ problem: using 4-vector (plane->p) as 3-vector (normal). - const dReal *R = o1->R; // rotation of box - const dReal *n = plane->p; // normal vector - - // project sides lengths along normal vector, get absolute values - dReal Q1 = dDOT14(n,R+0); - dReal Q2 = dDOT14(n,R+1); - dReal Q3 = dDOT14(n,R+2); - dReal A1 = box->side[0] * Q1; - dReal A2 = box->side[1] * Q2; - dReal A3 = box->side[2] * Q3; - dReal B1 = dFabs(A1); - dReal B2 = dFabs(A2); - dReal B3 = dFabs(A3); - - // early exit test - dReal depth = plane->p[3] + REAL(0.5)*(B1+B2+B3) - dDOT(n,o1->pos); - if (depth < 0) return 0; - - // find number of contacts requested - int maxc = flags & NUMC_MASK; - if (maxc < 1) maxc = 1; - if (maxc > 3) maxc = 3; // no more than 3 contacts per box allowed - - // find deepest point - dVector3 p; - p[0] = o1->pos[0]; - p[1] = o1->pos[1]; - p[2] = o1->pos[2]; -#define FOO(i,op) \ - p[0] op REAL(0.5)*box->side[i] * R[0+i]; \ - p[1] op REAL(0.5)*box->side[i] * R[4+i]; \ - p[2] op REAL(0.5)*box->side[i] * R[8+i]; -#define BAR(i,iinc) if (A ## iinc > 0) { FOO(i,-=) } else { FOO(i,+=) } - BAR(0,1); - BAR(1,2); - BAR(2,3); -#undef FOO -#undef BAR - - // the deepest point is the first contact point - contact->pos[0] = p[0]; - contact->pos[1] = p[1]; - contact->pos[2] = p[2]; - contact->normal[0] = n[0]; - contact->normal[1] = n[1]; - contact->normal[2] = n[2]; - contact->depth = depth; - ret = 1; // ret is number of contact points found so far - if (maxc == 1) goto done; - - // get the second and third contact points by starting from `p' and going - // along the two sides with the smallest projected length. - -#define FOO(i,j,op) \ - CONTACT(contact,i*skip)->pos[0] = p[0] op box->side[j] * R[0+j]; \ - CONTACT(contact,i*skip)->pos[1] = p[1] op box->side[j] * R[4+j]; \ - CONTACT(contact,i*skip)->pos[2] = p[2] op box->side[j] * R[8+j]; -#define BAR(ctact,side,sideinc) \ - depth -= B ## sideinc; \ - if (depth < 0) goto done; \ - if (A ## sideinc > 0) { FOO(ctact,side,+) } else { FOO(ctact,side,-) } \ - CONTACT(contact,ctact*skip)->depth = depth; \ - ret++; - - CONTACT(contact,skip)->normal[0] = n[0]; - CONTACT(contact,skip)->normal[1] = n[1]; - CONTACT(contact,skip)->normal[2] = n[2]; - if (maxc == 3) { - CONTACT(contact,2*skip)->normal[0] = n[0]; - CONTACT(contact,2*skip)->normal[1] = n[1]; - CONTACT(contact,2*skip)->normal[2] = n[2]; - } - - if (B1 < B2) { - if (B3 < B1) goto use_side_3; else { - BAR(1,0,1); // use side 1 - if (maxc == 2) goto done; - if (B2 < B3) goto contact2_2; else goto contact2_3; - } - } - else { - if (B3 < B2) { - use_side_3: // use side 3 - BAR(1,2,3); - if (maxc == 2) goto done; - if (B1 < B2) goto contact2_1; else goto contact2_2; - } - else { - BAR(1,1,2); // use side 2 - if (maxc == 2) goto done; - if (B1 < B3) goto contact2_1; else goto contact2_3; - } - } - - contact2_1: BAR(2,0,1); goto done; - contact2_2: BAR(2,1,2); goto done; - contact2_3: BAR(2,2,3); goto done; -#undef FOO -#undef BAR - - done: - for (int i=0; ig1 = const_cast (o1); - CONTACT(contact,i*skip)->g2 = const_cast (o2); - } - return ret; -} - - -int dCollideCS (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dCCylinderClass); - dIASSERT (o2->_class->num == dSphereClass); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - dxCCylinder *ccyl = (dxCCylinder*) CLASSDATA(o1); - dxSphere *sphere = (dxSphere*) CLASSDATA(o2); - - // find the point on the cylinder axis that is closest to the sphere - dReal alpha = - o1->R[2] * (o2->pos[0] - o1->pos[0]) + - o1->R[6] * (o2->pos[1] - o1->pos[1]) + - o1->R[10] * (o2->pos[2] - o1->pos[2]); - dReal lz2 = ccyl->lz * REAL(0.5); - if (alpha > lz2) alpha = lz2; - if (alpha < -lz2) alpha = -lz2; - - // collide the spheres - dVector3 p; - p[0] = o1->pos[0] + alpha * o1->R[2]; - p[1] = o1->pos[1] + alpha * o1->R[6]; - p[2] = o1->pos[2] + alpha * o1->R[10]; - return dCollideSpheres (p,ccyl->radius,o2->pos,sphere->radius,contact); -} - - -int dCollideCB (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dCCylinderClass); - dIASSERT (o2->_class->num == dBoxClass); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - dxCCylinder *cyl = (dxCCylinder*) CLASSDATA(o1); - dxBox *box = (dxBox*) CLASSDATA(o2); - - // get p1,p2 = cylinder axis endpoints, get radius - dVector3 p1,p2; - dReal clen = cyl->lz * REAL(0.5); - p1[0] = o1->pos[0] + clen * o1->R[2]; - p1[1] = o1->pos[1] + clen * o1->R[6]; - p1[2] = o1->pos[2] + clen * o1->R[10]; - p2[0] = o1->pos[0] - clen * o1->R[2]; - p2[1] = o1->pos[1] - clen * o1->R[6]; - p2[2] = o1->pos[2] - clen * o1->R[10]; - dReal radius = cyl->radius; - - // copy out box center, rotation matrix, and side array - dReal *c = o2->pos; - dReal *R = o2->R; - dReal *side = box->side; - - // get the closest point between the cylinder axis and the box - dVector3 pl,pb; - dClosestLineBoxPoints (p1,p2,c,R,side,pl,pb); - - // generate contact point - return dCollideSpheres (pl,radius,pb,0,contact); -} - - -// this returns at most one contact point when the two cylinder's axes are not -// aligned, and at most two (for stability) when they are aligned. -// the algorithm minimizes the distance between two "sample spheres" that are -// positioned along the cylinder axes according to: -// sphere1 = pos1 + alpha1 * axis1 -// sphere2 = pos2 + alpha2 * axis2 -// alpha1 and alpha2 are limited to +/- half the length of the cylinders. -// the algorithm works by finding a solution that has both alphas free, or -// a solution that has one or both alphas fixed to the ends of the cylinder. - -int dCollideCC (const dxGeom *o1, const dxGeom *o2, - int flags, dContactGeom *contact, int skip) -{ - int i; - const dReal tolerance = REAL(1e-5); - - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dCCylinderClass); - dIASSERT (o2->_class->num == dCCylinderClass); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - dxCCylinder *cyl1 = (dxCCylinder*) CLASSDATA(o1); - dxCCylinder *cyl2 = (dxCCylinder*) CLASSDATA(o2); - - // copy out some variables, for convenience - dReal lz1 = cyl1->lz * REAL(0.5); - dReal lz2 = cyl2->lz * REAL(0.5); - dReal *pos1 = o1->pos; - dReal *pos2 = o2->pos; - dReal axis1[3],axis2[3]; - axis1[0] = o1->R[2]; - axis1[1] = o1->R[6]; - axis1[2] = o1->R[10]; - axis2[0] = o2->R[2]; - axis2[1] = o2->R[6]; - axis2[2] = o2->R[10]; - - dReal alpha1,alpha2,sphere1[3],sphere2[3]; - int fix1 = 0; // 0 if alpha1 is free, +/-1 to fix at +/- lz1 - int fix2 = 0; // 0 if alpha2 is free, +/-1 to fix at +/- lz2 - - for (int count=0; count<9; count++) { - // find a trial solution by fixing or not fixing the alphas - if (fix1) { - if (fix2) { - // alpha1 and alpha2 are fixed, so the solution is easy - if (fix1 > 0) alpha1 = lz1; else alpha1 = -lz1; - if (fix2 > 0) alpha2 = lz2; else alpha2 = -lz2; - for (i=0; i<3; i++) sphere1[i] = pos1[i] + alpha1*axis1[i]; - for (i=0; i<3; i++) sphere2[i] = pos2[i] + alpha2*axis2[i]; - } - else { - // fix alpha1 but let alpha2 be free - if (fix1 > 0) alpha1 = lz1; else alpha1 = -lz1; - for (i=0; i<3; i++) sphere1[i] = pos1[i] + alpha1*axis1[i]; - alpha2 = (axis2[0]*(sphere1[0]-pos2[0]) + - axis2[1]*(sphere1[1]-pos2[1]) + - axis2[2]*(sphere1[2]-pos2[2])); - for (i=0; i<3; i++) sphere2[i] = pos2[i] + alpha2*axis2[i]; - } - } - else { - if (fix2) { - // fix alpha2 but let alpha1 be free - if (fix2 > 0) alpha2 = lz2; else alpha2 = -lz2; - for (i=0; i<3; i++) sphere2[i] = pos2[i] + alpha2*axis2[i]; - alpha1 = (axis1[0]*(sphere2[0]-pos1[0]) + - axis1[1]*(sphere2[1]-pos1[1]) + - axis1[2]*(sphere2[2]-pos1[2])); - for (i=0; i<3; i++) sphere1[i] = pos1[i] + alpha1*axis1[i]; - } - else { - // let alpha1 and alpha2 be free - // compute determinant of d(d^2)\d(alpha) jacobian - dReal a1a2 = dDOT (axis1,axis2); - dReal det = REAL(1.0)-a1a2*a1a2; - if (det < tolerance) { - // the cylinder axes (almost) parallel, so we will generate up to two - // contacts. the solution matrix is rank deficient so alpha1 and - // alpha2 are related by: - // alpha2 = alpha1 + (pos1-pos2)'*axis1 (if axis1==axis2) - // or alpha2 = -(alpha1 + (pos1-pos2)'*axis1) (if axis1==-axis2) - // first compute where the two cylinders overlap in alpha1 space: - if (a1a2 < 0) { - axis2[0] = -axis2[0]; - axis2[1] = -axis2[1]; - axis2[2] = -axis2[2]; - } - dReal q[3]; - for (i=0; i<3; i++) q[i] = pos1[i]-pos2[i]; - dReal k = dDOT (axis1,q); - dReal a1lo = -lz1; - dReal a1hi = lz1; - dReal a2lo = -lz2 - k; - dReal a2hi = lz2 - k; - dReal lo = (a1lo > a2lo) ? a1lo : a2lo; - dReal hi = (a1hi < a2hi) ? a1hi : a2hi; - if (lo <= hi) { - int num_contacts = flags & NUMC_MASK; - if (num_contacts >= 2 && lo < hi) { - // generate up to two contacts. if one of those contacts is - // not made, fall back on the one-contact strategy. - for (i=0; i<3; i++) sphere1[i] = pos1[i] + lo*axis1[i]; - for (i=0; i<3; i++) sphere2[i] = pos2[i] + (lo+k)*axis2[i]; - int n1 = dCollideSpheres (sphere1,cyl1->radius, - sphere2,cyl2->radius,contact); - if (n1) { - for (i=0; i<3; i++) sphere1[i] = pos1[i] + hi*axis1[i]; - for (i=0; i<3; i++) sphere2[i] = pos2[i] + (hi+k)*axis2[i]; - dContactGeom *c2 = CONTACT(contact,skip); - int n2 = dCollideSpheres (sphere1,cyl1->radius, - sphere2,cyl2->radius, c2); - if (n2) { - c2->g1 = const_cast (o1); - c2->g2 = const_cast (o2); - return 2; - } - } - } - - // just one contact to generate, so put it in the middle of - // the range - alpha1 = (lo + hi) * REAL(0.5); - alpha2 = alpha1 + k; - for (i=0; i<3; i++) sphere1[i] = pos1[i] + alpha1*axis1[i]; - for (i=0; i<3; i++) sphere2[i] = pos2[i] + alpha2*axis2[i]; - return dCollideSpheres (sphere1,cyl1->radius, - sphere2,cyl2->radius,contact); - } - else return 0; - } - det = REAL(1.0)/det; - dReal delta[3]; - for (i=0; i<3; i++) delta[i] = pos1[i] - pos2[i]; - dReal q1 = dDOT (delta,axis1); - dReal q2 = dDOT (delta,axis2); - alpha1 = det*(a1a2*q2-q1); - alpha2 = det*(q2-a1a2*q1); - for (i=0; i<3; i++) sphere1[i] = pos1[i] + alpha1*axis1[i]; - for (i=0; i<3; i++) sphere2[i] = pos2[i] + alpha2*axis2[i]; - } - } - - // if the alphas are outside their allowed ranges then fix them and - // try again - if (fix1==0) { - if (alpha1 < -lz1) { - fix1 = -1; - continue; - } - if (alpha1 > lz1) { - fix1 = 1; - continue; - } - } - if (fix2==0) { - if (alpha2 < -lz2) { - fix2 = -1; - continue; - } - if (alpha2 > lz2) { - fix2 = 1; - continue; - } - } - - // unfix the alpha variables if the local distance gradient indicates - // that we are not yet at the minimum - dReal tmp[3]; - for (i=0; i<3; i++) tmp[i] = sphere1[i] - sphere2[i]; - if (fix1) { - dReal gradient = dDOT (tmp,axis1); - if ((fix1 > 0 && gradient > 0) || (fix1 < 0 && gradient < 0)) { - fix1 = 0; - continue; - } - } - if (fix2) { - dReal gradient = -dDOT (tmp,axis2); - if ((fix2 > 0 && gradient > 0) || (fix2 < 0 && gradient < 0)) { - fix2 = 0; - continue; - } - } - return dCollideSpheres (sphere1,cyl1->radius,sphere2,cyl2->radius,contact); - } - // if we go through the loop too much, then give up. we should NEVER get to - // this point (i hope). - dMessage (0,"dCollideCC(): too many iterations"); - return 0; -} - - -int dCollideCP (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dCCylinderClass); - dIASSERT (o2->_class->num == dPlaneClass); - dxCCylinder *ccyl = (dxCCylinder*) CLASSDATA(o1); - dxPlane *plane = (dxPlane*) CLASSDATA(o2); - - // collide the deepest capping sphere with the plane - dReal sign = (dDOT14 (plane->p,o1->R+2) > 0) ? REAL(-1.0) : REAL(1.0); - dVector3 p; - p[0] = o1->pos[0] + o1->R[2] * ccyl->lz * REAL(0.5) * sign; - p[1] = o1->pos[1] + o1->R[6] * ccyl->lz * REAL(0.5) * sign; - p[2] = o1->pos[2] + o1->R[10] * ccyl->lz * REAL(0.5) * sign; - - dReal k = dDOT (p,plane->p); - dReal depth = plane->p[3] - k + ccyl->radius; - if (depth < 0) return 0; - contact->normal[0] = plane->p[0]; - contact->normal[1] = plane->p[1]; - contact->normal[2] = plane->p[2]; - contact->pos[0] = p[0] - plane->p[0] * ccyl->radius; - contact->pos[1] = p[1] - plane->p[1] * ccyl->radius; - contact->pos[2] = p[2] - plane->p[2] * ccyl->radius; - contact->depth = depth; - - int ncontacts = 1; - if ((flags & NUMC_MASK) >= 2) { - // collide the other capping sphere with the plane - p[0] = o1->pos[0] - o1->R[2] * ccyl->lz * REAL(0.5) * sign; - p[1] = o1->pos[1] - o1->R[6] * ccyl->lz * REAL(0.5) * sign; - p[2] = o1->pos[2] - o1->R[10] * ccyl->lz * REAL(0.5) * sign; - - k = dDOT (p,plane->p); - depth = plane->p[3] - k + ccyl->radius; - if (depth >= 0) { - dContactGeom *c2 = CONTACT(contact,skip); - c2->normal[0] = plane->p[0]; - c2->normal[1] = plane->p[1]; - c2->normal[2] = plane->p[2]; - c2->pos[0] = p[0] - plane->p[0] * ccyl->radius; - c2->pos[1] = p[1] - plane->p[1] * ccyl->radius; - c2->pos[2] = p[2] - plane->p[2] * ccyl->radius; - c2->depth = depth; - ncontacts = 2; - } - } - - for (int i=0; i < ncontacts; i++) { - CONTACT(contact,i*skip)->g1 = const_cast (o1); - CONTACT(contact,i*skip)->g2 = const_cast (o2); - } - return ncontacts; -} - - -// this collides a group with another geom. the other geom can also be a -// group, but this case is not handled specially. - -int dCollideG (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(o1); - int numleft = flags & NUMC_MASK; - if (numleft == 0) numleft = 1; - flags &= ~NUMC_MASK; - int num=0,i=0; - while (i < gr->parts.size() && numleft > 0) { - int n = dCollide (gr->parts[i],const_cast(o2), - flags | numleft,contact,skip); - contact = CONTACT (contact,skip*n); - numleft -= n; - num += n; - i++; - } - return num; -} - -//**************************************************************************** -// standard classes - -SHAREDLIBEXPORT int dSphereClass = -1; -SHAREDLIBEXPORT int dBoxClass = -1; -SHAREDLIBEXPORT int dCCylinderClass = -1; -SHAREDLIBEXPORT int dPlaneClass = -1; - - -static dColliderFn * dSphereColliderFn (int num) -{ - if (num == dSphereClass) return (dColliderFn *) &dCollideSS; - if (num == dBoxClass) return (dColliderFn *) &dCollideSB; - if (num == dPlaneClass) return (dColliderFn *) &dCollideSP; - return 0; -} - - -static void dSphereAABB (dxGeom *geom, dReal aabb[6]) -{ - dxSphere *s = (dxSphere*) CLASSDATA(geom); - aabb[0] = geom->pos[0] - s->radius; - aabb[1] = geom->pos[0] + s->radius; - aabb[2] = geom->pos[1] - s->radius; - aabb[3] = geom->pos[1] + s->radius; - aabb[4] = geom->pos[2] - s->radius; - aabb[5] = geom->pos[2] + s->radius; -} - - -static dColliderFn * dBoxColliderFn (int num) -{ - if (num == dBoxClass) return (dColliderFn *) &dCollideBB; - if (num == dPlaneClass) return (dColliderFn *) &dCollideBP; - return 0; -} - - -static void dBoxAABB (dxGeom *geom, dReal aabb[6]) -{ - dxBox *b = (dxBox*) CLASSDATA(geom); - dReal xrange = REAL(0.5) * (dFabs (geom->R[0] * b->side[0]) + - dFabs (geom->R[1] * b->side[1]) + dFabs (geom->R[2] * b->side[2])); - dReal yrange = REAL(0.5) * (dFabs (geom->R[4] * b->side[0]) + - dFabs (geom->R[5] * b->side[1]) + dFabs (geom->R[6] * b->side[2])); - dReal zrange = REAL(0.5) * (dFabs (geom->R[8] * b->side[0]) + - dFabs (geom->R[9] * b->side[1]) + dFabs (geom->R[10] * b->side[2])); - aabb[0] = geom->pos[0] - xrange; - aabb[1] = geom->pos[0] + xrange; - aabb[2] = geom->pos[1] - yrange; - aabb[3] = geom->pos[1] + yrange; - aabb[4] = geom->pos[2] - zrange; - aabb[5] = geom->pos[2] + zrange; -} - - -static dColliderFn * dCCylinderColliderFn (int num) -{ - if (num == dSphereClass) return (dColliderFn *) &dCollideCS; - if (num == dPlaneClass) return (dColliderFn *) &dCollideCP; - if (num == dCCylinderClass) return (dColliderFn *) &dCollideCC; - if (num == dBoxClass) return (dColliderFn *) &dCollideCB; - return 0; -} - - -static void dCCylinderAABB (dxGeom *geom, dReal aabb[6]) -{ - dxCCylinder *c = (dxCCylinder*) CLASSDATA(geom); - dReal xrange = dFabs(geom->R[2] * c->lz) * REAL(0.5) + c->radius; - dReal yrange = dFabs(geom->R[6] * c->lz) * REAL(0.5) + c->radius; - dReal zrange = dFabs(geom->R[10] * c->lz) * REAL(0.5) + c->radius; - aabb[0] = geom->pos[0] - xrange; - aabb[1] = geom->pos[0] + xrange; - aabb[2] = geom->pos[1] - yrange; - aabb[3] = geom->pos[1] + yrange; - aabb[4] = geom->pos[2] - zrange; - aabb[5] = geom->pos[2] + zrange; -} - - -dColliderFn * dPlaneColliderFn (int num) -{ - return 0; -} - - -static void dPlaneAABB (dxGeom *geom, dReal aabb[6]) -{ - // @@@ planes that have normal vectors aligned along an axis can use a - // @@@ less comprehensive bounding box. - aabb[0] = -dInfinity; - aabb[1] = dInfinity; - aabb[2] = -dInfinity; - aabb[3] = dInfinity; - aabb[4] = -dInfinity; - aabb[5] = dInfinity; -} - - -dxGeom *dCreateSphere (dSpaceID space, dReal radius) -{ - dAASSERT (radius > 0); - if (dSphereClass == -1) { - dGeomClass c; - c.bytes = sizeof (dxSphere); - c.collider = &dSphereColliderFn; - c.aabb = &dSphereAABB; - c.aabb_test = 0; - c.dtor = 0; - dSphereClass = dCreateGeomClass (&c); - } - - dxGeom *g = dCreateGeom (dSphereClass); - if (space) dSpaceAdd (space,g); - dxSphere *s = (dxSphere*) CLASSDATA(g); - s->radius = radius; - return g; -} - - -dxGeom *dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz) -{ - dAASSERT (lx > 0 && ly > 0 && lz > 0); - if (dBoxClass == -1) { - dGeomClass c; - c.bytes = sizeof (dxBox); - c.collider = &dBoxColliderFn; - c.aabb = &dBoxAABB; - c.aabb_test = 0; - c.dtor = 0; - dBoxClass = dCreateGeomClass (&c); - } - - dxGeom *g = dCreateGeom (dBoxClass); - if (space) dSpaceAdd (space,g); - dxBox *b = (dxBox*) CLASSDATA(g); - b->side[0] = lx; - b->side[1] = ly; - b->side[2] = lz; - return g; -} - - -dxGeom * dCreateCCylinder (dSpaceID space, dReal radius, dReal length) -{ - dAASSERT (radius > 0 && length > 0); - if (dCCylinderClass == -1) { - dGeomClass c; - c.bytes = sizeof (dxCCylinder); - c.collider = &dCCylinderColliderFn; - c.aabb = &dCCylinderAABB; - c.aabb_test = 0; - c.dtor = 0; - dCCylinderClass = dCreateGeomClass (&c); - } - - dxGeom *g = dCreateGeom (dCCylinderClass); - if (space) dSpaceAdd (space,g); - dxCCylinder *c = (dxCCylinder*) CLASSDATA(g); - c->radius = radius; - c->lz = length; - return g; -} - - -dxGeom *dCreatePlane (dSpaceID space, - dReal a, dReal b, dReal c, dReal d) -{ - if (dPlaneClass == -1) { - dGeomClass c; - c.bytes = sizeof (dxPlane); - c.collider = &dPlaneColliderFn; - c.aabb = &dPlaneAABB; - c.aabb_test = 0; - c.dtor = 0; - dPlaneClass = dCreateGeomClass (&c); - } - - dxGeom *g = dCreateGeom (dPlaneClass); - if (space) dSpaceAdd (space,g); - dxPlane *p = (dxPlane*) CLASSDATA(g); - - // make sure plane normal has unit length - dReal l = a*a + b*b + c*c; - if (l > 0) { - l = dRecipSqrt(l); - p->p[0] = a*l; - p->p[1] = b*l; - p->p[2] = c*l; - p->p[3] = d*l; - } - else { - p->p[0] = 1; - p->p[1] = 0; - p->p[2] = 0; - p->p[3] = 0; - } - return g; -} - - -void dGeomSphereSetRadius (dGeomID g, dReal radius) -{ - dUASSERT (g && g->_class->num == dSphereClass,"argument not a sphere"); - dAASSERT (radius > 0); - dxSphere *s = (dxSphere*) CLASSDATA(g); - s->radius = radius; -} - - -void dGeomBoxSetLengths (dGeomID g, dReal lx, dReal ly, dReal lz) -{ - dUASSERT (g && g->_class->num == dBoxClass,"argument not a box"); - dAASSERT (lx > 0 && ly > 0 && lz > 0); - dxBox *b = (dxBox*) CLASSDATA(g); - b->side[0] = lx; - b->side[1] = ly; - b->side[2] = lz; -} - - -void dGeomPlaneSetParams (dGeomID g, dReal a, dReal b, dReal c, dReal d) -{ - dUASSERT (g && g->_class->num == dPlaneClass,"argument not a plane"); - dxPlane *p = (dxPlane*) CLASSDATA(g); - p->p[0] = a; - p->p[1] = b; - p->p[2] = c; - p->p[3] = d; -} - - -void dGeomCCylinderSetParams (dGeomID g, dReal radius, dReal length) -{ - dUASSERT (g && g->_class->num == dCCylinderClass,"argument not a ccylinder"); - dAASSERT (radius > 0 && length > 0); - dxCCylinder *c = (dxCCylinder*) CLASSDATA(g); - c->radius = radius; - c->lz = length; -} - - -dReal dGeomSphereGetRadius (dGeomID g) -{ - dUASSERT (g && g->_class->num == dSphereClass,"argument not a sphere"); - dxSphere *s = (dxSphere*) CLASSDATA(g); - return s->radius; -} - - -void dGeomBoxGetLengths (dGeomID g, dVector3 result) -{ - dUASSERT (g && g->_class->num == dBoxClass,"argument not a box"); - dxBox *b = (dxBox*) CLASSDATA(g); - result[0] = b->side[0]; - result[1] = b->side[1]; - result[2] = b->side[2]; -} - - -void dGeomPlaneGetParams (dGeomID g, dVector4 result) -{ - dUASSERT (g && g->_class->num == dPlaneClass,"argument not a plane"); - dxPlane *p = (dxPlane*) CLASSDATA(g); - result[0] = p->p[0]; - result[1] = p->p[1]; - result[2] = p->p[2]; - result[3] = p->p[3]; -} - - -void dGeomCCylinderGetParams (dGeomID g, dReal *radius, dReal *length) -{ - dUASSERT (g && g->_class->num == dCCylinderClass,"argument not a ccylinder"); - dxCCylinder *c = (dxCCylinder*) CLASSDATA(g); - *radius = c->radius; - *length = c->lz; -} - -//**************************************************************************** -// geom group - -int dGeomGroupClass = -1; - -static dColliderFn * dGeomGroupColliderFn (int num) -{ - return (dColliderFn *) &dCollideG; -} - - -static void dGeomGroupAABB (dxGeom *geom, dReal aabb[6]) -{ - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(geom); - aabb[0] = dInfinity; - aabb[1] = -dInfinity; - aabb[2] = dInfinity; - aabb[3] = -dInfinity; - aabb[4] = dInfinity; - aabb[5] = -dInfinity; - int i,j; - for (i=0; i < gr->parts.size(); i++) { - dReal aabb2[6]; - gr->parts[i]->_class->aabb (gr->parts[i],aabb2); - for (j=0; j<6; j += 2) if (aabb2[j] < aabb[j]) aabb[j] = aabb2[j]; - for (j=1; j<6; j += 2) if (aabb2[j] > aabb[j]) aabb[j] = aabb2[j]; - } -} - - -static void dGeomGroupDtor (dxGeom *geom) -{ - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(geom); - gr->parts.~dArray(); -} - - -dxGeom *dCreateGeomGroup (dSpaceID space) -{ - if (dGeomGroupClass == -1) { - dGeomClass c; - c.bytes = sizeof (dxGeomGroup); - c.collider = &dGeomGroupColliderFn; - c.aabb = &dGeomGroupAABB; - c.aabb_test = 0; - c.dtor = &dGeomGroupDtor; - dGeomGroupClass = dCreateGeomClass (&c); - } - - dxGeom *g = dCreateGeom (dGeomGroupClass); - if (space) dSpaceAdd (space,g); - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(g); - gr->parts.constructor(); - return g; -} - - -void dGeomGroupAdd (dxGeom *g, dxGeom *x) -{ - dUASSERT (g && g->_class->num == dGeomGroupClass,"argument not a geomgroup"); - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(g); - gr->parts.push (x); -} - - -void dGeomGroupRemove (dxGeom *g, dxGeom *x) -{ - dUASSERT (g && g->_class->num == dGeomGroupClass,"argument not a geomgroup"); - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(g); - for (int i=0; i < gr->parts.size(); i++) { - if (gr->parts[i] == x) { - gr->parts.remove (i); - return; - } - } -} - - -int dGeomGroupGetNumGeoms (dxGeom *g) -{ - dUASSERT (g && g->_class->num == dGeomGroupClass,"argument not a geomgroup"); - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(g); - return gr->parts.size(); -} - - -dxGeom * dGeomGroupGetGeom (dxGeom *g, int i) -{ - dUASSERT (g && g->_class->num == dGeomGroupClass,"argument not a geomgroup"); - dxGeomGroup *gr = (dxGeomGroup*) CLASSDATA(g); - dAASSERT (i >= 0 && i < gr->parts.size()); - return gr->parts[i]; -} - -//**************************************************************************** -// transformed geom - -int dGeomTransformClass = -1; - -struct dxGeomTransform { - dxGeom *obj; // object that is being transformed - int cleanup; // 1 to destroy obj when destroyed - int infomode; // 1 to put Tx geom in dContactGeom g1 - dVector3 final_pos; // final tx (body tx + relative tx) of the object. - dMatrix3 final_R; // this is only set if the AABB function is called -}; // by space collision before the collide fn is called - - -// compute final pos and R for the encapsulated geom object - -static void compute_final_tx (const dxGeom *g) -{ - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - dMULTIPLY0_331 (tr->final_pos,g->R,tr->obj->pos); - tr->final_pos[0] += g->pos[0]; - tr->final_pos[1] += g->pos[1]; - tr->final_pos[2] += g->pos[2]; - dMULTIPLY0_333 (tr->final_R,g->R,tr->obj->R); -} - - - -// this collides a transformed geom with another geom. the other geom can -// also be a transformed geom, but this case is not handled specially. - -int dCollideT (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(o1); - if (!tr->obj) return 0; - dUASSERT (tr->obj->spaceid==0, - "GeomTransform encapsulated object must not be in a space"); - dUASSERT (tr->obj->body==0, - "GeomTransform encapsulated object must not be attach to a body"); - - // backup the relative pos and R pointers of the encapsulated geom object, - // and the body pointer - dReal *posbak = tr->obj->pos; - dReal *Rbak = tr->obj->R; - dxBody *bodybak = tr->obj->body; - - // compute temporary pos and R for the encapsulated geom object - if (!o1->space_aabb) compute_final_tx (o1); - tr->obj->pos = tr->final_pos; - tr->obj->R = tr->final_R; - tr->obj->body = o1->body; - - // do the collision - int n = dCollide (tr->obj,const_cast(o2),flags,contact,skip); - - // if required, adjust the 'g1' values in the generated contacts so that - // thay indicated the GeomTransform object instead of the encapsulated - // object. - if (tr->infomode) { - for (int i=0; ig1 = const_cast (o1); - } - } - - // restore the pos, R and body - tr->obj->pos = posbak; - tr->obj->R = Rbak; - tr->obj->body = bodybak; - return n; -} - - -static dColliderFn * dGeomTransformColliderFn (int num) -{ - return (dColliderFn *) &dCollideT; -} - - -static void dGeomTransformAABB (dxGeom *geom, dReal aabb[6]) -{ - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(geom); - if (!tr->obj) { - dSetZero (aabb,6); - return; - } - - // backup the relative pos and R pointers of the encapsulated geom object - dReal *posbak = tr->obj->pos; - dReal *Rbak = tr->obj->R; - - // compute temporary pos and R for the encapsulated geom object - compute_final_tx (geom); - tr->obj->pos = tr->final_pos; - tr->obj->R = tr->final_R; - - // compute the AABB - tr->obj->_class->aabb (tr->obj,aabb); - - // restore the pos and R - tr->obj->pos = posbak; - tr->obj->R = Rbak; -} - - -static void dGeomTransformDtor (dxGeom *geom) -{ - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(geom); - if (tr->obj && tr->cleanup) { - dGeomDestroy (tr->obj); - } -} - - -dxGeom *dCreateGeomTransform (dSpaceID space) -{ - if (dGeomTransformClass == -1) { - dGeomClass c; - c.bytes = sizeof (dxGeomTransform); - c.collider = &dGeomTransformColliderFn; - c.aabb = &dGeomTransformAABB; - c.aabb_test = 0; - c.dtor = dGeomTransformDtor; - dGeomTransformClass = dCreateGeomClass (&c); - } - - dxGeom *g = dCreateGeom (dGeomTransformClass); - if (space) dSpaceAdd (space,g); - - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - tr->obj = 0; - tr->cleanup = 0; - tr->infomode = 0; - dSetZero (tr->final_pos,4); - dRSetIdentity (tr->final_R); - - return g; -} - - -void dGeomTransformSetGeom (dxGeom *g, dxGeom *obj) -{ - dUASSERT (g && g->_class->num == dGeomTransformClass, - "argument not a geom transform"); - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - if (tr->obj && tr->cleanup) { - dGeomDestroy (tr->obj); - } - tr->obj = obj; -} - - -dxGeom * dGeomTransformGetGeom (dxGeom *g) -{ - dUASSERT (g && g->_class->num == dGeomTransformClass, - "argument not a geom transform"); - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - return tr->obj; -} - - -void dGeomTransformSetCleanup (dGeomID g, int mode) -{ - dUASSERT (g && g->_class->num == dGeomTransformClass, - "argument not a geom transform"); - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - tr->cleanup = mode; -} - - -int dGeomTransformGetCleanup (dGeomID g) -{ - dUASSERT (g && g->_class->num == dGeomTransformClass, - "argument not a geom transform"); - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - return tr->cleanup; -} - - -void dGeomTransformSetInfo (dGeomID g, int mode) -{ - dUASSERT (g && g->_class->num == dGeomTransformClass, - "argument not a geom transform"); - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - tr->infomode = mode; -} - - -int dGeomTransformGetInfo (dGeomID g) -{ - dUASSERT (g && g->_class->num == dGeomTransformClass, - "argument not a geom transform"); - dxGeomTransform *tr = (dxGeomTransform*) CLASSDATA(g); - return tr->infomode; -} - -//**************************************************************************** -// other utility functions - -void dInfiniteAABB (dxGeom *geom, dReal aabb[6]) -{ - aabb[0] = -dInfinity; - aabb[1] = dInfinity; - aabb[2] = -dInfinity; - aabb[3] = dInfinity; - aabb[4] = -dInfinity; - aabb[5] = dInfinity; -} - - -void dCloseODE() -{ - if (colliders) { - delete colliders; - colliders = 0; - } - if (classes) { - for (int i=0; i < classes->size(); i++) { - dFree ((*classes)[i], sizeof (dxGeomClass)); - } - delete classes; - classes = 0; - } - - // reset geom class vars - dSphereClass = -1; - dBoxClass = -1; - dCCylinderClass = -1; - dPlaneClass = -1; - dGeomGroupClass = -1; - dGeomTransformClass = -1; - - // if you're using contrib code you may want to uncomment the following: - // dTriListClass = -1; - // dRayClass = -1; -} diff --git a/extern/ode/dist/ode/src/geom_internal.h b/extern/ode/dist/ode/src/geom_internal.h deleted file mode 100644 index 63be589ffe0..00000000000 --- a/extern/ode/dist/ode/src/geom_internal.h +++ /dev/null @@ -1,83 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_GEOM_INTERNAL_H_ -#define _ODE_GEOM_INTERNAL_H_ - - -// mask for the number-of-contacts field in the dCollide() flags parameter -#define NUMC_MASK (0xffff) - - -// internal info for geometry class - -struct dxGeomClass { - dGetColliderFnFn *collider; - dGetAABBFn *aabb; - dAABBTestFn *aabb_test; - dGeomDtorFn *dtor; - int num; // class number - int size; // total size of object, including extra data area -}; - - -// position vector and rotation matrix for geometry objects that are not -// connected to bodies. - -struct dxPosR { - dVector3 pos; - dMatrix3 R; -}; - - -// common data for all geometry objects. the class-specific data area follows -// this structure. pos and R will either point to a separately allocated -// buffer (if body is 0 - pos points to the dxPosR object) or to the pos and -// R of the body (if body nonzero). - -struct dxGeom { // a dGeomID is a pointer to this - dxGeomClass *_class; // class of this object - void *data; // user data pointer - dBodyID body; // dynamics body associated with this object (if any) - dReal *pos; // pointer to object's position vector - dReal *R; // pointer to object's rotation matrix - dSpaceID spaceid; // the space this object is in - dGeomSpaceData space; // reserved for use by space this object is in - dReal *space_aabb; // ptr to aabb array held by dSpaceCollide() fn - // class-specific data follows here, with proper alignment. -}; - - -// this is the size of the dxGeom structure rounded up to a multiple of 16 -// bytes. any class specific data that comes after this will have the correct -// alignment. - -#define SIZEOF_DXGEOM dEFFICIENT_SIZE(sizeof(dxGeom)) - - -// given a pointer to a dxGeom, return a pointer to the class data that -// follows it. - -#define CLASSDATA(geomptr) (((char*)geomptr) + SIZEOF_DXGEOM) - -#endif - diff --git a/extern/ode/dist/ode/src/joint.cpp b/extern/ode/dist/ode/src/joint.cpp deleted file mode 100644 index 74e4c34cc71..00000000000 --- a/extern/ode/dist/ode/src/joint.cpp +++ /dev/null @@ -1,2160 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -design note: the general principle for giving a joint the option of connecting -to the static environment (i.e. the absolute frame) is to check the second -body (joint->node[1].body), and if it is zero then behave as if its body -transform is the identity. - -*/ - -#include -#include -#include -#include "joint.h" - -//**************************************************************************** -// externs - -extern "C" void dBodyAddTorque (dBodyID, dReal fx, dReal fy, dReal fz); -extern "C" void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz); - -//**************************************************************************** -// utility - -// set three "ball-and-socket" rows in the constraint equation, and the -// corresponding right hand side. - -static inline void setBall (dxJoint *joint, dxJoint::Info2 *info, - dVector3 anchor1, dVector3 anchor2) -{ - // anchor points in global coordinates with respect to body PORs. - dVector3 a1,a2; - - int s = info->rowskip; - - // set jacobian - info->J1l[0] = 1; - info->J1l[s+1] = 1; - info->J1l[2*s+2] = 1; - dMULTIPLY0_331 (a1,joint->node[0].body->R,anchor1); - dCROSSMAT (info->J1a,a1,s,-,+); - if (joint->node[1].body) { - info->J2l[0] = -1; - info->J2l[s+1] = -1; - info->J2l[2*s+2] = -1; - dMULTIPLY0_331 (a2,joint->node[1].body->R,anchor2); - dCROSSMAT (info->J2a,a2,s,+,-); - } - - // set right hand side - dReal k = info->fps * info->erp; - if (joint->node[1].body) { - for (int j=0; j<3; j++) { - info->c[j] = k * (a2[j] + joint->node[1].body->pos[j] - - a1[j] - joint->node[0].body->pos[j]); - } - } - else { - for (int j=0; j<3; j++) { - info->c[j] = k * (anchor2[j] - a1[j] - - joint->node[0].body->pos[j]); - } - } -} - - -// this is like setBall(), except that `axis' is a unit length vector -// (in global coordinates) that should be used for the first jacobian -// position row (the other two row vectors will be derived from this). -// `erp1' is the erp value to use along the axis. - -static inline void setBall2 (dxJoint *joint, dxJoint::Info2 *info, - dVector3 anchor1, dVector3 anchor2, - dVector3 axis, dReal erp1) -{ - // anchor points in global coordinates with respect to body PORs. - dVector3 a1,a2; - - int i,s = info->rowskip; - - // get vectors normal to the axis. in setBall() axis,q1,q2 is [1 0 0], - // [0 1 0] and [0 0 1], which makes everything much easier. - dVector3 q1,q2; - dPlaneSpace (axis,q1,q2); - - // set jacobian - for (i=0; i<3; i++) info->J1l[i] = axis[i]; - for (i=0; i<3; i++) info->J1l[s+i] = q1[i]; - for (i=0; i<3; i++) info->J1l[2*s+i] = q2[i]; - dMULTIPLY0_331 (a1,joint->node[0].body->R,anchor1); - dCROSS (info->J1a,=,a1,axis); - dCROSS (info->J1a+s,=,a1,q1); - dCROSS (info->J1a+2*s,=,a1,q2); - if (joint->node[1].body) { - for (i=0; i<3; i++) info->J2l[i] = -axis[i]; - for (i=0; i<3; i++) info->J2l[s+i] = -q1[i]; - for (i=0; i<3; i++) info->J2l[2*s+i] = -q2[i]; - dMULTIPLY0_331 (a2,joint->node[1].body->R,anchor2); - dCROSS (info->J2a,= -,a2,axis); - dCROSS (info->J2a+s,= -,a2,q1); - dCROSS (info->J2a+2*s,= -,a2,q2); - } - - // set right hand side - measure error along (axis,q1,q2) - dReal k1 = info->fps * erp1; - dReal k = info->fps * info->erp; - - for (i=0; i<3; i++) a1[i] += joint->node[0].body->pos[i]; - if (joint->node[1].body) { - for (i=0; i<3; i++) a2[i] += joint->node[1].body->pos[i]; - info->c[0] = k1 * (dDOT(axis,a2) - dDOT(axis,a1)); - info->c[1] = k * (dDOT(q1,a2) - dDOT(q1,a1)); - info->c[2] = k * (dDOT(q2,a2) - dDOT(q2,a1)); - } - else { - info->c[0] = k1 * (dDOT(axis,anchor2) - dDOT(axis,a1)); - info->c[1] = k * (dDOT(q1,anchor2) - dDOT(q1,a1)); - info->c[2] = k * (dDOT(q2,anchor2) - dDOT(q2,a1)); - } -} - - -// compute anchor points relative to bodies - -static void setAnchors (dxJoint *j, dReal x, dReal y, dReal z, - dVector3 anchor1, dVector3 anchor2) -{ - if (j->node[0].body) { - dReal q[4]; - q[0] = x - j->node[0].body->pos[0]; - q[1] = y - j->node[0].body->pos[1]; - q[2] = z - j->node[0].body->pos[2]; - q[3] = 0; - dMULTIPLY1_331 (anchor1,j->node[0].body->R,q); - if (j->node[1].body) { - q[0] = x - j->node[1].body->pos[0]; - q[1] = y - j->node[1].body->pos[1]; - q[2] = z - j->node[1].body->pos[2]; - q[3] = 0; - dMULTIPLY1_331 (anchor2,j->node[1].body->R,q); - } - else { - anchor2[0] = x; - anchor2[1] = y; - anchor2[2] = z; - } - } - anchor1[3] = 0; - anchor2[3] = 0; -} - - -// compute axes relative to bodies. axis2 can be 0 - -static void setAxes (dxJoint *j, dReal x, dReal y, dReal z, - dVector3 axis1, dVector3 axis2) -{ - if (j->node[0].body) { - dReal q[4]; - q[0] = x; - q[1] = y; - q[2] = z; - q[3] = 0; - dNormalize3 (q); - dMULTIPLY1_331 (axis1,j->node[0].body->R,q); - if (axis2) { - if (j->node[1].body) { - dMULTIPLY1_331 (axis2,j->node[1].body->R,q); - } - else { - axis2[0] = x; - axis2[1] = y; - axis2[2] = z; - } - axis2[3] = 0; - } - } - axis1[3] = 0; -} - - -static void getAnchor (dxJoint *j, dVector3 result, dVector3 anchor1) -{ - if (j->node[0].body) { - dMULTIPLY0_331 (result,j->node[0].body->R,anchor1); - result[0] += j->node[0].body->pos[0]; - result[1] += j->node[0].body->pos[1]; - result[2] += j->node[0].body->pos[2]; - } -} - - -static void getAxis (dxJoint *j, dVector3 result, dVector3 axis1) -{ - if (j->node[0].body) { - dMULTIPLY0_331 (result,j->node[0].body->R,axis1); - } -} - - -// given two bodies (body1,body2), the hinge axis that they are connected by -// w.r.t. body1 (axis), and the initial relative orientation between them -// (q_initial), return the relative rotation angle. the initial relative -// orientation corresponds to an angle of zero. if body2 is 0 then measure the -// angle between body1 and the static frame. -// -// this will not return the correct angle if the bodies rotate along any axis -// other than the given hinge axis. - -static dReal getHingeAngle (dxBody *body1, dxBody *body2, dVector3 axis, - dQuaternion q_initial) -{ - // the angle between the two bodies is extracted from the quaternion that - // represents the relative rotation between them. recall that a quaternion - // q is: - // [s,v] = [ cos(theta/2) , sin(theta/2) * u ] - // where s is a scalar and v is a 3-vector. u is a unit length axis and - // theta is a rotation along that axis. we can get theta/2 by: - // theta/2 = atan2 ( sin(theta/2) , cos(theta/2) ) - // but we can't get sin(theta/2) directly, only its absolute value, i.e.: - // |v| = |sin(theta/2)| * |u| - // = |sin(theta/2)| - // using this value will have a strange effect. recall that there are two - // quaternion representations of a given rotation, q and -q. typically as - // a body rotates along the axis it will go through a complete cycle using - // one representation and then the next cycle will use the other - // representation. this corresponds to u pointing in the direction of the - // hinge axis and then in the opposite direction. the result is that theta - // will appear to go "backwards" every other cycle. here is a fix: if u - // points "away" from the direction of the hinge (motor) axis (i.e. more - // than 90 degrees) then use -q instead of q. this represents the same - // rotation, but results in the cos(theta/2) value being sign inverted. - - // get qrel = relative rotation between the two bodies - dQuaternion qrel; - if (body2) { - dQuaternion qq; - dQMultiply1 (qq,body1->q,body2->q); - dQMultiply2 (qrel,qq,q_initial); - } - else { - // pretend body2->q is the identity - dQMultiply3 (qrel,body1->q,q_initial); - } - - // extract the angle from the quaternion. cost2 = cos(theta/2), - // sint2 = |sin(theta/2)| - dReal cost2 = qrel[0]; - dReal sint2 = dSqrt (qrel[1]*qrel[1]+qrel[2]*qrel[2]+qrel[3]*qrel[3]); - dReal theta = (dDOT(qrel+1,axis) >= 0) ? // @@@ padding assumptions - (2 * dAtan2(sint2,cost2)) : // if u points in direction of axis - (2 * dAtan2(sint2,-cost2)); // if u points in opposite direction - - // the angle we get will be between 0..2*pi, but we want to return angles - // between -pi..pi - if (theta > M_PI) theta -= 2*M_PI; - - // the angle we've just extracted has the wrong sign - theta = -theta; - - return theta; -} - -//**************************************************************************** -// dxJointLimitMotor - -void dxJointLimitMotor::init (dxWorld *world) -{ - vel = 0; - fmax = 0; - lostop = -dInfinity; - histop = dInfinity; - fudge_factor = 1; - normal_cfm = world->global_cfm; - stop_erp = world->global_erp; - stop_cfm = world->global_cfm; - bounce = 0; - limit = 0; - limit_err = 0; -} - - -void dxJointLimitMotor::set (int num, dReal value) -{ - switch (num) { - case dParamLoStop: - if (value <= histop) lostop = value; - break; - case dParamHiStop: - if (value >= lostop) histop = value; - break; - case dParamVel: - vel = value; - break; - case dParamFMax: - if (value >= 0) fmax = value; - break; - case dParamFudgeFactor: - if (value >= 0 && value <= 1) fudge_factor = value; - break; - case dParamBounce: - bounce = value; - break; - case dParamCFM: - normal_cfm = value; - break; - case dParamStopERP: - stop_erp = value; - break; - case dParamStopCFM: - stop_cfm = value; - break; - } -} - - -dReal dxJointLimitMotor::get (int num) -{ - switch (num) { - case dParamLoStop: return lostop; - case dParamHiStop: return histop; - case dParamVel: return vel; - case dParamFMax: return fmax; - case dParamFudgeFactor: return fudge_factor; - case dParamBounce: return bounce; - case dParamCFM: return normal_cfm; - case dParamStopERP: return stop_erp; - case dParamStopCFM: return stop_cfm; - default: return 0; - } -} - - -int dxJointLimitMotor::testRotationalLimit (dReal angle) -{ - if (angle <= lostop) { - limit = 1; - limit_err = angle - lostop; - return 1; - } - else if (angle >= histop) { - limit = 2; - limit_err = angle - histop; - return 1; - } - else { - limit = 0; - return 0; - } -} - - -int dxJointLimitMotor::addLimot (dxJoint *joint, - dxJoint::Info2 *info, int row, - dVector3 ax1, int rotational) -{ - int srow = row * info->rowskip; - - // if the joint is powered, or has joint limits, add in the extra row - int powered = fmax > 0; - if (powered || limit) { - dReal *J1 = rotational ? info->J1a : info->J1l; - dReal *J2 = rotational ? info->J2a : info->J2l; - - J1[srow+0] = ax1[0]; - J1[srow+1] = ax1[1]; - J1[srow+2] = ax1[2]; - if (joint->node[1].body) { - J2[srow+0] = -ax1[0]; - J2[srow+1] = -ax1[1]; - J2[srow+2] = -ax1[2]; - } - - // if we're limited low and high simultaneously, the joint motor is - // ineffective - if (limit && (lostop == histop)) powered = 0; - - if (powered) { - info->cfm[row] = normal_cfm; - if (! limit) { - info->c[row] = vel; - info->lo[row] = -fmax; - info->hi[row] = fmax; - } - else { - // the joint is at a limit, AND is being powered. if the joint is - // being powered into the limit then we apply the maximum motor force - // in that direction, because the motor is working against the - // immovable limit. if the joint is being powered away from the limit - // then we have problems because actually we need *two* lcp - // constraints to handle this case. so we fake it and apply some - // fraction of the maximum force. the fraction to use can be set as - // a fudge factor. - - dReal fm = fmax; - if (vel > 0) fm = -fm; - - // if we're powering away from the limit, apply the fudge factor - if ((limit==1 && vel > 0) || (limit==2 && vel < 0)) fm *= fudge_factor; - - if (rotational) { - dBodyAddTorque (joint->node[0].body,-fm*ax1[0],-fm*ax1[1], - -fm*ax1[2]); - if (joint->node[1].body) - dBodyAddTorque (joint->node[1].body,fm*ax1[0],fm*ax1[1],fm*ax1[2]); - } - else { - dBodyAddForce (joint->node[0].body,-fm*ax1[0],-fm*ax1[1],-fm*ax1[2]); - if (joint->node[1].body) - dBodyAddForce (joint->node[1].body,fm*ax1[0],fm*ax1[1],fm*ax1[2]); - } - } - } - - if (limit) { - dReal k = info->fps * stop_erp; - info->c[row] = -k * limit_err; - info->cfm[row] = stop_cfm; - - if (lostop == histop) { - // limited low and high simultaneously - info->lo[row] = -dInfinity; - info->hi[row] = dInfinity; - } - else { - if (limit == 1) { - // low limit - info->lo[row] = 0; - info->hi[row] = dInfinity; - } - else { - // high limit - info->lo[row] = -dInfinity; - info->hi[row] = 0; - } - - // deal with bounce - if (bounce > 0) { - // calculate joint velocity - dReal vel; - if (rotational) { - vel = dDOT(joint->node[0].body->avel,ax1); - if (joint->node[1].body) - vel -= dDOT(joint->node[1].body->avel,ax1); - } - else { - vel = dDOT(joint->node[0].body->lvel,ax1); - if (joint->node[1].body) - vel -= dDOT(joint->node[1].body->lvel,ax1); - } - - // only apply bounce if the velocity is incoming, and if the - // resulting c[] exceeds what we already have. - if (limit == 1) { - // low limit - if (vel < 0) { - dReal newc = -bounce * vel; - if (newc > info->c[row]) info->c[row] = newc; - } - } - else { - // high limit - all those computations are reversed - if (vel > 0) { - dReal newc = -bounce * vel; - if (newc < info->c[row]) info->c[row] = newc; - } - } - } - } - } - return 1; - } - else return 0; -} - -//**************************************************************************** -// ball and socket - -static void ballInit (dxJointBall *j) -{ - dSetZero (j->anchor1,4); - dSetZero (j->anchor2,4); -} - - -static void ballGetInfo1 (dxJointBall *j, dxJoint::Info1 *info) -{ - info->m = 3; - info->nub = 3; -} - - -static void ballGetInfo2 (dxJointBall *joint, dxJoint::Info2 *info) -{ - setBall (joint,info,joint->anchor1,joint->anchor2); -} - - -extern "C" void dJointSetBallAnchor (dxJointBall *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dball_vtable,"joint is not a ball"); - setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); -} - - -extern "C" void dJointGetBallAnchor (dxJointBall *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dball_vtable,"joint is not a ball"); - getAnchor (joint,result,joint->anchor1); -} - - -dxJoint::Vtable __dball_vtable = { - sizeof(dxJointBall), - (dxJoint::init_fn*) ballInit, - (dxJoint::getInfo1_fn*) ballGetInfo1, - (dxJoint::getInfo2_fn*) ballGetInfo2, - dJointTypeBall}; - -//**************************************************************************** -// hinge - -static void hingeInit (dxJointHinge *j) -{ - dSetZero (j->anchor1,4); - dSetZero (j->anchor2,4); - dSetZero (j->axis1,4); - j->axis1[0] = 1; - dSetZero (j->axis2,4); - j->axis2[0] = 1; - dSetZero (j->qrel,4); - j->limot.init (j->world); -} - - -static void hingeGetInfo1 (dxJointHinge *j, dxJoint::Info1 *info) -{ - info->nub = 5; - - // see if joint is powered - if (j->limot.fmax > 0) - info->m = 6; // powered hinge needs an extra constraint row - else info->m = 5; - - // see if we're at a joint limit. - if ((j->limot.lostop >= -M_PI || j->limot.histop <= M_PI) && - j->limot.lostop <= j->limot.histop) { - dReal angle = getHingeAngle (j->node[0].body,j->node[1].body,j->axis1, - j->qrel); - if (j->limot.testRotationalLimit (angle)) info->m = 6; - } -} - - -static void hingeGetInfo2 (dxJointHinge *joint, dxJoint::Info2 *info) -{ - // set the three ball-and-socket rows - setBall (joint,info,joint->anchor1,joint->anchor2); - - // set the two hinge rows. the hinge axis should be the only unconstrained - // rotational axis, the angular velocity of the two bodies perpendicular to - // the hinge axis should be equal. thus the constraint equations are - // p*w1 - p*w2 = 0 - // q*w1 - q*w2 = 0 - // where p and q are unit vectors normal to the hinge axis, and w1 and w2 - // are the angular velocity vectors of the two bodies. - - dVector3 ax1; // length 1 joint axis in global coordinates, from 1st body - dVector3 p,q; // plane space vectors for ax1 - dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); - dPlaneSpace (ax1,p,q); - - int s3=3*info->rowskip; - int s4=4*info->rowskip; - - info->J1a[s3+0] = p[0]; - info->J1a[s3+1] = p[1]; - info->J1a[s3+2] = p[2]; - info->J1a[s4+0] = q[0]; - info->J1a[s4+1] = q[1]; - info->J1a[s4+2] = q[2]; - - if (joint->node[1].body) { - info->J2a[s3+0] = -p[0]; - info->J2a[s3+1] = -p[1]; - info->J2a[s3+2] = -p[2]; - info->J2a[s4+0] = -q[0]; - info->J2a[s4+1] = -q[1]; - info->J2a[s4+2] = -q[2]; - } - - // compute the right hand side of the constraint equation. set relative - // body velocities along p and q to bring the hinge back into alignment. - // if ax1,ax2 are the unit length hinge axes as computed from body1 and - // body2, we need to rotate both bodies along the axis u = (ax1 x ax2). - // if `theta' is the angle between ax1 and ax2, we need an angular velocity - // along u to cover angle erp*theta in one step : - // |angular_velocity| = angle/time = erp*theta / stepsize - // = (erp*fps) * theta - // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2| - // = (erp*fps) * theta * (ax1 x ax2) / sin(theta) - // ...as ax1 and ax2 are unit length. if theta is smallish, - // theta ~= sin(theta), so - // angular_velocity = (erp*fps) * (ax1 x ax2) - // ax1 x ax2 is in the plane space of ax1, so we project the angular - // velocity to p and q to find the right hand side. - - dVector3 ax2,b; - if (joint->node[1].body) { - dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); - } - else { - ax2[0] = joint->axis2[0]; - ax2[1] = joint->axis2[1]; - ax2[2] = joint->axis2[2]; - } - dCROSS (b,=,ax1,ax2); - dReal k = info->fps * info->erp; - info->c[3] = k * dDOT(b,p); - info->c[4] = k * dDOT(b,q); - - // if the hinge is powered, or has joint limits, add in the stuff - joint->limot.addLimot (joint,info,5,ax1,1); -} - - -// compute initial relative rotation body1 -> body2, or env -> body1 - -static void hingeComputeInitialRelativeRotation (dxJointHinge *joint) -{ - if (joint->node[0].body) { - if (joint->node[1].body) { - dQMultiply1 (joint->qrel,joint->node[0].body->q,joint->node[1].body->q); - } - else { - // set joint->qrel to the transpose of the first body q - joint->qrel[0] = joint->node[0].body->q[0]; - for (int i=1; i<4; i++) joint->qrel[i] = -joint->node[0].body->q[i]; - } - } -} - - -extern "C" void dJointSetHingeAnchor (dxJointHinge *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); - hingeComputeInitialRelativeRotation (joint); -} - - -extern "C" void dJointSetHingeAxis (dxJointHinge *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - setAxes (joint,x,y,z,joint->axis1,joint->axis2); - hingeComputeInitialRelativeRotation (joint); -} - - -extern "C" void dJointGetHingeAnchor (dxJointHinge *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - getAnchor (joint,result,joint->anchor1); -} - - -extern "C" void dJointGetHingeAxis (dxJointHinge *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - getAxis (joint,result,joint->axis1); -} - - -extern "C" void dJointSetHingeParam (dxJointHinge *joint, - int parameter, dReal value) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - joint->limot.set (parameter,value); -} - - -extern "C" dReal dJointGetHingeParam (dxJointHinge *joint, int parameter) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - return joint->limot.get (parameter); -} - - -extern "C" dReal dJointGetHingeAngle (dxJointHinge *joint) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a hinge"); - if (joint->node[0].body) { - return getHingeAngle (joint->node[0].body,joint->node[1].body,joint->axis1, - joint->qrel); - } - else return 0; -} - - -extern "C" dReal dJointGetHingeAngleRate (dxJointHinge *joint) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__dhinge_vtable,"joint is not a Hinge"); - if (joint->node[0].body) { - dVector3 axis; - dMULTIPLY0_331 (axis,joint->node[0].body->R,joint->axis1); - dReal rate = dDOT(axis,joint->node[0].body->avel); - if (joint->node[1].body) rate -= dDOT(axis,joint->node[1].body->avel); - return rate; - } - else return 0; -} - - -dxJoint::Vtable __dhinge_vtable = { - sizeof(dxJointHinge), - (dxJoint::init_fn*) hingeInit, - (dxJoint::getInfo1_fn*) hingeGetInfo1, - (dxJoint::getInfo2_fn*) hingeGetInfo2, - dJointTypeHinge}; - -//**************************************************************************** -// slider - -static void sliderInit (dxJointSlider *j) -{ - dSetZero (j->axis1,4); - j->axis1[0] = 1; - dSetZero (j->qrel,4); - dSetZero (j->offset,4); - j->limot.init (j->world); -} - - -extern "C" dReal dJointGetSliderPosition (dxJointSlider *joint) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); - - // get axis1 in global coordinates - dVector3 ax1,q; - dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); - - if (joint->node[1].body) { - // get body2 + offset point in global coordinates - dMULTIPLY0_331 (q,joint->node[1].body->R,joint->offset); - for (int i=0; i<3; i++) q[i] = joint->node[0].body->pos[i] - q[i] - - joint->node[1].body->pos[i]; - } - else { - for (int i=0; i<3; i++) q[i] = joint->node[0].body->pos[i] - - joint->offset[i]; - - } - return dDOT(ax1,q); -} - - -extern "C" dReal dJointGetSliderPositionRate (dxJointSlider *joint) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); - - // get axis1 in global coordinates - dVector3 ax1; - dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); - - if (joint->node[1].body) { - return dDOT(ax1,joint->node[0].body->lvel) - - dDOT(ax1,joint->node[1].body->lvel); - } - else { - return dDOT(ax1,joint->node[0].body->lvel); - } -} - - -static void sliderGetInfo1 (dxJointSlider *j, dxJoint::Info1 *info) -{ - info->nub = 5; - - // see if joint is powered - if (j->limot.fmax > 0) - info->m = 6; // powered slider needs an extra constraint row - else info->m = 5; - - // see if we're at a joint limit. - j->limot.limit = 0; - if ((j->limot.lostop > -dInfinity || j->limot.histop < dInfinity) && - j->limot.lostop <= j->limot.histop) { - // measure joint position - dReal pos = dJointGetSliderPosition (j); - if (pos <= j->limot.lostop) { - j->limot.limit = 1; - j->limot.limit_err = pos - j->limot.lostop; - info->m = 6; - } - else if (pos >= j->limot.histop) { - j->limot.limit = 2; - j->limot.limit_err = pos - j->limot.histop; - info->m = 6; - } - } -} - - -static void sliderGetInfo2 (dxJointSlider *joint, dxJoint::Info2 *info) -{ - int i,s = info->rowskip; - int s2=2*s,s3=3*s,s4=4*s; - - // pull out pos and R for both bodies. also get the `connection' - // vector pos2-pos1. - - dReal *pos1,*pos2,*R1,*R2; - dVector3 c; - pos1 = joint->node[0].body->pos; - R1 = joint->node[0].body->R; - if (joint->node[1].body) { - pos2 = joint->node[1].body->pos; - R2 = joint->node[1].body->R; - for (i=0; i<3; i++) c[i] = pos2[i] - pos1[i]; - } - else { - pos2 = 0; - R2 = 0; - } - - // 3 rows to make body rotations equal - info->J1a[0] = 1; - info->J1a[s+1] = 1; - info->J1a[s2+2] = 1; - if (joint->node[1].body) { - info->J2a[0] = -1; - info->J2a[s+1] = -1; - info->J2a[s2+2] = -1; - } - - // remaining two rows. we want: vel2 = vel1 + w1 x c ... but this would - // result in three equations, so we project along the planespace vectors - // so that sliding along the slider axis is disregarded. for symmetry we - // also substitute (w1+w2)/2 for w1, as w1 is supposed to equal w2. - - dVector3 ax1; // joint axis in global coordinates (unit length) - dVector3 p,q; // plane space of ax1 - dMULTIPLY0_331 (ax1,R1,joint->axis1); - dPlaneSpace (ax1,p,q); - if (joint->node[1].body) { - dVector3 tmp; - dCROSS (tmp, = REAL(0.5) * ,c,p); - for (i=0; i<3; i++) info->J2a[s3+i] = tmp[i]; - for (i=0; i<3; i++) info->J2a[s3+i] = tmp[i]; - dCROSS (tmp, = REAL(0.5) * ,c,q); - for (i=0; i<3; i++) info->J2a[s4+i] = tmp[i]; - for (i=0; i<3; i++) info->J2a[s4+i] = tmp[i]; - for (i=0; i<3; i++) info->J2l[s3+i] = -p[i]; - for (i=0; i<3; i++) info->J2l[s4+i] = -q[i]; - } - for (i=0; i<3; i++) info->J1l[s3+i] = p[i]; - for (i=0; i<3; i++) info->J1l[s4+i] = q[i]; - - // compute the right hand side. the first three elements will result in - // relative angular velocity of the two bodies - this is set to bring them - // back into alignment. the correcting angular velocity is - // |angular_velocity| = angle/time = erp*theta / stepsize - // = (erp*fps) * theta - // angular_velocity = |angular_velocity| * u - // = (erp*fps) * theta * u - // where rotation along unit length axis u by theta brings body 2's frame - // to qrel with respect to body 1's frame. using a small angle approximation - // for sin(), this gives - // angular_velocity = (erp*fps) * 2 * v - // where the quaternion of the relative rotation between the two bodies is - // q = [cos(theta/2) sin(theta/2)*u] = [s v] - - // get qerr = relative rotation (rotation error) between two bodies - dQuaternion qerr,e; - if (joint->node[1].body) { - dQuaternion qq; - dQMultiply1 (qq,joint->node[0].body->q,joint->node[1].body->q); - dQMultiply2 (qerr,qq,joint->qrel); - } - else { - dQMultiply3 (qerr,joint->node[0].body->q,joint->qrel); - } - if (qerr[0] < 0) { - qerr[1] = -qerr[1]; // adjust sign of qerr to make theta small - qerr[2] = -qerr[2]; - qerr[3] = -qerr[3]; - } - dMULTIPLY0_331 (e,joint->node[0].body->R,qerr+1); // @@@ bad SIMD padding! - dReal k = info->fps * info->erp; - info->c[0] = 2*k * e[0]; - info->c[1] = 2*k * e[1]; - info->c[2] = 2*k * e[2]; - - // compute last two elements of right hand side. we want to align the offset - // point (in body 2's frame) with the center of body 1. - if (joint->node[1].body) { - dVector3 ofs; // offset point in global coordinates - dMULTIPLY0_331 (ofs,R2,joint->offset); - for (i=0; i<3; i++) c[i] += ofs[i]; - info->c[3] = k * dDOT(p,c); - info->c[4] = k * dDOT(q,c); - } - else { - dVector3 ofs; // offset point in global coordinates - for (i=0; i<3; i++) ofs[i] = joint->offset[i] - pos1[i]; - info->c[3] = k * dDOT(p,ofs); - info->c[4] = k * dDOT(q,ofs); - } - - // if the slider is powered, or has joint limits, add in the extra row - joint->limot.addLimot (joint,info,5,ax1,0); -} - - -extern "C" void dJointSetSliderAxis (dxJointSlider *joint, - dReal x, dReal y, dReal z) -{ - int i; - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); - setAxes (joint,x,y,z,joint->axis1,0); - - // compute initial relative rotation body1 -> body2, or env -> body1 - // also compute center of body1 w.r.t body 2 - if (joint->node[1].body) { - dQMultiply1 (joint->qrel,joint->node[0].body->q,joint->node[1].body->q); - dVector3 c; - for (i=0; i<3; i++) - c[i] = joint->node[0].body->pos[i] - joint->node[1].body->pos[i]; - dMULTIPLY1_331 (joint->offset,joint->node[1].body->R,c); - } - else { - // set joint->qrel to the transpose of the first body's q - joint->qrel[0] = joint->node[0].body->q[0]; - for (i=1; i<4; i++) joint->qrel[i] = -joint->node[0].body->q[i]; - for (i=0; i<3; i++) joint->offset[i] = joint->node[0].body->pos[i]; - } -} - - -extern "C" void dJointGetSliderAxis (dxJointSlider *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); - getAxis (joint,result,joint->axis1); -} - - -extern "C" void dJointSetSliderParam (dxJointSlider *joint, - int parameter, dReal value) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); - joint->limot.set (parameter,value); -} - - -extern "C" dReal dJointGetSliderParam (dxJointSlider *joint, int parameter) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dslider_vtable,"joint is not a slider"); - return joint->limot.get (parameter); -} - - -dxJoint::Vtable __dslider_vtable = { - sizeof(dxJointSlider), - (dxJoint::init_fn*) sliderInit, - (dxJoint::getInfo1_fn*) sliderGetInfo1, - (dxJoint::getInfo2_fn*) sliderGetInfo2, - dJointTypeSlider}; - -//**************************************************************************** -// contact - -static void contactInit (dxJointContact *j) -{ - // default frictionless contact. hmmm, this info gets overwritten straight - // away anyway, so why bother? - j->contact.surface.mode = 0; - j->contact.surface.mu = 0; - dSetZero (j->contact.geom.pos,4); - dSetZero (j->contact.geom.normal,4); - j->contact.geom.depth = 0; -} - - -static void contactGetInfo1 (dxJointContact *j, dxJoint::Info1 *info) -{ - // make sure mu's >= 0, then calculate number of constraint rows and number - // of unbounded rows. - int m = 1, nub=0; - if (j->contact.surface.mu < 0) j->contact.surface.mu = 0; - if (j->contact.surface.mode & dContactMu2) { - if (j->contact.surface.mu > 0) m++; - if (j->contact.surface.mu2 < 0) j->contact.surface.mu2 = 0; - if (j->contact.surface.mu2 > 0) m++; - if (j->contact.surface.mu == dInfinity) nub ++; - if (j->contact.surface.mu2 == dInfinity) nub ++; - } - else { - if (j->contact.surface.mu > 0) m += 2; - if (j->contact.surface.mu == dInfinity) nub += 2; - } - - j->the_m = m; - info->m = m; - info->nub = nub; -} - - -static void contactGetInfo2 (dxJointContact *j, dxJoint::Info2 *info) -{ - int i,s = info->rowskip; - int s2 = 2*s; - - // get normal, with sign adjusted for body1/body2 polarity - dVector3 normal; - if (j->flags & dJOINT_REVERSE) { - normal[0] = j->contact.geom.normal[0]; - normal[1] = j->contact.geom.normal[1]; - normal[2] = j->contact.geom.normal[2]; - } - else { - normal[0] = - j->contact.geom.normal[0]; - normal[1] = - j->contact.geom.normal[1]; - normal[2] = - j->contact.geom.normal[2]; - } - normal[3] = 0; // @@@ hmmm - - // c1,c2 = contact points with respect to body PORs - dVector3 c1,c2; - for (i=0; i<3; i++) c1[i] = j->contact.geom.pos[i] - j->node[0].body->pos[i]; - - // set jacobian for normal - info->J1l[0] = normal[0]; - info->J1l[1] = normal[1]; - info->J1l[2] = normal[2]; - dCROSS (info->J1a,=,c1,normal); - if (j->node[1].body) { - for (i=0; i<3; i++) c2[i] = j->contact.geom.pos[i] - - j->node[1].body->pos[i]; - info->J2l[0] = -normal[0]; - info->J2l[1] = -normal[1]; - info->J2l[2] = -normal[2]; - dCROSS (info->J2a,= -,c2,normal); - } - - // set right hand side and cfm value for normal - dReal erp = info->erp; - if (j->contact.surface.mode & dContactSoftERP) - erp = j->contact.surface.soft_erp; - dReal k = info->fps * erp; - info->c[0] = k*j->contact.geom.depth; - if (j->contact.surface.mode & dContactSoftCFM) - info->cfm[0] = j->contact.surface.soft_cfm; - - // deal with bounce - if (j->contact.surface.mode & dContactBounce) { - // calculate outgoing velocity (-ve for incoming contact) - dReal outgoing = dDOT(info->J1l,j->node[0].body->lvel) + - dDOT(info->J1a,j->node[0].body->avel); - if (j->node[1].body) { - outgoing += dDOT(info->J2l,j->node[1].body->lvel) + - dDOT(info->J2a,j->node[1].body->avel); - } - // only apply bounce if the outgoing velocity is greater than the - // threshold, and if the resulting c[0] exceeds what we already have. - if (j->contact.surface.bounce_vel >= 0 && - (-outgoing) > j->contact.surface.bounce_vel) { - dReal newc = - j->contact.surface.bounce * outgoing; - if (newc > info->c[0]) info->c[0] = newc; - } - } - - // set LCP limits for normal - info->lo[0] = 0; - info->hi[0] = dInfinity; - - // now do jacobian for tangential forces - dVector3 t1,t2; // two vectors tangential to normal - - // first friction direction - if (j->the_m >= 2) { - if (j->contact.surface.mode & dContactFDir1) { // use fdir1 ? - t1[0] = j->contact.fdir1[0]; - t1[1] = j->contact.fdir1[1]; - t1[2] = j->contact.fdir1[2]; - dCROSS (t2,=,normal,t1); - } - else { - dPlaneSpace (normal,t1,t2); - } - info->J1l[s+0] = t1[0]; - info->J1l[s+1] = t1[1]; - info->J1l[s+2] = t1[2]; - dCROSS (info->J1a+s,=,c1,t1); - if (j->node[1].body) { - info->J2l[s+0] = -t1[0]; - info->J2l[s+1] = -t1[1]; - info->J2l[s+2] = -t1[2]; - dCROSS (info->J2a+s,= -,c2,t1); - } - // set right hand side - if (j->contact.surface.mode & dContactMotion1) { - info->c[1] = j->contact.surface.motion1; - } - // set LCP bounds and friction index. this depends on the approximation - // mode - info->lo[1] = -j->contact.surface.mu; - info->hi[1] = j->contact.surface.mu; - if (j->contact.surface.mode & dContactApprox1_1) info->findex[1] = 0; - - // set slip (constraint force mixing) - if (j->contact.surface.mode & dContactSlip1) - info->cfm[1] = j->contact.surface.slip1; - } - - // second friction direction - if (j->the_m >= 3) { - info->J1l[s2+0] = t2[0]; - info->J1l[s2+1] = t2[1]; - info->J1l[s2+2] = t2[2]; - dCROSS (info->J1a+s2,=,c1,t2); - if (j->node[1].body) { - info->J2l[s2+0] = -t2[0]; - info->J2l[s2+1] = -t2[1]; - info->J2l[s2+2] = -t2[2]; - dCROSS (info->J2a+s2,= -,c2,t2); - } - // set right hand side - if (j->contact.surface.mode & dContactMotion2) { - info->c[2] = j->contact.surface.motion2; - } - // set LCP bounds and friction index. this depends on the approximation - // mode - if (j->contact.surface.mode & dContactMu2) { - info->lo[2] = -j->contact.surface.mu2; - info->hi[2] = j->contact.surface.mu2; - } - else { - info->lo[2] = -j->contact.surface.mu; - info->hi[2] = j->contact.surface.mu; - } - if (j->contact.surface.mode & dContactApprox1_2) info->findex[2] = 0; - - // set slip (constraint force mixing) - if (j->contact.surface.mode & dContactSlip2) - info->cfm[2] = j->contact.surface.slip2; - } -} - - -dxJoint::Vtable __dcontact_vtable = { - sizeof(dxJointContact), - (dxJoint::init_fn*) contactInit, - (dxJoint::getInfo1_fn*) contactGetInfo1, - (dxJoint::getInfo2_fn*) contactGetInfo2, - dJointTypeContact}; - -//**************************************************************************** -// hinge 2. note that this joint must be attached to two bodies for it to work - -static dReal measureHinge2Angle (dxJointHinge2 *joint) -{ - dVector3 a1,a2; - dMULTIPLY0_331 (a1,joint->node[1].body->R,joint->axis2); - dMULTIPLY1_331 (a2,joint->node[0].body->R,a1); - dReal x = dDOT(joint->v1,a2); - dReal y = dDOT(joint->v2,a2); - return -dAtan2 (y,x); -} - - -static void hinge2Init (dxJointHinge2 *j) -{ - dSetZero (j->anchor1,4); - dSetZero (j->anchor2,4); - dSetZero (j->axis1,4); - j->axis1[0] = 1; - dSetZero (j->axis2,4); - j->axis2[1] = 1; - j->c0 = 0; - j->s0 = 0; - - dSetZero (j->v1,4); - j->v1[0] = 1; - dSetZero (j->v2,4); - j->v2[1] = 1; - - j->limot1.init (j->world); - j->limot2.init (j->world); - - j->susp_erp = j->world->global_erp; - j->susp_cfm = j->world->global_cfm; - - j->flags |= dJOINT_TWOBODIES; -} - - -static void hinge2GetInfo1 (dxJointHinge2 *j, dxJoint::Info1 *info) -{ - info->m = 4; - info->nub = 4; - - // see if we're powered or at a joint limit for axis 1 - int atlimit=0; - if ((j->limot1.lostop >= -M_PI || j->limot1.histop <= M_PI) && - j->limot1.lostop <= j->limot1.histop) { - dReal angle = measureHinge2Angle (j); - if (j->limot1.testRotationalLimit (angle)) atlimit = 1; - } - if (atlimit || j->limot1.fmax > 0) info->m++; - - // see if we're powering axis 2 (we currently never limit this axis) - j->limot2.limit = 0; - if (j->limot2.fmax > 0) info->m++; -} - - -// macro that computes ax1,ax2 = axis 1 and 2 in global coordinates (they are -// relative to body 1 and 2 initially) and then computes the constrained -// rotational axis as the cross product of ax1 and ax2. -// the sin and cos of the angle between axis 1 and 2 is computed, this comes -// from dot and cross product rules. - -#define HINGE2_GET_AXIS_INFO(axis,sin_angle,cos_angle) \ - dVector3 ax1,ax2; \ - dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); \ - dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); \ - dCROSS (axis,=,ax1,ax2); \ - sin_angle = dSqrt (axis[0]*axis[0] + axis[1]*axis[1] + axis[2]*axis[2]); \ - cos_angle = dDOT (ax1,ax2); - - -static void hinge2GetInfo2 (dxJointHinge2 *joint, dxJoint::Info2 *info) -{ - // get information we need to set the hinge row - dReal s,c; - dVector3 q; - HINGE2_GET_AXIS_INFO (q,s,c); - dNormalize3 (q); // @@@ quicker: divide q by s ? - - // set the three ball-and-socket rows (aligned to the suspension axis ax1) - setBall2 (joint,info,joint->anchor1,joint->anchor2,ax1,joint->susp_erp); - - // set the hinge row - int s3=3*info->rowskip; - info->J1a[s3+0] = q[0]; - info->J1a[s3+1] = q[1]; - info->J1a[s3+2] = q[2]; - if (joint->node[1].body) { - info->J2a[s3+0] = -q[0]; - info->J2a[s3+1] = -q[1]; - info->J2a[s3+2] = -q[2]; - } - - // compute the right hand side for the constrained rotational DOF. - // axis 1 and axis 2 are separated by an angle `theta'. the desired - // separation angle is theta0. sin(theta0) and cos(theta0) are recorded - // in the joint structure. the correcting angular velocity is: - // |angular_velocity| = angle/time = erp*(theta0-theta) / stepsize - // = (erp*fps) * (theta0-theta) - // (theta0-theta) can be computed using the following small-angle-difference - // approximation: - // theta0-theta ~= tan(theta0-theta) - // = sin(theta0-theta)/cos(theta0-theta) - // = (c*s0 - s*c0) / (c*c0 + s*s0) - // = c*s0 - s*c0 assuming c*c0 + s*s0 ~= 1 - // where c = cos(theta), s = sin(theta) - // c0 = cos(theta0), s0 = sin(theta0) - - dReal k = info->fps * info->erp; - info->c[3] = k * (joint->c0 * s - joint->s0 * c); - - // if the axis1 hinge is powered, or has joint limits, add in more stuff - int row = 4 + joint->limot1.addLimot (joint,info,4,ax1,1); - - // if the axis2 hinge is powered, add in more stuff - joint->limot2.addLimot (joint,info,row,ax2,1); - - // set parameter for the suspension - info->cfm[0] = joint->susp_cfm; -} - - -// compute vectors v1 and v2 (embedded in body1), used to measure angle -// between body 1 and body 2 - -static void makeHinge2V1andV2 (dxJointHinge2 *joint) -{ - if (joint->node[0].body) { - // get axis 1 and 2 in global coords - dVector3 ax1,ax2,v; - dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); - dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); - - // don't do anything if the axis1 or axis2 vectors are zero or the same - if ((ax1[0]==0 && ax1[1]==0 && ax1[2]==0) || - (ax2[0]==0 && ax2[1]==0 && ax2[2]==0) || - (ax1[0]==ax2[0] && ax1[1]==ax2[1] && ax1[2]==ax2[2])) return; - - // modify axis 2 so it's perpendicular to axis 1 - dReal k = dDOT(ax1,ax2); - for (int i=0; i<3; i++) ax2[i] -= k*ax1[i]; - dNormalize3 (ax2); - - // make v1 = modified axis2, v2 = axis1 x (modified axis2) - dCROSS (v,=,ax1,ax2); - dMULTIPLY1_331 (joint->v1,joint->node[0].body->R,ax2); - dMULTIPLY1_331 (joint->v2,joint->node[0].body->R,v); - } -} - - -extern "C" void dJointSetHinge2Anchor (dxJointHinge2 *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); - makeHinge2V1andV2 (joint); -} - - -extern "C" void dJointSetHinge2Axis1 (dxJointHinge2 *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[0].body) { - dReal q[4]; - q[0] = x; - q[1] = y; - q[2] = z; - q[3] = 0; - dNormalize3 (q); - dMULTIPLY1_331 (joint->axis1,joint->node[0].body->R,q); - joint->axis1[3] = 0; - - // compute the sin and cos of the angle between axis 1 and axis 2 - dVector3 ax; - HINGE2_GET_AXIS_INFO(ax,joint->s0,joint->c0); - } - makeHinge2V1andV2 (joint); -} - - -extern "C" void dJointSetHinge2Axis2 (dxJointHinge2 *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[1].body) { - dReal q[4]; - q[0] = x; - q[1] = y; - q[2] = z; - q[3] = 0; - dNormalize3 (q); - dMULTIPLY1_331 (joint->axis2,joint->node[1].body->R,q); - joint->axis1[3] = 0; - - // compute the sin and cos of the angle between axis 1 and axis 2 - dVector3 ax; - HINGE2_GET_AXIS_INFO(ax,joint->s0,joint->c0); - } - makeHinge2V1andV2 (joint); -} - - -extern "C" void dJointSetHinge2Param (dxJointHinge2 *joint, - int parameter, dReal value) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if ((parameter & 0xff00) == 0x100) { - joint->limot2.set (parameter & 0xff,value); - } - else { - if (parameter == dParamSuspensionERP) joint->susp_erp = value; - else if (parameter == dParamSuspensionCFM) joint->susp_cfm = value; - else joint->limot1.set (parameter,value); - } -} - - -extern "C" void dJointGetHinge2Anchor (dxJointHinge2 *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - getAnchor (joint,result,joint->anchor1); -} - - -extern "C" void dJointGetHinge2Axis1 (dxJointHinge2 *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[0].body) { - dMULTIPLY0_331 (result,joint->node[0].body->R,joint->axis1); - } -} - - -extern "C" void dJointGetHinge2Axis2 (dxJointHinge2 *joint, dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[1].body) { - dMULTIPLY0_331 (result,joint->node[1].body->R,joint->axis2); - } -} - - -extern "C" dReal dJointGetHinge2Param (dxJointHinge2 *joint, int parameter) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if ((parameter & 0xff00) == 0x100) { - return joint->limot2.get (parameter & 0xff); - } - else { - if (parameter == dParamSuspensionERP) return joint->susp_erp; - else if (parameter == dParamSuspensionCFM) return joint->susp_cfm; - else return joint->limot1.get (parameter); - } -} - - -extern "C" dReal dJointGetHinge2Angle1 (dxJointHinge2 *joint) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[0].body) return measureHinge2Angle (joint); - else return 0; -} - - -extern "C" dReal dJointGetHinge2Angle1Rate (dxJointHinge2 *joint) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[0].body) { - dVector3 axis; - dMULTIPLY0_331 (axis,joint->node[0].body->R,joint->axis1); - dReal rate = dDOT(axis,joint->node[0].body->avel); - if (joint->node[1].body) rate -= dDOT(axis,joint->node[1].body->avel); - return rate; - } - else return 0; -} - - -extern "C" dReal dJointGetHinge2Angle2Rate (dxJointHinge2 *joint) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dhinge2_vtable,"joint is not a hinge2"); - if (joint->node[0].body && joint->node[1].body) { - dVector3 axis; - dMULTIPLY0_331 (axis,joint->node[1].body->R,joint->axis2); - dReal rate = dDOT(axis,joint->node[0].body->avel); - if (joint->node[1].body) rate -= dDOT(axis,joint->node[1].body->avel); - return rate; - } - else return 0; -} - - -dxJoint::Vtable __dhinge2_vtable = { - sizeof(dxJointHinge2), - (dxJoint::init_fn*) hinge2Init, - (dxJoint::getInfo1_fn*) hinge2GetInfo1, - (dxJoint::getInfo2_fn*) hinge2GetInfo2, - dJointTypeHinge2}; - -//**************************************************************************** -// universal - -static void universalInit (dxJointUniversal *j) -{ - dSetZero (j->anchor1,4); - dSetZero (j->anchor2,4); - dSetZero (j->axis1,4); - j->axis1[0] = 1; - dSetZero (j->axis2,4); - j->axis2[1] = 1; -} - - -static void universalGetInfo1 (dxJointUniversal *j, dxJoint::Info1 *info) -{ - info->nub = 4; - info->m = 4; -} - - -static void universalGetInfo2 (dxJointUniversal *joint, dxJoint::Info2 *info) -{ - // set the three ball-and-socket rows - setBall (joint,info,joint->anchor1,joint->anchor2); - - // set the universal joint row. the angular velocity about an axis - // perpendicular to both joint axes should be equal. thus the constraint - // equation is - // p*w1 - p*w2 = 0 - // where p is a vector normal to both joint axes, and w1 and w2 - // are the angular velocity vectors of the two bodies. - - // length 1 joint axis in global coordinates, from each body - dVector3 ax1, ax2; - // length 1 vector perpendicular to ax1 and ax2. Neither body can rotate - // about this. - dVector3 p; - - // This says "ax1 = joint->node[0].body->R * joint->axis1" - dMULTIPLY0_331 (ax1,joint->node[0].body->R,joint->axis1); - if (joint->node[1].body) { - dMULTIPLY0_331 (ax2,joint->node[1].body->R,joint->axis2); - } - else { - ax2[0] = joint->axis2[0]; - ax2[1] = joint->axis2[1]; - ax2[2] = joint->axis2[2]; - } - - // if ax1 and ax2 are almost parallel, p won't be perpendicular to them. - // Is there some more robust way to do this? - dCROSS(p, =, ax1, ax2); - dNormalize3(p); - - int s3=3*info->rowskip; - - info->J1a[s3+0] = p[0]; - info->J1a[s3+1] = p[1]; - info->J1a[s3+2] = p[2]; - - if (joint->node[1].body) { - info->J2a[s3+0] = -p[0]; - info->J2a[s3+1] = -p[1]; - info->J2a[s3+2] = -p[2]; - } - - // compute the right hand side of the constraint equation. set relative - // body velocities along p to bring the axes back to perpendicular. - // If ax1, ax2 are unit length joint axes as computed from body1 and - // body2, we need to rotate both bodies along the axis p. If theta - // is the angle between ax1 and ax2, we need an angular velocity - // along p to cover the angle erp * (theta - Pi/2) in one step: - // - // |angular_velocity| = angle/time = erp*(theta - Pi/2) / stepsize - // = (erp*fps) * (theta - Pi/2) - // - // if theta is close to Pi/2, - // theta - Pi/2 ~= cos(theta), so - // |angular_velocity| = (erp*fps) * (ax1 dot ax2) - - info->c[3] = info->fps * info->erp * - dDOT(ax1, ax2); -} - - -extern "C" void dJointSetUniversalAnchor (dxJointUniversal *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); - setAnchors (joint,x,y,z,joint->anchor1,joint->anchor2); -} - - -extern "C" void dJointSetUniversalAxis1 (dxJointUniversal *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); - if (joint->node[0].body) { - dReal q[4]; - q[0] = x; - q[1] = y; - q[2] = z; - q[3] = 0; - dNormalize3 (q); - dMULTIPLY1_331 (joint->axis1,joint->node[0].body->R,q); - } - joint->axis1[3] = 0; -} - - -extern "C" void dJointSetUniversalAxis2 (dxJointUniversal *joint, - dReal x, dReal y, dReal z) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); - if (joint->node[1].body) { - dReal q[4]; - q[0] = x; - q[1] = y; - q[2] = z; - q[3] = 0; - dNormalize3 (q); - dMULTIPLY1_331 (joint->axis2,joint->node[1].body->R,q); - } - joint->axis2[3] = 0; -} - - -extern "C" void dJointGetUniversalAnchor (dxJointUniversal *joint, - dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); - getAnchor (joint,result,joint->anchor1); -} - - -extern "C" void dJointGetUniversalAxis1 (dxJointUniversal *joint, - dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); - if (joint->node[0].body) { - dMULTIPLY0_331 (result, joint->node[0].body->R, joint->axis1); - } -} - - -extern "C" void dJointGetUniversalAxis2 (dxJointUniversal *joint, - dVector3 result) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(result,"bad result argument"); - dUASSERT(joint->vtable == &__duniversal_vtable,"joint is not a universal"); - if (joint->node[1].body) { - dMULTIPLY0_331 (result, joint->node[1].body->R, joint->axis2); - } -} - - -dxJoint::Vtable __duniversal_vtable = { - sizeof(dxJointUniversal), - (dxJoint::init_fn*) universalInit, - (dxJoint::getInfo1_fn*) universalGetInfo1, - (dxJoint::getInfo2_fn*) universalGetInfo2, - dJointTypeUniversal}; - -//**************************************************************************** -// angular motor - -static void amotorInit (dxJointAMotor *j) -{ - int i; - j->num = 0; - j->mode = dAMotorUser; - for (i=0; i<3; i++) { - j->rel[i] = 0; - dSetZero (j->axis[i],4); - j->limot[i].init (j->world); - j->angle[i] = 0; - } - dSetZero (j->reference1,4); - dSetZero (j->reference2,4); - - j->flags |= dJOINT_TWOBODIES; -} - - -// compute the 3 axes in global coordinates - -static void amotorComputeGlobalAxes (dxJointAMotor *joint, dVector3 ax[3]) -{ - if (joint->mode == dAMotorEuler) { - // special handling for euler mode - dMULTIPLY0_331 (ax[0],joint->node[0].body->R,joint->axis[0]); - dMULTIPLY0_331 (ax[2],joint->node[1].body->R,joint->axis[2]); - dCROSS (ax[1],=,ax[2],ax[0]); - dNormalize3 (ax[1]); - } - else { - for (int i=0; i < joint->num; i++) { - if (joint->rel[i] == 1) { - // relative to b1 - dMULTIPLY0_331 (ax[i],joint->node[0].body->R,joint->axis[i]); - } - if (joint->rel[i] == 2) { - // relative to b2 - dMULTIPLY0_331 (ax[i],joint->node[1].body->R,joint->axis[i]); - } - else { - // global - just copy it - ax[i][0] = joint->axis[i][0]; - ax[i][1] = joint->axis[i][1]; - ax[i][2] = joint->axis[i][2]; - } - } - } -} - - -static void amotorComputeEulerAngles (dxJointAMotor *joint, dVector3 ax[3]) -{ - // assumptions: - // global axes already calculated --> ax - // axis[0] is relative to body 1 --> global ax[0] - // axis[2] is relative to body 2 --> global ax[2] - // ax[1] = ax[2] x ax[0] - // original ax[0] and ax[2] are perpendicular - // reference1 is perpendicular to ax[0] (in body 1 frame) - // reference2 is perpendicular to ax[2] (in body 2 frame) - // all ax[] and reference vectors are unit length - - // calculate references in global frame - dVector3 ref1,ref2; - dMULTIPLY0_331 (ref1,joint->node[0].body->R,joint->reference1); - dMULTIPLY0_331 (ref2,joint->node[1].body->R,joint->reference2); - - // get q perpendicular to both ax[0] and ref1, get first euler angle - dVector3 q; - dCROSS (q,=,ax[0],ref1); - joint->angle[0] = -dAtan2 (dDOT(ax[2],q),dDOT(ax[2],ref1)); - - // get q perpendicular to both ax[0] and ax[1], get second euler angle - dCROSS (q,=,ax[0],ax[1]); - joint->angle[1] = -dAtan2 (dDOT(ax[2],ax[0]),dDOT(ax[2],q)); - - // get q perpendicular to both ax[1] and ax[2], get third euler angle - dCROSS (q,=,ax[1],ax[2]); - joint->angle[2] = -dAtan2 (dDOT(ref2,ax[1]), dDOT(ref2,q)); -} - - -// set the reference vectors as follows: -// * reference1 = current axis[2] relative to body 1 -// * reference2 = current axis[0] relative to body 2 -// this assumes that: -// * axis[0] is relative to body 1 -// * axis[2] is relative to body 2 - -static void amotorSetEulerReferenceVectors (dxJointAMotor *j) -{ - if (j->node[0].body && j->node[1].body) { - dVector3 r; // axis[2] and axis[0] in global coordinates - dMULTIPLY0_331 (r,j->node[1].body->R,j->axis[2]); - dMULTIPLY1_331 (j->reference1,j->node[0].body->R,r); - dMULTIPLY0_331 (r,j->node[0].body->R,j->axis[0]); - dMULTIPLY1_331 (j->reference2,j->node[1].body->R,r); - } -} - - -static void amotorGetInfo1 (dxJointAMotor *j, dxJoint::Info1 *info) -{ - info->m = 0; - info->nub = 0; - - // compute the axes and angles, if in euler mode - if (j->mode == dAMotorEuler) { - dVector3 ax[3]; - amotorComputeGlobalAxes (j,ax); - amotorComputeEulerAngles (j,ax); - } - - // see if we're powered or at a joint limit for each axis - for (int i=0; i < j->num; i++) { - if (j->limot[i].testRotationalLimit (j->angle[i]) || - j->limot[i].fmax > 0) { - info->m++; - } - } -} - - -static void amotorGetInfo2 (dxJointAMotor *joint, dxJoint::Info2 *info) -{ - int i; - - // compute the axes (if not global) - dVector3 ax[3]; - amotorComputeGlobalAxes (joint,ax); - - // in euler angle mode we do not actually constrain the angular velocity - // along the axes axis[0] and axis[2] (although we do use axis[1]) : - // - // to get constrain w2-w1 along ...not - // ------ --------------------- ------ - // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0] - // d(angle[1])/dt = 0 ax[1] - // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2] - // - // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0. - // to prove the result for angle[0], write the expression for angle[0] from - // GetInfo1 then take the derivative. to prove this for angle[2] it is - // easier to take the euler rate expression for d(angle[2])/dt with respect - // to the components of w and set that to 0. - - dVector3 *axptr[3]; - axptr[0] = &ax[0]; - axptr[1] = &ax[1]; - axptr[2] = &ax[2]; - - dVector3 ax0_cross_ax1; - dVector3 ax1_cross_ax2; - if (joint->mode == dAMotorEuler) { - dCROSS (ax0_cross_ax1,=,ax[0],ax[1]); - axptr[2] = &ax0_cross_ax1; - dCROSS (ax1_cross_ax2,=,ax[1],ax[2]); - axptr[0] = &ax1_cross_ax2; - } - - int row=0; - for (i=0; i < joint->num; i++) { - row += joint->limot[i].addLimot (joint,info,row,*(axptr[i]),1); - } -} - - -extern "C" void dJointSetAMotorNumAxes (dxJointAMotor *joint, int num) -{ - dAASSERT(joint && num >= 0 && num <= 3); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - if (joint->mode == dAMotorEuler) { - joint->num = 3; - } - else { - if (num < 0) num = 0; - if (num > 3) num = 3; - joint->num = num; - } -} - - -extern "C" void dJointSetAMotorAxis (dxJointAMotor *joint, int anum, int rel, - dReal x, dReal y, dReal z) -{ - dAASSERT(joint && anum >= 0 && anum <= 2 && rel >= 0 && rel <= 2); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - if (anum < 0) anum = 0; - if (anum > 2) anum = 2; - joint->rel[anum] = rel; - - // x,y,z is always in global coordinates regardless of rel, so we may have - // to convert it to be relative to a body - dVector3 r; - r[0] = x; - r[1] = y; - r[2] = z; - r[3] = 0; - if (rel > 0) { - if (rel==1) { - dMULTIPLY1_331 (joint->axis[anum],joint->node[0].body->R,r); - } - else { - dMULTIPLY1_331 (joint->axis[anum],joint->node[1].body->R,r); - } - } - else { - joint->axis[anum][0] = r[0]; - joint->axis[anum][1] = r[1]; - joint->axis[anum][2] = r[2]; - } - dNormalize3 (joint->axis[anum]); - if (joint->mode == dAMotorEuler) amotorSetEulerReferenceVectors (joint); -} - - -extern "C" void dJointSetAMotorAngle (dxJointAMotor *joint, int anum, - dReal angle) -{ - dAASSERT(joint && anum >= 0 && anum < 3); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - if (joint->mode == dAMotorUser) { - if (anum < 0) anum = 0; - if (anum > 3) anum = 3; - joint->angle[anum] = angle; - } -} - - -extern "C" void dJointSetAMotorParam (dxJointAMotor *joint, int parameter, - dReal value) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - int anum = parameter >> 8; - if (anum < 0) anum = 0; - if (anum > 2) anum = 2; - parameter &= 0xff; - joint->limot[anum].set (parameter, value); -} - - -extern "C" void dJointSetAMotorMode (dxJointAMotor *joint, int mode) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - joint->mode = mode; - if (joint->mode == dAMotorEuler) { - joint->num = 3; - amotorSetEulerReferenceVectors (joint); - } -} - - -extern "C" int dJointGetAMotorNumAxes (dxJointAMotor *joint) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - return joint->num; -} - - -extern "C" void dJointGetAMotorAxis (dxJointAMotor *joint, int anum, - dVector3 result) -{ - dAASSERT(joint && anum >= 0 && anum < 3); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - if (anum < 0) anum = 0; - if (anum > 2) anum = 2; - if (joint->rel[anum] > 0) { - if (joint->rel[anum]==1) { - dMULTIPLY0_331 (result,joint->node[0].body->R,joint->axis[anum]); - } - else { - dMULTIPLY0_331 (result,joint->node[1].body->R,joint->axis[anum]); - } - } - else { - result[0] = joint->axis[anum][0]; - result[1] = joint->axis[anum][1]; - result[2] = joint->axis[anum][2]; - } -} - - -extern "C" int dJointGetAMotorAxisRel (dxJointAMotor *joint, int anum) -{ - dAASSERT(joint && anum >= 0 && anum < 3); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - if (anum < 0) anum = 0; - if (anum > 2) anum = 2; - return joint->rel[anum]; -} - - -extern "C" dReal dJointGetAMotorAngle (dxJointAMotor *joint, int anum) -{ - dAASSERT(joint && anum >= 0 && anum < 3); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - if (anum < 0) anum = 0; - if (anum > 3) anum = 3; - return joint->angle[anum]; -} - - -extern "C" dReal dJointGetAMotorAngleRate (dxJointAMotor *joint, int anum) -{ - // @@@ - dDebug (0,"not yet implemented"); - return 0; -} - - -extern "C" dReal dJointGetAMotorParam (dxJointAMotor *joint, int parameter) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - int anum = parameter >> 8; - if (anum < 0) anum = 0; - if (anum > 2) anum = 2; - parameter &= 0xff; - return joint->limot[anum].get (parameter); -} - - -extern "C" int dJointGetAMotorMode (dxJointAMotor *joint) -{ - dAASSERT(joint); - dUASSERT(joint->vtable == &__damotor_vtable,"joint is not an amotor"); - return joint->mode; -} - - -dxJoint::Vtable __damotor_vtable = { - sizeof(dxJointAMotor), - (dxJoint::init_fn*) amotorInit, - (dxJoint::getInfo1_fn*) amotorGetInfo1, - (dxJoint::getInfo2_fn*) amotorGetInfo2, - dJointTypeAMotor}; - -//**************************************************************************** -// fixed joint - -static void fixedInit (dxJointFixed *j) -{ - dSetZero (j->offset,4); -} - - -static void fixedGetInfo1 (dxJointFixed *j, dxJoint::Info1 *info) -{ - info->m = 6; - info->nub = 6; -} - - -static void fixedGetInfo2 (dxJointFixed *joint, dxJoint::Info2 *info) -{ - int s = info->rowskip; - - // set jacobian - info->J1l[0] = 1; - info->J1l[s+1] = 1; - info->J1l[2*s+2] = 1; - info->J1a[3*s] = 1; - info->J1a[4*s+1] = 1; - info->J1a[5*s+2] = 1; - - dVector3 ofs; - if (joint->node[1].body) { - dMULTIPLY0_331 (ofs,joint->node[0].body->R,joint->offset); - dCROSSMAT (info->J1a,ofs,s,+,-); - info->J2l[0] = -1; - info->J2l[s+1] = -1; - info->J2l[2*s+2] = -1; - info->J2a[3*s] = -1; - info->J2a[4*s+1] = -1; - info->J2a[5*s+2] = -1; - } - - // set right hand side for the first three rows (linear) - dReal k = info->fps * info->erp; - if (joint->node[1].body) { - for (int j=0; j<3; j++) - info->c[j] = k * (joint->node[1].body->pos[j] - - joint->node[0].body->pos[j] + ofs[j]); - } - else { - for (int j=0; j<3; j++) - info->c[j] = k * (joint->offset[j] - joint->node[0].body->pos[j]); - } - - // set right hand side for the next three rows (angular). this code is - // borrowed from the slider, so look at the comments there. - // @@@ make a function common to both the slider and this joint !!! - - // get qerr = relative rotation (rotation error) between two bodies - dQuaternion qerr,e; - if (joint->node[1].body) { - dQMultiply1 (qerr,joint->node[0].body->q,joint->node[1].body->q); - } - else { - qerr[0] = joint->node[0].body->q[0]; - for (int i=1; i<4; i++) qerr[i] = -joint->node[0].body->q[i]; - } - if (qerr[0] < 0) { - qerr[1] = -qerr[1]; // adjust sign of qerr to make theta small - qerr[2] = -qerr[2]; - qerr[3] = -qerr[3]; - } - dMULTIPLY0_331 (e,joint->node[0].body->R,qerr+1); // @@@ bad SIMD padding! - info->c[3] = 2*k * e[0]; - info->c[4] = 2*k * e[1]; - info->c[5] = 2*k * e[2]; -} - - -extern "C" void dJointSetFixed (dxJointFixed *joint) -{ - dUASSERT(joint,"bad joint argument"); - dUASSERT(joint->vtable == &__dfixed_vtable,"joint is not fixed"); - int i; - - // compute the offset between the bodies - if (joint->node[0].body) { - if (joint->node[1].body) { - dReal ofs[4]; - for (i=0; i<4; i++) ofs[i] = joint->node[0].body->pos[i]; - for (i=0; i<4; i++) ofs[i] -= joint->node[1].body->pos[i]; - dMULTIPLY1_331 (joint->offset,joint->node[0].body->R,ofs); - } - else { - for (i=0; i<4; i++) joint->offset[i] = joint->node[0].body->pos[i]; - } - } -} - - -dxJoint::Vtable __dfixed_vtable = { - sizeof(dxJointFixed), - (dxJoint::init_fn*) fixedInit, - (dxJoint::getInfo1_fn*) fixedGetInfo1, - (dxJoint::getInfo2_fn*) fixedGetInfo2, - dJointTypeFixed}; - -//**************************************************************************** -// null joint - -static void nullGetInfo1 (dxJointNull *j, dxJoint::Info1 *info) -{ - info->m = 0; - info->nub = 0; -} - - -static void nullGetInfo2 (dxJointNull *joint, dxJoint::Info2 *info) -{ - dDebug (0,"this should never get called"); -} - - -dxJoint::Vtable __dnull_vtable = { - sizeof(dxJointNull), - (dxJoint::init_fn*) 0, - (dxJoint::getInfo1_fn*) nullGetInfo1, - (dxJoint::getInfo2_fn*) nullGetInfo2, - dJointTypeNull}; diff --git a/extern/ode/dist/ode/src/joint.h b/extern/ode/dist/ode/src/joint.h deleted file mode 100644 index e0362ffa829..00000000000 --- a/extern/ode/dist/ode/src/joint.h +++ /dev/null @@ -1,260 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_JOINT_H_ -#define _ODE_JOINT_H_ - - -#include "objects.h" -#include -#include "obstack.h" - - -// joint flags -enum { - // if this flag is set, the joint was allocated in a joint group - dJOINT_INGROUP = 1, - - // if this flag is set, the joint was attached with arguments (0,body). - // our convention is to treat all attaches as (body,0), i.e. so node[0].body - // is always nonzero, so this flag records the fact that the arguments were - // swapped. - dJOINT_REVERSE = 2, - - // if this flag is set, the joint can not have just one body attached to it, - // it must have either zero or two bodies attached. - dJOINT_TWOBODIES = 4 -}; - - -// there are two of these nodes in the joint, one for each connection to a -// body. these are node of a linked list kept by each body of it's connecting -// joints. but note that the body pointer in each node points to the body that -// makes use of the *other* node, not this node. this trick makes it a bit -// easier to traverse the body/joint graph. - -struct dxJointNode { - dxJoint *joint; // pointer to enclosing dxJoint object - dxBody *body; // *other* body this joint is connected to - dxJointNode *next; // next node in body's list of connected joints -}; - - -struct dxJoint : public dObject { - // naming convention: the "first" body this is connected to is node[0].body, - // and the "second" body is node[1].body. if this joint is only connected - // to one body then the second body is 0. - - // info returned by getInfo1 function. the constraint dimension is m (<=6). - // i.e. that is the total number of rows in the jacobian. `nub' is the - // number of unbounded variables (which have lo,hi = -/+ infinity). - - struct Info1 { - int m,nub; - }; - - // info returned by getInfo2 function - - struct Info2 { - // integrator parameters: frames per second (1/stepsize), default error - // reduction parameter (0..1). - dReal fps,erp; - - // for the first and second body, pointers to two (linear and angular) - // n*3 jacobian sub matrices, stored by rows. these matrices will have - // been initialized to 0 on entry. if the second body is zero then the - // J2xx pointers may be 0. - dReal *J1l,*J1a,*J2l,*J2a; - - // elements to jump from one row to the next in J's - int rowskip; - - // right hand sides of the equation J*v = c + cfm * lambda. cfm is the - // "constraint force mixing" vector. c is set to zero on entry, cfm is - // set to a constant value (typically very small or zero) value on entry. - dReal *c,*cfm; - - // lo and hi limits for variables (set to -/+ infinity on entry). - dReal *lo,*hi; - - // findex vector for variables. see the LCP solver interface for a - // description of what this does. this is set to -1 on entry. - // note that the returned indexes are relative to the first index of - // the constraint. - int *findex; - }; - - // virtual function table: size of the joint structure, function pointers. - // we do it this way instead of using C++ virtual functions because - // sometimes we need to allocate joints ourself within a memory pool. - - typedef void init_fn (dxJoint *joint); - typedef void getInfo1_fn (dxJoint *joint, Info1 *info); - typedef void getInfo2_fn (dxJoint *joint, Info2 *info); - struct Vtable { - int size; - init_fn *init; - getInfo1_fn *getInfo1; - getInfo2_fn *getInfo2; - int typenum; // a dJointTypeXXX type number - }; - - Vtable *vtable; // virtual function table - int flags; // dJOINT_xxx flags - dxJointNode node[2]; // connections to bodies. node[1].body can be 0 - dJointFeedback *feedback; // optional feedback structure -}; - - -// joint group. NOTE: any joints in the group that have their world destroyed -// will have their world pointer set to 0. - -struct dxJointGroup : public dBase { - int num; // number of joints on the stack - dObStack stack; // a stack of (possibly differently sized) dxJoint -}; // objects. - - -// common limit and motor information for a single joint axis of movement -struct dxJointLimitMotor { - dReal vel,fmax; // powered joint: velocity, max force - dReal lostop,histop; // joint limits, relative to initial position - dReal fudge_factor; // when powering away from joint limits - dReal normal_cfm; // cfm to use when not at a stop - dReal stop_erp,stop_cfm; // erp and cfm for when at joint limit - dReal bounce; // restitution factor - // variables used between getInfo1() and getInfo2() - int limit; // 0=free, 1=at lo limit, 2=at hi limit - dReal limit_err; // if at limit, amount over limit - - void init (dxWorld *); - void set (int num, dReal value); - dReal get (int num); - int testRotationalLimit (dReal angle); - int addLimot (dxJoint *joint, dxJoint::Info2 *info, int row, - dVector3 ax1, int rotational); -}; - - -// ball and socket - -struct dxJointBall : public dxJoint { - dVector3 anchor1; // anchor w.r.t first body - dVector3 anchor2; // anchor w.r.t second body -}; -extern struct dxJoint::Vtable __dball_vtable; - - -// hinge - -struct dxJointHinge : public dxJoint { - dVector3 anchor1; // anchor w.r.t first body - dVector3 anchor2; // anchor w.r.t second body - dVector3 axis1; // axis w.r.t first body - dVector3 axis2; // axis w.r.t second body - dQuaternion qrel; // initial relative rotation body1 -> body2 - dxJointLimitMotor limot; // limit and motor information -}; -extern struct dxJoint::Vtable __dhinge_vtable; - - -// universal - -struct dxJointUniversal : public dxJoint { - dVector3 anchor1; // anchor w.r.t first body - dVector3 anchor2; // anchor w.r.t second body - dVector3 axis1; // axis w.r.t first body - dVector3 axis2; // axis w.r.t second body -}; -extern struct dxJoint::Vtable __duniversal_vtable; - - -// slider. if body2 is 0 then qrel is the absolute rotation of body1 and -// offset is the position of body1 center along axis1. - -struct dxJointSlider : public dxJoint { - dVector3 axis1; // axis w.r.t first body - dQuaternion qrel; // initial relative rotation body1 -> body2 - dVector3 offset; // point relative to body2 that should be - // aligned with body1 center along axis1 - dxJointLimitMotor limot; // limit and motor information -}; -extern struct dxJoint::Vtable __dslider_vtable; - - -// contact - -struct dxJointContact : public dxJoint { - int the_m; // number of rows computed by getInfo1 - dContact contact; -}; -extern struct dxJoint::Vtable __dcontact_vtable; - - -// hinge 2 - -struct dxJointHinge2 : public dxJoint { - dVector3 anchor1; // anchor w.r.t first body - dVector3 anchor2; // anchor w.r.t second body - dVector3 axis1; // axis 1 w.r.t first body - dVector3 axis2; // axis 2 w.r.t second body - dReal c0,s0; // cos,sin of desired angle between axis 1,2 - dVector3 v1,v2; // angle ref vectors embedded in first body - dxJointLimitMotor limot1; // limit+motor info for axis 1 - dxJointLimitMotor limot2; // limit+motor info for axis 2 - dReal susp_erp,susp_cfm; // suspension parameters (erp,cfm) -}; -extern struct dxJoint::Vtable __dhinge2_vtable; - - -// angular motor - -struct dxJointAMotor : public dxJoint { - int num; // number of axes (0..3) - int mode; // a dAMotorXXX constant - int rel[3]; // what the axes are relative to (global,b1,b2) - dVector3 axis[3]; // three axes - dxJointLimitMotor limot[3]; // limit+motor info for axes - dReal angle[3]; // user-supplied angles for axes - // these vectors are used for calculating euler angles - dVector3 reference1; // original axis[2], relative to body 1 - dVector3 reference2; // original axis[0], relative to body 2 -}; -extern struct dxJoint::Vtable __damotor_vtable; - - -// fixed - -struct dxJointFixed : public dxJoint { - dVector3 offset; // relative offset between the bodies -}; -extern struct dxJoint::Vtable __dfixed_vtable; - - -// null joint, for testing only - -struct dxJointNull : public dxJoint { -}; -extern struct dxJoint::Vtable __dnull_vtable; - -#endif - diff --git a/extern/ode/dist/ode/src/lcp.cpp b/extern/ode/dist/ode/src/lcp.cpp deleted file mode 100644 index dba2d3b949b..00000000000 --- a/extern/ode/dist/ode/src/lcp.cpp +++ /dev/null @@ -1,1455 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - - -THE ALGORITHM -------------- - -solve A*x = b+w, with x and w subject to certain LCP conditions. -each x(i),w(i) must lie on one of the three line segments in the following -diagram. each line segment corresponds to one index set : - - w(i) - /|\ | : - | | : - | |i in N : - w>0 | |state[i]=0 : - | | : - | | : i in C - w=0 + +-----------------------+ - | : | - | : | - w<0 | : |i in N - | : |state[i]=1 - | : | - | : | - +-------|-----------|-----------|----------> x(i) - lo 0 hi - -the Dantzig algorithm proceeds as follows: - for i=1:n - * if (x(i),w(i)) is not on the line, push x(i) and w(i) positive or - negative towards the line. as this is done, the other (x(j),w(j)) - for j= 0. this makes the algorithm a bit -simpler, because the starting point for x(i),w(i) is always on the dotted -line x=0 and x will only ever increase in one direction, so it can only hit -two out of the three line segments. - - -NOTES ------ - -this is an implementation of "lcp_dantzig2_ldlt.m" and "lcp_dantzig_lohi.m". -the implementation is split into an LCP problem object (dLCP) and an LCP -driver function. most optimization occurs in the dLCP object. - -a naive implementation of the algorithm requires either a lot of data motion -or a lot of permutation-array lookup, because we are constantly re-ordering -rows and columns. to avoid this and make a more optimized algorithm, a -non-trivial data structure is used to represent the matrix A (this is -implemented in the fast version of the dLCP object). - -during execution of this algorithm, some indexes in A are clamped (set C), -some are non-clamped (set N), and some are "don't care" (where x=0). -A,x,b,w (and other problem vectors) are permuted such that the clamped -indexes are first, the unclamped indexes are next, and the don't-care -indexes are last. this permutation is recorded in the array `p'. -initially p = 0..n-1, and as the rows and columns of A,x,b,w are swapped, -the corresponding elements of p are swapped. - -because the C and N elements are grouped together in the rows of A, we can do -lots of work with a fast dot product function. if A,x,etc were not permuted -and we only had a permutation array, then those dot products would be much -slower as we would have a permutation array lookup in some inner loops. - -A is accessed through an array of row pointers, so that element (i,j) of the -permuted matrix is A[i][j]. this makes row swapping fast. for column swapping -we still have to actually move the data. - -during execution of this algorithm we maintain an L*D*L' factorization of -the clamped submatrix of A (call it `AC') which is the top left nC*nC -submatrix of A. there are two ways we could arrange the rows/columns in AC. - -(1) AC is always permuted such that L*D*L' = AC. this causes a problem - when a row/column is removed from C, because then all the rows/columns of A - between the deleted index and the end of C need to be rotated downward. - this results in a lot of data motion and slows things down. -(2) L*D*L' is actually a factorization of a *permutation* of AC (which is - itself a permutation of the underlying A). this is what we do - the - permutation is recorded in the vector C. call this permutation A[C,C]. - when a row/column is removed from C, all we have to do is swap two - rows/columns and manipulate C. - -*/ - -#include -#include "lcp.h" -#include -#include -#include "mat.h" // for testing -#include // for testing - -//*************************************************************************** -// code generation parameters - -// LCP debugging (mosty for fast dLCP) - this slows things down a lot -//#define DEBUG_LCP - -//#define dLCP_SLOW // use slow dLCP object -#define dLCP_FAST // use fast dLCP object - -// option 1 : matrix row pointers (less data copying) -#define ROWPTRS -#define ATYPE dReal ** -#define AROW(i) (A[i]) - -// option 2 : no matrix row pointers (slightly faster inner loops) -//#define NOROWPTRS -//#define ATYPE dReal * -//#define AROW(i) (A+(i)*nskip) - -// misc defines -#define ALLOCA dALLOCA16 -//#define dDot myDot -#define NUB_OPTIMIZATIONS - -//*************************************************************************** - -// an alternative inline dot product, for speed comparisons - -static inline dReal myDot (dReal *a, dReal *b, int n) -{ - dReal sum=0; - while (n > 0) { - sum += (*a) * (*b); - a++; - b++; - n--; - } - return sum; -} - - -// swap row/column i1 with i2 in the n*n matrix A. the leading dimension of -// A is nskip. this only references and swaps the lower triangle. -// if `do_fast_row_swaps' is nonzero and row pointers are being used, then -// rows will be swapped by exchanging row pointers. otherwise the data will -// be copied. - -static void swapRowsAndCols (ATYPE A, int n, int i1, int i2, int nskip, - int do_fast_row_swaps) -{ - int i; - dIASSERT (A && n > 0 && i1 >= 0 && i2 >= 0 && i1 < n && i2 < n && - nskip >= n && i1 < i2); - -# ifdef ROWPTRS - for (i=i1+1; i 0) { - memcpy (tmprow,A+i1*nskip,i1*sizeof(dReal)); - memcpy (A+i1*nskip,A+i2*nskip,i1*sizeof(dReal)); - memcpy (A+i2*nskip,tmprow,i1*sizeof(dReal)); - } - for (i=i1+1; i0 && i1 >=0 && i2 >= 0 && i1 < n && i2 < n && nskip >= n && - i1 <= i2); - if (i1==i2) return; - swapRowsAndCols (A,n,i1,i2,nskip,do_fast_row_swaps); - tmp = x[i1]; - x[i1] = x[i2]; - x[i2] = tmp; - tmp = b[i1]; - b[i1] = b[i2]; - b[i2] = tmp; - tmp = w[i1]; - w[i1] = w[i2]; - w[i2] = tmp; - tmp = lo[i1]; - lo[i1] = lo[i2]; - lo[i2] = tmp; - tmp = hi[i1]; - hi[i1] = hi[i2]; - hi[i2] = tmp; - tmpi = p[i1]; - p[i1] = p[i2]; - p[i2] = tmpi; - tmpi = state[i1]; - state[i1] = state[i2]; - state[i2] = tmpi; - if (findex) { - tmpi = findex[i1]; - findex[i1] = findex[i2]; - findex[i2] = tmpi; - } -} - - -// for debugging - check that L,d is the factorization of A[C,C]. -// A[C,C] has size nC*nC and leading dimension nskip. -// L has size nC*nC and leading dimension nskip. -// d has size nC. - -#ifdef DEBUG_LCP - -static void checkFactorization (ATYPE A, dReal *_L, dReal *_d, - int nC, int *C, int nskip) -{ - int i,j; - if (nC==0) return; - - // get A1=A, copy the lower triangle to the upper triangle, get A2=A[C,C] - dMatrix A1 (nC,nC); - for (i=0; i 1e-8) - dDebug (0,"L*D*L' check, maximum difference = %.6e\n",diff); -} - -#endif - - -// for debugging - -#ifdef DEBUG_LCP - -static void checkPermutations (int i, int n, int nC, int nN, int *p, int *C) -{ - int j,k; - dIASSERT (nC>=0 && nN>=0 && (nC+nN)==i && i < n); - for (k=0; k= 0 && p[k] < i); - for (k=i; k C,N; // index sets - int last_i_for_solve1; // last i value given to solve1 - - dLCP (int _n, int _nub, dReal *_Adata, dReal *_x, dReal *_b, dReal *_w, - dReal *_lo, dReal *_hi, dReal *_L, dReal *_d, - dReal *_Dell, dReal *_ell, dReal *_tmp, - int *_state, int *_findex, int *_p, int *_C, dReal **Arows); - // the constructor is given an initial problem description (A,x,b,w) and - // space for other working data (which the caller may allocate on the stack). - // some of this data is specific to the fast dLCP implementation. - // the matrices A and L have size n*n, vectors have size n*1. - // A represents a symmetric matrix but only the lower triangle is valid. - // `nub' is the number of unbounded indexes at the start. all the indexes - // 0..nub-1 will be put into C. - - ~dLCP(); - - int getNub() { return nub; } - // return the value of `nub'. the constructor may want to change it, - // so the caller should find out its new value. - - // transfer functions: transfer index i to the given set (C or N). indexes - // less than `nub' can never be given. A,x,b,w,etc may be permuted by these - // functions, the caller must be robust to this. - - void transfer_i_to_C (int i); - // this assumes C and N span 1:i-1. this also assumes that solve1() has - // been recently called for the same i without any other transfer - // functions in between (thereby allowing some data reuse for the fast - // implementation). - void transfer_i_to_N (int i); - // this assumes C and N span 1:i-1. - void transfer_i_from_N_to_C (int i); - void transfer_i_from_C_to_N (int i); - - int numC(); - int numN(); - // return the number of indexes in set C/N - - int indexC (int i); - int indexN (int i); - // return index i in set C/N. - - // accessor and arithmetic functions. Aij translates as A(i,j), etc. - // make sure that only the lower triangle of A is ever referenced. - - dReal Aii (int i); - dReal AiC_times_qC (int i, dReal *q); - dReal AiN_times_qN (int i, dReal *q); // for all Nj - void pN_equals_ANC_times_qC (dReal *p, dReal *q); // for all Nj - void pN_plusequals_ANi (dReal *p, int i, int sign=1); - // for all Nj. sign = +1,-1. assumes i > maximum index in N. - void pC_plusequals_s_times_qC (dReal *p, dReal s, dReal *q); - void pN_plusequals_s_times_qN (dReal *p, dReal s, dReal *q); // for all Nj - void solve1 (dReal *a, int i, int dir=1, int only_transfer=0); - // get a(C) = - dir * A(C,C) \ A(C,i). dir must be +/- 1. - // the fast version of this function computes some data that is needed by - // transfer_i_to_C(). if only_transfer is nonzero then this function - // *only* computes that data, it does not set a(C). - - void unpermute(); - // call this at the end of the LCP function. if the x/w values have been - // permuted then this will unscramble them. -}; - - -dLCP::dLCP (int _n, int _nub, dReal *_Adata, dReal *_x, dReal *_b, dReal *_w, - dReal *_lo, dReal *_hi, dReal *_L, dReal *_d, - dReal *_Dell, dReal *_ell, dReal *_tmp, - int *_state, int *_findex, int *_p, int *_C, dReal **Arows) -{ - dUASSERT (_findex==0,"slow dLCP object does not support findex array"); - - n = _n; - nub = _nub; - Adata = _Adata; - A = 0; - x = _x; - b = _b; - w = _w; - lo = _lo; - hi = _hi; - nskip = dPAD(n); - dSetZero (x,n); - last_i_for_solve1 = -1; - - int i,j; - C.setSize (n); - N.setSize (n); - for (int i=0; i0, put all indexes 0..nub-1 into C and solve for x - if (nub > 0) { - for (i=0; i= i) dDebug (0,"N assumption violated"); - if (sign > 0) { - for (k=0; k 0) { - for (ii=0; ii nub - if (nub < n) { - for (k=0; k<100; k++) { - int i1,i2; - do { - i1 = dRandInt(n-nub)+nub; - i2 = dRandInt(n-nub)+nub; - } - while (i1 > i2); - //printf ("--> %d %d\n",i1,i2); - swapProblem (A,x,b,w,lo,hi,p,state,findex,n,i1,i2,nskip,0); - } - } - */ - - // permute the problem so that *all* the unbounded variables are at the - // start, i.e. look for unbounded variables not included in `nub'. we can - // potentially push up `nub' this way and get a bigger initial factorization. - // note that when we swap rows/cols here we must not just swap row pointers, - // as the initial factorization relies on the data being all in one chunk. - for (k=nub; k 0) { - for (k=0; k nub such that all findex variables are at the end - if (findex) { - int num_at_end = 0; - for (k=n-1; k >= nub; k--) { - if (findex[k] >= 0) { - swapProblem (A,x,b,w,lo,hi,p,state,findex,n,k,n-1-num_at_end,nskip,1); - num_at_end++; - } - } - } - - // print info about indexes - /* - for (k=0; k 0) { - // ell,Dell were computed by solve1(). note, ell = D \ L1solve (L,A(i,C)) - for (j=0; j 0) { - dReal *aptr = AROW(i); -# ifdef NUB_OPTIMIZATIONS - // if nub>0, initial part of aptr unpermuted - for (j=0; j 0) { - for (int i=0; i 0) { - dReal *aptr = AROW(i); -# ifdef NUB_OPTIMIZATIONS - // if nub>0, initial part of aptr[] is guaranteed unpermuted - for (j=0; j 0) { - for (j=0; j0 && A && x && b && w && nub == 0); - - int i,k; - int nskip = dPAD(n); - dReal *L = (dReal*) ALLOCA (n*nskip*sizeof(dReal)); - dReal *d = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *delta_x = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *delta_w = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *Dell = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *ell = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *tmp = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal **Arows = (dReal**) ALLOCA (n*sizeof(dReal*)); - int *p = (int*) ALLOCA (n*sizeof(int)); - int *C = (int*) ALLOCA (n*sizeof(int)); - int *dummy = (int*) ALLOCA (n*sizeof(int)); - - dLCP lcp (n,0,A,x,b,w,tmp,tmp,L,d,Dell,ell,tmp,dummy,dummy,p,C,Arows); - nub = lcp.getNub(); - - for (i=0; i= 0) { - lcp.transfer_i_to_N (i); - } - else { - for (;;) { - // compute: delta_x(C) = -A(C,C)\A(C,i) - dSetZero (delta_x,n); - lcp.solve1 (delta_x,i); - delta_x[i] = 1; - - // compute: delta_w = A*delta_x - dSetZero (delta_w,n); - lcp.pN_equals_ANC_times_qC (delta_w,delta_x); - lcp.pN_plusequals_ANi (delta_w,i); - delta_w[i] = lcp.AiC_times_qC (i,delta_x) + lcp.Aii(i); - - // find index to switch - int si = i; // si = switch index - int si_in_N = 0; // set to 1 if si in N - dReal s = -w[i]/delta_w[i]; - - if (s <= 0) { - dMessage (d_ERR_LCP, "LCP internal error, s <= 0 (s=%.4e)",s); - if (i < (n-1)) { - dSetZero (x+i,n-i); - dSetZero (w+i,n-i); - } - goto done; - } - - for (k=0; k < lcp.numN(); k++) { - if (delta_w[lcp.indexN(k)] < 0) { - dReal s2 = -w[lcp.indexN(k)] / delta_w[lcp.indexN(k)]; - if (s2 < s) { - s = s2; - si = lcp.indexN(k); - si_in_N = 1; - } - } - } - for (k=0; k < lcp.numC(); k++) { - if (delta_x[lcp.indexC(k)] < 0) { - dReal s2 = -x[lcp.indexC(k)] / delta_x[lcp.indexC(k)]; - if (s2 < s) { - s = s2; - si = lcp.indexC(k); - si_in_N = 0; - } - } - } - - // apply x = x + s * delta_x - lcp.pC_plusequals_s_times_qC (x,s,delta_x); - x[i] += s; - lcp.pN_plusequals_s_times_qN (w,s,delta_w); - w[i] += s * delta_w[i]; - - // switch indexes between sets if necessary - if (si==i) { - w[i] = 0; - lcp.transfer_i_to_C (i); - break; - } - if (si_in_N) { - w[si] = 0; - lcp.transfer_i_from_N_to_C (si); - } - else { - x[si] = 0; - lcp.transfer_i_from_C_to_N (si); - } - } - } - } - - done: - lcp.unpermute(); -} - -//*************************************************************************** -// an optimized Dantzig LCP driver routine for the lo-hi LCP problem. - -void dSolveLCP (int n, dReal *A, dReal *x, dReal *b, - dReal *w, int nub, dReal *lo, dReal *hi, int *findex) -{ - dAASSERT (n>0 && A && x && b && w && lo && hi && nub >= 0 && nub <= n); - int i,k,hit_first_friction_index = 0; - int nskip = dPAD(n); - - // if all the variables are unbounded then we can just factor, solve, - // and return - if (nub >= n) { - dFactorLDLT (A,w,n,nskip); // use w for d - dSolveLDLT (A,w,b,n,nskip); - memcpy (x,b,n*sizeof(dReal)); - dSetZero (w,n); - return; - } - -# ifndef dNODEBUG - // check restrictions on lo and hi - for (k=0; k= 0); -# endif - - dReal *L = (dReal*) ALLOCA (n*nskip*sizeof(dReal)); - dReal *d = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *delta_x = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *delta_w = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *Dell = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *ell = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal **Arows = (dReal**) ALLOCA (n*sizeof(dReal*)); - int *p = (int*) ALLOCA (n*sizeof(int)); - int *C = (int*) ALLOCA (n*sizeof(int)); - int dir; - dReal dirf; - - // for i in N, state[i] is 0 if x(i)==lo(i) or 1 if x(i)==hi(i) - int *state = (int*) ALLOCA (n*sizeof(int)); - - // create LCP object. note that tmp is set to delta_w to save space, this - // optimization relies on knowledge of how tmp is used, so be careful! - dLCP lcp (n,nub,A,x,b,w,lo,hi,L,d,Dell,ell,delta_w,state,findex,p,C,Arows); - nub = lcp.getNub(); - - // loop over all indexes nub..n-1. for index i, if x(i),w(i) satisfy the - // LCP conditions then i is added to the appropriate index set. otherwise - // x(i),w(i) is driven either +ve or -ve to force it to the valid region. - // as we drive x(i), x(C) is also adjusted to keep w(C) at zero. - // while driving x(i) we maintain the LCP conditions on the other variables - // 0..i-1. we do this by watching out for other x(i),w(i) values going - // outside the valid region, and then switching them between index sets - // when that happens. - - for (i=nub; i= 0) { - // un-permute x into delta_w, which is not being used at the moment - for (k=0; k= 0) { - lcp.transfer_i_to_N (i); - state[i] = 0; - } - else if (hi[i]==0 && w[i] <= 0) { - lcp.transfer_i_to_N (i); - state[i] = 1; - } - else if (w[i]==0) { - // this is a degenerate case. by the time we get to this test we know - // that lo != 0, which means that lo < 0 as lo is not allowed to be +ve, - // and similarly that hi > 0. this means that the line segment - // corresponding to set C is at least finite in extent, and we are on it. - // NOTE: we must call lcp.solve1() before lcp.transfer_i_to_C() - lcp.solve1 (delta_x,i,0,1); - lcp.transfer_i_to_C (i); - } - else { - // we must push x(i) and w(i) - for (;;) { - // find direction to push on x(i) - if (w[i] <= 0) { - dir = 1; - dirf = REAL(1.0); - } - else { - dir = -1; - dirf = REAL(-1.0); - } - - // compute: delta_x(C) = -dir*A(C,C)\A(C,i) - lcp.solve1 (delta_x,i,dir); - // note that delta_x[i] = dirf, but we wont bother to set it - - // compute: delta_w = A*delta_x ... note we only care about - // delta_w(N) and delta_w(i), the rest is ignored - lcp.pN_equals_ANC_times_qC (delta_w,delta_x); - lcp.pN_plusequals_ANi (delta_w,i,dir); - delta_w[i] = lcp.AiC_times_qC (i,delta_x) + lcp.Aii(i)*dirf; - - // find largest step we can take (size=s), either to drive x(i),w(i) - // to the valid LCP region or to drive an already-valid variable - // outside the valid region. - - int cmd = 1; // index switching command - int si = 0; // si = index to switch if cmd>3 - dReal s = -w[i]/delta_w[i]; - if (dir > 0) { - if (hi[i] < dInfinity) { - dReal s2 = (hi[i]-x[i])/dirf; // step to x(i)=hi(i) - if (s2 < s) { - s = s2; - cmd = 3; - } - } - } - else { - if (lo[i] > -dInfinity) { - dReal s2 = (lo[i]-x[i])/dirf; // step to x(i)=lo(i) - if (s2 < s) { - s = s2; - cmd = 2; - } - } - } - - for (k=0; k < lcp.numN(); k++) { - if ((state[lcp.indexN(k)]==0 && delta_w[lcp.indexN(k)] < 0) || - (state[lcp.indexN(k)]!=0 && delta_w[lcp.indexN(k)] > 0)) { - // don't bother checking if lo=hi=0 - if (lo[lcp.indexN(k)] == 0 && hi[lcp.indexN(k)] == 0) continue; - dReal s2 = -w[lcp.indexN(k)] / delta_w[lcp.indexN(k)]; - if (s2 < s) { - s = s2; - cmd = 4; - si = lcp.indexN(k); - } - } - } - - for (k=nub; k < lcp.numC(); k++) { - if (delta_x[lcp.indexC(k)] < 0 && lo[lcp.indexC(k)] > -dInfinity) { - dReal s2 = (lo[lcp.indexC(k)]-x[lcp.indexC(k)]) / - delta_x[lcp.indexC(k)]; - if (s2 < s) { - s = s2; - cmd = 5; - si = lcp.indexC(k); - } - } - if (delta_x[lcp.indexC(k)] > 0 && hi[lcp.indexC(k)] < dInfinity) { - dReal s2 = (hi[lcp.indexC(k)]-x[lcp.indexC(k)]) / - delta_x[lcp.indexC(k)]; - if (s2 < s) { - s = s2; - cmd = 6; - si = lcp.indexC(k); - } - } - } - - //static char* cmdstring[8] = {0,"->C","->NL","->NH","N->C", - // "C->NL","C->NH"}; - //printf ("cmd=%d (%s), si=%d\n",cmd,cmdstring[cmd],(cmd>3) ? si : i); - - // if s <= 0 then we've got a problem. if we just keep going then - // we're going to get stuck in an infinite loop. instead, just cross - // our fingers and exit with the current solution. - if (s <= 0) { - dMessage (d_ERR_LCP, "LCP internal error, s <= 0 (s=%.4e)",s); - if (i < (n-1)) { - dSetZero (x+i,n-i); - dSetZero (w+i,n-i); - } - goto done; - } - - // apply x = x + s * delta_x - lcp.pC_plusequals_s_times_qC (x,s,delta_x); - x[i] += s * dirf; - - // apply w = w + s * delta_w - lcp.pN_plusequals_s_times_qN (w,s,delta_w); - w[i] += s * delta_w[i]; - - // switch indexes between sets if necessary - switch (cmd) { - case 1: // done - w[i] = 0; - lcp.transfer_i_to_C (i); - break; - case 2: // done - x[i] = lo[i]; - state[i] = 0; - lcp.transfer_i_to_N (i); - break; - case 3: // done - x[i] = hi[i]; - state[i] = 1; - lcp.transfer_i_to_N (i); - break; - case 4: // keep going - w[si] = 0; - lcp.transfer_i_from_N_to_C (si); - break; - case 5: // keep going - x[si] = lo[si]; - state[si] = 0; - lcp.transfer_i_from_C_to_N (si); - break; - case 6: // keep going - x[si] = hi[si]; - state[si] = 1; - lcp.transfer_i_from_C_to_N (si); - break; - } - - if (cmd <= 3) break; - } - } - } - - done: - lcp.unpermute(); -} - -//*************************************************************************** -// accuracy and timing test - -extern "C" void dTestSolveLCP() -{ - int n = 100; - int i,nskip = dPAD(n); - const dReal tol = REAL(1e-9); - printf ("dTestSolveLCP()\n"); - - dReal *A = (dReal*) ALLOCA (n*nskip*sizeof(dReal)); - dReal *x = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *b = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *w = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *lo = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *hi = (dReal*) ALLOCA (n*sizeof(dReal)); - - dReal *A2 = (dReal*) ALLOCA (n*nskip*sizeof(dReal)); - dReal *b2 = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *lo2 = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *hi2 = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *tmp1 = (dReal*) ALLOCA (n*sizeof(dReal)); - dReal *tmp2 = (dReal*) ALLOCA (n*sizeof(dReal)); - - double total_time = 0; - for (int count=0; count < 1000; count++) { - - // form (A,b) = a random positive definite LCP problem - dMakeRandomMatrix (A2,n,n,1.0); - dMultiply2 (A,A2,A2,n,n,n); - dMakeRandomMatrix (x,n,1,1.0); - dMultiply0 (b,A,x,n,n,1); - for (i=0; i tol ? "FAILED" : "passed"); - if (diff > tol) dDebug (0,"A*x = b+w, maximum difference = %.6e",diff); - int n1=0,n2=0,n3=0; - for (i=0; i= 0) { - n1++; // ok - } - else if (x[i]==hi[i] && w[i] <= 0) { - n2++; // ok - } - else if (x[i] >= lo[i] && x[i] <= hi[i] && w[i] == 0) { - n3++; // ok - } - else { - dDebug (0,"FAILED: i=%d x=%.4e w=%.4e lo=%.4e hi=%.4e",i, - x[i],w[i],lo[i],hi[i]); - } - } - - // pacifier - printf ("passed: NL=%3d NH=%3d C=%3d ",n1,n2,n3); - printf ("time=%10.3f ms avg=%10.4f\n",time * 1000.0,average); - } -} diff --git a/extern/ode/dist/ode/src/lcp.h b/extern/ode/dist/ode/src/lcp.h deleted file mode 100644 index 86cbd6319eb..00000000000 --- a/extern/ode/dist/ode/src/lcp.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -given (A,b,lo,hi), solve the LCP problem: A*x = b+w, where each x(i),w(i) -satisfies one of - (1) x = lo, w >= 0 - (2) x = hi, w <= 0 - (3) lo < x < hi, w = 0 -A is a matrix of dimension n*n, everything else is a vector of size n*1. -lo and hi can be +/- dInfinity as needed. the first `nub' variables are -unbounded, i.e. hi and lo are assumed to be +/- dInfinity. - -we restrict lo(i) <= 0 and hi(i) >= 0. - -the original data (A,b) may be modified by this function. - -if the `findex' (friction index) parameter is nonzero, it points to an array -of index values. in this case constraints that have findex[i] >= 0 are -special. all non-special constraints are solved for, then the lo and hi values -for the special constraints are set: - hi[i] = abs( hi[i] * x[findex[i]] ) - lo[i] = -hi[i] -and the solution continues. this mechanism allows a friction approximation -to be implemented. - -*/ - - -#ifndef _ODE_LCP_H_ -#define _ODE_LCP_H_ - - -void dSolveLCP (int n, dReal *A, dReal *x, dReal *b, dReal *w, - int nub, dReal *lo, dReal *hi, int *findex); - - -#endif - diff --git a/extern/ode/dist/ode/src/mass.cpp b/extern/ode/dist/ode/src/mass.cpp deleted file mode 100644 index 9c1aae2033f..00000000000 --- a/extern/ode/dist/ode/src/mass.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include -#include - - -#define _I(i,j) I[(i)*4+(j)] - - -// return 1 if ok, 0 if bad - -static int checkMass (dMass *m) -{ - if (m->mass <= 0) { - dDEBUGMSG ("mass must be > 0"); - return 0; - } - if (!dIsPositiveDefinite (m->I,3)) { - dDEBUGMSG ("inertia must be positive definite"); - return 0; - } - - // verify that the center of mass position is consistent with the mass - // and inertia matrix. this is done by checking that the inertia around - // the center of mass is also positive definite. from the comment in - // dMassTranslate(), if the body is translated so that its center of mass - // is at the point of reference, then the new inertia is: - // I + mass*crossmat(c)^2 - // note that requiring this to be positive definite is exactly equivalent - // to requiring that the spatial inertia matrix - // [ mass*eye(3,3) M*crossmat(c)^T ] - // [ M*crossmat(c) I ] - // is positive definite, given that I is PD and mass>0. see the theorem - // about partitioned PD matrices for proof. - - dMatrix3 I2,chat; - dSetZero (chat,12); - dCROSSMAT (chat,m->c,4,+,-); - dMULTIPLY0_333 (I2,chat,chat); - for (int i=0; i<12; i++) I2[i] = m->I[i] + m->mass*I2[i]; - if (!dIsPositiveDefinite (I2,3)) { - dDEBUGMSG ("center of mass inconsistent with mass parameters"); - return 0; - } - return 1; -} - - -void dMassSetZero (dMass *m) -{ - dAASSERT (m); - m->mass = REAL(0.0); - dSetZero (m->c,sizeof(m->c) / sizeof(dReal)); - dSetZero (m->I,sizeof(m->I) / sizeof(dReal)); -} - - -void dMassSetParameters (dMass *m, dReal themass, - dReal cgx, dReal cgy, dReal cgz, - dReal I11, dReal I22, dReal I33, - dReal I12, dReal I13, dReal I23) -{ - dAASSERT (m); - dMassSetZero (m); - m->mass = themass; - m->c[0] = cgx; - m->c[1] = cgy; - m->c[2] = cgz; - m->_I(0,0) = I11; - m->_I(1,1) = I22; - m->_I(2,2) = I33; - m->_I(0,1) = I12; - m->_I(0,2) = I13; - m->_I(1,2) = I23; - m->_I(1,0) = I12; - m->_I(2,0) = I13; - m->_I(2,1) = I23; - checkMass (m); -} - - -void dMassSetSphere (dMass *m, dReal density, dReal radius) -{ - dAASSERT (m); - dMassSetZero (m); - m->mass = (REAL(4.0)/REAL(3.0)) * M_PI * radius*radius*radius * density; - dReal II = REAL(0.4) * m->mass * radius*radius; - m->_I(0,0) = II; - m->_I(1,1) = II; - m->_I(2,2) = II; - -# ifndef dNODEBUG - checkMass (m); -# endif -} - - -void dMassSetCappedCylinder (dMass *m, dReal density, int direction, - dReal a, dReal b) -{ - dReal M1,M2,Ia,Ib; - dAASSERT (m); - dUASSERT (direction >= 1 && direction <= 3,"bad direction number"); - dMassSetZero (m); - M1 = M_PI*a*a*b*density; // cylinder mass - M2 = (REAL(4.0)/REAL(3.0))*M_PI*a*a*a*density; // total cap mass - m->mass = M1+M2; - Ia = M1*(REAL(0.25)*a*a + (REAL(1.0)/REAL(12.0))*b*b) + - M2*(REAL(0.4)*a*a + REAL(0.5)*b*b); - Ib = (M1*REAL(0.5) + M2*REAL(0.4))*a*a; - m->_I(0,0) = Ia; - m->_I(1,1) = Ia; - m->_I(2,2) = Ia; - m->_I(direction-1,direction-1) = Ib; - -# ifndef dNODEBUG - checkMass (m); -# endif -} - - -void dMassSetBox (dMass *m, dReal density, - dReal lx, dReal ly, dReal lz) -{ - dAASSERT (m); - dMassSetZero (m); - dReal M = lx*ly*lz*density; - m->mass = M; - m->_I(0,0) = M/REAL(12.0) * (ly*ly + lz*lz); - m->_I(1,1) = M/REAL(12.0) * (lx*lx + lz*lz); - m->_I(2,2) = M/REAL(12.0) * (lx*lx + ly*ly); - -# ifndef dNODEBUG - checkMass (m); -# endif -} - - -void dMassAdjust (dMass *m, dReal newmass) -{ - dAASSERT (m); - dReal scale = newmass / m->mass; - m->mass = newmass; - for (int i=0; i<3; i++) for (int j=0; j<3; j++) m->_I(i,j) *= scale; - -# ifndef dNODEBUG - checkMass (m); -# endif -} - - -void dMassTranslate (dMass *m, dReal x, dReal y, dReal z) -{ - // if the body is translated by `a' relative to its point of reference, - // the new inertia about the point of reference is: - // - // I + mass*(crossmat(c)^2 - crossmat(c+a)^2) - // - // where c is the existing center of mass and I is the old inertia. - - int i,j; - dMatrix3 ahat,chat,t1,t2; - dReal a[3]; - - dAASSERT (m); - - // adjust inertia matrix - dSetZero (chat,12); - dCROSSMAT (chat,m->c,4,+,-); - a[0] = x + m->c[0]; - a[1] = y + m->c[1]; - a[2] = z + m->c[2]; - dSetZero (ahat,12); - dCROSSMAT (ahat,a,4,+,-); - dMULTIPLY0_333 (t1,ahat,ahat); - dMULTIPLY0_333 (t2,chat,chat); - for (i=0; i<3; i++) for (j=0; j<3; j++) - m->_I(i,j) += m->mass * (t2[i*4+j]-t1[i*4+j]); - - // ensure perfect symmetry - m->_I(1,0) = m->_I(0,1); - m->_I(2,0) = m->_I(0,2); - m->_I(2,1) = m->_I(1,2); - - // adjust center of mass - m->c[0] += x; - m->c[1] += y; - m->c[2] += z; - -# ifndef dNODEBUG - checkMass (m); -# endif -} - - -void dMassRotate (dMass *m, const dMatrix3 R) -{ - // if the body is rotated by `R' relative to its point of reference, - // the new inertia about the point of reference is: - // - // R * I * R' - // - // where I is the old inertia. - - dMatrix3 t1; - dReal t2[3]; - - dAASSERT (m); - - // rotate inertia matrix - dMULTIPLY2_333 (t1,m->I,R); - dMULTIPLY0_333 (m->I,R,t1); - - // ensure perfect symmetry - m->_I(1,0) = m->_I(0,1); - m->_I(2,0) = m->_I(0,2); - m->_I(2,1) = m->_I(1,2); - - // rotate center of mass - dMULTIPLY0_331 (t2,R,m->c); - m->c[0] = t2[0]; - m->c[1] = t2[1]; - m->c[2] = t2[2]; - -# ifndef dNODEBUG - checkMass (m); -# endif -} - - -void dMassAdd (dMass *a, const dMass *b) -{ - int i; - dAASSERT (a && b); - dReal denom = dRecip (a->mass + b->mass); - for (i=0; i<3; i++) a->c[i] = (a->c[i]*a->mass + b->c[i]*b->mass)*denom; - a->mass += b->mass; - for (i=0; i<12; i++) a->I[i] += b->I[i]; -} diff --git a/extern/ode/dist/ode/src/mat.cpp b/extern/ode/dist/ode/src/mat.cpp deleted file mode 100644 index 6e635dcc994..00000000000 --- a/extern/ode/dist/ode/src/mat.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include -#include -#include -#include "mat.h" - - -dMatrix::dMatrix() -{ - n = 0; - m = 0; - data = 0; -} - - -dMatrix::dMatrix (int rows, int cols) -{ - if (rows < 1 || cols < 1) dDebug (0,"bad matrix size"); - n = rows; - m = cols; - data = (dReal*) dAlloc (n*m*sizeof(dReal)); - dSetZero (data,n*m); -} - - -dMatrix::dMatrix (const dMatrix &a) -{ - n = a.n; - m = a.m; - data = (dReal*) dAlloc (n*m*sizeof(dReal)); - memcpy (data,a.data,n*m*sizeof(dReal)); -} - - -dMatrix::dMatrix (int rows, int cols, - dReal *_data, int rowskip, int colskip) -{ - if (rows < 1 || cols < 1) dDebug (0,"bad matrix size"); - n = rows; - m = cols; - data = (dReal*) dAlloc (n*m*sizeof(dReal)); - for (int i=0; i= n || j < 0 || j >= m) dDebug (0,"bad matrix (i,j)"); - return data [i*m+j]; -} - - -void dMatrix::operator= (const dMatrix &a) -{ - if (data) dFree (data,n*m*sizeof(dReal)); - n = a.n; - m = a.m; - if (n > 0 && m > 0) { - data = (dReal*) dAlloc (n*m*sizeof(dReal)); - memcpy (data,a.data,n*m*sizeof(dReal)); - } - else data = 0; -} - - -void dMatrix::operator= (dReal a) -{ - for (int i=0; i= n || q[i] < 0 || q[i] >= m) - dDebug (0,"Matrix select, bad index arrays"); - r.data[i*nq+j] = data[p[i]*m+q[j]]; - } - } - return r; -} - - -dMatrix dMatrix::operator + (const dMatrix &a) -{ - if (n != a.n || m != a.m) dDebug (0,"matrix +, mismatched sizes"); - dMatrix r (n,m); - for (int i=0; i max) max = diff; - } - } - return max; -} diff --git a/extern/ode/dist/ode/src/mat.h b/extern/ode/dist/ode/src/mat.h deleted file mode 100644 index 26f6bd1093a..00000000000 --- a/extern/ode/dist/ode/src/mat.h +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -// matrix class. this is mostly for convenience in the testing code, it is -// not optimized at all. correctness is much more importance here. - -#ifndef _ODE_MAT_H_ -#define _ODE_MAT_H_ - -#include - - -class dMatrix { - int n,m; // matrix dimension, n,m >= 0 - dReal *data; // if nonzero, n*m elements allocated on the heap - -public: - // constructors, destructors - dMatrix(); // make default 0x0 matrix - dMatrix (int rows, int cols); // construct zero matrix of given size - dMatrix (const dMatrix &); // construct copy of given matrix - // create copy of given data - element (i,j) is data[i*rowskip+j*colskip] - dMatrix (int rows, int cols, dReal *_data, int rowskip, int colskip); - ~dMatrix(); // destructor - - // data movement - dReal & operator () (int i, int j); // reference an element - void operator= (const dMatrix &); // matrix = matrix - void operator= (dReal); // matrix = scalar - dMatrix transpose(); // return transposed matrix - // return a permuted submatrix of this matrix, made up of the rows in p - // and the columns in q. p has np elements, q has nq elements. - dMatrix select (int np, int *p, int nq, int *q); - - // operators - dMatrix operator + (const dMatrix &); - dMatrix operator - (const dMatrix &); - dMatrix operator - (); - dMatrix operator * (const dMatrix &); - void operator += (const dMatrix &); - void operator -= (const dMatrix &); - - // utility - void clearUpperTriangle(); - void clearLowerTriangle(); - void makeRandom (dReal range); - void print (char *fmt = "%10.4f ", FILE *f=stdout); - dReal maxDifference (const dMatrix &); -}; - - -#endif - diff --git a/extern/ode/dist/ode/src/matrix.cpp b/extern/ode/dist/ode/src/matrix.cpp deleted file mode 100644 index 16afe915dd6..00000000000 --- a/extern/ode/dist/ode/src/matrix.cpp +++ /dev/null @@ -1,358 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include - -// misc defines -#define ALLOCA dALLOCA16 - - -void dSetZero (dReal *a, int n) -{ - dAASSERT (a && n >= 0); - while (n > 0) { - *(a++) = 0; - n--; - } -} - - -void dSetValue (dReal *a, int n, dReal value) -{ - dAASSERT (a && n >= 0); - while (n > 0) { - *(a++) = value; - n--; - } -} - - -void dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p, int q, int r) -{ - int i,j,k,qskip,rskip,rpad; - dAASSERT (A && B && C && p>0 && q>0 && r>0); - qskip = dPAD(q); - rskip = dPAD(r); - rpad = rskip - r; - dReal sum; - const dReal *b,*c,*bb; - bb = B; - for (i=p; i; i--) { - for (j=0 ; j0 && q>0 && r>0); - pskip = dPAD(p); - rskip = dPAD(r); - for (i=0; i0 && q>0 && r>0); - rpad = dPAD(r) - r; - qskip = dPAD(q); - bb = B; - for (i=p; i; i--) { - cc = C; - for (j=r; j; j--) { - z = 0; - sum = 0; - for (k=q; k; k--,z++) sum += bb[z] * cc[z]; - *(A++) = sum; - cc += qskip; - } - A += rpad; - bb += qskip; - } -} - - -int dFactorCholesky (dReal *A, int n) -{ - int i,j,k,nskip; - dReal sum,*a,*b,*aa,*bb,*cc,*recip; - dAASSERT (n > 0 && A); - nskip = dPAD (n); - recip = (dReal*) ALLOCA (n * sizeof(dReal)); - aa = A; - for (i=0; i 0 && L && b); - nskip = dPAD (n); - y = (dReal*) ALLOCA (n*sizeof(dReal)); - for (i=0; i= 0; i--) { - sum = 0; - for (k=i+1; k < n; k++) sum += L[k*nskip+i]*b[k]; - b[i] = (y[i]-sum)/L[i*nskip+i]; - } -} - - -int dInvertPDMatrix (const dReal *A, dReal *Ainv, int n) -{ - int i,j,nskip; - dReal *L,*x; - dAASSERT (n > 0 && A && Ainv); - nskip = dPAD (n); - L = (dReal*) ALLOCA (nskip*n*sizeof(dReal)); - memcpy (L,A,nskip*n*sizeof(dReal)); - x = (dReal*) ALLOCA (n*sizeof(dReal)); - if (dFactorCholesky (L,n)==0) return 0; - dSetZero (Ainv,n*nskip); // make sure all padding elements set to 0 - for (i=0; i 0 && A); - int nskip = dPAD (n); - Acopy = (dReal*) ALLOCA (nskip*n * sizeof(dReal)); - memcpy (Acopy,A,nskip*n * sizeof(dReal)); - return dFactorCholesky (Acopy,n); -} - - -/***** this has been replaced by a faster version -void dSolveL1T (const dReal *L, dReal *b, int n, int nskip) -{ - int i,j; - dAASSERT (L && b && n >= 0 && nskip >= n); - dReal sum; - for (i=n-2; i>=0; i--) { - sum = 0; - for (j=i+1; j= 0); - for (int i=0; i 0 && nskip >= n); - dSolveL1 (L,b,n,nskip); - dVectorScale (b,d,n); - dSolveL1T (L,b,n,nskip); -} - - -void dLDLTAddTL (dReal *L, dReal *d, const dReal *a, int n, int nskip) -{ - int j,p; - dReal *W1,*W2,W11,W21,alpha1,alpha2,alphanew,gamma1,gamma2,k1,k2,Wp,ell,dee; - dAASSERT (L && d && a && n > 0 && nskip >= n); - - if (n < 2) return; - W1 = (dReal*) ALLOCA (n*sizeof(dReal)); - W2 = (dReal*) ALLOCA (n*sizeof(dReal)); - - W1[0] = 0; - W2[0] = 0; - for (j=1; j j) ? _GETA(i,j) : _GETA(j,i)) - - -void dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, - int n1, int n2, int r, int nskip) -{ - int i; - dAASSERT(A && p && L && d && n1 > 0 && n2 > 0 && r >= 0 && r < n2 && - n1 >= n2 && nskip >= n1); - #ifndef dNODEBUG - for (i=0; i= 0 && p[i] < n1); - #endif - - if (r==n2-1) { - return; // deleting last row/col is easy - } - else if (r==0) { - dReal *a = (dReal*) ALLOCA (n2 * sizeof(dReal)); - for (i=0; i 0 && nskip >= n && r >= 0 && r < n); - if (r >= n-1) return; - if (r > 0) { - for (i=0; i 0 for alloc and realloc -// - realloc and free operate on uncorrupted blocks -// - realloc and free with the correct sizes -// - on exit, report of block allocation statistics -// - on exit, report of unfreed blocks and if they are corrupted -// the allocator will also call Debug() when it allocates a block with -// sequence number `_d_seqstop' or pointer value `_d_ptrstop'. these variables -// are global and can be set in the debugger. - -#include -#include -#include - -#ifdef dDEBUG_ALLOC - -// when debugging, this is a header that it put at start of all blocks. -// it contains `padding', which are PADSIZE elements of known value just -// before the user memory starts. another PADSIZE padding elements are put -// at the end of the user memory. the idea is that if the user accidentally -// steps outside the allocated memory, it can hopefully be detected by -// examining the padding elements. - -#define PADSIZE 10 -struct blockHeader { - long pad1; // protective padding - long seq; // sequence number - long size; // data size - long flags; // bit 0 = ignore this block in final report - blockHeader *next,*prev; // next & previous blocks - long pad[PADSIZE]; // protective padding -}; - -// compute the memory block size, including padding. the user memory block is -// rounded up to a multiple of 4 bytes, to get alignment for the padding at -// the end of the block. - -#define BSIZE(size) (((((size)-1) | 3)+1) + sizeof(blockHeader) + \ - PADSIZE * sizeof(long)) - -static blockHeader dummyblock = {0,0,0,0,&dummyblock,&dummyblock, - {0,0,0,0,0,0,0,0,0,0}}; -static blockHeader *firstblock = &dummyblock; -static long num_blocks_alloced = 0; -static long num_bytes_alloced = 0; -static long total_num_blocks_alloced = 0; -static long total_num_bytes_alloced = 0; -static long max_blocks_alloced = 0; -static long max_bytes_alloced = 0; - -long _d_seqstop = 0; -void *_d_ptrstop = 0; - -static int checkBlockOk (void *ptr, int fatal) -{ - if (ptr==0) dDebug (0,"0 passed to checkBlockOk()"); - blockHeader *b = ((blockHeader*) ptr) - 1; - int i,ok = 1; - if (b->pad1 != (long)0xdeadbeef || b->seq < 0 || b->size < 0) ok = 0; - if (ok) { - for (i=0; ipad[i] != (long)0xdeadbeef) ok = 0; - } - if (ok) { - long *endpad = (long*) (((char*)ptr) + (((b->size-1) | 3)+1)); - for (i=0; isize,b->seq); - return ok; -} - -#endif - - -static dAllocFunction *allocfn = 0; -static dReallocFunction *reallocfn = 0; -static dFreeFunction *freefn = 0; - - - -void dSetAllocHandler (dAllocFunction *fn) -{ - allocfn = fn; -} - - -void dSetReallocHandler (dReallocFunction *fn) -{ - reallocfn = fn; -} - - -void dSetFreeHandler (dFreeFunction *fn) -{ - freefn = fn; -} - - -dAllocFunction *dGetAllocHandler() -{ - return allocfn; -} - - -dReallocFunction *dGetReallocHandler() -{ - return reallocfn; -} - - -dFreeFunction *dGetFreeHandler() -{ - return freefn; -} - - -void * dAlloc (int size) -{ -#ifdef dDEBUG_ALLOC - if (size < 1) dDebug (0,"bad block size to Alloc()"); - - num_blocks_alloced++; - num_bytes_alloced += size; - total_num_blocks_alloced++; - total_num_bytes_alloced += size; - if (num_blocks_alloced > max_blocks_alloced) - max_blocks_alloced = num_blocks_alloced; - if (num_bytes_alloced > max_bytes_alloced) - max_bytes_alloced = num_bytes_alloced; - - if (total_num_blocks_alloced == _d_seqstop) - dDebug (0,"ALLOCATOR TRAP ON SEQUENCE NUMBER %d",_d_seqstop); - long size2 = BSIZE(size); - blockHeader *b = (blockHeader*) malloc (size2); - if (b+1 == _d_ptrstop) - dDebug (0,"ALLOCATOR TRAP ON BLOCK POINTER %p",_d_ptrstop); - for (unsigned int i=0; i < (size2/sizeof(long)); i++) - ((long*)b)[i] = 0xdeadbeef; - b->seq = total_num_blocks_alloced; - b->size = size; - b->flags = 0; - b->next = firstblock->next; - b->prev = firstblock; - firstblock->next->prev = b; - firstblock->next = b; - return b + 1; -#else - if (allocfn) return allocfn (size); else return malloc (size); -#endif -} - - -void * dRealloc (void *ptr, int oldsize, int newsize) -{ -#ifdef dDEBUG_ALLOC - if (ptr==0) dDebug (0,"Realloc() called with ptr==0"); - checkBlockOk (ptr,1); - blockHeader *b = ((blockHeader*) ptr) - 1; - if (b->size != oldsize) - dDebug (0,"Realloc(%p,%d,%d) has bad old size, good size " - "is %ld, seq=%ld",ptr,oldsize,newsize,b->size,b->seq); - void *p = dAlloc (newsize); - blockHeader *newb = ((blockHeader*) p) - 1; - newb->flags = b->flags; - if (oldsize>=1) memcpy (p,ptr,oldsize); - dFree (ptr,oldsize); - return p; -#else - if (reallocfn) return reallocfn (ptr,oldsize,newsize); - else return realloc (ptr,newsize); -#endif -} - - -void dFree (void *ptr, int size) -{ - if (!ptr) return; -#ifdef dDEBUG_ALLOC - checkBlockOk (ptr,1); - blockHeader *b = ((blockHeader*) ptr) - 1; - if (b->size != size) - dDebug (0,"Free(%p,%d) has bad size, good size " - "is %ld, seq=%ld",ptr,size,b->size,b->seq); - num_blocks_alloced--; - num_bytes_alloced -= b->size; - if (num_blocks_alloced < 0 || num_bytes_alloced < 0) - dDebug (0,"Free called too many times"); - - b->next->prev = b->prev; - b->prev->next = b->next; - memset (b,0,BSIZE(b->size)); - - free (b); -#else - if (freefn) freefn (ptr,size); else free (ptr); -#endif -} - - -void dAllocDontReport (void *ptr) -{ -#ifdef dDEBUG_ALLOC - checkBlockOk (ptr,1); - blockHeader *b = ((blockHeader*) ptr) - 1; - b->flags |= 1; -#endif -} - - -#ifdef dDEBUG_ALLOC - -static void printReport() -{ - // subtract the "dont report" blocks from the totals - blockHeader *b = firstblock; - do { - if (b != &dummyblock && (b->flags & 1)) { - num_blocks_alloced--; - num_bytes_alloced -= b->size; - if (!checkBlockOk (b+1,0)) - fprintf (stderr,"\tCORRUPTED: %p, size=%ld, seq=%ld\n",b+1, - b->size,b->seq); - } - b = b->prev; - } - while (b != firstblock); - - fprintf (stderr,"\nALLOCATOR REPORT\n"); - fprintf (stderr,"\tblocks still allocated: %ld\n",num_blocks_alloced); - fprintf (stderr,"\tbytes still allocated: %ld\n",num_bytes_alloced); - fprintf (stderr,"\ttotal blocks allocated: %ld\n",total_num_blocks_alloced); - fprintf (stderr,"\ttotal bytes allocated: %ld\n",total_num_bytes_alloced); - fprintf (stderr,"\tmax blocks allocated: %ld\n",max_blocks_alloced); - fprintf (stderr,"\tmax bytes allocated: %ld\n",max_bytes_alloced); - - b = firstblock; - do { - if (b != &dummyblock && (b->flags & 1)==0) { - int ok = checkBlockOk (b+1,0); - fprintf (stderr,"\tUNFREED: %p, size=%ld, seq=%ld (%s)\n",b+1, - b->size,b->seq, ok ? "ok" : "CORUPTED"); - } - b = b->prev; - } - while (b != firstblock); - fprintf (stderr,"\n"); -} - - -struct dMemoryReportPrinter { - ~dMemoryReportPrinter() { printReport(); } -} _dReportPrinter; - -#endif diff --git a/extern/ode/dist/ode/src/misc.cpp b/extern/ode/dist/ode/src/misc.cpp deleted file mode 100644 index bdc1579d5aa..00000000000 --- a/extern/ode/dist/ode/src/misc.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include - -//**************************************************************************** -// random numbers - -static unsigned long seed = 0; - -unsigned long dRand() -{ - seed = (1664525L*seed + 1013904223L) & 0xffffffff; - return seed; -} - - -unsigned long dRandGetSeed() -{ - return seed; -} - - -void dRandSetSeed (unsigned long s) -{ - seed = s; -} - - -int dTestRand() -{ - unsigned long oldseed = seed; - int ret = 1; - seed = 0; - if (dRand() != 0x3c6ef35f || dRand() != 0x47502932 || - dRand() != 0xd1ccf6e9 || dRand() != 0xaaf95334 || - dRand() != 0x6252e503) ret = 0; - seed = oldseed; - return ret; -} - - -int dRandInt (int n) -{ - double a = double(n) / 4294967296.0; - return (int) (double(dRand()) * a); -} - - -dReal dRandReal() -{ - return ((dReal) dRand()) / ((dReal) 0xffffffff); -} - -//**************************************************************************** -// matrix utility stuff - -void dPrintMatrix (dReal *A, int n, int m, char *fmt, FILE *f) -{ - int i,j; - int skip = dPAD(m); - for (i=0; i max) max = diff; - } - } - return max; -} - - -dReal dMaxDifferenceLowerTriangle (const dReal *A, const dReal *B, int n) -{ - int i,j; - int skip = dPAD(n); - dReal diff,max; - max = 0; - for (i=0; i max) max = diff; - } - } - return max; -} diff --git a/extern/ode/dist/ode/src/objects.h b/extern/ode/dist/ode/src/objects.h deleted file mode 100644 index 4d2c4ca6af7..00000000000 --- a/extern/ode/dist/ode/src/objects.h +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -// object, body, and world structs. - - -#ifndef _ODE_OBJECT_H_ -#define _ODE_OBJECT_H_ - -#include -#include -#include -#include "array.h" - - -// some body flags - -enum { - dxBodyFlagFiniteRotation = 1, // use finite rotations - dxBodyFlagFiniteRotationAxis = 2, // use finite rotations only along axis - dxBodyDisabled = 4, // body is disabled - dxBodyNoGravity = 8 // body is not influenced by gravity -}; - - -// base class that does correct object allocation / deallocation - -struct dBase { - void *operator new (size_t size) { return dAlloc (size); } - void operator delete (void *ptr, size_t size) { dFree (ptr,size); } - void *operator new[] (size_t size) { return dAlloc (size); } - void operator delete[] (void *ptr, size_t size) { dFree (ptr,size); } -}; - - -// base class for bodies and joints - -struct dObject : public dBase { - dxWorld *world; // world this object is in - dObject *next; // next object of this type in list - dObject **tome; // pointer to previous object's next ptr - void *userdata; // user settable data - int tag; // used by dynamics algorithms -}; - - -struct dxBody : public dObject { - dxJointNode *firstjoint; // list of attached joints - int flags; // some dxBodyFlagXXX flags - dMass mass; // mass parameters about POR - dMatrix3 invI; // inverse of mass.I - dReal invMass; // 1 / mass.mass - dVector3 pos; // position of POR (point of reference) - dQuaternion q; // orientation quaternion - dMatrix3 R; // rotation matrix, always corresponds to q - dVector3 lvel,avel; // linear and angular velocity of POR - dVector3 facc,tacc; // force and torque accululators - dVector3 finite_rot_axis; // finite rotation axis, unit length or 0=none -}; - - -struct dxWorld : public dBase { - dxBody *firstbody; // body linked list - dxJoint *firstjoint; // joint linked list - int nb,nj; // number of bodies and joints in lists - dVector3 gravity; // gravity vector (m/s/s) - dReal global_erp; // global error reduction parameter - dReal global_cfm; // global costraint force mixing parameter -}; - -#endif - diff --git a/extern/ode/dist/ode/src/obstack.cpp b/extern/ode/dist/ode/src/obstack.cpp deleted file mode 100644 index a6b9d36fbb4..00000000000 --- a/extern/ode/dist/ode/src/obstack.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include -#include "obstack.h" - -//**************************************************************************** -// macros and constants - -#define ROUND_UP_OFFSET_TO_EFFICIENT_SIZE(arena,ofs) \ - ofs = (int) (dEFFICIENT_SIZE( ((intP)(arena)) + ofs ) - ((intP)(arena)) ); - -#define MAX_ALLOC_SIZE \ - ((int)(dOBSTACK_ARENA_SIZE - sizeof (Arena) - EFFICIENT_ALIGNMENT + 1)) - -//**************************************************************************** -// dObStack - -dObStack::dObStack() -{ - first = 0; - last = 0; - current_arena = 0; - current_ofs = 0; -} - - -dObStack::~dObStack() -{ - // free all arenas - Arena *a,*nexta; - a = first; - while (a) { - nexta = a->next; - dFree (a,dOBSTACK_ARENA_SIZE); - a = nexta; - } -} - - -void *dObStack::alloc (int num_bytes) -{ - if (num_bytes > MAX_ALLOC_SIZE) dDebug (0,"num_bytes too large"); - - // allocate or move to a new arena if necessary - if (!first) { - // allocate the first arena if necessary - first = last = (Arena *) dAlloc (dOBSTACK_ARENA_SIZE); - first->next = 0; - first->used = sizeof (Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (first,first->used); - } - else { - // we already have one or more arenas, see if a new arena must be used - if ((last->used + num_bytes) > dOBSTACK_ARENA_SIZE) { - if (!last->next) { - last->next = (Arena *) dAlloc (dOBSTACK_ARENA_SIZE); - last->next->next = 0; - } - last = last->next; - last->used = sizeof (Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (last,last->used); - } - } - - // allocate an area in the arena - char *c = ((char*) last) + last->used; - last->used += num_bytes; - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (last,last->used); - return c; -} - - -void dObStack::freeAll() -{ - last = first; - if (first) { - first->used = sizeof(Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (first,first->used); - } -} - - -void *dObStack::rewind() -{ - current_arena = first; - current_ofs = sizeof (Arena); - if (current_arena) { - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs) - return ((char*) current_arena) + current_ofs; - } - else return 0; -} - - -void *dObStack::next (int num_bytes) -{ - // this functions like alloc, except that no new storage is ever allocated - if (!current_arena) return 0; - current_ofs += num_bytes; - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs); - if (current_ofs >= current_arena->used) { - current_arena = current_arena->next; - if (!current_arena) return 0; - current_ofs = sizeof (Arena); - ROUND_UP_OFFSET_TO_EFFICIENT_SIZE (current_arena,current_ofs); - } - return ((char*) current_arena) + current_ofs; -} diff --git a/extern/ode/dist/ode/src/obstack.h b/extern/ode/dist/ode/src/obstack.h deleted file mode 100644 index fa7155dd966..00000000000 --- a/extern/ode/dist/ode/src/obstack.h +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#ifndef _ODE_OBSTACK_H_ -#define _ODE_OBSTACK_H_ - -#include "objects.h" - -// each obstack Arena pointer points to a block of this many bytes -#define dOBSTACK_ARENA_SIZE 16384 - - -struct dObStack : public dBase { - struct Arena { - Arena *next; // next arena in linked list - int used; // total number of bytes used in this arena, counting - }; // this header - - Arena *first; // head of the arena linked list. 0 if no arenas yet - Arena *last; // arena where blocks are currently being allocated - - // used for iterator - Arena *current_arena; - int current_ofs; - - dObStack(); - ~dObStack(); - - void *alloc (int num_bytes); - // allocate a block in the last arena, allocating a new arena if necessary. - // it is a runtime error if num_bytes is larger than the arena size. - - void freeAll(); - // free all blocks in all arenas. this does not deallocate the arenas - // themselves, so future alloc()s will reuse them. - - void *rewind(); - // rewind the obstack iterator, and return the address of the first - // allocated block. return 0 if there are no allocated blocks. - - void *next (int num_bytes); - // return the address of the next allocated block. 'num_bytes' is the size - // of the previous block. this returns null if there are no more arenas. - // the sequence of 'num_bytes' parameters passed to next() during a - // traversal of the list must exactly match the parameters passed to alloc(). -}; - - -#endif - diff --git a/extern/ode/dist/ode/src/ode.cpp b/extern/ode/dist/ode/src/ode.cpp deleted file mode 100644 index 1a14e3292a0..00000000000 --- a/extern/ode/dist/ode/src/ode.cpp +++ /dev/null @@ -1,1341 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -// this source file is mostly concerned with the data structures, not the -// numerics. - -#include "objects.h" -#include -#include "joint.h" -#include -#include -#include "step.h" -#include -#include - -// misc defines -#define ALLOCA dALLOCA16 - -//**************************************************************************** -// utility - -static inline void initObject (dObject *obj, dxWorld *w) -{ - obj->world = w; - obj->next = 0; - obj->tome = 0; - obj->userdata = 0; - obj->tag = 0; -} - - -// add an object `obj' to the list who's head pointer is pointed to by `first'. - -static inline void addObjectToList (dObject *obj, dObject **first) -{ - obj->next = *first; - obj->tome = first; - if (*first) (*first)->tome = &obj->next; - (*first) = obj; -} - - -// remove the object from the linked list - -static inline void removeObjectFromList (dObject *obj) -{ - if (obj->next) obj->next->tome = obj->tome; - *(obj->tome) = obj->next; - // safeguard - obj->next = 0; - obj->tome = 0; -} - - -// remove the joint from neighbour lists of all connected bodies - -static void removeJointReferencesFromAttachedBodies (dxJoint *j) -{ - for (int i=0; i<2; i++) { - dxBody *body = j->node[i].body; - if (body) { - dxJointNode *n = body->firstjoint; - dxJointNode *last = 0; - while (n) { - if (n->joint == j) { - if (last) last->next = n->next; - else body->firstjoint = n->next; - break; - } - last = n; - n = n->next; - } - } - } - j->node[0].body = 0; - j->node[0].next = 0; - j->node[1].body = 0; - j->node[1].next = 0; -} - -//**************************************************************************** -// island processing - -// this groups all joints and bodies in a world into islands. all objects -// in an island are reachable by going through connected bodies and joints. -// each island can be simulated separately. -// note that joints that are not attached to anything will not be included -// in any island, an so they do not affect the simulation. -// -// this function starts new island from unvisited bodies. however, it will -// never start a new islands from a disabled body. thus islands of disabled -// bodies will not be included in the simulation. disabled bodies are -// re-enabled if they are found to be part of an active island. - -static void processIslands (dxWorld *world, dReal stepsize) -{ - dxBody *b,*bb,**body; - dxJoint *j,**joint; - - // nothing to do if no bodies - if (world->nb <= 0) return; - - // make arrays for body and joint lists (for a single island) to go into - body = (dxBody**) ALLOCA (world->nb * sizeof(dxBody*)); - joint = (dxJoint**) ALLOCA (world->nj * sizeof(dxJoint*)); - int bcount = 0; // number of bodies in `body' - int jcount = 0; // number of joints in `joint' - - // set all body/joint tags to 0 - for (b=world->firstbody; b; b=(dxBody*)b->next) b->tag = 0; - for (j=world->firstjoint; j; j=(dxJoint*)j->next) j->tag = 0; - - // allocate a stack of unvisited bodies in the island. the maximum size of - // the stack can be the lesser of the number of bodies or joints, because - // new bodies are only ever added to the stack by going through untagged - // joints. all the bodies in the stack must be tagged! - int stackalloc = (world->nj < world->nb) ? world->nj : world->nb; - dxBody **stack = (dxBody**) ALLOCA (stackalloc * sizeof(dxBody*)); - - for (bb=world->firstbody; bb; bb=(dxBody*)bb->next) { - // get bb = the next enabled, untagged body, and tag it - if (bb->tag || (bb->flags & dxBodyDisabled)) continue; - bb->tag = 1; - - // tag all bodies and joints starting from bb. - int stacksize = 0; - b = bb; - body[0] = bb; - bcount = 1; - jcount = 0; - goto quickstart; - while (stacksize > 0) { - b = stack[--stacksize]; // pop body off stack - body[bcount++] = b; // put body on body list - quickstart: - - // traverse and tag all body's joints, add untagged connected bodies - // to stack - for (dxJointNode *n=b->firstjoint; n; n=n->next) { - if (!n->joint->tag) { - n->joint->tag = 1; - joint[jcount++] = n->joint; - if (n->body && !n->body->tag) { - n->body->tag = 1; - stack[stacksize++] = n->body; - } - } - } - dIASSERT(stacksize <= world->nb); - dIASSERT(stacksize <= world->nj); - } - - // now do something with body and joint lists - dInternalStepIsland (world,body,bcount,joint,jcount,stepsize); - - // what we've just done may have altered the body/joint tag values. - // we must make sure that these tags are nonzero. - // also make sure all bodies are in the enabled state. - int i; - for (i=0; itag = 1; - body[i]->flags &= ~dxBodyDisabled; - } - for (i=0; itag = 1; - } - - // if debugging, check that all objects (except for disabled bodies, - // unconnected joints, and joints that are connected to disabled bodies) - // were tagged. -# ifndef dNODEBUG - for (b=world->firstbody; b; b=(dxBody*)b->next) { - if (b->flags & dxBodyDisabled) { - if (b->tag) dDebug (0,"disabled body tagged"); - } - else { - if (!b->tag) dDebug (0,"enabled body not tagged"); - } - } - for (j=world->firstjoint; j; j=(dxJoint*)j->next) { - if ((j->node[0].body && (j->node[0].body->flags & dxBodyDisabled)==0) || - (j->node[1].body && (j->node[1].body->flags & dxBodyDisabled)==0)) { - if (!j->tag) dDebug (0,"attached enabled joint not tagged"); - } - else { - if (j->tag) dDebug (0,"unattached or disabled joint tagged"); - } - } -# endif -} - -//**************************************************************************** -// debugging - -// see if an object list loops on itself (if so, it's bad). - -static int listHasLoops (dObject *first) -{ - if (first==0 || first->next==0) return 0; - dObject *a=first,*b=first->next; - int skip=0; - while (b) { - if (a==b) return 1; - b = b->next; - if (skip) a = a->next; - skip ^= 1; - } - return 0; -} - - -// check the validity of the world data structures - -static void checkWorld (dxWorld *w) -{ - dxBody *b; - dxJoint *j; - - // check there are no loops - if (listHasLoops (w->firstbody)) dDebug (0,"body list has loops"); - if (listHasLoops (w->firstjoint)) dDebug (0,"joint list has loops"); - - // check lists are well formed (check `tome' pointers) - for (b=w->firstbody; b; b=(dxBody*)b->next) { - if (b->next && b->next->tome != &b->next) - dDebug (0,"bad tome pointer in body list"); - } - for (j=w->firstjoint; j; j=(dxJoint*)j->next) { - if (j->next && j->next->tome != &j->next) - dDebug (0,"bad tome pointer in joint list"); - } - - // check counts - int n = 0; - for (b=w->firstbody; b; b=(dxBody*)b->next) n++; - if (w->nb != n) dDebug (0,"body count incorrect"); - n = 0; - for (j=w->firstjoint; j; j=(dxJoint*)j->next) n++; - if (w->nj != n) dDebug (0,"joint count incorrect"); - - // set all tag values to a known value - static int count = 0; - count++; - for (b=w->firstbody; b; b=(dxBody*)b->next) b->tag = count; - for (j=w->firstjoint; j; j=(dxJoint*)j->next) j->tag = count; - - // check all body/joint world pointers are ok - for (b=w->firstbody; b; b=(dxBody*)b->next) if (b->world != w) - dDebug (0,"bad world pointer in body list"); - for (j=w->firstjoint; j; j=(dxJoint*)j->next) if (j->world != w) - dDebug (0,"bad world pointer in joint list"); - - /* - // check for half-connected joints - actually now these are valid - for (j=w->firstjoint; j; j=(dxJoint*)j->next) { - if (j->node[0].body || j->node[1].body) { - if (!(j->node[0].body && j->node[1].body)) - dDebug (0,"half connected joint found"); - } - } - */ - - // check that every joint node appears in the joint lists of both bodies it - // attaches - for (j=w->firstjoint; j; j=(dxJoint*)j->next) { - for (int i=0; i<2; i++) { - if (j->node[i].body) { - int ok = 0; - for (dxJointNode *n=j->node[i].body->firstjoint; n; n=n->next) { - if (n->joint == j) ok = 1; - } - if (ok==0) dDebug (0,"joint not in joint list of attached body"); - } - } - } - - // check all body joint lists (correct body ptrs) - for (b=w->firstbody; b; b=(dxBody*)b->next) { - for (dxJointNode *n=b->firstjoint; n; n=n->next) { - if (&n->joint->node[0] == n) { - if (n->joint->node[1].body != b) - dDebug (0,"bad body pointer in joint node of body list (1)"); - } - else { - if (n->joint->node[0].body != b) - dDebug (0,"bad body pointer in joint node of body list (2)"); - } - if (n->joint->tag != count) dDebug (0,"bad joint node pointer in body"); - } - } - - // check all body pointers in joints, check they are distinct - for (j=w->firstjoint; j; j=(dxJoint*)j->next) { - if (j->node[0].body && (j->node[0].body == j->node[1].body)) - dDebug (0,"non-distinct body pointers in joint"); - if ((j->node[0].body && j->node[0].body->tag != count) || - (j->node[1].body && j->node[1].body->tag != count)) - dDebug (0,"bad body pointer in joint"); - } -} - - -void dWorldCheck (dxWorld *w) -{ - checkWorld (w); -} - -//**************************************************************************** -// body - -dxBody *dBodyCreate (dxWorld *w) -{ - dAASSERT (w); - dxBody *b = new dxBody; - initObject (b,w); - b->firstjoint = 0; - b->flags = 0; - dMassSetParameters (&b->mass,1,0,0,0,1,1,1,0,0,0); - dSetZero (b->invI,4*3); - b->invI[0] = 1; - b->invI[5] = 1; - b->invI[10] = 1; - b->invMass = 1; - dSetZero (b->pos,4); - dSetZero (b->q,4); - b->q[0] = 1; - dRSetIdentity (b->R); - dSetZero (b->lvel,4); - dSetZero (b->avel,4); - dSetZero (b->facc,4); - dSetZero (b->tacc,4); - dSetZero (b->finite_rot_axis,4); - addObjectToList (b,(dObject **) &w->firstbody); - w->nb++; - return b; -} - - -void dBodyDestroy (dxBody *b) -{ - dAASSERT (b); - - // detach all neighbouring joints, then delete this body. - dxJointNode *n = b->firstjoint; - while (n) { - // sneaky trick to speed up removal of joint references (black magic) - n->joint->node[(n == n->joint->node)].body = 0; - - dxJointNode *next = n->next; - n->next = 0; - removeJointReferencesFromAttachedBodies (n->joint); - n = next; - } - removeObjectFromList (b); - b->world->nb--; - delete b; -} - - -void dBodySetData (dBodyID b, void *data) -{ - dAASSERT (b); - b->userdata = data; -} - - -void *dBodyGetData (dBodyID b) -{ - dAASSERT (b); - return b->userdata; -} - - -void dBodySetPosition (dBodyID b, dReal x, dReal y, dReal z) -{ - dAASSERT (b); - b->pos[0] = x; - b->pos[1] = y; - b->pos[2] = z; -} - - -void dBodySetRotation (dBodyID b, const dMatrix3 R) -{ - dAASSERT (b && R); - dQuaternion q; - dRtoQ (R,q); - dNormalize4 (q); - b->q[0] = q[0]; - b->q[1] = q[1]; - b->q[2] = q[2]; - b->q[3] = q[3]; - dQtoR (b->q,b->R); -} - - -void dBodySetQuaternion (dBodyID b, const dQuaternion q) -{ - dAASSERT (b && q); - b->q[0] = q[0]; - b->q[1] = q[1]; - b->q[2] = q[2]; - b->q[3] = q[3]; - dNormalize4 (b->q); - dQtoR (b->q,b->R); -} - - -void dBodySetLinearVel (dBodyID b, dReal x, dReal y, dReal z) -{ - dAASSERT (b); - b->lvel[0] = x; - b->lvel[1] = y; - b->lvel[2] = z; -} - - -void dBodySetAngularVel (dBodyID b, dReal x, dReal y, dReal z) -{ - dAASSERT (b); - b->avel[0] = x; - b->avel[1] = y; - b->avel[2] = z; -} - - -const dReal * dBodyGetPosition (dBodyID b) -{ - dAASSERT (b); - return b->pos; -} - - -const dReal * dBodyGetRotation (dBodyID b) -{ - dAASSERT (b); - return b->R; -} - - -const dReal * dBodyGetQuaternion (dBodyID b) -{ - dAASSERT (b); - return b->q; -} - - -const dReal * dBodyGetLinearVel (dBodyID b) -{ - dAASSERT (b); - return b->lvel; -} - - -const dReal * dBodyGetAngularVel (dBodyID b) -{ - dAASSERT (b); - return b->avel; -} - - -void dBodySetMass (dBodyID b, const dMass *mass) -{ - dAASSERT (b && mass); - memcpy (&b->mass,mass,sizeof(dMass)); - if (dInvertPDMatrix (b->mass.I,b->invI,3)==0) { - dDEBUGMSG ("inertia must be positive definite"); - dRSetIdentity (b->invI); - } - b->invMass = dRecip(b->mass.mass); -} - - -void dBodyGetMass (dBodyID b, dMass *mass) -{ - dAASSERT (b && mass); - memcpy (mass,&b->mass,sizeof(dMass)); -} - - -void dBodyAddForce (dBodyID b, dReal fx, dReal fy, dReal fz) -{ - dAASSERT (b); - b->facc[0] += fx; - b->facc[1] += fy; - b->facc[2] += fz; -} - - -void dBodyAddTorque (dBodyID b, dReal fx, dReal fy, dReal fz) -{ - dAASSERT (b); - b->tacc[0] += fx; - b->tacc[1] += fy; - b->tacc[2] += fz; -} - - -void dBodyAddRelForce (dBodyID b, dReal fx, dReal fy, dReal fz) -{ - dAASSERT (b); - dVector3 t1,t2; - t1[0] = fx; - t1[1] = fy; - t1[2] = fz; - t1[3] = 0; - dMULTIPLY0_331 (t2,b->R,t1); - b->facc[0] += t2[0]; - b->facc[1] += t2[1]; - b->facc[2] += t2[2]; -} - - -void dBodyAddRelTorque (dBodyID b, dReal fx, dReal fy, dReal fz) -{ - dAASSERT (b); - dVector3 t1,t2; - t1[0] = fx; - t1[1] = fy; - t1[2] = fz; - t1[3] = 0; - dMULTIPLY0_331 (t2,b->R,t1); - b->tacc[0] += t2[0]; - b->tacc[1] += t2[1]; - b->tacc[2] += t2[2]; -} - - -void dBodyAddForceAtPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) -{ - dAASSERT (b); - b->facc[0] += fx; - b->facc[1] += fy; - b->facc[2] += fz; - dVector3 f,q; - f[0] = fx; - f[1] = fy; - f[2] = fz; - q[0] = px - b->pos[0]; - q[1] = py - b->pos[1]; - q[2] = pz - b->pos[2]; - dCROSS (b->tacc,+=,q,f); -} - - -void dBodyAddForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) -{ - dAASSERT (b); - dVector3 prel,f,p; - f[0] = fx; - f[1] = fy; - f[2] = fz; - f[3] = 0; - prel[0] = px; - prel[1] = py; - prel[2] = pz; - prel[3] = 0; - dMULTIPLY0_331 (p,b->R,prel); - b->facc[0] += f[0]; - b->facc[1] += f[1]; - b->facc[2] += f[2]; - dCROSS (b->tacc,+=,p,f); -} - - -void dBodyAddRelForceAtPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) -{ - dAASSERT (b); - dVector3 frel,f; - frel[0] = fx; - frel[1] = fy; - frel[2] = fz; - frel[3] = 0; - dMULTIPLY0_331 (f,b->R,frel); - b->facc[0] += f[0]; - b->facc[1] += f[1]; - b->facc[2] += f[2]; - dVector3 q; - q[0] = px - b->pos[0]; - q[1] = py - b->pos[1]; - q[2] = pz - b->pos[2]; - dCROSS (b->tacc,+=,q,f); -} - - -void dBodyAddRelForceAtRelPos (dBodyID b, dReal fx, dReal fy, dReal fz, - dReal px, dReal py, dReal pz) -{ - dAASSERT (b); - dVector3 frel,prel,f,p; - frel[0] = fx; - frel[1] = fy; - frel[2] = fz; - frel[3] = 0; - prel[0] = px; - prel[1] = py; - prel[2] = pz; - prel[3] = 0; - dMULTIPLY0_331 (f,b->R,frel); - dMULTIPLY0_331 (p,b->R,prel); - b->facc[0] += f[0]; - b->facc[1] += f[1]; - b->facc[2] += f[2]; - dCROSS (b->tacc,+=,p,f); -} - - -const dReal * dBodyGetForce (dBodyID b) -{ - dAASSERT (b); - return b->facc; -} - - -const dReal * dBodyGetTorque (dBodyID b) -{ - dAASSERT (b); - return b->tacc; -} - - -void dBodySetForce (dBodyID b, dReal x, dReal y, dReal z) -{ - dAASSERT (b); - b->facc[0] = x; - b->facc[1] = y; - b->facc[2] = z; -} - - -void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z) -{ - dAASSERT (b); - b->tacc[0] = x; - b->tacc[1] = y; - b->tacc[2] = z; -} - - -void dBodyGetRelPointPos (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) -{ - dAASSERT (b); - dVector3 prel,p; - prel[0] = px; - prel[1] = py; - prel[2] = pz; - prel[3] = 0; - dMULTIPLY0_331 (p,b->R,prel); - result[0] = p[0] + b->pos[0]; - result[1] = p[1] + b->pos[1]; - result[2] = p[2] + b->pos[2]; -} - - -void dBodyGetRelPointVel (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) -{ - dAASSERT (b); - dVector3 prel,p; - prel[0] = px; - prel[1] = py; - prel[2] = pz; - prel[3] = 0; - dMULTIPLY0_331 (p,b->R,prel); - result[0] = b->lvel[0]; - result[1] = b->lvel[1]; - result[2] = b->lvel[2]; - dCROSS (result,+=,b->avel,p); -} - - -void dBodyGetPointVel (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) -{ - dAASSERT (b); - dVector3 p; - p[0] = px - b->pos[0]; - p[1] = py - b->pos[1]; - p[2] = pz - b->pos[2]; - p[3] = 0; - result[0] = b->lvel[0]; - result[1] = b->lvel[1]; - result[2] = b->lvel[2]; - dCROSS (result,+=,b->avel,p); -} - - -void dBodyGetPosRelPoint (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) -{ - dAASSERT (b); - dVector3 prel; - prel[0] = px - b->pos[0]; - prel[1] = py - b->pos[1]; - prel[2] = pz - b->pos[2]; - prel[3] = 0; - dMULTIPLY1_331 (result,b->R,prel); -} - - -void dBodyVectorToWorld (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) -{ - dAASSERT (b); - dVector3 p; - p[0] = px; - p[1] = py; - p[2] = pz; - p[3] = 0; - dMULTIPLY0_331 (result,b->R,p); -} - - -void dBodyVectorFromWorld (dBodyID b, dReal px, dReal py, dReal pz, - dVector3 result) -{ - dAASSERT (b); - dVector3 p; - p[0] = px; - p[1] = py; - p[2] = pz; - p[3] = 0; - dMULTIPLY1_331 (result,b->R,p); -} - - -void dBodySetFiniteRotationMode (dBodyID b, int mode) -{ - dAASSERT (b); - b->flags &= ~(dxBodyFlagFiniteRotation | dxBodyFlagFiniteRotationAxis); - if (mode) { - b->flags |= dxBodyFlagFiniteRotation; - if (b->finite_rot_axis[0] != 0 || b->finite_rot_axis[1] != 0 || - b->finite_rot_axis[2] != 0) { - b->flags |= dxBodyFlagFiniteRotationAxis; - } - } -} - - -void dBodySetFiniteRotationAxis (dBodyID b, dReal x, dReal y, dReal z) -{ - dAASSERT (b); - b->finite_rot_axis[0] = x; - b->finite_rot_axis[1] = y; - b->finite_rot_axis[2] = z; - if (x != 0 || y != 0 || z != 0) { - dNormalize3 (b->finite_rot_axis); - b->flags |= dxBodyFlagFiniteRotationAxis; - } - else { - b->flags &= ~dxBodyFlagFiniteRotationAxis; - } -} - - -int dBodyGetFiniteRotationMode (dBodyID b) -{ - dAASSERT (b); - return ((b->flags & dxBodyFlagFiniteRotation) != 0); -} - - -void dBodyGetFiniteRotationAxis (dBodyID b, dVector3 result) -{ - dAASSERT (b); - result[0] = b->finite_rot_axis[0]; - result[1] = b->finite_rot_axis[1]; - result[2] = b->finite_rot_axis[2]; -} - - -int dBodyGetNumJoints (dBodyID b) -{ - dAASSERT (b); - int count=0; - for (dxJointNode *n=b->firstjoint; n; n=n->next, count++); - return count; -} - - -dJointID dBodyGetJoint (dBodyID b, int index) -{ - dAASSERT (b); - int i=0; - for (dxJointNode *n=b->firstjoint; n; n=n->next, i++) { - if (i == index) return n->joint; - } - return 0; -} - - -void dBodyEnable (dBodyID b) -{ - dAASSERT (b); - b->flags &= ~dxBodyDisabled; -} - - -void dBodyDisable (dBodyID b) -{ - dAASSERT (b); - b->flags |= dxBodyDisabled; -} - - -int dBodyIsEnabled (dBodyID b) -{ - dAASSERT (b); - return ((b->flags & dxBodyDisabled) == 0); -} - - -void dBodySetGravityMode (dBodyID b, int mode) -{ - dAASSERT (b); - if (mode) b->flags &= ~dxBodyNoGravity; - else b->flags |= dxBodyNoGravity; -} - - -int dBodyGetGravityMode (dBodyID b) -{ - dAASSERT (b); - return ((b->flags & dxBodyNoGravity) == 0); -} - -//**************************************************************************** -// joints - -static void dJointInit (dxWorld *w, dxJoint *j) -{ - dIASSERT (w && j); - initObject (j,w); - j->vtable = 0; - j->flags = 0; - j->node[0].joint = j; - j->node[0].body = 0; - j->node[0].next = 0; - j->node[1].joint = j; - j->node[1].body = 0; - j->node[1].next = 0; - addObjectToList (j,(dObject **) &w->firstjoint); - w->nj++; -} - - -static dxJoint *createJoint (dWorldID w, dJointGroupID group, - dxJoint::Vtable *vtable) -{ - dIASSERT (w && vtable); - dxJoint *j; - if (group) { - j = (dxJoint*) group->stack.alloc (vtable->size); - group->num++; - } - else j = (dxJoint*) dAlloc (vtable->size); - dJointInit (w,j); - j->vtable = vtable; - if (group) j->flags |= dJOINT_INGROUP; - if (vtable->init) vtable->init (j); - j->feedback = 0; - return j; -} - - -dxJoint * dJointCreateBall (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__dball_vtable); -} - - -dxJoint * dJointCreateHinge (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__dhinge_vtable); -} - - -dxJoint * dJointCreateSlider (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__dslider_vtable); -} - - -dxJoint * dJointCreateContact (dWorldID w, dJointGroupID group, - const dContact *c) -{ - dAASSERT (w && c); - dxJointContact *j = (dxJointContact *) - createJoint (w,group,&__dcontact_vtable); - j->contact = *c; - return j; -} - - -dxJoint * dJointCreateHinge2 (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__dhinge2_vtable); -} - - -dxJoint * dJointCreateUniversal (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__duniversal_vtable); -} - - -dxJoint * dJointCreateFixed (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__dfixed_vtable); -} - - -dxJoint * dJointCreateNull (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__dnull_vtable); -} - - -dxJoint * dJointCreateAMotor (dWorldID w, dJointGroupID group) -{ - dAASSERT (w); - return createJoint (w,group,&__damotor_vtable); -} - - -void dJointDestroy (dxJoint *j) -{ - dAASSERT (j); - if (j->flags & dJOINT_INGROUP) return; - removeJointReferencesFromAttachedBodies (j); - removeObjectFromList (j); - j->world->nj--; - dFree (j,j->vtable->size); -} - - -dJointGroupID dJointGroupCreate (int max_size) -{ - // not any more ... dUASSERT (max_size > 0,"max size must be > 0"); - dxJointGroup *group = new dxJointGroup; - group->num = 0; - return group; -} - - -void dJointGroupDestroy (dJointGroupID group) -{ - dAASSERT (group); - dJointGroupEmpty (group); - delete group; -} - - -void dJointGroupEmpty (dJointGroupID group) -{ - // the joints in this group are detached starting from the most recently - // added (at the top of the stack). this helps ensure that the various - // linked lists are not traversed too much, as the joints will hopefully - // be at the start of those lists. - // if any group joints have their world pointer set to 0, their world was - // previously destroyed. no special handling is required for these joints. - - dAASSERT (group); - int i; - dxJoint **jlist = (dxJoint**) ALLOCA (group->num * sizeof(dxJoint*)); - dxJoint *j = (dxJoint*) group->stack.rewind(); - for (i=0; i < group->num; i++) { - jlist[i] = j; - j = (dxJoint*) (group->stack.next (j->vtable->size)); - } - for (i=group->num-1; i >= 0; i--) { - if (jlist[i]->world) { - removeJointReferencesFromAttachedBodies (jlist[i]); - removeObjectFromList (jlist[i]); - jlist[i]->world->nj--; - } - } - group->num = 0; - group->stack.freeAll(); -} - - -void dJointAttach (dxJoint *joint, dxBody *body1, dxBody *body2) -{ - // check arguments - dUASSERT (joint,"bad joint argument"); - dUASSERT (body1 == 0 || body1 != body2,"can't have body1==body2"); - dxWorld *world = joint->world; - dUASSERT ( (!body1 || body1->world == world) && - (!body2 || body2->world == world), - "joint and bodies must be in same world"); - - // check if the joint can not be attached to just one body - dUASSERT (!((joint->flags & dJOINT_TWOBODIES) && - ((body1 != 0) ^ (body2 != 0))), - "joint can not be attached to just one body"); - - // remove any existing body attachments - if (joint->node[0].body || joint->node[1].body) { - removeJointReferencesFromAttachedBodies (joint); - } - - // if a body is zero, make sure that it is body2, so 0 --> node[1].body - if (body1==0) { - body1 = body2; - body2 = 0; - joint->flags &= (~dJOINT_REVERSE); - } - else { - joint->flags |= dJOINT_REVERSE; - } - - // attach to new bodies - joint->node[0].body = body1; - joint->node[1].body = body2; - if (body1) { - joint->node[1].next = body1->firstjoint; - body1->firstjoint = &joint->node[1]; - } - else joint->node[1].next = 0; - if (body2) { - joint->node[0].next = body2->firstjoint; - body2->firstjoint = &joint->node[0]; - } - else { - joint->node[0].next = 0; - } -} - - -void dJointSetData (dxJoint *joint, void *data) -{ - dAASSERT (joint); - joint->userdata = data; -} - - -void *dJointGetData (dxJoint *joint) -{ - dAASSERT (joint); - return joint->userdata; -} - - -int dJointGetType (dxJoint *joint) -{ - dAASSERT (joint); - return joint->vtable->typenum; -} - - -dBodyID dJointGetBody (dxJoint *joint, int index) -{ - dAASSERT (joint); - if (index >= 0 && index < 2) return joint->node[index].body; - else return 0; -} - - -void dJointSetFeedback (dxJoint *joint, dJointFeedback *f) -{ - dAASSERT (joint); - joint->feedback = f; -} - - -dJointFeedback *dJointGetFeedback (dxJoint *joint) -{ - dAASSERT (joint); - return joint->feedback; -} - - -int dAreConnected (dBodyID b1, dBodyID b2) -{ - dAASSERT (b1 && b2); - // look through b1's neighbour list for b2 - for (dxJointNode *n=b1->firstjoint; n; n=n->next) { - if (n->body == b2) return 1; - } - return 0; -} - -//**************************************************************************** -// world - -dxWorld * dWorldCreate() -{ - dxWorld *w = new dxWorld; - w->firstbody = 0; - w->firstjoint = 0; - w->nb = 0; - w->nj = 0; - dSetZero (w->gravity,4); - w->global_erp = REAL(0.2); -#if defined(dSINGLE) - w->global_cfm = 1e-5f; -#elif defined(dDOUBLE) - w->global_cfm = 1e-10; -#else - #error dSINGLE or dDOUBLE must be defined -#endif - return w; -} - - -void dWorldDestroy (dxWorld *w) -{ - // delete all bodies and joints - dAASSERT (w); - dxBody *nextb, *b = w->firstbody; - while (b) { - nextb = (dxBody*) b->next; - delete b; - b = nextb; - } - dxJoint *nextj, *j = w->firstjoint; - while (j) { - nextj = (dxJoint*)j->next; - if (j->flags & dJOINT_INGROUP) { - // the joint is part of a group, so "deactivate" it instead - j->world = 0; - j->node[0].body = 0; - j->node[0].next = 0; - j->node[1].body = 0; - j->node[1].next = 0; - dMessage (0,"warning: destroying world containing grouped joints"); - } - else { - dFree (j,j->vtable->size); - } - j = nextj; - } - delete w; -} - - -void dWorldSetGravity (dWorldID w, dReal x, dReal y, dReal z) -{ - dAASSERT (w); - w->gravity[0] = x; - w->gravity[1] = y; - w->gravity[2] = z; -} - - -void dWorldGetGravity (dWorldID w, dVector3 g) -{ - dAASSERT (w); - g[0] = w->gravity[0]; - g[1] = w->gravity[1]; - g[2] = w->gravity[2]; -} - - -void dWorldSetERP (dWorldID w, dReal erp) -{ - dAASSERT (w); - w->global_erp = erp; -} - - -dReal dWorldGetERP (dWorldID w) -{ - dAASSERT (w); - return w->global_erp; -} - - -void dWorldSetCFM (dWorldID w, dReal cfm) -{ - dAASSERT (w); - w->global_cfm = cfm; -} - - -dReal dWorldGetCFM (dWorldID w) -{ - dAASSERT (w); - return w->global_cfm; -} - - -void dWorldStep (dWorldID w, dReal stepsize) -{ - dUASSERT (w,"bad world argument"); - dUASSERT (stepsize > 0,"stepsize must be > 0"); - processIslands (w,stepsize); -} - - -void dWorldImpulseToForce (dWorldID w, dReal stepsize, - dReal ix, dReal iy, dReal iz, - dVector3 force) -{ - dAASSERT (w); - stepsize = dRecip(stepsize); - force[0] = stepsize * ix; - force[1] = stepsize * iy; - force[2] = stepsize * iz; - // @@@ force[3] = 0; -} - -//**************************************************************************** -// testing - -#define NUM 100 - -#define DO(x) - - -extern "C" void dTestDataStructures() -{ - int i; - DO(printf ("testDynamicsStuff()\n")); - - dBodyID body [NUM]; - int nb = 0; - dJointID joint [NUM]; - int nj = 0; - - for (i=0; i 0.5) { - DO(printf ("creating body\n")); - body[nb] = dBodyCreate (w); - DO(printf ("\t--> %p\n",body[nb])); - nb++; - checkWorld (w); - DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); - } - if (nj < NUM && nb > 2 && dRandReal() > 0.5) { - dBodyID b1 = body [dRand() % nb]; - dBodyID b2 = body [dRand() % nb]; - if (b1 != b2) { - DO(printf ("creating joint, attaching to %p,%p\n",b1,b2)); - joint[nj] = dJointCreateBall (w,0); - DO(printf ("\t-->%p\n",joint[nj])); - checkWorld (w); - dJointAttach (joint[nj],b1,b2); - nj++; - checkWorld (w); - DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); - } - } - if (nj > 0 && nb > 2 && dRandReal() > 0.5) { - dBodyID b1 = body [dRand() % nb]; - dBodyID b2 = body [dRand() % nb]; - if (b1 != b2) { - int k = dRand() % nj; - DO(printf ("reattaching joint %p\n",joint[k])); - dJointAttach (joint[k],b1,b2); - checkWorld (w); - DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); - } - } - if (nb > 0 && dRandReal() > 0.5) { - int k = dRand() % nb; - DO(printf ("destroying body %p\n",body[k])); - dBodyDestroy (body[k]); - checkWorld (w); - for (; k < (NUM-1); k++) body[k] = body[k+1]; - nb--; - DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); - } - if (nj > 0 && dRandReal() > 0.5) { - int k = dRand() % nj; - DO(printf ("destroying joint %p\n",joint[k])); - dJointDestroy (joint[k]); - checkWorld (w); - for (; k < (NUM-1); k++) joint[k] = joint[k+1]; - nj--; - DO(printf ("%d BODIES, %d JOINTS\n",nb,nj)); - } - } - - /* - printf ("creating world\n"); - dWorldID w = dWorldCreate(); - checkWorld (w); - printf ("creating body\n"); - dBodyID b1 = dBodyCreate (w); - checkWorld (w); - printf ("creating body\n"); - dBodyID b2 = dBodyCreate (w); - checkWorld (w); - printf ("creating joint\n"); - dJointID j = dJointCreateBall (w); - checkWorld (w); - printf ("attaching joint\n"); - dJointAttach (j,b1,b2); - checkWorld (w); - printf ("destroying joint\n"); - dJointDestroy (j); - checkWorld (w); - printf ("destroying body\n"); - dBodyDestroy (b1); - checkWorld (w); - printf ("destroying body\n"); - dBodyDestroy (b2); - checkWorld (w); - printf ("destroying world\n"); - dWorldDestroy (w); - */ -} diff --git a/extern/ode/dist/ode/src/odemath.cpp b/extern/ode/dist/ode/src/odemath.cpp deleted file mode 100644 index cd6dbc855fe..00000000000 --- a/extern/ode/dist/ode/src/odemath.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#define SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE 1 -#include -#include - - -// get some math functions under windows -#ifdef WIN32 -#include -#ifndef CYGWIN // added by andy for cygwin -#define copysign(a,b) ((dReal)_copysign(a,b)) -#endif // added by andy for cygwin -#endif - - -// infinity declaration - -#ifdef DINFINITY_DECL -DINFINITY_DECL -#endif - - -// this may be called for vectors `a' with extremely small magnitude, for -// example the result of a cross product on two nearly perpendicular vectors. -// we must be robust to these small vectors. to prevent numerical error, -// first find the component a[i] with the largest magnitude and then scale -// all the components by 1/a[i]. then we can compute the length of `a' and -// scale the components by 1/l. this has been verified to work with vectors -// containing the smallest representable numbers. - -void dNormalize3 (dVector3 a) -{ - dReal a0,a1,a2,aa0,aa1,aa2,l; - dAASSERT (a); - a0 = a[0]; - a1 = a[1]; - a2 = a[2]; - aa0 = dFabs(a0); - aa1 = dFabs(a1); - aa2 = dFabs(a2); - if (aa1 > aa0) { - if (aa2 > aa1) { - goto aa2_largest; - } - else { // aa1 is largest - a0 /= aa1; - a2 /= aa1; - l = dRecipSqrt (a0*a0 + a2*a2 + 1); - a[0] = a0*l; - a[1] = copysign(l,a1); - a[2] = a2*l; - } - } - else { - if (aa2 > aa0) { - aa2_largest: // aa2 is largest - a0 /= aa2; - a1 /= aa2; - l = dRecipSqrt (a0*a0 + a1*a1 + 1); - a[0] = a0*l; - a[1] = a1*l; - a[2] = copysign(l,a2); - } - else { // aa0 is largest - if (aa0 <= 0) { - dDEBUGMSG ("vector has zero size"); - a[0] = 1; // if all a's are zero, this is where we'll end up. - a[1] = 0; // return a default unit length vector. - a[2] = 0; - return; - } - a1 /= aa0; - a2 /= aa0; - l = dRecipSqrt (a1*a1 + a2*a2 + 1); - a[0] = copysign(l,a0); - a[1] = a1*l; - a[2] = a2*l; - } - } -} - - -/* OLD VERSION */ -/* -void dNormalize3 (dVector3 a) -{ - dASSERT (a); - dReal l = dDOT(a,a); - if (l > 0) { - l = dRecipSqrt(l); - a[0] *= l; - a[1] *= l; - a[2] *= l; - } - else { - a[0] = 1; - a[1] = 0; - a[2] = 0; - } -} -*/ - - -void dNormalize4 (dVector4 a) -{ - dAASSERT (a); - dReal l = dDOT(a,a)+a[3]*a[3]; - if (l > 0) { - l = dRecipSqrt(l); - a[0] *= l; - a[1] *= l; - a[2] *= l; - a[3] *= l; - } - else { - dDEBUGMSG ("vector has zero size"); - a[0] = 1; - a[1] = 0; - a[2] = 0; - a[3] = 0; - } -} - - -void dPlaneSpace (const dVector3 n, dVector3 p, dVector3 q) -{ - dAASSERT (n && p && q); - if (dFabs(n[2]) > M_SQRT1_2) { - // choose p in y-z plane - dReal a = n[1]*n[1] + n[2]*n[2]; - dReal k = dRecipSqrt (a); - p[0] = 0; - p[1] = -n[2]*k; - p[2] = n[1]*k; - // set q = n x p - q[0] = a*k; - q[1] = -n[0]*p[2]; - q[2] = n[0]*p[1]; - } - else { - // choose p in x-y plane - dReal a = n[0]*n[0] + n[1]*n[1]; - dReal k = dRecipSqrt (a); - p[0] = -n[1]*k; - p[1] = n[0]*k; - p[2] = 0; - // set q = n x p - q[0] = -n[2]*p[1]; - q[1] = n[2]*p[0]; - q[2] = a*k; - } -} diff --git a/extern/ode/dist/ode/src/rotation.cpp b/extern/ode/dist/ode/src/rotation.cpp deleted file mode 100644 index 22b9fb13820..00000000000 --- a/extern/ode/dist/ode/src/rotation.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -quaternions have the format: (s,vx,vy,vz) where (vx,vy,vz) is the -"rotation axis" and s is the "rotation angle". - -*/ - -#include - - -#define _R(i,j) R[(i)*4+(j)] - -#define SET_3x3_IDENTITY \ - _R(0,0) = REAL(1.0); \ - _R(0,1) = REAL(0.0); \ - _R(0,2) = REAL(0.0); \ - _R(0,3) = REAL(0.0); \ - _R(1,0) = REAL(0.0); \ - _R(1,1) = REAL(1.0); \ - _R(1,2) = REAL(0.0); \ - _R(1,3) = REAL(0.0); \ - _R(2,0) = REAL(0.0); \ - _R(2,1) = REAL(0.0); \ - _R(2,2) = REAL(1.0); \ - _R(2,3) = REAL(0.0); - - -void dRSetIdentity (dMatrix3 R) -{ - dAASSERT (R); - SET_3x3_IDENTITY; -} - - -void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az, - dReal angle) -{ - dAASSERT (R); - dQuaternion q; - dQFromAxisAndAngle (q,ax,ay,az,angle); - dQtoR (q,R); -} - - -void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi) -{ - dReal sphi,cphi,stheta,ctheta,spsi,cpsi; - dAASSERT (R); - sphi = dSin(phi); - cphi = dCos(phi); - stheta = dSin(theta); - ctheta = dCos(theta); - spsi = dSin(psi); - cpsi = dCos(psi); - _R(0,0) = cpsi*ctheta; - _R(0,1) = spsi*ctheta; - _R(0,2) =-stheta; - _R(1,0) = cpsi*stheta*sphi - spsi*cphi; - _R(1,1) = spsi*stheta*sphi + cpsi*cphi; - _R(1,2) = ctheta*sphi; - _R(2,0) = cpsi*stheta*cphi + spsi*sphi; - _R(2,1) = spsi*stheta*cphi - cpsi*sphi; - _R(2,2) = ctheta*cphi; -} - - -void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az, - dReal bx, dReal by, dReal bz) -{ - dReal l,k; - dAASSERT (R); - l = dSqrt (ax*ax + ay*ay + az*az); - if (l <= REAL(0.0)) { - dDEBUGMSG ("zero length vector"); - return; - } - l = dRecip(l); - ax *= l; - ay *= l; - az *= l; - k = ax*bx + ay*by + az*bz; - bx -= k*ax; - by -= k*ay; - bz -= k*az; - l = dSqrt (bx*bx + by*by + bz*bz); - if (l <= REAL(0.0)) { - dDEBUGMSG ("zero length vector"); - return; - } - l = dRecip(l); - bx *= l; - by *= l; - bz *= l; - _R(0,0) = ax; - _R(1,0) = ay; - _R(2,0) = az; - _R(0,1) = bx; - _R(1,1) = by; - _R(2,1) = bz; - _R(0,2) = - by*az + ay*bz; - _R(1,2) = - bz*ax + az*bx; - _R(2,2) = - bx*ay + ax*by; -} - - -void dQSetIdentity (dQuaternion q) -{ - dAASSERT (q); - q[0] = 1; - q[1] = 0; - q[2] = 0; - q[3] = 0; -} - - -void dQFromAxisAndAngle (dQuaternion q, dReal ax, dReal ay, dReal az, - dReal angle) -{ - dAASSERT (q); - dReal l = ax*ax + ay*ay + az*az; - if (l > REAL(0.0)) { - angle *= REAL(0.5); - q[0] = dCos (angle); - l = dSin(angle) * dRecipSqrt(l); - q[1] = ax*l; - q[2] = ay*l; - q[3] = az*l; - } - else { - q[0] = 1; - q[1] = 0; - q[2] = 0; - q[3] = 0; - } -} - - -void dQMultiply0 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc) -{ - dAASSERT (qa && qb && qc); - qa[0] = qb[0]*qc[0] - qb[1]*qc[1] - qb[2]*qc[2] - qb[3]*qc[3]; - qa[1] = qb[0]*qc[1] + qb[1]*qc[0] + qb[2]*qc[3] - qb[3]*qc[2]; - qa[2] = qb[0]*qc[2] + qb[2]*qc[0] + qb[3]*qc[1] - qb[1]*qc[3]; - qa[3] = qb[0]*qc[3] + qb[3]*qc[0] + qb[1]*qc[2] - qb[2]*qc[1]; -} - - -void dQMultiply1 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc) -{ - dAASSERT (qa && qb && qc); - qa[0] = qb[0]*qc[0] + qb[1]*qc[1] + qb[2]*qc[2] + qb[3]*qc[3]; - qa[1] = qb[0]*qc[1] - qb[1]*qc[0] - qb[2]*qc[3] + qb[3]*qc[2]; - qa[2] = qb[0]*qc[2] - qb[2]*qc[0] - qb[3]*qc[1] + qb[1]*qc[3]; - qa[3] = qb[0]*qc[3] - qb[3]*qc[0] - qb[1]*qc[2] + qb[2]*qc[1]; -} - - -void dQMultiply2 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc) -{ - dAASSERT (qa && qb && qc); - qa[0] = qb[0]*qc[0] + qb[1]*qc[1] + qb[2]*qc[2] + qb[3]*qc[3]; - qa[1] = -qb[0]*qc[1] + qb[1]*qc[0] - qb[2]*qc[3] + qb[3]*qc[2]; - qa[2] = -qb[0]*qc[2] + qb[2]*qc[0] - qb[3]*qc[1] + qb[1]*qc[3]; - qa[3] = -qb[0]*qc[3] + qb[3]*qc[0] - qb[1]*qc[2] + qb[2]*qc[1]; -} - - -void dQMultiply3 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc) -{ - dAASSERT (qa && qb && qc); - qa[0] = qb[0]*qc[0] - qb[1]*qc[1] - qb[2]*qc[2] - qb[3]*qc[3]; - qa[1] = -qb[0]*qc[1] - qb[1]*qc[0] + qb[2]*qc[3] - qb[3]*qc[2]; - qa[2] = -qb[0]*qc[2] - qb[2]*qc[0] + qb[3]*qc[1] - qb[1]*qc[3]; - qa[3] = -qb[0]*qc[3] - qb[3]*qc[0] + qb[1]*qc[2] - qb[2]*qc[1]; -} - - -// QtoR(), RtoQ() and WtoDQ() are derived from equations in "An Introduction -// to Physically Based Modeling: Rigid Body Simulation - 1: Unconstrained -// Rigid Body Dynamics" by David Baraff, Robotics Institute, Carnegie Mellon -// University, 1997. - -void dQtoR (const dQuaternion q, dMatrix3 R) -{ - dAASSERT (q && R); - // q = (s,vx,vy,vz) - dReal qq1 = 2*q[1]*q[1]; - dReal qq2 = 2*q[2]*q[2]; - dReal qq3 = 2*q[3]*q[3]; - _R(0,0) = 1 - qq2 - qq3; - _R(0,1) = 2*(q[1]*q[2] - q[0]*q[3]); - _R(0,2) = 2*(q[1]*q[3] + q[0]*q[2]); - _R(1,0) = 2*(q[1]*q[2] + q[0]*q[3]); - _R(1,1) = 1 - qq1 - qq3; - _R(1,2) = 2*(q[2]*q[3] - q[0]*q[1]); - _R(2,0) = 2*(q[1]*q[3] - q[0]*q[2]); - _R(2,1) = 2*(q[2]*q[3] + q[0]*q[1]); - _R(2,2) = 1 - qq1 - qq2; -} - - -void dRtoQ (const dMatrix3 R, dQuaternion q) -{ - dAASSERT (q && R); - dReal tr,s; - tr = _R(0,0) + _R(1,1) + _R(2,2); - if (tr >= 0) { - s = dSqrt (tr + 1); - q[0] = REAL(0.5) * s; - s = REAL(0.5) * dRecip(s); - q[1] = (_R(2,1) - _R(1,2)) * s; - q[2] = (_R(0,2) - _R(2,0)) * s; - q[3] = (_R(1,0) - _R(0,1)) * s; - } - else { - // find the largest diagonal element and jump to the appropriate case - if (_R(1,1) > _R(0,0)) { - if (_R(2,2) > _R(1,1)) goto case_2; - goto case_1; - } - if (_R(2,2) > _R(0,0)) goto case_2; - goto case_0; - - case_0: - s = dSqrt((_R(0,0) - (_R(1,1) + _R(2,2))) + 1); - q[1] = REAL(0.5) * s; - s = REAL(0.5) * dRecip(s); - q[2] = (_R(0,1) + _R(1,0)) * s; - q[3] = (_R(2,0) + _R(0,2)) * s; - q[0] = (_R(2,1) - _R(1,2)) * s; - return; - - case_1: - s = dSqrt((_R(1,1) - (_R(2,2) + _R(0,0))) + 1); - q[2] = REAL(0.5) * s; - s = REAL(0.5) * dRecip(s); - q[3] = (_R(1,2) + _R(2,1)) * s; - q[1] = (_R(0,1) + _R(1,0)) * s; - q[0] = (_R(0,2) - _R(2,0)) * s; - return; - - case_2: - s = dSqrt((_R(2,2) - (_R(0,0) + _R(1,1))) + 1); - q[3] = REAL(0.5) * s; - s = REAL(0.5) * dRecip(s); - q[1] = (_R(2,0) + _R(0,2)) * s; - q[2] = (_R(1,2) + _R(2,1)) * s; - q[0] = (_R(1,0) - _R(0,1)) * s; - return; - } -} - - -void dWtoDQ (const dVector3 w, const dQuaternion q, dVector4 dq) -{ - dAASSERT (w && q && dq); - dq[0] = REAL(0.5)*(- w[0]*q[1] - w[1]*q[2] - w[2]*q[3]); - dq[1] = REAL(0.5)*( w[0]*q[0] + w[1]*q[3] - w[2]*q[2]); - dq[2] = REAL(0.5)*(- w[0]*q[3] + w[1]*q[0] + w[2]*q[1]); - dq[3] = REAL(0.5)*( w[0]*q[2] - w[1]*q[1] + w[2]*q[0]); -} diff --git a/extern/ode/dist/ode/src/scrapbook.cpp b/extern/ode/dist/ode/src/scrapbook.cpp deleted file mode 100644 index ca8c11f1f1b..00000000000 --- a/extern/ode/dist/ode/src/scrapbook.cpp +++ /dev/null @@ -1,270 +0,0 @@ - -/* - -this is code that was once useful but has now been obseleted. - -this file should not be compiled as part of ODE! - -*/ - -//*************************************************************************** -// intersect a line segment with a plane - -extern "C" int dClipLineToBox (const dVector3 p1, const dVector3 p2, - const dVector3 p, const dMatrix3 R, - const dVector3 side) -{ - // compute the start and end of the line (p1 and p2) relative to the box. - // we will do all subsequent computations in this box-relative coordinate - // system. we have to do a translation and rotation for each point. - dVector3 tmp,s,e; - tmp[0] = p1[0] - p[0]; - tmp[1] = p1[1] - p[1]; - tmp[2] = p1[2] - p[2]; - dMULTIPLY1_331 (s,R,tmp); - tmp[0] = p2[0] - p[0]; - tmp[1] = p2[1] - p[1]; - tmp[2] = p2[2] - p[2]; - dMULTIPLY1_331 (e,R,tmp); - - // compute the vector 'v' from the start point to the end point - dVector3 v; - v[0] = e[0] - s[0]; - v[1] = e[1] - s[1]; - v[2] = e[2] - s[2]; - - // a point on the line is defined by the parameter 't'. t=0 corresponds - // to the start of the line, t=1 corresponds to the end of the line. - // we will clip the line to the box by finding the range of t where a - // point on the line is inside the box. the currently known bounds for - // t and tlo..thi. - dReal tlo=0,thi=1; - - // clip in the X/Y/Z direction - for (int i=0; i<3; i++) { - // first adjust s,e for the current t range. this is redundant for the - // first iteration, but never mind. - e[i] = s[i] + thi*v[i]; - s[i] = s[i] + tlo*v[i]; - // compute where t intersects the positive and negative sides. - dReal tp = ( side[i] - s[i])/v[i]; // @@@ handle case where denom=0 - dReal tm = (-side[i] - s[i])/v[i]; - // handle 9 intersection cases - if (s[i] <= -side[i]) { - tlo = tm; - if (e[i] <= -side[i]) return 0; - else if (e[i] >= side[i]) thi = tp; - } - else if (s[i] <= side[i]) { - if (e[i] <= -side[i]) thi = tm; - else if (e[i] >= side[i]) thi = tp; - } - else { - tlo = tp; - if (e[i] <= -side[i]) thi = tm; - else if (e[i] >= side[i]) return 0; - } - } - - //... @@@ AT HERE @@@ - - return 1; -} - - -//*************************************************************************** -// a nice try at C-B collision. unfortunately it doesn't work. the logic -// for testing for line-box intersection is correct, but unfortunately the -// closest-point distance estimates are often too large. as a result contact -// points are placed incorrectly. - - -int dCollideCB (const dxGeom *o1, const dxGeom *o2, int flags, - dContactGeom *contact, int skip) -{ - int i; - - dIASSERT (skip >= (int)sizeof(dContactGeom)); - dIASSERT (o1->_class->num == dCCylinderClass); - dIASSERT (o2->_class->num == dBoxClass); - contact->g1 = const_cast (o1); - contact->g2 = const_cast (o2); - dxCCylinder *cyl = (dxCCylinder*) CLASSDATA(o1); - dxBox *box = (dxBox*) CLASSDATA(o2); - - // get p1,p2 = cylinder axis endpoints, get radius - dVector3 p1,p2; - dReal clen = cyl->lz * REAL(0.5); - p1[0] = o1->pos[0] + clen * o1->R[2]; - p1[1] = o1->pos[1] + clen * o1->R[6]; - p1[2] = o1->pos[2] + clen * o1->R[10]; - p2[0] = o1->pos[0] - clen * o1->R[2]; - p2[1] = o1->pos[1] - clen * o1->R[6]; - p2[2] = o1->pos[2] - clen * o1->R[10]; - dReal radius = cyl->radius; - - // copy out box center, rotation matrix, and side array - dReal *c = o2->pos; - dReal *R = o2->R; - dReal *side = box->side; - - // compute the start and end of the line (p1 and p2) relative to the box. - // we will do all subsequent computations in this box-relative coordinate - // system. we have to do a translation and rotation for each point. - dVector3 tmp3,s,e; - tmp3[0] = p1[0] - c[0]; - tmp3[1] = p1[1] - c[1]; - tmp3[2] = p1[2] - c[2]; - dMULTIPLY1_331 (s,R,tmp3); - tmp3[0] = p2[0] - c[0]; - tmp3[1] = p2[1] - c[1]; - tmp3[2] = p2[2] - c[2]; - dMULTIPLY1_331 (e,R,tmp3); - - // compute the vector 'v' from the start point to the end point - dVector3 v; - v[0] = e[0] - s[0]; - v[1] = e[1] - s[1]; - v[2] = e[2] - s[2]; - - // compute the half-sides of the box - dReal S0 = side[0] * REAL(0.5); - dReal S1 = side[1] * REAL(0.5); - dReal S2 = side[2] * REAL(0.5); - - // compute the size of the bounding box around the line segment - dReal B0 = dFabs (v[0]); - dReal B1 = dFabs (v[1]); - dReal B2 = dFabs (v[2]); - - // for all 6 separation axes, measure the penetration depth. if any depth is - // less than 0 then the objects don't penetrate at all so we can just - // return 0. find the axis with the smallest depth, and record its normal. - - // note: normalR is set to point to a column of R if that is the smallest - // depth normal so far. otherwise normalR is 0 and normalC is set to a - // vector relative to the box. invert_normal is 1 if the sign of the normal - // should be flipped. - - dReal depth,trial_depth,tmp,length; - const dReal *normalR=0; - dVector3 normalC; - int invert_normal = 0; - int code = 0; // 0=no contact, 1-3=face contact, 4-6=edge contact - - depth = dInfinity; - - // look at face-normal axes - -#undef TEST -#define TEST(center,depth_expr,norm,contact_code) \ - tmp = (center); \ - trial_depth = radius + REAL(0.5) * ((depth_expr) - dFabs(tmp)); \ - if (trial_depth < 0) return 0; \ - if (trial_depth < depth) { \ - depth = trial_depth; \ - normalR = (norm); \ - invert_normal = (tmp < 0); \ - code = contact_code; \ - } - - TEST (s[0]+e[0], side[0] + B0, R+0, 1); - TEST (s[1]+e[1], side[1] + B1, R+1, 2); - TEST (s[2]+e[2], side[2] + B2, R+2, 3); - - // look at v x box-edge axes - -#undef TEST -#define TEST(box_radius,line_offset,nx,ny,nz,contact_code) \ - tmp = (line_offset); \ - trial_depth = (box_radius) - dFabs(tmp); \ - length = dSqrt ((nx)*(nx) + (ny)*(ny) + (nz)*(nz)); \ - if (length > 0) { \ - length = dRecip(length); \ - trial_depth = trial_depth * length + radius; \ - if (trial_depth < 0) return 0; \ - if (trial_depth < depth) { \ - depth = trial_depth; \ - normalR = 0; \ - normalC[0] = (nx)*length; \ - normalC[1] = (ny)*length; \ - normalC[2] = (nz)*length; \ - invert_normal = (tmp < 0); \ - code = contact_code; \ - } \ - } - - TEST (B2*S1+B1*S2,v[1]*s[2]-v[2]*s[1], 0,-v[2],v[1], 4); - TEST (B2*S0+B0*S2,v[2]*s[0]-v[0]*s[2], v[2],0,-v[0], 5); - TEST (B1*S0+B0*S1,v[0]*s[1]-v[1]*s[0], -v[1],v[0],0, 6); - -#undef TEST - - // if we get to this point, the box and ccylinder interpenetrate. - // compute the normal in global coordinates. - dReal *normal = contact[0].normal; - if (normalR) { - normal[0] = normalR[0]; - normal[1] = normalR[4]; - normal[2] = normalR[8]; - } - else { - dMULTIPLY0_331 (normal,R,normalC); - } - if (invert_normal) { - normal[0] = -normal[0]; - normal[1] = -normal[1]; - normal[2] = -normal[2]; - } - - // set the depth - contact[0].depth = depth; - - if (code == 0) { - return 0; // should never get here - } - else if (code >= 4) { - // handle edge contacts - // find an endpoint q1 on the intersecting edge of the box - dVector3 q1; - dReal sign[3]; - for (i=0; i<3; i++) q1[i] = c[i]; - sign[0] = (dDOT14(normal,R+0) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) q1[i] += sign[0] * S0 * R[i*4]; - sign[1] = (dDOT14(normal,R+1) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) q1[i] += sign[1] * S1 * R[i*4+1]; - sign[2] = (dDOT14(normal,R+2) > 0) ? REAL(1.0) : REAL(-1.0); - for (i=0; i<3; i++) q1[i] += sign[2] * S2 * R[i*4+2]; - - // find the other endpoint q2 of the intersecting edge - dVector3 q2; - for (i=0; i<3; i++) - q2[i] = q1[i] - R[code-4 + i*4] * (sign[code-4] * side[code-4]); - - // determine the closest point between the box edge and the line segment - dVector3 cp1,cp2; - dClosestLineSegmentPoints (q1,q2, p1,p2, cp1,cp2); - for (i=0; i<3; i++) contact[0].pos[i] = cp1[i] - REAL(0.5)*normal[i]*depth; - return 1; - } - else { - // handle face contacts. - // @@@ temporary: make deepest vertex on the line the contact point. - // @@@ this kind of works, but we sometimes need two contact points for - // @@@ stability. - - // compute 'v' in global coordinates - dVector3 gv; - for (i=0; i<3; i++) gv[i] = p2[i] - p1[i]; - - if (dDOT (normal,gv) > 0) { - for (i=0; i<3; i++) - contact[0].pos[i] = p1[i] + (depth*REAL(0.5)-radius)*normal[i]; - } - else { - for (i=0; i<3; i++) - contact[0].pos[i] = p2[i] + (depth*REAL(0.5)-radius)*normal[i]; - } - return 1; - } -} diff --git a/extern/ode/dist/ode/src/space.cpp b/extern/ode/dist/ode/src/space.cpp deleted file mode 100644 index 0c656573918..00000000000 --- a/extern/ode/dist/ode/src/space.cpp +++ /dev/null @@ -1,621 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -simple space ------------- - -reports all n^2 object intersections - - -multi-resolution hash table ---------------------------- - -the current implementation rebuilds a new hash table each time collide() -is called. we don't keep any state between calls. this is wasteful if there -are unmoving objects in the space. - - -TODO ----- - -less memory wasting may to prevent multiple collision callbacks for the -same pair? - -better virtual address function. - -the collision search can perhaps be optimized - as we search chains we can -come across other candidate intersections at other levels, perhaps we should -do the intersection check straight away? --> save on list searching time only, -which is not too significant. - -*/ - -//**************************************************************************** - -#include -#include -#include -#include -#include -#include "objects.h" -#include "geom_internal.h" - -//**************************************************************************** -// space base class - -struct dxSpace : public dBase { - int type; // don't want to use RTTI - virtual void destroy()=0; - virtual void add (dGeomID)=0; - virtual void remove (dGeomID)=0; - virtual void collide (void *data, dNearCallback *callback)=0; - virtual int query (dGeomID)=0; -}; - -#define TYPE_SIMPLE 0xbad -#define TYPE_HASH 0xbabe - -//**************************************************************************** -// stuff common to all spaces - -#define ALLOCA(x) dALLOCA16(x) - - -// collide two AABBs together. for the hash table space, this is called if -// the two AABBs inhabit the same hash table cells. this only calls the -// callback function if the boxes actually intersect. if a geom has an -// AABB test function, that is called to provide a further refinement of -// the intersection. - -static inline void collideAABBs (dReal bounds1[6], dReal bounds2[6], - dxGeom *g1, dxGeom *g2, - void *data, dNearCallback *callback) -{ - // no contacts if both geoms on the same body, and the body is not 0 - if (g1->body == g2->body && g1->body) return; - - if (bounds1[0] > bounds2[1] || - bounds1[1] < bounds2[0] || - bounds1[2] > bounds2[3] || - bounds1[3] < bounds2[2] || - bounds1[4] > bounds2[5] || - bounds1[5] < bounds2[4]) return; - if (g1->_class->aabb_test) { - if (g1->_class->aabb_test (g1,g2,bounds2) == 0) return; - } - if (g2->_class->aabb_test) { - if (g2->_class->aabb_test (g2,g1,bounds1) == 0) return; - } - callback (data,g1,g2); -} - -//**************************************************************************** -// simple space - reports all n^2 object intersections - -struct dxSimpleSpace : public dxSpace { - dGeomID first; - void destroy(); - void add (dGeomID); - void remove (dGeomID); - void collide (void *data, dNearCallback *callback); - int query (dGeomID); -}; - - -dSpaceID dSimpleSpaceCreate() -{ - dxSimpleSpace *w = new dxSimpleSpace; - w->type = TYPE_SIMPLE; - w->first = 0; - return w; -} - - -void dxSimpleSpace::destroy() -{ - // destroying each geom will call remove(). this will be efficient if - // we destroy geoms in list order. - dAASSERT (this); - dGeomID g,n; - g = first; - while (g) { - n = g->space.next; - dGeomDestroy (g); - g = n; - } - delete this; -} - - -void dxSimpleSpace::add (dGeomID obj) -{ - dAASSERT (this && obj); - dUASSERT (obj->spaceid == 0 && obj->space.next == 0, - "object is already in a space"); - obj->space.next = first; - first = obj; - obj->spaceid = this; -} - - -void dxSimpleSpace::remove (dGeomID geom_to_remove) -{ - dAASSERT (this && geom_to_remove); - dUASSERT (geom_to_remove->spaceid,"object is not in a space"); - dGeomID last=0,g=first; - while (g) { - if (g==geom_to_remove) { - if (last) last->space.next = g->space.next; - else first = g->space.next; - geom_to_remove->space.next = 0; - geom_to_remove->spaceid = 0; - return; - } - last = g; - g = g->space.next; - } -} - - -void dxSimpleSpace::collide (void *data, dNearCallback *callback) -{ - dAASSERT (this && callback); - dxGeom *g1,*g2; - int i,j,n; - - // count the number of objects - n=0; - for (g1=first; g1; g1=g1->space.next) n++; - - // allocate and fill bounds array - dReal *bounds = (dReal*) ALLOCA (6 * n * sizeof(dReal)); - i=0; - for (g1=first; g1; g1=g1->space.next) { - g1->_class->aabb (g1,bounds + i); - g1->space_aabb = bounds + i; - i += 6; - } - - // intersect all bounding boxes - i=0; - for (g1=first; g1; g1=g1->space.next) { - j=i+6; - for (g2=g1->space.next; g2; g2=g2->space.next) { - collideAABBs (bounds+i,bounds+j,g1,g2,data,callback); - j += 6; - } - i += 6; - } - - // reset the aabb fields of the geoms back to 0 - for (g1=first; g1; g1=g1->space.next) g1->space_aabb = 0; -} - - -// @@@ NOT FLEXIBLE ENOUGH -// -//int dSpaceCollide (dSpaceID space, dContactGeom **contact_array) -//{ -// int n = 0; -// dContactGeom *base = (dContact*) dStackAlloc (sizeof(dContact)); -// dContactGeom *c = base; -// for (dxGeom *g1=space->first; g1; g1=g1->space.next) { -// for (dxGeom *g2=g1->space.next; g2; g2=g2->space.next) { -// // generate at most 1 contact for this pair -// c->o1 = g1; -// c->o2 = g2; -// if (dCollide (0,c)) { -// c = (dContactGeom*) dStackAlloc (sizeof(dContactGeom)); -// n++; -// } -// } -// } -// *contact_array = base; -// return n; -//} - - -int dxSimpleSpace::query (dGeomID obj) -{ - dAASSERT (this && obj); - if (obj->spaceid != this) return 0; - dGeomID compare = first; - while (compare) { - if (compare == obj) return 1; - compare = compare->space.next; - } - dDebug (0,"object is not in the space it thinks it is in"); - return 0; -} - -//**************************************************************************** -// hash table space - -// kind of silly, but oh well... -#define MAXINT ((int)((((unsigned int)(-1)) << 1) >> 1)) - - -// prime[i] is the largest prime smaller than 2^i -#define NUM_PRIMES 31 -static long int prime[NUM_PRIMES] = {1L,2L,3L,7L,13L,31L,61L,127L,251L,509L, - 1021L,2039L,4093L,8191L,16381L,32749L,65521L,131071L,262139L, - 524287L,1048573L,2097143L,4194301L,8388593L,16777213L,33554393L, - 67108859L,134217689L,268435399L,536870909L,1073741789L}; - - -// currently the space 'container' is just a list of the geoms in the space. - -struct dxHashSpace : public dxSpace { - dxGeom *first; - int global_minlevel; // smallest hash table level to put AABBs in - int global_maxlevel; // objects that need a level larger than this will be - // put in a "big objects" list instead of a hash table - void destroy(); - void add (dGeomID); - void remove (dGeomID); - void collide (void *data, dNearCallback *callback); - int query (dGeomID); -}; - - -// an axis aligned bounding box -struct dxAABB { - dxAABB *next; // next in the list of all AABBs - dReal bounds[6]; // minx, maxx, miny, maxy, minz, maxz - int level; // the level this is stored in (cell size = 2^level) - int dbounds[6]; // AABB bounds, discretized to cell size - dxGeom *geom; // corresponding geometry object - int index; // index of this AABB, starting from 0 -}; - - -// a hash table node that represents an AABB that intersects a particular cell -// at a particular level -struct Node { - Node *next; // next node in hash table collision list, 0 if none - int x,y,z; // cell position in space, discretized to cell size - dxAABB *aabb; // axis aligned bounding box that intersects this cell -}; - - -// return the `level' of an AABB. the AABB will be put into cells at this -// level - the cell size will be 2^level. the level is chosen to be the -// smallest value such that the AABB occupies no more than 8 cells, regardless -// of its placement. this means that: -// size/2 < q <= size -// where q is the maximum AABB dimension. - -static int findLevel (dReal bounds[6]) -{ - // compute q - dReal q,q2; - q = bounds[1] - bounds[0]; // x bounds - q2 = bounds[3] - bounds[2]; // y bounds - if (q2 > q) q = q2; - q2 = bounds[5] - bounds[4]; // z bounds - if (q2 > q) q = q2; - - if (q == dInfinity) return MAXINT; - - // find level such that 0.5 * 2^level < q <= 2^level - int level; - frexp (q,&level); // q = (0.5 .. 1.0) * 2^level (definition of frexp) - return level; -} - - -// find a virtual memory address for a cell at the given level and x,y,z -// position. -// @@@ currently this is not very sophisticated, e.g. the scaling -// factors could be better designed to avoid collisions, and they should -// probably depend on the hash table physical size. - -static unsigned long getVirtualAddress (int level, int x, int y, int z) -{ - return level*1000 + x*100 + y*10 + z; -} - -//**************************************************************************** -// hash space public functions - -dSpaceID dHashSpaceCreate() -{ - dxHashSpace *w = new dxHashSpace; - w->type = TYPE_HASH; - w->first = 0; - w->global_minlevel = -3; - w->global_maxlevel = 10; - return w; -} - - -void dxHashSpace::destroy() -{ - // destroying each geom will call remove(). this will be efficient if - // we destroy geoms in list order. - dAASSERT (this); - dGeomID g,n; - g = first; - while (g) { - n = g->space.next; - dGeomDestroy (g); - g = n; - } - delete this; -} - - -void dHashSpaceSetLevels (dxSpace *space, int minlevel, int maxlevel) -{ - dUASSERT (minlevel <= maxlevel,"must have minlevel <= maxlevel"); - dUASSERT (space->type == TYPE_HASH,"must be a hash space"); - dxHashSpace *hspace = (dxHashSpace*) space; - hspace->global_minlevel = minlevel; - hspace->global_maxlevel = maxlevel; -} - - -void dxHashSpace::add (dGeomID obj) -{ - dAASSERT (this && obj); - dUASSERT (obj->spaceid == 0 && obj->space.next == 0, - "object is already in a space"); - obj->space.next = first; - first = obj; - obj->spaceid = this; -} - - -void dxHashSpace::remove (dGeomID geom_to_remove) -{ - dAASSERT (this && geom_to_remove); - dUASSERT (geom_to_remove->spaceid,"object is not in a space"); - dGeomID last=0,g=first; - while (g) { - if (g==geom_to_remove) { - if (last) last->space.next = g->space.next; - else first = g->space.next; - geom_to_remove->space.next = 0; - geom_to_remove->spaceid = 0; - return; - } - last = g; - g = g->space.next; - } -} - - -void dxHashSpace::collide (void *data, dNearCallback *callback) -{ - dAASSERT(this && callback); - dxGeom *geom; - dxAABB *aabb; - int i,maxlevel; - - // create a list of axis aligned bounding boxes for all geoms. count the - // number of AABBs as we go. set the level for all AABBs. put AABBs larger - // than the space's global_maxlevel in the big_boxes list, check everything - // else against that list at the end. for AABBs that are not too big, - // record the maximum level that we need. - - int n = 0; // number of AABBs in main list - int ntotal = 0; // total number of AABBs - dxAABB *first_aabb = 0; // list of AABBs in hash table - dxAABB *big_boxes = 0; // list of AABBs too big for hash table - maxlevel = global_minlevel - 1; - for (geom = first; geom; geom=geom->space.next) { - ntotal++; - dxAABB *aabb = (dxAABB*) ALLOCA (sizeof(dxAABB)); - geom->_class->aabb (geom,aabb->bounds); - geom->space_aabb = aabb->bounds; - aabb->geom = geom; - // compute level, but prevent cells from getting too small - int level = findLevel (aabb->bounds); - if (level < global_minlevel) level = global_minlevel; - if (level <= global_maxlevel) { - // aabb goes in main list - aabb->next = first_aabb; - first_aabb = aabb; - aabb->level = level; - if (level > maxlevel) maxlevel = level; - // cellsize = 2^level - dReal cellsize = (dReal) ldexp (1.0,level); - // discretize AABB position to cell size - for (i=0; i < 6; i++) aabb->dbounds[i] = (int) - floor (aabb->bounds[i]/cellsize); - // set AABB index - aabb->index = n; - n++; - } - else { - // aabb is too big, put it in the big_boxes list. we don't care about - // setting level, dbounds, index, or the maxlevel - aabb->next = big_boxes; - big_boxes = aabb; - } - } - - // 0 or 1 boxes can't collide with anything - if (ntotal < 2) return; - - // for `n' objects, an n*n array of bits is used to record if those objects - // have been intersection-tested against each other yet. this array can - // grow large with high n, but oh well... - int tested_rowsize = (n+7) >> 3; // number of bytes needed for n bits - unsigned char *tested = (unsigned char *) alloca (n * tested_rowsize); - memset (tested,0,n * tested_rowsize); - - // create a hash table to store all AABBs. each AABB may take up to 8 cells. - // we use chaining to resolve collisions, but we use a relatively large table - // to reduce the chance of collisions. - - // compute hash table size sz to be a prime > 8*n - for (i=0; i= (8*n)) break; - } - if (i >= NUM_PRIMES) i = NUM_PRIMES-1; // probably pointless - int sz = prime[i]; - - // allocate and initialize hash table node pointers - Node **table = (Node **) ALLOCA (sizeof(Node*) * sz); - for (i=0; inext) { - int *dbounds = aabb->dbounds; - for (int xi = dbounds[0]; xi <= dbounds[1]; xi++) { - for (int yi = dbounds[2]; yi <= dbounds[3]; yi++) { - for (int zi = dbounds[4]; zi <= dbounds[5]; zi++) { - // get the hash index - unsigned long hi = getVirtualAddress (aabb->level,xi,yi,zi) % sz; - // add a new node to the hash table - Node *node = (Node*) alloca (sizeof (Node)); - node->x = xi; - node->y = yi; - node->z = zi; - node->aabb = aabb; - node->next = table[hi]; - table[hi] = node; - } - } - } - } - - // now that all AABBs are loaded into the hash table, we do the actual - // collision detection. for all AABBs, check for other AABBs in the - // same cells for collisions, and then check for other AABBs in all - // intersecting higher level cells. - - int db[6]; // discrete bounds at current level - for (aabb=first_aabb; aabb; aabb=aabb->next) { - // we are searching for collisions with aabb - for (i=0; i<6; i++) db[i] = aabb->dbounds[i]; - for (int level = aabb->level; level <= maxlevel; level++) { - for (int xi = db[0]; xi <= db[1]; xi++) { - for (int yi = db[2]; yi <= db[3]; yi++) { - for (int zi = db[4]; zi <= db[5]; zi++) { - // get the hash index - unsigned long hi = getVirtualAddress (level,xi,yi,zi) % sz; - // search all nodes at this index - Node *node; - for (node = table[hi]; node; node=node->next) { - // node points to an AABB that may intersect aabb - if (node->aabb == aabb) continue; - if (node->aabb->level == level && - node->x == xi && node->y == yi && node->z == zi) { - // see if aabb and node->aabb have already been tested - // against each other - unsigned char mask; - if (aabb->index <= node->aabb->index) { - i = (aabb->index * tested_rowsize)+(node->aabb->index >> 3); - mask = 1 << (node->aabb->index & 7); - } - else { - i = (node->aabb->index * tested_rowsize)+(aabb->index >> 3); - mask = 1 << (aabb->index & 7); - } - dIASSERT (i >= 0 && i < (tested_rowsize*n)); - if ((tested[i] & mask)==0) { - collideAABBs (aabb->bounds,node->aabb->bounds, - aabb->geom,node->aabb->geom, - data,callback); - } - tested[i] |= mask; - } - } - } - } - } - // get the discrete bounds for the next level up - for (i=0; i<6; i++) db[i] >>= 1; - } - } - - // every AABB in the normal list must now be intersected against every - // AABB in the big_boxes list. so let's hope there are not too many objects - // in the big_boxes list. - for (aabb=first_aabb; aabb; aabb=aabb->next) { - for (dxAABB *aabb2=big_boxes; aabb2; aabb2=aabb2->next) { - collideAABBs (aabb->bounds,aabb2->bounds,aabb->geom,aabb2->geom, - data,callback); - } - } - - // intersected all AABBs in the big_boxes list together - for (aabb=big_boxes; aabb; aabb=aabb->next) { - for (dxAABB *aabb2=aabb->next; aabb2; aabb2=aabb2->next) { - collideAABBs (aabb->bounds,aabb2->bounds,aabb->geom,aabb2->geom, - data,callback); - } - } - - // reset the aabb fields of the geoms back to 0 - for (geom=first; geom; geom=geom->space.next) geom->space_aabb = 0; -} - - -int dxHashSpace::query (dGeomID obj) -{ - dAASSERT (this && obj); - if (obj->spaceid != this) return 0; - dGeomID compare = first; - while (compare) { - if (compare == obj) return 1; - compare = compare->space.next; - } - dDebug (0,"object is not in the space it thinks it is in"); - return 0; -} - -//**************************************************************************** -// space functions - -void dSpaceDestroy (dxSpace * space) -{ - space->destroy(); -} - - -void dSpaceAdd (dxSpace * space, dxGeom *g) -{ - space->add (g); -} - - -void dSpaceRemove (dxSpace * space, dxGeom *g) -{ - space->remove (g); -} - - -int dSpaceQuery (dxSpace * space, dxGeom *g) -{ - return space->query (g); -} - - -void dSpaceCollide (dxSpace * space, void *data, dNearCallback *callback) -{ - space->collide (data,callback); -} diff --git a/extern/ode/dist/ode/src/stack.cpp b/extern/ode/dist/ode/src/stack.cpp deleted file mode 100644 index e062f92b54f..00000000000 --- a/extern/ode/dist/ode/src/stack.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -@@@ this file should not be compiled any more @@@ - -#include -#include -#include "stack.h" -#include "ode/error.h" -#include "ode/config.h" - -//**************************************************************************** -// unix version that uses mmap(). some systems have anonymous mmaps and some -// need to mmap /dev/zero. - -#ifndef WIN32 - -#include -#include -#include -#include -#include - - -void dStack::init (int max_size) -{ - if (sizeof(long int) != sizeof(char*)) dDebug (0,"internal"); - if (max_size <= 0) dDebug (0,"Stack::init() given size <= 0"); - -#ifndef MMAP_ANONYMOUS - static int dev_zero_fd = -1; // cached file descriptor for /dev/zero - if (dev_zero_fd < 0) dev_zero_fd = open ("/dev/zero", O_RDWR); - if (dev_zero_fd < 0) dError (0,"can't open /dev/zero (%s)",strerror(errno)); - base = (char*) mmap (0,max_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, - dev_zero_fd,0); -#else - base = (char*) mmap (0,max_size, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANON,0,0); -#endif - - if (int(base) == -1) dError (0,"Stack::init(), mmap() failed, " - "max_size=%d (%s)",max_size,strerror(errno)); - size = max_size; - pointer = base; - frame = 0; -} - - -void dStack::destroy() -{ - munmap (base,size); - base = 0; - size = 0; - pointer = 0; - frame = 0; -} - -#endif - -//**************************************************************************** - -#ifdef WIN32 - -#include "windows.h" - - -void dStack::init (int max_size) -{ - if (sizeof(LPVOID) != sizeof(char*)) dDebug (0,"internal"); - if (max_size <= 0) dDebug (0,"Stack::init() given size <= 0"); - base = (char*) VirtualAlloc (NULL,max_size,MEM_RESERVE,PAGE_READWRITE); - if (base == 0) dError (0,"Stack::init(), VirtualAlloc() failed, " - "max_size=%d",max_size); - size = max_size; - pointer = base; - frame = 0; - committed = 0; - - // get page size - SYSTEM_INFO info; - GetSystemInfo (&info); - pagesize = info.dwPageSize; -} - - -void dStack::destroy() -{ - VirtualFree (base,0,MEM_RELEASE); - base = 0; - size = 0; - pointer = 0; - frame = 0; -} - -#endif diff --git a/extern/ode/dist/ode/src/stack.h b/extern/ode/dist/ode/src/stack.h deleted file mode 100644 index 3b98202b042..00000000000 --- a/extern/ode/dist/ode/src/stack.h +++ /dev/null @@ -1,139 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* this comes from the `reuse' library. copy any changes back to the source. - -these stack allocation functions are a replacement for alloca(), except that -they allocate memory from a separate pool. - -advantages over alloca(): - - consecutive allocations are guaranteed to be contiguous with increasing - address. - - functions can allocate stack memory that is returned to the caller, - in other words pushing and popping stack frames is optional. - -disadvantages compared to alloca(): - - less portable - - slightly slower, although still orders of magnitude faster than malloc(). - - longjmp() and exceptions do not deallocate stack memory (but who cares?). - -just like alloca(): - - using too much stack memory does not fail gracefully, it fails with a - segfault. - -*/ - - -#ifndef _ODE_STACK_H_ -#define _ODE_STACK_H_ - - -#ifdef WIN32 -#include "windows.h" -#endif - - -struct dStack { - char *base; // bottom of the stack - int size; // maximum size of the stack - char *pointer; // current top of the stack - char *frame; // linked list of stack frame ptrs -# ifdef WIN32 // stuff for windows: - int pagesize; // - page size - this is ASSUMED to be a power of 2 - int committed; // - bytes committed in allocated region -#endif - - // initialize the stack. `max_size' is the maximum size that the stack can - // reach. on unix and windows a `virtual' memory block of this size is - // mapped into the address space but does not actually consume physical - // memory until it is referenced - so it is safe to set this to a high value. - - void init (int max_size); - - - // destroy the stack. this unmaps any virtual memory that was allocated. - - void destroy(); - - - // allocate `size' bytes from the stack and return a pointer to the allocated - // memory. `size' must be >= 0. the returned pointer will be aligned to the - // size of a long int. - - char * alloc (int size) - { - char *ret = pointer; - pointer += ((size-1) | (sizeof(long int)-1) )+1; -# ifdef WIN32 - // for windows we need to commit pages as they are required - if ((pointer-base) > committed) { - committed = ((pointer-base-1) | (pagesize-1))+1; // round up to pgsize - VirtualAlloc (base,committed,MEM_COMMIT,PAGE_READWRITE); - } -# endif - return ret; - } - - - // return the address that will be returned by the next call to alloc() - - char *nextAlloc() - { - return pointer; - } - - - // push and pop the current size of the stack. pushFrame() saves the current - // frame pointer on the stack, and popFrame() retrieves it. a typical - // stack-using function will bracket alloc() calls with pushFrame() and - // popFrame(). both functions return the current stack pointer - this should - // be the same value for the two bracketing calls. calling popFrame() too - // many times will result in a segfault. - - char * pushFrame() - { - char *newframe = pointer; - char **addr = (char**) alloc (sizeof(char*)); - *addr = frame; - frame = newframe; - return newframe; - - /* OLD CODE - *((char**)pointer) = frame; - frame = pointer; - char *ret = pointer; - pointer += sizeof(char*); - return ret; - */ - } - - char * popFrame() - { - pointer = frame; - frame = *((char**)pointer); - return pointer; - } -}; - - -#endif - diff --git a/extern/ode/dist/ode/src/step.cpp b/extern/ode/dist/ode/src/step.cpp deleted file mode 100644 index 16f77112ad2..00000000000 --- a/extern/ode/dist/ode/src/step.cpp +++ /dev/null @@ -1,1085 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include "objects.h" -#include "joint.h" -#include -#include -#include -#include -#include -#include -#include "lcp.h" - -//**************************************************************************** -// misc defines - -#define FAST_FACTOR -//#define TIMING - -#define ALLOCA dALLOCA16 - -//**************************************************************************** -// debugging - comparison of various vectors and matrices produced by the -// slow and fast versions of the stepper. - -//#define COMPARE_METHODS - -#ifdef COMPARE_METHODS -#include "testing.h" -dMatrixComparison comparator; -#endif - -//**************************************************************************** -// special matrix multipliers - -// this assumes the 4th and 8th rows of B and C are zero. - -static void Multiply2_p8r (dReal *A, dReal *B, dReal *C, - int p, int r, int Askip) -{ - int i,j; - dReal sum,*bb,*cc; - dIASSERT (p>0 && r>0 && A && B && C); - bb = B; - for (i=p; i; i--) { - cc = C; - for (j=r; j; j--) { - sum = bb[0]*cc[0]; - sum += bb[1]*cc[1]; - sum += bb[2]*cc[2]; - sum += bb[4]*cc[4]; - sum += bb[5]*cc[5]; - sum += bb[6]*cc[6]; - *(A++) = sum; - cc += 8; - } - A += Askip - r; - bb += 8; - } -} - - -// this assumes the 4th and 8th rows of B and C are zero. - -static void MultiplyAdd2_p8r (dReal *A, dReal *B, dReal *C, - int p, int r, int Askip) -{ - int i,j; - dReal sum,*bb,*cc; - dIASSERT (p>0 && r>0 && A && B && C); - bb = B; - for (i=p; i; i--) { - cc = C; - for (j=r; j; j--) { - sum = bb[0]*cc[0]; - sum += bb[1]*cc[1]; - sum += bb[2]*cc[2]; - sum += bb[4]*cc[4]; - sum += bb[5]*cc[5]; - sum += bb[6]*cc[6]; - *(A++) += sum; - cc += 8; - } - A += Askip - r; - bb += 8; - } -} - - -// this assumes the 4th and 8th rows of B are zero. - -static void Multiply0_p81 (dReal *A, dReal *B, dReal *C, int p) -{ - int i; - dIASSERT (p>0 && A && B && C); - dReal sum; - for (i=p; i; i--) { - sum = B[0]*C[0]; - sum += B[1]*C[1]; - sum += B[2]*C[2]; - sum += B[4]*C[4]; - sum += B[5]*C[5]; - sum += B[6]*C[6]; - *(A++) = sum; - B += 8; - } -} - - -// this assumes the 4th and 8th rows of B are zero. - -static void MultiplyAdd0_p81 (dReal *A, dReal *B, dReal *C, int p) -{ - int i; - dIASSERT (p>0 && A && B && C); - dReal sum; - for (i=p; i; i--) { - sum = B[0]*C[0]; - sum += B[1]*C[1]; - sum += B[2]*C[2]; - sum += B[4]*C[4]; - sum += B[5]*C[5]; - sum += B[6]*C[6]; - *(A++) += sum; - B += 8; - } -} - - -// this assumes the 4th and 8th rows of B are zero. - -static void MultiplyAdd1_8q1 (dReal *A, dReal *B, dReal *C, int q) -{ - int k; - dReal sum; - dIASSERT (q>0 && A && B && C); - sum = 0; - for (k=0; k0 && A && B && C); - sum = 0; - for (k=0; kpos[j] += h * b->lvel[j]; - - if (b->flags & dxBodyFlagFiniteRotation) { - dVector3 irv; // infitesimal rotation vector - dQuaternion q; // quaternion for finite rotation - - if (b->flags & dxBodyFlagFiniteRotationAxis) { - // split the angular velocity vector into a component along the finite - // rotation axis, and a component orthogonal to it. - dVector3 frv,irv; // finite rotation vector - dReal k = dDOT (b->finite_rot_axis,b->avel); - frv[0] = b->finite_rot_axis[0] * k; - frv[1] = b->finite_rot_axis[1] * k; - frv[2] = b->finite_rot_axis[2] * k; - irv[0] = b->avel[0] - frv[0]; - irv[1] = b->avel[1] - frv[1]; - irv[2] = b->avel[2] - frv[2]; - - // make a rotation quaternion q that corresponds to frv * h. - // compare this with the full-finite-rotation case below. - h *= REAL(0.5); - dReal theta = k * h; - q[0] = dCos(theta); - dReal s = sinc(theta) * h; - q[1] = frv[0] * s; - q[2] = frv[1] * s; - q[3] = frv[2] * s; - } - else { - // make a rotation quaternion q that corresponds to w * h - dReal wlen = dSqrt (b->avel[0]*b->avel[0] + b->avel[1]*b->avel[1] + - b->avel[2]*b->avel[2]); - h *= REAL(0.5); - dReal theta = wlen * h; - q[0] = dCos(theta); - dReal s = sinc(theta) * h; - q[1] = b->avel[0] * s; - q[2] = b->avel[1] * s; - q[3] = b->avel[2] * s; - } - - // do the finite rotation - dQuaternion q2; - dQMultiply0 (q2,q,b->q); - for (j=0; j<4; j++) b->q[j] = q2[j]; - - // do the infitesimal rotation if required - if (b->flags & dxBodyFlagFiniteRotationAxis) { - dReal dq[4]; - dWtoDQ (irv,b->q,dq); - for (j=0; j<4; j++) b->q[j] += h * dq[j]; - } - } - else { - // the normal way - do an infitesimal rotation - dReal dq[4]; - dWtoDQ (b->avel,b->q,dq); - for (j=0; j<4; j++) b->q[j] += h * dq[j]; - } - - // normalize the quaternion and convert it to a rotation matrix - dNormalize4 (b->q); - dQtoR (b->q,b->R); -} - -//**************************************************************************** -// the slow, but sure way -// note that this does not do any joint feedback! - -// given lists of bodies and joints that form an island, perform a first -// order timestep. -// -// `body' is the body array, `nb' is the size of the array. -// `_joint' is the body array, `nj' is the size of the array. - -void dInternalStepIsland_x1 (dxWorld *world, dxBody * const *body, int nb, - dxJoint * const *_joint, int nj, dReal stepsize) -{ - int i,j,k; - int n6 = 6*nb; - -# ifdef TIMING - dTimerStart("preprocessing"); -# endif - - // number all bodies in the body list - set their tag values - for (i=0; itag = i; - - // make a local copy of the joint array, because we might want to modify it. - // (the "dxJoint *const*" declaration says we're allowed to modify the joints - // but not the joint array, because the caller might need it unchanged). - dxJoint **joint = (dxJoint**) ALLOCA (nj * sizeof(dxJoint*)); - memcpy (joint,_joint,nj * sizeof(dxJoint*)); - - // for all bodies, compute the inertia tensor and its inverse in the global - // frame, and compute the rotational force and add it to the torque - // accumulator. - // @@@ check computation of rotational force. - dReal *I = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); - dReal *invI = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); - dSetZero (I,3*nb*4); - dSetZero (invI,3*nb*4); - for (i=0; imass.I,body[i]->R); - dMULTIPLY0_333 (I+i*12,body[i]->R,tmp); - // compute inverse inertia tensor in global frame - dMULTIPLY2_333 (tmp,body[i]->invI,body[i]->R); - dMULTIPLY0_333 (invI+i*12,body[i]->R,tmp); - // compute rotational force - dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel); - dCROSS (body[i]->tacc,-=,body[i]->avel,tmp); - } - - // add the gravity force to all bodies - for (i=0; iflags & dxBodyNoGravity)==0) { - body[i]->facc[0] += body[i]->mass.mass * world->gravity[0]; - body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; - body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; - } - } - - // get m = total constraint dimension, nub = number of unbounded variables. - // create constraint offset array and number-of-rows array for all joints. - // the constraints are re-ordered as follows: the purely unbounded - // constraints, the mixed unbounded + LCP constraints, and last the purely - // LCP constraints. - // - // joints with m=0 are inactive and are removed from the joints array - // entirely, so that the code that follows does not consider them. - int m = 0; - dxJoint::Info1 *info = (dxJoint::Info1*) ALLOCA (nj*sizeof(dxJoint::Info1)); - int *ofs = (int*) ALLOCA (nj*sizeof(int)); - for (i=0, j=0; jvtable->getInfo1 (joint[j],info+i); - dIASSERT (info[i].m >= 0 && info[i].m <= 6 && - info[i].nub >= 0 && info[i].nub <= info[i].m); - if (info[i].m > 0) { - joint[i] = joint[j]; - i++; - } - } - nj = i; - - // the purely unbounded constraints - for (i=0; i 0 && info[i].nub < info[i].m) { - ofs[i] = m; - m += info[i].m; - } - // the purely LCP constraints - for (i=0; iinvMass; - MM[nskip+1] = body[i]->invMass; - MM[2*nskip+2] = body[i]->invMass; - MM += 3*nskip+3; - for (j=0; j<3; j++) for (k=0; k<3; k++) { - MM[j*nskip+k] = invI[i*12+j*4+k]; - } - } - - // assemble some body vectors: fe = external forces, v = velocities - dReal *fe = (dReal*) ALLOCA (n6 * sizeof(dReal)); - dReal *v = (dReal*) ALLOCA (n6 * sizeof(dReal)); - dSetZero (fe,n6); - dSetZero (v,n6); - for (i=0; ifacc[j]; - for (j=0; j<3; j++) fe[i*6+3+j] = body[i]->tacc[j]; - for (j=0; j<3; j++) v[i*6+j] = body[i]->lvel[j]; - for (j=0; j<3; j++) v[i*6+3+j] = body[i]->avel[j]; - } - - // this will be set to the velocity update - dReal *vnew = (dReal*) ALLOCA (n6 * sizeof(dReal)); - dSetZero (vnew,n6); - - // if there are constraints, compute cforce - if (m > 0) { - // create a constraint equation right hand side vector `c', a constraint - // force mixing vector `cfm', and LCP low and high bound vectors, and an - // 'findex' vector. - dReal *c = (dReal*) ALLOCA (m*sizeof(dReal)); - dReal *cfm = (dReal*) ALLOCA (m*sizeof(dReal)); - dReal *lo = (dReal*) ALLOCA (m*sizeof(dReal)); - dReal *hi = (dReal*) ALLOCA (m*sizeof(dReal)); - int *findex = (int*) alloca (m*sizeof(int)); - dSetZero (c,m); - dSetValue (cfm,m,world->global_cfm); - dSetValue (lo,m,-dInfinity); - dSetValue (hi,m, dInfinity); - for (i=0; iglobal_erp; - for (i=0; inode[0].body->tag; - Jinfo.J1a = Jinfo.J1l + 3; - if (joint[i]->node[1].body) { - Jinfo.J2l = J + nskip*ofs[i] + 6*joint[i]->node[1].body->tag; - Jinfo.J2a = Jinfo.J2l + 3; - } - else { - Jinfo.J2l = 0; - Jinfo.J2a = 0; - } - Jinfo.c = c + ofs[i]; - Jinfo.cfm = cfm + ofs[i]; - Jinfo.lo = lo + ofs[i]; - Jinfo.hi = hi + ofs[i]; - Jinfo.findex = findex + ofs[i]; - joint[i]->vtable->getInfo2 (joint[i],&Jinfo); - // adjust returned findex values for global index numbering - for (j=0; j= 0) findex[ofs[i] + j] += ofs[i]; - } - } - - // compute A = J*invM*J' -# ifdef TIMING - dTimerNow ("compute A"); -# endif - dReal *JinvM = (dReal*) ALLOCA (m*nskip*sizeof(dReal)); - dSetZero (JinvM,m*nskip); - dMultiply0 (JinvM,J,invM,m,n6,n6); - int mskip = dPAD(m); - dReal *A = (dReal*) ALLOCA (m*mskip*sizeof(dReal)); - dSetZero (A,m*mskip); - dMultiply2 (A,JinvM,J,m,n6,m); - - // add cfm to the diagonal of A - for (i=0; ilvel[j] = vnew[i*6+j]; - for (j=0; j<3; j++) body[i]->avel[j] = vnew[i*6+3+j]; - } - - // update the position and orientation from the new linear/angular velocity - // (over the given timestep) -# ifdef TIMING - dTimerNow ("update position"); -# endif - for (i=0; ifacc[0] = 0; - body[i]->facc[1] = 0; - body[i]->facc[2] = 0; - body[i]->facc[3] = 0; - body[i]->tacc[0] = 0; - body[i]->tacc[1] = 0; - body[i]->tacc[2] = 0; - body[i]->tacc[3] = 0; - } - -# ifdef TIMING - dTimerEnd(); - if (m > 0) dTimerReport (stdout,1); -# endif -} - -//**************************************************************************** -// an optimized version of dInternalStepIsland1() - -void dInternalStepIsland_x2 (dxWorld *world, dxBody * const *body, int nb, - dxJoint * const *_joint, int nj, dReal stepsize) -{ - int i,j,k; -# ifdef TIMING - dTimerStart("preprocessing"); -# endif - - dReal stepsize1 = dRecip(stepsize); - - // number all bodies in the body list - set their tag values - for (i=0; itag = i; - - // make a local copy of the joint array, because we might want to modify it. - // (the "dxJoint *const*" declaration says we're allowed to modify the joints - // but not the joint array, because the caller might need it unchanged). - dxJoint **joint = (dxJoint**) ALLOCA (nj * sizeof(dxJoint*)); - memcpy (joint,_joint,nj * sizeof(dxJoint*)); - - // for all bodies, compute the inertia tensor and its inverse in the global - // frame, and compute the rotational force and add it to the torque - // accumulator. I and invI are vertically stacked 3x4 matrices, one per body. - // @@@ check computation of rotational force. - dReal *I = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); - dReal *invI = (dReal*) ALLOCA (3*nb*4 * sizeof(dReal)); - dSetZero (I,3*nb*4); - dSetZero (invI,3*nb*4); - for (i=0; imass.I,body[i]->R); - dMULTIPLY0_333 (I+i*12,body[i]->R,tmp); - // compute inverse inertia tensor in global frame - dMULTIPLY2_333 (tmp,body[i]->invI,body[i]->R); - dMULTIPLY0_333 (invI+i*12,body[i]->R,tmp); - // compute rotational force - dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel); - dCROSS (body[i]->tacc,-=,body[i]->avel,tmp); - } - - // add the gravity force to all bodies - for (i=0; iflags & dxBodyNoGravity)==0) { - body[i]->facc[0] += body[i]->mass.mass * world->gravity[0]; - body[i]->facc[1] += body[i]->mass.mass * world->gravity[1]; - body[i]->facc[2] += body[i]->mass.mass * world->gravity[2]; - } - } - - // get m = total constraint dimension, nub = number of unbounded variables. - // create constraint offset array and number-of-rows array for all joints. - // the constraints are re-ordered as follows: the purely unbounded - // constraints, the mixed unbounded + LCP constraints, and last the purely - // LCP constraints. this assists the LCP solver to put all unbounded - // variables at the start for a quick factorization. - // - // joints with m=0 are inactive and are removed from the joints array - // entirely, so that the code that follows does not consider them. - // also number all active joints in the joint list (set their tag values). - // inactive joints receive a tag value of -1. - - int m = 0; - dxJoint::Info1 *info = (dxJoint::Info1*) ALLOCA (nj*sizeof(dxJoint::Info1)); - int *ofs = (int*) ALLOCA (nj*sizeof(int)); - for (i=0, j=0; jvtable->getInfo1 (joint[j],info+i); - dIASSERT (info[i].m >= 0 && info[i].m <= 6 && - info[i].nub >= 0 && info[i].nub <= info[i].m); - if (info[i].m > 0) { - joint[i] = joint[j]; - joint[i]->tag = i; - i++; - } - else { - joint[j]->tag = -1; - } - } - nj = i; - - // the purely unbounded constraints - for (i=0; i 0 && info[i].nub < info[i].m) { - ofs[i] = m; - m += info[i].m; - } - // the purely LCP constraints - for (i=0; i 0) { - // create a constraint equation right hand side vector `c', a constraint - // force mixing vector `cfm', and LCP low and high bound vectors, and an - // 'findex' vector. - dReal *c = (dReal*) ALLOCA (m*sizeof(dReal)); - dReal *cfm = (dReal*) ALLOCA (m*sizeof(dReal)); - dReal *lo = (dReal*) ALLOCA (m*sizeof(dReal)); - dReal *hi = (dReal*) ALLOCA (m*sizeof(dReal)); - int *findex = (int*) alloca (m*sizeof(int)); - dSetZero (c,m); - dSetValue (cfm,m,world->global_cfm); - dSetValue (lo,m,-dInfinity); - dSetValue (hi,m, dInfinity); - for (i=0; iglobal_erp; - for (i=0; ivtable->getInfo2 (joint[i],&Jinfo); - // adjust returned findex values for global index numbering - for (j=0; j= 0) findex[ofs[i] + j] += ofs[i]; - } - } - - // compute A = J*invM*J'. first compute JinvM = J*invM. this has the same - // format as J so we just go through the constraints in J multiplying by - // the appropriate scalars and matrices. -# ifdef TIMING - dTimerNow ("compute A"); -# endif - dReal *JinvM = (dReal*) ALLOCA (2*m*8*sizeof(dReal)); - dSetZero (JinvM,2*m*8); - for (i=0; inode[0].body->tag; - dReal body_invMass = body[b]->invMass; - dReal *body_invI = invI + b*12; - dReal *Jsrc = J + 2*8*ofs[i]; - dReal *Jdst = JinvM + 2*8*ofs[i]; - for (j=info[i].m-1; j>=0; j--) { - for (k=0; k<3; k++) Jdst[k] = Jsrc[k] * body_invMass; - dMULTIPLY0_133 (Jdst+4,Jsrc+4,body_invI); - Jsrc += 8; - Jdst += 8; - } - if (joint[i]->node[1].body) { - b = joint[i]->node[1].body->tag; - body_invMass = body[b]->invMass; - body_invI = invI + b*12; - for (j=info[i].m-1; j>=0; j--) { - for (k=0; k<3; k++) Jdst[k] = Jsrc[k] * body_invMass; - dMULTIPLY0_133 (Jdst+4,Jsrc+4,body_invI); - Jsrc += 8; - Jdst += 8; - } - } - } - - // now compute A = JinvM * J'. A's rows and columns are grouped by joint, - // i.e. in the same way as the rows of J. block (i,j) of A is only nonzero - // if joints i and j have at least one body in common. this fact suggests - // the algorithm used to fill A: - // - // for b = all bodies - // n = number of joints attached to body b - // for i = 1..n - // for j = i+1..n - // ii = actual joint number for i - // jj = actual joint number for j - // // (ii,jj) will be set to all pairs of joints around body b - // compute blockwise: A(ii,jj) += JinvM(ii) * J(jj)' - // - // this algorithm catches all pairs of joints that have at least one body - // in common. it does not compute the diagonal blocks of A however - - // another similar algorithm does that. - - int mskip = dPAD(m); - dReal *A = (dReal*) ALLOCA (m*mskip*sizeof(dReal)); - dSetZero (A,m*mskip); - for (i=0; ifirstjoint; n1; n1=n1->next) { - for (dxJointNode *n2=n1->next; n2; n2=n2->next) { - // get joint numbers and ensure ofs[j1] >= ofs[j2] - int j1 = n1->joint->tag; - int j2 = n2->joint->tag; - if (ofs[j1] < ofs[j2]) { - int tmp = j1; - j1 = j2; - j2 = tmp; - } - - // if either joint was tagged as -1 then it is an inactive (m=0) - // joint that should not be considered - if (j1==-1 || j2==-1) continue; - - // determine if body i is the 1st or 2nd body of joints j1 and j2 - int jb1 = (joint[j1]->node[1].body == body[i]); - int jb2 = (joint[j2]->node[1].body == body[i]); - // jb1/jb2 must be 0 for joints with only one body - dIASSERT(joint[j1]->node[1].body || jb1==0); - dIASSERT(joint[j2]->node[1].body || jb2==0); - - // set block of A - MultiplyAdd2_p8r (A + ofs[j1]*mskip + ofs[j2], - JinvM + 2*8*ofs[j1] + jb1*8*info[j1].m, - J + 2*8*ofs[j2] + jb2*8*info[j2].m, - info[j1].m,info[j2].m, mskip); - } - } - } - // compute diagonal blocks of A - for (i=0; inode[1].body) { - MultiplyAdd2_p8r (A + ofs[i]*(mskip+1), - JinvM + 2*8*ofs[i] + 8*info[i].m, - J + 2*8*ofs[i] + 8*info[i].m, - info[i].m,info[i].m, mskip); - } - } - - // add cfm to the diagonal of A - for (i=0; iinvMass; - dReal *body_invI = invI + i*12; - for (j=0; j<3; j++) tmp1[i*8+j] = body[i]->facc[j] * body_invMass + - body[i]->lvel[j] * stepsize1; - dMULTIPLY0_331 (tmp1 + i*8 + 4,body_invI,body[i]->tacc); - for (j=0; j<3; j++) tmp1[i*8+4+j] += body[i]->avel[j] * stepsize1; - } - // put J*tmp1 into rhs - dReal *rhs = (dReal*) ALLOCA (m * sizeof(dReal)); - dSetZero (rhs,m); - for (i=0; inode[0].body->tag, info[i].m); - if (joint[i]->node[1].body) { - MultiplyAdd0_p81 (rhs+ofs[i],JJ + 8*info[i].m, - tmp1 + 8*joint[i]->node[1].body->tag, info[i].m); - } - } - // complete rhs - for (i=0; inode[0].body; - dxBody* b2 = joint[i]->node[1].body; - dJointFeedback *fb = joint[i]->feedback; - - if (fb) { - // the user has requested feedback on the amount of force that this - // joint is applying to the bodies. we use a slightly slower - // computation that splits out the force components and puts them - // in the feedback structure. - dReal data1[8],data2[8]; - Multiply1_8q1 (data1, JJ, lambda+ofs[i], info[i].m); - dReal *cf1 = cforce + 8*b1->tag; - cf1[0] += (fb->f1[0] = data1[0]); - cf1[1] += (fb->f1[1] = data1[1]); - cf1[2] += (fb->f1[2] = data1[2]); - cf1[4] += (fb->t1[0] = data1[4]); - cf1[5] += (fb->t1[1] = data1[5]); - cf1[6] += (fb->t1[2] = data1[6]); - if (b2){ - Multiply1_8q1 (data2, JJ + 8*info[i].m, lambda+ofs[i], info[i].m); - dReal *cf2 = cforce + 8*b2->tag; - cf2[0] += (fb->f2[0] = data2[0]); - cf2[1] += (fb->f2[1] = data2[1]); - cf2[2] += (fb->f2[2] = data2[2]); - cf2[4] += (fb->t2[0] = data2[4]); - cf2[5] += (fb->t2[1] = data2[5]); - cf2[6] += (fb->t2[2] = data2[6]); - } - } - else { - // no feedback is required, let's compute cforce the faster way - MultiplyAdd1_8q1 (cforce + 8*b1->tag,JJ, lambda+ofs[i], info[i].m); - if (b2) { - MultiplyAdd1_8q1 (cforce + 8*b2->tag, - JJ + 8*info[i].m, lambda+ofs[i], info[i].m); - } - } - } - } - - // compute the velocity update -# ifdef TIMING - dTimerNow ("compute velocity update"); -# endif - - // add fe to cforce - for (i=0; ifacc[j]; - for (j=0; j<3; j++) cforce[i*8+4+j] += body[i]->tacc[j]; - } - // multiply cforce by stepsize - for (i=0; i < nb*8; i++) cforce[i] *= stepsize; - // add invM * cforce to the body velocity - for (i=0; iinvMass; - dReal *body_invI = invI + i*12; - for (j=0; j<3; j++) body[i]->lvel[j] += body_invMass * cforce[i*8+j]; - dMULTIPLYADD0_331 (body[i]->avel,body_invI,cforce+i*8+4); - } - - // update the position and orientation from the new linear/angular velocity - // (over the given timestep) -# ifdef TIMING - dTimerNow ("update position"); -# endif - for (i=0; ilvel[j]; - for (j=0; j<3; j++) tmp_vnew[i*6+3+j] = body[i]->avel[j]; - } - comparator.nextMatrix (tmp_vnew,nb*6,1,0,"vnew"); -# endif - -# ifdef TIMING - dTimerNow ("tidy up"); -# endif - - // zero all force accumulators - for (i=0; ifacc[0] = 0; - body[i]->facc[1] = 0; - body[i]->facc[2] = 0; - body[i]->facc[3] = 0; - body[i]->tacc[0] = 0; - body[i]->tacc[1] = 0; - body[i]->tacc[2] = 0; - body[i]->tacc[3] = 0; - } - -# ifdef TIMING - dTimerEnd(); - if (m > 0) dTimerReport (stdout,1); -# endif -} - -//**************************************************************************** - -void dInternalStepIsland (dxWorld *world, dxBody * const *body, int nb, - dxJoint * const *joint, int nj, dReal stepsize) -{ -# ifndef COMPARE_METHODS - dInternalStepIsland_x2 (world,body,nb,joint,nj,stepsize); -# endif - -# ifdef COMPARE_METHODS - int i; - - // save body state - dxBody *state = (dxBody*) ALLOCA (nb*sizeof(dxBody)); - for (i=0; i - - -void dInternalStepIsland (dxWorld *world, - dxBody * const *body, int nb, - dxJoint * const *joint, int nj, - dReal stepsize); - - - -#endif - diff --git a/extern/ode/dist/ode/src/testing.cpp b/extern/ode/dist/ode/src/testing.cpp deleted file mode 100644 index d55afc25257..00000000000 --- a/extern/ode/dist/ode/src/testing.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -#include -#include -#include -#include "testing.h" - -#ifdef dDOUBLE -static const dReal tol = 1.0e-9; -#else -static const dReal tol = 1.0e-5f; -#endif - - -// matrix header on the stack - -struct dMatrixComparison::dMatInfo { - int n,m; // size of matrix - char name[128]; // name of the matrix - dReal *data; // matrix data - int size; // size of `data' -}; - - - -dMatrixComparison::dMatrixComparison() -{ - afterfirst = 0; - index = 0; -} - - -dMatrixComparison::~dMatrixComparison() -{ - reset(); -} - - -dReal dMatrixComparison::nextMatrix (dReal *A, int n, int m, int lower_tri, - char *name, ...) -{ - if (A==0 || n < 1 || m < 1 || name==0) dDebug (0,"bad args to nextMatrix"); - int num = n*dPAD(m); - - if (afterfirst==0) { - dMatInfo *mi = (dMatInfo*) dAlloc (sizeof(dMatInfo)); - mi->n = n; - mi->m = m; - mi->size = num * sizeof(dReal); - mi->data = (dReal*) dAlloc (mi->size); - memcpy (mi->data,A,mi->size); - - va_list ap; - va_start (ap,name); - vsprintf (mi->name,name,ap); - if (strlen(mi->name) >= sizeof (mi->name)) dDebug (0,"name too long"); - - mat.push (mi); - return 0; - } - else { - if (lower_tri && n != m) - dDebug (0,"dMatrixComparison, lower triangular matrix must be square"); - if (index >= mat.size()) dDebug (0,"dMatrixComparison, too many matrices"); - dMatInfo *mp = mat[index]; - index++; - - dMatInfo mi; - va_list ap; - va_start (ap,name); - vsprintf (mi.name,name,ap); - if (strlen(mi.name) >= sizeof (mi.name)) dDebug (0,"name too long"); - - if (strcmp(mp->name,mi.name) != 0) - dDebug (0,"dMatrixComparison, name mismatch (\"%s\" and \"%s\")", - mp->name,mi.name); - if (mp->n != n || mp->m != m) - dDebug (0,"dMatrixComparison, size mismatch (%dx%d and %dx%d)", - mp->n,mp->m,n,m); - - dReal maxdiff; - if (lower_tri) { - maxdiff = dMaxDifferenceLowerTriangle (A,mp->data,n); - } - else { - maxdiff = dMaxDifference (A,mp->data,n,m); - } - if (maxdiff > tol) - dDebug (0,"dMatrixComparison, matrix error (size=%dx%d, name=\"%s\", " - "error=%.4e)",n,m,mi.name,maxdiff); - return maxdiff; - } -} - - -void dMatrixComparison::end() -{ - if (mat.size() <= 0) dDebug (0,"no matrices in sequence"); - afterfirst = 1; - index = 0; -} - - -void dMatrixComparison::reset() -{ - for (int i=0; idata,mat[i]->size); - dFree (mat[i],sizeof(dMatInfo)); - } - mat.setSize (0); - afterfirst = 0; - index = 0; -} - - -void dMatrixComparison::dump() -{ - for (int i=0; iname,mat[i]->n,mat[i]->m); -} - -//**************************************************************************** -// unit test - -#include - -static jmp_buf jump_buffer; - -static void myDebug (int num, const char *msg, va_list ap) -{ - // printf ("(Error %d: ",num); - // vprintf (msg,ap); - // printf (")\n"); - longjmp (jump_buffer,1); -} - - -extern "C" void dTestMatrixComparison() -{ - volatile int i; - printf ("dTestMatrixComparison()\n"); - dMessageFunction *orig_debug = dGetDebugHandler(); - - dMatrixComparison mc; - dReal A[50*50]; - - // make first sequence - unsigned long seed = dRandGetSeed(); - for (i=1; i<49; i++) { - dMakeRandomMatrix (A,i,i+1,1.0); - mc.nextMatrix (A,i,i+1,0,"A%d",i); - } - mc.end(); - - //mc.dump(); - - // test identical sequence - dSetDebugHandler (&myDebug); - dRandSetSeed (seed); - if (setjmp (jump_buffer)) { - printf ("\tFAILED (1)\n"); - } - else { - for (i=1; i<49; i++) { - dMakeRandomMatrix (A,i,i+1,1.0); - mc.nextMatrix (A,i,i+1,0,"A%d",i); - } - mc.end(); - printf ("\tpassed (1)\n"); - } - dSetDebugHandler (orig_debug); - - // test broken sequences (with matrix error) - dRandSetSeed (seed); - volatile int passcount = 0; - for (i=1; i<49; i++) { - if (setjmp (jump_buffer)) { - passcount++; - } - else { - dSetDebugHandler (&myDebug); - dMakeRandomMatrix (A,i,i+1,1.0); - A[(i-1)*dPAD(i+1)+i] += REAL(0.01); - mc.nextMatrix (A,i,i+1,0,"A%d",i); - dSetDebugHandler (orig_debug); - } - } - mc.end(); - printf ("\t%s (2)\n",(passcount == 48) ? "passed" : "FAILED"); - - // test broken sequences (with name error) - dRandSetSeed (seed); - passcount = 0; - for (i=1; i<49; i++) { - if (setjmp (jump_buffer)) { - passcount++; - } - else { - dSetDebugHandler (&myDebug); - dMakeRandomMatrix (A,i,i+1,1.0); - mc.nextMatrix (A,i,i+1,0,"B%d",i); - dSetDebugHandler (orig_debug); - } - } - mc.end(); - printf ("\t%s (3)\n",(passcount == 48) ? "passed" : "FAILED"); - - // test identical sequence again - dSetDebugHandler (&myDebug); - dRandSetSeed (seed); - if (setjmp (jump_buffer)) { - printf ("\tFAILED (4)\n"); - } - else { - for (i=1; i<49; i++) { - dMakeRandomMatrix (A,i,i+1,1.0); - mc.nextMatrix (A,i,i+1,0,"A%d",i); - } - mc.end(); - printf ("\tpassed (4)\n"); - } - dSetDebugHandler (orig_debug); -} diff --git a/extern/ode/dist/ode/src/testing.h b/extern/ode/dist/ode/src/testing.h deleted file mode 100644 index aa4acf119db..00000000000 --- a/extern/ode/dist/ode/src/testing.h +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* stuff used for testing */ - -#ifndef _ODE_TESTING_H_ -#define _ODE_TESTING_H_ - -#include -#include "array.h" - - -// compare a sequence of named matrices/vectors, i.e. to make sure that two -// different pieces of code are giving the same results. - -class dMatrixComparison { - struct dMatInfo; - dArray mat; - int afterfirst,index; - -public: - dMatrixComparison(); - ~dMatrixComparison(); - - dReal nextMatrix (dReal *A, int n, int m, int lower_tri, char *name, ...); - // add a new n*m matrix A to the sequence. the name of the matrix is given - // by the printf-style arguments (name,...). if this is the first sequence - // then this object will simply record the matrices and return 0. - // if this the second or subsequent sequence then this object will compare - // the matrices with the first sequence, and report any differences. - // the matrix error will be returned. if `lower_tri' is 1 then only the - // lower triangle of the matrix (including the diagonal) will be compared - // (the matrix must be square). - - void end(); - // end a sequence. - - void reset(); - // restarts the object, so the next sequence will be the first sequence. - - void dump(); - // print out info about all the matrices in the sequence -}; - - -#endif - diff --git a/extern/ode/dist/ode/src/timer.cpp b/extern/ode/dist/ode/src/timer.cpp deleted file mode 100644 index 87cb9f6f2fe..00000000000 --- a/extern/ode/dist/ode/src/timer.cpp +++ /dev/null @@ -1,397 +0,0 @@ -/************************************************************************* - * * - * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * - * All rights reserved. Email: russ@q12.org Web: www.q12.org * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of EITHER: * - * (1) The GNU Lesser General Public License as published by the Free * - * Software Foundation; either version 2.1 of the License, or (at * - * your option) any later version. The text of the GNU Lesser * - * General Public License is included with this library in the * - * file LICENSE.TXT. * - * (2) The BSD-style license that is included with this library in * - * the file LICENSE-BSD.TXT. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * - * LICENSE.TXT and LICENSE-BSD.TXT for more details. * - * * - *************************************************************************/ - -/* - -TODO ----- - -* gettimeofday() and the pentium time stamp counter return the real time, - not the process time. fix this somehow! - -*/ - -#include -#include - -// misc defines -#define ALLOCA dALLOCA16 - -//**************************************************************************** -// implementation for windows based on the multimedia performance counter. - -#ifdef WIN32 - -#include "windows.h" - -static inline void getClockCount (unsigned long cc[2]) -{ - LARGE_INTEGER a; - QueryPerformanceCounter (&a); - cc[0] = a.LowPart; - cc[1] = a.HighPart; -} - - -static inline void serialize() -{ -} - - -static inline double loadClockCount (unsigned long cc[2]) -{ - LARGE_INTEGER a; - a.LowPart = cc[0]; - a.HighPart = cc[1]; - return double(a.QuadPart); -} - - -double dTimerResolution() -{ - return 1.0/dTimerTicksPerSecond(); -} - - -double dTimerTicksPerSecond() -{ - static int query=0; - static double hz=0.0; - if (!query) { - LARGE_INTEGER a; - QueryPerformanceFrequency (&a); - hz = double(a.QuadPart); - query = 1; - } - return hz; -} - -#endif - -//**************************************************************************** -// implementation based on the pentium time stamp counter. the timer functions -// can be serializing or non-serializing. serializing will ensure that all -// instructions have executed and data has been written back before the cpu -// time stamp counter is read. the CPUID instruction is used to serialize. - -#if defined(PENTIUM) && !defined(WIN32) - -// we need to know the clock rate so that the timing function can report -// accurate times. this number only needs to be set accurately if we're -// doing performance tests and care about real-world time numbers - otherwise, -// just ignore this. i have not worked out how to determine this number -// automatically yet. - -#define PENTIUM_HZ (500e6) - - -static inline void getClockCount (unsigned long cc[2]) -{ - asm volatile ("\n\ - rdtsc\n\ - movl %%eax,(%%esi)\n\ - movl %%edx,4(%%esi)" - : : "S" (cc) : "%eax","%edx","cc","memory"); -} - - -static inline void serialize() -{ - asm volatile ("\n\ - mov $0,%%eax\n\ - cpuid" - : : : "%eax","%ebx","%ecx","%edx","cc","memory"); -} - - -static inline double loadClockCount (unsigned long a[2]) -{ - double ret; - asm volatile ("fildll %1; fstpl %0" : "=m" (ret) : "m" (a[0]) : - "cc","memory"); - return ret; -} - - -double dTimerResolution() -{ - return 1.0/PENTIUM_HZ; -} - - -double dTimerTicksPerSecond() -{ - return PENTIUM_HZ; -} - -#endif - -//**************************************************************************** -// otherwise, do the implementation based on gettimeofday(). - -#if !defined(PENTIUM) && !defined(WIN32) - -#ifndef macintosh - -#include -#include - - -static inline void getClockCount (unsigned long cc[2]) -{ - struct timeval tv; - gettimeofday (&tv,0); - cc[0] = tv.tv_usec; - cc[1] = tv.tv_sec; -} - -#else // macintosh - -#include -#include - -static inline void getClockCount (unsigned long cc[2]) -{ - UnsignedWide ms; - Microseconds (&ms); - cc[1] = ms.lo / 1000000; - cc[0] = ms.lo - ( cc[1] * 1000000 ); -} - -#endif - - -static inline void serialize() -{ -} - - -static inline double loadClockCount (unsigned long a[2]) -{ - return a[1]*1.0e6 + a[0]; -} - - -double dTimerResolution() -{ - unsigned long cc1[2],cc2[2]; - getClockCount (cc1); - do { - getClockCount (cc2); - } - while (cc1[0]==cc2[0] && cc1[1]==cc2[1]); - do { - getClockCount (cc1); - } - while (cc1[0]==cc2[0] && cc1[1]==cc2[1]); - double t1 = loadClockCount (cc1); - double t2 = loadClockCount (cc2); - return (t1-t2) / dTimerTicksPerSecond(); -} - - -double dTimerTicksPerSecond() -{ - return 1000000; -} - -#endif - -//**************************************************************************** -// stop watches - -void dStopwatchReset (dStopwatch *s) -{ - s->time = 0; - s->cc[0] = 0; - s->cc[1] = 0; -} - - -void dStopwatchStart (dStopwatch *s) -{ - serialize(); - getClockCount (s->cc); -} - - -void dStopwatchStop (dStopwatch *s) -{ - unsigned long cc[2]; - serialize(); - getClockCount (cc); - double t1 = loadClockCount (s->cc); - double t2 = loadClockCount (cc); - s->time += t2-t1; -} - - -double dStopwatchTime (dStopwatch *s) -{ - return s->time / dTimerTicksPerSecond(); -} - -//**************************************************************************** -// code timers - -// maximum number of events to record -#define MAXNUM 100 - -static int num = 0; // number of entries used in event array -static struct { - unsigned long cc[2]; // clock counts - double total_t; // total clocks used in this slot. - double total_p; // total percentage points used in this slot. - int count; // number of times this slot has been updated. - char *description; // pointer to static string -} event[MAXNUM]; - - -// make sure all slot totals and counts reset to 0 at start - -static void initSlots() -{ - static int initialized=0; - if (!initialized) { - for (int i=0; i (description); - num = 1; - serialize(); - getClockCount (event[0].cc); -} - - -void dTimerNow (const char *description) -{ - if (num < MAXNUM) { - // do not serialize - getClockCount (event[num].cc); - event[num].description = const_cast (description); - num++; - } -} - - -void dTimerEnd() -{ - if (num < MAXNUM) { - serialize(); - getClockCount (event[num].cc); - event[num].description = "TOTAL"; - num++; - } -} - -//**************************************************************************** -// print report - -static void fprintDoubleWithPrefix (FILE *f, double a, char *fmt) -{ - if (a >= 0.999999) { - fprintf (f,fmt,a); - return; - } - a *= 1000.0; - if (a >= 0.999999) { - fprintf (f,fmt,a); - fprintf (f,"m"); - return; - } - a *= 1000.0; - if (a >= 0.999999) { - fprintf (f,fmt,a); - fprintf (f,"u"); - return; - } - a *= 1000.0; - fprintf (f,fmt,a); - fprintf (f,"n"); -} - - -void dTimerReport (FILE *fout, int average) -{ - int i,maxl; - double ccunit = 1.0/dTimerTicksPerSecond(); - fprintf (fout,"\nTimer Report ("); - fprintDoubleWithPrefix (fout,ccunit,"%.2f "); - fprintf (fout,"s resolution)\n------------\n"); - if (num < 1) return; - - // get maximum description length - maxl = 0; - for (i=0; i maxl) maxl = l; - } - - // calculate total time - double t1 = loadClockCount (event[0].cc); - double t2 = loadClockCount (event[num-1].cc); - double total = t2 - t1; - if (total <= 0) total = 1; - - // compute time difference for all slots except the last one. update totals - double *times = (double*) ALLOCA (num * sizeof(double)); - for (i=0; i < (num-1); i++) { - double t1 = loadClockCount (event[i].cc); - double t2 = loadClockCount (event[i+1].cc); - times[i] = t2 - t1; - event[i].count++; - event[i].total_t += times[i]; - event[i].total_p += times[i]/total * 100.0; - } - - // print report (with optional averages) - for (i=0; i> BUILD_LOG -cat < $SETTINGS -PLATFORM=$PLATFORM -PRECISION=$PRECISION -BUILD=$MODE -END -make clean -make >> BUILD_LOG 2>&1 -echo -e "\n\n---------------------------------------------\n\n" >> BUILD_LOG -} - -echo > BUILD_LOG - -PRECISION=SINGLE -MODE=debug -build -PRECISION=SINGLE -MODE=release -build -PRECISION=DOUBLE -MODE=debug -build -PRECISION=DOUBLE -MODE=release -build - -make clean -rm -f $SETTINGS diff --git a/extern/ode/dist/tools/build4.bat b/extern/ode/dist/tools/build4.bat deleted file mode 100755 index c87e9a9e2ba..00000000000 --- a/extern/ode/dist/tools/build4.bat +++ /dev/null @@ -1,43 +0,0 @@ -@echo off -rem build all four precision/release configurations and log the build messages -rem (used for debugging). - -setlocal - -set PLATFORM=cygwin -set SETTINGS=config\user-settings - -echo SINGLE debug > BUILD_LOG -echo PLATFORM=%PLATFORM%> %SETTINGS% -echo PRECISION=SINGLE>> %SETTINGS% -echo BUILD=debug>> %SETTINGS% -make clean -make >> BUILD_LOG -echo --------------------------------------------- >> BUILD_LOG - -echo DOUBLE debug >> BUILD_LOG -echo PLATFORM=%PLATFORM%> %SETTINGS% -echo PRECISION=DOUBLE>> %SETTINGS% -echo BUILD=debug>> %SETTINGS% -make clean -make >> BUILD_LOG -echo --------------------------------------------- >> BUILD_LOG - -echo SINGLE release >> BUILD_LOG -echo PLATFORM=%PLATFORM%> %SETTINGS% -echo PRECISION=SINGLE>> %SETTINGS% -echo BUILD=release>> %SETTINGS% -make clean -make >> BUILD_LOG -echo --------------------------------------------- >> BUILD_LOG - -echo DOUBLE release >> BUILD_LOG -echo PLATFORM=%PLATFORM%> %SETTINGS% -echo PRECISION=DOUBLE>> %SETTINGS% -echo BUILD=release>> %SETTINGS% -make clean -make >> BUILD_LOG -echo --------------------------------------------- >> BUILD_LOG - -make clean -del %SETTINGS% diff --git a/extern/ode/dist/tools/make_distribution b/extern/ode/dist/tools/make_distribution deleted file mode 100755 index ed6d52bcbfd..00000000000 --- a/extern/ode/dist/tools/make_distribution +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -VER=0.03 -# VER=`date +%y%m%d` - -if [ ! -f ode/src/ode.cpp ]; then - echo "run this from the ODE root directory" - exit 1 -fi - -ODE_DIR=`pwd` - -cd /tmp -if [ -d /tmp/ode-$VER ]; then - echo "remove /tmp/ode-$VER first" - exit 1 -fi - -mkdir /tmp/ode-$VER -cp -av $ODE_DIR/* /tmp/ode-$VER -find /tmp/ode-$VER -type d -name CVS -exec rm -rf {} \; -print -find /tmp/ode-$VER -type f -name *~ -exec rm -f {} \; -print -rmdir /tmp/ode-$VER/build - -cd /tmp/ode-$VER -make clean -cp config/user-settings.example config/user-settings - -cd ode/doc -./doccer ode.doc > ode.html - -cd /tmp/ode-$VER -echo -e "\n\nMake any modifications you want, then exit the shell:" -bash - -cd /tmp -tar cfvz ode-$VER.tgz ode-$VER -rm -rf /tmp/ode-$VER - -echo -e "\ntype to exit or 'c' to copy to q12" -read Q -if [ $Q ]; then - echo copying... - scp1 ode-$VER.tgz q12.org:~/q12/ode/release/ -fi diff --git a/extern/ode/dist/tools/process_deps b/extern/ode/dist/tools/process_deps deleted file mode 100755 index 9b95ddac382..00000000000 --- a/extern/ode/dist/tools/process_deps +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/perl - -$a = join ('',); -$a =~ s/\\\n/ /g; # join continued lines -$a =~ s/(^\S+:)/$ARGV[0]$1/gm; # put prefix in front of rules -$a =~ s/\s+\/\S+/ /g; # remove absolute path dependencies -$a =~ s/\s+\n/\n/g; # remove whitespace at end of lines -$a =~ s/[ \t]+/ /g; # clean up interior whitespace -$a =~ s/ / \\\n /g; # put back line continuations - -print $a; diff --git a/extern/ode/patchfile.FreeBSD b/extern/ode/patchfile.FreeBSD deleted file mode 100644 index 1725a3acc45..00000000000 --- a/extern/ode/patchfile.FreeBSD +++ /dev/null @@ -1,22 +0,0 @@ ---- dist/Makefile.org Sat Jan 11 23:55:46 2003 -+++ dist/Makefile Sat Jan 11 23:55:36 2003 -@@ -242,14 +242,16 @@ - clean: - -$(DEL_CMD) $(ODE_OBJECTS) $(ODE_TEST_EXE) $(ODE_LIB) $(DRAWSTUFF_OBJECTS) $(DRAWSTUFF_TEST_EXE) $(DRAWSTUFF_LIB) ode/test/*$(OBJ) drawstuff/dstest/*$(OBJ) $(CONFIGURATOR_EXE) $(CONFIG_H) - -+# Patched for FreeBSD -+ - %$(OBJ): %.c -- $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $< -+ $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) -I/usr/X11R6/include $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $< - - %$(OBJ): %.cpp -- $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)$(OPT) $(C_OUT)$@ $< -+ $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) -I/usr/X11R6/include $(DEFINES) $(C_OPT)$(OPT) $(C_OUT)$@ $< - - %.exe: %$(OBJ) -- $(CC) $(C_EXEOUT)$@ $< $(ODE_LIB) $(DRAWSTUFF_LIB) $(RESOURCE_FILE) $(LINK_OPENGL) $(LINK_MATH) -+ $(CC) $(C_EXEOUT)$@ $< $(ODE_LIB) $(DRAWSTUFF_LIB) $(RESOURCE_FILE) $(LINK_OPENGL) $(LINK_MATH) -lXext - - # windows specific rules - diff --git a/extern/qhull/CMakeLists.txt b/extern/qhull/CMakeLists.txt deleted file mode 100644 index f2ac24afff3..00000000000 --- a/extern/qhull/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -SET(INC include src) - -SET(SRC - src/geom.c - src/geom2.c - src/global.c - src/io.c - src/mem.c - src/merge.c - src/poly.c - src/poly2.c - src/qhull.c - src/qset.c - src/stat.c - src/user.c -) - -BLENDERLIB(extern_qhull "${SRC}" "${INC}") -#, libtype=['game2','player'], priority=[50, 85] diff --git a/extern/qhull/COPYING.txt b/extern/qhull/COPYING.txt deleted file mode 100644 index 1334eba6d0b..00000000000 --- a/extern/qhull/COPYING.txt +++ /dev/null @@ -1,37 +0,0 @@ - Qhull, Copyright (c) 1993-2002 - - The National Science and Technology Research Center for - Computation and Visualization of Geometric Structures - (The Geometry Center) - University of Minnesota - 400 Lind Hall - 207 Church Street S.E. - Minneapolis, MN 55455 USA - - email: qhull@geom.umn.edu - -This software includes Qhull from The Geometry Center. Qhull is -copyrighted as noted above. Qhull is free software and may be obtained -via http from www.geom.umn.edu. It may be freely copied, modified, -and redistributed under the following conditions: - -1. All copyright notices must remain intact in all files. - -2. A copy of this text file must be distributed along with any copies - of Qhull that you redistribute; this includes copies that you have - modified, or copies of programs or other software products that - include Qhull. - -3. If you modify Qhull, you must include a notice giving the - name of the person performing the modification, the date of - modification, and the reason for such modification. - -4. When distributing modified versions of Qhull, or other software - products that include Qhull, you must provide notice that the original - source code may be obtained as noted above. - -5. There is no warranty or other guarantee of fitness for Qhull, it is - provided solely "as is". Bug reports or fixes may be sent to - qhull_bug@geom.umn.edu; the authors may or may not act on them as - they desire. - diff --git a/extern/qhull/README.txt b/extern/qhull/README.txt deleted file mode 100644 index 9ef958a1f47..00000000000 --- a/extern/qhull/README.txt +++ /dev/null @@ -1,318 +0,0 @@ -Name - - qhull, rbox 2002.1 August 20, 2002 - -Convex hull, Delaunay triangulation, Voronoi diagrams, Halfspace intersection - - Documentation: - html/index.htm - - Available from: - - - - - Version 1 (simplicial only): - - - - News and a paper: - - - -Purpose - - Qhull is a general dimension convex hull program that reads a set - of points from stdin, and outputs the smallest convex set that contains - the points to stdout. It also generates Delaunay triangulations, Voronoi - diagrams, furthest-site Voronoi diagrams, and halfspace intersections - about a point. - - Rbox is a useful tool in generating input for Qhull; it generates - hypercubes, diamonds, cones, circles, simplices, spirals, - lattices, and random points. - - Qhull produces graphical output for Geomview. This helps with - understanding the output. - - -Environment requirements - - Qhull and rbox should run on all 32-bit and 64-bit computers. Use - an ANSI C or C++ compiler to compile the program. The software is - self-contained. - - Qhull is copyrighted software. Please read COPYING.txt and REGISTER.txt - before using or distributing Qhull. - -To contribute to Qhull - - Qhull is on Savannah, http://savannah.gnu.org/projects/qhull/ - -Qhull on Windows 95, 98, ME, NT, 2000, XP - - The zip file contains rbox.exe, qhull.exe, qconvex.exe, qdelaunay.exe, - qhalf.exe, qvoronoi.exe, documentation files, and source files. - - To install Qhull: - - Unzip the files into a directory. You may use WinZip32 - - Open a DOS window for the directory. - - In Windows 95, the DOS window needs improvement. - - Double-click on qhull\eg\qhull-go.bat to call doskey (arrow keys). - - Increase the size of the screen font to 8x12. - - If the text is too dim, fix the screen colors with shareware (e.g., crt.exe) - - If you use qhull a lot, consider using the Cygwin Unix shell, - Cygwin tools (http://sources.redhat.com/cygwin/) - - Execute 'qconvex' for a synopsis and examples. - - Execute 'rbox 10 | qconvex' to compute the convex hull of 10 random points. - - Execute 'rbox 10 | qconvex i TO file' to write results to 'file'. - - If an error occurs, Windows 95 sends the error to stdout instead of stderr - - use 'TO xxx' to send normal output to xxx and error output to stdout - - Browse the documentation: qhull\html\index.htm - -Compiling for Unix - - The gzip file, qhull.tgz, contains documentation and source files for - qhull and rbox. - - To unpack the gzip file - - tar zxf qhull.tgz - - cd qhull - - Compiling with the Debian Make:[R. Laboissiere] - - cd src - - ./Make-config.sh - - cd .. - - configure - - make - - Compiling with Makefile (i.e., Makefile.txt) - - cd src - - in Makefile, check the CC, CCOPTS1, PRINTMAN, and PRINTC defines - - the defaults are gcc and enscript - - CCOPTS1 should include the ANSI flag. It defines __STDC__ - - in user.h, check the definitions of qh_SECticks and qh_CPUclock. - - use '#define qh_CLOCKtype 2' for timing runs longer than 1 hour - - type: make - - this builds: qhull qconvex qdelaunay qhalf qvoronoi rbox libqhull.a - - type: make doc - - this prints the man page - - See also qhull/html/index.htm - - if your compiler reports many errors, it is probably not a ANSI C compiler - - you will need to set the -ansi switch or find another compiler - - if your compiler warns about missing prototypes for fprintf() etc. - - this is ok, your compiler should have these in stdio.h - - if your compiler warns about missing prototypes for memset() etc. - - include memory.h in qhull_a.h - - if your compiler is gcc-2.95.1, you need to set flag -fno-strict-aliasing. - - This flag is set by default for other versions [Karas, Krishnaswami] - - if your compiler reports "global.c: storage size of 'qh_qh' isn't known" - - delete the initializer "={0}" in global.c, stat.c and mem.c - - if your compiler warns about "stat.c: improper initializer" - - this is ok, the initializer is not used - - if you have trouble building libqhull.a with 'ar' - - try 'make -f Makefile.txt qhullx' - - if the code compiles, the qhull test case will automatically execute - - if an error occurs, there's an incompatibility between machines - - For gcc-2.95.1, you need to set flag -fno-strict-aliasing. - It is set by default for other versions of gcc [Karas, Krishnaswami] - - If you can, try a different compiler - - You can turn off the Qhull memory manager with qh_NOmem in mem.h - - You can turn off compiler optimization (-O2 in Makefile) - - If you find the source of the problem, please let us know - - if you have Geomview (www.geomview.org) - - try 'rbox 100 | qconvex G >a' and load 'a' into Geomview - - run 'q_eg' for Geomview examples of Qhull output (see qh-eg.htm) - - to install the programs and their man pages: - - define MANDIR and BINDIR - - type 'make install' - -Compiling for Windows NT, 2000, XP with cygwin (www.cygwin.com) - - - install cygwin with gcc, make, ar, and ln - - cd qhull/src - - make -f Makefile.txt - -Compiling for Windows 95, 98, NT, 2000, XP - - Qhull compiles as a console application in Visual C++ 5.0 at warning - level 3. - - Visual C++ quickstart for qhull.exe: - - create a "Win32 console application" called "qhull" - - add the following files: - geom.c geom2.c global.c io.c mem.c merge.c poly.c poly2.c qhull.c - qset.c stat.c unix.c user.c - - create a "Win32 console application" called "rbox" - - add rbox.c - - Visual C++ quickstart for qhull library, qconvex.exe, etc. - - To simplify setting up lots of projects, - - create a temporary "Win32 console application" called "source" - - add all .c files from .../src/... - - In Tools::Options::Tab - Set tab size to 8 and indent size to 2 - - - create a "Win32 console application" called "rbox" - - move rbox.c from "qhull source" - - for Project:Settings..., Link - you only need the default libraries - - build the project - - - create a "Win32 static library" called "library" - - move these files from "qhull source" - geom.c geom2.c global.c io.c mem.c merge.c poly.c poly2.c qhull.c - qset.c stat.c user.c - - set the library file (use the same for debug and release) - - build the project - - - create a "Win32 console application" called "qhull" - - move unix.c from "qhull source" - - Set the library file in Project:Settings..., Link - - Qhull does not use other libraries - - - create a "Win32 console application" called "qconvex" - - move qconvex.c from "qhull source" - - Set the library file in Project:Settings..., Link - - - do the same for qdelaun.c, qhalf, qvoronoi.c, user_eg.c, user_eg2.c - - delete "qhull sources" since it is no longer needed - - Set the library file in Project:Settings..., Link - - use Project:Settings to make any changes - - use batch build to rebuild everything - - Qhull compiles with Borland C++ 5.0 bcc32. A Makefile is included. - Execute 'make -f MBorland'. If you use the Borland IDE, set the ANSI - option in Options:Project:Compiler:Source:Language-compliance. - - Qhull compiles with Borland C++ 4.02 for Win32 and DOS Power Pack. - Use 'make -f MBorland -D_DPMI'. Qhull 1.0 compiles with Borland - C++ 4.02. For rbox 1.0, use "bcc32 -WX -w- -O2-e -erbox -lc rbox.c". - Use the same options for Qhull 1.0. [D. Zwick] - - Qhull compiles with Metrowerks C++ 1.7 with the ANSI option. - - If you turn on full warnings, the compiler will report a number of - unused variables, variables set but not used, and dead code. These are - intentional. For example, variables may be initialized (unnecessarily) - to prevent warnings about possible use of uninitialized variables. - -Compiling for the Power Macintosh - - Qhull compiles for the Power Macintosh with Metrowerk's C compiler. - It uses the SIOUX interface to read point coordinates and return output. - There is no graphical output. For project files, see 'Compiling for - Windows 95'. Instead of using SIOUX, Qhull may be embedded within an - application. - - Version 1 is available for Macintosh computers by download of qhull.sit.hqx - It reads point coordinates from a standard file and returns output - to a standard file. There is no graphical output. - - -Compiling for other machines - - Some users have reported problems with compiling Qhull under Irix 5.1. It - compiles under other versions of Irix. - - If you have troubles with the memory manager, you can turn it off by - defining qh_NOmem in mem.h. - - You may compile Qhull with a C++ compiler. - - -Distributed files - - README.txt // instructions for installing Qhull - REGISTER.txt // Qhull registration - COPYING.txt // copyright notice - Announce.txt // announcement - Changes.txt // change history for Qhull and rbox - qh-faq.htm // Frequently asked questions - qh-home.htm // Home page - qh-get.htm // Download page - html/index.htm // Manual - Makefile.txt // Makefile for Unix or cygwin 'make' - MBorland // Makefile for Borland C++/Win32 - Make-config.sh // Create Debian configure and automake - -src/ - rbox consists of: - rbox.exe // Win32 executable (.zip only) - rbox.htm // html manual - rbox.man // Unix man page - rbox.txt - rbox.c // source program - - qhull consists of: - qhull.exe // Win32 executables (.zip only) - qconvex.exe - qdelaunay.exe - qhalf.exe - qvoronoi.exe - qhull-go.bat // DOS window - qconvex.htm // html manuals - qdelaun.htm - qdelau_f.htm - qhalf.htm - qvoronoi.htm - qvoron_f.htm - qh-eg.htm - qh-impre.htm - qh-in.htm - index.htm - qh-opt*.htm - qh-quick.htm - qh--4d.gif,etc. // images for manual - qhull.man // Unix man page - qhull.txt - q_eg // shell script for Geomview examples - q_egtest // shell script for Geomview test examples - q_test // shell script to test qhull - - top-level source files: - src/index.htm // index to source files - qh-...htm // specific files - user.h // header file of user definable constants - qhull.h // header file for qhull - unix.c // Unix front end to qhull - qhull.c // Quickhull algorithm with partitioning - user.c // user re-definable functions - user_eg.c // example of incorporating qhull into a user program - user_eg2.c // more complex example - qhull_interface.cpp // call Qhull from C++ - - other source files: - qhull_a.h // include file for *.c - geom.c // geometric routines - geom2.c - geom.h - global.c // global variables - io.c // input-output routines - io.h - mem.c // memory routines, this is stand-alone code - mem.h - merge.c // merging of non-convex facets - merge.h - poly.c // polyhedron routines - poly2.c - poly.h - qset.c // set routines, this only depends on mem.c - qset.h - stat.c // statistics - stat.h - -Authors: - - C. Bradford Barber Hannu Huhdanpaa - bradb@geom.umn.edu hannu@geom.umn.edu - - c/o The Geometry Center - University of Minnesota - 400 Lind Hall - 207 Church Street S.E. - Minneapolis, MN 55455 - - This software was developed under NSF grants NSF/DMS-8920161 and - NSF-CCR-91-15793 750-7504 at the Geometry Center and Harvard - University. If you find Qhull useful, please let us know. diff --git a/extern/qhull/REGISTER.txt b/extern/qhull/REGISTER.txt deleted file mode 100644 index 767eb1c0cda..00000000000 --- a/extern/qhull/REGISTER.txt +++ /dev/null @@ -1,37 +0,0 @@ -Dear User of Geometry Center Software: - -We would like to find out how you are using our software. Think of -Geometry Center software as a new kind of shareware: you share your -science and successes with us, and we share our software and support -with you. - -If you use Geometry Center software, please send us a note telling -us what you are doing with it. - -We need to know: - - (1) What you are working on - an abstract of your work would be - fine. - - (2) What Geometry Center software you use. - - (3) How that software has helped you, for example, by increasing - your productivity or allowing you to do things you could not do - before. In particular, if you feel that Geometry Center - software has had a direct bearing on your work, please tell us - about this. - -We encourage you to cite the use of any Geometry Center software you -have used in your publications. - -To cite Qhull, use - - Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., "The Quickhull - algorithm for convex hulls," ACM Trans. on Mathematical Software, - Dec 1996. http://www.geom.umn.edu/software/qhull - -Please send e-mail to - - qhull@geom.umn.edu - -Thank you! diff --git a/extern/qhull/SConscript b/extern/qhull/SConscript deleted file mode 100644 index 7f911d1b7f1..00000000000 --- a/extern/qhull/SConscript +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/python -import sys -import os - -Import('env') -defs = '' -cflags = [] -if sys.platform=='linux2' or sys.platform=='linux-i386': - cflags += ['-O2','-ansi'] -elif env['OURPLATFORM']=='win32-vc': - cflags += ['/O2'] -elif env['OURPLATFORM']=='win32-mingw': - cflags += ['-O2'] -elif sys.platform=='sunos5': - cflags += ['-O2', '-ansi'] -elif sys.platform=='darwin': - cflags += ['-O2', '-pipe', '-fPIC', '-funsigned-char', '-ffast-math'] - -sources = ['src/geom.c', - 'src/geom2.c', - 'src/global.c', - 'src/io.c', - 'src/mem.c', - 'src/merge.c', - 'src/poly.c', - 'src/poly2.c', - 'src/qhull.c', - 'src/qset.c', - 'src/stat.c', - 'src/user.c'] - - -incs = 'include src' - -env.BlenderLib ( 'extern_qhull', sources, Split(incs), Split(defs), libtype=['game2','player'], priority=[50, 85], compileflags = cflags) diff --git a/extern/qhull/VisualC6/qhull.dsw b/extern/qhull/VisualC6/qhull.dsw deleted file mode 100644 index 96c68d8e34c..00000000000 --- a/extern/qhull/VisualC6/qhull.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "qhull"=".\qhull\qhull.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/extern/qhull/VisualC6/qhull/qhull.dsp b/extern/qhull/VisualC6/qhull/qhull.dsp deleted file mode 100644 index 6e059b0994c..00000000000 --- a/extern/qhull/VisualC6/qhull/qhull.dsp +++ /dev/null @@ -1,192 +0,0 @@ -# Microsoft Developer Studio Project File - Name="qhull" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=qhull - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "qhull.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "qhull.mak" CFG="qhull - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "qhull - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "qhull - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "qhull - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\lib\windows\qhull\include\qhull\ XCOPY /Y Release\*.lib ..\..\..\..\..\lib\windows\qhull\lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "qhull - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MT /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=XCOPY /Y ..\..\include\qhull\*.h ..\..\..\..\..\lib\windows\qhull\include\qhull\ XCOPY /Y Debug\*.lib ..\..\..\..\..\lib\windows\qhull\lib\Debug\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "qhull - Win32 Release" -# Name "qhull - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\src\geom.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\geom2.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\global.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\io.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\mem.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\merge.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\poly.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\poly2.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\qhull.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\qset.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\stat.c -# End Source File -# Begin Source File - -SOURCE=..\..\src\user.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\src\geom.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\io.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\mem.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\merge.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\poly.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\qhull.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\qhull_a.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\qset.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\stat.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\user.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/qhull/include/qhull/geom.h b/extern/qhull/include/qhull/geom.h deleted file mode 100644 index 32440cff56f..00000000000 --- a/extern/qhull/include/qhull/geom.h +++ /dev/null @@ -1,177 +0,0 @@ -/*
  ---------------------------------
-
-  geom.h 
-    header file for geometric routines
-
-   see qh-geom.htm and geom.c
-
-   copyright (c) 1993-2002 The Geometry Center        
-*/
-
-#ifndef qhDEFgeom
-#define qhDEFgeom 1
-
-/* ============ -macros- ======================== */
-
-/*----------------------------------
-   
-  fabs_(a)
-    returns the absolute value of a
-*/
-#define fabs_( a ) ((( a ) < 0 ) ? -( a ):( a ))
-               
-/*----------------------------------
-  
-  fmax_(a,b)
-    returns the maximum value of a and b
-*/
-#define fmax_( a,b )  ( ( a ) < ( b ) ? ( b ) : ( a ) )
-
-/*----------------------------------
-
-  fmin_(a,b)
-    returns the minimum value of a and b
-*/
-#define fmin_( a,b )  ( ( a ) > ( b ) ? ( b ) : ( a ) )
-
-/*----------------------------------
-
-  maximize_(maxval, val)
-    set maxval to val if val is greater than maxval
-*/
-#define maximize_( maxval, val ) {if (( maxval ) < ( val )) ( maxval )= ( val );}
-
-/*----------------------------------
-
-  minimize_(minval, val)
-    set minval to val if val is less than minval
-*/
-#define minimize_( minval, val ) {if (( minval ) > ( val )) ( minval )= ( val );}
-
-/*----------------------------------
-
-  det2_(a1, a2,     
-        b1, b2)
-  
-    compute a 2-d determinate
-*/
-#define det2_( a1,a2,b1,b2 ) (( a1 )*( b2 ) - ( a2 )*( b1 ))
-
-/*----------------------------------
-  
-  det3_(a1, a2, a3,    
-       b1, b2, b3,
-       c1, c2, c3)
-  
-    compute a 3-d determinate
-*/
-#define det3_( a1,a2,a3,b1,b2,b3,c1,c2,c3 ) ( ( a1 )*det2_( b2,b3,c2,c3 ) \
-                - ( b1 )*det2_( a2,a3,c2,c3 ) + ( c1 )*det2_( a2,a3,b2,b3 ) )
-
-/*----------------------------------
-  
-  dX( p1, p2 )
-  dY( p1, p2 )
-  dZ( p1, p2 )
-  
-    given two indices into rows[],
-
-    compute the difference between X, Y, or Z coordinates
-*/
-#define dX( p1,p2 )  ( *( rows[p1] ) - *( rows[p2] ))
-#define dY( p1,p2 )  ( *( rows[p1]+1 ) - *( rows[p2]+1 ))
-#define dZ( p1,p2 )  ( *( rows[p1]+2 ) - *( rows[p2]+2 ))
-#define dW( p1,p2 )  ( *( rows[p1]+3 ) - *( rows[p2]+3 ))
-
-/*============= prototypes in alphabetical order, infrequent at end ======= */
-
-void    qh_backnormal (realT **rows, int numrow, int numcol, boolT sign, coordT *normal, boolT *nearzero);
-void	qh_distplane (pointT *point, facetT *facet, realT *dist);
-facetT *qh_findbest (pointT *point, facetT *startfacet,
-		     boolT bestoutside, boolT isnewfacets, boolT noupper,
-		     realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbesthorizon (boolT ischeckmax, pointT *point, 
-	             facetT *startfacet, boolT noupper, realT *bestdist, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet, realT *dist, 
-		     boolT bestoutside, boolT *isoutside, int *numpart);
-void 	qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero);
-realT   qh_getangle(pointT *vect1, pointT *vect2);
-pointT *qh_getcenter(setT *vertices);
-pointT *qh_getcentrum(facetT *facet);
-realT   qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist);
-void    qh_normalize (coordT *normal, int dim, boolT toporient);
-void    qh_normalize2 (coordT *normal, int dim, boolT toporient, 
-            realT *minnorm, boolT *ismin);
-pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist);
-
-void    qh_setfacetplane(facetT *newfacets);
-void 	qh_sethyperplane_det (int dim, coordT **rows, coordT *point0, 
-              boolT toporient, coordT *normal, realT *offset, boolT *nearzero);
-void 	qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0, 
-	     boolT toporient, coordT *normal, coordT *offset, boolT *nearzero);
-boolT   qh_sharpnewfacets (void);
-
-/*========= infrequently used code in geom2.c =============*/
-
-
-coordT *qh_copypoints (coordT *points, int numpoints, int dimension);
-void    qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]);
-realT 	qh_determinant (realT **rows, int dim, boolT *nearzero);
-realT   qh_detjoggle (pointT *points, int numpoints, int dimension);
-void    qh_detroundoff (void);
-realT   qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero);
-realT   qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp);
-realT   qh_distround (int dimension, realT maxabs, realT maxsumabs);
-realT   qh_divzero(realT numer, realT denom, realT mindenom1, boolT *zerodiv);
-realT   qh_facetarea (facetT *facet);
-realT   qh_facetarea_simplex (int dim, coordT *apex, setT *vertices, 
-          vertexT *notvertex,  boolT toporient, coordT *normal, realT *offset);
-pointT *qh_facetcenter (setT *vertices);
-facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp, facetT **facetlist);
-void    qh_getarea (facetT *facetlist);
-boolT   qh_gram_schmidt(int dim, realT **rows);
-boolT   qh_inthresholds (coordT *normal, realT *angle);
-void    qh_joggleinput (void);
-realT  *qh_maxabsval (realT *normal, int dim);
-setT   *qh_maxmin(pointT *points, int numpoints, int dimension);
-realT   qh_maxouter (void);
-void    qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex);
-realT   qh_minabsval (realT *normal, int dim);
-int     qh_mindiff (realT *vecA, realT *vecB, int dim);
-boolT   qh_orientoutside (facetT *facet);
-void    qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-coordT  qh_pointdist(pointT *point1, pointT *point2, int dim);
-void    qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol);
-void    qh_printpoints (FILE *fp, char *string, setT *points);
-void    qh_projectinput (void);
-void 	qh_projectpoints (signed char *project, int n, realT *points, 
-             int numpoints, int dim, realT *newpoints, int newdim);
-int     qh_rand( void);
-void    qh_srand( int seed);
-realT   qh_randomfactor (void);
-void    qh_randommatrix (realT *buffer, int dim, realT **row);
-void    qh_rotateinput (realT **rows);
-void    qh_rotatepoints (realT *points, int numpoints, int dim, realT **rows);
-void    qh_scaleinput (void);
-void    qh_scalelast (coordT *points, int numpoints, int dim, coordT low,
-		   coordT high, coordT newhigh);
-void 	qh_scalepoints (pointT *points, int numpoints, int dim,
-  		realT *newlows, realT *newhighs);
-boolT   qh_sethalfspace (int dim, coordT *coords, coordT **nextp, 
-              coordT *normal, coordT *offset, coordT *feasible);
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-pointT *qh_voronoi_center (int dim, setT *points);
-
-#endif /* qhDEFgeom */
-
-
-
diff --git a/extern/qhull/include/qhull/io.h b/extern/qhull/include/qhull/io.h
deleted file mode 100644
index 351d56b3708..00000000000
--- a/extern/qhull/include/qhull/io.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
  ---------------------------------
-
-   io.h 
-   declarations of Input/Output functions
-
-   see README, qhull.h and io.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFio
-#define qhDEFio 1
-
-/*============ constants and flags ==================*/
-
-/*----------------------------------
-  
-  qh_MAXfirst
-    maximum length of first two lines of stdin
-*/
-#define qh_MAXfirst  200
-
-/*----------------------------------
-  
-  qh_MINradius
-    min radius for Gp and Gv, fraction of maxcoord
-*/
-#define qh_MINradius 0.02
-
-/*----------------------------------
-  
-  qh_GEOMepsilon
-    adjust outer planes for 'lines closer' and geomview roundoff.  
-    This prevents bleed through.
-*/
-#define qh_GEOMepsilon 2e-3
-
-/*----------------------------------
-  
-  qh_WHITESPACE
-    possible values of white space
-*/
-#define qh_WHITESPACE " \n\t\v\r\f"
-
-
-/*----------------------------------
-  
-  qh_RIDGE
-    to select which ridges to print in qh_eachvoronoi
-*/
-typedef enum
-{
-    qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
-}
-qh_RIDGE;
-
-/*----------------------------------
-  
-  printvridgeT
-    prints results of qh_printvdiagram
-
-  see:
-    qh_printvridge for an example
-*/
-typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-
-/*============== -prototypes in alphabetical order =========*/
-
-void    dfacet( unsigned id);
-void    dvertex( unsigned id);
-void    qh_countfacets (facetT *facetlist, setT *facets, boolT printall, 
-              int *numfacetsp, int *numsimplicialp, int *totneighborsp, 
-              int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
-pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
-setT   *qh_detvridge (vertexT *vertex);
-setT   *qh_detvridge3 (vertexT *atvertex, vertexT *vertex);
-int     qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
-int     qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder);
-void	qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
-setT   *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-void    qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane);
-void    qh_markkeep (facetT *facetlist);
-setT   *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp);
-void    qh_order_vertexneighbors(vertexT *vertex);
-void	qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall);
-void    qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void 	qh_printcenter (FILE *fp, int format, char *string, facetT *facet);
-void    qh_printcentrum (FILE *fp, facetT *facet, realT radius);
-void    qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void    qh_printend4geom (FILE *fp, facetT *facet, int *num, boolT printall);
-void    qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void    qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void    qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void	qh_printfacet(FILE *fp, facetT *facet);
-void	qh_printfacet2math(FILE *fp, facetT *facet, int notfirst);
-void	qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
-void    qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
-			       facetT *facet, realT offset, realT color[3]);
-void	qh_printfacet3math (FILE *fp, facetT *facet, int notfirst);
-void	qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
-void	qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacet3vertex(FILE *fp, facetT *facet, int format);
-void	qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format);
-void	qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format);
-void    qh_printfacetheader(FILE *fp, facetT *facet);
-void    qh_printfacetridges(FILE *fp, facetT *facet);
-void	qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void	qh_printhelp_degenerate(FILE *fp);
-void	qh_printhelp_singular(FILE *fp);
-void	qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
-  		   setT *vertices, realT color[3]);
-void	qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void    qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
-void	qh_printpoint(FILE *fp, char *string, pointT *point);
-void	qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id);
-void    qh_printpoint3 (FILE *fp, pointT *point);
-void    qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void    qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
-void    qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
-void	qh_printridge(FILE *fp, ridgeT *ridge);
-void    qh_printspheres(FILE *fp, setT *vertices, realT radius);
-void    qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-int     qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
-void	qh_printvertex(FILE *fp, vertexT *vertex);
-void	qh_printvertexlist (FILE *fp, char* string, facetT *facetlist,
-                         setT *facets, boolT printall);
-void	qh_printvertices (FILE *fp, char* string, setT *vertices);
-void    qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall);
-void    qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void    qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void    qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void	qh_produce_output(void);
-void    qh_projectdim3 (pointT *source, pointT *destination);
-int     qh_readfeasible (int dim, char *remainder);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-void    qh_setfeasible (int dim);
-boolT	qh_skipfacet(facetT *facet);
-
-#endif /* qhDEFio */
diff --git a/extern/qhull/include/qhull/mem.h b/extern/qhull/include/qhull/mem.h
deleted file mode 100644
index e9ebd1bb9bc..00000000000
--- a/extern/qhull/include/qhull/mem.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
  ---------------------------------
-
-   mem.h 
-     prototypes for memory management functions
-
-   see qh-mem.htm, mem.c and qset.h
-
-   for error handling, writes message and calls
-     qh_errexit (qhmem_ERRmem, NULL, NULL) if insufficient memory
-       and
-     qh_errexit (qhmem_ERRqhull, NULL, NULL) otherwise
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmem
-#define qhDEFmem
-
-/*---------------------------------
-  
-  qh_NOmem
-    turn off quick-fit memory allocation
-
-  notes:
-    mem.c implements Quickfit memory allocation for about 20% time
-    savings.  If it fails on your machine, try to locate the
-    problem, and send the answer to qhull@geom.umn.edu.  If this can
-    not be done, define qh_NOmem to use malloc/free instead.
-
-   #define qh_NOmem
-*/
-
-/*-------------------------------------------
-    to avoid bus errors, memory allocation must consider alignment requirements.
-    malloc() automatically takes care of alignment.   Since mem.c manages
-    its own memory, we need to explicitly specify alignment in
-    qh_meminitbuffers().
-
-    A safe choice is sizeof(double).  sizeof(float) may be used if doubles 
-    do not occur in data structures and pointers are the same size.  Be careful
-    of machines (e.g., DEC Alpha) with large pointers.  If gcc is available, 
-    use __alignof__(double) or fmax_(__alignof__(float), __alignof__(void *)).
-
-   see qh_MEMalign in user.h for qhull's alignment
-*/
-
-#define qhmem_ERRmem 4    /* matches qh_ERRmem in qhull.h */
-#define qhmem_ERRqhull 5  /* matches qh_ERRqhull in qhull.h */
-
-/*----------------------------------
-  
-  ptr_intT
-    for casting a void* to an integer-type
-  
-  notes:
-    On 64-bit machines, a pointer may be larger than an 'int'.  
-    qh_meminit() checks that 'long' holds a 'void*'
-*/
-typedef unsigned long ptr_intT;
-
-/*----------------------------------
- 
-  qhmemT
-    global memory structure for mem.c
- 
- notes:
-   users should ignore qhmem except for writing extensions
-   qhmem is allocated in mem.c 
-   
-   qhmem could be swapable like qh and qhstat, but then
-   multiple qh's and qhmem's would need to keep in synch.  
-   A swapable qhmem would also waste memory buffers.  As long
-   as memory operations are atomic, there is no problem with
-   multiple qh structures being active at the same time.
-   If you need separate address spaces, you can swap the
-   contents of qhmem.
-*/
-typedef struct qhmemT qhmemT;
-extern qhmemT qhmem; 
-
-struct qhmemT {               /* global memory management variables */
-  int      BUFsize;	      /* size of memory allocation buffer */
-  int      BUFinit;	      /* initial size of memory allocation buffer */
-  int      TABLEsize;         /* actual number of sizes in free list table */
-  int      NUMsizes;          /* maximum number of sizes in free list table */
-  int      LASTsize;          /* last size in free list table */
-  int      ALIGNmask;         /* worst-case alignment, must be 2^n-1 */
-  void	 **freelists;          /* free list table, linked by offset 0 */
-  int     *sizetable;         /* size of each freelist */
-  int     *indextable;        /* size->index table */
-  void    *curbuffer;         /* current buffer, linked by offset 0 */
-  void    *freemem;           /*   free memory in curbuffer */
-  int 	   freesize;          /*   size of free memory in bytes */
-  void 	  *tempstack;         /* stack of temporary memory, managed by users */
-  FILE    *ferr;              /* file for reporting errors */
-  int      IStracing;         /* =5 if tracing memory allocations */
-  int      cntquick;          /* count of quick allocations */
-                              /* remove statistics doesn't effect speed */
-  int      cntshort;          /* count of short allocations */
-  int      cntlong;           /* count of long allocations */
-  int      curlong;           /* current count of inuse, long allocations */
-  int      freeshort;	      /* count of short memfrees */
-  int      freelong;	      /* count of long memfrees */
-  int      totshort;          /* total size of short allocations */
-  int      totlong;           /* total size of long allocations */
-  int      maxlong;           /* maximum totlong */
-  int      cntlarger;         /* count of setlarger's */
-  int      totlarger;         /* total copied by setlarger */
-};
-
-
-/*==================== -macros ====================*/
-
-/*----------------------------------
-   
-  qh_memalloc_(size, object, type)  
-    returns object of size bytes 
-	assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-
-#ifdef qh_NOmem
-#define qh_memalloc_(size, freelistp, object, type) {\
-  object= (type*)qh_memalloc (size); }
-#else /* !qh_NOmem */
-
-#define qh_memalloc_(size, freelistp, object, type) {\
-  freelistp= qhmem.freelists + qhmem.indextable[size];\
-  if ((object= (type*)*freelistp)) {\
-    qhmem.cntquick++;  \
-    *freelistp= *((void **)*freelistp);\
-  }else object= (type*)qh_memalloc (size);}
-#endif
-
-/*----------------------------------
-   
-  qh_memfree_(object, size) 
-    free up an object
-
-  notes:
-    object may be NULL
-    assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-#ifdef qh_NOmem
-#define qh_memfree_(object, size, freelistp) {\
-  qh_memfree (object, size); }
-#else /* !qh_NOmem */
-
-#define qh_memfree_(object, size, freelistp) {\
-  if (object) { \
-    qhmem .freeshort++;\
-    freelistp= qhmem.freelists + qhmem.indextable[size];\
-    *((void **)object)= *freelistp;\
-    *freelistp= object;}}
-#endif
-
-/*=============== prototypes in alphabetical order ============*/
-
-void *qh_memalloc(int insize);
-void qh_memfree (void *object, int size);
-void qh_memfreeshort (int *curlong, int *totlong);
-void qh_meminit (FILE *ferr);
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes,
-			int bufsize, int bufinit);
-void qh_memsetup (void);
-void qh_memsize(int size);
-void qh_memstatistics (FILE *fp);
-
-#endif /* qhDEFmem */
diff --git a/extern/qhull/include/qhull/merge.h b/extern/qhull/include/qhull/merge.h
deleted file mode 100644
index 7fc2afa5967..00000000000
--- a/extern/qhull/include/qhull/merge.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
  ---------------------------------
-
-   merge.h 
-   header file for merge.c
-
-   see qh-merge.htm and merge.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmerge
-#define qhDEFmerge 1
-
-
-/*============ -constants- ==============*/
-
-/*----------------------------------
-
-  qh_ANGLEredundant
-    indicates redundant merge in mergeT->angle
-*/
-#define qh_ANGLEredundant 6.0
-
-/*----------------------------------
-  
-  qh_ANGLEdegen
-    indicates degenerate facet in mergeT->angle
-*/
-#define qh_ANGLEdegen     5.0
-
-/*----------------------------------
-  
-  qh_ANGLEconcave
-    offset to indicate concave facets in mergeT->angle
-  
-  notes:
-    concave facets are assigned the range of [2,4] in mergeT->angle
-    roundoff error may make the angle less than 2
-*/
-#define qh_ANGLEconcave  1.5
-
-/*----------------------------------
-  
-  MRG... (mergeType)
-    indicates the type of a merge (mergeT->type)
-*/
-typedef enum {	/* in sort order for facet_mergeset */
-  MRGnone= 0,
-  MRGcoplanar,		/* centrum coplanar */
-  MRGanglecoplanar,	/* angle coplanar */
-  			/* could detect half concave ridges */
-  MRGconcave,		/* concave ridge */
-  MRGflip,		/* flipped facet. facet1 == facet2 */
-  MRGridge,		/* duplicate ridge (qh_MERGEridge) */
-                        /* degen and redundant go onto degen_mergeset */
-  MRGdegen,		/* degenerate facet (not enough neighbors) facet1 == facet2 */
-  MRGredundant,		/* redundant facet (vertex subset) */
-  			/* merge_degenredundant assumes degen < redundant */
-  MRGmirror,	        /* mirror facet from qh_triangulate */
-  ENDmrg
-} mergeType;
-
-/*----------------------------------
-  
-  qh_MERGEapex
-    flag for qh_mergefacet() to indicate an apex merge  
-*/
-#define qh_MERGEapex     True
-
-/*============ -structures- ====================*/
-
-/*----------------------------------
-     
-  mergeT
-    structure used to merge facets
-*/
-
-typedef struct mergeT mergeT;
-struct mergeT {		/* initialize in qh_appendmergeset */
-  realT   angle;        /* angle between normals of facet1 and facet2 */
-  facetT *facet1; 	/* will merge facet1 into facet2 */
-  facetT *facet2;
-  mergeType type;
-};
-
-
-/*=========== -macros- =========================*/
-
-/*----------------------------------
-     
-  FOREACHmerge_( merges ) {...}
-    assign 'merge' to each merge in merges
-       
-  notes:
-    uses 'mergeT *merge, **mergep;'
-    if qh_mergefacet(),
-      restart since qh.facet_mergeset may change
-    see FOREACHsetelement_
-*/
-#define FOREACHmerge_( merges ) FOREACHsetelement_(mergeT, merges, merge)
-
-/*============ prototypes in alphabetical order after pre/postmerge =======*/
-
-void    qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle);
-void    qh_postmerge (char *reason, realT maxcentrum, realT maxangle, 
-             boolT vneighbors);
-void    qh_all_merges (boolT othermerge, boolT vneighbors);
-void    qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle);
-setT   *qh_basevertices( facetT *samecycle);
-void    qh_checkconnect (void /* qh new_facets */);
-boolT   qh_checkzero (boolT testall);
-void    qh_copynonconvex (ridgeT *atridge);
-void    qh_degen_redundant_facet (facetT *facet);
-void   	qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet);
-vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges);
-void    qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor,
-           facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp);
-facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp);
-void 	qh_flippedmerges(facetT *facetlist, boolT *wasmerge);
-void 	qh_forcedmerges( boolT *wasmerge);
-void	qh_getmergeset(facetT *facetlist);
-void 	qh_getmergeset_initial (facetT *facetlist);
-void    qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex);
-ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge, 
-              vertexT *vertex, vertexT *oldvertex, int *hashslot);
-void 	qh_makeridges(facetT *facet);
-void    qh_mark_dupridges(facetT *facetlist);
-void    qh_maydropneighbor (facetT *facet);
-int     qh_merge_degenredundant (void);
-void    qh_merge_nonconvex( facetT *facet1, facetT *facet2, mergeType mergetype);
-void    qh_mergecycle (facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_all (facetT *facetlist, boolT *wasmerge);
-void    qh_mergecycle_facets( facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_vneighbors( facetT *samecycle, facetT *newfacet);
-void 	qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex);
-void    qh_mergefacet2d (facetT *facet1, facetT *facet2);
-void 	qh_mergeneighbors(facetT *facet1, facetT *facet2);
-void 	qh_mergeridges(facetT *facet1, facetT *facet2);
-void    qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex);
-void    qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2);
-void    qh_mergevertex_neighbors(facetT *facet1, facetT *facet2);
-void	qh_mergevertices(setT *vertices1, setT **vertices);
-setT   *qh_neighbor_intersections (vertexT *vertex);
-void    qh_newvertices (setT *vertices);
-boolT   qh_reducevertices (void);
-vertexT *qh_redundant_vertex (vertexT *vertex);
-boolT   qh_remove_extravertices (facetT *facet);
-vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet);
-void	qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex);
-void    qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges,
-			facetT *oldfacet, facetT *neighborA);
-boolT 	qh_test_appendmerge (facetT *facet, facetT *neighbor);
-boolT   qh_test_vneighbors (void /* qh newfacet_list */);
-void    qh_tracemerge (facetT *facet1, facetT *facet2);
-void    qh_tracemerging (void);
-void    qh_updatetested( facetT *facet1, facetT *facet2);
-setT   *qh_vertexridges (vertexT *vertex);
-void    qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges);
-void    qh_willdelete (facetT *facet, facetT *replace);
-
-#endif /* qhDEFmerge */
diff --git a/extern/qhull/include/qhull/poly.h b/extern/qhull/include/qhull/poly.h
deleted file mode 100644
index 294ec9527fc..00000000000
--- a/extern/qhull/include/qhull/poly.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
  ---------------------------------
-
-   poly.h 
-   header file for poly.c and poly2.c
-
-   see qh-poly.htm, qhull.h and poly.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFpoly
-#define qhDEFpoly 1
-
-/*===============   constants ========================== */
-
-/*----------------------------------
-  
-  ALGORITHMfault   
-    use as argument to checkconvex() to report errors during buildhull
-*/
-#define qh_ALGORITHMfault 0
-
-/*----------------------------------
-  
-  DATAfault        
-    use as argument to checkconvex() to report errors during initialhull
-*/
-#define qh_DATAfault 1
-
-/*----------------------------------
-  
-  DUPLICATEridge
-    special value for facet->neighbor to indicate a duplicate ridge
-  
-  notes:
-    set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_DUPLICATEridge ( facetT * ) 1L
-
-/*----------------------------------
-  
-  MERGEridge       flag in facet
-    special value for facet->neighbor to indicate a merged ridge
-  
-  notes:
-    set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_MERGEridge ( facetT * ) 2L
-
-
-/*============ -structures- ====================*/
-
-/*=========== -macros- =========================*/
-
-/*----------------------------------
-  
-  FORALLfacet_( facetlist ) { ... }
-    assign 'facet' to each facet in facetlist
-    
-  notes:
-    uses 'facetT *facet;'
-    assumes last facet is a sentinel
-    
-  see:
-    FORALLfacets
-*/
-#define FORALLfacet_( facetlist ) if ( facetlist ) for( facet=( facetlist );facet && facet->next;facet=facet->next )
-
-/*----------------------------------
-  
-  FORALLnew_facets { ... } 
-    assign 'newfacet' to each facet in qh.newfacet_list
-    
-  notes:
-    uses 'facetT *newfacet;'
-    at exit, newfacet==NULL
-*/
-#define FORALLnew_facets for( newfacet=qh newfacet_list;newfacet && newfacet->next;newfacet=newfacet->next )
-
-/*----------------------------------
-  
-  FORALLvertex_( vertexlist ) { ... }
-    assign 'vertex' to each vertex in vertexlist
-    
-  notes:
-    uses 'vertexT *vertex;'
-    at exit, vertex==NULL
-*/
-#define FORALLvertex_( vertexlist ) for ( vertex=( vertexlist );vertex && vertex->next;vertex= vertex->next )
-
-/*----------------------------------
-  
-  FORALLvisible_facets { ... }
-    assign 'visible' to each visible facet in qh.visible_list
-    
-  notes:
-    uses 'vacetT *visible;'
-    at exit, visible==NULL
-*/
-#define FORALLvisible_facets for (visible=qh visible_list; visible && visible->visible; visible= visible->next)
-
-/*----------------------------------
-  
-  FORALLsame_( newfacet ) { ... } 
-    assign 'same' to each facet in newfacet->f.samecycle
-    
-  notes:
-    uses 'facetT *same;'
-    stops when it returns to newfacet
-*/
-#define FORALLsame_(newfacet) for (same= newfacet->f.samecycle; same != newfacet; same= same->f.samecycle)
-
-/*----------------------------------
-  
-  FORALLsame_cycle_( newfacet ) { ... } 
-    assign 'same' to each facet in newfacet->f.samecycle
-    
-  notes:
-    uses 'facetT *same;'
-    at exit, same == NULL
-*/
-#define FORALLsame_cycle_(newfacet) \
-     for (same= newfacet->f.samecycle; \
-         same; same= (same == newfacet ?  NULL : same->f.samecycle))
-
-/*----------------------------------
-  
-  FOREACHneighborA_( facet ) { ... }
-    assign 'neighborA' to each neighbor in facet->neighbors
-  
-  FOREACHneighborA_( vertex ) { ... }
-    assign 'neighborA' to each neighbor in vertex->neighbors
-  
-  declare:
-    facetT *neighborA, **neighborAp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHneighborA_(facet)  FOREACHsetelement_(facetT, facet->neighbors, neighborA)
-
-/*----------------------------------
-  
-  FOREACHvisible_( facets ) { ... } 
-    assign 'visible' to each facet in facets
-    
-  notes:
-    uses 'facetT *facet, *facetp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHvisible_(facets) FOREACHsetelement_(facetT, facets, visible)
-
-/*----------------------------------
-  
-  FOREACHnewfacet_( facets ) { ... } 
-    assign 'newfacet' to each facet in facets
-    
-  notes:
-    uses 'facetT *newfacet, *newfacetp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHnewfacet_(facets) FOREACHsetelement_(facetT, facets, newfacet)
-
-/*----------------------------------
-  
-  FOREACHvertexA_( vertices ) { ... } 
-    assign 'vertexA' to each vertex in vertices
-    
-  notes:
-    uses 'vertexT *vertexA, *vertexAp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHvertexA_(vertices) FOREACHsetelement_(vertexT, vertices, vertexA)
-
-/*----------------------------------
-  
-  FOREACHvertexreverse12_( vertices ) { ... } 
-    assign 'vertex' to each vertex in vertices
-    reverse order of first two vertices
-    
-  notes:
-    uses 'vertexT *vertex, *vertexp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHvertexreverse12_(vertices) FOREACHsetelementreverse12_(vertexT, vertices, vertex)
-
-
-/*=============== prototypes poly.c in alphabetical order ================*/
-
-void    qh_appendfacet(facetT *facet);
-void    qh_appendvertex(vertexT *vertex);
-void 	qh_attachnewfacets (void);
-boolT   qh_checkflipped (facetT *facet, realT *dist, boolT allerror);
-void	qh_delfacet(facetT *facet);
-void 	qh_deletevisible(void /*qh visible_list, qh horizon_list*/);
-setT   *qh_facetintersect (facetT *facetA, facetT *facetB, int *skipAp,int *skipBp, int extra);
-unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem);
-facetT *qh_makenewfacet(setT *vertices, boolT toporient, facetT *facet);
-void    qh_makenewplanes ( void /* newfacet_list */);
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew);
-facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew);
-void    qh_matchneighbor (facetT *newfacet, int newskip, int hashsize,
-			  int *hashcount);
-void	qh_matchnewfacets (void);
-boolT   qh_matchvertices (int firstindex, setT *verticesA, int skipA, 
-			  setT *verticesB, int *skipB, boolT *same);
-facetT *qh_newfacet(void);
-ridgeT *qh_newridge(void);
-int     qh_pointid (pointT *point);
-void 	qh_removefacet(facetT *facet);
-void 	qh_removevertex(vertexT *vertex);
-void    qh_updatevertices (void);
-
-
-/*========== -prototypes poly2.c in alphabetical order ===========*/
-
-void    qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash);
-void 	qh_check_bestdist (void);
-void    qh_check_maxout (void);
-void    qh_check_output (void);
-void    qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2);
-void   	qh_check_points(void);
-void 	qh_checkconvex(facetT *facetlist, int fault);
-void    qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp);
-void 	qh_checkflipped_all (facetT *facetlist);
-void 	qh_checkpolygon(facetT *facetlist);
-void    qh_checkvertex (vertexT *vertex);
-void 	qh_clearcenters (qh_CENTER type);
-void 	qh_createsimplex(setT *vertices);
-void 	qh_delridge(ridgeT *ridge);
-void    qh_delvertex (vertexT *vertex);
-setT   *qh_facet3vertex (facetT *facet);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
-           realT *bestdist, boolT *isoutside);
-facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside,
-			  int *numpart);
-int 	qh_findgood (facetT *facetlist, int goodhorizon);
-void 	qh_findgood_all (facetT *facetlist);
-void    qh_furthestnext (void /* qh facet_list */);
-void    qh_furthestout (facetT *facet);
-void    qh_infiniteloop (facetT *facet);
-void 	qh_initbuild(void);
-void 	qh_initialhull(setT *vertices);
-setT   *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints);
-vertexT *qh_isvertex (pointT *point, setT *vertices);
-vertexT *qh_makenewfacets (pointT *point /*horizon_list, visible_list*/);
-void    qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount);
-void    qh_nearcoplanar ( void /* qh.facet_list */);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-int 	qh_newhashtable(int newsize);
-vertexT *qh_newvertex(pointT *point);
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp);
-void    qh_outcoplanar (void /* facet_list */);
-pointT *qh_point (int id);
-void 	qh_point_add (setT *set, pointT *point, void *elem);
-setT   *qh_pointfacet (void /*qh facet_list*/);
-setT   *qh_pointvertex (void /*qh facet_list*/);
-void 	qh_prependfacet(facetT *facet, facetT **facetlist);
-void	qh_printhashtable(FILE *fp);
-void    qh_printlists (void);
-void    qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/);
-void    qh_setvoronoi_all (void);
-void	qh_triangulate (void /*qh facet_list*/);
-void    qh_triangulate_facet (facetT *facetA, vertexT **first_vertex);
-void    qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB);
-void	qh_triangulate_mirror (facetT *facetA, facetT *facetB);
-void    qh_triangulate_null (facetT *facetA);
-void    qh_vertexintersect(setT **vertexsetA,setT *vertexsetB);
-setT   *qh_vertexintersect_new(setT *vertexsetA,setT *vertexsetB);
-void    qh_vertexneighbors (void /*qh facet_list*/);
-boolT 	qh_vertexsubset(setT *vertexsetA, setT *vertexsetB);
-
-
-#endif /* qhDEFpoly */
diff --git a/extern/qhull/include/qhull/qhull.h b/extern/qhull/include/qhull/qhull.h
deleted file mode 100644
index 896ec1e9c18..00000000000
--- a/extern/qhull/include/qhull/qhull.h
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*
  ---------------------------------
-
-   qhull.h
-   user-level header file for using qhull.a library
-
-   see qh-qhull.htm, qhull_a.h
-
-   copyright (c) 1993-2002, The Geometry Center
-
-   NOTE: access to qh_qh is via the 'qh' macro.  This allows
-   qh_qh to be either a pointer or a structure.  An example
-   of using qh is "qh DROPdim" which accesses the DROPdim
-   field of qh_qh.  Similarly, access to qh_qhstat is via
-   the 'qhstat' macro.
-
-   includes function prototypes for qhull.c, geom.c, global.c, io.c, user.c
-
-   use mem.h for mem.c
-   use qset.h for qset.c
-
-   see unix.c for an example of using qhull.h
-
-   recompile qhull if you change this file
-*/
-
-#ifndef qhDEFqhull
-#define qhDEFqhull 1
-
-/*=========================== -included files ==============*/
-
-#include 
-#include 
-#include 
-
-#if __MWERKS__ && __POWERPC__
-#include  
-#include  
-#include	
-#endif
-
-#ifndef __STDC__
-#ifndef __cplusplus
-#if     !_MSC_VER
-#error  Neither __STDC__ nor __cplusplus is defined.  Please use strict ANSI C or C++ to compile
-#error  Qhull.  You may need to turn off compiler extensions in your project configuration.  If
-#error  your compiler is a standard C compiler, you can delete this warning from qhull.h
-#endif
-#endif
-#endif
-
-#include "user.h"      /* user defineable constants */
-
-/*============ constants and basic types ====================*/
-
-/*----------------------------------
-
-  qh_VERSION
-    version string by year and date
-
-    the revision increases on code changes only
-
-  notes:
-    change date:    Changes.txt, Announce.txt, README.txt, qhull.man
-                    qhull-news.html, Eudora signatures, 
-    change version: README.txt, qhull.html, file_id.diz, Makefile
-    change year:    Copying.txt
-    check download size
-    recompile user_eg.c, rbox.c, qhull.c, qconvex.c, qdelaun.c qvoronoi.c, qhalf.c
-    make copy of qhull-news.html as qh-news.htm
-*/
-
-#define qh_VERSION "2002.1 2002/8/20"
-
-/*----------------------------------
-
-  coordT
-    coordinates and coefficients are stored as realT (i.e., double)
-
-  notes:
-    could use 'float' for data and 'double' for calculations (realT vs. coordT)
-      This requires many type casts, and adjusted error bounds.
-      Also C compilers may do expressions in double anyway.
-*/
-#define coordT realT
-
-/*----------------------------------
-
-  pointT
-    a point is an array of DIM3 coordinates
-*/
-#define pointT coordT
-
-/*----------------------------------
-
-  flagT
-    Boolean flag as a bit
-*/
-#define flagT unsigned int
-
-/*----------------------------------
-
-  boolT
-    boolean value, either True or False
-
-  notes:
-    needed for portability
-*/
-#define boolT unsigned int
-#ifdef False
-#undef False
-#endif
-#ifdef True
-#undef True
-#endif
-#define False 0
-#define True 1
-
-/*----------------------------------
-
-  qh_CENTER
-    to distinguish facet->center
-*/
-typedef enum
-{
-    qh_ASnone = 0, qh_ASvoronoi, qh_AScentrum
-}
-qh_CENTER;
-
-/*----------------------------------
-
-  qh_PRINT
-    output formats for printing (qh.PRINTout).
-    'Fa' 'FV' 'Fc' 'FC' 
-       
-
-   notes:
-   some of these names are similar to qh names.  The similar names are only
-   used in switch statements in qh_printbegin() etc.
-*/
-typedef enum {qh_PRINTnone= 0, 
-  qh_PRINTarea, qh_PRINTaverage,           /* 'Fa' 'FV' 'Fc' 'FC' */
-  qh_PRINTcoplanars, qh_PRINTcentrums, 
-  qh_PRINTfacets, qh_PRINTfacets_xridge,   /* 'f' 'FF' 'G' 'FI' 'Fi' 'Fn' */
-  qh_PRINTgeom, qh_PRINTids, qh_PRINTinner, qh_PRINTneighbors, 
-  qh_PRINTnormals, qh_PRINTouter,          /* 'n' 'Fo' 'i' 'm' 'Fm' 'o' */
-  qh_PRINTincidences, qh_PRINTmathematica, qh_PRINTmerges, qh_PRINToff, 
-  qh_PRINToptions, qh_PRINTpointintersect, /* 'FO' 'Fp' 'FP' 'p' 'FQ' 'FS' */
-  qh_PRINTpointnearest, qh_PRINTpoints, qh_PRINTqhull, qh_PRINTsize, 
-  qh_PRINTsummary, qh_PRINTtriangles,      /* 'Fs' 'Ft' 'Fv' 'FN' 'Fx' */
-  qh_PRINTvertices, qh_PRINTvneighbors, qh_PRINTextremes,
-  qh_PRINTEND} qh_PRINT;
-
-/*----------------------------------
-
-  qh_ALL
-    argument flag for selecting everything
-*/
-#define qh_ALL      True
-#define qh_NOupper  True     /* argument for qh_findbest */
-#define qh_IScheckmax  True     /* argument for qh_findbesthorizon */
-#define qh_ISnewfacets  True     /* argument for qh_findbest */
-#define qh_RESETvisible  True     /* argument for qh_resetlists */
-
-/*----------------------------------
-
-  qh_ERR
-    Qhull exit codes, for indicating errors
-*/
-#define qh_ERRnone  0    /* no error occurred during qhull */
-#define qh_ERRinput 1    /* input inconsistency */
-#define qh_ERRsingular 2 /* singular input data */
-#define qh_ERRprec  3    /* precision error */
-#define qh_ERRmem   4    /* insufficient memory, matches mem.h */
-#define qh_ERRqhull 5    /* internal error detected, matches mem.h */
-
-/* ============ -structures- ====================
-   each of the following structures is defined by a typedef
-   all realT and coordT fields occur at the beginning of a structure
-        (otherwise space may be wasted due to alignment)
-   define all flags together and pack into 32-bit number
-*/
-
-typedef struct vertexT vertexT;
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT;          /* defined in qset.h */
-#endif
-
-/*----------------------------------
-
-  facetT
-    defines a facet
-
-  notes:
-   qhull() generates the hull as a list of facets.
-
-  topological information:
-    f.previous,next     doubly-linked list of facets
-    f.vertices          set of vertices
-    f.ridges            set of ridges
-    f.neighbors         set of neighbors
-    f.toporient         True if facet has top-orientation (else bottom)
-
-  geometric information:
-    f.offset,normal     hyperplane equation
-    f.maxoutside        offset to outer plane -- all points inside
-    f.center            centrum for testing convexity
-    f.simplicial        True if facet is simplicial
-    f.flipped           True if facet does not include qh.interior_point
-
-  for constructing hull:
-    f.visible           True if facet on list of visible facets (will be deleted)
-    f.newfacet          True if facet on list of newly created facets
-    f.coplanarset       set of points coplanar with this facet
-                        (includes near-inside points for later testing)
-    f.outsideset        set of points outside of this facet
-    f.furthestdist      distance to furthest point of outside set
-    f.visitid           marks visited facets during a loop
-    f.replace           replacement facet for to-be-deleted, visible facets
-    f.samecycle,newcycle cycle of facets for merging into horizon facet
-
-  see below for other flags and fields
-*/
-struct facetT {
-#if !qh_COMPUTEfurthest
-  coordT   furthestdist;/* distance to furthest point of outsideset */
-#endif
-#if qh_MAXoutside
-  coordT   maxoutside;  /* max computed distance of point to facet
-  			Before QHULLfinished this is an approximation
-  			since maxdist not always set for mergefacet
-			Actual outer plane is +DISTround and
-			computed outer plane is +2*DISTround */
-#endif
-  coordT   offset;      /* exact offset of hyperplane from origin */
-  coordT  *normal;      /* normal of hyperplane, hull_dim coefficients */
-			/*   if tricoplanar, shared with a neighbor */
-  union {               /* in order of testing */
-   realT   area;        /* area of facet, only in io.c if  ->isarea */
-   facetT *replace;	/*  replacement facet if ->visible and NEWfacets
-  			     is NULL only if qh_mergedegen_redundant or interior */
-   facetT *samecycle;   /*  cycle of facets from the same visible/horizon intersection,
-   			     if ->newfacet */
-   facetT *newcycle;    /*  in horizon facet, current samecycle of new facets */ 
-   facetT *trivisible;  /* visible facet for ->tricoplanar facets during qh_triangulate() */
-   facetT *triowner;    /* owner facet for ->tricoplanar, !isarea facets w/ ->keepcentrum */
-  }f;
-  coordT  *center;      /*  centrum for convexity, qh CENTERtype == qh_AScentrum */
-      			/*  Voronoi center, qh CENTERtype == qh_ASvoronoi */
-			/*   if tricoplanar, shared with a neighbor */
-  facetT  *previous;    /* previous facet in the facet_list */
-  facetT  *next;        /* next facet in the facet_list */
-  setT    *vertices;    /* vertices for this facet, inverse sorted by ID 
-                           if simplicial, 1st vertex was apex/furthest */
-  setT    *ridges;      /* explicit ridges for nonsimplicial facets.
-  			   for simplicial facets, neighbors defines ridge */
-  setT    *neighbors;   /* neighbors of the facet.  If simplicial, the kth
-			   neighbor is opposite the kth vertex, and the first
-			   neighbor is the horizon facet for the first vertex*/
-  setT    *outsideset;  /* set of points outside this facet
-		           if non-empty, last point is furthest
-			   if NARROWhull, includes coplanars for partitioning*/
-  setT    *coplanarset; /* set of points coplanar with this facet
-  			   > qh.min_vertex and <= facet->max_outside
-                           a point is assigned to the furthest facet
-		           if non-empty, last point is furthest away */
-  unsigned visitid;     /* visit_id, for visiting all neighbors,
-			   all uses are independent */
-  unsigned id;	        /* unique identifier from qh facet_id */
-  unsigned nummerge:9;  /* number of merges */
-#define qh_MAXnummerge 511 /*     2^9-1, 32 flags total, see "flags:" in io.c */
-  flagT    tricoplanar:1; /* True if TRIangulate and simplicial and coplanar with a neighbor */
-			  /*   all tricoplanars share the same ->center, ->normal, ->offset, ->maxoutside */
-			  /*   all tricoplanars share the same apex */
-                          /*   if ->degenerate, does not span facet (one logical ridge) */
-                          /*   one tricoplanar has ->keepcentrum and ->coplanarset */
-                          /*   during qh_triangulate, f.trivisible points to original facet */
-  flagT	   newfacet:1;  /* True if facet on qh newfacet_list (new or merged) */
-  flagT	   visible:1;   /* True if visible facet (will be deleted) */
-  flagT    toporient:1; /* True if created with top orientation
-			   after merging, use ridge orientation */
-  flagT    simplicial:1;/* True if simplicial facet, ->ridges may be implicit */
-  flagT    seen:1;      /* used to perform operations only once, like visitid */
-  flagT    seen2:1;     /* used to perform operations only once, like visitid */
-  flagT	   flipped:1;   /* True if facet is flipped */
-  flagT    upperdelaunay:1; /* True if facet is upper envelope of Delaunay triangulation */
-  flagT    notfurthest:1; /* True if last point of outsideset is not furthest*/
-
-/*-------- flags primarily for output ---------*/
-  flagT	   good:1;      /* True if a facet marked good for output */
-  flagT    isarea:1;    /* True if facet->f.area is defined */
-
-/*-------- flags for merging ------------------*/
-  flagT    dupridge:1;  /* True if duplicate ridge in facet */
-  flagT    mergeridge:1; /* True if facet or neighbor contains a qh_MERGEridge
-                            ->normal defined (also defined for mergeridge2) */
-  flagT    mergeridge2:1; /* True if neighbor contains a qh_MERGEridge (mark_dupridges */
-  flagT    coplanar:1;  /* True if horizon facet is coplanar at last use */
-  flagT     mergehorizon:1; /* True if will merge into horizon (->coplanar) */
-  flagT	    cycledone:1;/* True if mergecycle_all already done */
-  flagT    tested:1;    /* True if facet convexity has been tested (false after merge */
-  flagT    keepcentrum:1; /* True if keep old centrum after a merge, or marks owner for ->tricoplanar */
-  flagT	   newmerge:1;  /* True if facet is newly merged for reducevertices */
-  flagT	   degenerate:1; /* True if facet is degenerate (degen_mergeset or ->tricoplanar) */
-  flagT	   redundant:1;  /* True if facet is redundant (degen_mergeset) */
-};
-
-
-/*----------------------------------
-
-  ridgeT
-    defines a ridge
-
-  notes:
-  a ridge is DIM3-1 simplex between two neighboring facets.  If the
-  facets are non-simplicial, there may be more than one ridge between
-  two facets.  E.G. a 4-d hypercube has two triangles between each pair
-  of neighboring facets.
-
-  topological information:
-    vertices            a set of vertices
-    top,bottom          neighboring facets with orientation
-
-  geometric information:
-    tested              True if ridge is clearly convex
-    nonconvex           True if ridge is non-convex
-*/
-struct ridgeT {
-  setT    *vertices;    /* vertices belonging to this ridge, inverse sorted by ID 
-                           NULL if a degen ridge (matchsame) */
-  facetT  *top;         /* top facet this ridge is part of */
-  facetT  *bottom;      /* bottom facet this ridge is part of */
-  unsigned id:24;       /* unique identifier, =>room for 8 flags */
-  flagT    seen:1;      /* used to perform operations only once */
-  flagT    tested:1;    /* True when ridge is tested for convexity */
-  flagT    nonconvex:1; /* True if getmergeset detected a non-convex neighbor
-			   only one ridge between neighbors may have nonconvex */
-};
-
-/*----------------------------------
-
-  vertexT
-     defines a vertex
-
-  topological information:
-    next,previous       doubly-linked list of all vertices
-    neighbors           set of adjacent facets (only if qh.VERTEXneighbors)
-
-  geometric information:
-    point               array of DIM3 coordinates
-*/
-struct vertexT {
-  vertexT *next;        /* next vertex in vertex_list */
-  vertexT *previous;    /* previous vertex in vertex_list */
-  pointT  *point;       /* hull_dim coordinates (coordT) */
-  setT    *neighbors;   /* neighboring facets of vertex, qh_vertexneighbors()
-			   inits in io.c or after first merge */
-  unsigned visitid; /* for use with qh vertex_visit */
-  unsigned id:24;   /* unique identifier, =>room for 8 flags */
-  flagT    seen:1;      /* used to perform operations only once */
-  flagT    seen2:1;     /* another seen flag */
-  flagT    delridge:1;  /* vertex was part of a deleted ridge */
-  flagT	   deleted:1;   /* true if vertex on qh del_vertices */
-  flagT    newlist:1;   /* true if vertex on qh newvertex_list */
-};
-
-/*======= -global variables -qh ============================*/
-
-/*----------------------------------
-
-  qh
-   all global variables for qhull are in qh, qhmem, and qhstat
-
-  notes:
-   qhmem is defined in mem.h and qhstat is defined in stat.h
-   access to qh_qh is via the "qh" macro.  See qh_QHpointer in user.h
-*/
-typedef struct qhT qhT;
-#if qh_QHpointer
-#define qh qh_qh->
-extern qhT *qh_qh;     /* allocated in global.c */
-#else
-#define qh qh_qh.
-extern qhT qh_qh;
-#endif
-
-struct qhT {
-
-/*----------------------------------
-
-  qh constants
-    configuration flags and constants for Qhull
-
-  notes:
-    The user configures Qhull by defining flags.  They are
-    copied into qh by qh_setflags().  qh-quick.htm#options defines the flags.
-*/
-  boolT ALLpoints;        /* true 'Qs' if search all points for initial simplex */
-  boolT ANGLEmerge;	  /* true 'Qa' if sort potential merges by angle */
-  boolT APPROXhull;       /* true 'Wn' if MINoutside set */
-  realT MINoutside;       /*   'Wn' min. distance for an outside point */
-  boolT ATinfinity;       /* true 'Qz' if point num_points-1 is "at-infinity"
-                             for improving precision in Delaunay triangulations */
-  boolT AVOIDold;         /* true 'Q4' if avoid old->new merges */
-  boolT BESToutside;      /* true 'Qf' if partition points into best outsideset */
-  boolT CDDinput;         /* true 'Pc' if input uses CDD format (1.0/offset first) */
-  boolT CDDoutput;        /* true 'PC' if print normals in CDD format (offset first) */
-  boolT CHECKfrequently;  /* true 'Tc' if checking frequently */
-  realT premerge_cos;     /*   'A-n'   cos_max when pre merging */
-  realT postmerge_cos;    /*   'An'    cos_max when post merging */
-  boolT DELAUNAY;         /* true 'd' if computing DELAUNAY triangulation */
-  boolT DOintersections;  /* true 'Gh' if print hyperplane intersections */
-  int   DROPdim;          /* drops dim 'GDn' for 4-d -> 3-d output */
-  boolT FORCEoutput;      /* true 'Po' if forcing output despite degeneracies */
-  int   GOODpoint;        /* 1+n for 'QGn', good facet if visible/not(-) from point n*/
-  pointT *GOODpointp;     /*   the actual point */
-  boolT GOODthreshold;    /* true if qh lower_threshold/upper_threshold defined
-  			     false if qh SPLITthreshold */
-  int   GOODvertex;       /* 1+n, good facet if vertex for point n */
-  pointT *GOODvertexp;     /*   the actual point */
-  boolT HALFspace;        /* true 'Hn,n,n' if halfspace intersection */
-  int   IStracing;        /* trace execution, 0=none, 1=least, 4=most, -1=events */
-  int   KEEParea;         /* 'PAn' number of largest facets to keep */
-  boolT KEEPcoplanar;     /* true 'Qc' if keeping nearest facet for coplanar points */
-  boolT KEEPinside;       /* true 'Qi' if keeping nearest facet for inside points
-			      set automatically if 'd Qc' */
-  int   KEEPmerge;        /* 'PMn' number of facets to keep with most merges */
-  realT KEEPminArea;      /* 'PFn' minimum facet area to keep */
-  realT MAXcoplanar;      /* 'Un' max distance below a facet to be coplanar*/
-  boolT MERGEexact;	  /* true 'Qx' if exact merges (coplanar, degen, dupridge, flipped) */
-  boolT MERGEindependent; /* true 'Q2' if merging independent sets */
-  boolT MERGING;          /* true if exact-, pre- or post-merging, with angle and centrum tests */
-  realT   premerge_centrum;  /*   'C-n' centrum_radius when pre merging.  Default is round-off */
-  realT   postmerge_centrum; /*   'Cn' centrum_radius when post merging.  Default is round-off */
-  boolT MERGEvertices;	  /* true 'Q3' if merging redundant vertices */
-  realT MINvisible;       /* 'Vn' min. distance for a facet to be visible */
-  boolT NOnarrow;         /* true 'Q10' if no special processing for narrow distributions */
-  boolT NOnearinside;     /* true 'Q8' if ignore near-inside points when partitioning */
-  boolT NOpremerge;       /* true 'Q0' if no defaults for C-0 or Qx */
-  boolT ONLYgood; 	  /* true 'Qg' if process points with good visible or horizon facets */
-  boolT ONLYmax; 	  /* true 'Qm' if only process points that increase max_outside */
-  boolT PICKfurthest;     /* true 'Q9' if process furthest of furthest points*/
-  boolT POSTmerge;        /* true if merging after buildhull (Cn or An) */
-  boolT PREmerge;         /* true if merging during buildhull (C-n or A-n) */
-  			/* NOTE: some of these names are similar to qh_PRINT names */
-  boolT PRINTcentrums;	  /* true 'Gc' if printing centrums */
-  boolT PRINTcoplanar;    /* true 'Gp' if printing coplanar points */
-  int	PRINTdim;      	  /* print dimension for Geomview output */
-  boolT PRINTdots;        /* true 'Ga' if printing all points as dots */
-  boolT PRINTgood;        /* true 'Pg' if printing good facets */
-  boolT PRINTinner;	  /* true 'Gi' if printing inner planes */
-  boolT PRINTneighbors;	  /* true 'PG' if printing neighbors of good facets */
-  boolT PRINTnoplanes;	  /* true 'Gn' if printing no planes */
-  boolT PRINToptions1st;  /* true 'FO' if printing options to stderr */
-  boolT PRINTouter;	  /* true 'Go' if printing outer planes */
-  boolT PRINTprecision;   /* false 'Pp' if not reporting precision problems */
-  qh_PRINT PRINTout[qh_PRINTEND]; /* list of output formats to print */
-  boolT PRINTridges;      /* true 'Gr' if print ridges */
-  boolT PRINTspheres;     /* true 'Gv' if print vertices as spheres */
-  boolT PRINTstatistics;  /* true 'Ts' if printing statistics to stderr */
-  boolT PRINTsummary;     /* true 's' if printing summary to stderr */
-  boolT PRINTtransparent; /* true 'Gt' if print transparent outer ridges */
-  boolT PROJECTdelaunay;  /* true if DELAUNAY, no readpoints() and
-			     need projectinput() for Delaunay in qh_init_B */
-  int   PROJECTinput;     /* number of projected dimensions 'bn:0Bn:0' */
-  boolT QUICKhelp;	  /* true if quick help message for degen input */
-  boolT RANDOMdist;       /* true if randomly change distplane and setfacetplane */
-  realT RANDOMfactor;     /*    maximum random perturbation */
-  realT RANDOMa;         /*  qh_randomfactor is randr * RANDOMa + RANDOMb */
-  realT RANDOMb;
-  boolT RANDOMoutside;    /* true if select a random outside point */
-  int	REPORTfreq;       /* buildtracing reports every n facets */
-  int   REPORTfreq2;	  /* tracemerging reports every REPORTfreq/2 facets */
-  int	RERUN;            /* 'TRn' rerun qhull n times (qh.build_cnt) */
-  int	ROTATErandom;	  /* 'QRn' seed, 0 time, >= rotate input */
-  boolT SCALEinput;       /* true 'Qbk' if scaling input */
-  boolT SCALElast;        /* true 'Qbb' if scale last coord to max prev coord */
-  boolT SETroundoff;      /* true 'E' if qh DISTround is predefined */
-  boolT SKIPcheckmax;	  /* true 'Q5' if skip qh_check_maxout */
-  boolT SKIPconvex;       /* true 'Q6' if skip convexity testing during pre-merge */
-  boolT SPLITthresholds;  /* true if upper_/lower_threshold defines a region
-                               used only for printing (not for qh ONLYgood) */
-  int	STOPcone;         /* 'TCn' 1+n for stopping after cone for point n*/
-			  /*       also used by qh_build_withresart for err exit*/
-  int	STOPpoint;        /* 'TVn' 'TV-n' 1+n for stopping after/before(-)
-			                adding point n */
-  int	TESTpoints;	  /* 'QTn' num of test points after qh.num_points.  Test points always coplanar. */
-  boolT TESTvneighbors;   /*  true 'Qv' if test vertex neighbors at end */
-  int   TRACElevel;       /* 'Tn' conditional IStracing level */
-  int	TRACElastrun;	  /*  qh.TRACElevel applies to last qh.RERUN */
-  int   TRACEpoint;       /* 'TPn' start tracing when point n is a vertex */
-  realT TRACEdist;        /* 'TWn' start tracing when merge distance too big */
-  int   TRACEmerge;       /* 'TMn' start tracing before this merge */
-  boolT TRIangulate;	  /* true 'Qt' if triangulate non-simplicial facets */
-  boolT TRInormals;	  /* true 'Q11' if triangulate duplicates normals (sets Qt) */
-  boolT UPPERdelaunay;    /* true 'Qu' if computing furthest-site Delaunay */
-  boolT VERIFYoutput;     /* true 'Tv' if verify output at end of qhull */
-  boolT VIRTUALmemory;    /* true 'Q7' if depth-first processing in buildhull */
-  boolT VORONOI;	  /* true 'v' if computing Voronoi diagram */
-
-  /*--------input constants ---------*/
-  realT AREAfactor;       /* 1/(hull_dim-1)! for converting det's to area */
-  boolT DOcheckmax;       /* true if calling qh_check_maxout (qh_initqhull_globals) */
-  char	*feasible_string;  /* feasible point 'Hn,n,n' for halfspace intersection */
-  coordT *feasible_point;  /*    as coordinates, both malloc'd */
-  boolT GETarea;          /* true 'Fa', 'FA', 'FS', 'PAn', 'PFn' if compute facet area/Voronoi volume in io.c */
-  boolT KEEPnearinside;   /* true if near-inside points in coplanarset */
-  int 	hull_dim;         /* dimension of hull, set by initbuffers */
-  int 	input_dim;	  /* dimension of input, set by initbuffers */
-  int 	num_points;       /* number of input points */
-  pointT *first_point;    /* array of input points, see POINTSmalloc */
-  boolT POINTSmalloc;     /*   true if qh first_point/num_points allocated */
-  pointT *input_points;   /* copy of original qh.first_point for input points for qh_joggleinput */
-  boolT input_malloc;     /* true if qh input_points malloc'd */
-  char 	qhull_command[256];/* command line that invoked this program */
-  char 	rbox_command[256]; /* command line that produced the input points */
-  char  qhull_options[512];/* descriptive list of options */
-  int   qhull_optionlen;  /*    length of last line */
-  int   qhull_optionsiz;  /*     size of qhull_options before qh_initbuild */
-  boolT VERTEXneighbors;  /* true if maintaining vertex neighbors */
-  boolT ZEROcentrum;      /* true if 'C-0' or 'C-0 Qx'.  sets ZEROall_ok */
-  realT *upper_threshold; /* don't print if facet->normal[k]>=upper_threshold[k]
-                             must set either GOODthreshold or SPLITthreshold
-  			     if Delaunay, default is 0.0 for upper envelope */
-  realT *lower_threshold; /* don't print if facet->normal[k] <=lower_threshold[k] */
-  realT *upper_bound;     /* scale point[k] to new upper bound */
-  realT *lower_bound;     /* scale point[k] to new lower bound
-  			     project if both upper_ and lower_bound == 0 */
-
-/*----------------------------------
-
-  qh precision constants
-    precision constants for Qhull
-
-  notes:
-    qh_detroundoff() computes the maximum roundoff error for distance
-    and other computations.  It also sets default values for the
-    qh constants above.
-*/
-  realT ANGLEround;       /* max round off error for angles */
-  realT centrum_radius;   /* max centrum radius for convexity (roundoff added) */
-  realT cos_max;	  /* max cosine for convexity (roundoff added) */
-  realT DISTround;        /* max round off error for distances, 'E' overrides */
-  realT MAXabs_coord;     /* max absolute coordinate */
-  realT MAXlastcoord;     /* max last coordinate for qh_scalelast */
-  realT MAXsumcoord;      /* max sum of coordinates */
-  realT MAXwidth;         /* max rectilinear width of point coordinates */
-  realT MINdenom_1;       /* min. abs. value for 1/x */
-  realT MINdenom;         /*    use divzero if denominator < MINdenom */
-  realT MINdenom_1_2;     /* min. abs. val for 1/x that allows normalization */
-  realT MINdenom_2;       /*    use divzero if denominator < MINdenom_2 */
-  realT MINlastcoord;     /* min. last coordinate for qh_scalelast */
-  boolT NARROWhull;       /* set in qh_initialhull if angle < qh_MAXnarrow */
-  realT *NEARzero;        /* hull_dim array for near zero in gausselim */
-  realT NEARinside;       /* keep points for qh_check_maxout if close to facet */
-  realT ONEmerge;         /* max distance for merging simplicial facets */
-  realT outside_err;      /* application's epsilon for coplanar points
-                             qh_check_bestdist() qh_check_points() reports error if point outside */
-  realT WIDEfacet;        /* size of wide facet for skipping ridge in
-			     area computation and locking centrum */
-  
-/*----------------------------------
-
-  qh internal constants
-    internal constants for Qhull
-*/
-  char qhull[sizeof("qhull")]; /* for checking ownership */
-  void *old_stat;         /* pointer to saved qh_qhstat, qh_save_qhull */
-  jmp_buf errexit;        /* exit label for qh_errexit, defined by setjmp() */
-  char jmpXtra[40];       /* extra bytes in case jmp_buf is defined wrong by compiler */
-  jmp_buf restartexit;    /* restart label for qh_errexit, defined by setjmp() */
-  char jmpXtra2[40];      /* extra bytes in case jmp_buf is defined wrong by compiler*/
-  FILE *fin;              /* pointer to input file, init by qh_meminit */
-  FILE *fout;             /* pointer to output file */
-  FILE *ferr;             /* pointer to error file */
-  pointT *interior_point; /* center point of the initial simplex*/
-  int   normal_size;      /* size in bytes for facet normals and point coords*/
-  int   center_size;      /* size in bytes for Voronoi centers */
-  int   TEMPsize;         /* size for small, temporary sets (in quick mem) */
-
-/*----------------------------------
-
-  qh facet and vertex lists
-    defines lists of facets, new facets, visible facets, vertices, and
-    new vertices.  Includes counts, next ids, and trace ids.
-  see:
-    qh_resetlists()
-*/
-  facetT *facet_list;     /* first facet */
-  facetT  *facet_tail;     /* end of facet_list (dummy facet) */
-  facetT *facet_next;     /* next facet for buildhull()
-    			     previous facets do not have outside sets
-                             NARROWhull: previous facets may have coplanar outside sets for qh_outcoplanar */
-  facetT *newfacet_list;  /* list of new facets to end of facet_list */
-  facetT *visible_list;   /* list of visible facets preceeding newfacet_list,
-                             facet->visible set */
-  int       num_visible;  /* current number of visible facets */
-  unsigned tracefacet_id;  /* set at init, then can print whenever */
-  facetT *tracefacet;     /*   set in newfacet/mergefacet, undone in delfacet*/
-  unsigned tracevertex_id;  /* set at buildtracing, can print whenever */
-  vertexT *tracevertex;     /*   set in newvertex, undone in delvertex*/
-  vertexT *vertex_list;     /* list of all vertices, to vertex_tail */
-  vertexT  *vertex_tail;    /*      end of vertex_list (dummy vertex) */
-  vertexT *newvertex_list; /* list of vertices in newfacet_list, to vertex_tail
-                             all vertices have 'newlist' set */
-  int 	num_facets;	  /* number of facets in facet_list
-			     includes visble faces (num_visible) */
-  int 	num_vertices;     /* number of vertices in facet_list */
-  int   num_outside;      /* number of points in outsidesets (for tracing and RANDOMoutside)
-                               includes coplanar outsideset points for NARROWhull/qh_outcoplanar() */
-  int   num_good;         /* number of good facets (after findgood_all) */
-  unsigned facet_id;      /* ID of next, new facet from newfacet() */
-  unsigned ridge_id;      /* ID of next, new ridge from newridge() */
-  unsigned vertex_id;     /* ID of next, new vertex from newvertex() */
-
-/*----------------------------------
-
-  qh global variables
-    defines minimum and maximum distances, next visit ids, several flags,
-    and other global variables.
-    initialize in qh_initbuild or qh_maxmin if used in qh_buildhull
-*/
-  unsigned long hulltime; /* ignore time to set up input and randomize */
-                          /*   use unsigned to avoid wrap-around errors */
-  boolT ALLOWrestart;     /* true if qh_precision can use qh.restartexit */
-  int   build_cnt;        /* number of calls to qh_initbuild */
-  qh_CENTER CENTERtype;   /* current type of facet->center, qh_CENTER */
-  int 	furthest_id;      /* pointid of furthest point, for tracing */
-  facetT *GOODclosest;    /* closest facet to GOODthreshold in qh_findgood */
-  realT JOGGLEmax;        /* set 'QJn' if randomly joggle input */
-  boolT maxoutdone;       /* set qh_check_maxout(), cleared by qh_addpoint() */
-  realT max_outside;      /* maximum distance from a point to a facet,
-			       before roundoff, not simplicial vertices
-			       actual outer plane is +DISTround and
-			       computed outer plane is +2*DISTround */
-  realT max_vertex;       /* maximum distance (>0) from vertex to a facet,
-			       before roundoff, due to a merge */
-  realT min_vertex;       /* minimum distance (<0) from vertex to a facet,
-			       before roundoff, due to a merge
-			       if qh.JOGGLEmax, qh_makenewplanes sets it
-  			       recomputed if qh.DOcheckmax, default -qh.DISTround */
-  boolT NEWfacets;        /* true while visible facets invalid due to new or merge
-			      from makecone/attachnewfacets to deletevisible */
-  boolT findbestnew;	  /* true if partitioning calls qh_findbestnew */
-  boolT findbest_notsharp; /* true if new facets are at least 90 degrees */
-  boolT NOerrexit;        /* true if qh.errexit is not available */
-  realT PRINTcradius;     /* radius for printing centrums */
-  realT PRINTradius;      /* radius for printing vertex spheres and points */
-  boolT POSTmerging;      /* true when post merging */
-  int 	printoutvar;	  /* temporary variable for qh_printbegin, etc. */
-  int 	printoutnum;	  /* number of facets printed */
-  boolT QHULLfinished;    /* True after qhull() is finished */
-  realT totarea;          /* 'FA': total facet area computed by qh_getarea */
-  realT totvol;           /* 'FA': total volume computed by qh_getarea */
-  unsigned int visit_id;  /* unique ID for searching neighborhoods, */
-  unsigned int vertex_visit; /* unique ID for searching vertices */
-  boolT ZEROall_ok;       /* True if qh_checkzero always succeeds */
-  boolT WAScoplanar;      /* True if qh_partitioncoplanar (qh_check_maxout) */
-  
-/*----------------------------------
-
-  qh global sets
-    defines sets for merging, initial simplex, hashing, extra input points,
-    and deleted vertices
-*/
-  setT *facet_mergeset;   /* temporary set of merges to be done */
-  setT *degen_mergeset;   /* temporary set of degenerate and redundant merges */
-  setT *hash_table;	  /* hash table for matching ridges in qh_matchfacets
-                             size is setsize() */
-  setT *other_points;     /* additional points (first is qh interior_point) */
-  setT *del_vertices;     /* vertices to partition and delete with visible
-                             facets.  Have deleted set for checkfacet */
-
-/*----------------------------------
-
-  qh global buffers
-    defines buffers for maxtrix operations, input, and error messages
-*/
-  coordT *gm_matrix;      /* (dim+1)Xdim matrix for geom.c */
-  coordT **gm_row;        /* array of gm_matrix rows */
-  char* line;             /* malloc'd input line of maxline+1 chars */
-  int maxline;
-  coordT *half_space;     /* malloc'd input array for halfspace (qh normal_size+coordT) */
-  coordT *temp_malloc;    /* malloc'd input array for points */
-  
-/*----------------------------------
-
-  qh static variables
-    defines static variables for individual functions
-
-  notes:
-    do not use 'static' within a function.  Multiple instances of qhull
-    may exist.
-
-    do not assume zero initialization, 'QPn' may cause a restart
-*/
-  boolT ERREXITcalled;    /* true during errexit (prevents duplicate calls */
-  boolT firstcentrum; 	  /* for qh_printcentrum */
-  realT last_low;         /* qh_scalelast parameters for qh_setdelaunay */
-  realT last_high;
-  realT last_newhigh;
-  unsigned lastreport;    /* for qh_buildtracing */
-  int mergereport;        /* for qh_tracemerging */
-  boolT old_randomdist;   /* save RANDOMdist when io, tracing, or statistics */
-  int   ridgeoutnum;      /* number of ridges in 4OFF output */
-  void *old_qhstat;       /* for saving qh_qhstat in save_qhull() */
-  setT *old_tempstack;     /* for saving qhmem.tempstack in save_qhull */
-  setT *coplanarset;      /* set of coplanar facets for searching qh_findbesthorizon() */
-};
-
-/*=========== -macros- =========================*/
-
-/*----------------------------------
-
-  otherfacet_(ridge, facet)
-    return neighboring facet for a ridge in facet
-*/
-#define otherfacet_(ridge, facet) \
-                        (((ridge)->top == (facet)) ? (ridge)->bottom : (ridge)->top)
-
-/*----------------------------------
-
-  getid_(p)
-    return ID for facet, ridge, or vertex
-    return MAXINT if NULL (-1 causes type conversion error )
-*/
-#define getid_(p)       ((p) ? (p)->id : -1)
-
-/*============== FORALL macros ===================*/
-
-/*----------------------------------
-
-  FORALLfacets { ... }
-    assign 'facet' to each facet in qh.facet_list
-
-  notes:
-    uses 'facetT *facet;'
-    assumes last facet is a sentinel
-
-  see:
-    FORALLfacet_( facetlist )
-*/
-#define FORALLfacets for (facet=qh facet_list;facet && facet->next;facet=facet->next)
-
-/*----------------------------------
-
-  FORALLpoints { ... }
-    assign 'point' to each point in qh.first_point, qh.num_points
-
-  declare:
-    coordT *point, *pointtemp;
-*/
-#define FORALLpoints FORALLpoint_(qh first_point, qh num_points)
-
-/*----------------------------------
-
-  FORALLpoint_( points, num) { ... }
-    assign 'point' to each point in points array of num points
-
-  declare:
-    coordT *point, *pointtemp;
-*/
-#define FORALLpoint_(points, num) for(point= (points), \
-      pointtemp= (points)+qh hull_dim*(num); point < pointtemp; point += qh hull_dim)
-
-/*----------------------------------
-
-  FORALLvertices { ... }
-    assign 'vertex' to each vertex in qh.vertex_list
-
-  declare:
-    vertexT *vertex;
-
-  notes:
-    assumes qh.vertex_list terminated with a sentinel
-*/
-#define FORALLvertices for (vertex=qh vertex_list;vertex && vertex->next;vertex= vertex->next)
-
-/*----------------------------------
-
-  FOREACHfacet_( facets ) { ... }
-    assign 'facet' to each facet in facets
-
-  declare:
-    facetT *facet, **facetp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHfacet_(facets)    FOREACHsetelement_(facetT, facets, facet)
-
-/*----------------------------------
-
-  FOREACHneighbor_( facet ) { ... }
-    assign 'neighbor' to each neighbor in facet->neighbors
-
-  FOREACHneighbor_( vertex ) { ... }
-    assign 'neighbor' to each neighbor in vertex->neighbors
-
-  declare:
-    facetT *neighbor, **neighborp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHneighbor_(facet)  FOREACHsetelement_(facetT, facet->neighbors, neighbor)
-
-/*----------------------------------
-
-  FOREACHpoint_( points ) { ... }
-    assign 'point' to each point in points set
-
-  declare:
-    pointT *point, **pointp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHpoint_(points)    FOREACHsetelement_(pointT, points, point)
-
-/*----------------------------------
-
-  FOREACHridge_( ridges ) { ... }
-    assign 'ridge' to each ridge in ridges set
-
-  declare:
-    ridgeT *ridge, **ridgep;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHridge_(ridges)    FOREACHsetelement_(ridgeT, ridges, ridge)
-
-/*----------------------------------
-
-  FOREACHvertex_( vertices ) { ... }
-    assign 'vertex' to each vertex in vertices set
-
-  declare:
-    vertexT *vertex, **vertexp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHvertex_(vertices) FOREACHsetelement_(vertexT, vertices,vertex)
-
-/*----------------------------------
-
-  FOREACHfacet_i_( facets ) { ... }
-    assign 'facet' and 'facet_i' for each facet in facets set
-
-  declare:
-    facetT *facet;
-    int     facet_n, facet_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHfacet_i_(facets)    FOREACHsetelement_i_(facetT, facets, facet)
-
-/*----------------------------------
-
-  FOREACHneighbor_i_( facet ) { ... }
-    assign 'neighbor' and 'neighbor_i' for each neighbor in facet->neighbors
-
-  FOREACHneighbor_i_( vertex ) { ... }
-    assign 'neighbor' and 'neighbor_i' for each neighbor in vertex->neighbors
-
-  declare:
-    facetT *neighbor;
-    int     neighbor_n, neighbor_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHneighbor_i_(facet)  FOREACHsetelement_i_(facetT, facet->neighbors, neighbor)
-
-/*----------------------------------
-
-  FOREACHpoint_i_( points ) { ... }
-    assign 'point' and 'point_i' for each point in points set
-
-  declare:
-    pointT *point;
-    int     point_n, point_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHpoint_i_(points)    FOREACHsetelement_i_(pointT, points, point)
-
-/*----------------------------------
-
-  FOREACHridge_i_( ridges ) { ... }
-    assign 'ridge' and 'ridge_i' for each ridge in ridges set
-
-  declare:
-    ridgeT *ridge;
-    int     ridge_n, ridge_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHridge_i_(ridges)    FOREACHsetelement_i_(ridgeT, ridges, ridge)
-
-/*----------------------------------
-
-  FOREACHvertex_i_( vertices ) { ... }
-    assign 'vertex' and 'vertex_i' for each vertex in vertices set
-
-  declare:
-    vertexT *vertex;
-    int     vertex_n, vertex_i;
-
-  see:
-    FOREACHsetelement_i_
- */
-#define FOREACHvertex_i_(vertices) FOREACHsetelement_i_(vertexT, vertices,vertex)
-
-/********* -qhull.c prototypes (duplicated from qhull_a.h) **********************/
-
-void    qh_qhull (void);
-boolT   qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void	qh_printsummary(FILE *fp);
-
-/********* -user.c prototypes (alphabetical) **********************/
-
-void 	qh_errexit(int exitcode, facetT *facet, ridgeT *ridge);
-void 	qh_errprint(char* string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex);
-int     qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc,
-		char *qhull_cmd, FILE *outfile, FILE *errfile);
-void    qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall);
-void 	qh_user_memsizes (void);
-
-/***** -geom.c/geom2.c prototypes (duplicated from geom.h) ****************/
-
-facetT *qh_findbest (pointT *point, facetT *startfacet,
-		     boolT bestoutside, boolT newfacets, boolT noupper,
-		     realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet,
-                     realT *dist, boolT bestoutside, boolT *isoutside, int *numpart);
-boolT   qh_gram_schmidt(int dim, realT **rows);
-void    qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-void	qh_printsummary(FILE *fp);
-void    qh_projectinput (void);
-void    qh_randommatrix (realT *buffer, int dim, realT **row);
-void    qh_rotateinput (realT **rows);
-void    qh_scaleinput (void);
-void    qh_setdelaunay (int dim, int count, pointT *points);
-coordT  *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-
-/***** -global.c prototypes (alphabetical) ***********************/
-
-unsigned long qh_clock (void);
-void 	qh_checkflags (char *command, char *hiddenflags);
-void 	qh_freebuffers (void);
-void    qh_freeqhull (boolT allmem);
-void    qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]);
-void    qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc);
-void 	qh_init_qhull_command (int argc, char *argv[]);
-void    qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-void 	qh_initflags (char *command);
-void 	qh_initqhull_buffers (void);
-void 	qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc);
-void    qh_initqhull_mem (void);
-void 	qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile);
-void 	qh_initthresholds (char *command);
-void    qh_option (char *option, int *i, realT *r);
-#if qh_QHpointer
-void 	qh_restore_qhull (qhT **oldqh);
-qhT    *qh_save_qhull (void);
-#endif
-
-/***** -io.c prototypes (duplicated from io.h) ***********************/
-
-void    dfacet( unsigned id);
-void    dvertex( unsigned id);
-void	qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void	qh_produce_output(void);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-
-
-/********* -mem.c prototypes (duplicated from mem.h) **********************/
-
-void qh_meminit (FILE *ferr);
-void qh_memfreeshort (int *curlong, int *totlong);
-
-/********* -poly.c/poly2.c prototypes (duplicated from poly.h) **********************/
-
-void    qh_check_output (void);
-void    qh_check_points (void);
-setT   *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
-           realT *bestdist, boolT *isoutside);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-pointT *qh_point (int id);
-setT   *qh_pointfacet (void /*qh.facet_list*/);
-int     qh_pointid (pointT *point);
-setT   *qh_pointvertex (void /*qh.facet_list*/);
-void    qh_setvoronoi_all (void);
-void	qh_triangulate (void /*qh facet_list*/);
-
-/********* -stat.c prototypes (duplicated from stat.h) **********************/
-
-void    qh_collectstatistics (void);
-void    qh_printallstatistics (FILE *fp, char *string);
-
-#endif /* qhDEFqhull */
diff --git a/extern/qhull/include/qhull/qhull_a.h b/extern/qhull/include/qhull/qhull_a.h
deleted file mode 100644
index d4e69b071be..00000000000
--- a/extern/qhull/include/qhull/qhull_a.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
  ---------------------------------
-
-   qhull_a.h 
-   all header files for compiling qhull
-
-   see qh-qhull.htm
-
-   see qhull.h for user-level definitions
-   
-   see user.h for user-defineable constants
-   
-   defines internal functions for qhull.c global.c
-
-   copyright (c) 1993-2002, The Geometry Center
-
-   Notes:  grep for ((" and (" to catch fprintf("lkasdjf");
-           full parens around (x?y:z)
-	   use '#include qhull/qhull_a.h' to avoid name clashes
-*/
-
-#ifndef qhDEFqhulla
-#define qhDEFqhulla
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include     /* some compilers will not need float.h */
-#include 
-#include 
-#include 
-/*** uncomment here and qset.c
-     if string.h does not define memcpy()
-#include 
-*/
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-#include "geom.h"
-#include "merge.h"
-#include "poly.h"
-#include "io.h"
-#include "stat.h"
-
-#if qh_CLOCKtype == 2  /* defined in user.h from qhull.h */
-#include 
-#include 
-#include 
-#endif
-
-#ifdef _MSC_VER  /* Microsoft Visual C++ */
-#pragma warning( disable : 4056)  /* float constant expression.  Looks like a compiler bug */
-#pragma warning( disable : 4146)  /* unary minus applied to unsigned type */
-#pragma warning( disable : 4244)  /* conversion from 'unsigned long' to 'real' */
-#pragma warning( disable : 4305)  /* conversion from 'const double' to 'float' */
-#endif
-
-/* ======= -macros- =========== */
-
-/*----------------------------------
-  
-  traceN((fp.ferr, "format\n", vars));  
-    calls fprintf if qh.IStracing >= N
-  
-  notes:
-    removing tracing reduces code size but doesn't change execution speed
-*/
-#ifndef qh_NOtrace
-#define trace0(args) {if (qh IStracing) fprintf args;}
-#define trace1(args) {if (qh IStracing >= 1) fprintf args;}
-#define trace2(args) {if (qh IStracing >= 2) fprintf args;}
-#define trace3(args) {if (qh IStracing >= 3) fprintf args;}
-#define trace4(args) {if (qh IStracing >= 4) fprintf args;}
-#define trace5(args) {if (qh IStracing >= 5) fprintf args;}
-#else /* qh_NOtrace */
-#define trace0(args) {}
-#define trace1(args) {}
-#define trace2(args) {}
-#define trace3(args) {}
-#define trace4(args) {}
-#define trace5(args) {}
-#endif /* qh_NOtrace */
-
-/***** -qhull.c prototypes (alphabetical after qhull) ********************/
-
-void 	qh_qhull (void);
-boolT   qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void 	qh_buildhull(void);
-void    qh_buildtracing (pointT *furthest, facetT *facet);
-void    qh_build_withrestart (void);
-void 	qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
-void    qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
-pointT *qh_nextfurthest (facetT **visible);
-void 	qh_partitionall(setT *vertices, pointT *points,int npoints);
-void    qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist);
-void    qh_partitionpoint (pointT *point, facetT *facet);
-void 	qh_partitionvisible(boolT allpoints, int *numpoints);
-void    qh_precision (char *reason);
-void	qh_printsummary(FILE *fp);
-
-/***** -global.c internal prototypes (alphabetical) ***********************/
-
-void    qh_appendprint (qh_PRINT format);
-void 	qh_freebuild (boolT allmem);
-void 	qh_freebuffers (void);
-void    qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-int     qh_strtol (const char *s, char **endp);
-double  qh_strtod (const char *s, char **endp);
-
-/***** -stat.c internal prototypes (alphabetical) ***********************/
-
-void	qh_allstatA (void);
-void	qh_allstatB (void);
-void	qh_allstatC (void);
-void	qh_allstatD (void);
-void	qh_allstatE (void);
-void	qh_allstatE2 (void);
-void	qh_allstatF (void);
-void	qh_allstatG (void);
-void	qh_allstatH (void);
-void 	qh_freebuffers (void);
-void    qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-
-#endif /* qhDEFqhulla */
diff --git a/extern/qhull/include/qhull/qset.h b/extern/qhull/include/qhull/qset.h
deleted file mode 100644
index 6c0ff758de4..00000000000
--- a/extern/qhull/include/qhull/qset.h
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
  ---------------------------------
-
-   qset.h
-     header file for qset.c that implements set
-
-   see qh-set.htm and qset.c
-   
-   only uses mem.c, malloc/free
-
-   for error handling, writes message and calls
-      qh_errexit (qhmem_ERRqhull, NULL, NULL);
-   
-   set operations satisfy the following properties:
-    - sets have a max size, the actual size (if different) is stored at the end
-    - every set is NULL terminated
-    - sets may be sorted or unsorted, the caller must distinguish this
-   
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFset
-#define qhDEFset 1
-
-/*================= -structures- ===============*/
-
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT;   /* a set is a sorted or unsorted array of pointers */
-#endif
-
-/*------------------------------------------
-   
-setT
-  a set or list of pointers with maximum size and actual size.
-
-variations:
-  unsorted, unique   -- a list of unique pointers with NULL terminator
-  			   user guarantees uniqueness
-  sorted	     -- a sorted list of unique pointers with NULL terminator
-  			   qset.c guarantees uniqueness
-  unsorted           -- a list of pointers terminated with NULL
-  indexed  	     -- an array of pointers with NULL elements 
-
-structure for set of n elements:
-
-	--------------
-	|  maxsize 
-	--------------
-	|  e[0] - a pointer, may be NULL for indexed sets
-	--------------
-	|  e[1]
-	
-	--------------
-	|  ...
-	--------------
-	|  e[n-1]
-	--------------
-	|  e[n] = NULL
-	--------------
-	|  ...
-	--------------
-	|  e[maxsize] - n+1 or NULL (determines actual size of set)
-	--------------
-
-*/
-
-/*-- setelemT -- internal type to allow both pointers and indices
-*/
-typedef union setelemT setelemT;
-union setelemT {
-  void    *p;
-  int      i;         /* integer used for e[maxSize] */
-};
-
-struct setT {
-  int maxsize;          /* maximum number of elements (except NULL) */
-  setelemT e[1];        /* array of pointers, tail is NULL */
-                        /* last slot (unless NULL) is actual size+1 
-                           e[maxsize]==NULL or e[e[maxsize]-1]==NULL */
-                        /* this may generate a warning since e[] contains
-			   maxsize elements */
-};
-
-/*=========== -constants- =========================*/
-
-/*-------------------------------------
-   
-  SETelemsize
-    size of a set element in bytes
-*/
-#define SETelemsize sizeof(setelemT) 
-
-
-/*=========== -macros- =========================*/
-
-/*-------------------------------------
-   
-   FOREACHsetelement_(type, set, variable)
-     define FOREACH iterator
-
-   declare:  
-     assumes *variable and **variablep are declared
-     no space in "variable)" [DEC Alpha cc compiler]
-
-   each iteration:
-     variable is set element
-     variablep is one beyond variable.  
-
-   to repeat an element:
-     variablep--; / *repeat* /
-
-   at exit:
-     variable is NULL at end of loop
-
-   example:  
-     #define FOREACHfacet_( facets ) FOREACHsetelement_( facetT, facets, facet )
-
-   notes:
-     use FOREACHsetelement_i_() if need index or include NULLs
-
-   WARNING: 
-     nested loops can't use the same variable (define another FOREACH)
-   
-     needs braces if nested inside another FOREACH
-     this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_(type, set, variable) \
-        if (((variable= NULL), set)) for(\
-          variable##p= (type **)&((set)->e[0].p); \
-	  (variable= *variable##p++);)
-
-/*------------------------------------------
-
-   FOREACHsetelement_i_(type, set, variable)
-     define indexed FOREACH iterator
-
-   declare:  
-     type *variable, variable_n, variable_i;
-
-   each iteration:
-     variable is set element, may be NULL
-     variable_i is index, variable_n is qh_setsize()
-
-   to repeat an element:
-     variable_i--; variable_n-- repeats for deleted element
-
-   at exit:
-     variable==NULL and variable_i==variable_n
-
-   example:
-     #define FOREACHfacet_i_( facets ) FOREACHsetelement_i_( facetT, facets, facet )
-   
-   WARNING: 
-     nested loops can't use the same variable (define another FOREACH)
-   
-     needs braces if nested inside another FOREACH
-     this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_i_(type, set, variable) \
-        if (((variable= NULL), set)) for (\
-          variable##_i= 0, variable= (type *)((set)->e[0].p), \
-                   variable##_n= qh_setsize(set);\
-          variable##_i < variable##_n;\
-          variable= (type *)((set)->e[++variable##_i].p) )
-
-/*----------------------------------------
-
-   FOREACHsetelementreverse_(type, set, variable)- 
-     define FOREACH iterator in reverse order
-
-   declare:  
-     assumes *variable and **variablep are declared
-     also declare 'int variabletemp'
-
-   each iteration:
-     variable is set element
-
-   to repeat an element:
-     variabletemp++; / *repeat* /
-
-   at exit:
-     variable is NULL
-
-   example:
-     #define FOREACHvertexreverse_( vertices ) FOREACHsetelementreverse_( vertexT, vertices, vertex )
-  
-   notes:
-     use FOREACHsetelementreverse12_() to reverse first two elements
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse_(type, set, variable) \
-        if (((variable= NULL), set)) for(\
-	   variable##temp= qh_setsize(set)-1, variable= qh_setlast(set);\
-	   variable; variable= \
-	   ((--variable##temp >= 0) ? SETelemt_(set, variable##temp, type) : NULL))
-
-/*-------------------------------------
-
-   FOREACHsetelementreverse12_(type, set, variable)- 
-     define FOREACH iterator with e[1] and e[0] reversed
-
-   declare:  
-     assumes *variable and **variablep are declared
-
-   each iteration:
-     variable is set element
-     variablep is one after variable.  
-
-   to repeat an element:
-     variablep--; / *repeat* /
-
-   at exit:
-     variable is NULL at end of loop
-  
-   example
-     #define FOREACHvertexreverse12_( vertices ) FOREACHsetelementreverse12_( vertexT, vertices, vertex )
-
-   notes:
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse12_(type, set, variable) \
-        if (((variable= NULL), set)) for(\
-          variable##p= (type **)&((set)->e[1].p); \
-	  (variable= *variable##p); \
-          variable##p == ((type **)&((set)->e[0].p))?variable##p += 2: \
-	      (variable##p == ((type **)&((set)->e[1].p))?variable##p--:variable##p++))
-
-/*-------------------------------------
-
-   FOREACHelem_( set )- 
-     iterate elements in a set
-
-   declare:  
-     void *elem, *elemp;
-
-   each iteration:
-     elem is set element
-     elemp is one beyond
-
-   to repeat an element:
-     elemp--; / *repeat* /
-
-   at exit:
-     elem == NULL at end of loop
-  
-   example:
-     FOREACHelem_(set) {
-     
-   notes:
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHelem_(set) FOREACHsetelement_(void, set, elem)
-
-/*-------------------------------------
-
-   FOREACHset_( set )- 
-     iterate a set of sets
-
-   declare:  
-     setT *set, **setp;
-
-   each iteration:
-     set is set element
-     setp is one beyond
-
-   to repeat an element:
-     setp--; / *repeat* /
-
-   at exit:
-     set == NULL at end of loop
-  
-   example
-     FOREACHset_(sets) {
-     
-   notes:
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHset_(sets) FOREACHsetelement_(setT, sets, set)
-
-/*-------------------------------------------
-
-   SETindex_( set, elem )
-     return index of elem in set
-
-   notes:   
-     for use with FOREACH iteration
-
-   example:
-     i= SETindex_(ridges, ridge)
-*/
-#define SETindex_(set, elem) ((void **)elem##p - (void **)&(set)->e[1].p)
-
-/*-----------------------------------------
-
-   SETref_( elem )
-     l.h.s. for modifying the current element in a FOREACH iteration
-
-   example:
-     SETref_(ridge)= anotherridge;
-*/
-#define SETref_(elem) (elem##p[-1])
-
-/*-----------------------------------------
-
-   SETelem_(set, n)
-     return the n'th element of set
-   
-   notes:
-      assumes that n is valid [0..size] and that set is defined
-      use SETelemt_() for type cast
-*/
-#define SETelem_(set, n)           ((set)->e[n].p)
-
-/*-----------------------------------------
-
-   SETelemt_(set, n, type)
-     return the n'th element of set as a type
-   
-   notes:
-      assumes that n is valid [0..size] and that set is defined
-*/
-#define SETelemt_(set, n, type)    ((type*)((set)->e[n].p))
-
-/*-----------------------------------------
-
-   SETelemaddr_(set, n, type)
-     return address of the n'th element of a set
-   
-   notes:
-      assumes that n is valid [0..size] and set is defined 
-*/
-#define SETelemaddr_(set, n, type) ((type **)(&((set)->e[n].p)))
-
-/*-----------------------------------------
-
-   SETfirst_(set)
-     return first element of set
-   
-*/
-#define SETfirst_(set)             ((set)->e[0].p)
-
-/*-----------------------------------------
-
-   SETfirstt_(set, type)
-     return first element of set as a type
-   
-*/
-#define SETfirstt_(set, type)      ((type*)((set)->e[0].p))
-
-/*-----------------------------------------
-
-   SETsecond_(set)
-     return second element of set
-   
-*/
-#define SETsecond_(set)            ((set)->e[1].p)
-
-/*-----------------------------------------
-
-   SETsecondt_(set, type)
-     return second element of set as a type
-*/
-#define SETsecondt_(set, type)     ((type*)((set)->e[1].p))
-
-/*-----------------------------------------
-
-   SETaddr_(set, type)
-       return address of set's elements
-*/
-#define SETaddr_(set,type)	   ((type **)(&((set)->e[0].p)))
-
-/*-----------------------------------------
-
-   SETreturnsize_(set, size) 
-     return size of a set
-   
-   notes:
-      set must be defined
-      use qh_setsize(set) unless speed is critical
-*/
-#define SETreturnsize_(set, size) (((size)= ((set)->e[(set)->maxsize].i))?(--(size)):((size)= (set)->maxsize))
-
-/*-----------------------------------------
-
-   SETempty_(set) 
-     return true (1) if set is empty
-   
-   notes:
-      set may be NULL
-*/
-#define SETempty_(set) 	          (!set || (SETfirst_(set) ? 0:1))
-
-/*-----------------------------------------
-
-   SETtruncate_(set)
-     return first element of set
-
-   see:
-     qh_settruncate()
-   
-*/
-#define SETtruncate_(set, size) {set->e[set->maxsize].i= size+1; /* maybe overwritten */ \
-      set->e[size].p= NULL;}
-
-/*======= prototypes in alphabetical order ============*/
-
-void  qh_setaddsorted(setT **setp, void *elem);
-void  qh_setaddnth(setT **setp, int nth, void *newelem);
-void  qh_setappend(setT **setp, void *elem);
-void  qh_setappend_set(setT **setp, setT *setA);
-void  qh_setappend2ndlast(setT **setp, void *elem);
-void  qh_setcheck(setT *set, char *tname, int id);
-void  qh_setcompact(setT *set);
-setT *qh_setcopy(setT *set, int extra);
-void *qh_setdel(setT *set, void *elem);
-void *qh_setdellast(setT *set);
-void *qh_setdelnth(setT *set, int nth);
-void *qh_setdelnthsorted(setT *set, int nth);
-void *qh_setdelsorted(setT *set, void *newelem);
-setT *qh_setduplicate( setT *set, int elemsize);
-int   qh_setequal(setT *setA, setT *setB);
-int   qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB);
-int   qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB);
-void  qh_setfree(setT **set);
-void  qh_setfree2( setT **setp, int elemsize);
-void  qh_setfreelong(setT **set);
-int   qh_setin(setT *set, void *setelem);
-int   qh_setindex(setT *set, void *setelem);
-void  qh_setlarger(setT **setp);
-void *qh_setlast(setT *set);
-setT *qh_setnew(int size);
-setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend);
-void  qh_setprint(FILE *fp, char* string, setT *set);
-void  qh_setreplace(setT *set, void *oldelem, void *newelem);
-int   qh_setsize(setT *set);
-setT *qh_settemp(int setsize);
-void  qh_settempfree(setT **set);
-void  qh_settempfree_all(void);
-setT *qh_settemppop(void);
-void  qh_settemppush(setT *set);
-void  qh_settruncate (setT *set, int size);
-int   qh_setunique (setT **set, void *elem);
-void  qh_setzero (setT *set, int index, int size);
-
-
-#endif /* qhDEFset */
diff --git a/extern/qhull/include/qhull/stat.h b/extern/qhull/include/qhull/stat.h
deleted file mode 100644
index 1dae54ed21d..00000000000
--- a/extern/qhull/include/qhull/stat.h
+++ /dev/null
@@ -1,520 +0,0 @@
-  /*
  ---------------------------------
-
-   stat.h 
-     contains all statistics that are collected for qhull
-
-   see qh-stat.htm and stat.c
-
-   copyright (c) 1993-2002, The Geometry Center
-
-   recompile qhull if you change this file
-
-   Integer statistics are Z* while real statistics are W*.  
-
-   define maydebugx to call a routine at every statistic event
-
-*/
-
-#ifndef qhDEFstat
-#define qhDEFstat 1
-
-
-/*---------------------------------
-
-  qh_KEEPstatistics
-    0 turns off statistic gathering (except zzdef/zzinc/zzadd/zzval/wwval)
-*/
-#ifndef qh_KEEPstatistics
-#define qh_KEEPstatistics 1
-#endif
-
-/*---------------------------------
-
-  Zxxx for integers, Wxxx for reals
-
-  notes:
-    be sure that all statistics are defined in stat.c
-      otherwise initialization may core dump
-    can pick up all statistics by:
-      grep '[zw].*_[(][ZW]' *.c >z.x
-    remove trailers with query">-
-    remove leaders with  query-replace-regexp [ ^I]+  (
-*/
-#if qh_KEEPstatistics
-enum statistics {     /* alphabetical after Z/W */
-    Zacoplanar,
-    Wacoplanarmax,
-    Wacoplanartot,
-    Zangle,
-    Wangle,
-    Wanglemax,
-    Wanglemin,
-    Zangletests,
-    Wareatot,
-    Wareamax,
-    Wareamin,
-    Zavoidold,
-    Wavoidoldmax,
-    Wavoidoldtot,
-    Zback0,
-    Zbestcentrum,
-    Zbestdist,
-    Zcentrumtests,
-    Zcheckpart,
-    Zcomputefurthest,
-    Zconcave,
-    Wconcavemax,
-    Wconcavetot,
-    Zconcaveridges,
-    Zconcaveridge,
-    Zcoplanar,
-    Wcoplanarmax,
-    Wcoplanartot,
-    Zcoplanarangle,
-    Zcoplanarcentrum,
-    Zcoplanarhorizon,
-    Zcoplanarinside,
-    Zcoplanarpart,
-    Zcoplanarridges,
-    Wcpu,
-    Zcyclefacetmax,
-    Zcyclefacettot,
-    Zcyclehorizon,
-    Zcyclevertex,
-    Zdegen,
-    Wdegenmax,
-    Wdegentot,
-    Zdegenvertex,
-    Zdelfacetdup, 
-    Zdelridge,
-    Zdelvertextot,
-    Zdelvertexmax,
-    Zdetsimplex,
-    Zdistcheck,
-    Zdistconvex,
-    Zdistgood,
-    Zdistio,
-    Zdistplane,
-    Zdiststat,
-    Zdistvertex,
-    Zdistzero,
-    Zdoc1,
-    Zdoc2,
-    Zdoc3,
-    Zdoc4,
-    Zdoc5,
-    Zdoc6,
-    Zdoc7,
-    Zdoc8,
-    Zdoc9,
-    Zdoc10,
-    Zdoc11,
-    Zdoc12,
-    Zdropdegen,
-    Zdropneighbor,
-    Zdupflip,
-    Zduplicate,
-    Wduplicatemax,
-    Wduplicatetot,
-    Zdupridge,
-    Zdupsame,
-    Zflipped, 
-    Wflippedmax, 
-    Wflippedtot, 
-    Zflippedfacets,
-    Zfindbest,
-    Zfindbestmax,
-    Zfindbesttot,
-    Zfindcoplanar,
-    Zfindfail,
-    Zfindhorizon,
-    Zfindhorizonmax,
-    Zfindhorizontot,
-    Zfindjump,
-    Zfindnew,
-    Zfindnewmax,
-    Zfindnewtot,
-    Zfindnewjump,
-    Zfindnewsharp,
-    Zgauss0,
-    Zgoodfacet,
-    Zhashlookup,
-    Zhashridge,
-    Zhashridgetest,
-    Zhashtests,
-    Zinsidevisible,
-    Zintersect,
-    Zintersectfail,
-    Zintersectmax,
-    Zintersectnum,
-    Zintersecttot,
-    Zmaxneighbors,
-    Wmaxout,
-    Wmaxoutside,
-    Zmaxridges,
-    Zmaxvertex,
-    Zmaxvertices,
-    Zmaxvneighbors,
-    Zmemfacets,
-    Zmempoints,
-    Zmemridges,
-    Zmemvertices,
-    Zmergeflipdup,
-    Zmergehorizon,
-    Zmergeinittot,
-    Zmergeinitmax,
-    Zmergeinittot2,
-    Zmergeintohorizon,
-    Zmergenew,
-    Zmergesettot,
-    Zmergesetmax,
-    Zmergesettot2,
-    Zmergesimplex,
-    Zmergevertex,
-    Wmindenom,
-    Wminvertex,
-    Zminnorm,
-    Zmultiridge,
-    Znearlysingular,
-    Zneighbor,
-    Wnewbalance,
-    Wnewbalance2,
-    Znewfacettot,
-    Znewfacetmax,
-    Znewvertex,
-    Wnewvertex,
-    Wnewvertexmax,
-    Znoarea,
-    Znonsimplicial,
-    Znowsimplicial,
-    Znotgood,
-    Znotgoodnew,
-    Znotmax,
-    Znumfacets,
-    Znummergemax,
-    Znummergetot,
-    Znumneighbors,
-    Znumridges,
-    Znumvertices,
-    Znumvisibility,
-    Znumvneighbors,
-    Zonehorizon,
-    Zpartangle,
-    Zpartcoplanar,
-    Zpartflip,
-    Zparthorizon,
-    Zpartinside,
-    Zpartition, 
-    Zpartitionall,
-    Zpartnear,
-    Zpbalance,
-    Wpbalance,
-    Wpbalance2, 
-    Zpostfacets, 
-    Zpremergetot,
-    Zprocessed,
-    Zremvertex,
-    Zremvertexdel,
-    Zrenameall,
-    Zrenamepinch,
-    Zrenameshare,
-    Zretry,
-    Wretrymax,
-    Zridge,
-    Wridge,
-    Wridgemax,
-    Zridge0,
-    Wridge0,
-    Wridge0max,
-    Zridgemid,
-    Wridgemid,
-    Wridgemidmax,
-    Zridgeok,
-    Wridgeok,
-    Wridgeokmax,
-    Zsearchpoints,
-    Zsetplane,
-    Ztestvneighbor,
-    Ztotcheck,
-    Ztothorizon,
-    Ztotmerge,
-    Ztotpartcoplanar,
-    Ztotpartition,
-    Ztotridges,
-    Ztotvertices,
-    Ztotvisible,
-    Ztricoplanar,
-    Ztricoplanarmax,
-    Ztricoplanartot,
-    Ztridegen,
-    Ztrimirror,
-    Ztrinull,
-    Wvertexmax,
-    Wvertexmin,
-    Zvertexridge,
-    Zvertexridgetot,
-    Zvertexridgemax,
-    Zvertices,
-    Zvisfacettot,
-    Zvisfacetmax,
-    Zvisvertextot,
-    Zvisvertexmax,
-    Zwidefacet,
-    Zwidevertices,
-    ZEND};
-
-/*---------------------------------
-
-  Zxxx/Wxxx statistics that remain defined if qh_KEEPstatistics=0
-
-  notes:
-    be sure to use zzdef, zzinc, etc. with these statistics (no double checking!)
-*/
-#else
-enum statistics {     /* for zzdef etc. macros */
-  Zback0,
-  Zbestdist,
-  Zcentrumtests,
-  Zcheckpart,
-  Zconcaveridges,
-  Zcoplanarhorizon,
-  Zcoplanarpart,
-  Zcoplanarridges,
-  Zcyclefacettot,
-  Zcyclehorizon,
-  Zdelvertextot,
-  Zdistcheck,
-  Zdistconvex,
-  Zdistzero,
-  Zdoc1,
-  Zdoc2,
-  Zdoc3,
-  Zdoc11,
-  Zflippedfacets,
-  Zgauss0,
-  Zminnorm,
-  Zmultiridge,
-  Znearlysingular,
-  Wnewvertexmax,
-  Znumvisibility,
-  Zpartcoplanar,
-  Zpartition,
-  Zpartitionall,
-  Zprocessed,
-  Zretry,
-  Zridge,
-  Wridge,
-  Wridgemax,
-  Zridge0,
-  Wridge0,
-  Wridge0max,
-  Zridgemid,
-  Wridgemid,
-  Wridgemidmax,
-  Zridgeok,
-  Wridgeok,
-  Wridgeokmax,
-  Zsetplane,
-  Ztotmerge,
-    ZEND};
-#endif
-
-/*---------------------------------
-  
-  ztype
-    the type of a statistic sets its initial value.  
-
-  notes:
-    The type should be the same as the macro for collecting the statistic
-*/
-enum ztypes {zdoc,zinc,zadd,zmax,zmin,ZTYPEreal,wadd,wmax,wmin,ZTYPEend};
-
-/*========== macros and constants =============*/
-
-/*----------------------------------
-  
-  MAYdebugx
-    define as maydebug() to be called frequently for error trapping
-*/
-#define MAYdebugx 
-
-/*----------------------------------
-  
-  zzdef_, zdef_( type, name, doc, -1)
-    define a statistic (assumes 'qhstat.next= 0;')
-
-  zdef_( type, name, doc, count)
-    define an averaged statistic
-    printed as name/count
-*/
-#define zzdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
-   qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#if qh_KEEPstatistics
-#define zdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
-   qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#else
-#define zdef_(type,name,doc,count)
-#endif
-
-/*----------------------------------
-  
-  zzinc_( name ), zinc_( name)
-    increment an integer statistic
-*/
-#define zzinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#if qh_KEEPstatistics
-#define zinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#else
-#define zinc_(id) {}
-#endif
-
-/*----------------------------------
-  
-  zzadd_( name, value ), zadd_( name, value ), wadd_( name, value )
-    add value to an integer or real statistic
-*/
-#define zzadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wwadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#if qh_KEEPstatistics
-#define zadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#else
-#define zadd_(id, val) {}
-#define wadd_(id, val) {}
-#endif
-
-/*----------------------------------
-
-  zzval_( name ), zval_( name ), wwval_( name )
-    set or return value of a statistic
-*/
-#define zzval_(id) ((qhstat stats[id]).i)
-#define wwval_(id) ((qhstat stats[id]).r)
-#if qh_KEEPstatistics
-#define zval_(id) ((qhstat stats[id]).i)
-#define wval_(id) ((qhstat stats[id]).r)
-#else
-#define zval_(id) qhstat tempi
-#define wval_(id) qhstat tempr
-#endif
-
-/*----------------------------------
-
-  zmax_( id, val ), wmax_( id, value )
-    maximize id with val
-*/
-#define wwmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#if qh_KEEPstatistics
-#define zmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].i,(val));}
-#define wmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#else
-#define zmax_(id, val) {}
-#define wmax_(id, val) {}
-#endif
-
-/*----------------------------------
-
-  zmin_( id, val ), wmin_( id, value )
-    minimize id with val
-*/
-#if qh_KEEPstatistics
-#define zmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].i,(val));}
-#define wmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].r,(val));}
-#else
-#define zmin_(id, val) {}
-#define wmin_(id, val) {}
-#endif
-
-/*================== stat.h types ==============*/
-
-
-/*----------------------------------
- 
-  intrealT
-    union of integer and real, used for statistics
-*/
-typedef union intrealT intrealT;    /* union of int and realT */
-union intrealT {
-    int i;
-    realT r;
-};
-
-/*----------------------------------
-  
-  qhstat
-    global data structure for statistics
-  
-  notes:
-   access to qh_qhstat is via the "qhstat" macro.  There are two choices
-   qh_QHpointer = 1     access globals via a pointer
-                        enables qh_saveqhull() and qh_restoreqhull()
-		= 0     qh_qhstat is a static data structure
-		        only one instance of qhull() can be active at a time
-			default value
-   qh_QHpointer is defined in qhull.h
-
-   allocated in stat.c
-*/
-typedef struct qhstatT qhstatT; 
-#if qh_QHpointer
-#define qhstat qh_qhstat->
-extern qhstatT *qh_qhstat;
-#else
-#define qhstat qh_qhstat.
-extern qhstatT qh_qhstat; 
-#endif
-struct qhstatT {  
-  intrealT   stats[ZEND];     /* integer and real statistics */
-  unsigned   char id[ZEND+10]; /* id's in print order */
-  char      *doc[ZEND];       /* array of documentation strings */
-  short int  count[ZEND];     /* -1 if none, else index of count to use */
-  char       type[ZEND];      /* type, see ztypes above */
-  char       printed[ZEND];   /* true, if statistic has been printed */
-  intrealT   init[ZTYPEend];  /* initial values by types, set initstatistics */
-
-  int        next;            /* next index for zdef_ */
-  int        precision;       /* index for precision problems */
-  int        vridges;         /* index for Voronoi ridges */
-  int        tempi;
-  realT      tempr;
-};
-
-/*========== function prototypes ===========*/
-
-void    qh_allstatA(void);
-void    qh_allstatB(void);
-void    qh_allstatC(void);
-void    qh_allstatD(void);
-void    qh_allstatE(void);
-void    qh_allstatE2(void);
-void    qh_allstatF(void);
-void    qh_allstatG(void);
-void    qh_allstatH(void);
-void    qh_allstatI(void);
-void    qh_allstatistics (void);
-void    qh_collectstatistics (void);
-void	qh_freestatistics (void);
-void    qh_initstatistics (void);
-boolT 	qh_newstats (int index, int *nextindex);
-boolT 	qh_nostatistic (int i);
-void    qh_printallstatistics (FILE *fp, char *string);
-void    qh_printstatistics (FILE *fp, char *string);
-void  	qh_printstatlevel (FILE *fp, int id, int start);
-void  	qh_printstats (FILE *fp, int index, int *nextindex);
-realT   qh_stddev (int num, realT tot, realT tot2, realT *ave);
-
-#endif   /* qhDEFstat */
diff --git a/extern/qhull/include/qhull/user.h b/extern/qhull/include/qhull/user.h
deleted file mode 100644
index 79558967a52..00000000000
--- a/extern/qhull/include/qhull/user.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/*
  ---------------------------------
-
-   user.h
-   user redefinable constants
-
-   see qh-user.htm.  see COPYING for copyright information.
-
-   before reading any code, review qhull.h for data structure definitions and 
-   the "qh" macro.
-*/
-
-#ifndef qhDEFuser
-#define qhDEFuser 1
-
-/*============= data types and configuration macros ==========*/
-
-/*----------------------------------
-  
-  realT
-    set the size of floating point numbers
-  
-  qh_REALdigits 
-    maximimum number of significant digits
-  
-  qh_REAL_1, qh_REAL_2n, qh_REAL_3n
-    format strings for printf
-  
-  qh_REALmax, qh_REALmin
-    maximum and minimum (near zero) values  
-  
-  qh_REALepsilon
-    machine roundoff.  Maximum roundoff error for addition and multiplication.
-    
-  notes:
-   Select whether to store floating point numbers in single precision (float)
-   or double precision (double).
-   
-   Use 'float' to save about 8% in time and 25% in space.  This is particularly
-   help if high-d where convex hulls are space limited.  Using 'float' also
-   reduces the printed size of Qhull's output since numbers have 8 digits of 
-   precision.
-   
-   Use 'double' when greater arithmetic precision is needed.  This is needed
-   for Delaunay triangulations and Voronoi diagrams when you are not merging 
-   facets.
-
-   If 'double' gives insufficient precision, your data probably includes
-   degeneracies.  If so you should use facet merging (done by default)
-   or exact arithmetic (see imprecision section of manual, qh-impre.htm).  
-   You may also use option 'Po' to force output despite precision errors.
-
-   You may use 'long double', but many format statements need to be changed
-   and you may need a 'long double' square root routine.  S. Grundmann
-   (sg@eeiwzb.et.tu-dresden.de) has done this.  He reports that the code runs 
-   much slower with little gain in precision.    
-
-   WARNING: on some machines,    int f(){realT a= REALmax;return (a == REALmax);}
-      returns False.  Use (a > REALmax/2) instead of (a == REALmax).
-
-   REALfloat =   1      all numbers are 'float' type
-             =   0      all numbers are 'double' type
-*/
-#define REALfloat 0
-
-#if (REALfloat == 1)
-#define realT float
-#define REALmax FLT_MAX
-#define REALmin FLT_MIN
-#define REALepsilon FLT_EPSILON
-#define qh_REALdigits 8   /* maximum number of significant digits */
-#define qh_REAL_1 "%6.8g "
-#define qh_REAL_2n "%6.8g %6.8g\n"
-#define qh_REAL_3n "%6.8g %6.8g %6.8g\n"
-
-#elif (REALfloat == 0)
-#define realT double
-#define REALmax DBL_MAX
-#define REALmin DBL_MIN
-#define REALepsilon DBL_EPSILON
-#define qh_REALdigits 16    /* maximum number of significant digits */
-#define qh_REAL_1 "%6.16g "
-#define qh_REAL_2n "%6.16g %6.16g\n"
-#define qh_REAL_3n "%6.16g %6.16g %6.16g\n"
-
-#else
-#error unknown float option
-#endif
-
-/*----------------------------------
-  
-  qh_CPUclock
-    define the clock() function for reporting the total time spent by Qhull
-    returns CPU ticks as a 'long int'
-    qh_CPUclock is only used for reporting the total time spent by Qhull
-
-  qh_SECticks 
-    the number of clock ticks per second
-
-  notes:
-    looks for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or assumes microseconds
-    to define a custom clock, set qh_CLOCKtype to 0
-
-    if your system does not use clock() to return CPU ticks, replace
-    qh_CPUclock with the corresponding function.  It is converted
-    to unsigned long to prevent wrap-around during long runs.
-   
-
-   Set qh_CLOCKtype to
-   
-     1	   	for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or microsecond
-                Note:  may fail if more than 1 hour elapsed time
-
-     2	   	use qh_clock() with POSIX times() (see global.c)
-*/
-#define qh_CLOCKtype 1  /* change to the desired number */
-
-#if (qh_CLOCKtype == 1)
-
-#if defined (CLOCKS_PER_SECOND)
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SECOND
-
-#elif defined (CLOCKS_PER_SEC)
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SEC
-
-#elif defined (CLK_TCK)
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks CLK_TCK
-
-#else
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks 1E6
-#endif
-
-#elif (qh_CLOCKtype == 2)
-#define qh_CPUclock    qh_clock()  /* return CPU clock */
-#define qh_SECticks 100
-
-#else /* qh_CLOCKtype == ? */
-#error unknown clock option
-#endif
-
-/*----------------------------------
-  
-  qh_RANDOMtype, qh_RANDOMmax, qh_RANDOMseed
-    define random number generator
-
-    qh_RANDOMint generates a random integer between 0 and qh_RANDOMmax.  
-    qh_RANDOMseed sets the random number seed for qh_RANDOMint
-
-  Set qh_RANDOMtype (default 5) to:
-    1       for random() with 31 bits (UCB)
-    2       for rand() with RAND_MAX or 15 bits (system 5)
-    3       for rand() with 31 bits (Sun)
-    4       for lrand48() with 31 bits (Solaris)
-    5       for qh_rand() with 31 bits (included with Qhull)
-  
-  notes:
-    Random numbers are used by rbox to generate point sets.  Random
-    numbers are used by Qhull to rotate the input ('QRn' option),
-    simulate a randomized algorithm ('Qr' option), and to simulate
-    roundoff errors ('Rn' option).
-
-    Random number generators differ between systems.  Most systems provide
-    rand() but the period varies.  The period of rand() is not critical
-    since qhull does not normally use random numbers.  
-
-    The default generator is Park & Miller's minimal standard random
-    number generator [CACM 31:1195 '88].  It is included with Qhull.
-
-    If qh_RANDOMmax is wrong, qhull will report a warning and Geomview 
-    output will likely be invisible.
-*/
-#define qh_RANDOMtype 5   /* *** change to the desired number *** */
-
-#if (qh_RANDOMtype == 1)
-#define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, random()/MAX */
-#define qh_RANDOMint random()
-#define qh_RANDOMseed_(seed) srandom(seed);
-
-#elif (qh_RANDOMtype == 2)
-#ifdef RAND_MAX
-#define qh_RANDOMmax ((realT)RAND_MAX)
-#else
-#define qh_RANDOMmax ((realT)32767)   /* 15 bits (System 5) */
-#endif
-#define qh_RANDOMint  rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-  
-#elif (qh_RANDOMtype == 3)
-#define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, Sun */
-#define qh_RANDOMint  rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-
-#elif (qh_RANDOMtype == 4)
-#define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, lrand38()/MAX */
-#define qh_RANDOMint lrand48()
-#define qh_RANDOMseed_(seed) srand48(seed);
-
-#elif (qh_RANDOMtype == 5)
-#define qh_RANDOMmax ((realT)2147483646UL)  /* 31 bits, qh_rand/MAX */
-#define qh_RANDOMint qh_rand()
-#define qh_RANDOMseed_(seed) qh_srand(seed);
-/* unlike rand(), never returns 0 */
-
-#else
-#error: unknown random option
-#endif
-
-/*----------------------------------
-  
-  qh_ORIENTclock
-    0 for inward pointing normals by Geomview convention
-*/
-#define qh_ORIENTclock 0 
-
-
-/*========= performance related constants =========*/
-
-/*----------------------------------
-  
-  qh_HASHfactor
-    total hash slots / used hash slots.  Must be at least 1.1.
-      
-  notes:
-    =2 for at worst 50% occupancy for qh hash_table and normally 25% occupancy
-*/
-#define qh_HASHfactor 2
-
-/*----------------------------------
-  
-  qh_VERIFYdirect
-    with 'Tv' verify all points against all facets if op count is smaller
-
-  notes:
-    if greater, calls qh_check_bestdist() instead
-*/
-#define qh_VERIFYdirect 1000000 
-
-/*----------------------------------
-  
-  qh_INITIALsearch
-     if qh_INITIALmax, search points up to this dimension
-*/
-#define qh_INITIALsearch 6
-
-/*----------------------------------
-  
-  qh_INITIALmax
-    if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex
-      
-  notes:
-    from points with non-zero determinants
-    use option 'Qs' to override (much slower)
-*/
-#define qh_INITIALmax 8
-
-/*----------------------------------
-  
-  qh_JOGGLEdefault
-    default qh.JOGGLEmax is qh.DISTround * qh_JOGGLEdefault
-
-  notes:
-    rbox s r 100 | qhull QJ1e-15 QR0 generates 90% faults at distround 7e-16
-    rbox s r 100 | qhull QJ1e-14 QR0 generates 70% faults
-    rbox s r 100 | qhull QJ1e-13 QR0 generates 35% faults
-    rbox s r 100 | qhull QJ1e-12 QR0 generates 8% faults
-    rbox s r 100 | qhull QJ1e-11 QR0 generates 1% faults
-    rbox s r 100 | qhull QJ1e-10 QR0 generates 0% faults
-    rbox 1000 W0 | qhull QJ1e-12 QR0 generates 86% faults
-    rbox 1000 W0 | qhull QJ1e-11 QR0 generates 20% faults
-    rbox 1000 W0 | qhull QJ1e-10 QR0 generates 2% faults
-    the later have about 20 points per facet, each of which may interfere
-
-    pick a value large enough to avoid retries on most inputs
-*/
-#define qh_JOGGLEdefault 30000.0
-
-/*----------------------------------
-  
-  qh_JOGGLEincrease
-    factor to increase qh.JOGGLEmax on qh_JOGGLEretry or qh_JOGGLEagain
-*/
-#define qh_JOGGLEincrease 10.0
-
-/*----------------------------------
-  
-  qh_JOGGLEretry
-    if ZZretry = qh_JOGGLEretry, increase qh.JOGGLEmax
-
-  notes:
-    try twice at the original value in case of bad luck the first time
-*/
-#define qh_JOGGLEretry 2
-
-/*----------------------------------
-  
-  qh_JOGGLEagain
-    every following qh_JOGGLEagain, increase qh.JOGGLEmax
-
-  notes:
-    1 is OK since it's already failed qh_JOGGLEretry times
-*/
-#define qh_JOGGLEagain 1
-
-/*----------------------------------
-  
-  qh_JOGGLEmaxincrease
-    maximum qh.JOGGLEmax due to qh_JOGGLEincrease
-    relative to qh.MAXwidth
-
-  notes:
-    qh.joggleinput will retry at this value until qh_JOGGLEmaxretry
-*/
-#define qh_JOGGLEmaxincrease 1e-2
-
-/*----------------------------------
-  
-  qh_JOGGLEmaxretry
-    stop after qh_JOGGLEmaxretry attempts
-*/
-#define qh_JOGGLEmaxretry 100
-
-/*========= memory constants =========*/
-
-/*----------------------------------
-  
-  qh_MEMalign
-    memory alignment for qh_meminitbuffers() in global.c
-    
-  notes:
-    to avoid bus errors, memory allocation must consider alignment requirements.
-    malloc() automatically takes care of alignment.   Since mem.c manages
-    its own memory, we need to explicitly specify alignment in
-    qh_meminitbuffers().
-
-    A safe choice is sizeof(double).  sizeof(float) may be used if doubles 
-    do not occur in data structures and pointers are the same size.  Be careful
-    of machines (e.g., DEC Alpha) with large pointers. 
-
-    If using gcc, best alignment is
-              #define qh_MEMalign fmax_(__alignof__(realT),__alignof__(void *))
-*/
-#define qh_MEMalign fmax_(sizeof(realT), sizeof(void *))
-
-/*----------------------------------
-  
-  qh_MEMbufsize
-    size of additional memory buffers
-    
-  notes:
-    used for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMbufsize 0x10000       /* allocate 64K memory buffers */
-
-/*----------------------------------
-  
-  qh_MEMinitbuf
-    size of initial memory buffer
-    
-  notes:
-    use for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMinitbuf 0x20000      /* initially allocate 128K buffer */
-
-/*----------------------------------
-  
-  qh_INFINITE
-    on output, indicates Voronoi center at infinity
-*/
-#define qh_INFINITE  -10.101
-
-/*----------------------------------
-  
-  qh_DEFAULTbox
-    default box size (Geomview expects 0.5)
-*/
-#define qh_DEFAULTbox 0.5 
-
-/*======= conditional compilation ============================*/
-
-/*----------------------------------
-
-  __cplusplus
-    defined by C++ compilers
-
-  __MSC_VER
-    defined by Microsoft Visual C++
-  
-  __MWERKS__ && __POWERPC__
-    defined by Metrowerks when compiling for the Power Macintosh
-
-  __STDC__
-    defined for strict ANSI C 
-*/
-
-/*----------------------------------
- 
-  qh_COMPUTEfurthest 
-    compute furthest distance to an outside point instead of storing it with the facet
-    =1 to compute furthest
-  
-  notes:
-    computing furthest saves memory but costs time
-      about 40% more distance tests for partitioning
-      removes facet->furthestdist 
-*/
-#define qh_COMPUTEfurthest 0
-                         
-/*----------------------------------
- 
-  qh_KEEPstatistics   
-    =0 removes most of statistic gathering and reporting
-
-  notes:
-    if 0, code size is reduced by about 4%.
-*/
-#define qh_KEEPstatistics 1
-                       
-/*----------------------------------
- 
-  qh_MAXoutside 
-    record outer plane for each facet
-    =1 to record facet->maxoutside
-  
-  notes:
-    this takes a realT per facet and slightly slows down qhull
-    it produces better outer planes for geomview output 
-*/
-#define qh_MAXoutside 1
-
-/*----------------------------------
- 
-  qh_NOmerge
-    disables facet merging if defined
-    
-  notes:
-    This saves about 10% space.
-    
-    Unless 'Q0'
-      qh_NOmerge sets 'QJ' to avoid precision errors
-
-    #define qh_NOmerge    
-
-  see:
-    qh_NOmem in mem.c
-    
-    see user.c/user_eg.c for removing io.o
-*/  
-    
-/*----------------------------------
- 
-  qh_NOtrace
-    no tracing if defined 
-  
-  notes:
-    This saves about 5% space.
-
-    #define qh_NOtrace
-*/    
-
-/*----------------------------------
-  
-  qh_QHpointer
-    access global data with pointer or static structure
-
-  qh_QHpointer  = 1     access globals via a pointer to allocated memory
-                        enables qh_saveqhull() and qh_restoreqhull()
-			costs about 8% in time and 2% in space
-
-		= 0     qh_qh and qh_qhstat are static data structures
-		        only one instance of qhull() can be active at a time
-			default value
-
-  notes:
-    all global variables for qhull are in qh, qhmem, and qhstat
-    qh is defined in qhull.h
-    qhmem is defined in mem.h
-    qhstat is defined in stat.h
-
-  see:
-    user_eg.c for an example
-*/
-#define qh_QHpointer 0
-#if 0  /* sample code */
-    qhT *oldqhA, *oldqhB;
-
-    exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
-                      flags, outfile, errfile); 
-    /* use results from first call to qh_new_qhull */
-    oldqhA= qh_save_qhull();
-    exitcode= qh_new_qhull (dimB, numpointsB, pointsB, ismalloc,
-                      flags, outfile, errfile); 
-    /* use results from second call to qh_new_qhull */
-    oldqhB= qh_save_qhull();
-    qh_restore_qhull (&oldqhA);
-    /* use results from first call to qh_new_qhull */
-    qh_freeqhull (qh_ALL);  /* frees all memory used by first call */
-    qh_restore_qhull (&oldqhB);
-    /* use results from second call to qh_new_qhull */
-    qh_freeqhull (!qh_ALL); /* frees long memory used by second call */
-    qh_memfreeshort (&curlong, &totlong);  /* frees short memory and memory allocator */
-#endif
-
-/*----------------------------------
- 
-  qh_QUICKhelp        
-    =1 to use abbreviated help messages, e.g., for degenerate inputs
-*/
-#define qh_QUICKhelp    0  
-
-/* ============ -merge constants- ====================
-
-   These constants effect facet merging.  You probably will not need
-   to modify these.  They effect the performance of facet merging.
-*/
-
-/*----------------------------------
-  
-  qh_DIMmergeVertex
-    max dimension for vertex merging (it is not effective in high-d)
-*/
-#define qh_DIMmergeVertex 6
-
-/*----------------------------------
-  
-  qh_DIMreduceBuild
-     max dimension for vertex reduction during build (slow in high-d)
-*/
-#define qh_DIMreduceBuild 5
-
-/*----------------------------------
-     
-  qh_BESTcentrum
-     if > 2*dim+n vertices, qh_findbestneighbor() tests centrums (faster)
-     else, qh_findbestneighbor() tests all vertices (much better merges)
-
-  qh_BESTcentrum2
-     if qh_BESTcentrum2 * DIM3 + BESTcentrum < #vertices tests centrums
-*/
-#define qh_BESTcentrum 20
-#define qh_BESTcentrum2 2
-
-/*----------------------------------
-  
-  qh_BESTnonconvex
-    if > dim+n neighbors, qh_findbestneighbor() tests nonconvex ridges.
-    
-  notes:
-    It is needed because qh_findbestneighbor is slow for large facets
-*/
-#define qh_BESTnonconvex 15 
-
-/*----------------------------------
-  
-  qh_MAXnewmerges
-    if >n newmerges, qh_merge_nonconvex() calls qh_reducevertices_centrums.
-     
-  notes:
-    It is needed because postmerge can merge many facets at once
-*/
-#define qh_MAXnewmerges 2
-
-/*----------------------------------
-  
-  qh_MAXnewcentrum
-    if <= dim+n vertices (n approximates the number of merges),
-      reset the centrum in qh_updatetested() and qh_mergecycle_facets()
-    
-  notes:
-    needed to reduce cost and because centrums may move too much if 
-    many vertices in high-d
-*/
-#define qh_MAXnewcentrum 5
-
-/*----------------------------------
-  
-  qh_COPLANARratio
-    for 3-d+ merging, qh.MINvisible is n*premerge_centrum
-
-  notes:
-    for non-merging, it's DISTround
-*/
-#define qh_COPLANARratio 3
-
-/*----------------------------------
-  
-  qh_DISToutside
-    When is a point clearly outside of a facet?  
-    Stops search in qh_findbestnew or qh_partitionall
-    qh_findbest uses qh.MINoutside since since it is only called if no merges.
-     
-  notes:
-    'Qf' always searches for best facet
-    if !qh.MERGING, same as qh.MINoutside. 
-    if qh_USEfindbestnew, increase value since neighboring facets may be ill-behaved
-      [Note: Zdelvertextot occurs normally with interior points]
-            RBOX 1000 s Z1 G1e-13 t1001188774 | QHULL Tv
-    When there is a sharp edge, need to move points to a
-    clearly good facet; otherwise may be lost in another partitioning.
-    if too big then O(n^2) behavior for partitioning in cone
-    if very small then important points not processed
-    Needed in qh_partitionall for
-      RBOX 1000 s Z1 G1e-13 t1001032651 | QHULL Tv
-    Needed in qh_findbestnew for many instances of
-      RBOX 1000 s Z1 G1e-13 t | QHULL Tv
-
-  See:  
-    qh_DISToutside -- when is a point clearly outside of a facet
-    qh_SEARCHdist -- when is facet coplanar with the best facet?
-    qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_DISToutside ((qh_USEfindbestnew ? 2 : 1) * \
-     fmax_((qh MERGING ? 2 : 1)*qh MINoutside, qh max_outside))
-
-/*----------------------------------
-  
-  qh_RATIOnearinside
-    ratio of qh.NEARinside to qh.ONEmerge for retaining inside points for
-    qh_check_maxout().  
-  
-  notes:
-    This is overkill since do not know the correct value.
-    It effects whether 'Qc' reports all coplanar points
-    Not used for 'd' since non-extreme points are coplanar
-*/
-#define qh_RATIOnearinside 5
-
-/*----------------------------------
-  
-  qh_SEARCHdist
-    When is a facet coplanar with the best facet?  
-    qh_findbesthorizon: all coplanar facets of the best facet need to be searched.
-
-  See:
-    qh_DISToutside -- when is a point clearly outside of a facet
-    qh_SEARCHdist -- when is facet coplanar with the best facet?
-    qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_SEARCHdist ((qh_USEfindbestnew ? 2 : 1) * \
-      (qh max_outside + 2 * qh DISTround + fmax_( qh MINvisible, qh MAXcoplanar)));
-
-/*----------------------------------
-  
-  qh_USEfindbestnew
-     Always use qh_findbestnew for qh_partitionpoint, otherwise use
-     qh_findbestnew if merged new facet or sharpnewfacets.
-  
-  See:
-    qh_DISToutside -- when is a point clearly outside of a facet
-    qh_SEARCHdist -- when is facet coplanar with the best facet?
-    qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_USEfindbestnew (zzval_(Ztotmerge) > 50)
-
-/*----------------------------------
-  
-  qh_WIDEcoplanar
-    n*MAXcoplanar or n*MINvisible for a WIDEfacet 
-    
-    if vertex is further than qh.WIDEfacet from the hyperplane
-    then its ridges are not counted in computing the area, and
-    the facet's centrum is frozen. 
-    
-  notes:
-   qh.WIDEfacet= max(qh.MAXoutside,qh_WIDEcoplanar*qh.MAXcoplanar,
-      qh_WIDEcoplanar * qh.MINvisible);
-*/
-#define qh_WIDEcoplanar 6
-
-/*----------------------------------
-  
-  qh_MAXnarrow
-    max. cosine in initial hull that sets qh.NARROWhull
-       
-  notes:
-    If qh.NARROWhull, the initial partition does not make 
-    coplanar points.  If narrow, a coplanar point can be 
-    coplanar to two facets of opposite orientations and
-    distant from the exact convex hull.
-
-    Conservative estimate.  Don't actually see problems until it is -1.0
-*/
-#define qh_MAXnarrow -0.99999999
-
-/*----------------------------------
-  
-  qh_WARNnarrow
-    max. cosine in initial hull to warn about qh.NARROWhull
-      
-  notes:
-    this is a conservative estimate.  
-    Don't actually see problems until it is -1.0.  See qh-impre.htm
-*/
-#define qh_WARNnarrow -0.999999999999999
-
-/*----------------------------------
-  
-  qh_ZEROdelaunay
-    a zero Delaunay facet occurs for input sites coplanar with their convex hull
-    the last normal coefficient of a zero Delaunay facet is within
-        qh_ZEROdelaunay * qh.ANGLEround of 0
-      
-  notes:
-    qh_ZEROdelaunay does not allow for joggled input ('QJ').
-
-    You can avoid zero Delaunay facets by surrounding the input with a box.
-
-    Use option 'PDk:-n' to explicitly define zero Delaunay facets
-      k= dimension of input sites (e.g., 3 for 3-d Delaunay triangulation)
-      n= the cutoff for zero Delaunay facets (e.g., 'PD3:-1e-12')
-*/
-#define qh_ZEROdelaunay 2
-
-#endif /* qh_DEFuser */
-
-
-
diff --git a/extern/qhull/make/msvc_7_0/qhull.vcproj b/extern/qhull/make/msvc_7_0/qhull.vcproj
deleted file mode 100644
index 1b754d8e076..00000000000
--- a/extern/qhull/make/msvc_7_0/qhull.vcproj
+++ /dev/null
@@ -1,677 +0,0 @@
-
-
-	
-		
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-
diff --git a/extern/qhull/src/Make-config.sh b/extern/qhull/src/Make-config.sh
deleted file mode 100755
index 90bbb958599..00000000000
--- a/extern/qhull/src/Make-config.sh
+++ /dev/null
@@ -1,285 +0,0 @@
-#!/bin/sh -e
-#
-# Make-config.sh
-#
-#     Setup for Debian build
-#
-#     Writes configure.in and Makefile.am files
-#     and runs automake and autoconfig
-#
-#     Use 'make dist' to build Unix distribution.
-#     Use 'configure; make' to build Qhull
-#
-#note:
-#     'configure; make' does not work under cygwin.
-#	src/unix.c:354: variable 'qh_qh' can't be auto-imported.
-#	Please read the documentation for ld's --enable-auto-import for details.
-
-###################################################
-###########  ../configure.in ######################
-###################################################
-
-echo Create ../configure.in
-cat >../configure.in <<\HERE-CONFIGURE
-dnl configure.in for the qhull package
-dnl Author: Rafael Laboissiere 
-dnl Created: Mon Dec  3 21:36:21 CET 2001
-
-AC_INIT(src/qhull.c)
-AM_INIT_AUTOMAKE(qhull, 2002.1)
-
-AC_PROG_CC
-AC_PROG_LIBTOOL
-
-AC_OUTPUT([Makefile src/Makefile html/Makefile eg/Makefile])
-
-HERE-CONFIGURE
-
-###################################################
-###########  ../Makefile.am #######################
-###################################################
-
-echo Create ../Makefile.am
-cat >../Makefile.am <<\HERE-TOP
-### Makefile.am for the qhull package (main)
-### Author: Rafael Laboissiere 
-### Created: Mon Dec  3 21:36:21 CET 2001
-
-### Documentation files
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-
-# which:
-doc_DATA = \
-  Announce.txt \
-  COPYING.txt \
-  README.txt \
-  REGISTER.txt
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = \
-  $(doc_DATA) \
-  File_id.diz \
-  QHULL-GO.pif
-
-### Subdirectories for Automaking
-
-SUBDIRS = src html eg
-
-HERE-TOP
-
-###################################################
-###########  ../eg/Makefile.am ####################
-###################################################
-
-echo Create ../eg/Makefile.am
-cat >../eg/Makefile.am <<\HERE-AM
-### Makefile.am for the qhull package (eg)
-### Author: Rafael Laboissiere 
-### Created: Mon Dec  3 21:36:21 CET 2001
-
-### Documentation files
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-examplesdir = $(docdir)/examples
-
-# which:
-examples_DATA = \
-  q_eg \
-  q_egtest \
-  q_test \
-  Qhull-go.bat \
-  q_test.bat
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = $(examples_DATA)
-
-HERE-AM
-
-###################################################
-###########  ../html/Makefile.am ##################
-###################################################
-
-echo Create ../html/Makefile.am
-cat >../html/Makefile.am <<\HERE-HTML
-### Makefile.am for the qhull package (html)
-### Author: Rafael Laboissiere 
-### Created: Mon Dec  3 21:36:21 CET 2001
-
-### Man pages (trick to get around .man extension)
-
-%.1: %.man
-	cp $< $@
-CLEANFILES = *.1
-man_MANS = rbox.1 qhull.1
-
-### Documentation files
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-htmldir = $(docdir)/html
-
-# which:
-html_DATA = \
-  index.htm \
-  qconvex.htm \
-  qdelau_f.htm \
-  qdelaun.htm \
-  qh--4d.gif \
-  qh--cone.gif \
-  qh--dt.gif \
-  qh--geom.gif \
-  qh--half.gif \
-  qh--rand.gif \
-  qh-eg.htm \
-  qh-faq.htm \
-  qh-get.htm \
-  qh-home.htm \
-  qh-impre.htm \
-  qh-in.htm \
-  qh-optc.htm \
-  qh-optf.htm \
-  qh-optg.htm \
-  qh-opto.htm \
-  qh-optp.htm \
-  qh-optq.htm \
-  qh-optt.htm \
-  qh-quick.htm \
-  qhalf.htm \
-  qhull.htm \
-  qvoron_f.htm \
-  qvoronoi.htm \
-  rbox.htm
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = \
-  $(html_DATA) \
-  qhull.man \
-  qhull.txt \
-  rbox.man \
-  rbox.txt
-
-HERE-HTML
-
-###################################################
-###########  ../src/Makefile.am ###################
-###################################################
-
-echo Create ../src/Makefile.am
-cat >../src/Makefile.am <<\HERE-SRC
-### Makefile.am for the qhull package (src)
-### Author: Rafael Laboissiere 
-### Created: Mon Dec  3 21:36:21 CET 2001
-
-### Shared Library
-
-# to:
-lib_LTLIBRARIES = libqhull.la
-
-# from:
-libqhull_la_SOURCES = \
-  user.c \
-  global.c \
-  stat.c \
-  io.c \
-  geom2.c \
-  poly2.c \
-  merge.c \
-  qhull.c \
-  geom.c \
-  poly.c \
-  qset.c \
-  mem.c
-
-# how:
-libqhull_la_LDFLAGS = -version-info 0:0:0 -lm
-
-### Utility programs
-
-# to:
-bin_PROGRAMS = qhull rbox qconvex qdelaunay qvoronoi qhalf
-
-# from:
-qhull_SOURCES = unix.c
-rbox_SOURCES = rbox.c
-qconvex_SOURCES = qconvex.c
-qdelaunay_SOURCES = qdelaun.c
-qvoronoi_SOURCES = qvoronoi.c
-qhalf_SOURCES = qhalf.c
-
-# how:
-qhull_LDADD = libqhull.la
-rbox_LDADD = libqhull.la
-qconvex_LDADD = libqhull.la
-qdelaunay_LDADD = libqhull.la
-qvoronoi_LDADD = libqhull.la
-qhalf_LDADD = libqhull.la
-
-### Include files
-
-pkginclude_HEADERS = \
-  geom.h \
-  mem.h \
-  poly.h \
-  qhull_a.h \
-  stat.h \
-  io.h \
-  merge.h \
-  qhull.h  \
-  qset.h \
-  user.h
-
-
-### Example programs
-
-# to:
-docdir = $(prefix)/share/doc/$(PACKAGE)
-examplesdir = $(docdir)/examples
-
-# which:
-examples_DATA = \
-  user_eg.c \
-  user_eg2.c \
-  qhull_interface.cpp \
-  Makefile.txt \
-  Make-config.sh \
-  MBorland
-
-doc_DATA = Changes.txt \
-    index.htm \
-    qh-geom.htm \
-    qh-globa.htm \
-    qh-io.htm \
-    qh-mem.htm \
-    qh-merge.htm \
-    qh-poly.htm \
-    qh-qhull.htm \
-    qh-set.htm \
-    qh-stat.htm \
-    qh-user.htm
-
-
-### Extra files to be included in the tarball
-
-EXTRA_DIST = \
-  $(doc_DATA) \
-  $(examples_DATA)
-
-HERE-SRC
-
-###################################################
-###########  run automake autoconf ################
-###################################################
-
-
-echo Run automake, libtoolize, and autoconf
-cd ..; aclocal &&\
-  automake --foreign --add-missing --force-missing && \
-  libtoolize --force && \
-  autoconf
-
diff --git a/extern/qhull/src/Makefile b/extern/qhull/src/Makefile
deleted file mode 100644
index 8201e44f01b..00000000000
--- a/extern/qhull/src/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = qhull
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../include
-
-CSRCS = user.c global.c stat.c io.c geom2.c poly2.c \
-       merge.c qhull.c geom.c poly.c qset.c mem.c
-CCSRCS = 
-include nan_compile.mk 
-
-install: all debug
-	@[ -d $(NAN_QHULL) ] || mkdir -p $(NAN_QHULL)
-	@[ -d $(NAN_QHULL)/include/qhull ] || mkdir -p $(NAN_QHULL)/include/qhull
-	@[ -d $(NAN_QHULL)/lib ] || mkdir -p $(NAN_QHULL)/lib
-	@[ -d $(NAN_QHULL)/lib/debug ] || mkdir -p $(NAN_QHULL)/lib/debug
-	@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/lib$(LIBNAME).a $(NAN_QHULL)/lib/
-#	@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/debug/lib$(LIBNAME).a $(NAN_QHULL)/lib/debug/
-ifeq ($(OS),darwin)
-	ranlib $(NAN_QHULL)/lib/lib$(LIBNAME).a
-#	ranlib $(NAN_QHULL)/lib/debug/lib$(LIBNAME).a
-endif
-	@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh ../include/qhull/*.h $(NAN_QHULL)/include/qhull
-
-
diff --git a/extern/qhull/src/Makefile.txt b/extern/qhull/src/Makefile.txt
deleted file mode 100644
index e87b66b49bc..00000000000
--- a/extern/qhull/src/Makefile.txt
+++ /dev/null
@@ -1,190 +0,0 @@
-# Unix Makefile for qhull and rbox
-#
-#       see README.txt
-#
-#       make           to produce qhull qconvex qdelaunay qhalf qvoronoi rbox
-#       make qvoronoi  to produce qvoronoi (etc.)
-#       make qhullx    to produce qhull qconvex etc.  w/o using libqhull.a
-#       make doc       to print documentation
-#       make install   to copy qhull, rbox, qhull.1, rbox.1 to BINDIR, MANDIR
-#       make new       to rebuild qhull and rbox from source
-#
-#       make printall  to print all files
-#       make user_eg   to produce user_eg
-#       make user_eg2  to produce user_eg2
-#       make clean     to remove object files and core
-#       make cleanall  to remove all generated files
-#
-#       PRINTMAN --  command for printing manual pages
-#       PRINTC --  command for printing C files
-#       BINDIR -- directory where to copy executables
-#       MANDIR -- directory where to copy manual pages
-#       CC --     ANSI C or C++ compiler
-#       CCOPTS1 - options used to compile .c files
-#       CCOPTS2 -- options used to link .o files
-#
-#       CFILES -- .c files for printing
-#       HFILES -- .h files for printing
-#       DFILES -- documentation files
-#       MFILES -- man pages and html files
-#       TFILES -- .txt versions of html html files
-#       FILES -- all other files
-#       OBJS -- specifies the object files of libqhull.a
-#
-BINDIR  = /usr/local/bin
-MANDIR  = /usr/local/man/man1
-
-# if you do not have enscript, try a2ps or just use lpr.  The files are text.
-PRINTMAN = enscript -2rl
-PRINTC = enscript -2r
-# PRINTMAN = lpr
-# PRINTC = lpr
-
-#for Gnu's gcc compiler -O2 for optimization, -g for debugging, -Wall for check
-#
-CC     = gcc
-CCOPTS1 = -O2 -ansi 
-
-# for Sun's cc compiler, -fast or O2 for optimization, -g for debugging, -Xc for ANSI
-#CC = cc
-#CCOPTS1 = -Xc -v -fast
-
-# for Silicon Graphics cc compiler, -O2 for optimization, -g for debugging
-#CC = cc
-#CCOPTS1 = -ansi -O2
-
-# for Next cc compiler with fat executable
-#CC = cc
-#CCOPTS1 = -ansi -O2 -arch m68k -arch i386 -arch hppa
-
-# for loader, ld
-CCOPTS2 = $(CCOPTS1)
-
-# OBJS in execution frequency order.  CFILES after qhull.c are alphabetical
-OBJS = user.o global.o stat.o io.o geom2.o poly2.o \
-       merge.o qhull.o geom.o poly.o qset.o mem.o
-
-CFILES= unix.c qhull.c geom.c geom2.c global.c io.c mem.c merge.c poly.c \
-        poly2.c qset.c stat.c user.c qconvex.c qdelaun.c qhalf.c qvoronoi.c
-HFILES= user.h qhull.h qhull_a.h geom.h io.h mem.h merge.h poly.h qset.h stat.h
-TXTFILES= ../Announce.txt ../REGISTER.txt ../COPYING.txt ../README.txt Changes.txt
-DOCFILES= ../html/rbox.txt ../html/qhull.txt
-FILES=  Makefile rbox.c user_eg.c ../eg/q_test ../eg/q_egtest ../eg/q_eg
-HTMFILES= qhull.man rbox.man qh-in.htm qh-optg.htm qh-optt.htm qh-optp.htm \
-        index.htm qh-quick.htm qh-impre.htm qh-eg.htm \
-        qh-optc.htm qh-opto.htm qh-optf.htm qh-optq.htm \
-	    qh-c.htm qh-faq.htm qhull.htm qconvex.htm qdelaun.htm \
-		qh-geom.htm qh-globa.htm qh-io.htm qh-mem.htm qh-merge.htm \
-		qh-poly.htm qh-qhull.htm qh-set.htm qh-stat.htm qh-user.htm \
-		qdelau_f.htm qhalf.htm qvoronoi.htm qvoron_f.htm rbox.htm 
-
-all: rbox qconvex qdelaunay qhalf qvoronoi qhull
-
-unix.o:   qhull.h user.h mem.h
-qconvex.o:   qhull.h user.h mem.h
-qdelaun.o:   qhull.h user.h mem.h
-qhalf.o:   qhull.h user.h mem.h
-qvoronoi.o:   qhull.h user.h mem.h
-qhull.o:  $(HFILES)
-geom.o:   $(HFILES)
-geom2.o:  $(HFILES)
-global.o: $(HFILES)
-io.o:     $(HFILES)
-mem.o:    mem.h 
-merge.o:  $(HFILES)
-poly.o:   $(HFILES)
-poly2.o:  $(HFILES)
-qset.o:   qset.h mem.h 
-stat.o:   $(HFILES)
-user.o:   $(HFILES)
-
-.c.o:
-	$(CC) -c $(CCOPTS1) $<
-
-clean:
-	rm -f *.o ../core qconvex qdelaunay qhalf qvoronoi qhull libqhull.a \
-	    *.exe
-
-cleanall: clean
-	rm -f *~ ../rbox ../qhull ../qhalf ../qconvex ../qdelaunay ../qhalf\
-	   ../qvoronoi ../user_eg ../user_eg2 ../*.exe >/dev/null
-
-doc: 
-	$(PRINTMAN) $(TXTFILES) $(DOCFILES)
-
-install: all 
-	cp ../qconvex $(BINDIR)/qconvex
-	cp ../qdelaunay $(BINDIR)/qdelaunay
-	cp ../qhalf $(BINDIR)/qhalf
-	cp ../qhull $(BINDIR)/qhull
-	cp ../qvoronoi $(BINDIR)/qvoronoi
-	cp ../rbox $(BINDIR)/rbox
-	cp ../html/qhull.man $(MANDIR)/qhull.1
-	cp ../html/rbox.man $(MANDIR)/rbox.1
-
-new:    cleanall all
-
-printall: doc printh printc printf
-
-printh:
-	$(PRINTC) $(HFILES)
-
-printc:
-	$(PRINTC) $(CFILES)
-
-printf:
-	$(PRINTC) $(FILES) 
-
-libqhull.a: $(OBJS)
-	@echo if 'ar' or 'ranlib' fails, try 'make qhullx'
-	ar r libqhull.a $(OBJS)
-	@echo the next line may need to be removed.
-	-test -x /bin/ranlib -o -x /usr/bin/ranlib && ranlib libqhull.a
-
-# don't use ../qconvex.  Does not work on Red Hat Linux
-qconvex: qconvex.o libqhull.a
-	$(CC) -o qconvex $(CCOPTS2) qconvex.o -L. -lqhull -lm 
-	cp qconvex ..
-
-qdelaunay: qdelaun.o libqhull.a
-	$(CC) -o qdelaunay $(CCOPTS2) qdelaun.o -L. -lqhull -lm 
-	cp qdelaunay ..
-
-qhalf: qhalf.o libqhull.a
-	$(CC) -o qhalf $(CCOPTS2) qhalf.o -L. -lqhull -lm 
-	cp qhalf ..
-
-qvoronoi: qvoronoi.o libqhull.a
-	$(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o -L. -lqhull -lm 
-	cp qvoronoi ..
-
-qhull: unix.o libqhull.a
-	$(CC) -o qhull $(CCOPTS2) unix.o -L. -lqhull -lm 
-	cp qhull ..
-	-chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest
-	-cd ..; ./rbox D4 | ./qhull
-
-# compile qhull without using libqhull.a
-qhullx: qconvex.o qdelaun.o qhalf.o qvoronoi.o unix.o $(OBJS)
-	$(CC) -o qconvex $(CCOPTS2) qconvex.o $(OBJS) -lm 
-	$(CC) -o qdelaunay $(CCOPTS2) qdelaun.o $(OBJS) -lm 
-	$(CC) -o qhalf $(CCOPTS2) qhalf.o $(OBJS) -lm 
-	$(CC) -o qvoronoi $(CCOPTS2) qvoronoi.o $(OBJS) -lm 
-	$(CC) -o qhull $(CCOPTS2) unix.o $(OBJS) -lm 
-	cp qconvex qdelaunay qhalf qvoronoi qhull ..
-	-chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest
-	-cd ..; ./rbox D4 | ./qhull
-
-rbox: rbox.o
-	$(CC) -o rbox rbox.o $(CCOPTS2) -lm
-	cp rbox ..
-
-user_eg: user_eg.o libqhull.a 
-	$(CC)  -o user_eg $(CCOPTS2) user_eg.o  -L. -lqhull -lm 
-	cp user_eg ..
-
-user_eg2: user_eg2.o libqhull.a 
-	$(CC)  -o user_eg2 $(CCOPTS2) user_eg2.o  -L. -lqhull -lm 
-	cp user_eg2 ..
-
-# end of Makefile
diff --git a/extern/qhull/src/geom.c b/extern/qhull/src/geom.c
deleted file mode 100644
index ca4bcaf2541..00000000000
--- a/extern/qhull/src/geom.c
+++ /dev/null
@@ -1,1230 +0,0 @@
-/*
  ---------------------------------
-
-   geom.c 
-   geometric routines of qhull
-
-   see qh-geom.htm and geom.h
-
-   copyright (c) 1993-2002 The Geometry Center        
-
-   infrequent code goes into geom2.c
-*/
-   
-#include "qhull_a.h"
-   
-/*---------------------------------
-  
-  qh_distplane( point, facet, dist )
-    return distance from point to facet
-
-  returns:
-    dist
-    if qh.RANDOMdist, joggles result
-  
-  notes:  
-    dist > 0 if point is above facet (i.e., outside)
-    does not error (for sortfacets)
-    
-  see:
-    qh_distnorm in geom2.c
-*/
-void qh_distplane (pointT *point, facetT *facet, realT *dist) {
-  coordT *normal= facet->normal, *coordp, randr;
-  int k;
-  
-  switch(qh hull_dim){
-  case 2:
-    *dist= facet->offset + point[0] * normal[0] + point[1] * normal[1];
-    break;
-  case 3:
-    *dist= facet->offset + point[0] * normal[0] + point[1] * normal[1] + point[2] * normal[2];
-    break;
-  case 4:
-    *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3];
-    break;
-  case 5:
-    *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4];
-    break;
-  case 6:
-    *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4]+point[5]*normal[5];
-    break;
-  case 7:  
-    *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4]+point[5]*normal[5]+point[6]*normal[6];
-    break;
-  case 8:
-    *dist= facet->offset+point[0]*normal[0]+point[1]*normal[1]+point[2]*normal[2]+point[3]*normal[3]+point[4]*normal[4]+point[5]*normal[5]+point[6]*normal[6]+point[7]*normal[7];
-    break;
-  default:
-    *dist= facet->offset;
-    coordp= point;
-    for (k= qh hull_dim; k--; )
-      *dist += *coordp++ * *normal++;
-    break;
-  }
-  zinc_(Zdistplane);
-  if (!qh RANDOMdist && qh IStracing < 4)
-    return;
-  if (qh RANDOMdist) {
-    randr= qh_RANDOMint;
-    *dist += (2.0 * randr / qh_RANDOMmax - 1.0) *
-      qh RANDOMfactor * qh MAXabs_coord;
-  }
-  if (qh IStracing >= 4) {
-    fprintf (qh ferr, "qh_distplane: ");
-    fprintf (qh ferr, qh_REAL_1, *dist);
-    fprintf (qh ferr, "from p%d to f%d\n", qh_pointid(point), facet->id);
-  }
-  return;
-} /* distplane */
-
-
-/*---------------------------------
-  
-  qh_findbest( point, startfacet, bestoutside, qh_ISnewfacets, qh_NOupper, dist, isoutside, numpart )
-    find facet that is furthest below a point 
-    for upperDelaunay facets
-      returns facet only if !qh_NOupper and clearly above
-
-  input:
-    starts search at 'startfacet' (can not be flipped)
-    if !bestoutside (qh_ALL), stops at qh.MINoutside
-
-  returns:
-    best facet (reports error if NULL)
-    early out if isoutside defined and bestdist > qh.MINoutside
-    dist is distance to facet
-    isoutside is true if point is outside of facet
-    numpart counts the number of distance tests
-
-  see also:
-    qh_findbestnew()
-    
-  notes:
-    If merging (testhorizon), searches horizon facets of coplanar best facets because
-    after qh_distplane, this and qh_partitionpoint are the most expensive in 3-d
-      avoid calls to distplane, function calls, and real number operations.
-    caller traces result
-    Optimized for outside points.   Tried recording a search set for qh_findhorizon.
-    Made code more complicated.
-
-  when called by qh_partitionvisible():
-    indicated by qh_ISnewfacets
-    qh.newfacet_list is list of simplicial, new facets
-    qh_findbestnew set if qh_sharpnewfacets returns True (to use qh_findbestnew)
-    qh.bestfacet_notsharp set if qh_sharpnewfacets returns False
-
-  when called by qh_findfacet(), qh_partitionpoint(), qh_partitioncoplanar(), 
-                 qh_check_bestdist(), qh_addpoint()
-    indicated by !qh_ISnewfacets
-    returns best facet in neighborhood of given facet
-      this is best facet overall if dist > -   qh.MAXcoplanar 
-        or hull has at least a "spherical" curvature
-
-  design:
-    initialize and test for early exit
-    repeat while there are better facets
-      for each neighbor of facet
-        exit if outside facet found
-	test for better facet
-    if point is inside and partitioning
-      test for new facets with a "sharp" intersection
-      if so, future calls go to qh_findbestnew()
-    test horizon facets
-*/
-facetT *qh_findbest (pointT *point, facetT *startfacet, 
-		     boolT bestoutside, boolT isnewfacets, boolT noupper,
-		     realT *dist, boolT *isoutside, int *numpart) {
-  realT bestdist= -REALmax/2 /* avoid underflow */;
-  facetT *facet, *neighbor, **neighborp, *bestfacet= NULL;
- /* facetT *bestfacet_all= startfacet; */
-  int oldtrace= qh IStracing;
-  unsigned int visitid= ++qh visit_id;
-  int numpartnew=0;
-  boolT testhorizon = True; /* needed if precise, e.g., rbox c D6 | qhull Q0 Tv */
-
-  zinc_(Zfindbest);
-  if (qh IStracing >= 3 || (qh TRACElevel && qh TRACEpoint >= 0 && qh TRACEpoint == qh_pointid (point))) {
-    if (qh TRACElevel > qh IStracing)
-      qh IStracing= qh TRACElevel;
-    fprintf (qh ferr, "qh_findbest: point p%d starting at f%d isnewfacets? %d, unless %d exit if > %2.2g\n",
-	     qh_pointid(point), startfacet->id, isnewfacets, bestoutside, qh MINoutside);
-    fprintf(qh ferr, "  testhorizon? %d noupper? %d", testhorizon, noupper);
-    fprintf (qh ferr, "  Last point added was p%d.", qh furthest_id);
-    fprintf(qh ferr, "  Last merge was #%d.  max_outside %2.2g\n", zzval_(Ztotmerge), qh max_outside);
-  }
-  if (isoutside)
-    *isoutside= True;
-  if (!startfacet->flipped) {  /* test startfacet */
-    *numpart= 1;
-    qh_distplane (point, startfacet, dist);  /* this code is duplicated below */
-    if (!bestoutside && *dist >= qh MINoutside 
-    && (!startfacet->upperdelaunay || !noupper)) {
-      bestfacet= startfacet;
-      goto LABELreturn_best;
-    }
-    bestdist= *dist;
-    if (!startfacet->upperdelaunay) {
-      bestfacet= startfacet;
-    } 
-  }else 
-    *numpart= 0;
-  startfacet->visitid= visitid;
-  facet= startfacet;
-  while (facet) {
-    trace4((qh ferr, "qh_findbest: neighbors of f%d, bestdist %2.2g f%d\n", 
-                facet->id, bestdist, getid_(bestfacet)));
-    FOREACHneighbor_(facet) {
-      if (!neighbor->newfacet && isnewfacets)
-        continue;
-      if (neighbor->visitid == visitid)
-	continue;
-      neighbor->visitid= visitid;
-      if (!neighbor->flipped) {  /* code duplicated above */
-	(*numpart)++;
-	qh_distplane (point, neighbor, dist);
-	if (*dist > bestdist) {
-	  if (!bestoutside && *dist >= qh MINoutside 
-	  && (!neighbor->upperdelaunay || !noupper)) {
-	    bestfacet= neighbor;
-	    goto LABELreturn_best;
-	  }
-	  if (!neighbor->upperdelaunay) {
-	    bestfacet= neighbor;
-	    bestdist= *dist;
-	  }
-	  break; /* switch to neighor */
-	} /* end of *dist>bestdist */
-      } /* end of !flipped */
-    } /* end of FOREACHneighbor */
-    facet= neighbor;  /* non-NULL only if *dist>bestdist */
-  } /* end of while facet (directed search) */
-  if (isnewfacets) { 
-    if (!bestfacet) {
-      bestdist= -REALmax/2; 
-      bestfacet= qh_findbestnew (point, startfacet->next, &bestdist, bestoutside, isoutside, &numpartnew);
-      testhorizon= False; /* qh_findbestnew calls qh_findbesthorizon */
-    }else if (!qh findbest_notsharp && bestdist < - qh DISTround) {
-      if (qh_sharpnewfacets()) { 
-	/* seldom used, qh_findbestnew will retest all facets */
-	zinc_(Zfindnewsharp);
-	bestfacet= qh_findbestnew (point, bestfacet, &bestdist, bestoutside, isoutside, &numpartnew);
-	testhorizon= False; /* qh_findbestnew calls qh_findbesthorizon */
-	qh findbestnew= True;
-      }else
-	qh findbest_notsharp= True;
-    }
-  }
-  if (!bestfacet) {
-    fprintf(qh ferr, "\n\
-qh_findbest: all neighbors of facet %d are flipped or upper Delaunay.\n\
-Please report this error to qhull_bug@geom.umn.edu with the input and all of the output.\n",
-       startfacet->id);
-    qh_errexit (qh_ERRqhull, startfacet, NULL);
-  }
-  if (testhorizon) 
-    bestfacet= qh_findbesthorizon (!qh_IScheckmax, point, bestfacet, noupper, &bestdist, &numpartnew);
-  *dist= bestdist;
-  if (isoutside && bestdist < qh MINoutside)
-    *isoutside= False;
-LABELreturn_best:
-  zadd_(Zfindbesttot, *numpart);
-  zmax_(Zfindbestmax, *numpart);
-  (*numpart) += numpartnew;
-  qh IStracing= oldtrace;
-  return bestfacet;
-}  /* findbest */
-
-
-/*---------------------------------
-  
-  qh_findbesthorizon( qh_IScheckmax, point, startfacet, qh_NOupper, &bestdist, &numpart )
-    search coplanar and better horizon facets from startfacet/bestdist
-    ischeckmax turns off statistics and minsearch update
-    all arguments must be initialized
-  returns (ischeckmax):
-    best facet
-  returns (!ischeckmax):
-    best facet that is not upperdelaunay
-    allows upperdelaunay that is clearly outside
-  returns:
-    bestdist is distance to bestfacet
-    numpart -- updates number of distance tests
-
-  notes:
-    no early out -- use qh_findbest() or qh_findbestnew()
-    Searches coplanar or better horizon facets
-
-  when called by qh_check_maxout() (qh_IScheckmax)
-    startfacet must be closest to the point
-      Otherwise, if point is beyond and below startfacet, startfacet may be a local minimum
-      even though other facets are below the point.
-    updates facet->maxoutside for good, visited facets
-    may return NULL
-
-    searchdist is qh.max_outside + 2 * DISTround
-      + max( MINvisible('Vn'), MAXcoplanar('Un'));
-    This setting is a guess.  It must be at least max_outside + 2*DISTround 
-    because a facet may have a geometric neighbor across a vertex
-
-  design:
-    for each horizon facet of coplanar best facets
-      continue if clearly inside
-      unless upperdelaunay or clearly outside
-         update best facet
-*/
-facetT *qh_findbesthorizon (boolT ischeckmax, pointT* point, facetT *startfacet, boolT noupper, realT *bestdist, int *numpart) {
-  facetT *bestfacet= startfacet;
-  realT dist;
-  facetT *neighbor, **neighborp, *facet;
-  facetT *nextfacet= NULL; /* optimize last facet of coplanarset */
-  int numpartinit= *numpart, coplanarset_size;
-  unsigned int visitid= ++qh visit_id;
-  boolT newbest= False; /* for tracing */
-  realT minsearch, searchdist;  /* skip facets that are too far from point */
-
-  if (!ischeckmax) {
-    zinc_(Zfindhorizon);
-  }else {
-#if qh_MAXoutside
-    if ((!qh ONLYgood || startfacet->good) && *bestdist > startfacet->maxoutside)
-      startfacet->maxoutside= *bestdist;
-#endif
-  }
-  searchdist= qh_SEARCHdist; /* multiple of qh.max_outside and precision constants */
-  minsearch= *bestdist - searchdist;
-  if (ischeckmax) {
-    /* Always check coplanar facets.  Needed for RBOX 1000 s Z1 G1e-13 t996564279 | QHULL Tv */
-    minimize_(minsearch, -searchdist);
-  }
-  coplanarset_size= 0;
-  facet= startfacet;
-  while (True) {
-    trace4((qh ferr, "qh_findbesthorizon: neighbors of f%d bestdist %2.2g f%d ischeckmax? %d noupper? %d minsearch %2.2g searchdist %2.2g\n", 
-		facet->id, *bestdist, getid_(bestfacet), ischeckmax, noupper,
-		minsearch, searchdist));
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid == visitid) 
-	continue;
-      neighbor->visitid= visitid;
-      if (!neighbor->flipped) { 
-	qh_distplane (point, neighbor, &dist);
-	(*numpart)++;
-	if (dist > *bestdist) {
-	  if (!neighbor->upperdelaunay || ischeckmax || (!noupper && dist >= qh MINoutside)) {
-	    bestfacet= neighbor;
-	    *bestdist= dist;
-	    newbest= True;
-	    if (!ischeckmax) {
-	      minsearch= dist - searchdist;
-	      if (dist > *bestdist + searchdist) {
-		zinc_(Zfindjump);  /* everything in qh.coplanarset at least searchdist below */
-		coplanarset_size= 0;
-	      }
-	    }
-	  }
-	}else if (dist < minsearch) 
-	  continue;  /* if ischeckmax, dist can't be positive */
-#if qh_MAXoutside
-	if (ischeckmax && dist > neighbor->maxoutside)
-	  neighbor->maxoutside= dist;
-#endif      
-      } /* end of !flipped */
-      if (nextfacet) {
-	if (!coplanarset_size++) {
-	  SETfirst_(qh coplanarset)= nextfacet;
-	  SETtruncate_(qh coplanarset, 1);
-	}else
-  	  qh_setappend (&qh coplanarset, nextfacet); /* Was needed for RBOX 1000 s W1e-13 P0 t996547055 | QHULL d Qbb Qc Tv
-						 and RBOX 1000 s Z1 G1e-13 t996564279 | qhull Tv  */
-      }
-      nextfacet= neighbor;
-    } /* end of EACHneighbor */
-    facet= nextfacet;
-    if (facet) 
-      nextfacet= NULL;
-    else if (!coplanarset_size)
-      break; 
-    else if (!--coplanarset_size) {
-      facet= SETfirst_(qh coplanarset);
-      SETtruncate_(qh coplanarset, 0);
-    }else
-      facet= (facetT*)qh_setdellast (qh coplanarset);
-  } /* while True, for each facet in qh.coplanarset */
-  if (!ischeckmax) {
-    zadd_(Zfindhorizontot, *numpart - numpartinit);
-    zmax_(Zfindhorizonmax, *numpart - numpartinit);
-    if (newbest)
-      zinc_(Zparthorizon);
-  }
-  trace4((qh ferr, "qh_findbesthorizon: newbest? %d bestfacet f%d bestdist %2.2g\n", newbest, getid_(bestfacet), *bestdist));
-  return bestfacet;
-}  /* findbesthorizon */
-
-/*---------------------------------
-  
-  qh_findbestnew( point, startfacet, dist, isoutside, numpart )
-    find best newfacet for point
-    searches all of qh.newfacet_list starting at startfacet
-    searches horizon facets of coplanar best newfacets
-    searches all facets if startfacet == qh.facet_list
-  returns:
-    best new or horizon facet that is not upperdelaunay
-    early out if isoutside and not 'Qf'
-    dist is distance to facet
-    isoutside is true if point is outside of facet
-    numpart is number of distance tests
-
-  notes:
-    Always used for merged new facets (see qh_USEfindbestnew)
-    Avoids upperdelaunay facet unless (isoutside and outside)
-
-    Uses qh.visit_id, qh.coplanarset.  
-    If share visit_id with qh_findbest, coplanarset is incorrect.
-
-    If merging (testhorizon), searches horizon facets of coplanar best facets because
-    a point maybe coplanar to the bestfacet, below its horizon facet,
-    and above a horizon facet of a coplanar newfacet.  For example,
-      rbox 1000 s Z1 G1e-13 | qhull
-      rbox 1000 s W1e-13 P0 t992110337 | QHULL d Qbb Qc
-
-    qh_findbestnew() used if
-       qh_sharpnewfacets -- newfacets contains a sharp angle
-       if many merges, qh_premerge found a merge, or 'Qf' (qh.findbestnew)
-
-  see also:
-    qh_partitionall() and qh_findbest()
-
-  design:
-    for each new facet starting from startfacet
-      test distance from point to facet
-      return facet if clearly outside
-      unless upperdelaunay and a lowerdelaunay exists
-         update best facet
-    test horizon facets
-*/
-facetT *qh_findbestnew (pointT *point, facetT *startfacet,
-	   realT *dist, boolT bestoutside, boolT *isoutside, int *numpart) {
-  realT bestdist= -REALmax/2; /*, minsearch= -REALmax/2;*/
-  facetT *bestfacet= NULL, *facet;
-  int oldtrace= qh IStracing, i;
-  unsigned int visitid= ++qh visit_id;
-  realT distoutside= 0.0;
-  boolT isdistoutside; /* True if distoutside is defined */
-  boolT testhorizon = True; /* needed if precise, e.g., rbox c D6 | qhull Q0 Tv */
-
-  if (!startfacet) {
-    if (qh MERGING)
-      fprintf(qh ferr, "qhull precision error (qh_findbestnew): merging has formed and deleted a cone of new facets.  Can not continue.\n");
-    else
-      fprintf(qh ferr, "qhull internal error (qh_findbestnew): no new facets for point p%d\n",
-      	      qh furthest_id);      
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  zinc_(Zfindnew);
-  if (qh BESToutside || bestoutside)
-    isdistoutside= False;
-  else {
-    isdistoutside= True;
-    distoutside= qh_DISToutside; /* multiple of qh.MINoutside & qh.max_outside, see user.h */
-  }
-  if (isoutside)
-    *isoutside= True;
-  *numpart= 0;
-  if (qh IStracing >= 3 || (qh TRACElevel && qh TRACEpoint >= 0 && qh TRACEpoint == qh_pointid (point))) {
-    if (qh TRACElevel > qh IStracing)
-      qh IStracing= qh TRACElevel;
-    fprintf(qh ferr, "qh_findbestnew: point p%d facet f%d. Stop? %d if dist > %2.2g\n",
-	     qh_pointid(point), startfacet->id, isdistoutside, distoutside);
-    fprintf(qh ferr, "  Last point added p%d visitid %d.",  qh furthest_id, visitid);
-    fprintf(qh ferr, "  Last merge was #%d.\n", zzval_(Ztotmerge));
-  }
-  /* visit all new facets starting with startfacet, maybe qh facet_list */
-  for (i= 0, facet= startfacet; i < 2; i++, facet= qh newfacet_list) {
-    FORALLfacet_(facet) {
-      if (facet == startfacet && i)
-	break;
-      facet->visitid= visitid;
-      if (!facet->flipped) {
-	qh_distplane (point, facet, dist);
-	(*numpart)++;
-	if (*dist > bestdist) {
-	  if (!facet->upperdelaunay || *dist >= qh MINoutside) {
-	    bestfacet= facet;
-	    if (isdistoutside && *dist >= distoutside)
-	      goto LABELreturn_bestnew;
-	    bestdist= *dist;
-  	  }
-	}
-      } /* end of !flipped */
-    } /* FORALLfacet from startfacet or qh newfacet_list */
-  }
-  if (testhorizon || !bestfacet)
-    bestfacet= qh_findbesthorizon (!qh_IScheckmax, point, bestfacet ? bestfacet : startfacet, 
-	                                !qh_NOupper, &bestdist, numpart);  
-  *dist= bestdist;
-  if (isoutside && *dist < qh MINoutside)
-    *isoutside= False;
-LABELreturn_bestnew:
-  zadd_(Zfindnewtot, *numpart);
-  zmax_(Zfindnewmax, *numpart);
-  trace4((qh ferr, "qh_findbestnew: bestfacet f%d bestdist %2.2g\n", getid_(bestfacet), *dist));
-  qh IStracing= oldtrace;
-  return bestfacet;
-}  /* findbestnew */
-
-/* ============ hyperplane functions -- keep code together [?] ============ */
-
-/*---------------------------------
-  
-  qh_backnormal( rows, numrow, numcol, sign, normal, nearzero )
-    given an upper-triangular rows array and a sign,
-    solve for normal equation x using back substitution over rows U
-
-  returns:
-     normal= x
-      
-     if will not be able to divzero() when normalized (qh.MINdenom_2 and qh.MINdenom_1_2),
-       if fails on last row
-         this means that the hyperplane intersects [0,..,1]
-         sets last coordinate of normal to sign
-       otherwise
-         sets tail of normal to [...,sign,0,...], i.e., solves for b= [0...0]
-         sets nearzero
-
-  notes:
-     assumes numrow == numcol-1
-
-     see Golub & van Loan 4.4-9 for back substitution
-
-     solves Ux=b where Ax=b and PA=LU
-     b= [0,...,0,sign or 0]  (sign is either -1 or +1)
-     last row of A= [0,...,0,1]
-
-     1) Ly=Pb == y=b since P only permutes the 0's of   b
-     
-  design:
-    for each row from end
-      perform back substitution
-      if near zero
-        use qh_divzero for division
-        if zero divide and not last row
-          set tail of normal to 0
-*/
-void qh_backnormal (realT **rows, int numrow, int numcol, boolT sign,
-  	coordT *normal, boolT *nearzero) {
-  int i, j;
-  coordT *normalp, *normal_tail, *ai, *ak;
-  realT diagonal;
-  boolT waszero;
-  int zerocol= -1;
-  
-  normalp= normal + numcol - 1;
-  *normalp--= (sign ? -1.0 : 1.0);
-  for(i= numrow; i--; ) {
-    *normalp= 0.0;
-    ai= rows[i] + i + 1;
-    ak= normalp+1;
-    for(j= i+1; j < numcol; j++)
-      *normalp -= *ai++ * *ak++;
-    diagonal= (rows[i])[i];
-    if (fabs_(diagonal) > qh MINdenom_2)
-      *(normalp--) /= diagonal;
-    else {
-      waszero= False;
-      *normalp= qh_divzero (*normalp, diagonal, qh MINdenom_1_2, &waszero);
-      if (waszero) {
-        zerocol= i;
-	*(normalp--)= (sign ? -1.0 : 1.0);
-	for (normal_tail= normalp+2; normal_tail < normal + numcol; normal_tail++)
-	  *normal_tail= 0.0;
-      }else
-	normalp--;
-    }
-  }
-  if (zerocol != -1) {
-    zzinc_(Zback0);
-    *nearzero= True;
-    trace4((qh ferr, "qh_backnormal: zero diagonal at column %d.\n", i));
-    qh_precision ("zero diagonal on back substitution");
-  }
-} /* backnormal */
-
-/*---------------------------------
-  
-  qh_gausselim( rows, numrow, numcol, sign )
-    Gaussian elimination with partial pivoting
-
-  returns:
-    rows is upper triangular (includes row exchanges)
-    flips sign for each row exchange
-    sets nearzero if pivot[k] < qh.NEARzero[k], else clears it
-
-  notes:
-    if nearzero, the determinant's sign may be incorrect.
-    assumes numrow <= numcol
-
-  design:
-    for each row
-      determine pivot and exchange rows if necessary
-      test for near zero
-      perform gaussian elimination step
-*/
-void qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero) {
-  realT *ai, *ak, *rowp, *pivotrow;
-  realT n, pivot, pivot_abs= 0.0, temp;
-  int i, j, k, pivoti, flip=0;
-  
-  *nearzero= False;
-  for(k= 0; k < numrow; k++) {
-    pivot_abs= fabs_((rows[k])[k]);
-    pivoti= k;
-    for(i= k+1; i < numrow; i++) {
-      if ((temp= fabs_((rows[i])[k])) > pivot_abs) {
-	pivot_abs= temp;
-	pivoti= i;
-      }
-    }
-    if (pivoti != k) {
-      rowp= rows[pivoti]; 
-      rows[pivoti]= rows[k]; 
-      rows[k]= rowp; 
-      *sign ^= 1;
-      flip ^= 1;
-    }
-    if (pivot_abs <= qh NEARzero[k]) {
-      *nearzero= True;
-      if (pivot_abs == 0.0) {   /* remainder of column == 0 */
-	if (qh IStracing >= 4) {
-	  fprintf (qh ferr, "qh_gausselim: 0 pivot at column %d. (%2.2g < %2.2g)\n", k, pivot_abs, qh DISTround);
-	  qh_printmatrix (qh ferr, "Matrix:", rows, numrow, numcol);
-	}
-	zzinc_(Zgauss0);
-        qh_precision ("zero pivot for Gaussian elimination");
-	goto LABELnextcol;
-      }
-    }
-    pivotrow= rows[k] + k;
-    pivot= *pivotrow++;  /* signed value of pivot, and remainder of row */
-    for(i= k+1; i < numrow; i++) {
-      ai= rows[i] + k;
-      ak= pivotrow;
-      n= (*ai++)/pivot;   /* divzero() not needed since |pivot| >= |*ai| */
-      for(j= numcol - (k+1); j--; )
-	*ai++ -= n * *ak++;
-    }
-  LABELnextcol:
-    ;
-  }
-  wmin_(Wmindenom, pivot_abs);  /* last pivot element */
-  if (qh IStracing >= 5)
-    qh_printmatrix (qh ferr, "qh_gausselem: result", rows, numrow, numcol);
-} /* gausselim */
-
-
-/*---------------------------------
-  
-  qh_getangle( vect1, vect2 )
-    returns the dot product of two vectors
-    if qh.RANDOMdist, joggles result
-
-  notes:
-    the angle may be > 1.0 or < -1.0 because of roundoff errors
-
-*/
-realT qh_getangle(pointT *vect1, pointT *vect2) {
-  realT angle= 0, randr;
-  int k;
-
-  for(k= qh hull_dim; k--; )
-    angle += *vect1++ * *vect2++;
-  if (qh RANDOMdist) {
-    randr= qh_RANDOMint;
-    angle += (2.0 * randr / qh_RANDOMmax - 1.0) *
-      qh RANDOMfactor;
-  }
-  trace4((qh ferr, "qh_getangle: %2.2g\n", angle));
-  return(angle);
-} /* getangle */
-
-
-/*---------------------------------
-  
-  qh_getcenter( vertices )
-    returns arithmetic center of a set of vertices as a new point
-
-  notes:
-    allocates point array for center
-*/
-pointT *qh_getcenter(setT *vertices) {
-  int k;
-  pointT *center, *coord;
-  vertexT *vertex, **vertexp;
-  int count= qh_setsize(vertices);
-
-  if (count < 2) {
-    fprintf (qh ferr, "qhull internal error (qh_getcenter): not defined for %d points\n", count);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  center= (pointT *)qh_memalloc(qh normal_size);
-  for (k=0; k < qh hull_dim; k++) {
-    coord= center+k;
-    *coord= 0.0;
-    FOREACHvertex_(vertices)
-      *coord += vertex->point[k];
-    *coord /= count;
-  }
-  return(center);
-} /* getcenter */
-
-
-/*---------------------------------
-  
-  qh_getcentrum( facet )
-    returns the centrum for a facet as a new point
-
-  notes:
-    allocates the centrum
-*/
-pointT *qh_getcentrum(facetT *facet) {
-  realT dist;
-  pointT *centrum, *point;
-
-  point= qh_getcenter(facet->vertices);
-  zzinc_(Zcentrumtests);
-  qh_distplane (point, facet, &dist);
-  centrum= qh_projectpoint(point, facet, dist);
-  qh_memfree(point, qh normal_size);
-  trace4((qh ferr, "qh_getcentrum: for f%d, %d vertices dist= %2.2g\n",
-	  facet->id, qh_setsize(facet->vertices), dist));
-  return centrum;
-} /* getcentrum */
-
-
-/*---------------------------------
-  
-  qh_getdistance( facet, neighbor, mindist, maxdist )
-    returns the maxdist and mindist distance of any vertex from neighbor
-
-  returns:
-    the max absolute value
-
-  design:
-    for each vertex of facet that is not in neighbor
-      test the distance from vertex to neighbor
-*/
-realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist) {
-  vertexT *vertex, **vertexp;
-  realT dist, maxd, mind;
-  
-  FOREACHvertex_(facet->vertices)
-    vertex->seen= False;
-  FOREACHvertex_(neighbor->vertices)
-    vertex->seen= True;
-  mind= 0.0;
-  maxd= 0.0;
-  FOREACHvertex_(facet->vertices) {
-    if (!vertex->seen) {
-      zzinc_(Zbestdist);
-      qh_distplane(vertex->point, neighbor, &dist);
-      if (dist < mind)
-	mind= dist;
-      else if (dist > maxd)
-	maxd= dist;
-    }
-  }
-  *mindist= mind;
-  *maxdist= maxd;
-  mind= -mind;
-  if (maxd > mind)
-    return maxd;
-  else
-    return mind;
-} /* getdistance */
-
-
-/*---------------------------------
-
-  qh_normalize( normal, dim, toporient )
-    normalize a vector and report if too small
-    does not use min norm
-  
-  see:
-    qh_normalize2
-*/
-void qh_normalize (coordT *normal, int dim, boolT toporient) {
-  qh_normalize2( normal, dim, toporient, NULL, NULL);
-} /* normalize */
-
-/*---------------------------------
-  
-  qh_normalize2( normal, dim, toporient, minnorm, ismin )
-    normalize a vector and report if too small
-    qh.MINdenom/MINdenom1 are the upper limits for divide overflow
-
-  returns:
-    normalized vector
-    flips sign if !toporient
-    if minnorm non-NULL, 
-      sets ismin if normal < minnorm
-
-  notes:
-    if zero norm
-       sets all elements to sqrt(1.0/dim)
-    if divide by zero (divzero ())
-       sets largest element to   +/-1
-       bumps Znearlysingular
-      
-  design:
-    computes norm
-    test for minnorm
-    if not near zero
-      normalizes normal
-    else if zero norm
-      sets normal to standard value
-    else
-      uses qh_divzero to normalize
-      if nearzero
-        sets norm to direction of maximum value
-*/
-void qh_normalize2 (coordT *normal, int dim, boolT toporient, 
-            realT *minnorm, boolT *ismin) {
-  int k;
-  realT *colp, *maxp, norm= 0, temp, *norm1, *norm2, *norm3;
-  boolT zerodiv;
-
-  norm1= normal+1;
-  norm2= normal+2;
-  norm3= normal+3;
-  if (dim == 2)
-    norm= sqrt((*normal)*(*normal) + (*norm1)*(*norm1));
-  else if (dim == 3)
-    norm= sqrt((*normal)*(*normal) + (*norm1)*(*norm1) + (*norm2)*(*norm2));
-  else if (dim == 4) {
-    norm= sqrt((*normal)*(*normal) + (*norm1)*(*norm1) + (*norm2)*(*norm2) 
-               + (*norm3)*(*norm3));
-  }else if (dim > 4) {
-    norm= (*normal)*(*normal) + (*norm1)*(*norm1) + (*norm2)*(*norm2) 
-               + (*norm3)*(*norm3);
-    for (k= dim-4, colp= normal+4; k--; colp++)
-      norm += (*colp) * (*colp);
-    norm= sqrt(norm);
-  }
-  if (minnorm) {
-    if (norm < *minnorm) 
-      *ismin= True;
-    else
-      *ismin= False;
-  }
-  wmin_(Wmindenom, norm);
-  if (norm > qh MINdenom) {
-    if (!toporient)
-      norm= -norm;
-    *normal /= norm;
-    *norm1 /= norm;
-    if (dim == 2)
-      ; /* all done */
-    else if (dim == 3)
-      *norm2 /= norm;
-    else if (dim == 4) {
-      *norm2 /= norm;
-      *norm3 /= norm;
-    }else if (dim >4) {
-      *norm2 /= norm;
-      *norm3 /= norm;
-      for (k= dim-4, colp= normal+4; k--; )
-        *colp++ /= norm;
-    }
-  }else if (norm == 0.0) {
-    temp= sqrt (1.0/dim);
-    for (k= dim, colp= normal; k--; )
-      *colp++ = temp;
-  }else {
-    if (!toporient)
-      norm= -norm;
-    for (k= dim, colp= normal; k--; colp++) { /* k used below */
-      temp= qh_divzero (*colp, norm, qh MINdenom_1, &zerodiv);
-      if (!zerodiv)
-	*colp= temp;
-      else {
-	maxp= qh_maxabsval(normal, dim);
-	temp= ((*maxp * norm >= 0.0) ? 1.0 : -1.0);
-	for (k= dim, colp= normal; k--; colp++)
-	  *colp= 0.0;
-	*maxp= temp;
-	zzinc_(Znearlysingular);
-	trace0((qh ferr, "qh_normalize: norm=%2.2g too small during p%d\n", 
-	       norm, qh furthest_id));
-	return;
-      }
-    }
-  }
-} /* normalize */
-
-
-/*---------------------------------
-  
-  qh_projectpoint( point, facet, dist )
-    project point onto a facet by dist
-
-  returns:
-    returns a new point
-    
-  notes:
-    if dist= distplane(point,facet)
-      this projects point to hyperplane
-    assumes qh_memfree_() is valid for normal_size
-*/
-pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist) {
-  pointT *newpoint, *np, *normal;
-  int normsize= qh normal_size,k;
-  void **freelistp; /* used !qh_NOmem */
-  
-  qh_memalloc_(normsize, freelistp, newpoint, pointT);
-  np= newpoint;
-  normal= facet->normal;
-  for(k= qh hull_dim; k--; )
-    *(np++)= *point++ - dist * *normal++;
-  return(newpoint);
-} /* projectpoint */
-
-  
-/*---------------------------------
-  
-  qh_setfacetplane( facet )
-    sets the hyperplane for a facet
-    if qh.RANDOMdist, joggles hyperplane
-
-  notes:
-    uses global buffers qh.gm_matrix and qh.gm_row
-    overwrites facet->normal if already defined
-    updates Wnewvertex if PRINTstatistics
-    sets facet->upperdelaunay if upper envelope of Delaunay triangulation
-
-  design:
-    copy vertex coordinates to qh.gm_matrix/gm_row
-    compute determinate
-    if nearzero
-      recompute determinate with gaussian elimination
-      if nearzero
-        force outside orientation by testing interior point
-*/
-void qh_setfacetplane(facetT *facet) {
-  pointT *point;
-  vertexT *vertex, **vertexp;
-  int k,i, normsize= qh normal_size, oldtrace= 0;
-  realT dist;
-  void **freelistp; /* used !qh_NOmem */
-  coordT *coord, *gmcoord;
-  pointT *point0= SETfirstt_(facet->vertices, vertexT)->point;
-  boolT nearzero= False;
-
-  zzinc_(Zsetplane);
-  if (!facet->normal)
-    qh_memalloc_(normsize, freelistp, facet->normal, coordT);
-  if (facet == qh tracefacet) {
-    oldtrace= qh IStracing;
-    qh IStracing= 5;
-    fprintf (qh ferr, "qh_setfacetplane: facet f%d created.\n", facet->id);
-    fprintf (qh ferr, "  Last point added to hull was p%d.", qh furthest_id);
-    if (zzval_(Ztotmerge))
-      fprintf(qh ferr, "  Last merge was #%d.", zzval_(Ztotmerge));
-    fprintf (qh ferr, "\n\nCurrent summary is:\n");
-      qh_printsummary (qh ferr);
-  }
-  if (qh hull_dim <= 4) {
-    i= 0;
-    if (qh RANDOMdist) {
-      gmcoord= qh gm_matrix;
-      FOREACHvertex_(facet->vertices) {
-        qh gm_row[i++]= gmcoord;
-	coord= vertex->point;
-	for (k= qh hull_dim; k--; )
-	  *(gmcoord++)= *coord++ * qh_randomfactor();
-      }	  
-    }else {
-      FOREACHvertex_(facet->vertices)
-       qh gm_row[i++]= vertex->point;
-    }
-    qh_sethyperplane_det(qh hull_dim, qh gm_row, point0, facet->toporient,
-                facet->normal, &facet->offset, &nearzero);
-  }
-  if (qh hull_dim > 4 || nearzero) {
-    i= 0;
-    gmcoord= qh gm_matrix;
-    FOREACHvertex_(facet->vertices) {
-      if (vertex->point != point0) {
-	qh gm_row[i++]= gmcoord;
-	coord= vertex->point;
-	point= point0;
-	for(k= qh hull_dim; k--; )
-	  *(gmcoord++)= *coord++ - *point++;
-      }
-    }
-    qh gm_row[i]= gmcoord;  /* for areasimplex */
-    if (qh RANDOMdist) {
-      gmcoord= qh gm_matrix;
-      for (i= qh hull_dim-1; i--; ) {
-	for (k= qh hull_dim; k--; )
-	  *(gmcoord++) *= qh_randomfactor();
-      }
-    }
-    qh_sethyperplane_gauss(qh hull_dim, qh gm_row, point0, facet->toporient,
-           	facet->normal, &facet->offset, &nearzero);
-    if (nearzero) { 
-      if (qh_orientoutside (facet)) {
-	trace0((qh ferr, "qh_setfacetplane: flipped orientation after testing interior_point during p%d\n", qh furthest_id));
-      /* this is part of using Gaussian Elimination.  For example in 5-d
-	   1 1 1 1 0
-	   1 1 1 1 1
-	   0 0 0 1 0
-	   0 1 0 0 0
-	   1 0 0 0 0
-	   norm= 0.38 0.38 -0.76 0.38 0
-	 has a determinate of 1, but g.e. after subtracting pt. 0 has
-	 0's in the diagonal, even with full pivoting.  It does work
-	 if you subtract pt. 4 instead. */
-      }
-    }
-  }
-  facet->upperdelaunay= False;
-  if (qh DELAUNAY) {
-    if (qh UPPERdelaunay) {     /* matches qh_triangulate_facet and qh.lower_threshold in qh_initbuild */
-      if (facet->normal[qh hull_dim -1] >= qh ANGLEround * qh_ZEROdelaunay)
-        facet->upperdelaunay= True;
-    }else {
-      if (facet->normal[qh hull_dim -1] > -qh ANGLEround * qh_ZEROdelaunay)
-        facet->upperdelaunay= True;
-    }
-  }
-  if (qh PRINTstatistics || qh IStracing || qh TRACElevel || qh JOGGLEmax < REALmax) {
-    qh old_randomdist= qh RANDOMdist;
-    qh RANDOMdist= False;
-    FOREACHvertex_(facet->vertices) {
-      if (vertex->point != point0) {
-	boolT istrace= False;
-	zinc_(Zdiststat);
-        qh_distplane(vertex->point, facet, &dist);
-        dist= fabs_(dist);
-        zinc_(Znewvertex);
-        wadd_(Wnewvertex, dist);
-        if (dist > wwval_(Wnewvertexmax)) {
-          wwval_(Wnewvertexmax)= dist;
-	  if (dist > qh max_outside) {
-	    qh max_outside= dist;  /* used by qh_maxouter() */
-	    if (dist > qh TRACEdist) 
-	      istrace= True;
-	  }
-	}else if (-dist > qh TRACEdist)
-	  istrace= True;
-	if (istrace) {
-	  fprintf (qh ferr, "qh_setfacetplane: ====== vertex p%d (v%d) increases max_outside to %2.2g for new facet f%d last p%d\n",
-	        qh_pointid(vertex->point), vertex->id, dist, facet->id, qh furthest_id);
-	  qh_errprint ("DISTANT", facet, NULL, NULL, NULL);
-	}
-      }
-    }
-    qh RANDOMdist= qh old_randomdist;
-  }
-  if (qh IStracing >= 3) {
-    fprintf (qh ferr, "qh_setfacetplane: f%d offset %2.2g normal: ",
-	     facet->id, facet->offset);
-    for (k=0; k < qh hull_dim; k++)
-      fprintf (qh ferr, "%2.2g ", facet->normal[k]);
-    fprintf (qh ferr, "\n");
-  }
-  if (facet == qh tracefacet)
-    qh IStracing= oldtrace;
-} /* setfacetplane */
-
-
-/*---------------------------------
-  
-  qh_sethyperplane_det( dim, rows, point0, toporient, normal, offset, nearzero )
-    given dim X dim array indexed by rows[], one row per point, 
-        toporient (flips all signs),
-        and point0 (any row)
-    set normalized hyperplane equation from oriented simplex
-
-  returns:
-    normal (normalized)
-    offset (places point0 on the hyperplane)
-    sets nearzero if hyperplane not through points
-
-  notes:
-    only defined for dim == 2..4
-    rows[] is not modified
-    solves det(P-V_0, V_n-V_0, ..., V_1-V_0)=0, i.e. every point is on hyperplane
-    see Bower & Woodworth, A programmer's geometry, Butterworths 1983.
-
-  derivation of 3-d minnorm
-    Goal: all vertices V_i within qh.one_merge of hyperplane
-    Plan: exactly translate the facet so that V_0 is the origin
-          exactly rotate the facet so that V_1 is on the x-axis and y_2=0.
-          exactly rotate the effective perturbation to only effect n_0
-	     this introduces a factor of sqrt(3)
-    n_0 = ((y_2-y_0)*(z_1-z_0) - (z_2-z_0)*(y_1-y_0)) / norm
-    Let M_d be the max coordinate difference
-    Let M_a be the greater of M_d and the max abs. coordinate
-    Let u be machine roundoff and distround be max error for distance computation
-    The max error for n_0 is sqrt(3) u M_a M_d / norm.  n_1 is approx. 1 and n_2 is approx. 0
-    The max error for distance of V_1 is sqrt(3) u M_a M_d M_d / norm.  Offset=0 at origin
-    Then minnorm = 1.8 u M_a M_d M_d / qh.ONEmerge
-    Note that qh.one_merge is approx. 45.5 u M_a and norm is usually about M_d M_d
-
-  derivation of 4-d minnorm
-    same as above except rotate the facet so that V_1 on x-axis and w_2, y_3, w_3=0
-     [if two vertices fixed on x-axis, can rotate the other two in yzw.]
-    n_0 = det3_(...) = y_2 det2_(z_1, w_1, z_3, w_3) = - y_2 w_1 z_3
-     [all other terms contain at least two factors nearly zero.]
-    The max error for n_0 is sqrt(4) u M_a M_d M_d / norm
-    Then minnorm = 2 u M_a M_d M_d M_d / qh.ONEmerge
-    Note that qh.one_merge is approx. 82 u M_a and norm is usually about M_d M_d M_d
-*/
-void qh_sethyperplane_det (int dim, coordT **rows, coordT *point0, 
-          boolT toporient, coordT *normal, realT *offset, boolT *nearzero) {
-  realT maxround, dist;
-  int i;
-  pointT *point;
-
-
-  if (dim == 2) {
-    normal[0]= dY(1,0);
-    normal[1]= dX(0,1);
-    qh_normalize2 (normal, dim, toporient, NULL, NULL);
-    *offset= -(point0[0]*normal[0]+point0[1]*normal[1]);
-    *nearzero= False;  /* since nearzero norm => incident points */
-  }else if (dim == 3) {
-    normal[0]= det2_(dY(2,0), dZ(2,0),
-		     dY(1,0), dZ(1,0));
-    normal[1]= det2_(dX(1,0), dZ(1,0),
-		     dX(2,0), dZ(2,0));
-    normal[2]= det2_(dX(2,0), dY(2,0),
-		     dX(1,0), dY(1,0));
-    qh_normalize2 (normal, dim, toporient, NULL, NULL);
-    *offset= -(point0[0]*normal[0] + point0[1]*normal[1]
-	       + point0[2]*normal[2]);
-    maxround= qh DISTround;
-    for (i=dim; i--; ) {
-      point= rows[i];
-      if (point != point0) {
-        dist= *offset + (point[0]*normal[0] + point[1]*normal[1]
-	       + point[2]*normal[2]);
-        if (dist > maxround || dist < -maxround) {
-  	  *nearzero= True;
-	  break;
-	}
-      }
-    }
-  }else if (dim == 4) {
-    normal[0]= - det3_(dY(2,0), dZ(2,0), dW(2,0),
-			dY(1,0), dZ(1,0), dW(1,0),
-			dY(3,0), dZ(3,0), dW(3,0));
-    normal[1]=   det3_(dX(2,0), dZ(2,0), dW(2,0),
-		        dX(1,0), dZ(1,0), dW(1,0),
-		        dX(3,0), dZ(3,0), dW(3,0));
-    normal[2]= - det3_(dX(2,0), dY(2,0), dW(2,0),
-			dX(1,0), dY(1,0), dW(1,0),
-			dX(3,0), dY(3,0), dW(3,0));
-    normal[3]=   det3_(dX(2,0), dY(2,0), dZ(2,0),
-		        dX(1,0), dY(1,0), dZ(1,0),
-		        dX(3,0), dY(3,0), dZ(3,0));
-    qh_normalize2 (normal, dim, toporient, NULL, NULL);
-    *offset= -(point0[0]*normal[0] + point0[1]*normal[1]
-	       + point0[2]*normal[2] + point0[3]*normal[3]);
-    maxround= qh DISTround;
-    for (i=dim; i--; ) {
-      point= rows[i];
-      if (point != point0) {
-        dist= *offset + (point[0]*normal[0] + point[1]*normal[1]
-	       + point[2]*normal[2] + point[3]*normal[3]);
-        if (dist > maxround || dist < -maxround) {
-  	  *nearzero= True;
-	  break;
-	}
-      }
-    }
-  }
-  if (*nearzero) {
-    zzinc_(Zminnorm);
-    trace0((qh ferr, "qh_sethyperplane_det: degenerate norm during p%d.\n", qh furthest_id));
-    zzinc_(Znearlysingular);
-  }
-} /* sethyperplane_det */
-
-
-/*---------------------------------
-  
-  qh_sethyperplane_gauss( dim, rows, point0, toporient, normal, offset, nearzero )
-    given (dim-1) X dim array of rows[i]= V_{i+1} - V_0 (point0)
-    set normalized hyperplane equation from oriented simplex
-
-  returns:
-    normal (normalized)
-    offset (places point0 on the hyperplane)
-
-  notes:
-    if nearzero
-      orientation may be incorrect because of incorrect sign flips in gausselim
-    solves [V_n-V_0,...,V_1-V_0, 0 .. 0 1] * N == [0 .. 0 1] 
-        or [V_n-V_0,...,V_1-V_0, 0 .. 0 1] * N == [0] 
-    i.e., N is normal to the hyperplane, and the unnormalized
-        distance to [0 .. 1] is either 1 or   0
-
-  design:
-    perform gaussian elimination
-    flip sign for negative values
-    perform back substitution 
-    normalize result
-    compute offset
-*/
-void qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0, 
-		boolT toporient, coordT *normal, coordT *offset, boolT *nearzero) {
-  coordT *pointcoord, *normalcoef;
-  int k;
-  boolT sign= toporient, nearzero2= False;
-  
-  qh_gausselim(rows, dim-1, dim, &sign, nearzero);
-  for(k= dim-1; k--; ) {
-    if ((rows[k])[k] < 0)
-      sign ^= 1;
-  }
-  if (*nearzero) {
-    zzinc_(Znearlysingular);
-    trace0((qh ferr, "qh_sethyperplane_gauss: nearly singular or axis parallel hyperplane during p%d.\n", qh furthest_id));
-    qh_backnormal(rows, dim-1, dim, sign, normal, &nearzero2);
-  }else {
-    qh_backnormal(rows, dim-1, dim, sign, normal, &nearzero2);
-    if (nearzero2) {
-      zzinc_(Znearlysingular);
-      trace0((qh ferr, "qh_sethyperplane_gauss: singular or axis parallel hyperplane at normalization during p%d.\n", qh furthest_id));
-    }
-  }
-  if (nearzero2)
-    *nearzero= True;
-  qh_normalize2(normal, dim, True, NULL, NULL);
-  pointcoord= point0;
-  normalcoef= normal;
-  *offset= -(*pointcoord++ * *normalcoef++);
-  for(k= dim-1; k--; )
-    *offset -= *pointcoord++ * *normalcoef++;
-} /* sethyperplane_gauss */
-
-  
-
diff --git a/extern/qhull/src/geom.h b/extern/qhull/src/geom.h
deleted file mode 100644
index 32440cff56f..00000000000
--- a/extern/qhull/src/geom.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
  ---------------------------------
-
-  geom.h 
-    header file for geometric routines
-
-   see qh-geom.htm and geom.c
-
-   copyright (c) 1993-2002 The Geometry Center        
-*/
-
-#ifndef qhDEFgeom
-#define qhDEFgeom 1
-
-/* ============ -macros- ======================== */
-
-/*----------------------------------
-   
-  fabs_(a)
-    returns the absolute value of a
-*/
-#define fabs_( a ) ((( a ) < 0 ) ? -( a ):( a ))
-               
-/*----------------------------------
-  
-  fmax_(a,b)
-    returns the maximum value of a and b
-*/
-#define fmax_( a,b )  ( ( a ) < ( b ) ? ( b ) : ( a ) )
-
-/*----------------------------------
-
-  fmin_(a,b)
-    returns the minimum value of a and b
-*/
-#define fmin_( a,b )  ( ( a ) > ( b ) ? ( b ) : ( a ) )
-
-/*----------------------------------
-
-  maximize_(maxval, val)
-    set maxval to val if val is greater than maxval
-*/
-#define maximize_( maxval, val ) {if (( maxval ) < ( val )) ( maxval )= ( val );}
-
-/*----------------------------------
-
-  minimize_(minval, val)
-    set minval to val if val is less than minval
-*/
-#define minimize_( minval, val ) {if (( minval ) > ( val )) ( minval )= ( val );}
-
-/*----------------------------------
-
-  det2_(a1, a2,     
-        b1, b2)
-  
-    compute a 2-d determinate
-*/
-#define det2_( a1,a2,b1,b2 ) (( a1 )*( b2 ) - ( a2 )*( b1 ))
-
-/*----------------------------------
-  
-  det3_(a1, a2, a3,    
-       b1, b2, b3,
-       c1, c2, c3)
-  
-    compute a 3-d determinate
-*/
-#define det3_( a1,a2,a3,b1,b2,b3,c1,c2,c3 ) ( ( a1 )*det2_( b2,b3,c2,c3 ) \
-                - ( b1 )*det2_( a2,a3,c2,c3 ) + ( c1 )*det2_( a2,a3,b2,b3 ) )
-
-/*----------------------------------
-  
-  dX( p1, p2 )
-  dY( p1, p2 )
-  dZ( p1, p2 )
-  
-    given two indices into rows[],
-
-    compute the difference between X, Y, or Z coordinates
-*/
-#define dX( p1,p2 )  ( *( rows[p1] ) - *( rows[p2] ))
-#define dY( p1,p2 )  ( *( rows[p1]+1 ) - *( rows[p2]+1 ))
-#define dZ( p1,p2 )  ( *( rows[p1]+2 ) - *( rows[p2]+2 ))
-#define dW( p1,p2 )  ( *( rows[p1]+3 ) - *( rows[p2]+3 ))
-
-/*============= prototypes in alphabetical order, infrequent at end ======= */
-
-void    qh_backnormal (realT **rows, int numrow, int numcol, boolT sign, coordT *normal, boolT *nearzero);
-void	qh_distplane (pointT *point, facetT *facet, realT *dist);
-facetT *qh_findbest (pointT *point, facetT *startfacet,
-		     boolT bestoutside, boolT isnewfacets, boolT noupper,
-		     realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbesthorizon (boolT ischeckmax, pointT *point, 
-	             facetT *startfacet, boolT noupper, realT *bestdist, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet, realT *dist, 
-		     boolT bestoutside, boolT *isoutside, int *numpart);
-void 	qh_gausselim(realT **rows, int numrow, int numcol, boolT *sign, boolT *nearzero);
-realT   qh_getangle(pointT *vect1, pointT *vect2);
-pointT *qh_getcenter(setT *vertices);
-pointT *qh_getcentrum(facetT *facet);
-realT   qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist);
-void    qh_normalize (coordT *normal, int dim, boolT toporient);
-void    qh_normalize2 (coordT *normal, int dim, boolT toporient, 
-            realT *minnorm, boolT *ismin);
-pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist);
-
-void    qh_setfacetplane(facetT *newfacets);
-void 	qh_sethyperplane_det (int dim, coordT **rows, coordT *point0, 
-              boolT toporient, coordT *normal, realT *offset, boolT *nearzero);
-void 	qh_sethyperplane_gauss (int dim, coordT **rows, pointT *point0, 
-	     boolT toporient, coordT *normal, coordT *offset, boolT *nearzero);
-boolT   qh_sharpnewfacets (void);
-
-/*========= infrequently used code in geom2.c =============*/
-
-
-coordT *qh_copypoints (coordT *points, int numpoints, int dimension);
-void    qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]);
-realT 	qh_determinant (realT **rows, int dim, boolT *nearzero);
-realT   qh_detjoggle (pointT *points, int numpoints, int dimension);
-void    qh_detroundoff (void);
-realT   qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero);
-realT   qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp);
-realT   qh_distround (int dimension, realT maxabs, realT maxsumabs);
-realT   qh_divzero(realT numer, realT denom, realT mindenom1, boolT *zerodiv);
-realT   qh_facetarea (facetT *facet);
-realT   qh_facetarea_simplex (int dim, coordT *apex, setT *vertices, 
-          vertexT *notvertex,  boolT toporient, coordT *normal, realT *offset);
-pointT *qh_facetcenter (setT *vertices);
-facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp, facetT **facetlist);
-void    qh_getarea (facetT *facetlist);
-boolT   qh_gram_schmidt(int dim, realT **rows);
-boolT   qh_inthresholds (coordT *normal, realT *angle);
-void    qh_joggleinput (void);
-realT  *qh_maxabsval (realT *normal, int dim);
-setT   *qh_maxmin(pointT *points, int numpoints, int dimension);
-realT   qh_maxouter (void);
-void    qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex);
-realT   qh_minabsval (realT *normal, int dim);
-int     qh_mindiff (realT *vecA, realT *vecB, int dim);
-boolT   qh_orientoutside (facetT *facet);
-void    qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-coordT  qh_pointdist(pointT *point1, pointT *point2, int dim);
-void    qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol);
-void    qh_printpoints (FILE *fp, char *string, setT *points);
-void    qh_projectinput (void);
-void 	qh_projectpoints (signed char *project, int n, realT *points, 
-             int numpoints, int dim, realT *newpoints, int newdim);
-int     qh_rand( void);
-void    qh_srand( int seed);
-realT   qh_randomfactor (void);
-void    qh_randommatrix (realT *buffer, int dim, realT **row);
-void    qh_rotateinput (realT **rows);
-void    qh_rotatepoints (realT *points, int numpoints, int dim, realT **rows);
-void    qh_scaleinput (void);
-void    qh_scalelast (coordT *points, int numpoints, int dim, coordT low,
-		   coordT high, coordT newhigh);
-void 	qh_scalepoints (pointT *points, int numpoints, int dim,
-  		realT *newlows, realT *newhighs);
-boolT   qh_sethalfspace (int dim, coordT *coords, coordT **nextp, 
-              coordT *normal, coordT *offset, coordT *feasible);
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-pointT *qh_voronoi_center (int dim, setT *points);
-
-#endif /* qhDEFgeom */
-
-
-
diff --git a/extern/qhull/src/geom2.c b/extern/qhull/src/geom2.c
deleted file mode 100644
index bd58ce1282b..00000000000
--- a/extern/qhull/src/geom2.c
+++ /dev/null
@@ -1,2160 +0,0 @@
-/*
  ---------------------------------
-
-
-   geom2.c 
-   infrequently used geometric routines of qhull
-
-   see qh-geom.htm and geom.h
-
-   copyright (c) 1993-2002 The Geometry Center        
-
-   frequently used code goes into geom.c
-*/
-   
-#include "qhull_a.h"
-   
-/*================== functions in alphabetic order ============*/
-
-/*---------------------------------
-
-  qh_copypoints( points, numpoints, dimension)
-    return malloc'd copy of points
-*/
-coordT *qh_copypoints (coordT *points, int numpoints, int dimension) {
-  int size;
-  coordT *newpoints;
-
-  size= numpoints * dimension * sizeof(coordT);
-  if (!(newpoints=(coordT*)malloc(size))) {
-    fprintf(qh ferr, "qhull error: insufficient memory to copy %d points\n",
-        numpoints);
-    qh_errexit(qh_ERRmem, NULL, NULL);
-  }
-  memcpy ((char *)newpoints, (char *)points, size);
-  return newpoints;
-} /* copypoints */
-
-/*---------------------------------
-  
-  qh_crossproduct( dim, vecA, vecB, vecC )
-    crossproduct of 2 dim vectors
-    C= A x B
-  
-  notes:
-    from Glasner, Graphics Gems I, p. 639
-    only defined for dim==3
-*/
-void qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]){
-
-  if (dim == 3) {
-    vecC[0]=   det2_(vecA[1], vecA[2],
-		     vecB[1], vecB[2]);
-    vecC[1]= - det2_(vecA[0], vecA[2],
-		     vecB[0], vecB[2]);
-    vecC[2]=   det2_(vecA[0], vecA[1],
-		     vecB[0], vecB[1]);
-  }
-} /* vcross */
-
-/*---------------------------------
-  
-  qh_determinant( rows, dim, nearzero )
-    compute signed determinant of a square matrix
-    uses qh.NEARzero to test for degenerate matrices
-
-  returns:
-    determinant
-    overwrites rows and the matrix
-    if dim == 2 or 3
-      nearzero iff determinant < qh NEARzero[dim-1]
-      (not quite correct, not critical)
-    if dim >= 4
-      nearzero iff diagonal[k] < qh NEARzero[k]
-*/
-realT qh_determinant (realT **rows, int dim, boolT *nearzero) {
-  realT det=0;
-  int i;
-  boolT sign= False;
-
-  *nearzero= False;
-  if (dim < 2) {
-    fprintf (qh ferr, "qhull internal error (qh_determinate): only implemented for dimension >= 2\n");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }else if (dim == 2) {
-    det= det2_(rows[0][0], rows[0][1],
-		 rows[1][0], rows[1][1]);
-    if (fabs_(det) < qh NEARzero[1])  /* not really correct, what should this be? */
-      *nearzero= True;
-  }else if (dim == 3) {
-    det= det3_(rows[0][0], rows[0][1], rows[0][2],
-		 rows[1][0], rows[1][1], rows[1][2],
-		 rows[2][0], rows[2][1], rows[2][2]);
-    if (fabs_(det) < qh NEARzero[2])  /* not really correct, what should this be? */
-      *nearzero= True;
-  }else {	
-    qh_gausselim(rows, dim, dim, &sign, nearzero);  /* if nearzero, diagonal still ok*/
-    det= 1.0;
-    for (i= dim; i--; )
-      det *= (rows[i])[i];
-    if (sign)
-      det= -det;
-  }
-  return det;
-} /* determinant */
-
-/*---------------------------------
-  
-  qh_detjoggle( points, numpoints, dimension )
-    determine default max joggle for point array
-      as qh_distround * qh_JOGGLEdefault
-
-  returns:
-    initial value for JOGGLEmax from points and REALepsilon
-
-  notes:
-    computes DISTround since qh_maxmin not called yet
-    if qh SCALElast, last dimension will be scaled later to MAXwidth
-
-    loop duplicated from qh_maxmin
-*/
-realT qh_detjoggle (pointT *points, int numpoints, int dimension) {
-  realT abscoord, distround, joggle, maxcoord, mincoord;
-  pointT *point, *pointtemp;
-  realT maxabs= -REALmax;
-  realT sumabs= 0;
-  realT maxwidth= 0;
-  int k;
-
-  for (k= 0; k < dimension; k++) {
-    if (qh SCALElast && k == dimension-1)
-      abscoord= maxwidth;
-    else if (qh DELAUNAY && k == dimension-1) /* will qh_setdelaunay() */
-      abscoord= 2 * maxabs * maxabs;  /* may be low by qh hull_dim/2 */
-    else {
-      maxcoord= -REALmax;
-      mincoord= REALmax;
-      FORALLpoint_(points, numpoints) {
-	maximize_(maxcoord, point[k]);
-        minimize_(mincoord, point[k]);
-      }
-      maximize_(maxwidth, maxcoord-mincoord);
-      abscoord= fmax_(maxcoord, -mincoord);
-    }
-    sumabs += abscoord;
-    maximize_(maxabs, abscoord);
-  } /* for k */
-  distround= qh_distround (qh hull_dim, maxabs, sumabs);
-  joggle= distround * qh_JOGGLEdefault;
-  maximize_(joggle, REALepsilon * qh_JOGGLEdefault);
-  trace2((qh ferr, "qh_detjoggle: joggle=%2.2g maxwidth=%2.2g\n", joggle, maxwidth));
-  return joggle;
-} /* detjoggle */
-
-/*---------------------------------
-  
-  qh_detroundoff()
-    determine maximum roundoff errors from
-      REALepsilon, REALmax, REALmin, qh.hull_dim, qh.MAXabs_coord, 
-      qh.MAXsumcoord, qh.MAXwidth, qh.MINdenom_1
-
-    accounts for qh.SETroundoff, qh.RANDOMdist, qh MERGEexact
-      qh.premerge_cos, qh.postmerge_cos, qh.premerge_centrum,
-      qh.postmerge_centrum, qh.MINoutside,
-      qh_RATIOnearinside, qh_COPLANARratio, qh_WIDEcoplanar
-
-  returns:
-    sets qh.DISTround, etc. (see below)
-    appends precision constants to qh.qhull_options
-
-  see:
-    qh_maxmin() for qh.NEARzero
-
-  design:
-    determine qh.DISTround for distance computations
-    determine minimum denominators for qh_divzero
-    determine qh.ANGLEround for angle computations
-    adjust qh.premerge_cos,... for roundoff error
-    determine qh.ONEmerge for maximum error due to a single merge
-    determine qh.NEARinside, qh.MAXcoplanar, qh.MINvisible,
-      qh.MINoutside, qh.WIDEfacet
-    initialize qh.max_vertex and qh.minvertex
-*/
-void qh_detroundoff (void) {
-
-  qh_option ("_max-width", NULL, &qh MAXwidth);
-  if (!qh SETroundoff) {
-    qh DISTround= qh_distround (qh hull_dim, qh MAXabs_coord, qh MAXsumcoord);
-    if (qh RANDOMdist)
-      qh DISTround += qh RANDOMfactor * qh MAXabs_coord;
-    qh_option ("Error-roundoff", NULL, &qh DISTround);
-  }
-  qh MINdenom= qh MINdenom_1 * qh MAXabs_coord;
-  qh MINdenom_1_2= sqrt (qh MINdenom_1 * qh hull_dim) ;  /* if will be normalized */
-  qh MINdenom_2= qh MINdenom_1_2 * qh MAXabs_coord;
-                                              /* for inner product */
-  qh ANGLEround= 1.01 * qh hull_dim * REALepsilon;
-  if (qh RANDOMdist)
-    qh ANGLEround += qh RANDOMfactor;
-  if (qh premerge_cos < REALmax/2) {
-    qh premerge_cos -= qh ANGLEround;
-    if (qh RANDOMdist) 
-      qh_option ("Angle-premerge-with-random", NULL, &qh premerge_cos);
-  }
-  if (qh postmerge_cos < REALmax/2) {
-    qh postmerge_cos -= qh ANGLEround;
-    if (qh RANDOMdist)
-      qh_option ("Angle-postmerge-with-random", NULL, &qh postmerge_cos);
-  }
-  qh premerge_centrum += 2 * qh DISTround;    /*2 for centrum and distplane()*/
-  qh postmerge_centrum += 2 * qh DISTround;
-  if (qh RANDOMdist && (qh MERGEexact || qh PREmerge))
-    qh_option ("Centrum-premerge-with-random", NULL, &qh premerge_centrum);
-  if (qh RANDOMdist && qh POSTmerge)
-    qh_option ("Centrum-postmerge-with-random", NULL, &qh postmerge_centrum);
-  { /* compute ONEmerge, max vertex offset for merging simplicial facets */
-    realT maxangle= 1.0, maxrho;
-    
-    minimize_(maxangle, qh premerge_cos);
-    minimize_(maxangle, qh postmerge_cos);
-    /* max diameter * sin theta + DISTround for vertex to its hyperplane */
-    qh ONEmerge= sqrt (qh hull_dim) * qh MAXwidth *
-      sqrt (1.0 - maxangle * maxangle) + qh DISTround;  
-    maxrho= qh hull_dim * qh premerge_centrum + qh DISTround;
-    maximize_(qh ONEmerge, maxrho);
-    maxrho= qh hull_dim * qh postmerge_centrum + qh DISTround;
-    maximize_(qh ONEmerge, maxrho);
-    if (qh MERGING)
-      qh_option ("_one-merge", NULL, &qh ONEmerge);
-  }
-  qh NEARinside= qh ONEmerge * qh_RATIOnearinside; /* only used if qh KEEPnearinside */
-  if (qh JOGGLEmax < REALmax/2 && (qh KEEPcoplanar || qh KEEPinside)) {
-    realT maxdist;	       /* adjust qh.NEARinside for joggle */
-    qh KEEPnearinside= True;   
-    maxdist= sqrt (qh hull_dim) * qh JOGGLEmax + qh DISTround;
-    maxdist= 2*maxdist;        /* vertex and coplanar point can joggle in opposite directions */
-    maximize_(qh NEARinside, maxdist);  /* must agree with qh_nearcoplanar() */
-  }
-  if (qh KEEPnearinside)
-    qh_option ("_near-inside", NULL, &qh NEARinside);
-  if (qh JOGGLEmax < qh DISTround) {
-    fprintf (qh ferr, "qhull error: the joggle for 'QJn', %.2g, is below roundoff for distance computations, %.2g\n",
-         qh JOGGLEmax, qh DISTround);
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  if (qh MINvisible > REALmax/2) {
-    if (!qh MERGING)
-      qh MINvisible= qh DISTround;
-    else if (qh hull_dim <= 3)
-      qh MINvisible= qh premerge_centrum;
-    else
-      qh MINvisible= qh_COPLANARratio * qh premerge_centrum;
-    if (qh APPROXhull && qh MINvisible > qh MINoutside)
-      qh MINvisible= qh MINoutside;
-    qh_option ("Visible-distance", NULL, &qh MINvisible);
-  }
-  if (qh MAXcoplanar > REALmax/2) {
-    qh MAXcoplanar= qh MINvisible;
-    qh_option ("U-coplanar-distance", NULL, &qh MAXcoplanar);
-  }
-  if (!qh APPROXhull) {             /* user may specify qh MINoutside */
-    qh MINoutside= 2 * qh MINvisible;
-    if (qh premerge_cos < REALmax/2) 
-      maximize_(qh MINoutside, (1- qh premerge_cos) * qh MAXabs_coord);
-    qh_option ("Width-outside", NULL, &qh MINoutside);
-  }
-  qh WIDEfacet= qh MINoutside;
-  maximize_(qh WIDEfacet, qh_WIDEcoplanar * qh MAXcoplanar); 
-  maximize_(qh WIDEfacet, qh_WIDEcoplanar * qh MINvisible); 
-  qh_option ("_wide-facet", NULL, &qh WIDEfacet);
-  if (qh MINvisible > qh MINoutside + 3 * REALepsilon 
-  && !qh BESToutside && !qh FORCEoutput)
-    fprintf (qh ferr, "qhull input warning: minimum visibility V%.2g is greater than \nminimum outside W%.2g.  Flipped facets are likely.\n",
-	     qh MINvisible, qh MINoutside);
-  qh max_vertex= qh DISTround;
-  qh min_vertex= -qh DISTround;
-  /* numeric constants reported in printsummary */
-} /* detroundoff */
-
-/*---------------------------------
-  
-  qh_detsimplex( apex, points, dim, nearzero )
-    compute determinant of a simplex with point apex and base points
-
-  returns:
-     signed determinant and nearzero from qh_determinant
-
-  notes:
-     uses qh.gm_matrix/qh.gm_row (assumes they're big enough)
-
-  design:
-    construct qm_matrix by subtracting apex from points
-    compute determinate
-*/
-realT qh_detsimplex(pointT *apex, setT *points, int dim, boolT *nearzero) {
-  pointT *coorda, *coordp, *gmcoord, *point, **pointp;
-  coordT **rows;
-  int k,  i=0;
-  realT det;
-
-  zinc_(Zdetsimplex);
-  gmcoord= qh gm_matrix;
-  rows= qh gm_row;
-  FOREACHpoint_(points) {
-    if (i == dim)
-      break;
-    rows[i++]= gmcoord;
-    coordp= point;
-    coorda= apex;
-    for (k= dim; k--; )
-      *(gmcoord++)= *coordp++ - *coorda++;
-  }
-  if (i < dim) {
-    fprintf (qh ferr, "qhull internal error (qh_detsimplex): #points %d < dimension %d\n", 
-               i, dim);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  det= qh_determinant (rows, dim, nearzero);
-  trace2((qh ferr, "qh_detsimplex: det=%2.2g for point p%d, dim %d, nearzero? %d\n",
-	  det, qh_pointid(apex), dim, *nearzero)); 
-  return det;
-} /* detsimplex */
-
-/*---------------------------------
-  
-  qh_distnorm( dim, point, normal, offset )
-    return distance from point to hyperplane at normal/offset
-
-  returns:
-    dist
-  
-  notes:  
-    dist > 0 if point is outside of hyperplane
-  
-  see:
-    qh_distplane in geom.c
-*/
-realT qh_distnorm (int dim, pointT *point, pointT *normal, realT *offsetp) {
-  coordT *normalp= normal, *coordp= point;
-  realT dist;
-  int k;
-
-  dist= *offsetp;
-  for (k= dim; k--; )
-    dist += *(coordp++) * *(normalp++);
-  return dist;
-} /* distnorm */
-
-/*---------------------------------
-
-  qh_distround ( dimension, maxabs, maxsumabs )
-    compute maximum round-off error for a distance computation
-      to a normalized hyperplane
-    maxabs is the maximum absolute value of a coordinate
-    maxsumabs is the maximum possible sum of absolute coordinate values
-
-  returns:
-    max dist round for REALepsilon
-
-  notes:
-    calculate roundoff error according to
-    Lemma 3.2-1 of Golub and van Loan "Matrix Computation"
-    use sqrt(dim) since one vector is normalized
-      or use maxsumabs since one vector is < 1
-*/
-realT qh_distround (int dimension, realT maxabs, realT maxsumabs) {
-  realT maxdistsum, maxround;
-
-  maxdistsum= sqrt (dimension) * maxabs;
-  minimize_( maxdistsum, maxsumabs);
-  maxround= REALepsilon * (dimension * maxdistsum * 1.01 + maxabs);
-              /* adds maxabs for offset */
-  trace4((qh ferr, "qh_distround: %2.2g maxabs %2.2g maxsumabs %2.2g maxdistsum %2.2g\n",
-	         maxround, maxabs, maxsumabs, maxdistsum));
-  return maxround;
-} /* distround */
-
-/*---------------------------------
-  
-  qh_divzero( numer, denom, mindenom1, zerodiv )
-    divide by a number that's nearly zero
-    mindenom1= minimum denominator for dividing into 1.0
-
-  returns:
-    quotient
-    sets zerodiv and returns 0.0 if it would overflow
-  
-  design:
-    if numer is nearly zero and abs(numer) < abs(denom)
-      return numer/denom
-    else if numer is nearly zero
-      return 0 and zerodiv
-    else if denom/numer non-zero
-      return numer/denom
-    else
-      return 0 and zerodiv
-*/
-realT qh_divzero (realT numer, realT denom, realT mindenom1, boolT *zerodiv) {
-  realT temp, numerx, denomx;
-  
-
-  if (numer < mindenom1 && numer > -mindenom1) {
-    numerx= fabs_(numer);
-    denomx= fabs_(denom);
-    if (numerx < denomx) {
-      *zerodiv= False;
-      return numer/denom;
-    }else {
-      *zerodiv= True;
-      return 0.0;
-    }
-  }
-  temp= denom/numer;
-  if (temp > mindenom1 || temp < -mindenom1) {
-    *zerodiv= False;
-    return numer/denom;
-  }else {
-    *zerodiv= True;
-    return 0.0;
-  }
-} /* divzero */
-  
-
-/*---------------------------------
-
-  qh_facetarea( facet )
-    return area for a facet
-  
-  notes:
-    if non-simplicial, 
-      uses centrum to triangulate facet and sums the projected areas.
-    if (qh DELAUNAY),
-      computes projected area instead for last coordinate
-    assumes facet->normal exists
-    projecting tricoplanar facets to the hyperplane does not appear to make a difference
-  
-  design:
-    if simplicial
-      compute area
-    else
-      for each ridge
-        compute area from centrum to ridge
-    negate area if upper Delaunay facet
-*/
-realT qh_facetarea (facetT *facet) {
-  vertexT *apex;
-  pointT *centrum;
-  realT area= 0.0;
-  ridgeT *ridge, **ridgep;
-
-  if (facet->simplicial) {
-    apex= SETfirstt_(facet->vertices, vertexT);
-    area= qh_facetarea_simplex (qh hull_dim, apex->point, facet->vertices, 
-                    apex, facet->toporient, facet->normal, &facet->offset);
-  }else {
-    if (qh CENTERtype == qh_AScentrum)
-      centrum= facet->center;
-    else
-      centrum= qh_getcentrum (facet);
-    FOREACHridge_(facet->ridges) 
-      area += qh_facetarea_simplex (qh hull_dim, centrum, ridge->vertices, 
-                 NULL, (ridge->top == facet),  facet->normal, &facet->offset);
-    if (qh CENTERtype != qh_AScentrum)
-      qh_memfree (centrum, qh normal_size);
-  }
-  if (facet->upperdelaunay && qh DELAUNAY)
-    area= -area;  /* the normal should be [0,...,1] */
-  trace4((qh ferr, "qh_facetarea: f%d area %2.2g\n", facet->id, area)); 
-  return area;
-} /* facetarea */
-
-/*---------------------------------
-
-  qh_facetarea_simplex( dim, apex, vertices, notvertex, toporient, normal, offset )
-    return area for a simplex defined by 
-      an apex, a base of vertices, an orientation, and a unit normal
-    if simplicial or tricoplanar facet, 
-      notvertex is defined and it is skipped in vertices
-  
-  returns:
-    computes area of simplex projected to plane [normal,offset]
-    returns 0 if vertex too far below plane (qh WIDEfacet)
-      vertex can't be apex of tricoplanar facet
-  
-  notes:
-    if (qh DELAUNAY),
-      computes projected area instead for last coordinate
-    uses qh gm_matrix/gm_row and qh hull_dim
-    helper function for qh_facetarea
-  
-  design:
-    if Notvertex
-      translate simplex to apex
-    else
-      project simplex to normal/offset
-      translate simplex to apex
-    if Delaunay
-      set last row/column to 0 with -1 on diagonal 
-    else
-      set last row to Normal
-    compute determinate
-    scale and flip sign for area
-*/
-realT qh_facetarea_simplex (int dim, coordT *apex, setT *vertices, 
-        vertexT *notvertex,  boolT toporient, coordT *normal, realT *offset) {
-  pointT *coorda, *coordp, *gmcoord;
-  coordT **rows, *normalp;
-  int k,  i=0;
-  realT area, dist;
-  vertexT *vertex, **vertexp;
-  boolT nearzero;
-
-  gmcoord= qh gm_matrix;
-  rows= qh gm_row;
-  FOREACHvertex_(vertices) {
-    if (vertex == notvertex)
-      continue;
-    rows[i++]= gmcoord;
-    coorda= apex;
-    coordp= vertex->point;
-    normalp= normal;
-    if (notvertex) {
-      for (k= dim; k--; )
-	*(gmcoord++)= *coordp++ - *coorda++;
-    }else {
-      dist= *offset;
-      for (k= dim; k--; )
-	dist += *coordp++ * *normalp++;
-      if (dist < -qh WIDEfacet) {
-	zinc_(Znoarea);
-	return 0.0;
-      }
-      coordp= vertex->point;
-      normalp= normal;
-      for (k= dim; k--; )
-	*(gmcoord++)= (*coordp++ - dist * *normalp++) - *coorda++;
-    }
-  }
-  if (i != dim-1) {
-    fprintf (qh ferr, "qhull internal error (qh_facetarea_simplex): #points %d != dim %d -1\n", 
-               i, dim);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  rows[i]= gmcoord;
-  if (qh DELAUNAY) {
-    for (i= 0; i < dim-1; i++)
-      rows[i][dim-1]= 0.0;
-    for (k= dim; k--; )
-      *(gmcoord++)= 0.0;
-    rows[dim-1][dim-1]= -1.0;
-  }else {
-    normalp= normal;
-    for (k= dim; k--; )
-      *(gmcoord++)= *normalp++;
-  }
-  zinc_(Zdetsimplex);
-  area= qh_determinant (rows, dim, &nearzero);
-  if (toporient)
-    area= -area;
-  area *= qh AREAfactor;
-  trace4((qh ferr, "qh_facetarea_simplex: area=%2.2g for point p%d, toporient %d, nearzero? %d\n",
-	  area, qh_pointid(apex), toporient, nearzero)); 
-  return area;
-} /* facetarea_simplex */
-
-/*---------------------------------
-  
-  qh_facetcenter( vertices )
-    return Voronoi center (Voronoi vertex) for a facet's vertices
-
-  returns:
-    return temporary point equal to the center
-    
-  see:
-    qh_voronoi_center()
-*/
-pointT *qh_facetcenter (setT *vertices) {
-  setT *points= qh_settemp (qh_setsize (vertices));
-  vertexT *vertex, **vertexp;
-  pointT *center;
-  
-  FOREACHvertex_(vertices) 
-    qh_setappend (&points, vertex->point);
-  center= qh_voronoi_center (qh hull_dim-1, points);
-  qh_settempfree (&points);
-  return center;
-} /* facetcenter */
-
-/*---------------------------------
-  
-  qh_findgooddist( point, facetA, dist, facetlist )
-    find best good facet visible for point from facetA
-    assumes facetA is visible from point
-
-  returns:
-    best facet, i.e., good facet that is furthest from point
-      distance to best facet
-      NULL if none
-      
-    moves good, visible facets (and some other visible facets)
-      to end of qh facet_list
-
-  notes:
-    uses qh visit_id
-
-  design:
-    initialize bestfacet if facetA is good
-    move facetA to end of facetlist
-    for each facet on facetlist
-      for each unvisited neighbor of facet
-        move visible neighbors to end of facetlist
-        update best good neighbor
-        if no good neighbors, update best facet
-*/
-facetT *qh_findgooddist (pointT *point, facetT *facetA, realT *distp, 
-               facetT **facetlist) {
-  realT bestdist= -REALmax, dist;
-  facetT *neighbor, **neighborp, *bestfacet=NULL, *facet;
-  boolT goodseen= False;  
-
-  if (facetA->good) {
-    zinc_(Zcheckpart);  /* calls from check_bestdist occur after print stats */
-    qh_distplane (point, facetA, &bestdist);
-    bestfacet= facetA;
-    goodseen= True;
-  }
-  qh_removefacet (facetA);
-  qh_appendfacet (facetA);
-  *facetlist= facetA;
-  facetA->visitid= ++qh visit_id;
-  FORALLfacet_(*facetlist) {
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid == qh visit_id)
-        continue;
-      neighbor->visitid= qh visit_id;
-      if (goodseen && !neighbor->good)
-        continue;
-      zinc_(Zcheckpart); 
-      qh_distplane (point, neighbor, &dist);
-      if (dist > 0) {
-        qh_removefacet (neighbor);
-        qh_appendfacet (neighbor);
-        if (neighbor->good) {
-          goodseen= True;
-          if (dist > bestdist) {
-            bestdist= dist;
-            bestfacet= neighbor;
-          }
-        }
-      }
-    }
-  }
-  if (bestfacet) {
-    *distp= bestdist;
-    trace2((qh ferr, "qh_findgooddist: p%d is %2.2g above good facet f%d\n",
-      qh_pointid(point), bestdist, bestfacet->id));
-    return bestfacet;
-  }
-  trace4((qh ferr, "qh_findgooddist: no good facet for p%d above f%d\n", 
-      qh_pointid(point), facetA->id));
-  return NULL;
-}  /* findgooddist */
-    
-/*---------------------------------
-  
-  qh_getarea( facetlist )
-    set area of all facets in facetlist
-    collect statistics
-
-  returns:
-    sets qh totarea/totvol to total area and volume of convex hull
-    for Delaunay triangulation, computes projected area of the lower or upper hull
-      ignores upper hull if qh ATinfinity
-  
-  notes:
-    could compute outer volume by expanding facet area by rays from interior
-    the following attempt at perpendicular projection underestimated badly:
-      qh.totoutvol += (-dist + facet->maxoutside + qh DISTround) 
-                            * area/ qh hull_dim;
-  design:
-    for each facet on facetlist
-      compute facet->area
-      update qh.totarea and qh.totvol
-*/
-void qh_getarea (facetT *facetlist) {
-  realT area;
-  realT dist;
-  facetT *facet;
-
-  if (qh REPORTfreq)
-    fprintf (qh ferr, "computing area of each facet and volume of the convex hull\n");
-  else 
-    trace1((qh ferr, "qh_getarea: computing volume and area for each facet\n"));
-  qh totarea= qh totvol= 0.0;
-  FORALLfacet_(facetlist) {
-    if (!facet->normal)
-      continue;
-    if (facet->upperdelaunay && qh ATinfinity)
-      continue;
-    facet->f.area= area= qh_facetarea (facet);
-    facet->isarea= True;
-    if (qh DELAUNAY) {
-      if (facet->upperdelaunay == qh UPPERdelaunay)
-	qh totarea += area;
-    }else {
-      qh totarea += area;
-      qh_distplane (qh interior_point, facet, &dist);
-      qh totvol += -dist * area/ qh hull_dim;
-    }
-    if (qh PRINTstatistics) {
-      wadd_(Wareatot, area);
-      wmax_(Wareamax, area);
-      wmin_(Wareamin, area);
-    }
-  }
-} /* getarea */
-
-/*---------------------------------
-  
-  qh_gram_schmidt( dim, row )
-    implements Gram-Schmidt orthogonalization by rows
-
-  returns:
-    false if zero norm
-    overwrites rows[dim][dim]
-
-  notes:
-    see Golub & van Loan Algorithm 6.2-2
-    overflow due to small divisors not handled
-
-  design:
-    for each row
-      compute norm for row
-      if non-zero, normalize row
-      for each remaining rowA
-        compute inner product of row and rowA
-        reduce rowA by row * inner product
-*/
-boolT qh_gram_schmidt(int dim, realT **row) {
-  realT *rowi, *rowj, norm;
-  int i, j, k;
-  
-  for(i=0; i < dim; i++) {
-    rowi= row[i];
-    for (norm= 0.0, k= dim; k--; rowi++)
-      norm += *rowi * *rowi;
-    norm= sqrt(norm);
-    wmin_(Wmindenom, norm);
-    if (norm == 0.0)  /* either 0 or overflow due to sqrt */
-      return False;
-    for(k= dim; k--; )
-      *(--rowi) /= norm;  
-    for(j= i+1; j < dim; j++) {
-      rowj= row[j];
-      for(norm= 0.0, k=dim; k--; )
-	norm += *rowi++ * *rowj++;
-      for(k=dim; k--; )
-	*(--rowj) -= *(--rowi) * norm;
-    }
-  }
-  return True;
-} /* gram_schmidt */
-
-
-/*---------------------------------
-  
-  qh_inthresholds( normal, angle )
-    return True if normal within qh.lower_/upper_threshold
-
-  returns:
-    estimate of angle by summing of threshold diffs
-      angle may be NULL
-      smaller "angle" is better
-  
-  notes:
-    invalid if qh.SPLITthresholds
-
-  see:
-    qh.lower_threshold in qh_initbuild()
-    qh_initthresholds()
-
-  design:
-    for each dimension
-      test threshold
-*/
-boolT qh_inthresholds (coordT *normal, realT *angle) {
-  boolT within= True;
-  int k;
-  realT threshold;
-
-  if (angle)
-    *angle= 0.0;
-  for(k= 0; k < qh hull_dim; k++) {
-    threshold= qh lower_threshold[k];
-    if (threshold > -REALmax/2) {
-      if (normal[k] < threshold)
-        within= False;
-      if (angle) {
-	threshold -= normal[k];
-	*angle += fabs_(threshold);
-      }
-    }
-    if (qh upper_threshold[k] < REALmax/2) {
-      threshold= qh upper_threshold[k];
-      if (normal[k] > threshold)
-        within= False;
-      if (angle) {
-	threshold -= normal[k];
-	*angle += fabs_(threshold);
-      }
-    }
-  }
-  return within;
-} /* inthresholds */
-    
-
-/*---------------------------------
-  
-  qh_joggleinput()
-    randomly joggle input to Qhull by qh.JOGGLEmax
-    initial input is qh.first_point/qh.num_points of qh.hull_dim
-      repeated calls use qh.input_points/qh.num_points
- 
-  returns:
-    joggles points at qh.first_point/qh.num_points
-    copies data to qh.input_points/qh.input_malloc if first time
-    determines qh.JOGGLEmax if it was zero
-    if qh.DELAUNAY
-      computes the Delaunay projection of the joggled points
-
-  notes:
-    if qh.DELAUNAY, unnecessarily joggles the last coordinate
-    the initial 'QJn' may be set larger than qh_JOGGLEmaxincrease
-
-  design:
-    if qh.DELAUNAY
-      set qh.SCALElast for reduced precision errors
-    if first call
-      initialize qh.input_points to the original input points
-      if qh.JOGGLEmax == 0
-        determine default qh.JOGGLEmax
-    else
-      increase qh.JOGGLEmax according to qh.build_cnt
-    joggle the input by adding a random number in [-qh.JOGGLEmax,qh.JOGGLEmax]
-    if qh.DELAUNAY
-      sets the Delaunay projection
-*/
-void qh_joggleinput (void) {
-  int size, i, seed;
-  coordT *coordp, *inputp;
-  realT randr, randa, randb;
-
-  if (!qh input_points) { /* first call */
-    qh input_points= qh first_point;
-    qh input_malloc= qh POINTSmalloc;
-    size= qh num_points * qh hull_dim * sizeof(coordT);
-    if (!(qh first_point=(coordT*)malloc(size))) {
-      fprintf(qh ferr, "qhull error: insufficient memory to joggle %d points\n",
-          qh num_points);
-      qh_errexit(qh_ERRmem, NULL, NULL);
-    }
-    qh POINTSmalloc= True;
-    if (qh JOGGLEmax == 0.0) {
-      qh JOGGLEmax= qh_detjoggle (qh input_points, qh num_points, qh hull_dim);
-      qh_option ("QJoggle", NULL, &qh JOGGLEmax);
-    }
-  }else {                 /* repeated call */
-    if (!qh RERUN && qh build_cnt > qh_JOGGLEretry) {
-      if (((qh build_cnt-qh_JOGGLEretry-1) % qh_JOGGLEagain) == 0) {
-	realT maxjoggle= qh MAXwidth * qh_JOGGLEmaxincrease;
-	if (qh JOGGLEmax < maxjoggle) {
-	  qh JOGGLEmax *= qh_JOGGLEincrease;
-	  minimize_(qh JOGGLEmax, maxjoggle); 
-	}
-      }
-    }
-    qh_option ("QJoggle", NULL, &qh JOGGLEmax);
-  }
-  if (qh build_cnt > 1 && qh JOGGLEmax > fmax_(qh MAXwidth/4, 0.1)) {
-      fprintf (qh ferr, "qhull error: the current joggle for 'QJn', %.2g, is too large for the width\nof the input.  If possible, recompile Qhull with higher-precision reals.\n",
-	        qh JOGGLEmax);
-      qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  /* for some reason, using qh ROTATErandom and qh_RANDOMseed does not repeat the run. Use 'TRn' instead */
-  seed= qh_RANDOMint;
-  qh_option ("_joggle-seed", &seed, NULL);
-  trace0((qh ferr, "qh_joggleinput: joggle input by %2.2g with seed %d\n", 
-    qh JOGGLEmax, seed));
-  inputp= qh input_points;
-  coordp= qh first_point;
-  randa= 2.0 * qh JOGGLEmax/qh_RANDOMmax;
-  randb= -qh JOGGLEmax;
-  size= qh num_points * qh hull_dim;
-  for (i= size; i--; ) {
-    randr= qh_RANDOMint;
-    *(coordp++)= *(inputp++) + (randr * randa + randb);
-  }
-  if (qh DELAUNAY) {
-    qh last_low= qh last_high= qh last_newhigh= REALmax;
-    qh_setdelaunay (qh hull_dim, qh num_points, qh first_point);
-  }
-} /* joggleinput */
-
-/*---------------------------------
-  
-  qh_maxabsval( normal, dim )
-    return pointer to maximum absolute value of a dim vector
-    returns NULL if dim=0
-*/
-realT *qh_maxabsval (realT *normal, int dim) {
-  realT maxval= -REALmax;
-  realT *maxp= NULL, *colp, absval;
-  int k;
-
-  for (k= dim, colp= normal; k--; colp++) {
-    absval= fabs_(*colp);
-    if (absval > maxval) {
-      maxval= absval;
-      maxp= colp;
-    }
-  }
-  return maxp;
-} /* maxabsval */
-
-
-/*---------------------------------
-  
-  qh_maxmin( points, numpoints, dimension )
-    return max/min points for each dimension      
-    determine max and min coordinates
-
-  returns:
-    returns a temporary set of max and min points
-      may include duplicate points. Does not include qh.GOODpoint
-    sets qh.NEARzero, qh.MAXabs_coord, qh.MAXsumcoord, qh.MAXwidth
-         qh.MAXlastcoord, qh.MINlastcoord
-    initializes qh.max_outside, qh.min_vertex, qh.WAScoplanar, qh.ZEROall_ok
-
-  notes:
-    loop duplicated in qh_detjoggle()
-
-  design:
-    initialize global precision variables
-    checks definition of REAL...
-    for each dimension
-      for each point
-        collect maximum and minimum point
-      collect maximum of maximums and minimum of minimums
-      determine qh.NEARzero for Gaussian Elimination
-*/
-setT *qh_maxmin(pointT *points, int numpoints, int dimension) {
-  int k;
-  realT maxcoord, temp;
-  pointT *minimum, *maximum, *point, *pointtemp;
-  setT *set;
-
-  qh max_outside= 0.0;
-  qh MAXabs_coord= 0.0;
-  qh MAXwidth= -REALmax;
-  qh MAXsumcoord= 0.0;
-  qh min_vertex= 0.0;
-  qh WAScoplanar= False;
-  if (qh ZEROcentrum)
-    qh ZEROall_ok= True;
-  if (REALmin < REALepsilon && REALmin < REALmax && REALmin > -REALmax
-  && REALmax > 0.0 && -REALmax < 0.0)
-    ; /* all ok */
-  else {
-    fprintf (qh ferr, "qhull error: floating point constants in user.h are wrong\n\
-REALepsilon %g REALmin %g REALmax %g -REALmax %g\n",
-	     REALepsilon, REALmin, REALmax, -REALmax);
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  set= qh_settemp(2*dimension);
-  for(k= 0; k < dimension; k++) {
-    if (points == qh GOODpointp)
-      minimum= maximum= points + dimension;
-    else
-      minimum= maximum= points;
-    FORALLpoint_(points, numpoints) {
-      if (point == qh GOODpointp)
-	continue;
-      if (maximum[k] < point[k])
-	maximum= point;
-      else if (minimum[k] > point[k])
-	minimum= point;
-    }
-    if (k == dimension-1) {
-      qh MINlastcoord= minimum[k];
-      qh MAXlastcoord= maximum[k];
-    }
-    if (qh SCALElast && k == dimension-1)
-      maxcoord= qh MAXwidth;
-    else {
-      maxcoord= fmax_(maximum[k], -minimum[k]);
-      if (qh GOODpointp) {
-        temp= fmax_(qh GOODpointp[k], -qh GOODpointp[k]);
-        maximize_(maxcoord, temp);
-      }
-      temp= maximum[k] - minimum[k];
-      maximize_(qh MAXwidth, temp);
-    }
-    maximize_(qh MAXabs_coord, maxcoord);
-    qh MAXsumcoord += maxcoord;
-    qh_setappend (&set, maximum);
-    qh_setappend (&set, minimum);
-    /* calculation of qh NEARzero is based on error formula 4.4-13 of
-       Golub & van Loan, authors say n^3 can be ignored and 10 be used in
-       place of rho */
-    qh NEARzero[k]= 80 * qh MAXsumcoord * REALepsilon;
-  }
-  if (qh IStracing >=1)
-    qh_printpoints (qh ferr, "qh_maxmin: found the max and min points (by dim):", set);
-  return(set);
-} /* maxmin */
-
-/*---------------------------------
-
-  qh_maxouter()
-    return maximum distance from facet to outer plane
-    normally this is qh.max_outside+qh.DISTround
-    does not include qh.JOGGLEmax
-
-  see:
-    qh_outerinner()
-    
-  notes:
-    need to add another qh.DISTround if testing actual point with computation
-
-  for joggle:
-    qh_setfacetplane() updated qh.max_outer for Wnewvertexmax (max distance to vertex)
-    need to use Wnewvertexmax since could have a coplanar point for a high 
-      facet that is replaced by a low facet
-    need to add qh.JOGGLEmax if testing input points
-*/
-realT qh_maxouter (void) {
-  realT dist;
-
-  dist= fmax_(qh max_outside, qh DISTround);
-  dist += qh DISTround;
-  trace4((qh ferr, "qh_maxouter: max distance from facet to outer plane is %2.2g max_outside is %2.2g\n", dist, qh max_outside));
-  return dist;
-} /* maxouter */
-
-/*---------------------------------
-  
-  qh_maxsimplex( dim, maxpoints, points, numpoints, simplex )
-    determines maximum simplex for a set of points 
-    starts from points already in simplex
-    skips qh.GOODpointp (assumes that it isn't in maxpoints)
-  
-  returns:
-    simplex with dim+1 points
-
-  notes:
-    assumes at least pointsneeded points in points
-    maximizes determinate for x,y,z,w, etc.
-    uses maxpoints as long as determinate is clearly non-zero
-
-  design:
-    initialize simplex with at least two points
-      (find points with max or min x coordinate)
-    for each remaining dimension
-      add point that maximizes the determinate
-        (use points from maxpoints first)    
-*/
-void qh_maxsimplex (int dim, setT *maxpoints, pointT *points, int numpoints, setT **simplex) {
-  pointT *point, **pointp, *pointtemp, *maxpoint, *minx=NULL, *maxx=NULL;
-  boolT nearzero, maxnearzero= False;
-  int k, sizinit;
-  realT maxdet= -REALmax, det, mincoord= REALmax, maxcoord= -REALmax;
-
-  sizinit= qh_setsize (*simplex);
-  if (sizinit < 2) {
-    if (qh_setsize (maxpoints) >= 2) {
-      FOREACHpoint_(maxpoints) {
-        if (maxcoord < point[0]) {
-          maxcoord= point[0];
-          maxx= point;
-        }
-	if (mincoord > point[0]) {
-          mincoord= point[0];
-          minx= point;
-        }
-      }
-    }else {
-      FORALLpoint_(points, numpoints) {
-	if (point == qh GOODpointp)
-	  continue;
-        if (maxcoord < point[0]) {
-	  maxcoord= point[0];
-          maxx= point;
-        }
-	if (mincoord > point[0]) {
-          mincoord= point[0];
-          minx= point;
-	}
-      }
-    }
-    qh_setunique (simplex, minx);
-    if (qh_setsize (*simplex) < 2)
-      qh_setunique (simplex, maxx);
-    sizinit= qh_setsize (*simplex);
-    if (sizinit < 2) {
-      qh_precision ("input has same x coordinate");
-      if (zzval_(Zsetplane) > qh hull_dim+1) {
-	fprintf (qh ferr, "qhull precision error (qh_maxsimplex for voronoi_center):\n%d points with the same x coordinate.\n",
-		 qh_setsize(maxpoints)+numpoints);
-	qh_errexit (qh_ERRprec, NULL, NULL);
-      }else {
-	fprintf (qh ferr, "qhull input error: input is less than %d-dimensional since it has the same x coordinate\n", qh hull_dim);
-	qh_errexit (qh_ERRinput, NULL, NULL);
-      }
-    }
-  }
-  for(k= sizinit; k < dim+1; k++) {
-    maxpoint= NULL;
-    maxdet= -REALmax;
-    FOREACHpoint_(maxpoints) {
-      if (!qh_setin (*simplex, point)) {
-        det= qh_detsimplex(point, *simplex, k, &nearzero);
-        if ((det= fabs_(det)) > maxdet) {
-	  maxdet= det;
-          maxpoint= point;
-	  maxnearzero= nearzero;
-        }
-      }
-    }
-    if (!maxpoint || maxnearzero) {
-      zinc_(Zsearchpoints);
-      if (!maxpoint) {
-        trace0((qh ferr, "qh_maxsimplex: searching all points for %d-th initial vertex.\n", k+1));
-      }else {
-        trace0((qh ferr, "qh_maxsimplex: searching all points for %d-th initial vertex, better than p%d det %2.2g\n",
-		k+1, qh_pointid(maxpoint), maxdet));
-      }
-      FORALLpoint_(points, numpoints) {
-	if (point == qh GOODpointp)
-	  continue;
-        if (!qh_setin (*simplex, point)) {
-          det= qh_detsimplex(point, *simplex, k, &nearzero);
-          if ((det= fabs_(det)) > maxdet) {
-	    maxdet= det;
-            maxpoint= point;
-	    maxnearzero= nearzero;
-	  }
-        }
-      }
-    } /* !maxpoint */
-    if (!maxpoint) {
-      fprintf (qh ferr, "qhull internal error (qh_maxsimplex): not enough points available\n");
-      qh_errexit (qh_ERRqhull, NULL, NULL);
-    }
-    qh_setappend(simplex, maxpoint);
-    trace1((qh ferr, "qh_maxsimplex: selected point p%d for %d`th initial vertex, det=%2.2g\n",
-	    qh_pointid(maxpoint), k+1, maxdet));
-  } /* k */ 
-} /* maxsimplex */
-
-/*---------------------------------
-  
-  qh_minabsval( normal, dim )
-    return minimum absolute value of a dim vector
-*/
-realT qh_minabsval (realT *normal, int dim) {
-  realT minval= 0;
-  realT maxval= 0;
-  realT *colp;
-  int k;
-
-  for (k= dim, colp= normal; k--; colp++) {
-    maximize_(maxval, *colp);
-    minimize_(minval, *colp);
-  }
-  return fmax_(maxval, -minval);
-} /* minabsval */
-
-
-/*---------------------------------
-  
-  qh_mindif( vecA, vecB, dim )
-    return index of min abs. difference of two vectors
-*/
-int qh_mindiff (realT *vecA, realT *vecB, int dim) {
-  realT mindiff= REALmax, diff;
-  realT *vecAp= vecA, *vecBp= vecB;
-  int k, mink= 0;
-
-  for (k= 0; k < dim; k++) {
-    diff= *vecAp++ - *vecBp++;
-    diff= fabs_(diff);
-    if (diff < mindiff) {
-      mindiff= diff;
-      mink= k;
-    }
-  }
-  return mink;
-} /* mindiff */
-
-
-
-/*---------------------------------
-  
-  qh_orientoutside( facet  )
-    make facet outside oriented via qh.interior_point
-
-  returns:
-    True if facet reversed orientation.
-*/
-boolT qh_orientoutside (facetT *facet) {
-  int k;
-  realT dist;
-
-  qh_distplane (qh interior_point, facet, &dist);
-  if (dist > 0) {
-    for (k= qh hull_dim; k--; )
-      facet->normal[k]= -facet->normal[k];
-    facet->offset= -facet->offset;
-    return True;
-  }
-  return False;
-} /* orientoutside */
-
-/*---------------------------------
-  
-  qh_outerinner( facet, outerplane, innerplane  )
-    if facet and qh.maxoutdone (i.e., qh_check_maxout)
-      returns outer and inner plane for facet
-    else
-      returns maximum outer and inner plane
-    accounts for qh.JOGGLEmax
-
-  see:
-    qh_maxouter(), qh_check_bestdist(), qh_check_points()
-
-  notes:
-    outerplaner or innerplane may be NULL
-    
-    includes qh.DISTround for actual points
-    adds another qh.DISTround if testing with floating point arithmetic
-*/
-void qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane) {
-  realT dist, mindist;
-  vertexT *vertex, **vertexp;
-
-  if (outerplane) {
-    if (!qh_MAXoutside || !facet || !qh maxoutdone) {
-      *outerplane= qh_maxouter();       /* includes qh.DISTround */
-    }else { /* qh_MAXoutside ... */
-#if qh_MAXoutside 
-      *outerplane= facet->maxoutside + qh DISTround;
-#endif
-      
-    }
-    if (qh JOGGLEmax < REALmax/2)
-      *outerplane += qh JOGGLEmax * sqrt (qh hull_dim);
-  }
-  if (innerplane) {
-    if (facet) {
-      mindist= REALmax;
-      FOREACHvertex_(facet->vertices) {
-        zinc_(Zdistio);
-        qh_distplane (vertex->point, facet, &dist);
-        minimize_(mindist, dist);
-      }
-      *innerplane= mindist - qh DISTround;
-    }else 
-      *innerplane= qh min_vertex - qh DISTround;
-    if (qh JOGGLEmax < REALmax/2)
-      *innerplane -= qh JOGGLEmax * sqrt (qh hull_dim);
-  }
-} /* outerinner */
-
-/*---------------------------------
-  
-  qh_pointdist( point1, point2, dim )
-    return distance between two points
-
-  notes:
-    returns distance squared if 'dim' is negative
-*/
-coordT qh_pointdist(pointT *point1, pointT *point2, int dim) {
-  coordT dist, diff;
-  int k;
-  
-  dist= 0.0;
-  for (k= (dim > 0 ? dim : -dim); k--; ) {
-    diff= *point1++ - *point2++;
-    dist += diff * diff;
-  }
-  if (dim > 0)
-    return(sqrt(dist));
-  return dist;
-} /* pointdist */
-
-
-/*---------------------------------
-  
-  qh_printmatrix( fp, string, rows, numrow, numcol )
-    print matrix to fp given by row vectors
-    print string as header
-
-  notes:
-    print a vector by qh_printmatrix(fp, "", &vect, 1, len)
-*/
-void qh_printmatrix (FILE *fp, char *string, realT **rows, int numrow, int numcol) {
-  realT *rowp;
-  realT r; /*bug fix*/
-  int i,k;
-
-  fprintf (fp, "%s\n", string);
-  for (i= 0; i < numrow; i++) {
-    rowp= rows[i];
-    for (k= 0; k < numcol; k++) {
-      r= *rowp++;
-      fprintf (fp, "%6.3g ", r);
-    }
-    fprintf (fp, "\n");
-  }
-} /* printmatrix */
-
-  
-/*---------------------------------
-  
-  qh_printpoints( fp, string, points )
-    print pointids to fp for a set of points
-    if string, prints string and 'p' point ids
-*/
-void qh_printpoints (FILE *fp, char *string, setT *points) {
-  pointT *point, **pointp;
-
-  if (string) {
-    fprintf (fp, "%s", string);
-    FOREACHpoint_(points) 
-      fprintf (fp, " p%d", qh_pointid(point));
-    fprintf (fp, "\n");
-  }else {
-    FOREACHpoint_(points) 
-      fprintf (fp, " %d", qh_pointid(point));
-    fprintf (fp, "\n");
-  }
-} /* printpoints */
-
-  
-/*---------------------------------
-  
-  qh_projectinput()
-    project input points using qh.lower_bound/upper_bound and qh DELAUNAY
-    if qh.lower_bound[k]=qh.upper_bound[k]= 0, 
-      removes dimension k 
-    if halfspace intersection
-      removes dimension k from qh.feasible_point
-    input points in qh first_point, num_points, input_dim
-
-  returns:
-    new point array in qh first_point of qh hull_dim coordinates
-    sets qh POINTSmalloc
-    if qh DELAUNAY 
-      projects points to paraboloid
-      lowbound/highbound is also projected
-    if qh ATinfinity
-      adds point "at-infinity"
-    if qh POINTSmalloc 
-      frees old point array
-
-  notes:
-    checks that qh.hull_dim agrees with qh.input_dim, PROJECTinput, and DELAUNAY
-
-
-  design:
-    sets project[k] to -1 (delete), 0 (keep), 1 (add for Delaunay)
-    determines newdim and newnum for qh hull_dim and qh num_points
-    projects points to newpoints
-    projects qh.lower_bound to itself
-    projects qh.upper_bound to itself
-    if qh DELAUNAY
-      if qh ATINFINITY
-        projects points to paraboloid
-        computes "infinity" point as vertex average and 10% above all points 
-      else
-        uses qh_setdelaunay to project points to paraboloid
-*/
-void qh_projectinput (void) {
-  int k,i;
-  int newdim= qh input_dim, newnum= qh num_points;
-  signed char *project;
-  int size= (qh input_dim+1)*sizeof(*project);
-  pointT *newpoints, *coord, *infinity;
-  realT paraboloid, maxboloid= 0;
-  
-  project= (signed char*)qh_memalloc (size);
-  memset ((char*)project, 0, size);
-  for (k= 0; k < qh input_dim; k++) {   /* skip Delaunay bound */
-    if (qh lower_bound[k] == 0 && qh upper_bound[k] == 0) {
-      project[k]= -1;
-      newdim--;
-    }
-  }
-  if (qh DELAUNAY) {
-    project[k]= 1;
-    newdim++;
-    if (qh ATinfinity)
-      newnum++;
-  }
-  if (newdim != qh hull_dim) {
-    fprintf(qh ferr, "qhull internal error (qh_projectinput): dimension after projection %d != hull_dim %d\n", newdim, qh hull_dim);
-    qh_errexit(qh_ERRqhull, NULL, NULL);
-  }
-  if (!(newpoints=(coordT*)malloc(newnum*newdim*sizeof(coordT)))){
-    fprintf(qh ferr, "qhull error: insufficient memory to project %d points\n",
-           qh num_points);
-    qh_errexit(qh_ERRmem, NULL, NULL);
-  }
-  qh_projectpoints (project, qh input_dim+1, qh first_point,
-                    qh num_points, qh input_dim, newpoints, newdim);
-  trace1((qh ferr, "qh_projectinput: updating lower and upper_bound\n"));
-  qh_projectpoints (project, qh input_dim+1, qh lower_bound,
-                    1, qh input_dim+1, qh lower_bound, newdim+1);
-  qh_projectpoints (project, qh input_dim+1, qh upper_bound,
-                    1, qh input_dim+1, qh upper_bound, newdim+1);
-  if (qh HALFspace) {
-    if (!qh feasible_point) {
-      fprintf(qh ferr, "qhull internal error (qh_projectinput): HALFspace defined without qh.feasible_point\n");
-      qh_errexit(qh_ERRqhull, NULL, NULL);
-    }
-    qh_projectpoints (project, qh input_dim, qh feasible_point,
-		      1, qh input_dim, qh feasible_point, newdim);
-  }
-  qh_memfree(project, ((qh input_dim+1)*sizeof(*project)));
-  if (qh POINTSmalloc)
-    free (qh first_point);
-  qh first_point= newpoints;
-  qh POINTSmalloc= True;
-  if (qh DELAUNAY && qh ATinfinity) {
-    coord= qh first_point;
-    infinity= qh first_point + qh hull_dim * qh num_points;
-    for (k=qh hull_dim-1; k--; )
-      infinity[k]= 0.0;
-    for (i=qh num_points; i--; ) {
-      paraboloid= 0.0;
-      for (k=qh hull_dim-1; k--; ) {
-        paraboloid += *coord * *coord;
-	infinity[k] += *coord;
-        coord++;
-      }
-      *(coord++)= paraboloid;
-      maximize_(maxboloid, paraboloid);
-    }
-    /* coord == infinity */
-    for (k=qh hull_dim-1; k--; )
-      *(coord++) /= qh num_points;
-    *(coord++)= maxboloid * 1.1;
-    qh num_points++;
-    trace0((qh ferr, "qh_projectinput: projected points to paraboloid for Delaunay\n"));
-  }else if (qh DELAUNAY)  /* !qh ATinfinity */
-    qh_setdelaunay( qh hull_dim, qh num_points, qh first_point);
-} /* projectinput */
-
-  
-/*---------------------------------
-  
-  qh_projectpoints( project, n, points, numpoints, dim, newpoints, newdim )
-    project points/numpoints/dim to newpoints/newdim
-    if project[k] == -1
-      delete dimension k 
-    if project[k] == 1 
-      add dimension k by duplicating previous column
-    n is size of project
-
-  notes:
-    newpoints may be points if only adding dimension at end
-
-  design:
-    check that 'project' and 'newdim' agree
-    for each dimension
-      if project == -1
-        skip dimension
-      else
-        determine start of column in newpoints
-        determine start of column in points 
-          if project == +1, duplicate previous column
-        copy dimension (column) from points to newpoints
-*/
-void qh_projectpoints (signed char *project, int n, realT *points, 
-        int numpoints, int dim, realT *newpoints, int newdim) {
-  int testdim= dim, oldk=0, newk=0, i,j=0,k;
-  realT *newp, *oldp;
-  
-  for (k= 0; k < n; k++)
-    testdim += project[k];
-  if (testdim != newdim) {
-    fprintf (qh ferr, "qhull internal error (qh_projectpoints): newdim %d should be %d after projection\n",
-      newdim, testdim);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  for (j= 0; j= dim)
-	  continue;
-	oldp= points+oldk;
-      }else 
-	oldp= points+oldk++;
-      for (i=numpoints; i--; ) {
-        *newp= *oldp;
-        newp += newdim;
-        oldp += dim;
-      }
-    }
-    if (oldk >= dim)
-      break;
-  }
-  trace1((qh ferr, "qh_projectpoints: projected %d points from dim %d to dim %d\n", 
-    numpoints, dim, newdim));
-} /* projectpoints */
-        
-
-/*---------------------------------
-  
-  qh_rand() 
-  qh_srand( seed )
-    generate pseudo-random number between 1 and 2^31 -2
-
-  notes:
-    from Park & Miller's minimimal standard random number generator
-       Communications of the ACM, 31:1192-1201, 1988.
-    does not use 0 or 2^31 -1
-       this is silently enforced by qh_srand()
-    can make 'Rn' much faster by moving qh_rand to qh_distplane
-*/
-int qh_rand_seed= 1;  /* define as global variable instead of using qh */
-
-int qh_rand( void) {
-#define qh_rand_a 16807
-#define qh_rand_m 2147483647
-#define qh_rand_q 127773  /* m div a */
-#define qh_rand_r 2836    /* m mod a */
-  int lo, hi, test;
-  int seed = qh_rand_seed;
-
-  hi = seed / qh_rand_q;  /* seed div q */
-  lo = seed % qh_rand_q;  /* seed mod q */
-  test = qh_rand_a * lo - qh_rand_r * hi;
-  if (test > 0)
-    seed= test;
-  else
-    seed= test + qh_rand_m;
-  qh_rand_seed= seed;
-  /* seed = seed < qh_RANDOMmax/2 ? 0 : qh_RANDOMmax;  for testing */
-  /* seed = qh_RANDOMmax;  for testing */
-  return seed;
-} /* rand */
-
-void qh_srand( int seed) {
-  if (seed < 1)
-    qh_rand_seed= 1;
-  else if (seed >= qh_rand_m)
-    qh_rand_seed= qh_rand_m - 1;
-  else
-    qh_rand_seed= seed;
-} /* qh_srand */
-
-/*---------------------------------
-  
-  qh_randomfactor()
-    return a random factor within qh.RANDOMmax of 1.0
-
-  notes:
-    qh.RANDOMa/b are defined in global.c
-*/
-realT qh_randomfactor (void) {
-  realT randr;
-
-  randr= qh_RANDOMint;
-  return randr * qh RANDOMa + qh RANDOMb;
-} /* randomfactor */
-
-/*---------------------------------
-  
-  qh_randommatrix( buffer, dim, rows )
-    generate a random dim X dim matrix in range [-1,1]
-    assumes buffer is [dim+1, dim]
-
-  returns:
-    sets buffer to random numbers
-    sets rows to rows of buffer
-      sets row[dim] as scratch row
-*/
-void qh_randommatrix (realT *buffer, int dim, realT **rows) {
-  int i, k;
-  realT **rowi, *coord, realr;
-
-  coord= buffer;
-  rowi= rows;
-  for (i=0; i < dim; i++) {
-    *(rowi++)= coord;
-    for (k=0; k < dim; k++) {
-      realr= qh_RANDOMint;
-      *(coord++)= 2.0 * realr/(qh_RANDOMmax+1) - 1.0;
-    }
-  }
-  *rowi= coord;
-} /* randommatrix */
-
-        
-/*---------------------------------
-  
-  qh_rotateinput( rows )
-    rotate input using row matrix
-    input points given by qh first_point, num_points, hull_dim
-    assumes rows[dim] is a scratch buffer
-    if qh POINTSmalloc, overwrites input points, else mallocs a new array
-
-  returns:
-    rotated input
-    sets qh POINTSmalloc
-
-  design:
-    see qh_rotatepoints
-*/
-void qh_rotateinput (realT **rows) {
-
-  if (!qh POINTSmalloc) {
-    qh first_point= qh_copypoints (qh first_point, qh num_points, qh hull_dim);
-    qh POINTSmalloc= True;
-  }
-  qh_rotatepoints (qh first_point, qh num_points, qh hull_dim, rows);
-}  /* rotateinput */
-
-/*---------------------------------
-  
-  qh_rotatepoints( points, numpoints, dim, row )
-    rotate numpoints points by a d-dim row matrix
-    assumes rows[dim] is a scratch buffer
-
-  returns:
-    rotated points in place
-
-  design:
-    for each point
-      for each coordinate
-        use row[dim] to compute partial inner product
-      for each coordinate
-        rotate by partial inner product
-*/
-void qh_rotatepoints (realT *points, int numpoints, int dim, realT **row) {
-  realT *point, *rowi, *coord= NULL, sum, *newval;
-  int i,j,k;
-
-  if (qh IStracing >= 1)
-    qh_printmatrix (qh ferr, "qh_rotatepoints: rotate points by", row, dim, dim);
-  for (point= points, j= numpoints; j--; point += dim) {
-    newval= row[dim];
-    for (i= 0; i < dim; i++) {
-      rowi= row[i];
-      coord= point;
-      for (sum= 0.0, k= dim; k--; )
-        sum += *rowi++ * *coord++;
-      *(newval++)= sum;
-    }
-    for (k= dim; k--; )
-      *(--coord)= *(--newval);
-  }
-} /* rotatepoints */  
-  
-
-/*---------------------------------
-  
-  qh_scaleinput()
-    scale input points using qh low_bound/high_bound
-    input points given by qh first_point, num_points, hull_dim
-    if qh POINTSmalloc, overwrites input points, else mallocs a new array
-
-  returns:
-    scales coordinates of points to low_bound[k], high_bound[k]
-    sets qh POINTSmalloc
-
-  design:
-    see qh_scalepoints
-*/
-void qh_scaleinput (void) {
-
-  if (!qh POINTSmalloc) {
-    qh first_point= qh_copypoints (qh first_point, qh num_points, qh hull_dim);
-    qh POINTSmalloc= True;
-  }
-  qh_scalepoints (qh first_point, qh num_points, qh hull_dim,
-       qh lower_bound, qh upper_bound);
-}  /* scaleinput */
-  
-/*---------------------------------
-  
-  qh_scalelast( points, numpoints, dim, low, high, newhigh )
-    scale last coordinate to [0,m] for Delaunay triangulations
-    input points given by points, numpoints, dim
-
-  returns:
-    changes scale of last coordinate from [low, high] to [0, newhigh]
-    overwrites last coordinate of each point
-    saves low/high/newhigh in qh.last_low, etc. for qh_setdelaunay()
-
-  notes:
-    when called by qh_setdelaunay, low/high may not match actual data
-    
-  design:
-    compute scale and shift factors
-    apply to last coordinate of each point
-*/
-void qh_scalelast (coordT *points, int numpoints, int dim, coordT low,
-		   coordT high, coordT newhigh) {
-  realT scale, shift;
-  coordT *coord;
-  int i;
-  boolT nearzero= False;
-
-  trace4((qh ferr, "qh_scalelast: scale last coordinate from [%2.2g, %2.2g] to [0,%2.2g]\n",
-    low, high, newhigh));
-  qh last_low= low;
-  qh last_high= high;
-  qh last_newhigh= newhigh;
-  scale= qh_divzero (newhigh, high - low,
-                  qh MINdenom_1, &nearzero);
-  if (nearzero) {
-    if (qh DELAUNAY)
-      fprintf (qh ferr, "qhull input error: can not scale last coordinate.  Input is cocircular\n   or cospherical.   Use option 'Qz' to add a point at infinity.\n");
-    else
-      fprintf (qh ferr, "qhull input error: can not scale last coordinate.  New bounds [0, %2.2g] are too wide for\nexisting bounds [%2.2g, %2.2g] (width %2.2g)\n",
-		newhigh, low, high, high-low);
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  shift= - low * newhigh / (high-low);
-  coord= points + dim - 1;
-  for (i= numpoints; i--; coord += dim)
-    *coord= *coord * scale + shift;
-} /* scalelast */
-
-/*---------------------------------
-  
-  qh_scalepoints( points, numpoints, dim, newlows, newhighs )
-    scale points to new lowbound and highbound
-    retains old bound when newlow= -REALmax or newhigh= +REALmax
-
-  returns:
-    scaled points
-    overwrites old points
-
-  design:
-    for each coordinate
-      compute current low and high bound
-      compute scale and shift factors
-      scale all points
-      enforce new low and high bound for all points
-*/
-void qh_scalepoints (pointT *points, int numpoints, int dim,
-	realT *newlows, realT *newhighs) {
-  int i,k;
-  realT shift, scale, *coord, low, high, newlow, newhigh, mincoord, maxcoord;
-  boolT nearzero= False;
-     
-  for (k= 0; k < dim; k++) {
-    newhigh= newhighs[k];
-    newlow= newlows[k];
-    if (newhigh > REALmax/2 && newlow < -REALmax/2)
-      continue;
-    low= REALmax;
-    high= -REALmax;
-    for (i= numpoints, coord= points+k; i--; coord += dim) {
-      minimize_(low, *coord);
-      maximize_(high, *coord);
-    }
-    if (newhigh > REALmax/2)
-      newhigh= high;
-    if (newlow < -REALmax/2)
-      newlow= low;
-    if (qh DELAUNAY && k == dim-1 && newhigh < newlow) {
-      fprintf (qh ferr, "qhull input error: 'Qb%d' or 'QB%d' inverts paraboloid since high bound %.2g < low bound %.2g\n",
-	       k, k, newhigh, newlow);
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    scale= qh_divzero (newhigh - newlow, high - low,
-                  qh MINdenom_1, &nearzero);
-    if (nearzero) {
-      fprintf (qh ferr, "qhull input error: %d'th dimension's new bounds [%2.2g, %2.2g] too wide for\nexisting bounds [%2.2g, %2.2g]\n",
-              k, newlow, newhigh, low, high);
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    shift= (newlow * high - low * newhigh)/(high-low);
-    coord= points+k;
-    for (i= numpoints; i--; coord += dim)
-      *coord= *coord * scale + shift;
-    coord= points+k;
-    if (newlow < newhigh) {
-      mincoord= newlow;
-      maxcoord= newhigh;
-    }else {
-      mincoord= newhigh;
-      maxcoord= newlow;
-    }
-    for (i= numpoints; i--; coord += dim) {
-      minimize_(*coord, maxcoord);  /* because of roundoff error */
-      maximize_(*coord, mincoord);
-    }
-    trace0((qh ferr, "qh_scalepoints: scaled %d'th coordinate [%2.2g, %2.2g] to [%.2g, %.2g] for %d points by %2.2g and shifted %2.2g\n",
-      k, low, high, newlow, newhigh, numpoints, scale, shift));
-  }
-} /* scalepoints */    
-
-       
-/*---------------------------------
-  
-  qh_setdelaunay( dim, count, points )
-    project count points to dim-d paraboloid for Delaunay triangulation
-    
-    dim is one more than the dimension of the input set
-    assumes dim is at least 3 (i.e., at least a 2-d Delaunay triangulation)
-
-    points is a dim*count realT array.  The first dim-1 coordinates
-    are the coordinates of the first input point.  array[dim] is
-    the first coordinate of the second input point.  array[2*dim] is
-    the first coordinate of the third input point.
-
-    if qh.last_low defined (i.e., 'Qbb' called qh_scalelast)
-      calls qh_scalelast to scale the last coordinate the same as the other points
-
-  returns:
-    for each point
-      sets point[dim-1] to sum of squares of coordinates
-    scale points to 'Qbb' if needed
-      
-  notes:
-    to project one point, use
-      qh_setdelaunay (qh hull_dim, 1, point)
-      
-    Do not use options 'Qbk', 'QBk', or 'QbB' since they scale 
-    the coordinates after the original projection.
-
-*/
-void qh_setdelaunay (int dim, int count, pointT *points) {
-  int i, k;
-  coordT *coordp, coord;
-  realT paraboloid;
-
-  trace0((qh ferr, "qh_setdelaunay: project %d points to paraboloid for Delaunay triangulation\n", count));
-  coordp= points;
-  for (i= 0; i < count; i++) {
-    coord= *coordp++;
-    paraboloid= coord*coord;
-    for (k= dim-2; k--; ) {
-      coord= *coordp++;
-      paraboloid += coord*coord;
-    }
-    *coordp++ = paraboloid;
-  }
-  if (qh last_low < REALmax/2) 
-    qh_scalelast (points, count, dim, qh last_low, qh last_high, qh last_newhigh);
-} /* setdelaunay */
-
-  
-/*---------------------------------
-  
-  qh_sethalfspace( dim, coords, nextp, normal, offset, feasible )
-    set point to dual of halfspace relative to feasible point
-    halfspace is normal coefficients and offset.
-
-  returns:
-    false if feasible point is outside of hull (error message already reported)
-    overwrites coordinates for point at dim coords
-    nextp= next point (coords)
-
-  design:
-    compute distance from feasible point to halfspace
-    divide each normal coefficient by -dist
-*/
-boolT qh_sethalfspace (int dim, coordT *coords, coordT **nextp, 
-         coordT *normal, coordT *offset, coordT *feasible) {
-  coordT *normp= normal, *feasiblep= feasible, *coordp= coords;
-  realT dist;
-  realT r; /*bug fix*/
-  int k;
-  boolT zerodiv;
-
-  dist= *offset;
-  for (k= dim; k--; )
-    dist += *(normp++) * *(feasiblep++);
-  if (dist > 0)
-    goto LABELerroroutside;
-  normp= normal;
-  if (dist < -qh MINdenom) {
-    for (k= dim; k--; )
-      *(coordp++)= *(normp++) / -dist;
-  }else {
-    for (k= dim; k--; ) {
-      *(coordp++)= qh_divzero (*(normp++), -dist, qh MINdenom_1, &zerodiv);
-      if (zerodiv) 
-        goto LABELerroroutside;
-    }
-  }
-  *nextp= coordp;
-  if (qh IStracing >= 4) {
-    fprintf (qh ferr, "qh_sethalfspace: halfspace at offset %6.2g to point: ", *offset);
-    for (k= dim, coordp= coords; k--; ) {
-      r= *coordp++;
-      fprintf (qh ferr, " %6.2g", r);
-    }
-    fprintf (qh ferr, "\n");
-  }
-  return True;
-LABELerroroutside:
-  feasiblep= feasible;
-  normp= normal;
-  fprintf(qh ferr, "qhull input error: feasible point is not clearly inside halfspace\nfeasible point: ");
-  for (k= dim; k--; )
-    fprintf (qh ferr, qh_REAL_1, r=*(feasiblep++));
-  fprintf (qh ferr, "\n     halfspace: "); 
-  for (k= dim; k--; )
-    fprintf (qh ferr, qh_REAL_1, r=*(normp++));
-  fprintf (qh ferr, "\n     at offset: ");
-  fprintf (qh ferr, qh_REAL_1, *offset);
-  fprintf (qh ferr, " and distance: ");
-  fprintf (qh ferr, qh_REAL_1, dist);
-  fprintf (qh ferr, "\n");
-  return False;
-} /* sethalfspace */
-
-/*---------------------------------
-  
-  qh_sethalfspace_all( dim, count, halfspaces, feasible )
-    generate dual for halfspace intersection with feasible point
-    array of count halfspaces
-      each halfspace is normal coefficients followed by offset 
-      the origin is inside the halfspace if the offset is negative
-
-  returns:
-    malloc'd array of count X dim-1 points
-
-  notes:
-    call before qh_init_B or qh_initqhull_globals 
-    unused/untested code: please email bradb@shore.net if this works ok for you
-    If using option 'Fp', also set qh feasible_point. It is a malloc'd array 
-      that is freed by qh_freebuffers.
-
-  design:
-    see qh_sethalfspace
-*/
-coordT *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible) {
-  int i, newdim;
-  pointT *newpoints;
-  coordT *coordp, *normalp, *offsetp;
-
-  trace0((qh ferr, "qh_sethalfspace_all: compute dual for halfspace intersection\n"));
-  newdim= dim - 1;
-  if (!(newpoints=(coordT*)malloc(count*newdim*sizeof(coordT)))){
-    fprintf(qh ferr, "qhull error: insufficient memory to compute dual of %d halfspaces\n",
-          count);
-    qh_errexit(qh_ERRmem, NULL, NULL);
-  }
-  coordp= newpoints;
-  normalp= halfspaces;
-  for (i= 0; i < count; i++) {
-    offsetp= normalp + newdim;
-    if (!qh_sethalfspace (newdim, coordp, &coordp, normalp, offsetp, feasible)) {
-      fprintf (qh ferr, "The halfspace was at index %d\n", i);
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    normalp= offsetp + 1;
-  }
-  return newpoints;
-} /* sethalfspace_all */
-
-  
-/*---------------------------------
-  
-  qh_sharpnewfacets()
-
-  returns:
-    true if could be an acute angle (facets in different quadrants)
- 
-  notes:
-    for qh_findbest
-
-  design:
-    for all facets on qh.newfacet_list
-      if two facets are in different quadrants
-        set issharp
-*/
-boolT qh_sharpnewfacets () {
-  facetT *facet;
-  boolT issharp = False;
-  int *quadrant, k;
-  
-  quadrant= (int*)qh_memalloc (qh hull_dim * sizeof(int));
-  FORALLfacet_(qh newfacet_list) {
-    if (facet == qh newfacet_list) {
-      for (k= qh hull_dim; k--; )
-      	quadrant[ k]= (facet->normal[ k] > 0);
-    }else {
-      for (k= qh hull_dim; k--; ) {
-        if (quadrant[ k] != (facet->normal[ k] > 0)) {
-          issharp= True;
-          break;
-        }
-      }
-    }
-    if (issharp)
-      break;
-  }
-  qh_memfree( quadrant, qh hull_dim * sizeof(int));
-  trace3((qh ferr, "qh_sharpnewfacets: %d\n", issharp));
-  return issharp;
-} /* sharpnewfacets */
-
-/*---------------------------------
-  
-  qh_voronoi_center( dim, points )
-    return Voronoi center for a set of points
-    dim is the orginal dimension of the points
-    gh.gm_matrix/qh.gm_row are scratch buffers
-
-  returns:
-    center as a temporary point
-    if non-simplicial, 
-      returns center for max simplex of points
-
-  notes:
-    from Bowyer & Woodwark, A Programmer's Geometry, 1983, p. 65
-
-  design:
-    if non-simplicial
-      determine max simplex for points
-    translate point0 of simplex to origin
-    compute sum of squares of diagonal
-    compute determinate
-    compute Voronoi center (see Bowyer & Woodwark)
-*/
-pointT *qh_voronoi_center (int dim, setT *points) {
-  pointT *point, **pointp, *point0;
-  pointT *center= (pointT*)qh_memalloc (qh center_size);
-  setT *simplex;
-  int i, j, k, size= qh_setsize(points);
-  coordT *gmcoord;
-  realT *diffp, sum2, *sum2row, *sum2p, det, factor;
-  boolT nearzero, infinite;
-
-  if (size == dim+1)
-    simplex= points;
-  else if (size < dim+1) {
-    fprintf (qh ferr, "qhull internal error (qh_voronoi_center):\n  need at least %d points to construct a Voronoi center\n",
-	     dim+1);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }else {
-    simplex= qh_settemp (dim+1);
-    qh_maxsimplex (dim, points, NULL, 0, &simplex);
-  }
-  point0= SETfirstt_(simplex, pointT);
-  gmcoord= qh gm_matrix;
-  for (k=0; k < dim; k++) {
-    qh gm_row[k]= gmcoord;
-    FOREACHpoint_(simplex) {
-      if (point != point0)
-        *(gmcoord++)= point[k] - point0[k];
-    }
-  }
-  sum2row= gmcoord;
-  for (i=0; i < dim; i++) {
-    sum2= 0.0;
-    for (k= 0; k < dim; k++) {
-      diffp= qh gm_row[k] + i;
-      sum2 += *diffp * *diffp;
-    }
-    *(gmcoord++)= sum2;
-  }
-  det= qh_determinant (qh gm_row, dim, &nearzero);
-  factor= qh_divzero (0.5, det, qh MINdenom, &infinite);
-  if (infinite) {
-    for (k=dim; k--; )
-      center[k]= qh_INFINITE;
-    if (qh IStracing)
-      qh_printpoints (qh ferr, "qh_voronoi_center: at infinity for ", simplex);
-  }else {
-    for (i=0; i < dim; i++) {
-      gmcoord= qh gm_matrix;
-      sum2p= sum2row;
-      for (k=0; k < dim; k++) {
-	qh gm_row[k]= gmcoord;
-	if (k == i) {
-	  for (j= dim; j--; )
-	    *(gmcoord++)= *sum2p++;
-	}else {
-	  FOREACHpoint_(simplex) {
-	    if (point != point0)
-	      *(gmcoord++)= point[k] - point0[k];
-	  }
-	}
-      }
-      center[i]= qh_determinant (qh gm_row, dim, &nearzero)*factor + point0[i];
-    }
-#ifndef qh_NOtrace
-    if (qh IStracing >= 3) {
-      fprintf (qh ferr, "qh_voronoi_center: det %2.2g factor %2.2g ", det, factor);
-      qh_printmatrix (qh ferr, "center:", ¢er, 1, dim);
-      if (qh IStracing >= 5) {
-	qh_printpoints (qh ferr, "points", simplex);
-	FOREACHpoint_(simplex)
-	  fprintf (qh ferr, "p%d dist %.2g, ", qh_pointid (point),
-		   qh_pointdist (point, center, dim));
-	fprintf (qh ferr, "\n");
-      }
-    }
-#endif
-  }
-  if (simplex != points)
-    qh_settempfree (&simplex);
-  return center;
-} /* voronoi_center */
-
diff --git a/extern/qhull/src/global.c b/extern/qhull/src/global.c
deleted file mode 100644
index d3e141aa985..00000000000
--- a/extern/qhull/src/global.c
+++ /dev/null
@@ -1,2018 +0,0 @@
-/*
  ---------------------------------
-
-   global.c
-   initializes all the globals of the qhull application
-
-   see README
-
-   see qhull.h for qh.globals and function prototypes
-
-   see qhull_a.h for internal functions
-
-   copyright (c) 1993-2002, The Geometry Center
- */
-
-#include "qhull_a.h"
-
-/*========= qh definition =======================*/
-
-#if qh_QHpointer
-qhT *qh_qh= NULL;	/* pointer to all global variables */
-#else
-qhT qh_qh;     		/* all global variables.
-			   Add "= {0}" if this causes a compiler error.
-			   Also qh_qhstat in stat.c and qhmem in mem.c.  */
-#endif
-
-/*---------------------------------
-
-  qh_appendprint( printFormat )
-    append printFormat to qh.PRINTout unless already defined
-*/
-void qh_appendprint (qh_PRINT format) {
-  int i;
-
-  for (i=0; i < qh_PRINTEND; i++) {
-    if (qh PRINTout[i] == format && format != qh_PRINTqhull)
-      break;
-    if (!qh PRINTout[i]) {
-      qh PRINTout[i]= format;
-      break;
-    }
-  }
-} /* appendprint */
-     
-/*---------------------------------
-  
-  qh_checkflags( commandStr, hiddenFlags )
-    errors if commandStr contains hiddenFlags
-    hiddenFlags starts and ends with a space and is space deliminated (checked)
-
-  notes:
-    ignores first word (e.g., "qconvex i")
-    use qh_strtol/strtod since strtol/strtod may or may not skip trailing spaces
-  
-  see:
-    qh_initflags() initializes Qhull according to commandStr
-*/
-void qh_checkflags(char *command, char *hiddenflags) {
-  char *s= command, *t, *chkerr, key, opt, prevopt;
-  char chkkey[]= "   ";
-  char chkopt[]=  "    ";
-  char chkopt2[]= "     ";
-
-  if (*hiddenflags != ' ' || hiddenflags[strlen(hiddenflags)-1] != ' ') {
-    fprintf(qh ferr, "qhull error (qh_checkflags): hiddenflags must start and end with a space: \"%s\"", hiddenflags);
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  if (strpbrk(hiddenflags, ",\n\r\t")) { 
-    fprintf(qh ferr, "qhull error (qh_checkflags): hiddenflags contains commas, newlines, or tabs: \"%s\"", hiddenflags);
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  while (*s && !isspace(*s))  /* skip program name */
-    s++;
-  while (*s) {
-    while (*s && isspace(*s))
-      s++;
-    if (*s == '-')
-      s++;
-    if (!*s)
-      break;
-    key = *s++;
-    chkerr = NULL;
-    if (key == '\'') {         /* TO 'file name' */
-      t= strchr(s, '\'');
-      if (!t) {
-	fprintf(qh ferr, "qhull error (qh_checkflags): missing the 2nd single-quote for:\n%s\n", s-1);
-	qh_errexit(qh_ERRinput, NULL, NULL);
-      }
-      s= t+1;
-      continue;
-    }
-    chkkey[1]= key;
-    if (strstr(hiddenflags, chkkey)) {
-      chkerr= chkkey;
-    }else if (isupper(key)) {
-      opt= ' ';
-      prevopt= ' ';
-      chkopt[1]= key;
-      chkopt2[1]= key;
-      while (!chkerr && *s && !isspace(*s)) {
-	opt= *s++;
-	if (isalpha(opt)) {
-	  chkopt[2]= opt;
-	  if (strstr(hiddenflags, chkopt))
-	    chkerr= chkopt;
-	  if (prevopt != ' ') {
- 	    chkopt2[2]= prevopt;
- 	    chkopt2[3]= opt;
-	    if (strstr(hiddenflags, chkopt2))
-	      chkerr= chkopt2;
-	  }
-	}else if (key == 'Q' && isdigit(opt) && prevopt != 'b' 
-	      && (prevopt == ' ' || islower(prevopt))) {
-  	    chkopt[2]= opt;
-	    if (strstr(hiddenflags, chkopt))
-	      chkerr= chkopt;
-	}else {
-	  qh_strtod (s-1, &t);
-	  if (s < t)
-	    s= t;
-	}
-        prevopt= opt;
-      }
-    }
-    if (chkerr) {
-      *chkerr= '\'';
-      chkerr[strlen(chkerr)-1]=  '\'';
-      fprintf(qh ferr, "qhull error: option %s is not used with this program.\n             It may be used with qhull.\n", chkerr);
-      qh_errexit(qh_ERRinput, NULL, NULL);
-    }
-  }
-} /* checkflags */
-    
-/*---------------------------------
-  
-  qh_clock()
-    return user CPU time in 100ths (qh_SECtick)
-    only defined for qh_CLOCKtype == 2
-
-  notes:
-    use first value to determine time 0
-    from Stevens '92 8.15
-*/
-unsigned long qh_clock (void) {
-
-#if (qh_CLOCKtype == 2)
-  struct tms time;
-  static long clktck;  /* initialized first call */
-  double ratio, cpu;
-  unsigned long ticks;
-
-  if (!clktck) {
-    if ((clktck= sysconf (_SC_CLK_TCK)) < 0) {
-      fprintf (qh ferr, "qhull internal error (qh_clock): sysconf() failed.  Use qh_CLOCKtype 1 in user.h\n");
-      qh_errexit (qh_ERRqhull, NULL, NULL);
-    }
-  }
-  if (times (&time) == -1) {
-    fprintf (qh ferr, "qhull internal error (qh_clock): times() failed.  Use qh_CLOCKtype 1 in user.h\n");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  ratio= qh_SECticks / (double)clktck;
-  ticks= time.tms_utime * ratio;
-  return ticks;
-#else
-  fprintf (qh ferr, "qhull internal error (qh_clock): use qh_CLOCKtype 2 in user.h\n");
-  qh_errexit (qh_ERRqhull, NULL, NULL); /* never returns */
-  return 0;
-#endif
-} /* clock */
-
-/*---------------------------------
-
-  qh_freebuffers()
-    free up global memory buffers
-
-  notes:
-    must match qh_initbuffers()
-*/
-void qh_freebuffers (void) {
-
-  trace5((qh ferr, "qh_freebuffers: freeing up global memory buffers\n"));
-  /* allocated by qh_initqhull_buffers */
-  qh_memfree (qh NEARzero, qh hull_dim * sizeof(realT));
-  qh_memfree (qh lower_threshold, (qh input_dim+1) * sizeof(realT));
-  qh_memfree (qh upper_threshold, (qh input_dim+1) * sizeof(realT));
-  qh_memfree (qh lower_bound, (qh input_dim+1) * sizeof(realT));
-  qh_memfree (qh upper_bound, (qh input_dim+1) * sizeof(realT));
-  qh_memfree (qh gm_matrix, (qh hull_dim+1) * qh hull_dim * sizeof(coordT));
-  qh_memfree (qh gm_row, (qh hull_dim+1) * sizeof(coordT *));
-  qh NEARzero= qh lower_threshold= qh upper_threshold= NULL;
-  qh lower_bound= qh upper_bound= NULL;
-  qh gm_matrix= NULL;
-  qh gm_row= NULL;
-  qh_setfree (&qh other_points);
-  qh_setfree (&qh del_vertices);
-  qh_setfree (&qh coplanarset);
-  if (qh line)                /* allocated by qh_readinput, freed if no error */
-    free (qh line);
-  if (qh half_space)
-    free (qh half_space);
-  if (qh temp_malloc)
-    free (qh temp_malloc);
-  if (qh feasible_point)      /* allocated by qh_readfeasible */
-    free (qh feasible_point);
-  if (qh feasible_string)     /* allocated by qh_initflags */
-    free (qh feasible_string);
-  qh line= qh feasible_string= NULL;
-  qh half_space= qh feasible_point= qh temp_malloc= NULL;
-  /* usually allocated by qh_readinput */
-  if (qh first_point && qh POINTSmalloc) {
-    free(qh first_point);
-    qh first_point= NULL;
-  }
-  if (qh input_points && qh input_malloc) { /* set by qh_joggleinput */
-    free (qh input_points);
-    qh input_points= NULL;
-  }
-  trace5((qh ferr, "qh_freebuffers: finished\n"));
-} /* freebuffers */
-
-
-/*---------------------------------
-
-  qh_freebuild( allmem )
-    free global memory used by qh_initbuild and qh_buildhull
-    if !allmem,
-      does not free short memory (freed by qh_memfreeshort)
-
-  design:
-    free centrums
-    free each vertex
-    mark unattached ridges
-    for each facet
-      free ridges
-      free outside set, coplanar set, neighbor set, ridge set, vertex set
-      free facet
-    free hash table
-    free interior point
-    free merge set
-    free temporary sets
-*/
-void qh_freebuild (boolT allmem) {
-  facetT *facet;
-  vertexT *vertex;
-  ridgeT *ridge, **ridgep;
-  mergeT *merge, **mergep;
-
-  trace1((qh ferr, "qh_freebuild: free memory from qh_inithull and qh_buildhull\n"));
-  if (qh del_vertices)
-    qh_settruncate (qh del_vertices, 0);
-  if (allmem) {
-    qh_clearcenters (qh_ASnone);
-    while ((vertex= qh vertex_list)) {
-      if (vertex->next)
-        qh_delvertex (vertex);
-      else {
-        qh_memfree (vertex, sizeof(vertexT));
-        qh newvertex_list= qh vertex_list= NULL;
-      }
-    }
-  }else if (qh VERTEXneighbors) {
-    FORALLvertices
-      qh_setfreelong (&(vertex->neighbors));
-  }
-  qh VERTEXneighbors= False;
-  qh GOODclosest= NULL;
-  if (allmem) {
-    FORALLfacets {
-      FOREACHridge_(facet->ridges)
-        ridge->seen= False;
-    }
-    FORALLfacets {
-      if (facet->visible) {
-	FOREACHridge_(facet->ridges) {
-	  if (!otherfacet_(ridge, facet)->visible)
-	    ridge->seen= True;  /* an unattached ridge */
-	}
-      }
-    }
-    while ((facet= qh facet_list)) {
-      FOREACHridge_(facet->ridges) {
-        if (ridge->seen) {
-          qh_setfree(&(ridge->vertices));
-          qh_memfree(ridge, sizeof(ridgeT));
-        }else
-          ridge->seen= True;
-      }
-      qh_setfree (&(facet->outsideset));
-      qh_setfree (&(facet->coplanarset));
-      qh_setfree (&(facet->neighbors));
-      qh_setfree (&(facet->ridges));
-      qh_setfree (&(facet->vertices));
-      if (facet->next)
-        qh_delfacet (facet);
-      else {
-        qh_memfree (facet, sizeof(facetT));
-        qh visible_list= qh newfacet_list= qh facet_list= NULL;
-      }
-    }
-  }else {
-    FORALLfacets {
-      qh_setfreelong (&(facet->outsideset));
-      qh_setfreelong (&(facet->coplanarset));
-      if (!facet->simplicial) {
-        qh_setfreelong (&(facet->neighbors));
-        qh_setfreelong (&(facet->ridges));
-        qh_setfreelong (&(facet->vertices));
-      }
-    }
-  }
-  qh_setfree (&(qh hash_table));
-  qh_memfree (qh interior_point, qh normal_size);
-  qh interior_point= NULL;
-  FOREACHmerge_(qh facet_mergeset)  /* usually empty */
-    qh_memfree (merge, sizeof(mergeT));
-  qh facet_mergeset= NULL;  /* temp set */
-  qh degen_mergeset= NULL;  /* temp set */
-  qh_settempfree_all();
-} /* freebuild */
-
-/*---------------------------------
-
-  qh_freeqhull( allmem )
-    free global memory
-    if !allmem,
-      does not free short memory (freed by qh_memfreeshort)
-
-  notes:
-    sets qh.NOerrexit in case caller forgets to
-
-  design:
-    free global and temporary memory from qh_initbuild and qh_buildhull
-    free buffers
-    free statistics
-*/
-void qh_freeqhull (boolT allmem) {
-
-  trace1((qh ferr, "qh_freeqhull: free global memory\n"));
-  qh NOerrexit= True;  /* no more setjmp since called at exit */
-  qh_freebuild (allmem);
-  qh_freebuffers();
-  qh_freestatistics();
-#if qh_QHpointer
-  free (qh_qh);
-  qh_qh= NULL;
-#else
-  memset((char *)&qh_qh, 0, sizeof(qhT));
-  qh NOerrexit= True;
-#endif
-} /* freeqhull */
-
-/*---------------------------------
-
-  qh_init_A( infile, outfile, errfile, argc, argv )
-    initialize memory and stdio files
-    convert input options to option string (qh.qhull_command)
-
-  notes:
-    infile may be NULL if qh_readpoints() is not called
-
-    errfile should always be defined.  It is used for reporting
-    errors.  outfile is used for output and format options.
-
-    argc/argv may be 0/NULL
-
-    called before error handling initialized
-    qh_errexit() may not be used
-*/
-void qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]) {
-  qh_meminit (errfile);
-  qh_initqhull_start (infile, outfile, errfile);
-  qh_init_qhull_command (argc, argv);
-} /* init_A */
-
-/*---------------------------------
-
-  qh_init_B( points, numpoints, dim, ismalloc )
-    initialize globals for points array
-
-    points has numpoints dim-dimensional points
-      points[0] is the first coordinate of the first point
-      points[1] is the second coordinate of the first point
-      points[dim] is the first coordinate of the second point
-
-    ismalloc=True
-      Qhull will call free(points) on exit or input transformation
-    ismalloc=False
-      Qhull will allocate a new point array if needed for input transformation
-
-    qh.qhull_command
-      is the option string.
-      It is defined by qh_init_B(), qh_qhull_command(), or qh_initflags
-
-  returns:
-    if qh.PROJECTinput or (qh.DELAUNAY and qh.PROJECTdelaunay)
-      projects the input to a new point array
-
-        if qh.DELAUNAY,
-          qh.hull_dim is increased by one
-        if qh.ATinfinity,
-          qh_projectinput adds point-at-infinity for Delaunay tri.
-
-    if qh.SCALEinput
-      changes the upper and lower bounds of the input, see qh_scaleinput()
-
-    if qh.ROTATEinput
-      rotates the input by a random rotation, see qh_rotateinput()
-      if qh.DELAUNAY
-        rotates about the last coordinate
-
-  notes:
-    called after points are defined
-    qh_errexit() may be used
-*/
-void qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc) {
-  qh_initqhull_globals (points, numpoints, dim, ismalloc);
-  if (qhmem.LASTsize == 0)
-    qh_initqhull_mem();
-  /* mem.c and qset.c are initialized */
-  qh_initqhull_buffers();
-  qh_initthresholds (qh qhull_command);
-  if (qh PROJECTinput || (qh DELAUNAY && qh PROJECTdelaunay))
-    qh_projectinput();
-  if (qh SCALEinput)
-    qh_scaleinput();
-  if (qh ROTATErandom >= 0) {
-    qh_randommatrix (qh gm_matrix, qh hull_dim, qh gm_row);
-    if (qh DELAUNAY) {
-      int k, lastk= qh hull_dim-1;
-      for (k= 0; k < lastk; k++) {
-        qh gm_row[k][lastk]= 0.0;
-        qh gm_row[lastk][k]= 0.0;
-      }
-      qh gm_row[lastk][lastk]= 1.0;
-    }
-    qh_gram_schmidt (qh hull_dim, qh gm_row);
-    qh_rotateinput (qh gm_row);
-  }
-} /* init_B */
-
-/*---------------------------------
-
-  qh_init_qhull_command( argc, argv )
-    build qh.qhull_command from argc/argv
-
-  returns:
-    a space-deliminated string of options (just as typed)
-
-  notes:
-    makes option string easy to input and output
-
-    argc/argv may be 0/NULL
-*/
-void qh_init_qhull_command(int argc, char *argv[]) {
-  int i;
-  char *s;
-
-  if (argc) {
-    if ((s= strrchr( argv[0], '\\'))) /* Borland gives full path */
-      strcpy (qh qhull_command, s+1);
-    else
-      strcpy (qh qhull_command, argv[0]);
-    if ((s= strstr (qh qhull_command, ".EXE"))
-    ||  (s= strstr (qh qhull_command, ".exe")))
-      *s= '\0';
-  }
-  for (i=1; i < argc; i++) {
-    if (strlen (qh qhull_command) + strlen(argv[i]) + 1 < sizeof(qh qhull_command)) {
-      strcat (qh qhull_command, " ");
-      strcat (qh qhull_command, argv[i]);
-    }else {
-      fprintf (qh ferr, "qhull input error: more than %d characters in command line\n",
-        (int)sizeof(qh qhull_command));
-      exit (1);  /* can not use qh_errexit */
-    }
-  }
-} /* init_qhull_command */
-
-/*---------------------------------
-
-  qh_initflags( commandStr )
-    set flags and initialized constants from commandStr
-
-  returns:
-    sets qh.qhull_command to command if needed
-
-  notes:
-    ignores first word (e.g., "qhull d")
-    use qh_strtol/strtod since strtol/strtod may or may not skip trailing spaces
-
-  see:
-    qh_initthresholds() continues processing of 'Pdn' and 'PDn'
-    'prompt' in unix.c for documentation
-
-  design:
-    for each space-deliminated option group
-      if top-level option
-        check syntax
-        append approriate option to option string
-        set appropriate global variable or append printFormat to print options
-      else
-        for each sub-option
-          check syntax
-          append approriate option to option string
-          set appropriate global variable or append printFormat to print options
-
-
-*/
-void qh_initflags(char *command) {
-  int k, i, lastproject;
-  char *s= command, *t, *prev_s, *start, key;
-  boolT isgeom= False, wasproject;
-  realT r;
-
-  if (command != &qh qhull_command[0]) {
-    *qh qhull_command= '\0';
-    strncat( qh qhull_command, command, sizeof( qh qhull_command));
-  }
-  while (*s && !isspace(*s))  /* skip program name */
-    s++;
-  while (*s) {
-    while (*s && isspace(*s))
-      s++;
-    if (*s == '-')
-      s++;
-    if (!*s)
-      break;
-    prev_s= s;
-    switch (*s++) {
-    case 'd':
-      qh_option ("delaunay", NULL, NULL);
-      qh DELAUNAY= True;
-      break;
-    case 'f':
-      qh_option ("facets", NULL, NULL);
-      qh_appendprint (qh_PRINTfacets);
-      break;
-    case 'i':
-      qh_option ("incidence", NULL, NULL);
-      qh_appendprint (qh_PRINTincidences);
-      break;
-    case 'm':
-      qh_option ("mathematica", NULL, NULL);
-      qh_appendprint (qh_PRINTmathematica);
-      break;
-    case 'n':
-      qh_option ("normals", NULL, NULL);
-      qh_appendprint (qh_PRINTnormals);
-      break;
-    case 'o':
-      qh_option ("offFile", NULL, NULL);
-      qh_appendprint (qh_PRINToff);
-      break;
-    case 'p':
-      qh_option ("points", NULL, NULL);
-      qh_appendprint (qh_PRINTpoints);
-      break;
-    case 's':
-      qh_option ("summary", NULL, NULL);
-      qh PRINTsummary= True;
-      break;
-    case 'v':
-      qh_option ("voronoi", NULL, NULL);
-      qh VORONOI= True;
-      qh DELAUNAY= True;
-      break;
-    case 'A':
-      if (!isdigit(*s) && *s != '.' && *s != '-')
-	fprintf(qh ferr, "qhull warning: no maximum cosine angle given for option 'An'.  Ignored.\n");
-      else {
-	if (*s == '-') {
-	  qh premerge_cos= -qh_strtod (s, &s);
-          qh_option ("Angle-premerge-", NULL, &qh premerge_cos);
-	  qh PREmerge= True;
-	}else {
-	  qh postmerge_cos= qh_strtod (s, &s);
-          qh_option ("Angle-postmerge", NULL, &qh postmerge_cos);
-	  qh POSTmerge= True;
-	}
-	qh MERGING= True;
-      }
-      break;
-    case 'C':
-      if (!isdigit(*s) && *s != '.' && *s != '-')
-	fprintf(qh ferr, "qhull warning: no centrum radius given for option 'Cn'.  Ignored.\n");
-      else {
-	if (*s == '-') {
-	  qh premerge_centrum= -qh_strtod (s, &s);
-          qh_option ("Centrum-premerge-", NULL, &qh premerge_centrum);
-	  qh PREmerge= True;
-	}else {
-	  qh postmerge_centrum= qh_strtod (s, &s);
-          qh_option ("Centrum-postmerge", NULL, &qh postmerge_centrum);
-	  qh POSTmerge= True;
-	}
-	qh MERGING= True;
-      }
-      break;
-    case 'E':
-      if (*s == '-')
-	fprintf(qh ferr, "qhull warning: negative maximum roundoff given for option 'An'.  Ignored.\n");
-      else if (!isdigit(*s))
-	fprintf(qh ferr, "qhull warning: no maximum roundoff given for option 'En'.  Ignored.\n");
-      else {
-	qh DISTround= qh_strtod (s, &s);
-        qh_option ("Distance-roundoff", NULL, &qh DISTround);
-	qh SETroundoff= True;
-      }
-      break;
-    case 'H':
-      start= s;
-      qh HALFspace= True;
-      qh_strtod (s, &t);
-      while (t > s)  {
-        if (*t && !isspace (*t)) {
-	  if (*t == ',')
-	    t++;
-	  else
-	    fprintf (qh ferr, "qhull warning: origin for Halfspace intersection should be 'Hn,n,n,...'\n");
-	}
-        s= t;
-	qh_strtod (s, &t);
-      }
-      if (start < t) {
-        if (!(qh feasible_string= (char*)calloc (t-start+1, 1))) {
-          fprintf(qh ferr, "qhull error: insufficient memory for 'Hn,n,n'\n");
-          qh_errexit(qh_ERRmem, NULL, NULL);
-        }
-        strncpy (qh feasible_string, start, t-start);
-        qh_option ("Halfspace-about", NULL, NULL);
-        qh_option (qh feasible_string, NULL, NULL);
-      }else
-        qh_option ("Halfspace", NULL, NULL);
-      break;
-    case 'R':
-      if (!isdigit(*s))
-	fprintf(qh ferr, "qhull warning: missing random perturbation for option 'Rn'.  Ignored\n");
-      else {
-	qh RANDOMfactor= qh_strtod (s, &s);
-        qh_option ("Random_perturb", NULL, &qh RANDOMfactor);
-        qh RANDOMdist= True;
-      }
-      break;
-    case 'V':
-      if (!isdigit(*s) && *s != '-')
-	fprintf(qh ferr, "qhull warning: missing visible distance for option 'Vn'.  Ignored\n");
-      else {
-	qh MINvisible= qh_strtod (s, &s);
-        qh_option ("Visible", NULL, &qh MINvisible);
-      }
-      break;
-    case 'U':
-      if (!isdigit(*s) && *s != '-')
-	fprintf(qh ferr, "qhull warning: missing coplanar distance for option 'Un'.  Ignored\n");
-      else {
-	qh MAXcoplanar= qh_strtod (s, &s);
-        qh_option ("U-coplanar", NULL, &qh MAXcoplanar);
-      }
-      break;
-    case 'W':
-      if (*s == '-')
-	fprintf(qh ferr, "qhull warning: negative outside width for option 'Wn'.  Ignored.\n");
-      else if (!isdigit(*s))
-	fprintf(qh ferr, "qhull warning: missing outside width for option 'Wn'.  Ignored\n");
-      else {
-	qh MINoutside= qh_strtod (s, &s);
-        qh_option ("W-outside", NULL, &qh MINoutside);
-        qh APPROXhull= True;
-      }
-      break;
-    /************  sub menus ***************/
-    case 'F':
-      while (*s && !isspace(*s)) {
-	switch(*s++) {
-	case 'a':
-	  qh_option ("Farea", NULL, NULL);
-	  qh_appendprint (qh_PRINTarea);
-	  qh GETarea= True;
-	  break;
-	case 'A':
-	  qh_option ("FArea-total", NULL, NULL);
-	  qh GETarea= True;
-	  break;
-        case 'c':
-          qh_option ("Fcoplanars", NULL, NULL);
-          qh_appendprint (qh_PRINTcoplanars);
-          break;
-        case 'C':
-          qh_option ("FCentrums", NULL, NULL);
-          qh_appendprint (qh_PRINTcentrums);
-          break;
-	case 'd':
-          qh_option ("Fd-cdd-in", NULL, NULL);
-	  qh CDDinput= True;
-	  break;
-	case 'D':
-          qh_option ("FD-cdd-out", NULL, NULL);
-	  qh CDDoutput= True;
-	  break;
-	case 'F':
-	  qh_option ("FFacets-xridge", NULL, NULL);
-          qh_appendprint (qh_PRINTfacets_xridge);
-	  break;
-        case 'i':
-          qh_option ("Finner", NULL, NULL);
-          qh_appendprint (qh_PRINTinner);
-          break;
-        case 'I':
-          qh_option ("FIDs", NULL, NULL);
-          qh_appendprint (qh_PRINTids);
-          break;
-        case 'm':
-          qh_option ("Fmerges", NULL, NULL);
-          qh_appendprint (qh_PRINTmerges);
-          break;
-        case 'n':
-          qh_option ("Fneighbors", NULL, NULL);
-          qh_appendprint (qh_PRINTneighbors);
-          break;
-        case 'N':
-          qh_option ("FNeighbors-vertex", NULL, NULL);
-          qh_appendprint (qh_PRINTvneighbors);
-          break;
-        case 'o':
-          qh_option ("Fouter", NULL, NULL);
-          qh_appendprint (qh_PRINTouter);
-          break;
-	case 'O':
-	  if (qh PRINToptions1st) {
-	    qh_option ("FOptions", NULL, NULL);
-	    qh_appendprint (qh_PRINToptions);
-	  }else
-	    qh PRINToptions1st= True;
-	  break;
-	case 'p':
-	  qh_option ("Fpoint-intersect", NULL, NULL);
-	  qh_appendprint (qh_PRINTpointintersect);
-	  break;
-	case 'P':
-	  qh_option ("FPoint-nearest", NULL, NULL);
-	  qh_appendprint (qh_PRINTpointnearest);
-	  break;
-	case 'Q':
-	  qh_option ("FQhull", NULL, NULL);
-	  qh_appendprint (qh_PRINTqhull);
-	  break;
-        case 's':
-          qh_option ("Fsummary", NULL, NULL);
-          qh_appendprint (qh_PRINTsummary);
-          break;
-        case 'S':
-          qh_option ("FSize", NULL, NULL);
-          qh_appendprint (qh_PRINTsize);
-          qh GETarea= True;
-          break;
-        case 't':
-          qh_option ("Ftriangles", NULL, NULL);
-          qh_appendprint (qh_PRINTtriangles);
-          break;
-        case 'v':
-          /* option set in qh_initqhull_globals */
-          qh_appendprint (qh_PRINTvertices);
-          break;
-        case 'V':
-          qh_option ("FVertex-average", NULL, NULL);
-          qh_appendprint (qh_PRINTaverage);
-          break;
-	case 'x':
-	  qh_option ("Fxtremes", NULL, NULL);
-	  qh_appendprint (qh_PRINTextremes);
-	  break;
-	default:
-	  s--;
-	  fprintf (qh ferr, "qhull warning: unknown 'F' output option %c, rest ignored\n", (int)s[0]);
-	  while (*++s && !isspace(*s));
-	  break;
-	}
-      }
-      break;
-    case 'G':
-      isgeom= True;
-      qh_appendprint (qh_PRINTgeom);
-      while (*s && !isspace(*s)) {
-	switch(*s++) {
-        case 'a':
-          qh_option ("Gall-points", NULL, NULL);
-          qh PRINTdots= True;
-          break;
-        case 'c':
-          qh_option ("Gcentrums", NULL, NULL);
-          qh PRINTcentrums= True;
-          break;
-	case 'h':
-          qh_option ("Gintersections", NULL, NULL);
-	  qh DOintersections= True;
-	  break;
-	case 'i':
-          qh_option ("Ginner", NULL, NULL);
-	  qh PRINTinner= True;
-	  break;
-	case 'n':
-          qh_option ("Gno-planes", NULL, NULL);
-	  qh PRINTnoplanes= True;
-	  break;
-	case 'o':
-          qh_option ("Gouter", NULL, NULL);
-	  qh PRINTouter= True;
-	  break;
-	case 'p':
-          qh_option ("Gpoints", NULL, NULL);
-	  qh PRINTcoplanar= True;
-	  break;
-	case 'r':
-          qh_option ("Gridges", NULL, NULL);
-	  qh PRINTridges= True;
-	  break;
-	case 't':
-          qh_option ("Gtransparent", NULL, NULL);
-	  qh PRINTtransparent= True;
-	  break;
-	case 'v':
-          qh_option ("Gvertices", NULL, NULL);
-	  qh PRINTspheres= True;
-	  break;
-	case 'D':
-	  if (!isdigit (*s))
-	    fprintf (qh ferr, "qhull input error: missing dimension for option 'GDn'\n");
-	  else {
-	    if (qh DROPdim >= 0)
-	      fprintf (qh ferr, "qhull warning: can only drop one dimension.  Previous 'GD%d' ignored\n",
-	           qh DROPdim);
-  	    qh DROPdim= qh_strtol (s, &s);
-            qh_option ("GDrop-dim", &qh DROPdim, NULL);
-          }
-	  break;
-	default:
-	  s--;
-	  fprintf (qh ferr, "qhull warning: unknown 'G' print option %c, rest ignored\n", (int)s[0]);
-	  while (*++s && !isspace(*s));
-	  break;
-	}
-      }
-      break;
-    case 'P':
-      while (*s && !isspace(*s)) {
-	switch(*s++) {
-	case 'd': case 'D':  /* see qh_initthresholds() */
-	  key= s[-1];
-	  i= qh_strtol (s, &s);
-	  r= 0;
-	  if (*s == ':') {
-	    s++;
-	    r= qh_strtod (s, &s);
-	  }
-	  if (key == 'd')
-  	    qh_option ("Pdrop-facets-dim-less", &i, &r);
-  	  else
-  	    qh_option ("PDrop-facets-dim-more", &i, &r);
-	  break;
-        case 'g':
-          qh_option ("Pgood-facets", NULL, NULL);
-          qh PRINTgood= True;
-          break;
-        case 'G':
-          qh_option ("PGood-facet-neighbors", NULL, NULL);
-          qh PRINTneighbors= True;
-          break;
-        case 'o':
-          qh_option ("Poutput-forced", NULL, NULL);
-          qh FORCEoutput= True;
-          break;
-        case 'p':
-          qh_option ("Pprecision-ignore", NULL, NULL);
-          qh PRINTprecision= False;
-          break;
-	case 'A':
-	  if (!isdigit (*s))
-	    fprintf (qh ferr, "qhull input error: missing facet count for keep area option 'PAn'\n");
-	  else {
-  	    qh KEEParea= qh_strtol (s, &s);
-            qh_option ("PArea-keep", &qh KEEParea, NULL);
-            qh GETarea= True;
-          }
-	  break;
-	case 'F':
-	  if (!isdigit (*s))
-	    fprintf (qh ferr, "qhull input error: missing facet area for option 'PFn'\n");
-	  else {
-  	    qh KEEPminArea= qh_strtod (s, &s);
-            qh_option ("PFacet-area-keep", NULL, &qh KEEPminArea);
-            qh GETarea= True;
-          }
-	  break;
-	case 'M':
-	  if (!isdigit (*s))
-	    fprintf (qh ferr, "qhull input error: missing merge count for option 'PMn'\n");
-	  else {
-  	    qh KEEPmerge= qh_strtol (s, &s);
-            qh_option ("PMerge-keep", &qh KEEPmerge, NULL);
-          }
-	  break;
-	default:
-	  s--;
-	  fprintf (qh ferr, "qhull warning: unknown 'P' print option %c, rest ignored\n", (int)s[0]);
-	  while (*++s && !isspace(*s));
-	  break;
-	}
-      }
-      break;
-    case 'Q':
-      lastproject= -1;
-      while (*s && !isspace(*s)) {
-	switch(*s++) {
-	case 'b': case 'B':  /* handled by qh_initthresholds */
-	  key= s[-1];
-	  if (key == 'b' && *s == 'B') {
-	    s++;
-	    r= qh_DEFAULTbox;
-	    qh SCALEinput= True;
-	    qh_option ("QbBound-unit-box", NULL, &r);
-	    break;
-	  }
-	  if (key == 'b' && *s == 'b') {
-	    s++;
-	    qh SCALElast= True;
-	    qh_option ("Qbbound-last", NULL, NULL);
-	    break;
-	  }
-	  k= qh_strtol (s, &s);
-	  r= 0.0;
-	  wasproject= False;
-	  if (*s == ':') {
-	    s++;
-	    if ((r= qh_strtod(s, &s)) == 0.0) {
- 	      t= s;            /* need true dimension for memory allocation */
-	      while (*t && !isspace(*t)) {
-	        if (toupper(*t++) == 'B'
-	         && k == qh_strtol (t, &t)
-	         && *t++ == ':'
-	         && qh_strtod(t, &t) == 0.0) {
-	          qh PROJECTinput++;
-	          trace2((qh ferr, "qh_initflags: project dimension %d\n", k));
-	          qh_option ("Qb-project-dim", &k, NULL);
-		  wasproject= True;
-	          lastproject= k;
-	          break;
-		}
-	      }
-	    }
-  	  }
-	  if (!wasproject) {
-	    if (lastproject == k && r == 0.0)
-	      lastproject= -1;  /* doesn't catch all possible sequences */
-	    else if (key == 'b') {
-	      qh SCALEinput= True;
-	      if (r == 0.0)
-		r= -qh_DEFAULTbox;
-	      qh_option ("Qbound-dim-low", &k, &r);
-	    }else {
-	      qh SCALEinput= True;
-	      if (r == 0.0)
-		r= qh_DEFAULTbox;
-	      qh_option ("QBound-dim-high", &k, &r);
-	    }
-	  }
-	  break;
-	case 'c':
-	  qh_option ("Qcoplanar-keep", NULL, NULL);
-	  qh KEEPcoplanar= True;
-	  break;
-	case 'f':
-	  qh_option ("Qfurthest-outside", NULL, NULL);
-	  qh BESToutside= True;
-	  break;
-	case 'g':
-	  qh_option ("Qgood-facets-only", NULL, NULL);
-	  qh ONLYgood= True;
-	  break;
-	case 'i':
-	  qh_option ("Qinterior-keep", NULL, NULL);
-	  qh KEEPinside= True;
-	  break;
-	case 'm':
-	  qh_option ("Qmax-outside-only", NULL, NULL);
-	  qh ONLYmax= True;
-	  break;
-	case 'r':
-	  qh_option ("Qrandom-outside", NULL, NULL);
-	  qh RANDOMoutside= True;
-	  break;
-	case 's':
-	  qh_option ("Qsearch-initial-simplex", NULL, NULL);
-	  qh ALLpoints= True;
-	  break;
-	case 't':
-	  qh_option ("Qtriangulate", NULL, NULL);
-	  qh TRIangulate= True;
-	  break;
-	case 'T':
-	  qh_option ("QTestPoints", NULL, NULL);
-	  if (!isdigit (*s))
-	    fprintf (qh ferr, "qhull input error: missing number of test points for option 'QTn'\n");
-	  else {
-  	    qh TESTpoints= qh_strtol (s, &s);
-            qh_option ("QTestPoints", &qh TESTpoints, NULL);
-          }
-	  break;
-	case 'u':
-	  qh_option ("QupperDelaunay", NULL, NULL);
-	  qh UPPERdelaunay= True;
-	  break;
-	case 'v':
-	  qh_option ("Qvertex-neighbors-convex", NULL, NULL);
-	  qh TESTvneighbors= True;
-	  break;
-	case 'x':
-	  qh_option ("Qxact-merge", NULL, NULL);
-	  qh MERGEexact= True;
-	  break;
-	case 'z':
-	  qh_option ("Qz-infinity-point", NULL, NULL);
-	  qh ATinfinity= True;
-	  break;
-	case '0':
-	  qh_option ("Q0-no-premerge", NULL, NULL);
-	  qh NOpremerge= True;
-	  break;
-	case '1':
-	  if (!isdigit(*s)) {
-	    qh_option ("Q1-no-angle-sort", NULL, NULL);
-	    qh ANGLEmerge= False;
-	    break; 
-	  }
-	  switch(*s++) {
-  	  case '0':
-	    qh_option ("Q10-no-narrow", NULL, NULL);
-	    qh NOnarrow= True;
-	    break; 
-  	  case '1':
-	    qh_option ("Q11-trinormals Qtriangulate", NULL, NULL);
-	    qh TRInormals= True;
-	    qh TRIangulate= True;
-	    break; 
-	  default:
-	    s--;
-	    fprintf (qh ferr, "qhull warning: unknown 'Q' qhull option 1%c, rest ignored\n", (int)s[0]);
-	    while (*++s && !isspace(*s));
-	    break;
-	  }
-	  break;
-	case '2':
-	  qh_option ("Q2-no-merge-independent", NULL, NULL);
-	  qh MERGEindependent= False;
-	  goto LABELcheckdigit;
-	  break; /* no warnings */
-	case '3':
-	  qh_option ("Q3-no-merge-vertices", NULL, NULL);
-	  qh MERGEvertices= False;
-	LABELcheckdigit:
-	  if (isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: can not follow '1', '2', or '3' with a digit.  '%c' skipped.\n",
-	             *s++);
-	  break;
-	case '4':
-	  qh_option ("Q4-avoid-old-into-new", NULL, NULL);
-	  qh AVOIDold= True;
-	  break;
-	case '5':
-	  qh_option ("Q5-no-check-outer", NULL, NULL);
-	  qh SKIPcheckmax= True;
-	  break;
-	case '6':
-	  qh_option ("Q6-no-concave-merge", NULL, NULL);
-	  qh SKIPconvex= True;
-	  break;
-	case '7':
-	  qh_option ("Q7-no-breadth-first", NULL, NULL);
-	  qh VIRTUALmemory= True;
-	  break;
-	case '8':
-	  qh_option ("Q8-no-near-inside", NULL, NULL);
-	  qh NOnearinside= True;
-	  break;
-	case '9':
-	  qh_option ("Q9-pick-furthest", NULL, NULL);
-	  qh PICKfurthest= True;
-	  break;
-	case 'G':
-	  i= qh_strtol (s, &t);
-	  if (qh GOODpoint)
-	    fprintf (qh ferr, "qhull warning: good point already defined for option 'QGn'.  Ignored\n");
-          else if (s == t)
-	    fprintf (qh ferr, "qhull warning: missing good point id for option 'QGn'.  Ignored\n");
-	  else if (i < 0 || *s == '-') {
- 	    qh GOODpoint= i-1;
-  	    qh_option ("QGood-if-dont-see-point", &i, NULL);
-	  }else {
- 	    qh GOODpoint= i+1;
-  	    qh_option ("QGood-if-see-point", &i, NULL);
-  	  }
- 	  s= t;
-	  break;
-	case 'J':
-          if (!isdigit(*s) && *s != '-')
-   	    qh JOGGLEmax= 0.0;
-	  else {
- 	    qh JOGGLEmax= (realT) qh_strtod (s, &s);
-            qh_option ("QJoggle", NULL, &qh JOGGLEmax);
-	  }
-	  break;
-	case 'R':
-          if (!isdigit(*s) && *s != '-')
-	    fprintf (qh ferr, "qhull warning: missing random seed for option 'QRn'.  Ignored\n");
-	  else {
- 	    qh ROTATErandom= i= qh_strtol(s, &s);
-   	    if (i > 0)
-   	      qh_option ("QRotate-id", &i, NULL );
-	    else if (i < -1)
-   	      qh_option ("QRandom-seed", &i, NULL );
-          }
-	  break;
-	case 'V':
-	  i= qh_strtol (s, &t);
-	  if (qh GOODvertex)
-	    fprintf (qh ferr, "qhull warning: good vertex already defined for option 'QVn'.  Ignored\n");
-          else if (s == t)
-	    fprintf (qh ferr, "qhull warning: no good point id given for option 'QVn'.  Ignored\n");
-	  else if (i < 0) {
- 	    qh GOODvertex= i - 1;
- 	    qh_option ("QV-good-facets-not-point", &i, NULL);
-	  }else {
-  	    qh_option ("QV-good-facets-point", &i, NULL);
-	    qh GOODvertex= i + 1;
-          }
- 	  s= t;
-	  break;
-	default:
-	  s--;
-	  fprintf (qh ferr, "qhull warning: unknown 'Q' qhull option %c, rest ignored\n", (int)s[0]);
-	  while (*++s && !isspace(*s));
-	  break;
-	}
-      }
-      break;
-    case 'T':
-      while (*s && !isspace(*s)) {
-	if (isdigit(*s) || *s == '-')
-	  qh IStracing= qh_strtol(s, &s);
-	else switch(*s++) {
-	case 'c':
-          qh_option ("Tcheck-frequently", NULL, NULL);
-	  qh CHECKfrequently= True;
-	  break;
-	case 's':
-          qh_option ("Tstatistics", NULL, NULL);
-	  qh PRINTstatistics= True;
-	  break;
-	case 'v':
-          qh_option ("Tverify", NULL, NULL);
-	  qh VERIFYoutput= True;
-	  break;
-	case 'z':
-	  if (!qh fout)
-	    fprintf (qh ferr, "qhull warning: output file undefined (stdout).  Option 'Tz' ignored.\n");
-	  else {
-	    qh_option ("Tz-stdout", NULL, NULL);
-  	    qh ferr= qh fout;
-  	    qhmem.ferr= qh fout;
-	  }
-	  break;
-	case 'C':
-	  if (!isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: missing point id for cone for trace option 'TCn'.  Ignored\n");
-	  else {
-	    i= qh_strtol (s, &s);
-	    qh_option ("TCone-stop", &i, NULL);
-	    qh STOPcone= i + 1;
-          }
-	  break;
-	case 'F':
-	  if (!isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: missing frequency count for trace option 'TFn'.  Ignored\n");
-	  else {
-	    qh REPORTfreq= qh_strtol (s, &s);
-            qh_option ("TFacet-log", &qh REPORTfreq, NULL);
-	    qh REPORTfreq2= qh REPORTfreq/2;  /* for tracemerging() */
-	  }
-	  break;
-	case 'I':
-	  if (s[0] != ' ' || s[1] == '\"' || s[1] == '\'' ||isspace (s[1])) {
-	    s++;
-	    fprintf (qh ferr, "qhull warning: option 'TI' mistyped.\nUse 'TI', one space, file name, and space or end-of-line.\nDo not use quotes.  Option 'FI' ignored.\n");
-	  }else {  /* not a procedure because of qh_option (filename, NULL, NULL); */
-	    char filename[500], *t= filename;
-
-	    s++;
-	    while (*s) {
-	      if (t - filename >= sizeof (filename)-2) {
-		fprintf (qh ferr, "qhull error: filename for 'TI' too long.\n");
-		qh_errexit (qh_ERRinput, NULL, NULL);
-	      }
-	      if (isspace (*s))
-		break;
-	      *(t++)= *s++;
-	    }
-	    *t= '\0';
-	    if (!freopen (filename, "r", stdin)) {
-	      fprintf (qh ferr, "qhull error: could not open file \"%s\".", filename);
-	      qh_errexit (qh_ERRinput, NULL, NULL);
-	    }else {
-	      qh_option ("TInput-file", NULL, NULL);
-	      qh_option (filename, NULL, NULL);
-	    }
-	  }
-	  break;
-	case 'O':
-	  if (s[0] != ' ' || s[1] == '\"' || isspace (s[1])) {
-	    s++;
-	    fprintf (qh ferr, "qhull warning: option 'TO' mistyped.\nUse 'TO', one space, file name, and space or end-of-line.\nThe file name may be enclosed in single quotes.\nDo not use double quotes.  Option 'FO' ignored.\n");
-	  }else {  /* not a procedure because of qh_option (filename, NULL, NULL); */
-	    char filename[500], *t= filename;
-	    boolT isquote= False;
-
-	    s++;
-	    if (*s == '\'') {
-	      isquote= True;
-	      s++;
-	    }
-	    while (*s) {
-	      if (t - filename >= sizeof (filename)-2) {
-		fprintf (qh ferr, "qhull error: filename for 'TO' too long.\n");
-		qh_errexit (qh_ERRinput, NULL, NULL);
-	      }
-	      if (isquote) {
-		if (*s == '\'') {
-		  s++;
-		  isquote= False;
-		  break;
-		}
-	      }else if (isspace (*s))
-		break;
-	      *(t++)= *s++;
-	    }
-	    *t= '\0';
-	    if (isquote)
-	      fprintf (qh ferr, "qhull error: missing end quote for option 'TO'.  Rest of line ignored.\n");
-	    else if (!freopen (filename, "w", stdout)) {
-	      fprintf (qh ferr, "qhull error: could not open file \"%s\".", filename);
-	      qh_errexit (qh_ERRinput, NULL, NULL);
-	    }else {
-	      qh_option ("TOutput-file", NULL, NULL);
-	      qh_option (filename, NULL, NULL);
-	    }
-	  }
-	  break;
-	case 'P':
-	  if (!isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: missing point id for trace option 'TPn'.  Ignored\n");
-	  else {
-	    qh TRACEpoint= qh_strtol (s, &s);
-            qh_option ("Trace-point", &qh TRACEpoint, NULL);
-          }
-	  break;
-	case 'M':
-	  if (!isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: missing merge id for trace option 'TMn'.  Ignored\n");
-	  else {
-	    qh TRACEmerge= qh_strtol (s, &s);
-            qh_option ("Trace-merge", &qh TRACEmerge, NULL);
-          }
-	  break;
-	case 'R':
-	  if (!isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: missing rerun count for trace option 'TRn'.  Ignored\n");
-	  else {
-	    qh RERUN= qh_strtol (s, &s);
-            qh_option ("TRerun", &qh RERUN, NULL);
-          }
-	  break;
-	case 'V':
-	  i= qh_strtol (s, &t);
-	  if (s == t)
-	    fprintf (qh ferr, "qhull warning: missing furthest point id for trace option 'TVn'.  Ignored\n");
-	  else if (i < 0) {
-	    qh STOPpoint= i - 1;
-            qh_option ("TV-stop-before-point", &i, NULL);
-	  }else {
-	    qh STOPpoint= i + 1;
-            qh_option ("TV-stop-after-point", &i, NULL);
-          }
-          s= t;
-	  break;
-	case 'W':
-	  if (!isdigit(*s))
-	    fprintf (qh ferr, "qhull warning: missing max width for trace option 'TWn'.  Ignored\n");
-	  else {
- 	    qh TRACEdist= (realT) qh_strtod (s, &s);
-            qh_option ("TWide-trace", NULL, &qh TRACEdist);
-          }
-	  break;
-	default:
-	  s--;
-	  fprintf (qh ferr, "qhull warning: unknown 'T' trace option %c, rest ignored\n", (int)s[0]);
-	  while (*++s && !isspace(*s));
-	  break;
-	}
-      }
-      break;
-    default:
-      fprintf (qh ferr, "qhull warning: unknown flag %c (%x)\n", (int)s[-1],
-	       (int)s[-1]);
-      break;
-    }
-    if (s-1 == prev_s && *s && !isspace(*s)) {
-      fprintf (qh ferr, "qhull warning: missing space after flag %c (%x); reserved for menu. Skipped.\n",
-	       (int)*prev_s, (int)*prev_s);
-      while (*s && !isspace(*s))
-	s++;
-    }
-  }
-  if (isgeom && !qh FORCEoutput && qh PRINTout[1])
-    fprintf (qh ferr, "qhull warning: additional output formats are not compatible with Geomview\n");
-  /* set derived values in qh_initqhull_globals */
-} /* initflags */
-
-
-/*---------------------------------
-
-  qh_initqhull_buffers()
-    initialize global memory buffers
-
-  notes:
-    must match qh_freebuffers()
-*/
-void qh_initqhull_buffers (void) {
-  int k;
-
-  qh TEMPsize= (qhmem.LASTsize - sizeof (setT))/SETelemsize;
-  if (qh TEMPsize <= 0 || qh TEMPsize > qhmem.LASTsize)
-    qh TEMPsize= 8;  /* e.g., if qh_NOmem */
-  qh other_points= qh_setnew (qh TEMPsize);
-  qh del_vertices= qh_setnew (qh TEMPsize);
-  qh coplanarset= qh_setnew (qh TEMPsize);
-  qh NEARzero= (realT *)qh_memalloc(qh hull_dim * sizeof(realT));
-  qh lower_threshold= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
-  qh upper_threshold= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
-  qh lower_bound= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
-  qh upper_bound= (realT *)qh_memalloc((qh input_dim+1) * sizeof(realT));
-  for(k= qh input_dim+1; k--; ) {
-    qh lower_threshold[k]= -REALmax;
-    qh upper_threshold[k]= REALmax;
-    qh lower_bound[k]= -REALmax;
-    qh upper_bound[k]= REALmax;
-  }
-  qh gm_matrix= (coordT *)qh_memalloc((qh hull_dim+1) * qh hull_dim * sizeof(coordT));
-  qh gm_row= (coordT **)qh_memalloc((qh hull_dim+1) * sizeof(coordT *));
-} /* initqhull_buffers */
-
-/*---------------------------------
-
-  qh_initqhull_globals( points, numpoints, dim, ismalloc )
-    initialize globals
-    if ismalloc
-      points were malloc'd and qhull should free at end
-
-  returns:
-    sets qh.first_point, num_points, input_dim, hull_dim and others
-    seeds random number generator (seed=1 if tracing)
-    modifies qh.hull_dim if ((qh.DELAUNAY and qh.PROJECTdelaunay) or qh.PROJECTinput)
-    adjust user flags as needed
-    also checks DIM3 dependencies and constants
-
-  notes:
-    do not use qh_point() since an input transformation may move them elsewhere
-
-  see:
-    qh_initqhull_start() sets default values for non-zero globals
-
-  design:
-    initialize points array from input arguments
-    test for qh.ZEROcentrum
-      (i.e., use opposite vertex instead of cetrum for convexity testing)
-    test for qh.PRINTgood (i.e., only print 'good' facets)
-    initialize qh.CENTERtype, qh.normal_size,
-      qh.center_size, qh.TRACEpoint/level,
-    initialize and test random numbers
-    check for conflicting print output options
-*/
-void qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc) {
-  int seed, pointsneeded, extra= 0, i, randi, k;
-  boolT printgeom= False, printmath= False, printcoplanar= False;
-  realT randr;
-  realT factorial;
-
-  time_t timedata;
-
-  trace0((qh ferr, "qh_initqhull_globals: for %s | %s\n", qh rbox_command,
-      qh qhull_command));
-  qh POINTSmalloc= ismalloc;
-  qh first_point= points;
-  qh num_points= numpoints;
-  qh hull_dim= qh input_dim= dim;
-  if (!qh NOpremerge && !qh MERGEexact && !qh PREmerge && qh JOGGLEmax > REALmax/2) {
-    qh MERGING= True;
-    if (qh hull_dim <= 4) {
-      qh PREmerge= True;
-      qh_option ("_pre-merge", NULL, NULL);
-    }else {
-      qh MERGEexact= True;
-      qh_option ("Qxact_merge", NULL, NULL);
-    }
-  }else if (qh MERGEexact) 
-    qh MERGING= True;
-  if (!qh NOpremerge && qh JOGGLEmax > REALmax/2) {
-#ifdef qh_NOmerge
-    qh JOGGLEmax= 0.0;
-#endif
-  }
-  if (qh TRIangulate && qh JOGGLEmax < REALmax/2 && qh PRINTprecision)
-    fprintf(qh ferr, "qhull warning: joggle ('QJ') always produces simplicial output.  Triangulated output ('Qt') does nothing.\n");
-  if (qh JOGGLEmax < REALmax/2 && qh DELAUNAY && !qh SCALEinput && !qh SCALElast) {
-    qh SCALElast= True;
-    qh_option ("Qbbound-last-qj", NULL, NULL);
-  }
-  if (qh MERGING && !qh POSTmerge && qh premerge_cos > REALmax/2
-  && qh premerge_centrum == 0) {
-    qh ZEROcentrum= True;
-    qh ZEROall_ok= True;
-    qh_option ("_zero-centrum", NULL, NULL);
-  }
-  if (qh JOGGLEmax < REALmax/2 && REALepsilon > 2e-8 && qh PRINTprecision)
-    fprintf(qh ferr, "qhull warning: real epsilon, %2.2g, is probably too large for joggle ('QJn')\nRecompile with double precision reals (see user.h).\n",
-          REALepsilon);
-#ifdef qh_NOmerge
-  if (qh MERGING) {
-    fprintf (qh ferr, "qhull input error: merging not installed (qh_NOmerge + 'Qx', 'Cn' or 'An')\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-#endif
-  if (!(qh PRINTgood || qh PRINTneighbors)) {
-    if (qh KEEParea || qh KEEPminArea < REALmax/2 || qh KEEPmerge || qh DELAUNAY
-	|| (!qh ONLYgood && (qh GOODvertex || qh GOODpoint))) {
-      qh PRINTgood= True;
-      qh_option ("Pgood", NULL, NULL);
-    }
-  }
-  if (qh DELAUNAY && qh KEEPcoplanar && !qh KEEPinside) {
-    qh KEEPinside= True;
-    qh_option ("Qinterior-keep", NULL, NULL);
-  }
-  if (qh DELAUNAY && qh HALFspace) {
-    fprintf (qh ferr, "qhull input error: can not use Delaunay ('d') or Voronoi ('v') with halfspace intersection ('H')\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  if (!qh DELAUNAY && (qh UPPERdelaunay || qh ATinfinity)) {
-    fprintf (qh ferr, "qhull input error: use upper-Delaunay ('Qu') or infinity-point ('Qz') with Delaunay ('d') or Voronoi ('v')\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  if (qh UPPERdelaunay && qh ATinfinity) {
-    fprintf (qh ferr, "qhull input error: can not use infinity-point ('Qz') with upper-Delaunay ('Qu')\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  if (qh SCALElast && !qh DELAUNAY && qh PRINTprecision)
-    fprintf (qh ferr, "qhull input warning: option 'Qbb' (scale-last-coordinate) is normally used with 'd' or 'v'\n");
-  qh DOcheckmax= (!qh SKIPcheckmax && qh MERGING );
-  qh KEEPnearinside= (qh DOcheckmax && !(qh KEEPinside && qh KEEPcoplanar) 
-                          && !qh NOnearinside);
-  if (qh MERGING)
-    qh CENTERtype= qh_AScentrum;
-  else if (qh VORONOI)
-    qh CENTERtype= qh_ASvoronoi;
-  if (qh TESTvneighbors && !qh MERGING) {
-    fprintf(qh ferr, "qhull input error: test vertex neighbors ('Qv') needs a merge option\n");
-    qh_errexit (qh_ERRinput, NULL ,NULL);
-  }
-  if (qh PROJECTinput || (qh DELAUNAY && qh PROJECTdelaunay)) {
-    qh hull_dim -= qh PROJECTinput;
-    if (qh DELAUNAY) {
-      qh hull_dim++;
-      extra= 1;
-    }
-  }
-  if (qh hull_dim <= 1) {
-    fprintf(qh ferr, "qhull error: dimension %d must be > 1\n", qh hull_dim);
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  for (k= 2, factorial=1.0; k < qh hull_dim; k++)
-    factorial *= k;
-  qh AREAfactor= 1.0 / factorial;
-  trace2((qh ferr, "qh_initqhull_globals: initialize globals.  dim %d numpoints %d malloc? %d projected %d to hull_dim %d\n",
-	dim, numpoints, ismalloc, qh PROJECTinput, qh hull_dim));
-  qh normal_size= qh hull_dim * sizeof(coordT);
-  qh center_size= qh normal_size - sizeof(coordT);
-  pointsneeded= qh hull_dim+1;
-  if (qh hull_dim > qh_DIMmergeVertex) {
-    qh MERGEvertices= False;
-    qh_option ("Q3-no-merge-vertices-dim-high", NULL, NULL);
-  }
-  if (qh GOODpoint)
-    pointsneeded++;
-#ifdef qh_NOtrace
-  if (qh IStracing) {
-    fprintf (qh ferr, "qhull input error: tracing is not installed (qh_NOtrace in user.h)");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-#endif
-  if (qh RERUN > 1) {
-    qh TRACElastrun= qh IStracing; /* qh_build_withrestart duplicates next conditional */
-    if (qh IStracing != -1)
-      qh IStracing= 0;
-  }else if (qh TRACEpoint != -1 || qh TRACEdist < REALmax/2 || qh TRACEmerge) {
-    qh TRACElevel= (qh IStracing? qh IStracing : 3);
-    qh IStracing= 0;
-  }
-  if (qh ROTATErandom == 0 || qh ROTATErandom == -1) {
-    seed= time (&timedata);
-    if (qh ROTATErandom  == -1) {
-      seed= -seed;
-      qh_option ("QRandom-seed", &seed, NULL );
-    }else
-      qh_option ("QRotate-random", &seed, NULL);
-    qh ROTATErandom= seed;
-  }
-  seed= qh ROTATErandom;
-  if (seed == INT_MIN)    /* default value */
-    seed= 1;
-  else if (seed < 0)
-    seed= -seed;
-  qh_RANDOMseed_(seed);
-  randr= 0.0;
-  for (i= 1000; i--; ) {
-    randi= qh_RANDOMint;
-    randr += randi;
-    if (randi > qh_RANDOMmax) {
-      fprintf (qh ferr, "\
-qhull configuration error (qh_RANDOMmax in user.h):\n\
-   random integer %d > qh_RANDOMmax (%.8g)\n",
-	       randi, qh_RANDOMmax);
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-  }
-  qh_RANDOMseed_(seed);
-  randr = randr/1000;
-  if (randr < qh_RANDOMmax/10
-  || randr > qh_RANDOMmax * 5)
-    fprintf (qh ferr, "\
-qhull configuration warning (qh_RANDOMmax in user.h):\n\
-   average of 1000 random integers (%.2g) is much different than expected (%.2g).\n\
-   Is qh_RANDOMmax (%.2g) wrong?\n",
-	     randr, qh_RANDOMmax/2.0, qh_RANDOMmax);
-  qh RANDOMa= 2.0 * qh RANDOMfactor/qh_RANDOMmax;
-  qh RANDOMb= 1.0 - qh RANDOMfactor;
-  if (qh_HASHfactor < 1.1) {
-    fprintf(qh ferr, "qhull internal error (qh_initqhull_globals): qh_HASHfactor %d must be at least 1.1.  Qhull uses linear hash probing\n",
-      qh_HASHfactor);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  if (numpoints+extra < pointsneeded) {
-    fprintf(qh ferr,"qhull input error: not enough points (%d) to construct initial simplex (need %d)\n",
-	    numpoints, pointsneeded);
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  if (qh PRINTtransparent) {
-    if (qh hull_dim != 4 || !qh DELAUNAY || qh VORONOI || qh DROPdim >= 0) {
-      fprintf(qh ferr,"qhull input error: transparent Delaunay ('Gt') needs 3-d Delaunay ('d') w/o 'GDn'\n");
-      qh_errexit(qh_ERRinput, NULL, NULL);
-    }
-    qh DROPdim = 3;
-    qh PRINTridges = True;
-  }
-  for (i= qh_PRINTEND; i--; ) {
-    if (qh PRINTout[i] == qh_PRINTgeom)
-      printgeom= True;
-    else if (qh PRINTout[i] == qh_PRINTmathematica)
-      printmath= True;
-    else if (qh PRINTout[i] == qh_PRINTcoplanars)
-      printcoplanar= True;
-    else if (qh PRINTout[i] == qh_PRINTpointnearest)
-      printcoplanar= True;
-    else if (qh PRINTout[i] == qh_PRINTpointintersect && !qh HALFspace) {
-      fprintf (qh ferr, "qhull input error: option 'Fp' is only used for \nhalfspace intersection ('Hn,n,n').\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }else if (qh PRINTout[i] == qh_PRINTtriangles && (qh HALFspace || qh VORONOI)) {
-      fprintf (qh ferr, "qhull input error: option 'Ft' is not available for Voronoi vertices or halfspace intersection\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }else if (qh PRINTout[i] == qh_PRINTcentrums && qh VORONOI) {
-      fprintf (qh ferr, "qhull input error: option 'FC' is not available for Voronoi vertices ('v')\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }else if (qh PRINTout[i] == qh_PRINTvertices) {
-      if (qh VORONOI)
-        qh_option ("Fvoronoi", NULL, NULL);
-      else 
-        qh_option ("Fvertices", NULL, NULL);
-    }
-  }
-  if (printcoplanar && qh DELAUNAY && qh JOGGLEmax < REALmax/2) {
-    if (qh PRINTprecision) 
-      fprintf (qh ferr, "qhull input warning: 'QJ' (joggle) will usually prevent coincident input sites for options 'Fc' and 'FP'\n");
-  }
-  if (!qh KEEPcoplanar && !qh KEEPinside && !qh ONLYgood) {
-    if ((qh PRINTcoplanar && qh PRINTspheres) || printcoplanar) {
-      qh KEEPcoplanar = True;
-      qh_option ("Qcoplanar", NULL, NULL);
-    }
-  }
-  if (printmath && (qh hull_dim > 3 || qh VORONOI)) {
-    fprintf (qh ferr, "qhull input error: Mathematica output is only available for 2-d and 3-d convex hulls and 2-d Delaunay triangulations\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  if (printgeom) {
-    if (qh hull_dim > 4) {
-      fprintf (qh ferr, "qhull input error: Geomview output is only available for 2-d, 3-d and 4-d\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    if (qh PRINTnoplanes && !(qh PRINTcoplanar + qh PRINTcentrums
-     + qh PRINTdots + qh PRINTspheres + qh DOintersections + qh PRINTridges)) {
-      fprintf (qh ferr, "qhull input error: no output specified for Geomview\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    if (qh VORONOI && (qh hull_dim > 3 || qh DROPdim >= 0)) {
-      fprintf (qh ferr, "qhull input error: Geomview output for Voronoi diagrams only for 2-d\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    /* can not warn about furthest-site Geomview output: no lower_threshold */
-    if (qh hull_dim == 4 && qh DROPdim == -1 &&
-	(qh PRINTcoplanar || qh PRINTspheres || qh PRINTcentrums)) {
-      fprintf (qh ferr, "qhull input warning: coplanars, vertices, and centrums output not\n\
-available for 4-d output (ignored).  Could use 'GDn' instead.\n");
-      qh PRINTcoplanar= qh PRINTspheres= qh PRINTcentrums= False;
-    }
-  }
-  qh PRINTdim= qh hull_dim;
-  if (qh DROPdim >=0) {    /* after Geomview checks */
-    if (qh DROPdim < qh hull_dim) {
-      qh PRINTdim--;
-      if (!printgeom || qh hull_dim < 3)
-        fprintf (qh ferr, "qhull input warning: drop dimension 'GD%d' is only available for 3-d/4-d Geomview\n", qh DROPdim);
-    }else
-      qh DROPdim= -1;
-  }else if (qh VORONOI) {
-    qh DROPdim= qh hull_dim-1;
-    qh PRINTdim= qh hull_dim-1;
-  }
-} /* initqhull_globals */
- 
-/*---------------------------------
-
-  qh_initqhull_mem(  )
-    initialize mem.c for qhull
-    qh.hull_dim and qh.normal_size determine some of the allocation sizes
-    if qh.MERGING,
-      includes ridgeT
-    calls qh_user_memsizes() to add up to 10 additional sizes for quick allocation
-      (see numsizes below)
-
-  returns:
-    mem.c already for qh_memalloc/qh_memfree (errors if called beforehand)
-
-  notes:
-    qh_produceoutput() prints memsizes
-
-*/
-void qh_initqhull_mem (void) {
-  int numsizes;
-  int i;
-
-  numsizes= 8+10;
-  qh_meminitbuffers (qh IStracing, qh_MEMalign, numsizes,
-                     qh_MEMbufsize,qh_MEMinitbuf);
-  qh_memsize(sizeof(vertexT));
-  if (qh MERGING) {
-    qh_memsize(sizeof(ridgeT));
-    qh_memsize(sizeof(mergeT));
-  }
-  qh_memsize(sizeof(facetT));
-  i= sizeof(setT) + (qh hull_dim - 1) * SETelemsize;  /* ridge.vertices */
-  qh_memsize(i);
-  qh_memsize(qh normal_size);        /* normal */
-  i += SETelemsize;                 /* facet.vertices, .ridges, .neighbors */
-  qh_memsize(i);
-  qh_user_memsizes();
-  qh_memsetup();
-} /* initqhull_mem */
-
-/*---------------------------------
-
-  qh_initqhull_start( infile, outfile, errfile )
-    start initialization of qhull
-    initialize statistics, stdio, default values for global variables
-
-  see:
-    qh_maxmin() determines the precision constants
-*/
-void qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile) {
-
-  qh_CPUclock; /* start the clock */
-#if qh_QHpointer
-  if (!(qh_qh= (qhT *)malloc (sizeof(qhT)))) {
-    fprintf (errfile, "qhull error (qh_initqhull_globals): insufficient memory\n");
-    exit (qh_ERRmem);  /* no error handler */
-  }
-  memset((char *)qh_qh, 0, sizeof(qhT));   /* every field is 0, FALSE, NULL */
-#else
-  memset((char *)&qh_qh, 0, sizeof(qhT));
-#endif
-  strcat (qh qhull, "qhull");
-  qh_initstatistics();
-  qh ANGLEmerge= True;
-  qh DROPdim= -1;
-  qh ferr= errfile;
-  qh fin= infile;
-  qh fout= outfile;
-  qh furthest_id= -1;
-  qh JOGGLEmax= REALmax;
-  qh KEEPminArea = REALmax;
-  qh last_low= REALmax;
-  qh last_high= REALmax;
-  qh last_newhigh= REALmax;
-  qh max_outside= 0.0;
-  qh max_vertex= 0.0;
-  qh MAXabs_coord= 0.0;
-  qh MAXsumcoord= 0.0;
-  qh MAXwidth= -REALmax;
-  qh MERGEindependent= True;
-  qh MINdenom_1= fmax_(1.0/REALmax, REALmin); /* used by qh_scalepoints */
-  qh MINoutside= 0.0;
-  qh MINvisible= REALmax;
-  qh MAXcoplanar= REALmax;
-  qh outside_err= REALmax;
-  qh premerge_centrum= 0.0;
-  qh premerge_cos= REALmax;
-  qh PRINTprecision= True;
-  qh PRINTradius= 0.0;
-  qh postmerge_cos= REALmax;
-  qh postmerge_centrum= 0.0;
-  qh ROTATErandom= INT_MIN;
-  qh MERGEvertices= True;
-  qh totarea= 0.0;
-  qh totvol= 0.0;
-  qh TRACEdist= REALmax;
-  qh TRACEpoint= -1; /* recompile or use 'TPn' */
-  qh tracefacet_id= UINT_MAX;  /* recompile to trace a facet */
-  qh tracevertex_id= UINT_MAX; /* recompile to trace a vertex */
-  qh_RANDOMseed_(1);
-} /* initqhull_start */
-
-/*---------------------------------
-
-  qh_initthresholds( commandString )
-    set thresholds for printing and scaling from commandString
-
-  returns:
-    sets qh.GOODthreshold or qh.SPLITthreshold if 'Pd0D1' used
-
-  see:
-    qh_initflags(), 'Qbk' 'QBk' 'Pdk' and 'PDk'
-    qh_inthresholds()
-
-  design:
-    for each 'Pdn' or 'PDn' option
-      check syntax
-      set qh.lower_threshold or qh.upper_threshold
-    set qh.GOODthreshold if an unbounded threshold is used
-    set qh.SPLITthreshold if a bounded threshold is used
-*/
-void qh_initthresholds(char *command) {
-  realT value;
-  int index, maxdim, k;
-  char *s= command;
-  char key;
-
-  maxdim= qh input_dim;
-  if (qh DELAUNAY && (qh PROJECTdelaunay || qh PROJECTinput))
-    maxdim++;
-  while (*s) {
-    if (*s == '-')
-      s++;
-    if (*s == 'P') {
-      s++;
-      while (*s && !isspace(key= *s++)) {
-	if (key == 'd' || key == 'D') {
-	  if (!isdigit(*s)) {
-	    fprintf(qh ferr, "qhull warning: no dimension given for Print option '%c' at: %s.  Ignored\n",
-		    key, s-1);
-	    continue;
-	  }
-	  index= qh_strtol (s, &s);
-	  if (index >= qh hull_dim) {
-	    fprintf(qh ferr, "qhull warning: dimension %d for Print option '%c' is >= %d.  Ignored\n",
-	        index, key, qh hull_dim);
-	    continue;
-	  }
-	  if (*s == ':') {
-	    s++;
-	    value= qh_strtod(s, &s);
-	    if (fabs((double)value) > 1.0) {
-	      fprintf(qh ferr, "qhull warning: value %2.4g for Print option %c is > +1 or < -1.  Ignored\n",
-	              value, key);
-	      continue;
-	    }
-	  }else
-	    value= 0.0;
-	  if (key == 'd')
-	    qh lower_threshold[index]= value;
-	  else
-	    qh upper_threshold[index]= value;
-	}
-      }
-    }else if (*s == 'Q') {
-      s++;
-      while (*s && !isspace(key= *s++)) {
-	if (key == 'b' && *s == 'B') {
-	  s++;
-	  for (k=maxdim; k--; ) {
-	    qh lower_bound[k]= -qh_DEFAULTbox;
-	    qh upper_bound[k]= qh_DEFAULTbox;
-	  }
-	}else if (key == 'b' && *s == 'b')
-	  s++;
-	else if (key == 'b' || key == 'B') {
-	  if (!isdigit(*s)) {
-	    fprintf(qh ferr, "qhull warning: no dimension given for Qhull option %c.  Ignored\n",
-		    key);
-	    continue;
-	  }
-	  index= qh_strtol (s, &s);
-	  if (index >= maxdim) {
-	    fprintf(qh ferr, "qhull warning: dimension %d for Qhull option %c is >= %d.  Ignored\n",
-	        index, key, maxdim);
-	    continue;
-	  }
-	  if (*s == ':') {
-	    s++;
-	    value= qh_strtod(s, &s);
-	  }else if (key == 'b')
-	    value= -qh_DEFAULTbox;
-	  else
-	    value= qh_DEFAULTbox;
-	  if (key == 'b')
-	    qh lower_bound[index]= value;
-	  else
-	    qh upper_bound[index]= value;
-	}
-      }
-    }else {
-      while (*s && !isspace (*s))
-        s++;
-    }
-    while (isspace (*s))
-      s++;
-  }
-  for (k= qh hull_dim; k--; ) {
-    if (qh lower_threshold[k] > -REALmax/2) {
-      qh GOODthreshold= True;
-      if (qh upper_threshold[k] < REALmax/2) {
-        qh SPLITthresholds= True;
-        qh GOODthreshold= False;
-        break;
-      }
-    }else if (qh upper_threshold[k] < REALmax/2)
-      qh GOODthreshold= True;
-  }
-} /* initthresholds */
-
-/*---------------------------------
-
-  qh_option( option, intVal, realVal )
-    add an option description to qh.qhull_options
-
-  notes:
-    will be printed with statistics ('Ts') and errors
-    strlen(option) < 40
-*/
-void qh_option (char *option, int *i, realT *r) {
-  char buf[200];
-  int len, maxlen;
-
-  sprintf (buf, "  %s", option);
-  if (i)
-    sprintf (buf+strlen(buf), " %d", *i);
-  if (r)
-    sprintf (buf+strlen(buf), " %2.2g", *r);
-  len= strlen(buf);
-  qh qhull_optionlen += len;
-  maxlen= sizeof (qh qhull_options) - len -1;
-  maximize_(maxlen, 0);
-  if (qh qhull_optionlen >= 80 && maxlen > 0) {
-    qh qhull_optionlen= len;
-    strncat (qh qhull_options, "\n", maxlen--);
-  }
-  strncat (qh qhull_options, buf, maxlen);
-} /* option */
-
-#if qh_QHpointer
-/*---------------------------------
-
-  qh_restore_qhull( oldqh )
-    restores a previously saved qhull
-    also restores qh_qhstat and qhmem.tempstack
-
-  notes:
-    errors if current qhull hasn't been saved or freed
-    uses qhmem for error reporting
-
-  NOTE 1998/5/11:
-    Freeing memory after qh_save_qhull and qh_restore_qhull
-    is complicated.  The procedures will be redesigned.
-
-  see:
-    qh_save_qhull()
-*/
-void qh_restore_qhull (qhT **oldqh) {
-
-  if (*oldqh && strcmp ((*oldqh)->qhull, "qhull")) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_restore_qhull): %p is not a qhull data structure\n",
-                  *oldqh);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  if (qh_qh) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_restore_qhull): did not save or free existing qhull\n");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  if (!*oldqh || !(*oldqh)->old_qhstat) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_restore_qhull): did not previously save qhull %p\n",
-                  *oldqh);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  qh_qh= *oldqh;
-  *oldqh= NULL;
-  qh_qhstat= qh old_qhstat;
-  qhmem.tempstack= qh old_tempstack;
-  trace1((qh ferr, "qh_restore_qhull: restored qhull from %p\n", *oldqh));
-} /* restore_qhull */
-
-/*---------------------------------
-
-  qh_save_qhull(  )
-    saves qhull for a later qh_restore_qhull
-    also saves qh_qhstat and qhmem.tempstack
-
-  returns:
-    qh_qh=NULL
-
-  notes:
-    need to initialize qhull or call qh_restore_qhull before continuing
-
-  NOTE 1998/5/11:
-    Freeing memory after qh_save_qhull and qh_restore_qhull
-    is complicated.  The procedures will be redesigned.
-
-  see:
-    qh_restore_qhull()
-*/
-qhT *qh_save_qhull (void) {
-  qhT *oldqh;
-
-  trace1((qhmem.ferr, "qh_save_qhull: save qhull %p\n", qh_qh));
-  if (!qh_qh) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_save_qhull): qhull not initialized\n");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  qh old_qhstat= qh_qhstat;
-  qh_qhstat= NULL;
-  qh old_tempstack= qhmem.tempstack;
-  qhmem.tempstack= NULL;
-  oldqh= qh_qh;
-  qh_qh= NULL;
-  return oldqh;
-} /* save_qhull */
-
-#endif
-
-/*---------------------------------
-
-  qh_strtol( s, endp) qh_strtod( s, endp)
-    internal versions of strtol() and strtod()
-    does not skip trailing spaces
-  notes:
-    some implementations of strtol()/strtod() skip trailing spaces
-*/
-double qh_strtod (const char *s, char **endp) {
-  double result;
-
-  result= strtod (s, endp);
-  if (s < (*endp) && (*endp)[-1] == ' ')
-    (*endp)--;
-  return result;
-} /* strtod */
-
-int qh_strtol (const char *s, char **endp) {
-  int result;
-
-  result= (int) strtol (s, endp, 10);
-  if (s< (*endp) && (*endp)[-1] == ' ')
-    (*endp)--;
-  return result;
-} /* strtol */
diff --git a/extern/qhull/src/io.c b/extern/qhull/src/io.c
deleted file mode 100644
index 9b0ccdd0b24..00000000000
--- a/extern/qhull/src/io.c
+++ /dev/null
@@ -1,4089 +0,0 @@
-/*
  ---------------------------------
-
-   io.c 
-   Input/Output routines of qhull application
-
-   see qh-io.htm and io.h
-
-   see user.c for qh_errprint and qh_printfacetlist
-
-   unix.c calls qh_readpoints and qh_produce_output
-
-   unix.c and user.c are the only callers of io.c functions
-   This allows the user to avoid loading io.o from qhull.a
-
-   copyright (c) 1993-2002 The Geometry Center        
-*/
-
-#include "qhull_a.h"
-
-/*========= -prototypes for internal functions ========= */
-
-static int qh_compare_facetarea(const void *p1, const void *p2);
-static int qh_compare_facetmerge(const void *p1, const void *p2);
-static int qh_compare_facetvisit(const void *p1, const void *p2);
-int qh_compare_vertexpoint(const void *p1, const void *p2); /* not used */
-
-/*========= -functions in alphabetical order after qh_produce_output()  =====*/
-
-/*---------------------------------
-  
-  qh_produce_output()
-    prints out the result of qhull in desired format
-    if qh.GETarea
-      computes and prints area and volume
-    qh.PRINTout[] is an array of output formats
-
-  notes:
-    prints output in qh.PRINTout order
-*/
-void qh_produce_output(void) {
-  int i, tempsize= qh_setsize ((setT*)qhmem.tempstack), d_1;
-
-  if (qh VORONOI) {
-    qh_clearcenters (qh_ASvoronoi);
-    qh_vertexneighbors();
-  }
-  if (qh TRIangulate) {
-    qh_triangulate(); 
-    if (qh VERIFYoutput && !qh CHECKfrequently) 
-      qh_checkpolygon (qh facet_list);
-  }
-  qh_findgood_all (qh facet_list); 
-  if (qh GETarea)
-    qh_getarea(qh facet_list);
-  if (qh KEEParea || qh KEEPmerge || qh KEEPminArea < REALmax/2)
-    qh_markkeep (qh facet_list);
-  if (qh PRINTsummary)
-    qh_printsummary(qh ferr);
-  else if (qh PRINTout[0] == qh_PRINTnone)
-    qh_printsummary(qh fout);
-  for (i= 0; i < qh_PRINTEND; i++)
-    qh_printfacets (qh fout, qh PRINTout[i], qh facet_list, NULL, !qh_ALL);
-  qh_allstatistics();
-  if (qh PRINTprecision && !qh MERGING && (qh JOGGLEmax > REALmax/2 || qh RERUN))
-    qh_printstats (qh ferr, qhstat precision, NULL);
-  if (qh VERIFYoutput && (zzval_(Zridge) > 0 || zzval_(Zridgemid) > 0)) 
-    qh_printstats (qh ferr, qhstat vridges, NULL);
-  if (qh PRINTstatistics) {
-    qh_collectstatistics();
-    qh_printstatistics(qh ferr, "");
-    qh_memstatistics (qh ferr);
-    d_1= sizeof(setT) + (qh hull_dim - 1) * SETelemsize;
-    fprintf(qh ferr, "\
-    size in bytes: merge %ld ridge %ld vertex %ld facet %ld\n\
-         normal %d ridge vertices %d facet vertices or neighbors %ld\n",
-	    sizeof(mergeT), sizeof(ridgeT),
-	    sizeof(vertexT), sizeof(facetT),
-	    qh normal_size, d_1, d_1 + SETelemsize);
-  }
-  if (qh_setsize ((setT*)qhmem.tempstack) != tempsize) {
-    fprintf (qh ferr, "qhull internal error (qh_produce_output): temporary sets not empty (%d)\n",
-	     qh_setsize ((setT*)qhmem.tempstack));
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-} /* produce_output */
-
-
-/*---------------------------------
-  
-  dfacet( id )
-    print facet by id, for debugging
-
-*/
-void dfacet (unsigned id) {
-  facetT *facet;
-
-  FORALLfacets {
-    if (facet->id == id) {
-      qh_printfacet (qh fout, facet);
-      break;
-    }
-  }
-} /* dfacet */
-
-
-/*---------------------------------
-  
-  dvertex( id )
-    print vertex by id, for debugging
-*/
-void dvertex (unsigned id) {
-  vertexT *vertex;
-
-  FORALLvertices {
-    if (vertex->id == id) {
-      qh_printvertex (qh fout, vertex);
-      break;
-    }
-  }
-} /* dvertex */
-
-
-/*---------------------------------
-  
-  qh_compare_vertexpoint( p1, p2 )
-    used by qsort() to order vertices by point id 
-*/
-int qh_compare_vertexpoint(const void *p1, const void *p2) {
-  vertexT *a= *((vertexT **)p1), *b= *((vertexT **)p2);
- 
-  return ((qh_pointid(a->point) > qh_pointid(b->point)?1:-1));
-} /* compare_vertexpoint */
-
-/*---------------------------------
-  
-  qh_compare_facetarea( p1, p2 )
-    used by qsort() to order facets by area
-*/
-static int qh_compare_facetarea(const void *p1, const void *p2) {
-  facetT *a= *((facetT **)p1), *b= *((facetT **)p2);
-
-  if (!a->isarea)
-    return -1;
-  if (!b->isarea)
-    return 1; 
-  if (a->f.area > b->f.area)
-    return 1;
-  else if (a->f.area == b->f.area)
-    return 0;
-  return -1;
-} /* compare_facetarea */
-
-/*---------------------------------
-  
-  qh_compare_facetmerge( p1, p2 )
-    used by qsort() to order facets by number of merges
-*/
-static int qh_compare_facetmerge(const void *p1, const void *p2) {
-  facetT *a= *((facetT **)p1), *b= *((facetT **)p2);
- 
-  return (a->nummerge - b->nummerge);
-} /* compare_facetvisit */
-
-/*---------------------------------
-  
-  qh_compare_facetvisit( p1, p2 )
-    used by qsort() to order facets by visit id or id
-*/
-static int qh_compare_facetvisit(const void *p1, const void *p2) {
-  facetT *a= *((facetT **)p1), *b= *((facetT **)p2);
-  int i,j;
-
-  if (!(i= a->visitid))
-    i= - a->id; /* do not convert to int */
-  if (!(j= b->visitid))
-    j= - b->id;
-  return (i - j);
-} /* compare_facetvisit */
-
-/*---------------------------------
-  
-  qh_countfacets( facetlist, facets, printall, 
-          numfacets, numsimplicial, totneighbors, numridges, numcoplanar, numtricoplanars  )
-    count good facets for printing and set visitid
-    if allfacets, ignores qh_skipfacet()
-
-  notes:
-    qh_printsummary and qh_countfacets must match counts
-
-  returns:
-    numfacets, numsimplicial, total neighbors, numridges, coplanars
-    each facet with ->visitid indicating 1-relative position
-      ->visitid==0 indicates not good
-  
-  notes
-    numfacets >= numsimplicial
-    if qh.NEWfacets, 
-      does not count visible facets (matches qh_printafacet)
-
-  design:
-    for all facets on facetlist and in facets set
-      unless facet is skipped or visible (i.e., will be deleted)
-        mark facet->visitid
-        update counts
-*/
-void qh_countfacets (facetT *facetlist, setT *facets, boolT printall,
-    int *numfacetsp, int *numsimplicialp, int *totneighborsp, int *numridgesp, int *numcoplanarsp, int *numtricoplanarsp) {
-  facetT *facet, **facetp;
-  int numfacets= 0, numsimplicial= 0, numridges= 0, totneighbors= 0, numcoplanars= 0, numtricoplanars= 0;
-
-  FORALLfacet_(facetlist) {
-    if ((facet->visible && qh NEWfacets)
-    || (!printall && qh_skipfacet(facet)))
-      facet->visitid= 0;
-    else {
-      facet->visitid= ++numfacets;
-      totneighbors += qh_setsize (facet->neighbors);
-      if (facet->simplicial) {
-        numsimplicial++;
-	if (facet->keepcentrum && facet->tricoplanar)
-	  numtricoplanars++;
-      }else
-        numridges += qh_setsize (facet->ridges);
-      if (facet->coplanarset)
-        numcoplanars += qh_setsize (facet->coplanarset);
-    }
-  }
-  FOREACHfacet_(facets) {
-    if ((facet->visible && qh NEWfacets)
-    || (!printall && qh_skipfacet(facet)))
-      facet->visitid= 0;
-    else {
-      facet->visitid= ++numfacets;
-      totneighbors += qh_setsize (facet->neighbors);
-      if (facet->simplicial){
-        numsimplicial++;
-	if (facet->keepcentrum && facet->tricoplanar)
-	  numtricoplanars++;
-      }else
-        numridges += qh_setsize (facet->ridges);
-      if (facet->coplanarset)
-        numcoplanars += qh_setsize (facet->coplanarset);
-    }
-  }
-  qh visit_id += numfacets+1;
-  *numfacetsp= numfacets;
-  *numsimplicialp= numsimplicial;
-  *totneighborsp= totneighbors;
-  *numridgesp= numridges;
-  *numcoplanarsp= numcoplanars;
-  *numtricoplanarsp= numtricoplanars;
-} /* countfacets */
-
-/*---------------------------------
-  
-  qh_detvnorm( vertex, vertexA, centers, offset )
-    compute separating plane of the Voronoi diagram for a pair of input sites
-    centers= set of facets (i.e., Voronoi vertices)
-      facet->visitid= 0 iff vertex-at-infinity (i.e., unbounded)
-        
-  assumes:
-    qh_ASvoronoi and qh_vertexneighbors() already set
-  
-  returns:
-    norm
-      a pointer into qh.gm_matrix to qh.hull_dim-1 reals
-      copy the data before reusing qh.gm_matrix
-    offset
-      if 'QVn'
-        sign adjusted so that qh.GOODvertexp is inside
-      else
-        sign adjusted so that vertex is inside
-      
-    qh.gm_matrix= simplex of points from centers relative to first center
-    
-  notes:
-    in io.c so that code for 'v Tv' can be removed by removing io.c
-    returns pointer into qh.gm_matrix to avoid tracking of temporary memory
-  
-  design:
-    determine midpoint of input sites
-    build points as the set of Voronoi vertices
-    select a simplex from points (if necessary)
-      include midpoint if the Voronoi region is unbounded
-    relocate the first vertex of the simplex to the origin
-    compute the normalized hyperplane through the simplex
-    orient the hyperplane toward 'QVn' or 'vertex'
-    if 'Tv' or 'Ts'
-      if bounded
-        test that hyperplane is the perpendicular bisector of the input sites
-      test that Voronoi vertices not in the simplex are still on the hyperplane
-    free up temporary memory
-*/
-pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp) {
-  facetT *facet, **facetp;
-  int  i, k, pointid, pointidA, point_i, point_n;
-  setT *simplex= NULL;
-  pointT *point, **pointp, *point0, *midpoint, *normal, *inpoint;
-  coordT *coord, *gmcoord, *normalp;
-  setT *points= qh_settemp (qh TEMPsize);
-  boolT nearzero= False;
-  boolT unbounded= False;
-  int numcenters= 0;
-  int dim= qh hull_dim - 1;
-  realT dist, offset, angle, zero= 0.0;
-
-  midpoint= qh gm_matrix + qh hull_dim * qh hull_dim;  /* last row */
-  for (k= 0; k < dim; k++)
-    midpoint[k]= (vertex->point[k] + vertexA->point[k])/2;
-  FOREACHfacet_(centers) {
-    numcenters++;
-    if (!facet->visitid)
-      unbounded= True;
-    else {
-      if (!facet->center)
-        facet->center= qh_facetcenter (facet->vertices);
-      qh_setappend (&points, facet->center);
-    }
-  }
-  if (numcenters > dim) {
-    simplex= qh_settemp (qh TEMPsize);
-    qh_setappend (&simplex, vertex->point);
-    if (unbounded)
-      qh_setappend (&simplex, midpoint);
-    qh_maxsimplex (dim, points, NULL, 0, &simplex);
-    qh_setdelnth (simplex, 0);
-  }else if (numcenters == dim) {
-    if (unbounded)
-      qh_setappend (&points, midpoint);
-    simplex= points; 
-  }else {
-    fprintf(qh ferr, "qh_detvnorm: too few points (%d) to compute separating plane\n", numcenters);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  i= 0;
-  gmcoord= qh gm_matrix;
-  point0= SETfirstt_(simplex, pointT);
-  FOREACHpoint_(simplex) {
-    if (qh IStracing >= 4)
-      qh_printmatrix(qh ferr, "qh_detvnorm: Voronoi vertex or midpoint", 
-                              &point, 1, dim);
-    if (point != point0) {
-      qh gm_row[i++]= gmcoord;
-      coord= point0;
-      for (k= dim; k--; )
-        *(gmcoord++)= *point++ - *coord++;
-    }
-  }
-  qh gm_row[i]= gmcoord;  /* does not overlap midpoint, may be used later for qh_areasimplex */
-  normal= gmcoord;
-  qh_sethyperplane_gauss (dim, qh gm_row, point0, True,
-           	normal, &offset, &nearzero);
-  if (qh GOODvertexp == vertexA->point)
-    inpoint= vertexA->point;
-  else
-    inpoint= vertex->point;
-  zinc_(Zdistio);
-  dist= qh_distnorm (dim, inpoint, normal, &offset);
-  if (dist > 0) {
-    offset= -offset;
-    normalp= normal;
-    for (k= dim; k--; ) {
-      *normalp= -(*normalp);
-      normalp++;
-    }
-  }
-  if (qh VERIFYoutput || qh PRINTstatistics) {
-    pointid= qh_pointid (vertex->point);
-    pointidA= qh_pointid (vertexA->point);
-    if (!unbounded) {
-      zinc_(Zdiststat);
-      dist= qh_distnorm (dim, midpoint, normal, &offset);
-      if (dist < 0)
-        dist= -dist;
-      zzinc_(Zridgemid);
-      wwmax_(Wridgemidmax, dist);
-      wwadd_(Wridgemid, dist);
-      trace4((qh ferr, "qh_detvnorm: points %d %d midpoint dist %2.2g\n",
-                 pointid, pointidA, dist));
-      for (k= 0; k < dim; k++) 
-        midpoint[k]= vertexA->point[k] - vertex->point[k];  /* overwrites midpoint! */
-      qh_normalize (midpoint, dim, False);
-      angle= qh_distnorm (dim, midpoint, normal, &zero); /* qh_detangle uses dim+1 */
-      if (angle < 0.0)
-	angle= angle + 1.0;
-      else
-	angle= angle - 1.0;
-      if (angle < 0.0)
-	angle -= angle;
-      trace4((qh ferr, "qh_detvnorm: points %d %d angle %2.2g nearzero %d\n",
-                 pointid, pointidA, angle, nearzero));
-      if (nearzero) {
-        zzinc_(Zridge0);
-        wwmax_(Wridge0max, angle);
-        wwadd_(Wridge0, angle);
-      }else {
-        zzinc_(Zridgeok)
-        wwmax_(Wridgeokmax, angle);
-        wwadd_(Wridgeok, angle);
-      }
-    }
-    if (simplex != points) {
-      FOREACHpoint_i_(points) {
-        if (!qh_setin (simplex, point)) {
-          facet= SETelemt_(centers, point_i, facetT);
-	  zinc_(Zdiststat);
-  	  dist= qh_distnorm (dim, point, normal, &offset);
-          if (dist < 0)
-            dist= -dist;
-	  zzinc_(Zridge);
-          wwmax_(Wridgemax, dist);
-          wwadd_(Wridge, dist);
-          trace4((qh ferr, "qh_detvnorm: points %d %d Voronoi vertex %d dist %2.2g\n",
-                             pointid, pointidA, facet->visitid, dist));
-        }
-      }
-    }
-  }
-  *offsetp= offset;
-  if (simplex != points)
-    qh_settempfree (&simplex);
-  qh_settempfree (&points);
-  return normal;
-} /* detvnorm */
-
-/*---------------------------------
-
-  qh_detvridge( vertexA )
-    determine Voronoi ridge from 'seen' neighbors of vertexA
-    include one vertex-at-infinite if an !neighbor->visitid
-
-  returns:
-    temporary set of centers (facets, i.e., Voronoi vertices)
-    sorted by center id
-*/
-setT *qh_detvridge (vertexT *vertex) {
-  setT *centers= qh_settemp (qh TEMPsize);
-  setT *tricenters= qh_settemp (qh TEMPsize);
-  facetT *neighbor, **neighborp;
-  boolT firstinf= True;
-  
-  FOREACHneighbor_(vertex) {
-    if (neighbor->seen) {
-      if (neighbor->visitid) {
-	if (!neighbor->tricoplanar || qh_setunique (&tricenters, neighbor->center)) 
-	  qh_setappend (¢ers, neighbor);
-      }else if (firstinf) {
-        firstinf= False;
-        qh_setappend (¢ers, neighbor);
-      }
-    }
-  }
-  qsort (SETaddr_(centers, facetT), qh_setsize (centers),
-             sizeof (facetT *), qh_compare_facetvisit);
-  qh_settempfree (&tricenters);
-  return centers;
-} /* detvridge */      
-
-/*---------------------------------
-
-  qh_detvridge3( atvertex, vertex )
-    determine 3-d Voronoi ridge from 'seen' neighbors of atvertex and vertex
-    include one vertex-at-infinite for !neighbor->visitid
-    assumes all facet->seen2= True
-
-  returns:
-    temporary set of centers (facets, i.e., Voronoi vertices)
-    listed in adjacency order (not oriented)
-    all facet->seen2= True
-
-  design:
-    mark all neighbors of atvertex
-    for each adjacent neighbor of both atvertex and vertex
-      if neighbor selected
-        add neighbor to set of Voronoi vertices
-*/
-setT *qh_detvridge3 (vertexT *atvertex, vertexT *vertex) {
-  setT *centers= qh_settemp (qh TEMPsize);
-  setT *tricenters= qh_settemp (qh TEMPsize);
-  facetT *neighbor, **neighborp, *facet= NULL;
-  boolT firstinf= True;
-  
-  FOREACHneighbor_(atvertex)
-    neighbor->seen2= False;
-  FOREACHneighbor_(vertex) {
-    if (!neighbor->seen2) {
-      facet= neighbor;
-      break;
-    }
-  }
-  while (facet) { 
-    facet->seen2= True;
-    if (neighbor->seen) {
-      if (facet->visitid) {
-	if (!facet->tricoplanar || qh_setunique (&tricenters, facet->center)) 
-	  qh_setappend (¢ers, facet);
-      }else if (firstinf) {
-        firstinf= False;
-        qh_setappend (¢ers, facet);
-      }
-    }
-    FOREACHneighbor_(facet) {
-      if (!neighbor->seen2) {
-	if (qh_setin (vertex->neighbors, neighbor))
-          break;
-	else
-	  neighbor->seen2= True;
-      }
-    }
-    facet= neighbor;
-  }
-  if (qh CHECKfrequently) {
-    FOREACHneighbor_(vertex) {
-      if (!neighbor->seen2) {
-	fprintf (stderr, "qh_detvridge3: neigbors of vertex p%d are not connected at facet %d\n",
-	         qh_pointid (vertex->point), neighbor->id);
-	qh_errexit (qh_ERRqhull, neighbor, NULL);
-      }
-    }
-  }
-  FOREACHneighbor_(atvertex) 
-    neighbor->seen2= True;
-  qh_settempfree (&tricenters);
-  return centers;
-} /* detvridge3 */      
-
-/*---------------------------------
-  
-  qh_eachvoronoi( fp, printvridge, vertex, visitall, innerouter, inorder )
-    if visitall,
-      visit all Voronoi ridges for vertex (i.e., an input site)
-    else
-      visit all unvisited Voronoi ridges for vertex
-      all vertex->seen= False if unvisited
-    assumes
-      all facet->seen= False
-      all facet->seen2= True (for qh_detvridge3)
-      all facet->visitid == 0 if vertex_at_infinity
-                         == index of Voronoi vertex 
-                         >= qh.num_facets if ignored
-    innerouter:
-      qh_RIDGEall--  both inner (bounded) and outer (unbounded) ridges
-      qh_RIDGEinner- only inner
-      qh_RIDGEouter- only outer
-      
-    if inorder
-      orders vertices for 3-d Voronoi diagrams
-  
-  returns:
-    number of visited ridges (does not include previously visited ridges)
-    
-    if printvridge,
-      calls printvridge( fp, vertex, vertexA, centers)
-        fp== any pointer (assumes FILE*)
-        vertex,vertexA= pair of input sites that define a Voronoi ridge
-        centers= set of facets (i.e., Voronoi vertices)
-                 ->visitid == index or 0 if vertex_at_infinity
-                 ordered for 3-d Voronoi diagram
-  notes:
-    uses qh.vertex_visit
-  
-  see:
-    qh_eachvoronoi_all()
-  
-  design:
-    mark selected neighbors of atvertex
-    for each selected neighbor (either Voronoi vertex or vertex-at-infinity)
-      for each unvisited vertex 
-        if atvertex and vertex share more than d-1 neighbors
-          bump totalcount
-          if printvridge defined
-            build the set of shared neighbors (i.e., Voronoi vertices)
-            call printvridge
-*/
-int qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder) {
-  boolT unbounded;
-  int count;
-  facetT *neighbor, **neighborp, *neighborA, **neighborAp;
-  setT *centers;
-  setT *tricenters= qh_settemp (qh TEMPsize);
-
-  vertexT *vertex, **vertexp;
-  boolT firstinf;
-  unsigned int numfacets= (unsigned int)qh num_facets;
-  int totridges= 0;
-
-  qh vertex_visit++;
-  atvertex->seen= True;
-  if (visitall) {
-    FORALLvertices 
-      vertex->seen= False;
-  }
-  FOREACHneighbor_(atvertex) {
-    if (neighbor->visitid < numfacets) 
-      neighbor->seen= True;
-  }
-  FOREACHneighbor_(atvertex) {
-    if (neighbor->seen) {
-      FOREACHvertex_(neighbor->vertices) {
-        if (vertex->visitid != qh vertex_visit && !vertex->seen) {
-	  vertex->visitid= qh vertex_visit;
-          count= 0;
-          firstinf= True;
-	  qh_settruncate (tricenters, 0);
-          FOREACHneighborA_(vertex) {
-            if (neighborA->seen) {
-	      if (neighborA->visitid) {
-		if (!neighborA->tricoplanar || qh_setunique (&tricenters, neighborA->center))
-		  count++;
-              }else if (firstinf) {
-                count++;
-                firstinf= False;
-	      }
-	    }
-          }
-          if (count >= qh hull_dim - 1) {  /* e.g., 3 for 3-d Voronoi */
-            if (firstinf) {
-              if (innerouter == qh_RIDGEouter)
-                continue;
-              unbounded= False;
-            }else {
-              if (innerouter == qh_RIDGEinner)
-                continue;
-              unbounded= True;
-            }
-            totridges++;
-            trace4((qh ferr, "qh_eachvoronoi: Voronoi ridge of %d vertices between sites %d and %d\n",
-                  count, qh_pointid (atvertex->point), qh_pointid (vertex->point)));
-            if (printvridge) { 
-	      if (inorder && qh hull_dim == 3+1) /* 3-d Voronoi diagram */
-                centers= qh_detvridge3 (atvertex, vertex);
-	      else
-                centers= qh_detvridge (vertex);
-              (*printvridge) (fp, atvertex, vertex, centers, unbounded);
-              qh_settempfree (¢ers);
-            }
-          }
-        }
-      }
-    }
-  }
-  FOREACHneighbor_(atvertex) 
-    neighbor->seen= False;
-  qh_settempfree (&tricenters);
-  return totridges;
-} /* eachvoronoi */
-  
-
-/*---------------------------------
-  
-  qh_eachvoronoi_all( fp, printvridge, isupper, innerouter, inorder )
-    visit all Voronoi ridges
-    
-    innerouter:
-      see qh_eachvoronoi()
-      
-    if inorder
-      orders vertices for 3-d Voronoi diagrams
-    
-  returns
-    total number of ridges 
-
-    if isupper == facet->upperdelaunay  (i.e., a Vornoi vertex)
-      facet->visitid= Voronoi vertex index (same as 'o' format)
-    else 
-      facet->visitid= 0
-
-    if printvridge,
-      calls printvridge( fp, vertex, vertexA, centers)
-      [see qh_eachvoronoi]
-      
-  notes:
-    Not used for qhull.exe
-    same effect as qh_printvdiagram but ridges not sorted by point id
-*/
-int qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder) {
-  facetT *facet;
-  vertexT *vertex;
-  int numcenters= 1;  /* vertex 0 is vertex-at-infinity */
-  int totridges= 0;
-
-  qh_clearcenters (qh_ASvoronoi);
-  qh_vertexneighbors();
-  maximize_(qh visit_id, (unsigned) qh num_facets);
-  FORALLfacets {
-    facet->visitid= 0;
-    facet->seen= False;
-    facet->seen2= True;
-  }
-  FORALLfacets {
-    if (facet->upperdelaunay == isupper)
-      facet->visitid= numcenters++;
-  }
-  FORALLvertices 
-    vertex->seen= False;
-  FORALLvertices {
-    if (qh GOODvertex > 0 && qh_pointid(vertex->point)+1 != qh GOODvertex)
-      continue;
-    totridges += qh_eachvoronoi (fp, printvridge, vertex, 
-                   !qh_ALL, innerouter, inorder);
-  }
-  return totridges;
-} /* eachvoronoi_all */
-      
-/*---------------------------------
-  
-  qh_facet2point( facet, point0, point1, mindist )
-    return two projected temporary vertices for a 2-d facet
-    may be non-simplicial
-
-  returns:
-    point0 and point1 oriented and projected to the facet
-    returns mindist (maximum distance below plane)
-*/
-void qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist) {
-  vertexT *vertex0, *vertex1;
-  realT dist;
-  
-  if (facet->toporient ^ qh_ORIENTclock) {
-    vertex0= SETfirstt_(facet->vertices, vertexT);
-    vertex1= SETsecondt_(facet->vertices, vertexT);
-  }else {
-    vertex1= SETfirstt_(facet->vertices, vertexT);
-    vertex0= SETsecondt_(facet->vertices, vertexT);
-  }
-  zadd_(Zdistio, 2);
-  qh_distplane(vertex0->point, facet, &dist);
-  *mindist= dist;
-  *point0= qh_projectpoint(vertex0->point, facet, dist);
-  qh_distplane(vertex1->point, facet, &dist);
-  minimize_(*mindist, dist);		
-  *point1= qh_projectpoint(vertex1->point, facet, dist);
-} /* facet2point */
-
-
-/*---------------------------------
-  
-  qh_facetvertices( facetlist, facets, allfacets )
-    returns temporary set of vertices in a set and/or list of facets
-    if allfacets, ignores qh_skipfacet()
-
-  returns:
-    vertices with qh.vertex_visit
-    
-  notes:
-    optimized for allfacets of facet_list
-
-  design:
-    if allfacets of facet_list
-      create vertex set from vertex_list
-    else
-      for each selected facet in facets or facetlist
-        append unvisited vertices to vertex set
-*/
-setT *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets) {
-  setT *vertices;
-  facetT *facet, **facetp;
-  vertexT *vertex, **vertexp;
-
-  qh vertex_visit++;
-  if (facetlist == qh facet_list && allfacets && !facets) {
-    vertices= qh_settemp (qh num_vertices);
-    FORALLvertices {
-      vertex->visitid= qh vertex_visit; 
-      qh_setappend (&vertices, vertex);
-    }
-  }else {
-    vertices= qh_settemp (qh TEMPsize);
-    FORALLfacet_(facetlist) {
-      if (!allfacets && qh_skipfacet (facet))
-        continue;
-      FOREACHvertex_(facet->vertices) {
-        if (vertex->visitid != qh vertex_visit) {
-          vertex->visitid= qh vertex_visit;
-          qh_setappend (&vertices, vertex);
-        }
-      }
-    }
-  }
-  FOREACHfacet_(facets) {
-    if (!allfacets && qh_skipfacet (facet))
-      continue;
-    FOREACHvertex_(facet->vertices) {
-      if (vertex->visitid != qh vertex_visit) {
-        vertex->visitid= qh vertex_visit;
-        qh_setappend (&vertices, vertex);
-      }
-    }
-  }
-  return vertices;
-} /* facetvertices */
-
-/*---------------------------------
-  
-  qh_geomplanes( facet, outerplane, innerplane )
-    return outer and inner planes for Geomview 
-    qh.PRINTradius is size of vertices and points (includes qh.JOGGLEmax)
-
-  notes:
-    assume precise calculations in io.c with roundoff covered by qh_GEOMepsilon
-*/
-void qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane) {
-  realT radius;
-
-  if (qh MERGING || qh JOGGLEmax < REALmax/2) {
-    qh_outerinner (facet, outerplane, innerplane);
-    radius= qh PRINTradius;
-    if (qh JOGGLEmax < REALmax/2)
-      radius -= qh JOGGLEmax * sqrt (qh hull_dim);  /* already accounted for in qh_outerinner() */
-    *outerplane += radius;
-    *innerplane -= radius;
-    if (qh PRINTcoplanar || qh PRINTspheres) {
-      *outerplane += qh MAXabs_coord * qh_GEOMepsilon;
-      *innerplane -= qh MAXabs_coord * qh_GEOMepsilon;
-    }
-  }else 
-    *innerplane= *outerplane= 0;
-} /* geomplanes */
-
-
-/*---------------------------------
-  
-  qh_markkeep( facetlist )
-    mark good facets that meet qh.KEEParea, qh.KEEPmerge, and qh.KEEPminArea
-    ignores visible facets (not part of convex hull)
-
-  returns:
-    may clear facet->good
-    recomputes qh.num_good
-
-  design:
-    get set of good facets
-    if qh.KEEParea
-      sort facets by area
-      clear facet->good for all but n largest facets
-    if qh.KEEPmerge
-      sort facets by merge count
-      clear facet->good for all but n most merged facets
-    if qh.KEEPminarea
-      clear facet->good if area too small
-    update qh.num_good    
-*/
-void qh_markkeep (facetT *facetlist) {
-  facetT *facet, **facetp;
-  setT *facets= qh_settemp (qh num_facets);
-  int size, count;
-
-  trace2((qh ferr, "qh_markkeep: only keep %d largest and/or %d most merged facets and/or min area %.2g\n",
-          qh KEEParea, qh KEEPmerge, qh KEEPminArea));
-  FORALLfacet_(facetlist) {
-    if (!facet->visible && facet->good)
-      qh_setappend (&facets, facet);
-  }
-  size= qh_setsize (facets);
-  if (qh KEEParea) {
-    qsort (SETaddr_(facets, facetT), size,
-             sizeof (facetT *), qh_compare_facetarea);
-    if ((count= size - qh KEEParea) > 0) {
-      FOREACHfacet_(facets) {
-        facet->good= False;
-        if (--count == 0)
-          break;
-      }
-    }
-  }
-  if (qh KEEPmerge) {
-    qsort (SETaddr_(facets, facetT), size,
-             sizeof (facetT *), qh_compare_facetmerge);
-    if ((count= size - qh KEEPmerge) > 0) {
-      FOREACHfacet_(facets) {
-        facet->good= False;
-        if (--count == 0)
-          break;
-      }
-    }
-  }
-  if (qh KEEPminArea < REALmax/2) {
-    FOREACHfacet_(facets) {
-      if (!facet->isarea || facet->f.area < qh KEEPminArea)
-	facet->good= False;
-    }
-  }
-  qh_settempfree (&facets);
-  count= 0;
-  FORALLfacet_(facetlist) {
-    if (facet->good)
-      count++;
-  }
-  qh num_good= count;
-} /* markkeep */
-
-
-/*---------------------------------
-  
-  qh_markvoronoi( facetlist, facets, printall, islower, numcenters )
-    mark voronoi vertices for printing by site pairs
-  
-  returns:
-    temporary set of vertices indexed by pointid
-    islower set if printing lower hull (i.e., at least one facet is lower hull)
-    numcenters= total number of Voronoi vertices
-    bumps qh.printoutnum for vertex-at-infinity
-    clears all facet->seen and sets facet->seen2
-    
-    if selected
-      facet->visitid= Voronoi vertex id
-    else if upper hull (or 'Qu' and lower hull)
-      facet->visitid= 0
-    else
-      facet->visitid >= qh num_facets
-  
-  notes:
-    ignores qh.ATinfinity, if defined
-*/
-setT *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp) {
-  int numcenters=0;
-  facetT *facet, **facetp;
-  setT *vertices;
-  boolT islower= False;
-
-  qh printoutnum++;
-  qh_clearcenters (qh_ASvoronoi);  /* in case, qh_printvdiagram2 called by user */
-  qh_vertexneighbors();
-  vertices= qh_pointvertex();
-  if (qh ATinfinity) 
-    SETelem_(vertices, qh num_points-1)= NULL;
-  qh visit_id++;
-  maximize_(qh visit_id, (unsigned) qh num_facets);
-  FORALLfacet_(facetlist) { 
-    if (printall || !qh_skipfacet (facet)) {
-      if (!facet->upperdelaunay) {
-        islower= True;
-	break;
-      }
-    }
-  }
-  FOREACHfacet_(facets) {
-    if (printall || !qh_skipfacet (facet)) {
-      if (!facet->upperdelaunay) {
-        islower= True;
-	break;
-      }
-    }
-  }
-  FORALLfacets {
-    if (facet->normal && (facet->upperdelaunay == islower))
-      facet->visitid= 0;  /* facetlist or facets may overwrite */
-    else
-      facet->visitid= qh visit_id;
-    facet->seen= False;
-    facet->seen2= True;
-  }
-  numcenters++;  /* qh_INFINITE */
-  FORALLfacet_(facetlist) {
-    if (printall || !qh_skipfacet (facet))
-      facet->visitid= numcenters++;
-  }
-  FOREACHfacet_(facets) {
-    if (printall || !qh_skipfacet (facet))
-      facet->visitid= numcenters++;  
-  }
-  *islowerp= islower;
-  *numcentersp= numcenters;
-  trace2((qh ferr, "qh_markvoronoi: islower %d numcenters %d\n", islower, numcenters));
-  return vertices;
-} /* markvoronoi */
-
-/*---------------------------------
-  
-  qh_order_vertexneighbors( vertex )
-    order facet neighbors of a 2-d or 3-d vertex by adjacency
-
-  notes:
-    does not orient the neighbors
-
-  design:
-    initialize a new neighbor set with the first facet in vertex->neighbors
-    while vertex->neighbors non-empty
-      select next neighbor in the previous facet's neighbor set
-    set vertex->neighbors to the new neighbor set
-*/
-void qh_order_vertexneighbors(vertexT *vertex) {
-  setT *newset;
-  facetT *facet, *neighbor, **neighborp;
-
-  trace4((qh ferr, "qh_order_vertexneighbors: order neighbors of v%d for 3-d\n", vertex->id));
-  newset= qh_settemp (qh_setsize (vertex->neighbors));
-  facet= (facetT*)qh_setdellast (vertex->neighbors);
-  qh_setappend (&newset, facet);
-  while (qh_setsize (vertex->neighbors)) {
-    FOREACHneighbor_(vertex) {
-      if (qh_setin (facet->neighbors, neighbor)) {
-        qh_setdel(vertex->neighbors, neighbor);
-        qh_setappend (&newset, neighbor);
-        facet= neighbor;
-        break;
-      }
-    }
-    if (!neighbor) {
-      fprintf (qh ferr, "qhull internal error (qh_order_vertexneighbors): no neighbor of v%d for f%d\n",
-        vertex->id, facet->id);
-      qh_errexit (qh_ERRqhull, facet, NULL);
-    }
-  }
-  qh_setfree (&vertex->neighbors);
-  qh_settemppop ();
-  vertex->neighbors= newset;
-} /* order_vertexneighbors */
-
-/*---------------------------------
-  
-  qh_printafacet( fp, format, facet, printall )
-    print facet to fp in given output format (see qh.PRINTout)
-
-  returns:
-    nop if !printall and qh_skipfacet()
-    nop if visible facet and NEWfacets and format != PRINTfacets
-    must match qh_countfacets
-
-  notes
-    preserves qh.visit_id
-    facet->normal may be null if PREmerge/MERGEexact and STOPcone before merge
-
-  see
-    qh_printbegin() and qh_printend()
-
-  design:
-    test for printing facet
-    call appropriate routine for format
-    or output results directly
-*/
-void qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall) {
-  realT color[4], offset, dist, outerplane, innerplane;
-  boolT zerodiv;
-  coordT *point, *normp, *coordp, **pointp, *feasiblep;
-  int k;
-  vertexT *vertex, **vertexp;
-  facetT *neighbor, **neighborp;
-
-  if (!printall && qh_skipfacet (facet))
-    return;
-  if (facet->visible && qh NEWfacets && format != qh_PRINTfacets)
-    return;
-  qh printoutnum++;
-  switch (format) {
-  case qh_PRINTarea:
-    if (facet->isarea) {
-      fprintf (fp, qh_REAL_1, facet->f.area);
-      fprintf (fp, "\n");
-    }else
-      fprintf (fp, "0\n");
-    break;
-  case qh_PRINTcoplanars:
-    fprintf (fp, "%d", qh_setsize (facet->coplanarset));
-    FOREACHpoint_(facet->coplanarset)
-      fprintf (fp, " %d", qh_pointid (point));
-    fprintf (fp, "\n");
-    break;
-  case qh_PRINTcentrums:
-    qh_printcenter (fp, format, NULL, facet);
-    break;
-  case qh_PRINTfacets:
-    qh_printfacet (fp, facet);
-    break;
-  case qh_PRINTfacets_xridge:
-    qh_printfacetheader (fp, facet);
-    break;
-  case qh_PRINTgeom:  /* either 2 , 3, or 4-d by qh_printbegin */
-    if (!facet->normal)
-      break;
-    for (k= qh hull_dim; k--; ) {
-      color[k]= (facet->normal[k]+1.0)/2.0;
-      maximize_(color[k], -1.0);
-      minimize_(color[k], +1.0);
-    }
-    qh_projectdim3 (color, color);
-    if (qh PRINTdim != qh hull_dim)
-      qh_normalize2 (color, 3, True, NULL, NULL);
-    if (qh hull_dim <= 2)
-      qh_printfacet2geom (fp, facet, color);
-    else if (qh hull_dim == 3) {
-      if (facet->simplicial)
-        qh_printfacet3geom_simplicial (fp, facet, color);
-      else
-        qh_printfacet3geom_nonsimplicial (fp, facet, color);
-    }else {
-      if (facet->simplicial)
-        qh_printfacet4geom_simplicial (fp, facet, color);
-      else
-        qh_printfacet4geom_nonsimplicial (fp, facet, color);
-    }
-    break;
-  case qh_PRINTids:
-    fprintf (fp, "%d\n", facet->id);
-    break;
-  case qh_PRINTincidences:
-  case qh_PRINToff:
-  case qh_PRINTtriangles:
-    if (qh hull_dim == 3 && format != qh_PRINTtriangles) 
-      qh_printfacet3vertex (fp, facet, format);
-    else if (facet->simplicial || qh hull_dim == 2 || format == qh_PRINToff)
-      qh_printfacetNvertex_simplicial (fp, facet, format);
-    else
-      qh_printfacetNvertex_nonsimplicial (fp, facet, qh printoutvar++, format);
-    break;
-  case qh_PRINTinner:
-    qh_outerinner (facet, NULL, &innerplane);
-    offset= facet->offset - innerplane;
-    goto LABELprintnorm;
-    break; /* prevent warning */
-  case qh_PRINTmerges:
-    fprintf (fp, "%d\n", facet->nummerge);
-    break;
-  case qh_PRINTnormals:
-    offset= facet->offset;
-    goto LABELprintnorm;
-    break; /* prevent warning */
-  case qh_PRINTouter:
-    qh_outerinner (facet, &outerplane, NULL);
-    offset= facet->offset - outerplane;
-  LABELprintnorm:
-    if (!facet->normal) {
-      fprintf (fp, "no normal for facet f%d\n", facet->id);
-      break;
-    }
-    if (qh CDDoutput) {
-      fprintf (fp, qh_REAL_1, -offset);
-      for (k=0; k < qh hull_dim; k++) 
-	fprintf (fp, qh_REAL_1, -facet->normal[k]);
-    }else {
-      for (k=0; k < qh hull_dim; k++) 
-	fprintf (fp, qh_REAL_1, facet->normal[k]);
-      fprintf (fp, qh_REAL_1, offset);
-    }
-    fprintf (fp, "\n");
-    break;
-  case qh_PRINTmathematica:  /* either 2 or 3-d by qh_printbegin */
-    if (qh hull_dim == 2)
-      qh_printfacet2math (fp, facet, qh printoutvar++);
-    else 
-      qh_printfacet3math (fp, facet, qh printoutvar++);
-    break;
-  case qh_PRINTneighbors:
-    fprintf (fp, "%d", qh_setsize (facet->neighbors));
-    FOREACHneighbor_(facet)
-      fprintf (fp, " %d", 
-	       neighbor->visitid ? neighbor->visitid - 1: - neighbor->id);
-    fprintf (fp, "\n");
-    break;
-  case qh_PRINTpointintersect:
-    if (!qh feasible_point) {
-      fprintf (fp, "qhull input error (qh_printafacet): option 'Fp' needs qh feasible_point\n");
-      qh_errexit( qh_ERRinput, NULL, NULL);
-    }
-    if (facet->offset > 0)
-      goto LABELprintinfinite;
-    point= coordp= (coordT*)qh_memalloc (qh normal_size);
-    normp= facet->normal;
-    feasiblep= qh feasible_point;
-    if (facet->offset < -qh MINdenom) {
-      for (k= qh hull_dim; k--; )
-        *(coordp++)= (*(normp++) / - facet->offset) + *(feasiblep++);
-    }else {
-      for (k= qh hull_dim; k--; ) {
-        *(coordp++)= qh_divzero (*(normp++), facet->offset, qh MINdenom_1,
-				 &zerodiv) + *(feasiblep++);
-        if (zerodiv) {
-          qh_memfree (point, qh normal_size);
-          goto LABELprintinfinite;
-        }
-      }
-    }
-    qh_printpoint (fp, NULL, point);
-    qh_memfree (point, qh normal_size);
-    break;
-  LABELprintinfinite:
-    for (k= qh hull_dim; k--; )
-      fprintf (fp, qh_REAL_1, qh_INFINITE);
-    fprintf (fp, "\n");   
-    break;
-  case qh_PRINTpointnearest:
-    FOREACHpoint_(facet->coplanarset) {
-      int id, id2;
-      vertex= qh_nearvertex (facet, point, &dist);
-      id= qh_pointid (vertex->point);
-      id2= qh_pointid (point);
-      fprintf (fp, "%d %d %d " qh_REAL_1 "\n", id, id2, facet->id, dist);
-    }
-    break;
-  case qh_PRINTpoints:  /* VORONOI only by qh_printbegin */
-    if (qh CDDoutput)
-      fprintf (fp, "1 ");
-    qh_printcenter (fp, format, NULL, facet);
-    break;
-  case qh_PRINTvertices:
-    fprintf (fp, "%d", qh_setsize (facet->vertices));
-    FOREACHvertex_(facet->vertices)
-      fprintf (fp, " %d", qh_pointid (vertex->point));
-    fprintf (fp, "\n");
-    break;
-  }
-} /* printafacet */
-
-/*---------------------------------
-  
-  qh_printbegin(  )
-    prints header for all output formats
-
-  returns:
-    checks for valid format
-  
-  notes:
-    uses qh.visit_id for 3/4off
-    changes qh.interior_point if printing centrums
-    qh_countfacets clears facet->visitid for non-good facets
-    
-  see
-    qh_printend() and qh_printafacet()
-    
-  design:
-    count facets and related statistics
-    print header for format
-*/
-void qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
-  int numfacets, numsimplicial, numridges, totneighbors, numcoplanars, numtricoplanars;
-  int i, num;
-  facetT *facet, **facetp;
-  vertexT *vertex, **vertexp;
-  setT *vertices;
-  pointT *point, **pointp, *pointtemp;
-
-  qh printoutnum= 0;
-  qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial, 
-      &totneighbors, &numridges, &numcoplanars, &numtricoplanars);
-  switch (format) {
-  case qh_PRINTnone:
-    break;
-  case qh_PRINTarea:
-    fprintf (fp, "%d\n", numfacets);
-    break;
-  case qh_PRINTcoplanars:
-    fprintf (fp, "%d\n", numfacets);
-    break;
-  case qh_PRINTcentrums:
-    if (qh CENTERtype == qh_ASnone)
-      qh_clearcenters (qh_AScentrum);
-    fprintf (fp, "%d\n%d\n", qh hull_dim, numfacets);
-    break;
-  case qh_PRINTfacets:
-  case qh_PRINTfacets_xridge:
-    if (facetlist)
-      qh_printvertexlist (fp, "Vertices and facets:\n", facetlist, facets, printall);
-    break;
-  case qh_PRINTgeom: 
-    if (qh hull_dim > 4)  /* qh_initqhull_globals also checks */
-      goto LABELnoformat;
-    if (qh VORONOI && qh hull_dim > 3)  /* PRINTdim == DROPdim == hull_dim-1 */
-      goto LABELnoformat;
-    if (qh hull_dim == 2 && (qh PRINTridges || qh DOintersections))
-      fprintf (qh ferr, "qhull warning: output for ridges and intersections not implemented in 2-d\n");
-    if (qh hull_dim == 4 && (qh PRINTinner || qh PRINTouter ||
-			     (qh PRINTdim == 4 && qh PRINTcentrums)))
-      fprintf (qh ferr, "qhull warning: output for outer/inner planes and centrums not implemented in 4-d\n");
-    if (qh PRINTdim == 4 && (qh PRINTspheres))
-      fprintf (qh ferr, "qhull warning: output for vertices not implemented in 4-d\n");
-    if (qh PRINTdim == 4 && qh DOintersections && qh PRINTnoplanes)
-      fprintf (qh ferr, "qhull warning: 'Gnh' generates no output in 4-d\n");
-    if (qh PRINTdim == 2) {
-      fprintf(fp, "{appearance {linewidth 3} LIST # %s | %s\n",
-	      qh rbox_command, qh qhull_command);
-    }else if (qh PRINTdim == 3) {
-      fprintf(fp, "{appearance {+edge -evert linewidth 2} LIST # %s | %s\n",
-	      qh rbox_command, qh qhull_command);
-    }else if (qh PRINTdim == 4) {
-      qh visit_id++;
-      num= 0;
-      FORALLfacet_(facetlist)    /* get number of ridges to be printed */
-        qh_printend4geom (NULL, facet, &num, printall);
-      FOREACHfacet_(facets)
-        qh_printend4geom (NULL, facet, &num, printall);
-      qh ridgeoutnum= num;
-      qh printoutvar= 0;  /* counts number of ridges in output */
-      fprintf (fp, "LIST # %s | %s\n", qh rbox_command, qh qhull_command);
-    }
-    if (qh PRINTdots) {
-      qh printoutnum++;
-      num= qh num_points + qh_setsize (qh other_points);
-      if (qh DELAUNAY && qh ATinfinity)
-	num--;
-      if (qh PRINTdim == 4)
-        fprintf (fp, "4VECT %d %d 1\n", num, num);
-      else
-	fprintf (fp, "VECT %d %d 1\n", num, num);
-      for (i= num; i--; ) {
-        if (i % 20 == 0)
-          fprintf (fp, "\n");
-	fprintf (fp, "1 ");
-      }
-      fprintf (fp, "# 1 point per line\n1 ");
-      for (i= num-1; i--; ) {
-        if (i % 20 == 0)
-          fprintf (fp, "\n");
-	fprintf (fp, "0 ");
-      }
-      fprintf (fp, "# 1 color for all\n");
-      FORALLpoints {
-        if (!qh DELAUNAY || !qh ATinfinity || qh_pointid(point) != qh num_points-1) {
-	  if (qh PRINTdim == 4)
-	    qh_printpoint (fp, NULL, point);
-	  else
-	    qh_printpoint3 (fp, point);
-	}
-      }
-      FOREACHpoint_(qh other_points) {
-	if (qh PRINTdim == 4)
-	  qh_printpoint (fp, NULL, point);
-	else
-	  qh_printpoint3 (fp, point);
-      }
-      fprintf (fp, "0 1 1 1  # color of points\n");
-    }
-    if (qh PRINTdim == 4  && !qh PRINTnoplanes)
-      /* 4dview loads up multiple 4OFF objects slowly */
-      fprintf(fp, "4OFF %d %d 1\n", 3*qh ridgeoutnum, qh ridgeoutnum);
-    qh PRINTcradius= 2 * qh DISTround;  /* include test DISTround */
-    if (qh PREmerge) {
-      maximize_(qh PRINTcradius, qh premerge_centrum + qh DISTround);
-    }else if (qh POSTmerge)
-      maximize_(qh PRINTcradius, qh postmerge_centrum + qh DISTround);
-    qh PRINTradius= qh PRINTcradius;
-    if (qh PRINTspheres + qh PRINTcoplanar)
-      maximize_(qh PRINTradius, qh MAXabs_coord * qh_MINradius);
-    if (qh premerge_cos < REALmax/2) {
-      maximize_(qh PRINTradius, (1- qh premerge_cos) * qh MAXabs_coord);
-    }else if (!qh PREmerge && qh POSTmerge && qh postmerge_cos < REALmax/2) {
-      maximize_(qh PRINTradius, (1- qh postmerge_cos) * qh MAXabs_coord);
-    }
-    maximize_(qh PRINTradius, qh MINvisible); 
-    if (qh JOGGLEmax < REALmax/2)
-      qh PRINTradius += qh JOGGLEmax * sqrt (qh hull_dim);
-    if (qh PRINTdim != 4 &&
-	(qh PRINTcoplanar || qh PRINTspheres || qh PRINTcentrums)) {
-      vertices= qh_facetvertices (facetlist, facets, printall);
-      if (qh PRINTspheres && qh PRINTdim <= 3)
-         qh_printspheres (fp, vertices, qh PRINTradius);
-      if (qh PRINTcoplanar || qh PRINTcentrums) {
-        qh firstcentrum= True;
-        if (qh PRINTcoplanar&& !qh PRINTspheres) {
-          FOREACHvertex_(vertices) 
-            qh_printpointvect2 (fp, vertex->point, NULL,
-				qh interior_point, qh PRINTradius);
-	}
-        FORALLfacet_(facetlist) {
-	  if (!printall && qh_skipfacet(facet))
-	    continue;
-	  if (!facet->normal)
-	    continue;
-          if (qh PRINTcentrums && qh PRINTdim <= 3)
-            qh_printcentrum (fp, facet, qh PRINTcradius);
-	  if (!qh PRINTcoplanar)
-	    continue;
-          FOREACHpoint_(facet->coplanarset)
-            qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
-          FOREACHpoint_(facet->outsideset)
-            qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
-        }
-        FOREACHfacet_(facets) {
-	  if (!printall && qh_skipfacet(facet))
-	    continue;
-	  if (!facet->normal)
-	    continue;
-          if (qh PRINTcentrums && qh PRINTdim <= 3)
-            qh_printcentrum (fp, facet, qh PRINTcradius);
-	  if (!qh PRINTcoplanar)
-	    continue;
-          FOREACHpoint_(facet->coplanarset)
-            qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
-          FOREACHpoint_(facet->outsideset)
-            qh_printpointvect2 (fp, point, facet->normal, NULL, qh PRINTradius);
-        }
-      }
-      qh_settempfree (&vertices);
-    }
-    qh visit_id++; /* for printing hyperplane intersections */
-    break;
-  case qh_PRINTids:
-    fprintf (fp, "%d\n", numfacets);
-    break;
-  case qh_PRINTincidences:
-    if (qh VORONOI && qh PRINTprecision)
-      fprintf (qh ferr, "qhull warning: writing Delaunay.  Use 'p' or 'o' for Voronoi centers\n");
-    qh printoutvar= qh vertex_id;  /* centrum id for non-simplicial facets */
-    if (qh hull_dim <= 3)
-      fprintf(fp, "%d\n", numfacets);
-    else
-      fprintf(fp, "%d\n", numsimplicial+numridges);
-    break;
-  case qh_PRINTinner:
-  case qh_PRINTnormals:
-  case qh_PRINTouter:
-    if (qh CDDoutput)
-      fprintf (fp, "%s | %s\nbegin\n    %d %d real\n", qh rbox_command, 
-              qh qhull_command, numfacets, qh hull_dim+1);
-    else
-      fprintf (fp, "%d\n%d\n", qh hull_dim+1, numfacets);
-    break;
-  case qh_PRINTmathematica:  
-    if (qh hull_dim > 3)  /* qh_initbuffers also checks */
-      goto LABELnoformat;
-    if (qh VORONOI)
-      fprintf (qh ferr, "qhull warning: output is the Delaunay triangulation\n");
-    fprintf(fp, "{\n");
-    qh printoutvar= 0;   /* counts number of facets for notfirst */
-    break;
-  case qh_PRINTmerges:
-    fprintf (fp, "%d\n", numfacets);
-    break;
-  case qh_PRINTpointintersect:
-    fprintf (fp, "%d\n%d\n", qh hull_dim, numfacets);
-    break;
-  case qh_PRINTneighbors:
-    fprintf (fp, "%d\n", numfacets);
-    break;
-  case qh_PRINToff:
-  case qh_PRINTtriangles:
-    if (qh VORONOI)
-      goto LABELnoformat;
-    num = qh hull_dim;
-    if (format == qh_PRINToff || qh hull_dim == 2)
-      fprintf (fp, "%d\n%d %d %d\n", num, 
-        qh num_points+qh_setsize (qh other_points), numfacets, totneighbors/2);
-    else { /* qh_PRINTtriangles */
-      qh printoutvar= qh num_points+qh_setsize (qh other_points); /* first centrum */
-      if (qh DELAUNAY)
-        num--;  /* drop last dimension */
-      fprintf (fp, "%d\n%d %d %d\n", num, qh printoutvar 
-	+ numfacets - numsimplicial, numsimplicial + numridges, totneighbors/2);
-    }
-    FORALLpoints
-      qh_printpointid (qh fout, NULL, num, point, -1);
-    FOREACHpoint_(qh other_points)
-      qh_printpointid (qh fout, NULL, num, point, -1);
-    if (format == qh_PRINTtriangles && qh hull_dim > 2) {
-      FORALLfacets {
-	if (!facet->simplicial && facet->visitid)
-          qh_printcenter (qh fout, format, NULL, facet);
-      }
-    }
-    break;
-  case qh_PRINTpointnearest:
-    fprintf (fp, "%d\n", numcoplanars);
-    break;
-  case qh_PRINTpoints:
-    if (!qh VORONOI)
-      goto LABELnoformat;
-    if (qh CDDoutput)
-      fprintf (fp, "%s | %s\nbegin\n%d %d real\n", qh rbox_command,
-             qh qhull_command, numfacets, qh hull_dim);
-    else
-      fprintf (fp, "%d\n%d\n", qh hull_dim-1, numfacets);
-    break;
-  case qh_PRINTvertices:
-    fprintf (fp, "%d\n", numfacets);
-    break;
-  case qh_PRINTsummary:
-  default:
-  LABELnoformat:
-    fprintf (qh ferr, "qhull internal error (qh_printbegin): can not use this format for dimension %d\n",
-         qh hull_dim);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-} /* printbegin */
-
-/*---------------------------------
-  
-  qh_printcenter( fp, string, facet )
-    print facet->center as centrum or Voronoi center
-    string may be NULL.  Don't include '%' codes.
-    nop if qh CENTERtype neither CENTERvoronoi nor CENTERcentrum
-    if upper envelope of Delaunay triangulation and point at-infinity
-      prints qh_INFINITE instead;
-
-  notes:
-    defines facet->center if needed
-    if format=PRINTgeom, adds a 0 if would otherwise be 2-d
-*/
-void qh_printcenter (FILE *fp, int format, char *string, facetT *facet) {
-  int k, num;
-
-  if (qh CENTERtype != qh_ASvoronoi && qh CENTERtype != qh_AScentrum)
-    return;
-  if (string)
-    fprintf (fp, string, facet->id);
-  if (qh CENTERtype == qh_ASvoronoi) {
-    num= qh hull_dim-1;
-    if (!facet->normal || !facet->upperdelaunay || !qh ATinfinity) {
-      if (!facet->center)
-        facet->center= qh_facetcenter (facet->vertices);
-      for (k=0; k < num; k++)
-        fprintf (fp, qh_REAL_1, facet->center[k]);
-    }else {
-      for (k=0; k < num; k++)
-        fprintf (fp, qh_REAL_1, qh_INFINITE);
-    }
-  }else /* qh CENTERtype == qh_AScentrum */ {
-    num= qh hull_dim;
-    if (format == qh_PRINTtriangles && qh DELAUNAY) 
-      num--;
-    if (!facet->center) 
-      facet->center= qh_getcentrum (facet);
-    for (k=0; k < num; k++)
-      fprintf (fp, qh_REAL_1, facet->center[k]);
-  }
-  if (format == qh_PRINTgeom && num == 2)
-    fprintf (fp, " 0\n");
-  else
-    fprintf (fp, "\n");
-} /* printcenter */
-
-/*---------------------------------
-  
-  qh_printcentrum( fp, facet, radius )
-    print centrum for a facet in OOGL format
-    radius defines size of centrum
-    2-d or 3-d only
-
-  returns:
-    defines facet->center if needed
-*/
-void qh_printcentrum (FILE *fp, facetT *facet, realT radius) {
-  pointT *centrum, *projpt;
-  boolT tempcentrum= False;
-  realT xaxis[4], yaxis[4], normal[4], dist;
-  realT green[3]={0, 1, 0};
-  vertexT *apex;
-  int k;
-  
-  if (qh CENTERtype == qh_AScentrum) {
-    if (!facet->center)
-      facet->center= qh_getcentrum (facet);
-    centrum= facet->center;
-  }else {
-    centrum= qh_getcentrum (facet);
-    tempcentrum= True;
-  }
-  fprintf (fp, "{appearance {-normal -edge normscale 0} ");
-  if (qh firstcentrum) {
-    qh firstcentrum= False;
-    fprintf (fp, "{INST geom { define centrum CQUAD  # f%d\n\
--0.3 -0.3 0.0001     0 0 1 1\n\
- 0.3 -0.3 0.0001     0 0 1 1\n\
- 0.3  0.3 0.0001     0 0 1 1\n\
--0.3  0.3 0.0001     0 0 1 1 } transform { \n", facet->id);
-  }else
-    fprintf (fp, "{INST geom { : centrum } transform { # f%d\n", facet->id);
-  apex= SETfirstt_(facet->vertices, vertexT);
-  qh_distplane(apex->point, facet, &dist);
-  projpt= qh_projectpoint(apex->point, facet, dist);
-  for (k= qh hull_dim; k--; ) {
-    xaxis[k]= projpt[k] - centrum[k];
-    normal[k]= facet->normal[k];
-  }
-  if (qh hull_dim == 2) {
-    xaxis[2]= 0;
-    normal[2]= 0;
-  }else if (qh hull_dim == 4) {
-    qh_projectdim3 (xaxis, xaxis);
-    qh_projectdim3 (normal, normal);
-    qh_normalize2 (normal, qh PRINTdim, True, NULL, NULL);
-  }
-  qh_crossproduct (3, xaxis, normal, yaxis);
-  fprintf (fp, "%8.4g %8.4g %8.4g 0\n", xaxis[0], xaxis[1], xaxis[2]);
-  fprintf (fp, "%8.4g %8.4g %8.4g 0\n", yaxis[0], yaxis[1], yaxis[2]);
-  fprintf (fp, "%8.4g %8.4g %8.4g 0\n", normal[0], normal[1], normal[2]);
-  qh_printpoint3 (fp, centrum);
-  fprintf (fp, "1 }}}\n"); 
-  qh_memfree (projpt, qh normal_size);
-  qh_printpointvect (fp, centrum, facet->normal, NULL, radius, green);
-  if (tempcentrum)
-    qh_memfree (centrum, qh normal_size);
-} /* printcentrum */
-  
-/*---------------------------------
-  
-  qh_printend( fp, format )
-    prints trailer for all output formats
-
-  see:
-    qh_printbegin() and qh_printafacet()
-      
-*/
-void qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
-  int num;
-  facetT *facet, **facetp;
-
-  if (!qh printoutnum)
-    fprintf (qh ferr, "qhull warning: no facets printed\n");
-  switch (format) {
-  case qh_PRINTgeom:
-    if (qh hull_dim == 4 && qh DROPdim < 0  && !qh PRINTnoplanes) {
-      qh visit_id++;
-      num= 0;
-      FORALLfacet_(facetlist)
-        qh_printend4geom (fp, facet,&num, printall);
-      FOREACHfacet_(facets) 
-        qh_printend4geom (fp, facet, &num, printall);
-      if (num != qh ridgeoutnum || qh printoutvar != qh ridgeoutnum) {
-	fprintf (qh ferr, "qhull internal error (qh_printend): number of ridges %d != number printed %d and at end %d\n", qh ridgeoutnum, qh printoutvar, num);
-	qh_errexit (qh_ERRqhull, NULL, NULL);
-      }
-    }else
-      fprintf(fp, "}\n");
-    break;
-  case qh_PRINTinner:
-  case qh_PRINTnormals:
-  case qh_PRINTouter:
-    if (qh CDDoutput) 
-      fprintf (fp, "end\n");
-    break;
-  case qh_PRINTmathematica:
-    fprintf(fp, "}\n");
-    break;
-  case qh_PRINTpoints:
-    if (qh CDDoutput)
-      fprintf (fp, "end\n");
-    break;
-  }
-} /* printend */
-
-/*---------------------------------
-  
-  qh_printend4geom( fp, facet, numridges, printall )
-    helper function for qh_printbegin/printend
-
-  returns:
-    number of printed ridges
-  
-  notes:
-    just counts printed ridges if fp=NULL
-    uses facet->visitid
-    must agree with qh_printfacet4geom...
-
-  design:
-    computes color for facet from its normal
-    prints each ridge of facet 
-*/
-void qh_printend4geom (FILE *fp, facetT *facet, int *nump, boolT printall) {
-  realT color[3];
-  int i, num= *nump;
-  facetT *neighbor, **neighborp;
-  ridgeT *ridge, **ridgep;
-  
-  if (!printall && qh_skipfacet(facet))
-    return;
-  if (qh PRINTnoplanes || (facet->visible && qh NEWfacets))
-    return;
-  if (!facet->normal)
-    return;
-  if (fp) {
-    for (i=0; i < 3; i++) {
-      color[i]= (facet->normal[i]+1.0)/2.0;
-      maximize_(color[i], -1.0);
-      minimize_(color[i], +1.0);
-    }
-  }
-  facet->visitid= qh visit_id;
-  if (facet->simplicial) {
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid != qh visit_id) {
-	if (fp)
-          fprintf (fp, "3 %d %d %d %8.4g %8.4g %8.4g 1 # f%d f%d\n",
-		 3*num, 3*num+1, 3*num+2, color[0], color[1], color[2],
-		 facet->id, neighbor->id);
-	num++;
-      }
-    }
-  }else {
-    FOREACHridge_(facet->ridges) {
-      neighbor= otherfacet_(ridge, facet);
-      if (neighbor->visitid != qh visit_id) {
-	if (fp)
-          fprintf (fp, "3 %d %d %d %8.4g %8.4g %8.4g 1 #r%d f%d f%d\n",
-		 3*num, 3*num+1, 3*num+2, color[0], color[1], color[2],
-		 ridge->id, facet->id, neighbor->id);
-	num++;
-      }
-    }
-  }
-  *nump= num;
-} /* printend4geom */
-
-/*---------------------------------
-  
-  qh_printextremes( fp, facetlist, facets, printall )
-    print extreme points for convex hulls or halfspace intersections
-
-  notes:
-    #points, followed by ids, one per line
-    
-    sorted by id
-    same order as qh_printpoints_out if no coplanar/interior points
-*/
-void qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall) {
-  setT *vertices, *points;
-  pointT *point;
-  vertexT *vertex, **vertexp;
-  int id;
-  int numpoints=0, point_i, point_n;
-  int allpoints= qh num_points + qh_setsize (qh other_points);
-
-  points= qh_settemp (allpoints);
-  qh_setzero (points, 0, allpoints);
-  vertices= qh_facetvertices (facetlist, facets, printall);
-  FOREACHvertex_(vertices) {
-    id= qh_pointid (vertex->point);
-    if (id >= 0) {
-      SETelem_(points, id)= vertex->point;
-      numpoints++;
-    }
-  }
-  qh_settempfree (&vertices);
-  fprintf (fp, "%d\n", numpoints);
-  FOREACHpoint_i_(points) {
-    if (point) 
-      fprintf (fp, "%d\n", point_i);
-  }
-  qh_settempfree (&points);
-} /* printextremes */
-
-/*---------------------------------
-  
-  qh_printextremes_2d( fp, facetlist, facets, printall )
-    prints point ids for facets in qh_ORIENTclock order
-
-  notes:
-    #points, followed by ids, one per line
-    if facetlist/facets are disjoint than the output includes skips
-    errors if facets form a loop
-    does not print coplanar points
-*/
-void qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall) {
-  int numfacets, numridges, totneighbors, numcoplanars, numsimplicial, numtricoplanars;
-  setT *vertices;
-  facetT *facet, *startfacet, *nextfacet;
-  vertexT *vertexA, *vertexB;
-
-  qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial, 
-      &totneighbors, &numridges, &numcoplanars, &numtricoplanars); /* marks qh visit_id */
-  vertices= qh_facetvertices (facetlist, facets, printall);
-  fprintf(fp, "%d\n", qh_setsize (vertices));
-  qh_settempfree (&vertices);
-  if (!numfacets)
-    return;
-  facet= startfacet= facetlist ? facetlist : SETfirstt_(facets, facetT);
-  qh vertex_visit++;
-  qh visit_id++;
-  do {
-    if (facet->toporient ^ qh_ORIENTclock) {
-      vertexA= SETfirstt_(facet->vertices, vertexT);
-      vertexB= SETsecondt_(facet->vertices, vertexT);
-      nextfacet= SETfirstt_(facet->neighbors, facetT);
-    }else {
-      vertexA= SETsecondt_(facet->vertices, vertexT);
-      vertexB= SETfirstt_(facet->vertices, vertexT);
-      nextfacet= SETsecondt_(facet->neighbors, facetT);
-    }
-    if (facet->visitid == qh visit_id) {
-      fprintf(qh ferr, "qh_printextremes_2d: loop in facet list.  facet %d nextfacet %d\n",
-                 facet->id, nextfacet->id);
-      qh_errexit2 (qh_ERRqhull, facet, nextfacet);
-    }
-    if (facet->visitid) {
-      if (vertexA->visitid != qh vertex_visit) {
-	vertexA->visitid= qh vertex_visit;
-	fprintf(fp, "%d\n", qh_pointid (vertexA->point));
-      }
-      if (vertexB->visitid != qh vertex_visit) {
-	vertexB->visitid= qh vertex_visit;
-	fprintf(fp, "%d\n", qh_pointid (vertexB->point));
-      }
-    }
-    facet->visitid= qh visit_id;
-    facet= nextfacet;
-  }while (facet && facet != startfacet);
-} /* printextremes_2d */
-
-/*---------------------------------
-  
-  qh_printextremes_d( fp, facetlist, facets, printall )
-    print extreme points of input sites for Delaunay triangulations
-
-  notes:
-    #points, followed by ids, one per line
-    
-    unordered
-*/
-void qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall) {
-  setT *vertices;
-  vertexT *vertex, **vertexp;
-  boolT upperseen, lowerseen;
-  facetT *neighbor, **neighborp;
-  int numpoints=0;
-
-  vertices= qh_facetvertices (facetlist, facets, printall);
-  qh_vertexneighbors();
-  FOREACHvertex_(vertices) {
-    upperseen= lowerseen= False;
-    FOREACHneighbor_(vertex) {
-      if (neighbor->upperdelaunay)
-        upperseen= True;
-      else
-        lowerseen= True;
-    }
-    if (upperseen && lowerseen) {
-      vertex->seen= True;
-      numpoints++;
-    }else
-      vertex->seen= False;
-  }
-  fprintf (fp, "%d\n", numpoints);
-  FOREACHvertex_(vertices) {
-    if (vertex->seen)
-      fprintf (fp, "%d\n", qh_pointid (vertex->point));
-  }
-  qh_settempfree (&vertices);
-} /* printextremes_d */
-
-/*---------------------------------
-  
-  qh_printfacet( fp, facet )
-    prints all fields of a facet to fp
-
-  notes:
-    ridges printed in neighbor order
-*/
-void qh_printfacet(FILE *fp, facetT *facet) {
-
-  qh_printfacetheader (fp, facet);
-  if (facet->ridges)
-    qh_printfacetridges (fp, facet);
-} /* printfacet */
-
-
-/*---------------------------------
-  
-  qh_printfacet2geom( fp, facet, color )
-    print facet as part of a 2-d VECT for Geomview
-  
-    notes:
-      assume precise calculations in io.c with roundoff covered by qh_GEOMepsilon
-      mindist is calculated within io.c.  maxoutside is calculated elsewhere
-      so a DISTround error may have occured.
-*/
-void qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]) {
-  pointT *point0, *point1;
-  realT mindist, innerplane, outerplane;
-  int k;
-
-  qh_facet2point (facet, &point0, &point1, &mindist);
-  qh_geomplanes (facet, &outerplane, &innerplane);
-  if (qh PRINTouter || (!qh PRINTnoplanes && !qh PRINTinner))
-    qh_printfacet2geom_points(fp, point0, point1, facet, outerplane, color);
-  if (qh PRINTinner || (!qh PRINTnoplanes && !qh PRINTouter &&
-                outerplane - innerplane > 2 * qh MAXabs_coord * qh_GEOMepsilon)) {
-    for(k= 3; k--; )
-      color[k]= 1.0 - color[k];
-    qh_printfacet2geom_points(fp, point0, point1, facet, innerplane, color);
-  }
-  qh_memfree (point1, qh normal_size);
-  qh_memfree (point0, qh normal_size); 
-} /* printfacet2geom */
-
-/*---------------------------------
-  
-  qh_printfacet2geom_points( fp, point1, point2, facet, offset, color )
-    prints a 2-d facet as a VECT with 2 points at some offset.   
-    The points are on the facet's plane.
-*/
-void qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
-			       facetT *facet, realT offset, realT color[3]) {
-  pointT *p1= point1, *p2= point2;
-
-  fprintf(fp, "VECT 1 2 1 2 1 # f%d\n", facet->id);
-  if (offset != 0.0) {
-    p1= qh_projectpoint (p1, facet, -offset);
-    p2= qh_projectpoint (p2, facet, -offset);
-  }
-  fprintf(fp, "%8.4g %8.4g %8.4g\n%8.4g %8.4g %8.4g\n",
-           p1[0], p1[1], 0.0, p2[0], p2[1], 0.0);
-  if (offset != 0.0) {
-    qh_memfree (p1, qh normal_size);
-    qh_memfree (p2, qh normal_size);
-  }
-  fprintf(fp, "%8.4g %8.4g %8.4g 1.0\n", color[0], color[1], color[2]);
-} /* printfacet2geom_points */
-
-
-/*---------------------------------
-  
-  qh_printfacet2math( fp, facet, notfirst )
-    print 2-d Mathematica output for a facet
-    may be non-simplicial
-
-  notes:
-    use %16.8f since Mathematica 2.2 does not handle exponential format
-*/
-void qh_printfacet2math(FILE *fp, facetT *facet, int notfirst) {
-  pointT *point0, *point1;
-  realT mindist;
-  
-  qh_facet2point (facet, &point0, &point1, &mindist);
-  if (notfirst)
-    fprintf(fp, ",");
-  fprintf(fp, "Line[{{%16.8f, %16.8f}, {%16.8f, %16.8f}}]\n",
-	  point0[0], point0[1], point1[0], point1[1]);
-  qh_memfree (point1, qh normal_size);
-  qh_memfree (point0, qh normal_size);
-} /* printfacet2math */
-
-
-/*---------------------------------
-  
-  qh_printfacet3geom_nonsimplicial( fp, facet, color )
-    print Geomview OFF for a 3-d nonsimplicial facet.
-    if DOintersections, prints ridges to unvisited neighbors (qh visit_id) 
-
-  notes
-    uses facet->visitid for intersections and ridges
-*/
-void qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]) {
-  ridgeT *ridge, **ridgep;
-  setT *projectedpoints, *vertices;
-  vertexT *vertex, **vertexp, *vertexA, *vertexB;
-  pointT *projpt, *point, **pointp;
-  facetT *neighbor;
-  realT dist, outerplane, innerplane;
-  int cntvertices, k;
-  realT black[3]={0, 0, 0}, green[3]={0, 1, 0};
-
-  qh_geomplanes (facet, &outerplane, &innerplane); 
-  vertices= qh_facet3vertex (facet); /* oriented */
-  cntvertices= qh_setsize(vertices);
-  projectedpoints= qh_settemp(cntvertices);
-  FOREACHvertex_(vertices) {
-    zinc_(Zdistio);
-    qh_distplane(vertex->point, facet, &dist);
-    projpt= qh_projectpoint(vertex->point, facet, dist);
-    qh_setappend (&projectedpoints, projpt);
-  }
-  if (qh PRINTouter || (!qh PRINTnoplanes && !qh PRINTinner))
-    qh_printfacet3geom_points(fp, projectedpoints, facet, outerplane, color);
-  if (qh PRINTinner || (!qh PRINTnoplanes && !qh PRINTouter &&
-                outerplane - innerplane > 2 * qh MAXabs_coord * qh_GEOMepsilon)) {
-    for (k=3; k--; )
-      color[k]= 1.0 - color[k];
-    qh_printfacet3geom_points(fp, projectedpoints, facet, innerplane, color);
-  }
-  FOREACHpoint_(projectedpoints)
-    qh_memfree (point, qh normal_size);
-  qh_settempfree(&projectedpoints);
-  qh_settempfree(&vertices);
-  if ((qh DOintersections || qh PRINTridges)
-  && (!facet->visible || !qh NEWfacets)) {
-    facet->visitid= qh visit_id;
-    FOREACHridge_(facet->ridges) {
-      neighbor= otherfacet_(ridge, facet);
-      if (neighbor->visitid != qh visit_id) {
-        if (qh DOintersections)
-          qh_printhyperplaneintersection(fp, facet, neighbor, ridge->vertices, black);
-        if (qh PRINTridges) {
-          vertexA= SETfirstt_(ridge->vertices, vertexT);
-          vertexB= SETsecondt_(ridge->vertices, vertexT);
-          qh_printline3geom (fp, vertexA->point, vertexB->point, green);
-        }
-      }
-    }
-  }
-} /* printfacet3geom_nonsimplicial */
-
-/*---------------------------------
-  
-  qh_printfacet3geom_points( fp, points, facet, offset )
-    prints a 3-d facet as OFF Geomview object. 
-    offset is relative to the facet's hyperplane
-    Facet is determined as a list of points
-*/
-void qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]) {
-  int k, n= qh_setsize(points), i;
-  pointT *point, **pointp;
-  setT *printpoints;
-
-  fprintf(fp, "{ OFF %d 1 1 # f%d\n", n, facet->id);
-  if (offset != 0.0) {
-    printpoints= qh_settemp (n);
-    FOREACHpoint_(points) 
-      qh_setappend (&printpoints, qh_projectpoint(point, facet, -offset));
-  }else
-    printpoints= points;
-  FOREACHpoint_(printpoints) {
-    for (k=0; k < qh hull_dim; k++) {
-      if (k == qh DROPdim)
-        fprintf(fp, "0 ");
-      else
-        fprintf(fp, "%8.4g ", point[k]);
-    }
-    if (printpoints != points)
-      qh_memfree (point, qh normal_size);
-    fprintf (fp, "\n");
-  }
-  if (printpoints != points)
-    qh_settempfree (&printpoints);
-  fprintf(fp, "%d ", n);
-  for(i= 0; i < n; i++)
-    fprintf(fp, "%d ", i);
-  fprintf(fp, "%8.4g %8.4g %8.4g 1.0 }\n", color[0], color[1], color[2]);
-} /* printfacet3geom_points */
-
-
-/*---------------------------------
-  
-  qh_printfacet3geom_simplicial(  )
-    print Geomview OFF for a 3-d simplicial facet.
-
-  notes:
-    may flip color
-    uses facet->visitid for intersections and ridges
-
-    assume precise calculations in io.c with roundoff covered by qh_GEOMepsilon
-    innerplane may be off by qh DISTround.  Maxoutside is calculated elsewhere
-    so a DISTround error may have occured.
-*/
-void qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]) {
-  setT *points, *vertices;
-  vertexT *vertex, **vertexp, *vertexA, *vertexB;
-  facetT *neighbor, **neighborp;
-  realT outerplane, innerplane;
-  realT black[3]={0, 0, 0}, green[3]={0, 1, 0};
-  int k;
-
-  qh_geomplanes (facet, &outerplane, &innerplane); 
-  vertices= qh_facet3vertex (facet);
-  points= qh_settemp (qh TEMPsize);
-  FOREACHvertex_(vertices)
-    qh_setappend(&points, vertex->point);
-  if (qh PRINTouter || (!qh PRINTnoplanes && !qh PRINTinner))
-    qh_printfacet3geom_points(fp, points, facet, outerplane, color);
-  if (qh PRINTinner || (!qh PRINTnoplanes && !qh PRINTouter &&
-              outerplane - innerplane > 2 * qh MAXabs_coord * qh_GEOMepsilon)) {
-    for (k= 3; k--; )
-      color[k]= 1.0 - color[k];
-    qh_printfacet3geom_points(fp, points, facet, innerplane, color);
-  }
-  qh_settempfree(&points);
-  qh_settempfree(&vertices);
-  if ((qh DOintersections || qh PRINTridges)
-  && (!facet->visible || !qh NEWfacets)) {
-    facet->visitid= qh visit_id;
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid != qh visit_id) {
-	vertices= qh_setnew_delnthsorted (facet->vertices, qh hull_dim,
-	                  SETindex_(facet->neighbors, neighbor), 0);
-        if (qh DOintersections)
-	   qh_printhyperplaneintersection(fp, facet, neighbor, vertices, black); 
-        if (qh PRINTridges) {
-          vertexA= SETfirstt_(vertices, vertexT);
-          vertexB= SETsecondt_(vertices, vertexT);
-          qh_printline3geom (fp, vertexA->point, vertexB->point, green);
-        }
-	qh_setfree(&vertices);
-      }
-    }
-  }
-} /* printfacet3geom_simplicial */
-
-/*---------------------------------
-  
-  qh_printfacet3math( fp, facet, notfirst )
-    print 3-d Mathematica output for a facet
-
-  notes:
-    may be non-simplicial
-    use %16.8f since Mathematica 2.2 does not handle exponential format
-*/
-void qh_printfacet3math (FILE *fp, facetT *facet, int notfirst) {
-  vertexT *vertex, **vertexp;
-  setT *points, *vertices;
-  pointT *point, **pointp;
-  boolT firstpoint= True;
-  realT dist;
-  
-  if (notfirst)
-    fprintf(fp, ",\n");
-  vertices= qh_facet3vertex (facet);
-  points= qh_settemp (qh_setsize (vertices));
-  FOREACHvertex_(vertices) {
-    zinc_(Zdistio);
-    qh_distplane(vertex->point, facet, &dist);
-    point= qh_projectpoint(vertex->point, facet, dist);
-    qh_setappend (&points, point);
-  }
-  fprintf(fp, "Polygon[{");
-  FOREACHpoint_(points) {
-    if (firstpoint)
-      firstpoint= False;
-    else
-      fprintf(fp, ",\n");
-    fprintf(fp, "{%16.8f, %16.8f, %16.8f}", point[0], point[1], point[2]);
-  }
-  FOREACHpoint_(points)
-    qh_memfree (point, qh normal_size);
-  qh_settempfree(&points);
-  qh_settempfree(&vertices);
-  fprintf(fp, "}]");
-} /* printfacet3math */
-
-
-/*---------------------------------
-  
-  qh_printfacet3vertex( fp, facet, format )
-    print vertices in a 3-d facet as point ids
-
-  notes:
-    prints number of vertices first if format == qh_PRINToff
-    the facet may be non-simplicial
-*/
-void qh_printfacet3vertex(FILE *fp, facetT *facet, int format) {
-  vertexT *vertex, **vertexp;
-  setT *vertices;
-
-  vertices= qh_facet3vertex (facet);
-  if (format == qh_PRINToff)
-    fprintf (fp, "%d ", qh_setsize (vertices));
-  FOREACHvertex_(vertices) 
-    fprintf (fp, "%d ", qh_pointid(vertex->point));
-  fprintf (fp, "\n");
-  qh_settempfree(&vertices);
-} /* printfacet3vertex */
-
-
-/*---------------------------------
-  
-  qh_printfacet4geom_nonsimplicial(  )
-    print Geomview 4OFF file for a 4d nonsimplicial facet
-    prints all ridges to unvisited neighbors (qh.visit_id)
-    if qh.DROPdim
-      prints in OFF format
-  
-  notes:
-    must agree with printend4geom()
-*/
-void qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]) {
-  facetT *neighbor;
-  ridgeT *ridge, **ridgep;
-  vertexT *vertex, **vertexp;
-  pointT *point;
-  int k;
-  realT dist;
-  
-  facet->visitid= qh visit_id;
-  if (qh PRINTnoplanes || (facet->visible && qh NEWfacets))
-    return;
-  FOREACHridge_(facet->ridges) {
-    neighbor= otherfacet_(ridge, facet);
-    if (neighbor->visitid == qh visit_id) 
-      continue;
-    if (qh PRINTtransparent && !neighbor->good)
-      continue;  
-    if (qh DOintersections)
-      qh_printhyperplaneintersection(fp, facet, neighbor, ridge->vertices, color);
-    else {
-      if (qh DROPdim >= 0) 
-	fprintf(fp, "OFF 3 1 1 # f%d\n", facet->id);
-      else {
-	qh printoutvar++;
-	fprintf (fp, "# r%d between f%d f%d\n", ridge->id, facet->id, neighbor->id);
-      }
-      FOREACHvertex_(ridge->vertices) {
-	zinc_(Zdistio);
-	qh_distplane(vertex->point,facet, &dist);
-	point=qh_projectpoint(vertex->point,facet, dist);
-	for(k= 0; k < qh hull_dim; k++) {
-	  if (k != qh DROPdim)
-  	    fprintf(fp, "%8.4g ", point[k]);
-  	}
-	fprintf (fp, "\n");
-	qh_memfree (point, qh normal_size);
-      }
-      if (qh DROPdim >= 0)
-        fprintf(fp, "3 0 1 2 %8.4g %8.4g %8.4g\n", color[0], color[1], color[2]);
-    }
-  }
-} /* printfacet4geom_nonsimplicial */
-
-
-/*---------------------------------
-  
-  qh_printfacet4geom_simplicial( fp, facet, color )
-    print Geomview 4OFF file for a 4d simplicial facet
-    prints triangles for unvisited neighbors (qh.visit_id)
-
-  notes:
-    must agree with printend4geom()
-*/
-void qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]) {
-  setT *vertices;
-  facetT *neighbor, **neighborp;
-  vertexT *vertex, **vertexp;
-  int k;
-  
-  facet->visitid= qh visit_id;
-  if (qh PRINTnoplanes || (facet->visible && qh NEWfacets))
-    return;
-  FOREACHneighbor_(facet) {
-    if (neighbor->visitid == qh visit_id)
-      continue;
-    if (qh PRINTtransparent && !neighbor->good)
-      continue;  
-    vertices= qh_setnew_delnthsorted (facet->vertices, qh hull_dim,
-	                  SETindex_(facet->neighbors, neighbor), 0);
-    if (qh DOintersections)
-      qh_printhyperplaneintersection(fp, facet, neighbor, vertices, color);
-    else {
-      if (qh DROPdim >= 0) 
-	fprintf(fp, "OFF 3 1 1 # ridge between f%d f%d\n",
-		facet->id, neighbor->id);
-      else {
-	qh printoutvar++;
-	fprintf (fp, "# ridge between f%d f%d\n", facet->id, neighbor->id);
-      }
-      FOREACHvertex_(vertices) {
-	for(k= 0; k < qh hull_dim; k++) {
-	  if (k != qh DROPdim)
-  	    fprintf(fp, "%8.4g ", vertex->point[k]);
-  	}
-	fprintf (fp, "\n");
-      }
-      if (qh DROPdim >= 0) 
-        fprintf(fp, "3 0 1 2 %8.4g %8.4g %8.4g\n", color[0], color[1], color[2]);
-    }
-    qh_setfree(&vertices);
-  }
-} /* printfacet4geom_simplicial */
-
-
-/*---------------------------------
-  
-  qh_printfacetNvertex_nonsimplicial( fp, facet, id, format )
-    print vertices for an N-d non-simplicial facet
-    triangulates each ridge to the id
-*/
-void qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format) {
-  vertexT *vertex, **vertexp;
-  ridgeT *ridge, **ridgep;
-
-  if (facet->visible && qh NEWfacets)
-    return;
-  FOREACHridge_(facet->ridges) {
-    if (format == qh_PRINTtriangles)
-      fprintf(fp, "%d ", qh hull_dim);
-    fprintf(fp, "%d ", id);
-    if ((ridge->top == facet) ^ qh_ORIENTclock) {
-      FOREACHvertex_(ridge->vertices)
-        fprintf(fp, "%d ", qh_pointid(vertex->point));
-    }else {
-      FOREACHvertexreverse12_(ridge->vertices)
-        fprintf(fp, "%d ", qh_pointid(vertex->point));
-    }
-    fprintf(fp, "\n");
-  }
-} /* printfacetNvertex_nonsimplicial */
-
-
-/*---------------------------------
-  
-  qh_printfacetNvertex_simplicial( fp, facet, format )
-    print vertices for an N-d simplicial facet
-    prints vertices for non-simplicial facets
-      2-d facets (orientation preserved by qh_mergefacet2d)
-      PRINToff ('o') for 4-d and higher
-*/
-void qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format) {
-  vertexT *vertex, **vertexp;
-
-  if (format == qh_PRINToff || format == qh_PRINTtriangles)
-    fprintf (fp, "%d ", qh_setsize (facet->vertices));
-  if ((facet->toporient ^ qh_ORIENTclock) 
-  || (qh hull_dim > 2 && !facet->simplicial)) {
-    FOREACHvertex_(facet->vertices)
-      fprintf(fp, "%d ", qh_pointid(vertex->point));
-  }else {
-    FOREACHvertexreverse12_(facet->vertices)
-      fprintf(fp, "%d ", qh_pointid(vertex->point));
-  }
-  fprintf(fp, "\n");
-} /* printfacetNvertex_simplicial */
-
-
-/*---------------------------------
-  
-  qh_printfacetheader( fp, facet )
-    prints header fields of a facet to fp
-    
-  notes:
-    for 'f' output and debugging
-*/
-void qh_printfacetheader(FILE *fp, facetT *facet) {
-  pointT *point, **pointp, *furthest;
-  facetT *neighbor, **neighborp;
-  realT dist;
-
-  if (facet == qh_MERGEridge) {
-    fprintf (fp, " MERGEridge\n");
-    return;
-  }else if (facet == qh_DUPLICATEridge) {
-    fprintf (fp, " DUPLICATEridge\n");
-    return;
-  }else if (!facet) {
-    fprintf (fp, " NULLfacet\n");
-    return;
-  }
-  qh old_randomdist= qh RANDOMdist;
-  qh RANDOMdist= False;
-  fprintf(fp, "- f%d\n", facet->id);
-  fprintf(fp, "    - flags:");
-  if (facet->toporient) 
-    fprintf(fp, " top");
-  else
-    fprintf(fp, " bottom");
-  if (facet->simplicial)
-    fprintf(fp, " simplicial");
-  if (facet->tricoplanar)
-    fprintf(fp, " tricoplanar");
-  if (facet->upperdelaunay)
-    fprintf(fp, " upperDelaunay");
-  if (facet->visible)
-    fprintf(fp, " visible");
-  if (facet->newfacet)
-    fprintf(fp, " new");
-  if (facet->tested)
-    fprintf(fp, " tested");
-  if (!facet->good)
-    fprintf(fp, " notG");
-  if (facet->seen)
-    fprintf(fp, " seen");
-  if (facet->coplanar)
-    fprintf(fp, " coplanar");
-  if (facet->mergehorizon)
-    fprintf(fp, " mergehorizon");
-  if (facet->keepcentrum)
-    fprintf(fp, " keepcentrum");
-  if (facet->dupridge)
-    fprintf(fp, " dupridge");
-  if (facet->mergeridge && !facet->mergeridge2)
-    fprintf(fp, " mergeridge1");
-  if (facet->mergeridge2)
-    fprintf(fp, " mergeridge2");
-  if (facet->newmerge)
-    fprintf(fp, " newmerge");
-  if (facet->flipped) 
-    fprintf(fp, " flipped");
-  if (facet->notfurthest) 
-    fprintf(fp, " notfurthest");
-  if (facet->degenerate)
-    fprintf(fp, " degenerate");
-  if (facet->redundant)
-    fprintf(fp, " redundant");
-  fprintf(fp, "\n");
-  if (facet->isarea)
-    fprintf(fp, "    - area: %2.2g\n", facet->f.area);
-  else if (qh NEWfacets && facet->visible && facet->f.replace)
-    fprintf(fp, "    - replacement: f%d\n", facet->f.replace->id);
-  else if (facet->newfacet) {
-    if (facet->f.samecycle && facet->f.samecycle != facet)
-      fprintf(fp, "    - shares same visible/horizon as f%d\n", facet->f.samecycle->id);
-  }else if (facet->tricoplanar /* !isarea */) {
-    if (facet->f.triowner)
-      fprintf(fp, "    - owner of normal & centrum is facet f%d\n", facet->f.triowner->id);
-  }else if (facet->f.newcycle)
-    fprintf(fp, "    - was horizon to f%d\n", facet->f.newcycle->id);
-  if (facet->nummerge)
-    fprintf(fp, "    - merges: %d\n", facet->nummerge);
-  qh_printpointid(fp, "    - normal: ", qh hull_dim, facet->normal, -1);
-  fprintf(fp, "    - offset: %10.7g\n", facet->offset);
-  if (qh CENTERtype == qh_ASvoronoi || facet->center)
-    qh_printcenter (fp, qh_PRINTfacets, "    - center: ", facet);
-#if qh_MAXoutside
-  if (facet->maxoutside > qh DISTround)
-    fprintf(fp, "    - maxoutside: %10.7g\n", facet->maxoutside);
-#endif
-  if (!SETempty_(facet->outsideset)) {
-    furthest= (pointT*)qh_setlast(facet->outsideset);
-    if (qh_setsize (facet->outsideset) < 6) {
-      fprintf(fp, "    - outside set (furthest p%d):\n", qh_pointid(furthest));
-      FOREACHpoint_(facet->outsideset)
-	qh_printpoint(fp, "     ", point);
-    }else if (qh_setsize (facet->outsideset) < 21) {
-      qh_printpoints(fp, "    - outside set:", facet->outsideset);
-    }else {
-      fprintf(fp, "    - outside set:  %d points.", qh_setsize(facet->outsideset));
-      qh_printpoint(fp, "  Furthest", furthest);
-    }
-#if !qh_COMPUTEfurthest
-    fprintf(fp, "    - furthest distance= %2.2g\n", facet->furthestdist);
-#endif
-  }
-  if (!SETempty_(facet->coplanarset)) {
-    furthest= (pointT*)qh_setlast(facet->coplanarset);
-    if (qh_setsize (facet->coplanarset) < 6) {
-      fprintf(fp, "    - coplanar set (furthest p%d):\n", qh_pointid(furthest));
-      FOREACHpoint_(facet->coplanarset)
-	qh_printpoint(fp, "     ", point);
-    }else if (qh_setsize (facet->coplanarset) < 21) {
-      qh_printpoints(fp, "    - coplanar set:", facet->coplanarset);
-    }else {
-      fprintf(fp, "    - coplanar set:  %d points.", qh_setsize(facet->coplanarset));
-      qh_printpoint(fp, "  Furthest", furthest);
-    }
-    zinc_(Zdistio);
-    qh_distplane (furthest, facet, &dist);
-    fprintf(fp, "      furthest distance= %2.2g\n", dist);
-  }
-  qh_printvertices (fp, "    - vertices:", facet->vertices);
-  fprintf(fp, "    - neighboring facets: ");
-  FOREACHneighbor_(facet) {
-    if (neighbor == qh_MERGEridge)
-      fprintf(fp, " MERGE");
-    else if (neighbor == qh_DUPLICATEridge)
-      fprintf(fp, " DUP");
-    else
-      fprintf(fp, " f%d", neighbor->id);
-  }
-  fprintf(fp, "\n");
-  qh RANDOMdist= qh old_randomdist;
-} /* printfacetheader */
-
-
-/*---------------------------------
-  
-  qh_printfacetridges( fp, facet )
-    prints ridges of a facet to fp
-
-  notes:
-    ridges printed in neighbor order
-    assumes the ridges exist
-    for 'f' output
-*/
-void qh_printfacetridges(FILE *fp, facetT *facet) {
-  facetT *neighbor, **neighborp;
-  ridgeT *ridge, **ridgep;
-  int numridges= 0;
-
-
-  if (facet->visible && qh NEWfacets) {
-    fprintf(fp, "    - ridges (ids may be garbage):");
-    FOREACHridge_(facet->ridges)
-      fprintf(fp, " r%d", ridge->id);
-    fprintf(fp, "\n");
-  }else {
-    fprintf(fp, "    - ridges:\n");
-    FOREACHridge_(facet->ridges)
-      ridge->seen= False;
-    if (qh hull_dim == 3) {
-      ridge= SETfirstt_(facet->ridges, ridgeT);
-      while (ridge && !ridge->seen) {
-	ridge->seen= True;
-	qh_printridge(fp, ridge);
-	numridges++;
-	ridge= qh_nextridge3d (ridge, facet, NULL);
-	}
-    }else {
-      FOREACHneighbor_(facet) {
-	FOREACHridge_(facet->ridges) {
-	  if (otherfacet_(ridge,facet) == neighbor) {
-	    ridge->seen= True;
-	    qh_printridge(fp, ridge);
-	    numridges++;
-	  }
-	}
-      }
-    }
-    if (numridges != qh_setsize (facet->ridges)) {
-      fprintf (fp, "     - all ridges:");
-      FOREACHridge_(facet->ridges) 
-	fprintf (fp, " r%d", ridge->id);
-        fprintf (fp, "\n");
-    }
-    FOREACHridge_(facet->ridges) {
-      if (!ridge->seen) 
-	qh_printridge(fp, ridge);
-    }
-  }
-} /* printfacetridges */
-
-/*---------------------------------
-  
-  qh_printfacets( fp, format, facetlist, facets, printall )
-    prints facetlist and/or facet set in output format
-  
-  notes:
-    also used for specialized formats ('FO' and summary)
-    turns off 'Rn' option since want actual numbers
-*/
-void qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
-  int numfacets, numsimplicial, numridges, totneighbors, numcoplanars, numtricoplanars;
-  facetT *facet, **facetp;
-  setT *vertices;
-  coordT *center;
-  realT outerplane, innerplane;
-
-  qh old_randomdist= qh RANDOMdist;
-  qh RANDOMdist= False;
-  if (qh CDDoutput && (format == qh_PRINTcentrums || format == qh_PRINTpointintersect || format == qh_PRINToff))
-    fprintf (qh ferr, "qhull warning: CDD format is not available for centrums, halfspace\nintersections, and OFF file format.\n");
-  if (format == qh_PRINTnone)
-    ; /* print nothing */
-  else if (format == qh_PRINTaverage) {
-    vertices= qh_facetvertices (facetlist, facets, printall);
-    center= qh_getcenter (vertices);
-    fprintf (fp, "%d 1\n", qh hull_dim);
-    qh_printpointid (fp, NULL, qh hull_dim, center, -1);
-    qh_memfree (center, qh normal_size);
-    qh_settempfree (&vertices);
-  }else if (format == qh_PRINTextremes) {
-    if (qh DELAUNAY)
-      qh_printextremes_d (fp, facetlist, facets, printall);
-    else if (qh hull_dim == 2)
-      qh_printextremes_2d (fp, facetlist, facets, printall);
-    else 
-      qh_printextremes (fp, facetlist, facets, printall);
-  }else if (format == qh_PRINToptions)
-    fprintf(fp, "Options selected for Qhull %s:\n%s\n", qh_VERSION, qh qhull_options);
-  else if (format == qh_PRINTpoints && !qh VORONOI)
-    qh_printpoints_out (fp, facetlist, facets, printall);
-  else if (format == qh_PRINTqhull)
-    fprintf (fp, "%s | %s\n", qh rbox_command, qh qhull_command);
-  else if (format == qh_PRINTsize) {
-    fprintf (fp, "0\n2 ");
-    fprintf (fp, qh_REAL_1, qh totarea);
-    fprintf (fp, qh_REAL_1, qh totvol);
-    fprintf (fp, "\n");
-  }else if (format == qh_PRINTsummary) {
-    qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial, 
-      &totneighbors, &numridges, &numcoplanars, &numtricoplanars);
-    vertices= qh_facetvertices (facetlist, facets, printall); 
-    fprintf (fp, "10 %d %d %d %d %d %d %d %d %d %d\n2 ", qh hull_dim, 
-                qh num_points + qh_setsize (qh other_points),
-                qh num_vertices, qh num_facets - qh num_visible,
-                qh_setsize (vertices), numfacets, numcoplanars, 
-		numfacets - numsimplicial, zzval_(Zdelvertextot), 
-		numtricoplanars);
-    qh_settempfree (&vertices);
-    qh_outerinner (NULL, &outerplane, &innerplane);
-    fprintf (fp, qh_REAL_2n, outerplane, innerplane);
-  }else if (format == qh_PRINTvneighbors)
-    qh_printvneighbors (fp, facetlist, facets, printall);
-  else if (qh VORONOI && format == qh_PRINToff)
-    qh_printvoronoi (fp, format, facetlist, facets, printall);
-  else if (qh VORONOI && format == qh_PRINTgeom) {
-    qh_printbegin (fp, format, facetlist, facets, printall);
-    qh_printvoronoi (fp, format, facetlist, facets, printall);
-    qh_printend (fp, format, facetlist, facets, printall);
-  }else if (qh VORONOI 
-  && (format == qh_PRINTvertices || format == qh_PRINTinner || format == qh_PRINTouter))
-    qh_printvdiagram (fp, format, facetlist, facets, printall);
-  else {
-    qh_printbegin (fp, format, facetlist, facets, printall);
-    FORALLfacet_(facetlist)
-      qh_printafacet (fp, format, facet, printall);
-    FOREACHfacet_(facets) 
-      qh_printafacet (fp, format, facet, printall);
-    qh_printend (fp, format, facetlist, facets, printall);
-  }
-  qh RANDOMdist= qh old_randomdist;
-} /* printfacets */
-
-
-/*---------------------------------
-  
-  qh_printhelp_degenerate( fp )
-    prints descriptive message for precision error
-
-  notes:
-    no message if qh_QUICKhelp
-*/
-void qh_printhelp_degenerate(FILE *fp) {
-  
-  if (qh MERGEexact || qh PREmerge || qh JOGGLEmax < REALmax/2) 
-    fprintf(fp, "\n\
-A Qhull error has occurred.  Qhull should have corrected the above\n\
-precision error.  Please send the input and all of the output to\n\
-qhull_bug@geom.umn.edu\n");
-  else if (!qh_QUICKhelp) {
-    fprintf(fp, "\n\
-Precision problems were detected during construction of the convex hull.\n\
-This occurs because convex hull algorithms assume that calculations are\n\
-exact, but floating-point arithmetic has roundoff errors.\n\
-\n\
-To correct for precision problems, do not use 'Q0'.  By default, Qhull\n\
-selects 'C-0' or 'Qx' and merges non-convex facets.  With option 'QJ',\n\
-Qhull joggles the input to prevent precision problems.  See \"Imprecision\n\
-in Qhull\" (qh-impre.htm).\n\
-\n\
-If you use 'Q0', the output may include\n\
-coplanar ridges, concave ridges, and flipped facets.  In 4-d and higher,\n\
-Qhull may produce a ridge with four neighbors or two facets with the same \n\
-vertices.  Qhull reports these events when they occur.  It stops when a\n\
-concave ridge, flipped facet, or duplicate facet occurs.\n");
-#if REALfloat
-    fprintf (fp, "\
-\n\
-Qhull is currently using single precision arithmetic.  The following\n\
-will probably remove the precision problems:\n\
-  - recompile qhull for double precision (#define REALfloat 0 in user.h).\n");
-#endif
-    if (qh DELAUNAY && !qh SCALElast && qh MAXabs_coord > 1e4)
-      fprintf( fp, "\
-\n\
-When computing the Delaunay triangulation of coordinates > 1.0,\n\
-  - use 'Qbb' to scale the last coordinate to [0,m] (max previous coordinate)\n");
-    if (qh DELAUNAY && !qh ATinfinity) 
-      fprintf( fp, "\
-When computing the Delaunay triangulation:\n\
-  - use 'Qz' to add a point at-infinity.  This reduces precision problems.\n");
- 
-    fprintf(fp, "\
-\n\
-If you need triangular output:\n\
-  - use option 'Qt' to triangulate the output\n\
-  - use option 'QJ' to joggle the input points and remove precision errors\n\
-  - use option 'Ft'.  It triangulates non-simplicial facets with added points.\n\
-\n\
-If you must use 'Q0',\n\
-try one or more of the following options.  They can not guarantee an output.\n\
-  - use 'QbB' to scale the input to a cube.\n\
-  - use 'Po' to produce output and prevent partitioning for flipped facets\n\
-  - use 'V0' to set min. distance to visible facet as 0 instead of roundoff\n\
-  - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
-  - options 'Qf', 'Qbb', and 'QR0' may also help\n",
-               qh DISTround);
-    fprintf(fp, "\
-\n\
-To guarantee simplicial output:\n\
-  - use option 'Qt' to triangulate the output\n\
-  - use option 'QJ' to joggle the input points and remove precision errors\n\
-  - use option 'Ft' to triangulate the output by adding points\n\
-  - use exact arithmetic (see \"Imprecision in Qhull\", qh-impre.htm)\n\
-");
-  }
-} /* printhelp_degenerate */
-
-
-/*---------------------------------
-  
-  qh_printhelp_singular( fp )
-    prints descriptive message for singular input
-*/
-void qh_printhelp_singular(FILE *fp) {
-  facetT *facet;
-  vertexT *vertex, **vertexp;
-  realT min, max, *coord, dist;
-  int i,k;
-  
-  fprintf(fp, "\n\
-The input to qhull appears to be less than %d dimensional, or a\n\
-computation has overflowed.\n\n\
-Qhull could not construct a clearly convex simplex from points:\n",
-           qh hull_dim);
-  qh_printvertexlist (fp, "", qh facet_list, NULL, qh_ALL);
-  if (!qh_QUICKhelp)
-    fprintf(fp, "\n\
-The center point is coplanar with a facet, or a vertex is coplanar\n\
-with a neighboring facet.  The maximum round off error for\n\
-computing distances is %2.2g.  The center point, facets and distances\n\
-to the center point are as follows:\n\n", qh DISTround);
-  qh_printpointid (fp, "center point", qh hull_dim, qh interior_point, -1);
-  fprintf (fp, "\n");
-  FORALLfacets {
-    fprintf (fp, "facet");
-    FOREACHvertex_(facet->vertices)
-      fprintf (fp, " p%d", qh_pointid(vertex->point));
-    zinc_(Zdistio);
-    qh_distplane(qh interior_point, facet, &dist);
-    fprintf (fp, " distance= %4.2g\n", dist);
-  }
-  if (!qh_QUICKhelp) {
-    if (qh HALFspace) 
-      fprintf (fp, "\n\
-These points are the dual of the given halfspaces.  They indicate that\n\
-the intersection is degenerate.\n");
-    fprintf (fp,"\n\
-These points either have a maximum or minimum x-coordinate, or\n\
-they maximize the determinant for k coordinates.  Trial points\n\
-are first selected from points that maximize a coordinate.\n");
-    if (qh hull_dim >= qh_INITIALmax)
-      fprintf (fp, "\n\
-Because of the high dimension, the min x-coordinate and max-coordinate\n\
-points are used if the determinant is non-zero.  Option 'Qs' will\n\
-do a better, though much slower, job.  Instead of 'Qs', you can change\n\
-the points by randomly rotating the input with 'QR0'.\n");
-  }
-  fprintf (fp, "\nThe min and max coordinates for each dimension are:\n");
-  for (k=0; k < qh hull_dim; k++) {
-    min= REALmax;
-    max= -REALmin;
-    for (i=qh num_points, coord= qh first_point+k; i--; coord += qh hull_dim) {
-      maximize_(max, *coord);
-      minimize_(min, *coord);
-    }
-    fprintf (fp, "  %d:  %8.4g  %8.4g  difference= %4.4g\n", k, min, max, max-min);
-  }
-  if (!qh_QUICKhelp) {
-    fprintf (fp, "\n\
-If the input should be full dimensional, you have several options that\n\
-may determine an initial simplex:\n\
-  - use 'QJ'  to joggle the input and make it full dimensional\n\
-  - use 'QbB' to scale the points to the unit cube\n\
-  - use 'QR0' to randomly rotate the input for different maximum points\n\
-  - use 'Qs'  to search all points for the initial simplex\n\
-  - use 'En'  to specify a maximum roundoff error less than %2.2g.\n\
-  - trace execution with 'T3' to see the determinant for each point.\n",
-                     qh DISTround);
-#if REALfloat
-    fprintf (fp, "\
-  - recompile qhull for double precision (#define REALfloat 0 in qhull.h).\n");
-#endif
-    fprintf (fp, "\n\
-If the input is lower dimensional:\n\
-  - use 'QJ' to joggle the input and make it full dimensional\n\
-  - use 'Qbk:0Bk:0' to delete coordinate k from the input.  You should\n\
-    pick the coordinate with the least range.  The hull will have the\n\
-    correct topology.\n\
-  - determine the flat containing the points, rotate the points\n\
-    into a coordinate plane, and delete the other coordinates.\n\
-  - add one or more points to make the input full dimensional.\n\
-");
-    if (qh DELAUNAY && !qh ATinfinity)
-      fprintf (fp, "\n\n\
-This is a Delaunay triangulation and the input is co-circular or co-spherical:\n\
-  - use 'Qz' to add a point \"at infinity\" (i.e., above the paraboloid)\n\
-  - or use 'QJ' to joggle the input and avoid co-circular data\n");
-  }
-} /* printhelp_singular */
-
-/*---------------------------------
-  
-  qh_printhyperplaneintersection( fp, facet1, facet2, vertices, color )
-    print Geomview OFF or 4OFF for the intersection of two hyperplanes in 3-d or 4-d
-*/
-void qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
-		   setT *vertices, realT color[3]) {
-  realT costheta, denominator, dist1, dist2, s, t, mindenom, p[4];
-  vertexT *vertex, **vertexp;
-  int i, k;
-  boolT nearzero1, nearzero2;
-  
-  costheta= qh_getangle(facet1->normal, facet2->normal);
-  denominator= 1 - costheta * costheta;
-  i= qh_setsize(vertices);
-  if (qh hull_dim == 3)
-    fprintf(fp, "VECT 1 %d 1 %d 1 ", i, i);
-  else if (qh hull_dim == 4 && qh DROPdim >= 0)
-    fprintf(fp, "OFF 3 1 1 ");
-  else
-    qh printoutvar++;
-  fprintf (fp, "# intersect f%d f%d\n", facet1->id, facet2->id);
-  mindenom= 1 / (10.0 * qh MAXabs_coord);
-  FOREACHvertex_(vertices) {
-    zadd_(Zdistio, 2);
-    qh_distplane(vertex->point, facet1, &dist1);
-    qh_distplane(vertex->point, facet2, &dist2);
-    s= qh_divzero (-dist1 + costheta * dist2, denominator,mindenom,&nearzero1);
-    t= qh_divzero (-dist2 + costheta * dist1, denominator,mindenom,&nearzero2);
-    if (nearzero1 || nearzero2)
-      s= t= 0.0;
-    for(k= qh hull_dim; k--; )
-      p[k]= vertex->point[k] + facet1->normal[k] * s + facet2->normal[k] * t;
-    if (qh PRINTdim <= 3) {
-      qh_projectdim3 (p, p);
-      fprintf(fp, "%8.4g %8.4g %8.4g # ", p[0], p[1], p[2]);
-    }else 
-      fprintf(fp, "%8.4g %8.4g %8.4g %8.4g # ", p[0], p[1], p[2], p[3]);
-    if (nearzero1+nearzero2)
-      fprintf (fp, "p%d (coplanar facets)\n", qh_pointid (vertex->point));
-    else
-      fprintf (fp, "projected p%d\n", qh_pointid (vertex->point));
-  }
-  if (qh hull_dim == 3)
-    fprintf(fp, "%8.4g %8.4g %8.4g 1.0\n", color[0], color[1], color[2]); 
-  else if (qh hull_dim == 4 && qh DROPdim >= 0)  
-    fprintf(fp, "3 0 1 2 %8.4g %8.4g %8.4g 1.0\n", color[0], color[1], color[2]);
-} /* printhyperplaneintersection */
-
-/*---------------------------------
-  
-  qh_printline3geom( fp, pointA, pointB, color )
-    prints a line as a VECT
-    prints 0's for qh.DROPdim
-  
-  notes:
-    if pointA == pointB, 
-      it's a 1 point VECT
-*/
-void qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]) {
-  int k;
-  realT pA[4], pB[4];
-
-  qh_projectdim3(pointA, pA);
-  qh_projectdim3(pointB, pB);
-  if ((fabs(pA[0] - pB[0]) > 1e-3) || 
-      (fabs(pA[1] - pB[1]) > 1e-3) || 
-      (fabs(pA[2] - pB[2]) > 1e-3)) {
-    fprintf (fp, "VECT 1 2 1 2 1\n");
-    for (k= 0; k < 3; k++)
-       fprintf (fp, "%8.4g ", pB[k]);
-    fprintf (fp, " # p%d\n", qh_pointid (pointB));
-  }else
-    fprintf (fp, "VECT 1 1 1 1 1\n");
-  for (k=0; k < 3; k++)
-    fprintf (fp, "%8.4g ", pA[k]);
-  fprintf (fp, " # p%d\n", qh_pointid (pointA));
-  fprintf (fp, "%8.4g %8.4g %8.4g 1\n", color[0], color[1], color[2]);
-}
-
-/*---------------------------------
-  
-  qh_printneighborhood( fp, format, facetA, facetB, printall )
-    print neighborhood of one or two facets
-
-  notes:
-    calls qh_findgood_all() 
-    bumps qh.visit_id
-*/
-void qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall) {
-  facetT *neighbor, **neighborp, *facet;
-  setT *facets;
-
-  if (format == qh_PRINTnone)
-    return;
-  qh_findgood_all (qh facet_list);
-  if (facetA == facetB)
-    facetB= NULL;
-  facets= qh_settemp (2*(qh_setsize (facetA->neighbors)+1));
-  qh visit_id++;
-  for (facet= facetA; facet; facet= ((facet == facetA) ? facetB : NULL)) {
-    if (facet->visitid != qh visit_id) {
-      facet->visitid= qh visit_id;
-      qh_setappend (&facets, facet);
-    }
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid == qh visit_id)
-        continue;
-      neighbor->visitid= qh visit_id;
-      if (printall || !qh_skipfacet (neighbor))
-        qh_setappend (&facets, neighbor);
-    }
-  }
-  qh_printfacets (fp, format, NULL, facets, printall);
-  qh_settempfree (&facets);
-} /* printneighborhood */
-
-/*---------------------------------
-  
-  qh_printpoint( fp, string, point )
-  qh_printpointid( fp, string, dim, point, id )
-    prints the coordinates of a point
-
-  returns:
-    if string is defined
-      prints 'string p%d' (skips p%d if id=-1)
-
-  notes:
-    nop if point is NULL
-    prints id unless it is undefined (-1)
-*/
-void qh_printpoint(FILE *fp, char *string, pointT *point) {
-  int id= qh_pointid( point);
-
-  qh_printpointid( fp, string, qh hull_dim, point, id);
-} /* printpoint */
-
-void qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id) {
-  int k;
-  realT r; /*bug fix*/
-  
-  if (!point)
-    return;
-  if (string) {
-    fputs (string, fp);
-   if (id != -1)
-      fprintf(fp, " p%d: ", id);
-  }
-  for(k= dim; k--; ) {
-    r= *point++;
-    if (string)
-      fprintf(fp, " %8.4g", r);
-    else
-      fprintf(fp, qh_REAL_1, r);
-  }
-  fprintf(fp, "\n");
-} /* printpointid */
-
-/*---------------------------------
-  
-  qh_printpoint3( fp, point )
-    prints 2-d, 3-d, or 4-d point as Geomview 3-d coordinates
-*/
-void qh_printpoint3 (FILE *fp, pointT *point) {
-  int k;
-  realT p[4];
-  
-  qh_projectdim3 (point, p);
-  for (k=0; k < 3; k++)
-    fprintf (fp, "%8.4g ", p[k]);
-  fprintf (fp, " # p%d\n", qh_pointid (point));
-} /* printpoint3 */
-
-/*----------------------------------------
--printpoints- print pointids for a set of points starting at index 
-   see geom.c
-*/
-
-/*---------------------------------
-  
-  qh_printpoints_out( fp, facetlist, facets, printall )
-    prints vertices, coplanar/inside points, for facets by their point coordinates
-    allows qh.CDDoutput
-
-  notes:
-    same format as qhull input
-    if no coplanar/interior points,
-      same order as qh_printextremes
-*/
-void qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall) {
-  int allpoints= qh num_points + qh_setsize (qh other_points);
-  int numpoints=0, point_i, point_n;
-  setT *vertices, *points;
-  facetT *facet, **facetp;
-  pointT *point, **pointp;
-  vertexT *vertex, **vertexp;
-  int id;
-
-  points= qh_settemp (allpoints);
-  qh_setzero (points, 0, allpoints);
-  vertices= qh_facetvertices (facetlist, facets, printall);
-  FOREACHvertex_(vertices) {
-    id= qh_pointid (vertex->point);
-    if (id >= 0)
-      SETelem_(points, id)= vertex->point;
-  }
-  if (qh KEEPinside || qh KEEPcoplanar || qh KEEPnearinside) {
-    FORALLfacet_(facetlist) {
-      if (!printall && qh_skipfacet(facet))
-        continue;
-      FOREACHpoint_(facet->coplanarset) {
-        id= qh_pointid (point);
-        if (id >= 0)
-          SETelem_(points, id)= point;
-      }
-    }
-    FOREACHfacet_(facets) {
-      if (!printall && qh_skipfacet(facet))
-        continue;
-      FOREACHpoint_(facet->coplanarset) {
-        id= qh_pointid (point);
-        if (id >= 0)
-          SETelem_(points, id)= point;
-      }
-    }
-  }
-  qh_settempfree (&vertices);
-  FOREACHpoint_i_(points) {
-    if (point)
-      numpoints++;
-  }
-  if (qh CDDoutput)
-    fprintf (fp, "%s | %s\nbegin\n%d %d real\n", qh rbox_command,
-             qh qhull_command, numpoints, qh hull_dim + 1);
-  else
-    fprintf (fp, "%d\n%d\n", qh hull_dim, numpoints);
-  FOREACHpoint_i_(points) {
-    if (point) {
-      if (qh CDDoutput)
-	fprintf (fp, "1 ");
-      qh_printpoint (fp, NULL, point);
-    }
-  }
-  if (qh CDDoutput)
-    fprintf (fp, "end\n");
-  qh_settempfree (&points);
-} /* printpoints_out */
-  
-
-/*---------------------------------
-  
-  qh_printpointvect( fp, point, normal, center, radius, color )
-    prints a 2-d, 3-d, or 4-d point as 3-d VECT's relative to normal or to center point
-*/
-void qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]) {
-  realT diff[4], pointA[4];
-  int k;
-  
-  for (k= qh hull_dim; k--; ) {
-    if (center)
-      diff[k]= point[k]-center[k];
-    else if (normal) 
-      diff[k]= normal[k];
-    else
-      diff[k]= 0;
-  }
-  if (center)
-    qh_normalize2 (diff, qh hull_dim, True, NULL, NULL);
-  for (k= qh hull_dim; k--; ) 
-    pointA[k]= point[k]+diff[k] * radius;
-  qh_printline3geom (fp, point, pointA, color);
-} /* printpointvect */  
-
-/*---------------------------------
-  
-  qh_printpointvect2( fp, point, normal, center, radius )
-    prints a 2-d, 3-d, or 4-d point as 2 3-d VECT's for an imprecise point
-*/
-void qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius) {
-  realT red[3]={1, 0, 0}, yellow[3]={1, 1, 0};
-
-  qh_printpointvect (fp, point, normal, center, radius, red);
-  qh_printpointvect (fp, point, normal, center, -radius, yellow);
-} /* printpointvect2 */
-
-/*---------------------------------
-  
-  qh_printridge( fp, ridge )
-    prints the information in a ridge
-
-  notes:
-    for qh_printfacetridges()
-*/
-void qh_printridge(FILE *fp, ridgeT *ridge) {
-  
-  fprintf(fp, "     - r%d", ridge->id);
-  if (ridge->tested)
-    fprintf (fp, " tested");
-  if (ridge->nonconvex)
-    fprintf (fp, " nonconvex");
-  fprintf (fp, "\n");
-  qh_printvertices (fp, "           vertices:", ridge->vertices);
-  if (ridge->top && ridge->bottom)
-    fprintf(fp, "           between f%d and f%d\n",
-	    ridge->top->id, ridge->bottom->id);
-} /* printridge */
-
-/*---------------------------------
-  
-  qh_printspheres( fp, vertices, radius )
-    prints 3-d vertices as OFF spheres
-
-  notes:
-    inflated octahedron from Stuart Levy earth/mksphere2
-*/
-void qh_printspheres(FILE *fp, setT *vertices, realT radius) {
-  vertexT *vertex, **vertexp;
-
-  qh printoutnum++;
-  fprintf (fp, "{appearance {-edge -normal normscale 0} {\n\
-INST geom {define vsphere OFF\n\
-18 32 48\n\
-\n\
-0 0 1\n\
-1 0 0\n\
-0 1 0\n\
--1 0 0\n\
-0 -1 0\n\
-0 0 -1\n\
-0.707107 0 0.707107\n\
-0 -0.707107 0.707107\n\
-0.707107 -0.707107 0\n\
--0.707107 0 0.707107\n\
--0.707107 -0.707107 0\n\
-0 0.707107 0.707107\n\
--0.707107 0.707107 0\n\
-0.707107 0.707107 0\n\
-0.707107 0 -0.707107\n\
-0 0.707107 -0.707107\n\
--0.707107 0 -0.707107\n\
-0 -0.707107 -0.707107\n\
-\n\
-3 0 6 11\n\
-3 0 7 6	\n\
-3 0 9 7	\n\
-3 0 11 9\n\
-3 1 6 8	\n\
-3 1 8 14\n\
-3 1 13 6\n\
-3 1 14 13\n\
-3 2 11 13\n\
-3 2 12 11\n\
-3 2 13 15\n\
-3 2 15 12\n\
-3 3 9 12\n\
-3 3 10 9\n\
-3 3 12 16\n\
-3 3 16 10\n\
-3 4 7 10\n\
-3 4 8 7\n\
-3 4 10 17\n\
-3 4 17 8\n\
-3 5 14 17\n\
-3 5 15 14\n\
-3 5 16 15\n\
-3 5 17 16\n\
-3 6 13 11\n\
-3 7 8 6\n\
-3 9 10 7\n\
-3 11 12 9\n\
-3 14 8 17\n\
-3 15 13 14\n\
-3 16 12 15\n\
-3 17 10 16\n} transforms { TLIST\n");
-  FOREACHvertex_(vertices) {
-    fprintf(fp, "%8.4g 0 0 0 # v%d\n 0 %8.4g 0 0\n0 0 %8.4g 0\n",
-      radius, vertex->id, radius, radius);
-    qh_printpoint3 (fp, vertex->point);
-    fprintf (fp, "1\n");
-  }
-  fprintf (fp, "}}}\n");
-} /* printspheres */
-
-
-/*----------------------------------------------
--printsummary-
-                see qhull.c
-*/
-
-/*---------------------------------
-  
-  qh_printvdiagram( fp, format, facetlist, facets, printall )
-    print voronoi diagram
-      # of pairs of input sites
-      #indices site1 site2 vertex1 ...
-    
-    sites indexed by input point id
-      point 0 is the first input point
-    vertices indexed by 'o' and 'p' order
-      vertex 0 is the 'vertex-at-infinity'
-      vertex 1 is the first Voronoi vertex
-
-  see:
-    qh_printvoronoi()
-    qh_eachvoronoi_all()
-
-  notes:
-    if all facets are upperdelaunay, 
-      prints upper hull (furthest-site Voronoi diagram)
-*/
-void qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
-  setT *vertices;
-  int totcount, numcenters;
-  boolT islower;
-  qh_RIDGE innerouter= qh_RIDGEall;
-  printvridgeT printvridge= NULL;
-
-  if (format == qh_PRINTvertices) {
-    innerouter= qh_RIDGEall;
-    printvridge= qh_printvridge;
-  }else if (format == qh_PRINTinner) {
-    innerouter= qh_RIDGEinner;
-    printvridge= qh_printvnorm;
-  }else if (format == qh_PRINTouter) {
-    innerouter= qh_RIDGEouter;
-    printvridge= qh_printvnorm;
-  }else {
-    fprintf(qh ferr, "qh_printvdiagram: unknown print format %d.\n", format);
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  vertices= qh_markvoronoi (facetlist, facets, printall, &islower, &numcenters);
-  totcount= qh_printvdiagram2 (NULL, NULL, vertices, innerouter, False);
-  fprintf (fp, "%d\n", totcount);
-  totcount= qh_printvdiagram2 (fp, printvridge, vertices, innerouter, True /* inorder*/);
-  qh_settempfree (&vertices);
-#if 0  /* for testing qh_eachvoronoi_all */
-  fprintf (fp, "\n");
-  totcount= qh_eachvoronoi_all(fp, printvridge, qh UPPERdelaunay, innerouter, True /* inorder*/);
-  fprintf (fp, "%d\n", totcount);
-#endif
-} /* printvdiagram */
-  
-/*---------------------------------
-  
-  qh_printvdiagram2( fp, printvridge, vertices, innerouter, inorder )
-    visit all pairs of input sites (vertices) for selected Voronoi vertices
-    vertices may include NULLs
-  
-  innerouter:
-    qh_RIDGEall   print inner ridges (bounded) and outer ridges (unbounded)
-    qh_RIDGEinner print only inner ridges
-    qh_RIDGEouter print only outer ridges
-  
-  inorder:
-    print 3-d Voronoi vertices in order
-  
-  assumes:
-    qh_markvoronoi marked facet->visitid for Voronoi vertices
-    all facet->seen= False
-    all facet->seen2= True
-  
-  returns:
-    total number of Voronoi ridges 
-    if printvridge,
-      calls printvridge( fp, vertex, vertexA, centers) for each ridge
-      [see qh_eachvoronoi()]
-  
-  see:
-    qh_eachvoronoi_all()
-*/
-int qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder) {
-  int totcount= 0;
-  int vertex_i, vertex_n;
-  vertexT *vertex;
-
-  FORALLvertices 
-    vertex->seen= False;
-  FOREACHvertex_i_(vertices) {
-    if (vertex) {
-      if (qh GOODvertex > 0 && qh_pointid(vertex->point)+1 != qh GOODvertex)
-	continue;
-      totcount += qh_eachvoronoi (fp, printvridge, vertex, !qh_ALL, innerouter, inorder);
-    }
-  }
-  return totcount;
-} /* printvdiagram2 */
-  
-/*---------------------------------
-  
-  qh_printvertex( fp, vertex )
-    prints the information in a vertex
-*/
-void qh_printvertex(FILE *fp, vertexT *vertex) {
-  pointT *point;
-  int k, count= 0;
-  facetT *neighbor, **neighborp;
-  realT r; /*bug fix*/
-
-  if (!vertex) {
-    fprintf (fp, "  NULLvertex\n");
-    return;
-  }
-  fprintf(fp, "- p%d (v%d):", qh_pointid(vertex->point), vertex->id);
-  point= vertex->point;
-  if (point) {
-    for(k= qh hull_dim; k--; ) {
-      r= *point++;
-      fprintf(fp, " %5.2g", r);
-    }
-  }
-  if (vertex->deleted)
-    fprintf(fp, " deleted");
-  if (vertex->delridge)
-    fprintf (fp, " ridgedeleted");
-  fprintf(fp, "\n");
-  if (vertex->neighbors) {
-    fprintf(fp, "  neighbors:");
-    FOREACHneighbor_(vertex) {
-      if (++count % 100 == 0)
-	fprintf (fp, "\n     ");
-      fprintf(fp, " f%d", neighbor->id);
-    }
-    fprintf(fp, "\n");
-  }
-} /* printvertex */
-
-
-/*---------------------------------
-  
-  qh_printvertexlist( fp, string, facetlist, facets, printall )
-    prints vertices used by a facetlist or facet set
-    tests qh_skipfacet() if !printall
-*/
-void qh_printvertexlist (FILE *fp, char* string, facetT *facetlist, 
-                         setT *facets, boolT printall) {
-  vertexT *vertex, **vertexp;
-  setT *vertices;
-  
-  vertices= qh_facetvertices (facetlist, facets, printall);
-  fputs (string, fp);
-  FOREACHvertex_(vertices)
-    qh_printvertex(fp, vertex);
-  qh_settempfree (&vertices);
-} /* printvertexlist */
-
-
-/*---------------------------------
-  
-  qh_printvertices( fp, string, vertices )
-    prints vertices in a set
-*/
-void qh_printvertices(FILE *fp, char* string, setT *vertices) {
-  vertexT *vertex, **vertexp;
-  
-  fputs (string, fp);
-  FOREACHvertex_(vertices) 
-    fprintf (fp, " p%d (v%d)", qh_pointid(vertex->point), vertex->id);
-  fprintf(fp, "\n");
-} /* printvertices */
-
-/*---------------------------------
-  
-  qh_printvneighbors( fp, facetlist, facets, printall )
-    print vertex neighbors of vertices in facetlist and facets ('FN')
-
-  notes:
-    qh_countfacets clears facet->visitid for non-printed facets
-
-  design:
-    collect facet count and related statistics
-    if necessary, build neighbor sets for each vertex
-    collect vertices in facetlist and facets
-    build a point array for point->vertex and point->coplanar facet
-    for each point
-      list vertex neighbors or coplanar facet
-*/
-void qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall) {
-  int numfacets, numsimplicial, numridges, totneighbors, numneighbors, numcoplanars, numtricoplanars;
-  setT *vertices, *vertex_points, *coplanar_points;
-  int numpoints= qh num_points + qh_setsize (qh other_points);
-  vertexT *vertex, **vertexp;
-  int vertex_i, vertex_n;
-  facetT *facet, **facetp, *neighbor, **neighborp;
-  pointT *point, **pointp;
-
-  qh_countfacets (facetlist, facets, printall, &numfacets, &numsimplicial, 
-      &totneighbors, &numridges, &numcoplanars, &numtricoplanars);  /* sets facet->visitid */
-  fprintf (fp, "%d\n", numpoints);
-  qh_vertexneighbors();
-  vertices= qh_facetvertices (facetlist, facets, printall);
-  vertex_points= qh_settemp (numpoints);
-  coplanar_points= qh_settemp (numpoints);
-  qh_setzero (vertex_points, 0, numpoints);
-  qh_setzero (coplanar_points, 0, numpoints);
-  FOREACHvertex_(vertices)
-    qh_point_add (vertex_points, vertex->point, vertex);
-  FORALLfacet_(facetlist) {
-    FOREACHpoint_(facet->coplanarset)
-      qh_point_add (coplanar_points, point, facet);
-  }
-  FOREACHfacet_(facets) {
-    FOREACHpoint_(facet->coplanarset)
-      qh_point_add (coplanar_points, point, facet);
-  }
-  FOREACHvertex_i_(vertex_points) {
-    if (vertex) { 
-      numneighbors= qh_setsize (vertex->neighbors);
-      fprintf (fp, "%d", numneighbors);
-      if (qh hull_dim == 3)
-        qh_order_vertexneighbors (vertex);
-      else if (qh hull_dim >= 4)
-        qsort (SETaddr_(vertex->neighbors, facetT), numneighbors,
-             sizeof (facetT *), qh_compare_facetvisit);
-      FOREACHneighbor_(vertex) 
-        fprintf (fp, " %d", 
-		 neighbor->visitid ? neighbor->visitid - 1 : - neighbor->id);
-      fprintf (fp, "\n");
-    }else if ((facet= SETelemt_(coplanar_points, vertex_i, facetT)))
-      fprintf (fp, "1 %d\n",
-                  facet->visitid ? facet->visitid - 1 : - facet->id);
-    else
-      fprintf (fp, "0\n");
-  }
-  qh_settempfree (&coplanar_points);
-  qh_settempfree (&vertex_points);
-  qh_settempfree (&vertices);
-} /* printvneighbors */
-
-/*---------------------------------
-  
-  qh_printvoronoi( fp, format, facetlist, facets, printall )
-    print voronoi diagram in 'o' or 'G' format
-    for 'o' format
-      prints voronoi centers for each facet and for infinity
-      for each vertex, lists ids of printed facets or infinity
-      assumes facetlist and facets are disjoint
-    for 'G' format
-      prints an OFF object
-      adds a 0 coordinate to center
-      prints infinity but does not list in vertices
-
-  see:
-    qh_printvdiagram()
-
-  notes:
-    if 'o', 
-      prints a line for each point except "at-infinity"
-    if all facets are upperdelaunay, 
-      reverses lower and upper hull
-*/
-void qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall) {
-  int k, numcenters, numvertices= 0, numneighbors, numinf, vid=1, vertex_i, vertex_n;
-  facetT *facet, **facetp, *neighbor, **neighborp;
-  setT *vertices;
-  vertexT *vertex;
-  boolT islower;
-  unsigned int numfacets= (unsigned int) qh num_facets;
-
-  vertices= qh_markvoronoi (facetlist, facets, printall, &islower, &numcenters);
-  FOREACHvertex_i_(vertices) {
-    if (vertex) {
-      numvertices++;
-      numneighbors = numinf = 0;
-      FOREACHneighbor_(vertex) {
-        if (neighbor->visitid == 0)
-	  numinf= 1;
-        else if (neighbor->visitid < numfacets)
-          numneighbors++;
-      }
-      if (numinf && !numneighbors) {
-	SETelem_(vertices, vertex_i)= NULL;
-	numvertices--;
-      }
-    }
-  }
-  if (format == qh_PRINTgeom) 
-    fprintf (fp, "{appearance {+edge -face} OFF %d %d 1 # Voronoi centers and cells\n", 
-                numcenters, numvertices);
-  else
-    fprintf (fp, "%d\n%d %d 1\n", qh hull_dim-1, numcenters, qh_setsize(vertices));
-  if (format == qh_PRINTgeom) {
-    for (k= qh hull_dim-1; k--; )
-      fprintf (fp, qh_REAL_1, 0.0);
-    fprintf (fp, " 0 # infinity not used\n");
-  }else {
-    for (k= qh hull_dim-1; k--; )
-      fprintf (fp, qh_REAL_1, qh_INFINITE);
-    fprintf (fp, "\n");
-  }
-  FORALLfacet_(facetlist) {
-    if (facet->visitid && facet->visitid < numfacets) {
-      if (format == qh_PRINTgeom)
-        fprintf (fp, "# %d f%d\n", vid++, facet->id);
-      qh_printcenter (fp, format, NULL, facet);
-    }
-  }
-  FOREACHfacet_(facets) {
-    if (facet->visitid && facet->visitid < numfacets) {
-      if (format == qh_PRINTgeom)
-        fprintf (fp, "# %d f%d\n", vid++, facet->id);
-      qh_printcenter (fp, format, NULL, facet);
-    }
-  }
-  FOREACHvertex_i_(vertices) {
-    numneighbors= 0;
-    numinf=0;
-    if (vertex) {
-      if (qh hull_dim == 3)
-        qh_order_vertexneighbors(vertex);
-      else if (qh hull_dim >= 4)
-        qsort (SETaddr_(vertex->neighbors, vertexT), 
-	     qh_setsize (vertex->neighbors),
-	     sizeof (facetT *), qh_compare_facetvisit);
-      FOREACHneighbor_(vertex) {
-        if (neighbor->visitid == 0)
-	  numinf= 1;
-	else if (neighbor->visitid < numfacets)
-          numneighbors++;
-      }
-    }
-    if (format == qh_PRINTgeom) {
-      if (vertex) {
-	fprintf (fp, "%d", numneighbors);
-	if (vertex) {
-	  FOREACHneighbor_(vertex) {
-	    if (neighbor->visitid && neighbor->visitid < numfacets)
-	      fprintf (fp, " %d", neighbor->visitid);
-	  }
-	}
-	fprintf (fp, " # p%d (v%d)\n", vertex_i, vertex->id);
-      }else
-	fprintf (fp, " # p%d is coplanar or isolated\n", vertex_i);
-    }else {
-      if (numinf)
-	numneighbors++;
-      fprintf (fp, "%d", numneighbors);
-      if (vertex) {
-        FOREACHneighbor_(vertex) {
-  	  if (neighbor->visitid == 0) {
-  	    if (numinf) {
-  	      numinf= 0;
-	      fprintf (fp, " %d", neighbor->visitid);
-	    }
-	  }else if (neighbor->visitid < numfacets)
-	    fprintf (fp, " %d", neighbor->visitid);
-	}
-      }
-      fprintf (fp, "\n");
-    }
-  }
-  if (format == qh_PRINTgeom)
-    fprintf (fp, "}\n");
-  qh_settempfree (&vertices);
-} /* printvoronoi */
-  
-/*---------------------------------
-  
-  qh_printvnorm( fp, vertex, vertexA, centers, unbounded )
-    print one separating plane of the Voronoi diagram for a pair of input sites
-    unbounded==True if centers includes vertex-at-infinity
-  
-  assumes:
-    qh_ASvoronoi and qh_vertexneighbors() already set
-    
-  see:
-    qh_printvdiagram()
-    qh_eachvoronoi()
-*/
-void qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded) {
-  pointT *normal;
-  realT offset;
-  int k;
-  
-  normal= qh_detvnorm (vertex, vertexA, centers, &offset);
-  fprintf (fp, "%d %d %d ", 
-      2+qh hull_dim, qh_pointid (vertex->point), qh_pointid (vertexA->point));
-  for (k= 0; k< qh hull_dim-1; k++)
-    fprintf (fp, qh_REAL_1, normal[k]);
-  fprintf (fp, qh_REAL_1, offset);
-  fprintf (fp, "\n");
-} /* printvnorm */
-
-/*---------------------------------
-  
-  qh_printvridge( fp, vertex, vertexA, centers, unbounded )
-    print one ridge of the Voronoi diagram for a pair of input sites
-    unbounded==True if centers includes vertex-at-infinity
-  
-  see:
-    qh_printvdiagram()
-  
-  notes:
-    the user may use a different function
-*/
-void qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded) {
-  facetT *facet, **facetp;
-
-  fprintf (fp, "%d %d %d", qh_setsize (centers)+2, 
-       qh_pointid (vertex->point), qh_pointid (vertexA->point));
-  FOREACHfacet_(centers) 
-    fprintf (fp, " %d", facet->visitid);
-  fprintf (fp, "\n");
-} /* printvridge */
-
-/*---------------------------------
-  
-  qh_projectdim3( source, destination )
-    project 2-d 3-d or 4-d point to a 3-d point
-    uses qh.DROPdim and qh.hull_dim
-    source and destination may be the same
-    
-  notes:
-    allocate 4 elements to destination just in case
-*/
-void qh_projectdim3 (pointT *source, pointT *destination) {
-  int i,k;
-
-  for (k= 0, i=0; k < qh hull_dim; k++) {
-    if (qh hull_dim == 4) {
-      if (k != qh DROPdim)
-        destination[i++]= source[k];
-    }else if (k == qh DROPdim)
-      destination[i++]= 0;
-    else
-      destination[i++]= source[k];
-  }
-  while (i < 3)
-    destination[i++]= 0.0;
-} /* projectdim3 */
-
-/*---------------------------------
-  
-  qh_readfeasible( dim, remainder )
-    read feasible point from remainder string and qh.fin
-
-  returns:
-    number of lines read from qh.fin
-    sets qh.FEASIBLEpoint with malloc'd coordinates
-
-  notes:
-    checks for qh.HALFspace
-    assumes dim > 1
-
-  see:
-    qh_setfeasible
-*/
-int qh_readfeasible (int dim, char *remainder) {
-  boolT isfirst= True;
-  int linecount= 0, tokcount= 0;
-  char *s, *t, firstline[qh_MAXfirst+1];
-  coordT *coords, value;
-
-  if (!qh HALFspace) {
-    fprintf  (qh ferr, "qhull input error: feasible point (dim 1 coords) is only valid for halfspace intersection\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }  
-  if (qh feasible_string)
-    fprintf  (qh ferr, "qhull input warning: feasible point (dim 1 coords) overrides 'Hn,n,n' feasible point for halfspace intersection\n");
-  if (!(qh feasible_point= (coordT*)malloc (dim* sizeof(coordT)))) {
-    fprintf(qh ferr, "qhull error: insufficient memory for feasible point\n");
-    qh_errexit(qh_ERRmem, NULL, NULL);
-  }
-  coords= qh feasible_point;
-  while ((s= (isfirst ?  remainder : fgets(firstline, qh_MAXfirst, qh fin)))) {
-    if (isfirst)
-      isfirst= False;
-    else
-      linecount++;
-    while (*s) {
-      while (isspace(*s))
-        s++;
-      value= qh_strtod (s, &t);
-      if (s == t)
-        break;
-      s= t;
-      *(coords++)= value;
-      if (++tokcount == dim) {
-        while (isspace (*s))
-          s++;
-        qh_strtod (s, &t);
-        if (s != t) {
-          fprintf (qh ferr, "qhull input error: coordinates for feasible point do not finish out the line: %s\n",
-               s);
-          qh_errexit (qh_ERRinput, NULL, NULL);
-        }
-        return linecount;
-      }
-    }
-  }
-  fprintf (qh ferr, "qhull input error: only %d coordinates.  Could not read %d-d feasible point.\n",
-           tokcount, dim);
-  qh_errexit (qh_ERRinput, NULL, NULL);
-  return 0;
-} /* readfeasible */
-
-/*---------------------------------
-  
-  qh_readpoints( numpoints, dimension, ismalloc )
-    read points from qh.fin into qh.first_point, qh.num_points
-    qh.fin is lines of coordinates, one per vertex, first line number of points
-    if 'rbox D4',
-      gives message
-    if qh.ATinfinity,
-      adds point-at-infinity for Delaunay triangulations
-
-  returns:
-    number of points, array of point coordinates, dimension, ismalloc True
-    if qh.DELAUNAY & !qh.PROJECTinput, projects points to paraboloid
-        and clears qh.PROJECTdelaunay
-    if qh.HALFspace, reads optional feasible point, reads halfspaces,
-        converts to dual.
-
-  for feasible point in "cdd format" in 3-d:
-    3 1
-    coordinates
-    comments
-    begin
-    n 4 real/integer
-    ...
-    end
-
-  notes:
-    dimension will change in qh_initqhull_globals if qh.PROJECTinput
-    uses malloc() since qh_mem not initialized
-    FIXUP: this routine needs rewriting
-*/
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc) {
-  coordT *points, *coords, *infinity= NULL;
-  realT paraboloid, maxboloid= -REALmax, value;
-  realT *coordp= NULL, *offsetp= NULL, *normalp= NULL;
-  char *s, *t, firstline[qh_MAXfirst+1];
-  int diminput=0, numinput=0, dimfeasible= 0, newnum, k, tempi;
-  int firsttext=0, firstshort=0, firstlong=0, firstpoint=0;
-  int tokcount= 0, linecount=0, maxcount, coordcount=0;
-  boolT islong, isfirst= True, wasbegin= False;
-  boolT isdelaunay= qh DELAUNAY && !qh PROJECTinput;
-
-  if (qh CDDinput) {
-    while ((s= fgets(firstline, qh_MAXfirst, qh fin))) {
-      linecount++;
-      if (qh HALFspace && linecount == 1 && isdigit(*s)) {
-	dimfeasible= qh_strtol (s, &s);	
-	while (isspace(*s))
-          s++;
-        if (qh_strtol (s, &s) == 1)
-          linecount += qh_readfeasible (dimfeasible, s);
-        else
-          dimfeasible= 0;
-      }else if (!memcmp (firstline, "begin", 5) || !memcmp (firstline, "BEGIN", 5))
-        break;
-      else if (!*qh rbox_command)
-	strncat(qh rbox_command, s, sizeof (qh rbox_command)-1);
-    }
-    if (!s) {
-      fprintf (qh ferr, "qhull input error: missing \"begin\" for cdd-formated input\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-  }
-  while(!numinput && (s= fgets(firstline, qh_MAXfirst, qh fin))) {
-    linecount++;
-    if (!memcmp (s, "begin", 5) || !memcmp (s, "BEGIN", 5))
-      wasbegin= True;
-    while (*s) {
-      while (isspace(*s))
-        s++;
-      if (!*s)
-        break;
-      if (!isdigit(*s)) {
-        if (!*qh rbox_command) {
-          strncat(qh rbox_command, s, sizeof (qh rbox_command)-1);
-	  firsttext= linecount;
-        }
-        break;
-      }
-      if (!diminput) 
-        diminput= qh_strtol (s, &s);
-      else {
-        numinput= qh_strtol (s, &s);
-        if (numinput == 1 && diminput >= 2 && qh HALFspace && !qh CDDinput) {
-          linecount += qh_readfeasible (diminput, s); /* checks if ok */
-          dimfeasible= diminput;
-          diminput= numinput= 0;
-        }else 
-          break;
-      }
-    }
-  }
-  if (!s) {
-    fprintf(qh ferr, "qhull input error: short input file.  Did not find dimension and number of points\n");
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  if (diminput > numinput) {
-    tempi= diminput;	/* exchange dim and n, e.g., for cdd input format */
-    diminput= numinput;
-    numinput= tempi;
-  }
-  if (diminput < 2) {
-    fprintf(qh ferr,"qhull input error: dimension %d (first number) should be at least 2\n",
-	    diminput);
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  if (isdelaunay) {
-    qh PROJECTdelaunay= False;
-    if (qh CDDinput)
-      *dimension= diminput;
-    else
-      *dimension= diminput+1;
-    *numpoints= numinput;
-    if (qh ATinfinity)
-      (*numpoints)++;
-  }else if (qh HALFspace) {
-    *dimension= diminput - 1;
-    *numpoints= numinput;
-    if (diminput < 3) {
-      fprintf(qh ferr,"qhull input error: dimension %d (first number, includes offset) should be at least 3 for halfspaces\n",
-  	    diminput);
-      qh_errexit(qh_ERRinput, NULL, NULL);
-    }
-    if (dimfeasible) {
-      if (dimfeasible != *dimension) {
-        fprintf(qh ferr,"qhull input error: dimension %d of feasible point is not one less than dimension %d for halfspaces\n",
-          dimfeasible, diminput);
-        qh_errexit(qh_ERRinput, NULL, NULL);
-      }
-    }else 
-      qh_setfeasible (*dimension);
-  }else {
-    if (qh CDDinput) 
-      *dimension= diminput-1;
-    else
-      *dimension= diminput;
-    *numpoints= numinput;
-  }
-  qh normal_size= *dimension * sizeof(coordT); /* for tracing with qh_printpoint */
-  if (qh HALFspace) {
-    qh half_space= coordp= (coordT*) malloc (qh normal_size + sizeof(coordT));
-    if (qh CDDinput) {
-      offsetp= qh half_space;
-      normalp= offsetp + 1;
-    }else {
-      normalp= qh half_space;
-      offsetp= normalp + *dimension;
-    }
-  } 
-  qh maxline= diminput * (qh_REALdigits + 5);
-  maximize_(qh maxline, 500);
-  qh line= (char*)malloc ((qh maxline+1) * sizeof (char));
-  *ismalloc= True;  /* use malloc since memory not setup */
-  coords= points= qh temp_malloc= 
-        (coordT*)malloc((*numpoints)*(*dimension)*sizeof(coordT));
-  if (!coords || !qh line || (qh HALFspace && !qh half_space)) {
-    fprintf(qh ferr, "qhull error: insufficient memory to read %d points\n",
-	    numinput);
-    qh_errexit(qh_ERRmem, NULL, NULL);
-  }
-  if (isdelaunay && qh ATinfinity) {
-    infinity= points + numinput * (*dimension);
-    for (k= (*dimension) - 1; k--; )
-      infinity[k]= 0.0;
-  }
-  maxcount= numinput * diminput;
-  paraboloid= 0.0;
-  while ((s= (isfirst ?  s : fgets(qh line, qh maxline, qh fin)))) {
-    if (!isfirst) {
-      linecount++;
-      if (*s == 'e' || *s == 'E') {
-	if (!memcmp (s, "end", 3) || !memcmp (s, "END", 3)) {
-	  if (qh CDDinput )
-	    break;
-	  else if (wasbegin) 
-	    fprintf (qh ferr, "qhull input warning: the input appears to be in cdd format.  If so, use 'Fd'\n");
-	}
-      }
-    }
-    islong= False;
-    while (*s) {
-      while (isspace(*s))
-        s++;
-      value= qh_strtod (s, &t);
-      if (s == t) {
-        if (!*qh rbox_command)
- 	 strncat(qh rbox_command, s, sizeof (qh rbox_command)-1);
-        if (*s && !firsttext) 
-          firsttext= linecount;
-        if (!islong && !firstshort && coordcount)
-          firstshort= linecount;
-        break;
-      }
-      if (!firstpoint)
-	firstpoint= linecount;
-      s= t;
-      if (++tokcount > maxcount)
-        continue;
-      if (qh HALFspace) {
-	if (qh CDDinput) 
-	  *(coordp++)= -value; /* both coefficients and offset */
-	else
-	  *(coordp++)= value;
-      }else {
-        *(coords++)= value;
-        if (qh CDDinput && !coordcount) {
-          if (value != 1.0) {
-            fprintf (qh ferr, "qhull input error: for cdd format, point at line %d does not start with '1'\n",
-                   linecount);
-            qh_errexit (qh_ERRinput, NULL, NULL);
-          }
-          coords--;
-        }else if (isdelaunay) {
-	  paraboloid += value * value;
-	  if (qh ATinfinity) {
-	    if (qh CDDinput)
-	      infinity[coordcount-1] += value;
-	    else
-	      infinity[coordcount] += value;
-	  }
-	}
-      }
-      if (++coordcount == diminput) {
-        coordcount= 0;
-        if (isdelaunay) {
-          *(coords++)= paraboloid;
-          maximize_(maxboloid, paraboloid);
-          paraboloid= 0.0;
-        }else if (qh HALFspace) {
-          if (!qh_sethalfspace (*dimension, coords, &coords, normalp, offsetp, qh feasible_point)) {
-	    fprintf (qh ferr, "The halfspace was on line %d\n", linecount);
-	    if (wasbegin)
-	      fprintf (qh ferr, "The input appears to be in cdd format.  If so, you should use option 'Fd'\n");
-	    qh_errexit (qh_ERRinput, NULL, NULL);
-	  }
-          coordp= qh half_space;
-        }          
-        while (isspace(*s))
-          s++;
-        if (*s) {
-          islong= True;
-          if (!firstlong)
-            firstlong= linecount;
-	}
-      }
-    }
-    if (!islong && !firstshort && coordcount)
-      firstshort= linecount;
-    if (!isfirst && s - qh line >= qh maxline) {
-      fprintf(qh ferr, "qhull input error: line %d contained more than %d characters\n", 
-	      linecount, (int) (s - qh line));
-      qh_errexit(qh_ERRinput, NULL, NULL);
-    }
-    isfirst= False;
-  }
-  if (tokcount != maxcount) {
-    newnum= fmin_(numinput, tokcount/diminput);
-    fprintf(qh ferr,"\
-qhull warning: instead of %d %d-dimensional points, input contains\n\
-%d points and %d extra coordinates.  Line %d is the first\npoint",
-       numinput, diminput, tokcount/diminput, tokcount % diminput, firstpoint);
-    if (firsttext)
-      fprintf(qh ferr, ", line %d is the first comment", firsttext);
-    if (firstshort)
-      fprintf(qh ferr, ", line %d is the first short\nline", firstshort);
-    if (firstlong)
-      fprintf(qh ferr, ", line %d is the first long line", firstlong);
-    fprintf(qh ferr, ".  Continue with %d points.\n", newnum);
-    numinput= newnum;
-    if (isdelaunay && qh ATinfinity) {
-      for (k= tokcount % diminput; k--; )
-	infinity[k] -= *(--coords);
-      *numpoints= newnum+1;
-    }else {
-      coords -= tokcount % diminput;
-      *numpoints= newnum;
-    }
-  }
-  if (isdelaunay && qh ATinfinity) {
-    for (k= (*dimension) -1; k--; )
-      infinity[k] /= numinput;
-    if (coords == infinity)
-      coords += (*dimension) -1;
-    else {
-      for (k= 0; k < (*dimension) -1; k++)
-	*(coords++)= infinity[k];
-    }
-    *(coords++)= maxboloid * 1.1;
-  }
-  if (qh rbox_command[0]) {
-    qh rbox_command[strlen(qh rbox_command)-1]= '\0';
-    if (!strcmp (qh rbox_command, "./rbox D4")) 
-      fprintf (qh ferr, "\n\
-This is the qhull test case.  If any errors or core dumps occur,\n\
-recompile qhull with 'make new'.  If errors still occur, there is\n\
-an incompatibility.  You should try a different compiler.  You can also\n\
-change the choices in user.h.  If you discover the source of the problem,\n\
-please send mail to qhull_bug@geom.umn.edu.\n\
-\n\
-Type 'qhull' for a short list of options.\n");
-  }
-  free (qh line);
-  qh line= NULL;
-  if (qh half_space) {
-    free (qh half_space);
-    qh half_space= NULL;
-  }
-  qh temp_malloc= NULL;
-  trace1((qh ferr,"qh_readpoints: read in %d %d-dimensional points\n",
-	  numinput, diminput));
-  return(points);
-} /* readpoints */
-
-
-/*---------------------------------
-  
-  qh_setfeasible( dim )
-    set qh.FEASIBLEpoint from qh.feasible_string in "n,n,n" or "n n n" format
-
-  notes:
-    "n,n,n" already checked by qh_initflags()
-    see qh_readfeasible()
-*/
-void qh_setfeasible (int dim) {
-  int tokcount= 0;
-  char *s;
-  coordT *coords, value;
-
-  if (!(s= qh feasible_string)) {
-    fprintf(qh ferr, "\
-qhull input error: halfspace intersection needs a feasible point.\n\
-Either prepend the input with 1 point or use 'Hn,n,n'.  See manual.\n");
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  if (!(qh feasible_point= (pointT*)malloc (dim* sizeof(coordT)))) {
-    fprintf(qh ferr, "qhull error: insufficient memory for 'Hn,n,n'\n");
-    qh_errexit(qh_ERRmem, NULL, NULL);
-  }
-  coords= qh feasible_point;
-  while (*s) {
-    value= qh_strtod (s, &s);
-    if (++tokcount > dim) {
-      fprintf (qh ferr, "qhull input warning: more coordinates for 'H%s' than dimension %d\n",
-          qh feasible_string, dim);
-      break;
-    }
-    *(coords++)= value;
-    if (*s)
-      s++;
-  }
-  while (++tokcount <= dim)    
-    *(coords++)= 0.0;
-} /* setfeasible */
-
-/*---------------------------------
-  
-  qh_skipfacet( facet )
-    returns 'True' if this facet is not to be printed 
-
-  notes:
-    based on the user provided slice thresholds and 'good' specifications
-*/
-boolT qh_skipfacet(facetT *facet) {
-  facetT *neighbor, **neighborp;
-
-  if (qh PRINTneighbors) {
-    if (facet->good)
-      return !qh PRINTgood;
-    FOREACHneighbor_(facet) {
-      if (neighbor->good)
-	return False;
-    }
-    return True;
-  }else if (qh PRINTgood)
-    return !facet->good;
-  else if (!facet->normal)
-    return True;
-  return (!qh_inthresholds (facet->normal, NULL));
-} /* skipfacet */
-
diff --git a/extern/qhull/src/io.h b/extern/qhull/src/io.h
deleted file mode 100644
index 351d56b3708..00000000000
--- a/extern/qhull/src/io.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
  ---------------------------------
-
-   io.h 
-   declarations of Input/Output functions
-
-   see README, qhull.h and io.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFio
-#define qhDEFio 1
-
-/*============ constants and flags ==================*/
-
-/*----------------------------------
-  
-  qh_MAXfirst
-    maximum length of first two lines of stdin
-*/
-#define qh_MAXfirst  200
-
-/*----------------------------------
-  
-  qh_MINradius
-    min radius for Gp and Gv, fraction of maxcoord
-*/
-#define qh_MINradius 0.02
-
-/*----------------------------------
-  
-  qh_GEOMepsilon
-    adjust outer planes for 'lines closer' and geomview roundoff.  
-    This prevents bleed through.
-*/
-#define qh_GEOMepsilon 2e-3
-
-/*----------------------------------
-  
-  qh_WHITESPACE
-    possible values of white space
-*/
-#define qh_WHITESPACE " \n\t\v\r\f"
-
-
-/*----------------------------------
-  
-  qh_RIDGE
-    to select which ridges to print in qh_eachvoronoi
-*/
-typedef enum
-{
-    qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
-}
-qh_RIDGE;
-
-/*----------------------------------
-  
-  printvridgeT
-    prints results of qh_printvdiagram
-
-  see:
-    qh_printvridge for an example
-*/
-typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-
-/*============== -prototypes in alphabetical order =========*/
-
-void    dfacet( unsigned id);
-void    dvertex( unsigned id);
-void    qh_countfacets (facetT *facetlist, setT *facets, boolT printall, 
-              int *numfacetsp, int *numsimplicialp, int *totneighborsp, 
-              int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
-pointT *qh_detvnorm (vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
-setT   *qh_detvridge (vertexT *vertex);
-setT   *qh_detvridge3 (vertexT *atvertex, vertexT *vertex);
-int     qh_eachvoronoi (FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
-int     qh_eachvoronoi_all (FILE *fp, printvridgeT printvridge, boolT isupper, qh_RIDGE innerouter, boolT inorder);
-void	qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
-setT   *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-void    qh_geomplanes (facetT *facet, realT *outerplane, realT *innerplane);
-void    qh_markkeep (facetT *facetlist);
-setT   *qh_markvoronoi (facetT *facetlist, setT *facets, boolT printall, boolT *islowerp, int *numcentersp);
-void    qh_order_vertexneighbors(vertexT *vertex);
-void	qh_printafacet(FILE *fp, int format, facetT *facet, boolT printall);
-void    qh_printbegin (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void 	qh_printcenter (FILE *fp, int format, char *string, facetT *facet);
-void    qh_printcentrum (FILE *fp, facetT *facet, realT radius);
-void    qh_printend (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void    qh_printend4geom (FILE *fp, facetT *facet, int *num, boolT printall);
-void    qh_printextremes (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void    qh_printextremes_2d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void    qh_printextremes_d (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void	qh_printfacet(FILE *fp, facetT *facet);
-void	qh_printfacet2math(FILE *fp, facetT *facet, int notfirst);
-void	qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
-void    qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
-			       facetT *facet, realT offset, realT color[3]);
-void	qh_printfacet3math (FILE *fp, facetT *facet, int notfirst);
-void	qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
-void	qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacet3vertex(FILE *fp, facetT *facet, int format);
-void	qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
-void	qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, int format);
-void	qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, int format);
-void    qh_printfacetheader(FILE *fp, facetT *facet);
-void    qh_printfacetridges(FILE *fp, facetT *facet);
-void	qh_printfacets(FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void	qh_printhelp_degenerate(FILE *fp);
-void	qh_printhelp_singular(FILE *fp);
-void	qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
-  		   setT *vertices, realT color[3]);
-void	qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void    qh_printline3geom (FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
-void	qh_printpoint(FILE *fp, char *string, pointT *point);
-void	qh_printpointid(FILE *fp, char *string, int dim, pointT *point, int id);
-void    qh_printpoint3 (FILE *fp, pointT *point);
-void    qh_printpoints_out (FILE *fp, facetT *facetlist, setT *facets, int printall);
-void    qh_printpointvect (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
-void    qh_printpointvect2 (FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
-void	qh_printridge(FILE *fp, ridgeT *ridge);
-void    qh_printspheres(FILE *fp, setT *vertices, realT radius);
-void    qh_printvdiagram (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-int     qh_printvdiagram2 (FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
-void	qh_printvertex(FILE *fp, vertexT *vertex);
-void	qh_printvertexlist (FILE *fp, char* string, facetT *facetlist,
-                         setT *facets, boolT printall);
-void	qh_printvertices (FILE *fp, char* string, setT *vertices);
-void    qh_printvneighbors (FILE *fp, facetT* facetlist, setT *facets, boolT printall);
-void    qh_printvoronoi (FILE *fp, int format, facetT *facetlist, setT *facets, boolT printall);
-void    qh_printvnorm (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void    qh_printvridge (FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
-void	qh_produce_output(void);
-void    qh_projectdim3 (pointT *source, pointT *destination);
-int     qh_readfeasible (int dim, char *remainder);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-void    qh_setfeasible (int dim);
-boolT	qh_skipfacet(facetT *facet);
-
-#endif /* qhDEFio */
diff --git a/extern/qhull/src/mem.c b/extern/qhull/src/mem.c
deleted file mode 100644
index 72934626684..00000000000
--- a/extern/qhull/src/mem.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
  ---------------------------------
-
-  mem.c 
-    memory management routines for qhull
-
-  This is a standalone program.
-   
-  To initialize memory:
-
-    qh_meminit (stderr);  
-    qh_meminitbuffers (qh IStracing, qh_MEMalign, 7, qh_MEMbufsize,qh_MEMinitbuf);
-    qh_memsize(sizeof(facetT));
-    qh_memsize(sizeof(facetT));
-    ...
-    qh_memsetup();
-    
-  To free up all memory buffers:
-    qh_memfreeshort (&curlong, &totlong);
-         
-  if qh_NOmem, 
-    malloc/free is used instead of mem.c
-
-  notes: 
-    uses Quickfit algorithm (freelists for commonly allocated sizes)
-    assumes small sizes for freelists (it discards the tail of memory buffers)
-   
-  see:
-    qh-mem.htm and mem.h
-    global.c (qh_initbuffers) for an example of using mem.c 
-   
-  copyright (c) 1993-2002 The Geometry Center
-*/
-
-#include 
-#include 
-#include 
-#include "mem.h"
-
-#ifndef qhDEFqhull
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-void    qh_errexit(int exitcode, facetT *, ridgeT *);
-#endif
-
-/*============ -global data structure ==============
-    see mem.h for definition
-*/
-
-qhmemT qhmem= {0};     /* remove "= {0}" if this causes a compiler error */
-
-#ifndef qh_NOmem
-
-/*============= internal functions ==============*/
-  
-static int qh_intcompare(const void *i, const void *j);
-
-/*========== functions in alphabetical order ======== */
-
-/*---------------------------------
-  
-  qh_intcompare( i, j )
-    used by qsort and bsearch to compare two integers
-*/
-static int qh_intcompare(const void *i, const void *j) {
-  return(*((int *)i) - *((int *)j));
-} /* intcompare */
-
-
-/*----------------------------------
-   
-  qh_memalloc( insize )  
-    returns object of insize bytes
-    qhmem is the global memory structure 
-    
-  returns:
-    pointer to allocated memory 
-    errors if insufficient memory
-
-  notes:
-    use explicit type conversion to avoid type warnings on some compilers
-    actual object may be larger than insize
-    use qh_memalloc_() for inline code for quick allocations
-    logs allocations if 'T5'
-  
-  design:
-    if size < qhmem.LASTsize
-      if qhmem.freelists[size] non-empty
-        return first object on freelist
-      else
-        round up request to size of qhmem.freelists[size]
-        allocate new allocation buffer if necessary
-        allocate object from allocation buffer
-    else
-      allocate object with malloc()
-*/
-void *qh_memalloc(int insize) {
-  void **freelistp, *newbuffer;
-  int index, size;
-  int outsize, bufsize;
-  void *object;
-
-  if ((unsigned) insize <= (unsigned) qhmem.LASTsize) {
-    index= qhmem.indextable[insize];
-    freelistp= qhmem.freelists+index;
-    if ((object= *freelistp)) {
-      qhmem.cntquick++;  
-      *freelistp= *((void **)*freelistp);  /* replace freelist with next object */
-      return (object);
-    }else {
-      outsize= qhmem.sizetable[index];
-      qhmem.cntshort++;
-      if (outsize > qhmem .freesize) {
-	if (!qhmem.curbuffer)
-	  bufsize= qhmem.BUFinit;
-        else
-	  bufsize= qhmem.BUFsize;
-        qhmem.totshort += bufsize;
-	if (!(newbuffer= malloc(bufsize))) {
-	  fprintf(qhmem.ferr, "qhull error (qh_memalloc): insufficient memory\n");
-	  qh_errexit(qhmem_ERRmem, NULL, NULL);
-	} 
-	*((void **)newbuffer)= qhmem.curbuffer;  /* prepend newbuffer to curbuffer 
-						    list */
-	qhmem.curbuffer= newbuffer;
-        size= (sizeof(void **) + qhmem.ALIGNmask) & ~qhmem.ALIGNmask;
-	qhmem.freemem= (void *)((char *)newbuffer+size);
-	qhmem.freesize= bufsize - size;
-      }
-      object= qhmem.freemem;
-      qhmem.freemem= (void *)((char *)qhmem.freemem + outsize);
-      qhmem.freesize -= outsize;
-      return object;
-    }
-  }else {                     /* long allocation */
-    if (!qhmem.indextable) {
-      fprintf (qhmem.ferr, "qhull internal error (qh_memalloc): qhmem has not been initialized.\n");
-      qh_errexit(qhmem_ERRqhull, NULL, NULL);
-    }
-    outsize= insize;
-    qhmem .cntlong++;
-    qhmem .curlong++;
-    qhmem .totlong += outsize;
-    if (qhmem.maxlong < qhmem.totlong)
-      qhmem.maxlong= qhmem.totlong;
-    if (!(object= malloc(outsize))) {
-      fprintf(qhmem.ferr, "qhull error (qh_memalloc): insufficient memory\n");
-      qh_errexit(qhmem_ERRmem, NULL, NULL);
-    }
-    if (qhmem.IStracing >= 5)
-      fprintf (qhmem.ferr, "qh_memalloc long: %d bytes at %p\n", outsize, object);
-  }
-  return (object);
-} /* memalloc */
-
-
-/*----------------------------------
-   
-  qh_memfree( object, size ) 
-    free up an object of size bytes
-    size is insize from qh_memalloc
-
-  notes:
-    object may be NULL
-    type checking warns if using (void **)object
-    use qh_memfree_() for quick free's of small objects
- 
-  design:
-    if size <= qhmem.LASTsize
-      append object to corresponding freelist
-    else
-      call free(object)
-*/
-void qh_memfree(void *object, int size) {
-  void **freelistp;
-
-  if (!object)
-    return;
-  if (size <= qhmem.LASTsize) {
-    qhmem .freeshort++;
-    freelistp= qhmem.freelists + qhmem.indextable[size];
-    *((void **)object)= *freelistp;
-    *freelistp= object;
-  }else {
-    qhmem .freelong++;
-    qhmem .totlong -= size;
-    free (object);
-    if (qhmem.IStracing >= 5)
-      fprintf (qhmem.ferr, "qh_memfree long: %d bytes at %p\n", size, object);
-  }
-} /* memfree */
-
-
-/*---------------------------------
-  
-  qh_memfreeshort( curlong, totlong )
-    frees up all short and qhmem memory allocations
-
-  returns:
-    number and size of current long allocations
-*/
-void qh_memfreeshort (int *curlong, int *totlong) {
-  void *buffer, *nextbuffer;
-
-  *curlong= qhmem .cntlong - qhmem .freelong;
-  *totlong= qhmem .totlong;
-  for(buffer= qhmem.curbuffer; buffer; buffer= nextbuffer) {
-    nextbuffer= *((void **) buffer);
-    free(buffer);
-  }
-  qhmem.curbuffer= NULL;
-  if (qhmem .LASTsize) {
-    free (qhmem .indextable);
-    free (qhmem .freelists);
-    free (qhmem .sizetable);
-  }
-  memset((char *)&qhmem, 0, sizeof qhmem);  /* every field is 0, FALSE, NULL */
-} /* memfreeshort */
-
-
-/*----------------------------------
-   
-  qh_meminit( ferr )
-    initialize qhmem and test sizeof( void*)
-*/
-void qh_meminit (FILE *ferr) {
-  
-  memset((char *)&qhmem, 0, sizeof qhmem);  /* every field is 0, FALSE, NULL */
-  qhmem.ferr= ferr;
-  if (sizeof(void*) < sizeof(int)) {
-    fprintf (ferr, "qhull internal error (qh_meminit): sizeof(void*) < sizeof(int).  qset.c will not work\n");
-    exit (1);  /* can not use qh_errexit() */
-  }
-} /* meminit */
-
-/*---------------------------------
-  
-  qh_meminitbuffers( tracelevel, alignment, numsizes, bufsize, bufinit )
-    initialize qhmem
-    if tracelevel >= 5, trace memory allocations
-    alignment= desired address alignment for memory allocations
-    numsizes= number of freelists
-    bufsize=  size of additional memory buffers for short allocations
-    bufinit=  size of initial memory buffer for short allocations
-*/
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes, int bufsize, int bufinit) {
-
-  qhmem.IStracing= tracelevel;
-  qhmem.NUMsizes= numsizes;
-  qhmem.BUFsize= bufsize;
-  qhmem.BUFinit= bufinit;
-  qhmem.ALIGNmask= alignment-1;
-  if (qhmem.ALIGNmask & ~qhmem.ALIGNmask) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_meminit): memory alignment %d is not a power of 2\n", alignment);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  qhmem.sizetable= (int *) calloc (numsizes, sizeof(int));
-  qhmem.freelists= (void **) calloc (numsizes, sizeof(void *));
-  if (!qhmem.sizetable || !qhmem.freelists) {
-    fprintf(qhmem.ferr, "qhull error (qh_meminit): insufficient memory\n");
-    qh_errexit (qhmem_ERRmem, NULL, NULL);
-  }
-  if (qhmem.IStracing >= 1)
-    fprintf (qhmem.ferr, "qh_meminitbuffers: memory initialized with alignment %d\n", alignment);
-} /* meminitbuffers */
-
-/*---------------------------------
-  
-  qh_memsetup()
-    set up memory after running memsize()
-*/
-void qh_memsetup (void) {
-  int k,i;
-
-  qsort(qhmem.sizetable, qhmem.TABLEsize, sizeof(int), qh_intcompare);
-  qhmem.LASTsize= qhmem.sizetable[qhmem.TABLEsize-1];
-  if (qhmem .LASTsize >= qhmem .BUFsize || qhmem.LASTsize >= qhmem .BUFinit) {
-    fprintf (qhmem.ferr, "qhull error (qh_memsetup): largest mem size %d is >= buffer size %d or initial buffer size %d\n",
-            qhmem .LASTsize, qhmem .BUFsize, qhmem .BUFinit);
-    qh_errexit(qhmem_ERRmem, NULL, NULL);
-  }
-  if (!(qhmem.indextable= (int *)malloc((qhmem.LASTsize+1) * sizeof(int)))) {
-    fprintf(qhmem.ferr, "qhull error (qh_memsetup): insufficient memory\n");
-    qh_errexit(qhmem_ERRmem, NULL, NULL);
-  }
-  for(k=qhmem.LASTsize+1; k--; )
-    qhmem.indextable[k]= k;
-  i= 0;
-  for(k= 0; k <= qhmem.LASTsize; k++) {
-    if (qhmem.indextable[k] <= qhmem.sizetable[i])
-      qhmem.indextable[k]= i;
-    else
-      qhmem.indextable[k]= ++i;
-  }
-} /* memsetup */
-
-/*---------------------------------
-  
-  qh_memsize( size )
-    define a free list for this size
-*/
-void qh_memsize(int size) {
-  int k;
-
-  if (qhmem .LASTsize) {
-    fprintf (qhmem .ferr, "qhull error (qh_memsize): called after qhmem_setup\n");
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  size= (size + qhmem.ALIGNmask) & ~qhmem.ALIGNmask;
-  for(k= qhmem.TABLEsize; k--; ) {
-    if (qhmem.sizetable[k] == size)
-      return;
-  }
-  if (qhmem.TABLEsize < qhmem.NUMsizes)
-    qhmem.sizetable[qhmem.TABLEsize++]= size;
-  else
-    fprintf(qhmem.ferr, "qhull warning (memsize): free list table has room for only %d sizes\n", qhmem.NUMsizes);
-} /* memsize */
-
-
-/*---------------------------------
-  
-  qh_memstatistics( fp )
-    print out memory statistics
-
-  notes:
-    does not account for wasted memory at the end of each block
-*/
-void qh_memstatistics (FILE *fp) {
-  int i, count, totfree= 0;
-  void *object;
-  
-  for (i=0; i < qhmem.TABLEsize; i++) {
-    count=0;
-    for (object= qhmem .freelists[i]; object; object= *((void **)object))
-      count++;
-    totfree += qhmem.sizetable[i] * count;
-  }
-  fprintf (fp, "\nmemory statistics:\n\
-%7d quick allocations\n\
-%7d short allocations\n\
-%7d long allocations\n\
-%7d short frees\n\
-%7d long frees\n\
-%7d bytes of short memory in use\n\
-%7d bytes of short memory in freelists\n\
-%7d bytes of long memory allocated (except for input)\n\
-%7d bytes of long memory in use (in %d pieces)\n\
-%7d bytes per memory buffer (initially %d bytes)\n",
-	   qhmem .cntquick, qhmem.cntshort, qhmem.cntlong,
-	   qhmem .freeshort, qhmem.freelong, 
-	   qhmem .totshort - qhmem .freesize - totfree,
-	   totfree,
-	   qhmem .maxlong, qhmem .totlong, qhmem .cntlong - qhmem .freelong,
-	   qhmem .BUFsize, qhmem .BUFinit);
-  if (qhmem.cntlarger) {
-    fprintf (fp, "%7d calls to qh_setlarger\n%7.2g     average copy size\n",
-	   qhmem.cntlarger, ((float) qhmem.totlarger)/ qhmem.cntlarger);
-    fprintf (fp, "  freelists (bytes->count):");
-  }
-  for (i=0; i < qhmem.TABLEsize; i++) {
-    count=0;
-    for (object= qhmem .freelists[i]; object; object= *((void **)object))
-      count++;
-    fprintf (fp, " %d->%d", qhmem.sizetable[i], count);
-  }
-  fprintf (fp, "\n\n");
-} /* memstatistics */
-
-
-/*---------------------------------
-  
-  qh_NOmem
-    turn off quick-fit memory allocation
-
-  notes:
-    uses malloc() and free() instead
-*/
-#else /* qh_NOmem */
-
-void *qh_memalloc(int insize) {
-  void *object;
-
-  if (!(object= malloc(insize))) {
-    fprintf(qhmem.ferr, "qhull error (qh_memalloc): insufficient memory\n");
-    qh_errexit(qhmem_ERRmem, NULL, NULL);
-  }
-  if (qhmem.IStracing >= 5)
-    fprintf (qhmem.ferr, "qh_memalloc long: %d bytes at %p\n", insize, object);
-  return object;
-}
-
-void qh_memfree(void *object, int size) {
-
-  if (!object)
-    return;
-  free (object);
-  if (qhmem.IStracing >= 5)
-    fprintf (qhmem.ferr, "qh_memfree long: %d bytes at %p\n", size, object);
-}
-
-void qh_memfreeshort (int *curlong, int *totlong) {
-
-  memset((char *)&qhmem, 0, sizeof qhmem);  /* every field is 0, FALSE, NULL */
-  *curlong= 0;
-  *totlong= 0;
-}
-
-void qh_meminit (FILE *ferr) {
-
-  memset((char *)&qhmem, 0, sizeof qhmem);  /* every field is 0, FALSE, NULL */
-  qhmem.ferr= ferr;
-  if (sizeof(void*) < sizeof(int)) {
-    fprintf (ferr, "qhull internal error (qh_meminit): sizeof(void*) < sizeof(int).  qset.c will not work\n");
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-}
-
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes, int bufsize, int bufinit) {
-
-  qhmem.IStracing= tracelevel;
-
-}
-
-void qh_memsetup (void) {
-
-}
-
-void qh_memsize(int size) {
-
-}
-
-void qh_memstatistics (FILE *fp) {
-
-}
-
-#endif /* qh_NOmem */
diff --git a/extern/qhull/src/mem.h b/extern/qhull/src/mem.h
deleted file mode 100644
index e9ebd1bb9bc..00000000000
--- a/extern/qhull/src/mem.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
  ---------------------------------
-
-   mem.h 
-     prototypes for memory management functions
-
-   see qh-mem.htm, mem.c and qset.h
-
-   for error handling, writes message and calls
-     qh_errexit (qhmem_ERRmem, NULL, NULL) if insufficient memory
-       and
-     qh_errexit (qhmem_ERRqhull, NULL, NULL) otherwise
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmem
-#define qhDEFmem
-
-/*---------------------------------
-  
-  qh_NOmem
-    turn off quick-fit memory allocation
-
-  notes:
-    mem.c implements Quickfit memory allocation for about 20% time
-    savings.  If it fails on your machine, try to locate the
-    problem, and send the answer to qhull@geom.umn.edu.  If this can
-    not be done, define qh_NOmem to use malloc/free instead.
-
-   #define qh_NOmem
-*/
-
-/*-------------------------------------------
-    to avoid bus errors, memory allocation must consider alignment requirements.
-    malloc() automatically takes care of alignment.   Since mem.c manages
-    its own memory, we need to explicitly specify alignment in
-    qh_meminitbuffers().
-
-    A safe choice is sizeof(double).  sizeof(float) may be used if doubles 
-    do not occur in data structures and pointers are the same size.  Be careful
-    of machines (e.g., DEC Alpha) with large pointers.  If gcc is available, 
-    use __alignof__(double) or fmax_(__alignof__(float), __alignof__(void *)).
-
-   see qh_MEMalign in user.h for qhull's alignment
-*/
-
-#define qhmem_ERRmem 4    /* matches qh_ERRmem in qhull.h */
-#define qhmem_ERRqhull 5  /* matches qh_ERRqhull in qhull.h */
-
-/*----------------------------------
-  
-  ptr_intT
-    for casting a void* to an integer-type
-  
-  notes:
-    On 64-bit machines, a pointer may be larger than an 'int'.  
-    qh_meminit() checks that 'long' holds a 'void*'
-*/
-typedef unsigned long ptr_intT;
-
-/*----------------------------------
- 
-  qhmemT
-    global memory structure for mem.c
- 
- notes:
-   users should ignore qhmem except for writing extensions
-   qhmem is allocated in mem.c 
-   
-   qhmem could be swapable like qh and qhstat, but then
-   multiple qh's and qhmem's would need to keep in synch.  
-   A swapable qhmem would also waste memory buffers.  As long
-   as memory operations are atomic, there is no problem with
-   multiple qh structures being active at the same time.
-   If you need separate address spaces, you can swap the
-   contents of qhmem.
-*/
-typedef struct qhmemT qhmemT;
-extern qhmemT qhmem; 
-
-struct qhmemT {               /* global memory management variables */
-  int      BUFsize;	      /* size of memory allocation buffer */
-  int      BUFinit;	      /* initial size of memory allocation buffer */
-  int      TABLEsize;         /* actual number of sizes in free list table */
-  int      NUMsizes;          /* maximum number of sizes in free list table */
-  int      LASTsize;          /* last size in free list table */
-  int      ALIGNmask;         /* worst-case alignment, must be 2^n-1 */
-  void	 **freelists;          /* free list table, linked by offset 0 */
-  int     *sizetable;         /* size of each freelist */
-  int     *indextable;        /* size->index table */
-  void    *curbuffer;         /* current buffer, linked by offset 0 */
-  void    *freemem;           /*   free memory in curbuffer */
-  int 	   freesize;          /*   size of free memory in bytes */
-  void 	  *tempstack;         /* stack of temporary memory, managed by users */
-  FILE    *ferr;              /* file for reporting errors */
-  int      IStracing;         /* =5 if tracing memory allocations */
-  int      cntquick;          /* count of quick allocations */
-                              /* remove statistics doesn't effect speed */
-  int      cntshort;          /* count of short allocations */
-  int      cntlong;           /* count of long allocations */
-  int      curlong;           /* current count of inuse, long allocations */
-  int      freeshort;	      /* count of short memfrees */
-  int      freelong;	      /* count of long memfrees */
-  int      totshort;          /* total size of short allocations */
-  int      totlong;           /* total size of long allocations */
-  int      maxlong;           /* maximum totlong */
-  int      cntlarger;         /* count of setlarger's */
-  int      totlarger;         /* total copied by setlarger */
-};
-
-
-/*==================== -macros ====================*/
-
-/*----------------------------------
-   
-  qh_memalloc_(size, object, type)  
-    returns object of size bytes 
-	assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-
-#ifdef qh_NOmem
-#define qh_memalloc_(size, freelistp, object, type) {\
-  object= (type*)qh_memalloc (size); }
-#else /* !qh_NOmem */
-
-#define qh_memalloc_(size, freelistp, object, type) {\
-  freelistp= qhmem.freelists + qhmem.indextable[size];\
-  if ((object= (type*)*freelistp)) {\
-    qhmem.cntquick++;  \
-    *freelistp= *((void **)*freelistp);\
-  }else object= (type*)qh_memalloc (size);}
-#endif
-
-/*----------------------------------
-   
-  qh_memfree_(object, size) 
-    free up an object
-
-  notes:
-    object may be NULL
-    assumes size<=qhmem.LASTsize and void **freelistp is a temp
-*/
-#ifdef qh_NOmem
-#define qh_memfree_(object, size, freelistp) {\
-  qh_memfree (object, size); }
-#else /* !qh_NOmem */
-
-#define qh_memfree_(object, size, freelistp) {\
-  if (object) { \
-    qhmem .freeshort++;\
-    freelistp= qhmem.freelists + qhmem.indextable[size];\
-    *((void **)object)= *freelistp;\
-    *freelistp= object;}}
-#endif
-
-/*=============== prototypes in alphabetical order ============*/
-
-void *qh_memalloc(int insize);
-void qh_memfree (void *object, int size);
-void qh_memfreeshort (int *curlong, int *totlong);
-void qh_meminit (FILE *ferr);
-void qh_meminitbuffers (int tracelevel, int alignment, int numsizes,
-			int bufsize, int bufinit);
-void qh_memsetup (void);
-void qh_memsize(int size);
-void qh_memstatistics (FILE *fp);
-
-#endif /* qhDEFmem */
diff --git a/extern/qhull/src/merge.c b/extern/qhull/src/merge.c
deleted file mode 100644
index 34ecda1865f..00000000000
--- a/extern/qhull/src/merge.c
+++ /dev/null
@@ -1,3626 +0,0 @@
-/*
  ---------------------------------
-
-   merge.c 
-   merges non-convex facets
-
-   see qh-merge.htm and merge.h
-
-   other modules call qh_premerge() and qh_postmerge()
-
-   the user may call qh_postmerge() to perform additional merges.
-
-   To remove deleted facets and vertices (qhull() in qhull.c):
-     qh_partitionvisible (!qh_ALL, &numoutside);  // visible_list, newfacet_list
-     qh_deletevisible ();         // qh.visible_list
-     qh_resetlists (False, qh_RESETvisible);       // qh.visible_list newvertex_list newfacet_list 
-
-   assumes qh.CENTERtype= centrum
-
-   merges occur in qh_mergefacet and in qh_mergecycle
-   vertex->neighbors not set until the first merge occurs
-
-   copyright (c) 1993-2002 The Geometry Center        
-*/
-
-#include "qhull_a.h"
-
-#ifndef qh_NOmerge
-
-/*=========== internal prototypes =========*/
-
-static int qh_compareangle(const void *p1, const void *p2);
-static int qh_comparemerge(const void *p1, const void *p2);
-static int qh_comparevisit (const void *p1, const void *p2);
-
-																														
-/*===== functions (alphabetical after premerge and postmerge) ======*/
-
-/*---------------------------------
-  
-  qh_premerge( apex, maxcentrum )
-    pre-merge nonconvex facets in qh.newfacet_list for apex
-    maxcentrum defines coplanar and concave (qh_test_appendmerge)
-
-  returns:
-    deleted facets added to qh.visible_list with facet->visible set
-
-  notes:
-    uses globals, qh.MERGEexact, qh.PREmerge
-
-  design:
-    mark duplicate ridges in qh.newfacet_list
-    merge facet cycles in qh.newfacet_list
-    merge duplicate ridges and concave facets in qh.newfacet_list
-    check merged facet cycles for degenerate and redundant facets
-    merge degenerate and redundant facets
-    collect coplanar and concave facets
-    merge concave, coplanar, degenerate, and redundant facets
-*/
-void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle) {
-  boolT othermerge= False;
-  facetT *newfacet;
-  
-  if (qh ZEROcentrum && qh_checkzero(!qh_ALL))
-    return;    
-  trace2((qh ferr, "qh_premerge: premerge centrum %2.2g angle %2.2g for apex v%d facetlist f%d\n",
-	    maxcentrum, maxangle, apex->id, getid_(qh newfacet_list)));
-  if (qh IStracing >= 4 && qh num_facets < 50)
-    qh_printlists();
-  qh centrum_radius= maxcentrum;
-  qh cos_max= maxangle;
-  qh degen_mergeset= qh_settemp (qh TEMPsize);
-  qh facet_mergeset= qh_settemp (qh TEMPsize);
-  if (qh hull_dim >=3) { 
-    qh_mark_dupridges (qh newfacet_list); /* facet_mergeset */
-    qh_mergecycle_all (qh newfacet_list, &othermerge);
-    qh_forcedmerges (&othermerge /* qh facet_mergeset */); 
-    FORALLnew_facets {  /* test samecycle merges */
-      if (!newfacet->simplicial && !newfacet->mergeridge)
-	qh_degen_redundant_neighbors (newfacet, NULL);
-    }
-    if (qh_merge_degenredundant())
-      othermerge= True;
-  }else /* qh hull_dim == 2 */
-    qh_mergecycle_all (qh newfacet_list, &othermerge);
-  qh_flippedmerges (qh newfacet_list, &othermerge);
-  if (!qh MERGEexact || zzval_(Ztotmerge)) {
-    zinc_(Zpremergetot);
-    qh POSTmerging= False;
-    qh_getmergeset_initial (qh newfacet_list);
-    qh_all_merges (othermerge, False);
-  }
-  qh_settempfree(&qh facet_mergeset);
-  qh_settempfree(&qh degen_mergeset);
-} /* premerge */
-  
-/*---------------------------------
-  
-  qh_postmerge( reason, maxcentrum, maxangle, vneighbors )
-    post-merge nonconvex facets as defined by maxcentrum and maxangle
-    'reason' is for reporting progress
-    if vneighbors, 
-      calls qh_test_vneighbors at end of qh_all_merge 
-    if firstmerge, 
-      calls qh_reducevertices before qh_getmergeset
-
-  returns:
-    if first call (qh.visible_list != qh.facet_list), 
-      builds qh.facet_newlist, qh.newvertex_list
-    deleted facets added to qh.visible_list with facet->visible
-    qh.visible_list == qh.facet_list
-
-  notes:
-
-
-  design:
-    if first call
-      set qh.visible_list and qh.newfacet_list to qh.facet_list
-      add all facets to qh.newfacet_list
-      mark non-simplicial facets, facet->newmerge
-      set qh.newvertext_list to qh.vertex_list
-      add all vertices to qh.newvertex_list
-      if a pre-merge occured
-        set vertex->delridge {will retest the ridge}
-        if qh.MERGEexact
-          call qh_reducevertices()
-      if no pre-merging 
-        merge flipped facets
-    determine non-convex facets
-    merge all non-convex facets
-*/
-void qh_postmerge (char *reason, realT maxcentrum, realT maxangle, 
-                      boolT vneighbors) {
-  facetT *newfacet;
-  boolT othermerges= False;
-  vertexT *vertex;
-
-  if (qh REPORTfreq || qh IStracing) {
-    qh_buildtracing (NULL, NULL);
-    qh_printsummary (qh ferr);
-    if (qh PRINTstatistics) 
-      qh_printallstatistics (qh ferr, "reason");
-    fprintf (qh ferr, "\n%s with 'C%.2g' and 'A%.2g'\n", 
-        reason, maxcentrum, maxangle);
-  }
-  trace2((qh ferr, "qh_postmerge: postmerge.  test vneighbors? %d\n",
-	    vneighbors));
-  qh centrum_radius= maxcentrum;
-  qh cos_max= maxangle;
-  qh POSTmerging= True;
-  qh degen_mergeset= qh_settemp (qh TEMPsize);
-  qh facet_mergeset= qh_settemp (qh TEMPsize);
-  if (qh visible_list != qh facet_list) {  /* first call */
-    qh NEWfacets= True;
-    qh visible_list= qh newfacet_list= qh facet_list;
-    FORALLnew_facets {
-      newfacet->newfacet= True;
-       if (!newfacet->simplicial)
-        newfacet->newmerge= True;
-     zinc_(Zpostfacets);
-    }
-    qh newvertex_list= qh vertex_list;
-    FORALLvertices
-      vertex->newlist= True;
-    if (qh VERTEXneighbors) { /* a merge has occurred */
-      FORALLvertices
-	vertex->delridge= True; /* test for redundant, needed? */
-      if (qh MERGEexact) {
-	if (qh hull_dim <= qh_DIMreduceBuild)
-	  qh_reducevertices(); /* was skipped during pre-merging */
-      }
-    }
-    if (!qh PREmerge && !qh MERGEexact) 
-      qh_flippedmerges (qh newfacet_list, &othermerges);
-  }
-  qh_getmergeset_initial (qh newfacet_list);
-  qh_all_merges (False, vneighbors);
-  qh_settempfree(&qh facet_mergeset);
-  qh_settempfree(&qh degen_mergeset);
-} /* post_merge */
-
-/*---------------------------------
-  
-  qh_all_merges( othermerge, vneighbors )
-    merge all non-convex facets
-    
-    set othermerge if already merged facets (for qh_reducevertices)
-    if vneighbors
-      tests vertex neighbors for convexity at end
-    qh.facet_mergeset lists the non-convex ridges in qh_newfacet_list
-    qh.degen_mergeset is defined
-    if qh.MERGEexact && !qh.POSTmerging, 
-      does not merge coplanar facets
-
-  returns:
-    deleted facets added to qh.visible_list with facet->visible
-    deleted vertices added qh.delvertex_list with vertex->delvertex
-  
-  notes:
-    unless !qh.MERGEindependent, 
-      merges facets in independent sets
-    uses qh.newfacet_list as argument since merges call qh_removefacet()
-
-  design:
-    while merges occur
-      for each merge in qh.facet_mergeset
-        unless one of the facets was already merged in this pass
-          merge the facets
-        test merged facets for additional merges
-        add merges to qh.facet_mergeset
-      if vertices record neighboring facets
-        rename redundant vertices
-          update qh.facet_mergeset
-    if vneighbors ??
-      tests vertex neighbors for convexity at end
-*/
-void qh_all_merges (boolT othermerge, boolT vneighbors) {
-  facetT *facet1, *facet2;
-  mergeT *merge;
-  boolT wasmerge= True, isreduce;
-  void **freelistp;  /* used !qh_NOmem */
-  vertexT *vertex;
-  mergeType mergetype;
-  int numcoplanar=0, numconcave=0, numdegenredun= 0, numnewmerges= 0;
-  
-  trace2((qh ferr, "qh_all_merges: starting to merge facets beginning from f%d\n",
-	    getid_(qh newfacet_list)));
-  while (True) {
-    wasmerge= False;
-    while (qh_setsize (qh facet_mergeset)) {
-      while ((merge= (mergeT*)qh_setdellast(qh facet_mergeset))) {
-	facet1= merge->facet1;
-	facet2= merge->facet2;
-	mergetype= merge->type;
-	qh_memfree_(merge, sizeof(mergeT), freelistp);
-	if (facet1->visible || facet2->visible) /*deleted facet*/
-	  continue;  
-	if ((facet1->newfacet && !facet1->tested)
-	        || (facet2->newfacet && !facet2->tested)) {
-	  if (qh MERGEindependent && mergetype <= MRGanglecoplanar)
-	    continue;      /* perform independent sets of merges */
-	}
-	qh_merge_nonconvex (facet1, facet2, mergetype);
-        numdegenredun += qh_merge_degenredundant();
-        numnewmerges++;
-        wasmerge= True;
-	if (mergetype == MRGconcave)
-	  numconcave++;
-	else /* MRGcoplanar or MRGanglecoplanar */
-	  numcoplanar++;
-      } /* while setdellast */
-      if (qh POSTmerging && qh hull_dim <= qh_DIMreduceBuild 
-      && numnewmerges > qh_MAXnewmerges) {
-	numnewmerges= 0;
-	qh_reducevertices();  /* otherwise large post merges too slow */
-      }
-      qh_getmergeset (qh newfacet_list); /* facet_mergeset */
-    } /* while mergeset */
-    if (qh VERTEXneighbors) {
-      isreduce= False;
-      if (qh hull_dim >=4 && qh POSTmerging) {
-	FORALLvertices  
-	  vertex->delridge= True;
-	isreduce= True;
-      }
-      if ((wasmerge || othermerge) && (!qh MERGEexact || qh POSTmerging) 
-	  && qh hull_dim <= qh_DIMreduceBuild) {
-	othermerge= False;
-	isreduce= True;
-      }
-      if (isreduce) {
-	if (qh_reducevertices()) {
-	  qh_getmergeset (qh newfacet_list); /* facet_mergeset */
-	  continue;
-	}
-      }
-    }
-    if (vneighbors && qh_test_vneighbors(/* qh newfacet_list */)) 
-      continue;
-    break;
-  } /* while (True) */
-  if (qh CHECKfrequently && !qh MERGEexact) {
-    qh old_randomdist= qh RANDOMdist;
-    qh RANDOMdist= False;
-    qh_checkconvex (qh newfacet_list, qh_ALGORITHMfault);
-    /* qh_checkconnect (); [this is slow and it changes the facet order] */
-    qh RANDOMdist= qh old_randomdist;
-  }
-  trace1((qh ferr, "qh_all_merges: merged %d coplanar facets %d concave facets and %d degen or redundant facets.\n",
-    numcoplanar, numconcave, numdegenredun));
-  if (qh IStracing >= 4 && qh num_facets < 50)
-    qh_printlists ();
-} /* all_merges */
-
-
-/*---------------------------------
-  
-  qh_appendmergeset( facet, neighbor, mergetype, angle )
-    appends an entry to qh.facet_mergeset or qh.degen_mergeset
-
-    angle ignored if NULL or !qh.ANGLEmerge
-
-  returns:
-    merge appended to facet_mergeset or degen_mergeset
-      sets ->degenerate or ->redundant if degen_mergeset
-  
-  see:
-    qh_test_appendmerge()
-
-  design:
-    allocate merge entry
-    if regular merge
-      append to qh.facet_mergeset
-    else if degenerate merge and qh.facet_mergeset is all degenerate
-      append to qh.degen_mergeset 
-    else if degenerate merge
-      prepend to qh.degen_mergeset 
-    else if redundant merge
-      append to qh.degen_mergeset 
-*/
-void qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle) {
-  mergeT *merge, *lastmerge;
-  void **freelistp; /* used !qh_NOmem */
-
-  if (facet->redundant)
-    return;
-  if (facet->degenerate && mergetype == MRGdegen)
-    return;
-  qh_memalloc_(sizeof(mergeT), freelistp, merge, mergeT);
-  merge->facet1= facet;
-  merge->facet2= neighbor;
-  merge->type= mergetype;
-  if (angle && qh ANGLEmerge)
-    merge->angle= *angle;
-  if (mergetype < MRGdegen)
-    qh_setappend (&(qh facet_mergeset), merge);
-  else if (mergetype == MRGdegen) {
-    facet->degenerate= True;
-    if (!(lastmerge= (mergeT*)qh_setlast (qh degen_mergeset)) 
-    || lastmerge->type == MRGdegen)
-      qh_setappend (&(qh degen_mergeset), merge);
-    else
-      qh_setaddnth (&(qh degen_mergeset), 0, merge);
-  }else if (mergetype == MRGredundant) {
-    facet->redundant= True;
-    qh_setappend (&(qh degen_mergeset), merge);
-  }else /* mergetype == MRGmirror */ {
-    if (facet->redundant || neighbor->redundant) {
-      fprintf(qh ferr, "qhull error (qh_appendmergeset): facet f%d or f%d is already a mirrored facet\n",
-	   facet->id, neighbor->id);
-      qh_errexit2 (qh_ERRqhull, facet, neighbor);
-    }
-    if (!qh_setequal (facet->vertices, neighbor->vertices)) {
-      fprintf(qh ferr, "qhull error (qh_appendmergeset): mirrored facets f%d and f%d do not have the same vertices\n",
-	   facet->id, neighbor->id);
-      qh_errexit2 (qh_ERRqhull, facet, neighbor);
-    }
-    facet->redundant= True;
-    neighbor->redundant= True;
-    qh_setappend (&(qh degen_mergeset), merge);
-  }
-} /* appendmergeset */
-
-
-/*---------------------------------
-  
-  qh_basevertices( samecycle )
-    return temporary set of base vertices for samecycle
-    samecycle is first facet in the cycle
-    assumes apex is SETfirst_( samecycle->vertices )
-
-  returns:
-    vertices (settemp)
-    all ->seen are cleared
-
-  notes:
-    uses qh_vertex_visit;
-
-  design:
-    for each facet in samecycle
-      for each unseen vertex in facet->vertices
-        append to result  
-*/
-setT *qh_basevertices (facetT *samecycle) {
-  facetT *same;
-  vertexT *apex, *vertex, **vertexp;
-  setT *vertices= qh_settemp (qh TEMPsize);
-  
-  apex= SETfirstt_(samecycle->vertices, vertexT);
-  apex->visitid= ++qh vertex_visit;
-  FORALLsame_cycle_(samecycle) {
-    if (same->mergeridge)
-      continue;
-    FOREACHvertex_(same->vertices) {
-      if (vertex->visitid != qh vertex_visit) {
-        qh_setappend (&vertices, vertex);
-        vertex->visitid= qh vertex_visit;
-        vertex->seen= False;
-      }
-    }
-  }
-  trace4((qh ferr, "qh_basevertices: found %d vertices\n", 
-         qh_setsize (vertices)));
-  return vertices;
-} /* basevertices */
-
-/*---------------------------------
-  
-  qh_checkconnect()
-    check that new facets are connected
-    new facets are on qh.newfacet_list
-    
-  notes:
-    this is slow and it changes the order of the facets
-    uses qh.visit_id
-
-  design:
-    move first new facet to end of qh.facet_list
-    for all newly appended facets
-      append unvisited neighbors to end of qh.facet_list
-    for all new facets
-      report error if unvisited
-*/
-void qh_checkconnect (void /* qh newfacet_list */) {
-  facetT *facet, *newfacet, *errfacet= NULL, *neighbor, **neighborp;
-
-  facet= qh newfacet_list;
-  qh_removefacet (facet);
-  qh_appendfacet (facet);
-  facet->visitid= ++qh visit_id;
-  FORALLfacet_(facet) {
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid != qh visit_id) {
-        qh_removefacet (neighbor);
-        qh_appendfacet (neighbor);
-        neighbor->visitid= qh visit_id;
-      }
-    }
-  }
-  FORALLnew_facets {
-    if (newfacet->visitid == qh visit_id)
-      break;
-    fprintf(qh ferr, "qhull error: f%d is not attached to the new facets\n",
-         newfacet->id);
-    errfacet= newfacet;
-  }
-  if (errfacet)
-    qh_errexit (qh_ERRqhull, errfacet, NULL);
-} /* checkconnect */
-
-/*---------------------------------
-  
-  qh_checkzero( testall )
-    check that facets are clearly convex for qh.DISTround with qh.MERGEexact
-
-    if testall, 
-      test all facets for qh.MERGEexact post-merging
-    else 
-      test qh.newfacet_list
-      
-    if qh.MERGEexact, 
-      allows coplanar ridges
-      skips convexity test while qh.ZEROall_ok
-
-  returns:
-    True if all facets !flipped, !dupridge, normal
-         if all horizon facets are simplicial
-         if all vertices are clearly below neighbor
-         if all opposite vertices of horizon are below 
-    clears qh.ZEROall_ok if any problems or coplanar facets
-
-  notes:
-    uses qh.vertex_visit
-    horizon facets may define multiple new facets
-
-  design:
-    for all facets in qh.newfacet_list or qh.facet_list
-      check for flagged faults (flipped, etc.)
-    for all facets in qh.newfacet_list or qh.facet_list
-      for each neighbor of facet
-        skip horizon facets for qh.newfacet_list
-        test the opposite vertex
-      if qh.newfacet_list
-        test the other vertices in the facet's horizon facet
-*/
-boolT qh_checkzero (boolT testall) {
-  facetT *facet, *neighbor, **neighborp;
-  facetT *horizon, *facetlist;
-  int neighbor_i;
-  vertexT *vertex, **vertexp;
-  realT dist;
-
-  if (testall) 
-    facetlist= qh facet_list;
-  else {
-    facetlist= qh newfacet_list;
-    FORALLfacet_(facetlist) {
-      horizon= SETfirstt_(facet->neighbors, facetT);
-      if (!horizon->simplicial)
-        goto LABELproblem;
-      if (facet->flipped || facet->dupridge || !facet->normal)
-        goto LABELproblem;
-    }
-    if (qh MERGEexact && qh ZEROall_ok) {
-      trace2((qh ferr, "qh_checkzero: skip convexity check until first pre-merge\n"));
-      return True;
-    }
-  }
-  FORALLfacet_(facetlist) {
-    qh vertex_visit++;
-    neighbor_i= 0;
-    horizon= NULL;
-    FOREACHneighbor_(facet) {
-      if (!neighbor_i && !testall) {
-        horizon= neighbor;
-	neighbor_i++;
-        continue; /* horizon facet tested in qh_findhorizon */
-      }
-      vertex= SETelemt_(facet->vertices, neighbor_i++, vertexT);
-      vertex->visitid= qh vertex_visit;
-      zzinc_(Zdistzero);
-      qh_distplane (vertex->point, neighbor, &dist);
-      if (dist >= -qh DISTround) {
-        qh ZEROall_ok= False;
-        if (!qh MERGEexact || testall || dist > qh DISTround)
-          goto LABELnonconvex;
-      }
-    }
-    if (!testall) {
-      FOREACHvertex_(horizon->vertices) {
-	if (vertex->visitid != qh vertex_visit) {
-	  zzinc_(Zdistzero);
-	  qh_distplane (vertex->point, facet, &dist);
-	  if (dist >= -qh DISTround) {
-	    qh ZEROall_ok= False;
-	    if (!qh MERGEexact || dist > qh DISTround)
-	      goto LABELnonconvex;
-	  }
-	  break;
-	}
-      }
-    }
-  }
-  trace2((qh ferr, "qh_checkzero: testall %d, facets are %s\n", testall,
-        (qh MERGEexact && !testall) ? 
-           "not concave, flipped, or duplicate ridged" : "clearly convex"));
-  return True;
-
- LABELproblem:
-  qh ZEROall_ok= False;
-  trace2((qh ferr, "qh_checkzero: facet f%d needs pre-merging\n",
-       facet->id));
-  return False;
-
- LABELnonconvex:
-  trace2((qh ferr, "qh_checkzero: facet f%d and f%d are not clearly convex.  v%d dist %.2g\n",
-         facet->id, neighbor->id, vertex->id, dist));
-  return False;
-} /* checkzero */
-
-/*---------------------------------
-  
-  qh_compareangle( angle1, angle2 )
-    used by qsort() to order merges by angle
-*/
-static int qh_compareangle(const void *p1, const void *p2) {
-  mergeT *a= *((mergeT **)p1), *b= *((mergeT **)p2);
- 
-  return ((a->angle > b->angle) ? 1 : -1);
-} /* compareangle */
-
-/*---------------------------------
-  
-  qh_comparemerge( merge1, merge2 )
-    used by qsort() to order merges
-*/
-static int qh_comparemerge(const void *p1, const void *p2) {
-  mergeT *a= *((mergeT **)p1), *b= *((mergeT **)p2);
- 
-  return (a->type - b->type);
-} /* comparemerge */
-
-/*---------------------------------
-  
-  qh_comparevisit( vertex1, vertex2 )
-    used by qsort() to order vertices by their visitid
-*/
-static int qh_comparevisit (const void *p1, const void *p2) {
-  vertexT *a= *((vertexT **)p1), *b= *((vertexT **)p2);
- 
-  return (a->visitid - b->visitid);
-} /* comparevisit */
-
-/*---------------------------------
-  
-  qh_copynonconvex( atridge )
-    set non-convex flag on other ridges (if any) between same neighbors
-
-  notes:
-    may be faster if use smaller ridge set
-
-  design:
-    for each ridge of atridge's top facet
-      if ridge shares the same neighbor
-        set nonconvex flag
-*/
-void qh_copynonconvex (ridgeT *atridge) {
-  facetT *facet, *otherfacet;
-  ridgeT *ridge, **ridgep;
-
-  facet= atridge->top;
-  otherfacet= atridge->bottom;
-  FOREACHridge_(facet->ridges) {
-    if (otherfacet == otherfacet_(ridge, facet) && ridge != atridge) {
-      ridge->nonconvex= True;
-      trace4((qh ferr, "qh_copynonconvex: moved nonconvex flag from r%d to r%d\n",
-	      atridge->id, ridge->id));
-      break;
-    }
-  }
-} /* copynonconvex */
-
-/*---------------------------------
-  
-  qh_degen_redundant_facet( facet )
-    check facet for degen. or redundancy
-
-  notes:
-    bumps vertex_visit
-    called if a facet was redundant but no longer is (qh_merge_degenredundant)
-    qh_appendmergeset() only appends first reference to facet (i.e., redundant)
-
-  see:
-    qh_degen_redundant_neighbors()
-
-  design:
-    test for redundant neighbor
-    test for degenerate facet
-*/
-void qh_degen_redundant_facet (facetT *facet) {
-  vertexT *vertex, **vertexp;
-  facetT *neighbor, **neighborp;
-
-  trace4((qh ferr, "qh_degen_redundant_facet: test facet f%d for degen/redundant\n",
-	  facet->id));
-  FOREACHneighbor_(facet) {
-    qh vertex_visit++;
-    FOREACHvertex_(neighbor->vertices)
-      vertex->visitid= qh vertex_visit;
-    FOREACHvertex_(facet->vertices) {
-      if (vertex->visitid != qh vertex_visit)
-	break;
-    }
-    if (!vertex) {
-      qh_appendmergeset (facet, neighbor, MRGredundant, NULL);
-      trace2((qh ferr, "qh_degen_redundant_facet: f%d is contained in f%d.  merge\n", facet->id, neighbor->id)); 
-      return;
-    }
-  }
-  if (qh_setsize (facet->neighbors) < qh hull_dim) {
-    qh_appendmergeset (facet, facet, MRGdegen, NULL);
-    trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is degenerate.\n", facet->id));
-  }
-} /* degen_redundant_facet */
-
-
-/*---------------------------------
-  
-  qh_degen_redundant_neighbors( facet, delfacet,  )
-    append degenerate and redundant neighbors to facet_mergeset
-    if delfacet, 
-      only checks neighbors of both delfacet and facet
-    also checks current facet for degeneracy
-
-  notes:
-    bumps vertex_visit
-    called for each qh_mergefacet() and qh_mergecycle()
-    merge and statistics occur in merge_nonconvex
-    qh_appendmergeset() only appends first reference to facet (i.e., redundant)
-      it appends redundant facets after degenerate ones
-
-    a degenerate facet has fewer than hull_dim neighbors
-    a redundant facet's vertices is a subset of its neighbor's vertices
-    tests for redundant merges first (appendmergeset is nop for others)
-    in a merge, only needs to test neighbors of merged facet
-  
-  see:
-    qh_merge_degenredundant() and qh_degen_redundant_facet()
-
-  design:
-    test for degenerate facet
-    test for redundant neighbor
-    test for degenerate neighbor
-*/
-void qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet) {
-  vertexT *vertex, **vertexp;
-  facetT *neighbor, **neighborp;
-  int size;
-
-  trace4((qh ferr, "qh_degen_redundant_neighbors: test neighbors of f%d with delfacet f%d\n", 
-	  facet->id, getid_(delfacet)));
-  if ((size= qh_setsize (facet->neighbors)) < qh hull_dim) {
-    qh_appendmergeset (facet, facet, MRGdegen, NULL);
-    trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is degenerate with %d neighbors.\n", facet->id, size));
-  }
-  if (!delfacet)
-    delfacet= facet;
-  qh vertex_visit++;
-  FOREACHvertex_(facet->vertices)
-    vertex->visitid= qh vertex_visit;
-  FOREACHneighbor_(delfacet) {
-    /* uses early out instead of checking vertex count */
-    if (neighbor == facet)
-      continue;
-    FOREACHvertex_(neighbor->vertices) {
-      if (vertex->visitid != qh vertex_visit)
-        break;
-    }
-    if (!vertex) {
-      qh_appendmergeset (neighbor, facet, MRGredundant, NULL);
-      trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is contained in f%d.  merge\n", neighbor->id, facet->id)); 
-    }
-  }
-  FOREACHneighbor_(delfacet) {   /* redundant merges occur first */
-    if (neighbor == facet)
-      continue;
-    if ((size= qh_setsize (neighbor->neighbors)) < qh hull_dim) {
-      qh_appendmergeset (neighbor, neighbor, MRGdegen, NULL);
-      trace2((qh ferr, "qh_degen_redundant_neighbors: f%d is degenerate with %d neighbors.  Neighbor of f%d.\n", neighbor->id, size, facet->id)); 
-    }
-  }
-} /* degen_redundant_neighbors */
-
-
-/*---------------------------------
-  
-  qh_find_newvertex( oldvertex, vertices, ridges )
-    locate new vertex for renaming old vertex
-    vertices is a set of possible new vertices
-      vertices sorted by number of deleted ridges
-
-  returns:
-    newvertex or NULL
-      each ridge includes both vertex and oldvertex
-    vertices sorted by number of deleted ridges
-      
-  notes:
-    modifies vertex->visitid
-    new vertex is in one of the ridges
-    renaming will not cause a duplicate ridge
-    renaming will minimize the number of deleted ridges
-    newvertex may not be adjacent in the dual (though unlikely)
-
-  design:
-    for each vertex in vertices
-      set vertex->visitid to number of references in ridges
-    remove unvisited vertices 
-    set qh.vertex_visit above all possible values
-    sort vertices by number of references in ridges
-    add each ridge to qh.hash_table
-    for each vertex in vertices
-      look for a vertex that would not cause a duplicate ridge after a rename
-*/
-vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges) {
-  vertexT *vertex, **vertexp;
-  setT *newridges;
-  ridgeT *ridge, **ridgep;
-  int size, hashsize;
-  int hash;
-
-#ifndef qh_NOtrace
-  if (qh IStracing >= 4) {
-    fprintf (qh ferr, "qh_find_newvertex: find new vertex for v%d from ",
-	     oldvertex->id);
-    FOREACHvertex_(vertices) 
-      fprintf (qh ferr, "v%d ", vertex->id);
-    FOREACHridge_(ridges)
-      fprintf (qh ferr, "r%d ", ridge->id);
-    fprintf (qh ferr, "\n");
-  }
-#endif
-  FOREACHvertex_(vertices) 
-    vertex->visitid= 0;
-  FOREACHridge_(ridges) {
-    FOREACHvertex_(ridge->vertices) 
-      vertex->visitid++;
-  }
-  FOREACHvertex_(vertices) {
-    if (!vertex->visitid) {
-      qh_setdelnth (vertices, SETindex_(vertices,vertex));
-      vertexp--; /* repeat since deleted this vertex */
-    }
-  }
-  qh vertex_visit += qh_setsize (ridges);
-  if (!qh_setsize (vertices)) {
-    trace4((qh ferr, "qh_find_newvertex: vertices not in ridges for v%d\n",
-	    oldvertex->id));
-    return NULL;
-  }
-  qsort (SETaddr_(vertices, vertexT), qh_setsize (vertices),
-	        sizeof (vertexT *), qh_comparevisit);
-  /* can now use qh vertex_visit */
-  if (qh PRINTstatistics) {
-    size= qh_setsize (vertices);
-    zinc_(Zintersect);
-    zadd_(Zintersecttot, size);
-    zmax_(Zintersectmax, size);
-  }
-  hashsize= qh_newhashtable (qh_setsize (ridges));
-  FOREACHridge_(ridges)
-    qh_hashridge (qh hash_table, hashsize, ridge, oldvertex);
-  FOREACHvertex_(vertices) {
-    newridges= qh_vertexridges (vertex);
-    FOREACHridge_(newridges) {
-      if (qh_hashridge_find (qh hash_table, hashsize, ridge, vertex, oldvertex, &hash)) {
-	zinc_(Zdupridge);
-	break;
-      }
-    }
-    qh_settempfree (&newridges);
-    if (!ridge)
-      break;  /* found a rename */
-  }
-  if (vertex) {
-    /* counted in qh_renamevertex */
-    trace2((qh ferr, "qh_find_newvertex: found v%d for old v%d from %d vertices and %d ridges.\n",
-      vertex->id, oldvertex->id, qh_setsize (vertices), qh_setsize (ridges)));
-  }else {
-    zinc_(Zfindfail);
-    trace0((qh ferr, "qh_find_newvertex: no vertex for renaming v%d (all duplicated ridges) during p%d\n",
-      oldvertex->id, qh furthest_id));
-  }
-  qh_setfree (&qh hash_table);
-  return vertex;
-} /* find_newvertex */
-
-/*---------------------------------
-  
-  qh_findbest_test( testcentrum, facet, neighbor, bestfacet, dist, mindist, maxdist )
-    test neighbor of facet for qh_findbestneighbor()
-    if testcentrum,
-      tests centrum (assumes it is defined)
-    else 
-      tests vertices
-
-  returns:
-    if a better facet (i.e., vertices/centrum of facet closer to neighbor)
-      updates bestfacet, dist, mindist, and maxdist
-*/
-void qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor,
-      facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp) {
-  realT dist, mindist, maxdist;
-
-  if (testcentrum) {
-    zzinc_(Zbestdist);
-    qh_distplane(facet->center, neighbor, &dist);
-    dist *= qh hull_dim; /* estimate furthest vertex */
-    if (dist < 0) {
-      maxdist= 0;
-      mindist= dist;
-      dist= -dist;
-    }else
-      maxdist= dist;
-  }else
-    dist= qh_getdistance (facet, neighbor, &mindist, &maxdist);
-  if (dist < *distp) {
-    *bestfacet= neighbor;
-    *mindistp= mindist;
-    *maxdistp= maxdist;
-    *distp= dist;
-  }
-} /* findbest_test */
-
-/*---------------------------------
-  
-  qh_findbestneighbor( facet, dist, mindist, maxdist )
-    finds best neighbor (least dist) of a facet for merging
-
-  returns:
-    returns min and max distances and their max absolute value
-  
-  notes:
-    avoids merging old into new
-    assumes ridge->nonconvex only set on one ridge between a pair of facets
-    could use an early out predicate but not worth it
-
-  design:
-    if a large facet
-      will test centrum
-    else
-      will test vertices
-    if a large facet
-      test nonconvex neighbors for best merge
-    else
-      test all neighbors for the best merge
-    if testing centrum
-      get distance information
-*/
-facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp) {
-  facetT *neighbor, **neighborp, *bestfacet= NULL;
-  ridgeT *ridge, **ridgep;
-  boolT nonconvex= True, testcentrum= False;
-  int size= qh_setsize (facet->vertices);
-
-  *distp= REALmax;
-  if (size > qh_BESTcentrum2 * qh hull_dim + qh_BESTcentrum) {
-    testcentrum= True;
-    zinc_(Zbestcentrum);
-    if (!facet->center)
-       facet->center= qh_getcentrum (facet);
-  }
-  if (size > qh hull_dim + qh_BESTnonconvex) {
-    FOREACHridge_(facet->ridges) {
-      if (ridge->nonconvex) {
-        neighbor= otherfacet_(ridge, facet);
-	qh_findbest_test (testcentrum, facet, neighbor,
-			  &bestfacet, distp, mindistp, maxdistp);
-      }
-    }
-  }
-  if (!bestfacet) {     
-    nonconvex= False;
-    FOREACHneighbor_(facet)
-      qh_findbest_test (testcentrum, facet, neighbor,
-			&bestfacet, distp, mindistp, maxdistp);
-  }
-  if (!bestfacet) {
-    fprintf (qh ferr, "qhull internal error (qh_findbestneighbor): no neighbors for f%d\n", facet->id);
-    
-    qh_errexit (qh_ERRqhull, facet, NULL);
-  }
-  if (testcentrum) 
-    qh_getdistance (facet, bestfacet, mindistp, maxdistp);
-  trace3((qh ferr, "qh_findbestneighbor: f%d is best neighbor for f%d testcentrum? %d nonconvex? %d dist %2.2g min %2.2g max %2.2g\n",
-     bestfacet->id, facet->id, testcentrum, nonconvex, *distp, *mindistp, *maxdistp));
-  return(bestfacet);
-} /* findbestneighbor */
-
-
-/*---------------------------------
-  
-  qh_flippedmerges( facetlist, wasmerge )
-    merge flipped facets into best neighbor
-    assumes qh.facet_mergeset at top of temporary stack
-
-  returns:
-    no flipped facets on facetlist
-    sets wasmerge if merge occurred
-    degen/redundant merges passed through
-
-  notes:
-    othermerges not needed since qh.facet_mergeset is empty before & after
-      keep it in case of change
-
-  design:
-    append flipped facets to qh.facetmergeset
-    for each flipped merge
-      find best neighbor
-      merge facet into neighbor
-      merge degenerate and redundant facets
-    remove flipped merges from qh.facet_mergeset
-*/
-void qh_flippedmerges(facetT *facetlist, boolT *wasmerge) {
-  facetT *facet, *neighbor, *facet1;
-  realT dist, mindist, maxdist;
-  mergeT *merge, **mergep;
-  setT *othermerges;
-  int nummerge=0;
-
-  trace4((qh ferr, "qh_flippedmerges: begin\n"));
-  FORALLfacet_(facetlist) {
-    if (facet->flipped && !facet->visible) 
-      qh_appendmergeset (facet, facet, MRGflip, NULL);
-  }
-  othermerges= qh_settemppop(); /* was facet_mergeset */
-  qh facet_mergeset= qh_settemp (qh TEMPsize);
-  qh_settemppush (othermerges);
-  FOREACHmerge_(othermerges) {
-    facet1= merge->facet1;
-    if (merge->type != MRGflip || facet1->visible) 
-      continue;
-    if (qh TRACEmerge-1 == zzval_(Ztotmerge))
-      qhmem.IStracing= qh IStracing= qh TRACElevel;
-    neighbor= qh_findbestneighbor (facet1, &dist, &mindist, &maxdist);
-    trace0((qh ferr, "qh_flippedmerges: merge flipped f%d into f%d dist %2.2g during p%d\n",
-      facet1->id, neighbor->id, dist, qh furthest_id));
-    qh_mergefacet (facet1, neighbor, &mindist, &maxdist, !qh_MERGEapex);
-    nummerge++;
-    if (qh PRINTstatistics) {
-      zinc_(Zflipped);
-      wadd_(Wflippedtot, dist);
-      wmax_(Wflippedmax, dist);
-    }
-    qh_merge_degenredundant();
-  }
-  FOREACHmerge_(othermerges) {
-    if (merge->facet1->visible || merge->facet2->visible)
-      qh_memfree (merge, sizeof(mergeT));
-    else
-      qh_setappend (&qh facet_mergeset, merge);
-  }
-  qh_settempfree (&othermerges);
-  if (nummerge)
-    *wasmerge= True;
-  trace1((qh ferr, "qh_flippedmerges: merged %d flipped facets into a good neighbor\n", nummerge));
-} /* flippedmerges */
-
-
-/*---------------------------------
-  
-  qh_forcedmerges( wasmerge )
-    merge duplicated ridges
-
-  returns:
-    removes all duplicate ridges on facet_mergeset
-    wasmerge set if merge
-    qh.facet_mergeset may include non-forced merges (none for now)
-    qh.degen_mergeset includes degen/redun merges
-
-  notes: 
-    duplicate ridges occur when the horizon is pinched,
-        i.e. a subridge occurs in more than two horizon ridges.
-     could rename vertices that pinch the horizon
-    assumes qh_merge_degenredundant() has not be called
-    othermerges isn't needed since facet_mergeset is empty afterwards
-      keep it in case of change
-
-  design:
-    for each duplicate ridge
-      find current facets by chasing f.replace links
-      determine best direction for facet
-      merge one facet into the other
-      remove duplicate ridges from qh.facet_mergeset
-*/
-void qh_forcedmerges(boolT *wasmerge) {
-  facetT *facet1, *facet2;
-  mergeT *merge, **mergep;
-  realT dist1, dist2, mindist1, mindist2, maxdist1, maxdist2;
-  setT *othermerges;
-  int nummerge=0, numflip=0;
-
-  if (qh TRACEmerge-1 == zzval_(Ztotmerge))
-    qhmem.IStracing= qh IStracing= qh TRACElevel;
-  trace4((qh ferr, "qh_forcedmerges: begin\n"));  
-  othermerges= qh_settemppop(); /* was facet_mergeset */
-  qh facet_mergeset= qh_settemp (qh TEMPsize);
-  qh_settemppush (othermerges);
-  FOREACHmerge_(othermerges) {
-    if (merge->type != MRGridge) 
-    	continue;
-    facet1= merge->facet1;
-    facet2= merge->facet2;
-    while (facet1->visible)    	 /* must exist, no qh_merge_degenredunant */
-      facet1= facet1->f.replace; /* previously merged facet */
-    while (facet2->visible)
-      facet2= facet2->f.replace; /* previously merged facet */
-    if (facet1 == facet2)
-      continue;
-    if (!qh_setin (facet2->neighbors, facet1)) {
-      fprintf (qh ferr, "qhull internal error (qh_forcedmerges): f%d and f%d had a duplicate ridge but as f%d and f%d they are no longer neighbors\n",
-	       merge->facet1->id, merge->facet2->id, facet1->id, facet2->id);
-      qh_errexit2 (qh_ERRqhull, facet1, facet2);
-    }
-    if (qh TRACEmerge-1 == zzval_(Ztotmerge))
-      qhmem.IStracing= qh IStracing= qh TRACElevel;
-    dist1= qh_getdistance (facet1, facet2, &mindist1, &maxdist1);
-    dist2= qh_getdistance (facet2, facet1, &mindist2, &maxdist2);
-    trace0((qh ferr, "qh_forcedmerges: duplicate ridge between f%d and f%d, dist %2.2g and reverse dist %2.2g during p%d\n",
-	    facet1->id, facet2->id, dist1, dist2, qh furthest_id));
-    if (dist1 < dist2) 
-      qh_mergefacet (facet1, facet2, &mindist1, &maxdist1, !qh_MERGEapex);
-    else {
-      qh_mergefacet (facet2, facet1, &mindist2, &maxdist2, !qh_MERGEapex);
-      dist1= dist2;
-      facet1= facet2;
-    }
-    if (facet1->flipped) {
-      zinc_(Zmergeflipdup);
-      numflip++;
-    }else
-      nummerge++;
-    if (qh PRINTstatistics) {
-      zinc_(Zduplicate);
-      wadd_(Wduplicatetot, dist1);
-      wmax_(Wduplicatemax, dist1);
-    }
-  }
-  FOREACHmerge_(othermerges) {
-    if (merge->type == MRGridge)
-      qh_memfree (merge, sizeof(mergeT));
-    else
-      qh_setappend (&qh facet_mergeset, merge);
-  }
-  qh_settempfree (&othermerges);
-  if (nummerge)
-    *wasmerge= True;
-  trace1((qh ferr, "qh_forcedmerges: merged %d facets and %d flipped facets across duplicated ridges\n", 
-                nummerge, numflip));
-} /* forcedmerges */
-
-
-/*---------------------------------
-  
-  qh_getmergeset( facetlist )
-    determines nonconvex facets on facetlist
-    tests !tested ridges and nonconvex ridges of !tested facets
-
-  returns:
-    returns sorted qh.facet_mergeset of facet-neighbor pairs to be merged
-    all ridges tested
-  
-  notes:
-    assumes no nonconvex ridges with both facets tested
-    uses facet->tested/ridge->tested to prevent duplicate tests
-    can not limit tests to modified ridges since the centrum changed
-    uses qh.visit_id
-  
-  see:
-    qh_getmergeset_initial()
-
-  design:
-    for each facet on facetlist
-      for each ridge of facet
-        if untested ridge
-          test ridge for convexity
-          if non-convex
-            append ridge to qh.facet_mergeset
-    sort qh.facet_mergeset by angle  
-*/
-void qh_getmergeset(facetT *facetlist) {
-  facetT *facet, *neighbor, **neighborp;
-  ridgeT *ridge, **ridgep;
-  int nummerges;
-  
-  nummerges= qh_setsize (qh facet_mergeset);
-  trace4((qh ferr, "qh_getmergeset: started.\n"));
-  qh visit_id++;
-  FORALLfacet_(facetlist) {
-    if (facet->tested)
-      continue;
-    facet->visitid= qh visit_id;
-    facet->tested= True;  /* must be non-simplicial due to merge */
-    FOREACHneighbor_(facet)
-      neighbor->seen= False;
-    FOREACHridge_(facet->ridges) {
-      if (ridge->tested && !ridge->nonconvex)
-	continue;
-      /* if tested & nonconvex, need to append merge */
-      neighbor= otherfacet_(ridge, facet);
-      if (neighbor->seen) {
-	ridge->tested= True;
-	ridge->nonconvex= False;
-      }else if (neighbor->visitid != qh visit_id) {
-        ridge->tested= True;
-        ridge->nonconvex= False;
-	neighbor->seen= True;      /* only one ridge is marked nonconvex */
-	if (qh_test_appendmerge (facet, neighbor))
-	  ridge->nonconvex= True;
-      }
-    }
-  }
-  nummerges= qh_setsize (qh facet_mergeset);
-  if (qh ANGLEmerge)
-    qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_compareangle);
-  else
-    qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_comparemerge);
-  if (qh POSTmerging) {
-    zadd_(Zmergesettot2, nummerges);
-  }else {
-    zadd_(Zmergesettot, nummerges);
-    zmax_(Zmergesetmax, nummerges);
-  }
-  trace2((qh ferr, "qh_getmergeset: %d merges found\n", nummerges));
-} /* getmergeset */
-
-
-/*---------------------------------
-  
-  qh_getmergeset_initial( facetlist )
-    determine initial qh.facet_mergeset for facets
-    tests all facet/neighbor pairs on facetlist
-
-  returns:
-    sorted qh.facet_mergeset with nonconvex ridges
-    sets facet->tested, ridge->tested, and ridge->nonconvex
-
-  notes:
-    uses visit_id, assumes ridge->nonconvex is False
-
-  see:
-    qh_getmergeset()
-
-  design:
-    for each facet on facetlist
-      for each untested neighbor of facet
-        test facet and neighbor for convexity
-        if non-convex
-          append merge to qh.facet_mergeset
-          mark one of the ridges as nonconvex
-    sort qh.facet_mergeset by angle
-*/
-void qh_getmergeset_initial (facetT *facetlist) {
-  facetT *facet, *neighbor, **neighborp;
-  ridgeT *ridge, **ridgep;
-  int nummerges;
-
-  qh visit_id++;
-  FORALLfacet_(facetlist) {
-    facet->visitid= qh visit_id;
-    facet->tested= True;
-    FOREACHneighbor_(facet) {
-      if (neighbor->visitid != qh visit_id) {
-        if (qh_test_appendmerge (facet, neighbor)) {
-          FOREACHridge_(neighbor->ridges) {
-            if (facet == otherfacet_(ridge, neighbor)) {
-              ridge->nonconvex= True;
-              break;	/* only one ridge is marked nonconvex */
-            }
-          }
-        }
-      }
-    }
-    FOREACHridge_(facet->ridges)
-      ridge->tested= True;
-  }
-  nummerges= qh_setsize (qh facet_mergeset);
-  if (qh ANGLEmerge)
-    qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_compareangle);
-  else
-    qsort(SETaddr_(qh facet_mergeset, mergeT), nummerges,sizeof(mergeT *),qh_comparemerge);
-  if (qh POSTmerging) {
-    zadd_(Zmergeinittot2, nummerges);
-  }else {
-    zadd_(Zmergeinittot, nummerges);
-    zmax_(Zmergeinitmax, nummerges);
-  }
-  trace2((qh ferr, "qh_getmergeset_initial: %d merges found\n", nummerges));
-} /* getmergeset_initial */
-
-
-/*---------------------------------
-  
-  qh_hashridge( hashtable, hashsize, ridge, oldvertex )
-    add ridge to hashtable without oldvertex
-
-  notes:
-    assumes hashtable is large enough
-
-  design:
-    determine hash value for ridge without oldvertex
-    find next empty slot for ridge
-*/
-void qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex) {
-  int hash;
-  ridgeT *ridgeA;
-
-  hash= (int)qh_gethash (hashsize, ridge->vertices, qh hull_dim-1, 0, oldvertex);
-  while (True) {
-    if (!(ridgeA= SETelemt_(hashtable, hash, ridgeT))) {
-      SETelem_(hashtable, hash)= ridge;
-      break;
-    }else if (ridgeA == ridge)
-      break;
-    if (++hash == hashsize)
-      hash= 0;
-  }
-} /* hashridge */
-
-
-/*---------------------------------
-  
-  qh_hashridge_find( hashtable, hashsize, ridge, vertex, oldvertex, hashslot )
-    returns matching ridge without oldvertex in hashtable 
-      for ridge without vertex
-    if oldvertex is NULL 
-      matches with any one skip
-
-  returns:
-    matching ridge or NULL
-    if no match,
-      if ridge already in   table
-        hashslot= -1 
-      else 
-        hashslot= next NULL index
-        
-  notes:
-    assumes hashtable is large enough
-    can't match ridge to itself
-
-  design:
-    get hash value for ridge without vertex
-    for each hashslot
-      return match if ridge matches ridgeA without oldvertex
-*/
-ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge, 
-              vertexT *vertex, vertexT *oldvertex, int *hashslot) {
-  int hash;
-  ridgeT *ridgeA;
-
-  *hashslot= 0;
-  zinc_(Zhashridge);
-  hash= (int)qh_gethash (hashsize, ridge->vertices, qh hull_dim-1, 0, vertex);
-  while ((ridgeA= SETelemt_(hashtable, hash, ridgeT))) {
-    if (ridgeA == ridge)
-      *hashslot= -1;      
-    else {
-      zinc_(Zhashridgetest);
-      if (qh_setequal_except (ridge->vertices, vertex, ridgeA->vertices, oldvertex))
-        return ridgeA;
-    }
-    if (++hash == hashsize)
-      hash= 0;
-  }
-  if (!*hashslot)
-    *hashslot= hash;
-  return NULL;
-} /* hashridge_find */
-
-
-/*---------------------------------
-  
-  qh_makeridges( facet )
-    creates explicit ridges between simplicial facets
-
-  returns:
-    facet with ridges and without qh_MERGEridge
-    ->simplicial is False
-  
-  notes:
-    allows qh_MERGEridge flag
-    uses existing ridges
-    duplicate neighbors ok if ridges already exist (qh_mergecycle_ridges)
-
-  see:
-    qh_mergecycle_ridges()
-
-  design:
-    look for qh_MERGEridge neighbors
-    mark neighbors that already have ridges
-    for each unprocessed neighbor of facet    
-      create a ridge for neighbor and facet
-    if any qh_MERGEridge neighbors
-      delete qh_MERGEridge flags (already handled by qh_mark_dupridges)
-*/
-void qh_makeridges(facetT *facet) {
-  facetT *neighbor, **neighborp;
-  ridgeT *ridge, **ridgep;
-  int neighbor_i, neighbor_n;
-  boolT toporient, mergeridge= False;
-  
-  if (!facet->simplicial)
-    return;
-  trace4((qh ferr, "qh_makeridges: make ridges for f%d\n", facet->id));
-  facet->simplicial= False;
-  FOREACHneighbor_(facet) {
-    if (neighbor == qh_MERGEridge)
-      mergeridge= True;
-    else
-      neighbor->seen= False;
-  }
-  FOREACHridge_(facet->ridges)
-    otherfacet_(ridge, facet)->seen= True;
-  FOREACHneighbor_i_(facet) {
-    if (neighbor == qh_MERGEridge)
-      continue;  /* fixed by qh_mark_dupridges */
-    else if (!neighbor->seen) {  /* no current ridges */
-      ridge= qh_newridge();
-      ridge->vertices= qh_setnew_delnthsorted (facet->vertices, qh hull_dim,
-					                  neighbor_i, 0);
-      toporient= facet->toporient ^ (neighbor_i & 0x1);
-      if (toporient) {
-        ridge->top= facet;
-        ridge->bottom= neighbor;
-      }else {
-        ridge->top= neighbor;
-        ridge->bottom= facet;
-      }
-#if 0 /* this also works */
-      flip= (facet->toporient ^ neighbor->toporient)^(skip1 & 0x1) ^ (skip2 & 0x1);
-      if (facet->toporient ^ (skip1 & 0x1) ^ flip) {
-        ridge->top= neighbor;
-        ridge->bottom= facet;
-      }else {
-        ridge->top= facet;
-        ridge->bottom= neighbor;
-      }
-#endif
-      qh_setappend(&(facet->ridges), ridge);
-      qh_setappend(&(neighbor->ridges), ridge);
-    }
-  }
-  if (mergeridge) {
-    while (qh_setdel (facet->neighbors, qh_MERGEridge))
-      ; /* delete each one */
-  }
-} /* makeridges */
-
-
-/*---------------------------------
-  
-  qh_mark_dupridges( facetlist )
-    add duplicated ridges to qh.facet_mergeset
-    facet->dupridge is true
-
-  returns:
-    duplicate ridges on qh.facet_mergeset
-    ->mergeridge/->mergeridge2 set
-    duplicate ridges marked by qh_MERGEridge and both sides facet->dupridge
-    no MERGEridges in neighbor sets
-    
-  notes:
-    duplicate ridges occur when the horizon is pinched,
-        i.e. a subridge occurs in more than two horizon ridges.
-    could rename vertices that pinch the horizon
-    uses qh.visit_id
-
-  design:
-    for all facets on facetlist
-      if facet contains a duplicate ridge
-        for each neighbor of facet
-          if neighbor marked qh_MERGEridge (one side of the merge)
-            set facet->mergeridge      
-          else
-            if neighbor contains a duplicate ridge 
-            and the back link is qh_MERGEridge
-              append duplicate ridge to qh.facet_mergeset
-   for each duplicate ridge
-     make ridge sets in preparation for merging
-     remove qh_MERGEridge from neighbor set
-   for each duplicate ridge
-     restore the missing neighbor from the neighbor set that was qh_MERGEridge
-     add the missing ridge for this neighbor
-*/
-void qh_mark_dupridges(facetT *facetlist) {
-  facetT *facet, *neighbor, **neighborp;
-  int nummerge=0;
-  mergeT *merge, **mergep;
-  
-
-  trace4((qh ferr, "qh_mark_dupridges: identify duplicate ridges\n"));  
-  FORALLfacet_(facetlist) {
-    if (facet->dupridge) {
-      FOREACHneighbor_(facet) {
-        if (neighbor == qh_MERGEridge) {
-	  facet->mergeridge= True;
-	  continue;
-	}
-        if (neighbor->dupridge
-	&& !qh_setin (neighbor->neighbors, facet)) { /* qh_MERGEridge */
-	  qh_appendmergeset (facet, neighbor, MRGridge, NULL);
-	  facet->mergeridge2= True;
-	  facet->mergeridge= True;
-	  nummerge++;
-	}
-      }
-    }
-  }
-  if (!nummerge)
-    return;
-  FORALLfacet_(facetlist) {            /* gets rid of qh_MERGEridge */
-    if (facet->mergeridge && !facet->mergeridge2)   
-      qh_makeridges (facet);
-  }
-  FOREACHmerge_(qh facet_mergeset) {   /* restore the missing neighbors */
-    if (merge->type == MRGridge) {
-      qh_setappend (&merge->facet2->neighbors, merge->facet1);
-      qh_makeridges (merge->facet1);   /* and the missing ridges */
-    }
-  }
-  trace1((qh ferr, "qh_mark_dupridges: found %d duplicated ridges\n", 
-                nummerge));
-} /* mark_dupridges */
-
-/*---------------------------------
-  
-  qh_maydropneighbor( facet )
-    drop neighbor relationship if no ridge between facet and neighbor
-
-  returns:
-    neighbor sets updated
-    appends degenerate facets to qh.facet_mergeset
-  
-  notes:
-    won't cause redundant facets since vertex inclusion is the same
-    may drop vertex and neighbor if no ridge
-    uses qh.visit_id
-
-  design:
-    visit all neighbors with ridges
-    for each unvisited neighbor of facet
-      delete neighbor and facet from the neighbor sets
-      if neighbor becomes degenerate
-        append neighbor to qh.degen_mergeset
-    if facet is degenerate
-      append facet to qh.degen_mergeset
-*/
-void qh_maydropneighbor (facetT *facet) {
-  ridgeT *ridge, **ridgep;
-  realT angledegen= qh_ANGLEdegen;
-  facetT *neighbor, **neighborp;
-
-  qh visit_id++;
-  trace4((qh ferr, "qh_maydropneighbor: test f%d for no ridges to a neighbor\n",
-	  facet->id));
-  FOREACHridge_(facet->ridges) {
-    ridge->top->visitid= qh visit_id;
-    ridge->bottom->visitid= qh visit_id;
-  }
-  FOREACHneighbor_(facet) {
-    if (neighbor->visitid != qh visit_id) {
-      trace0((qh ferr, "qh_maydropneighbor: facets f%d and f%d are no longer neighbors during p%d\n",
-	    facet->id, neighbor->id, qh furthest_id));
-      zinc_(Zdropneighbor);
-      qh_setdel (facet->neighbors, neighbor);
-      neighborp--;  /* repeat, deleted a neighbor */
-      qh_setdel (neighbor->neighbors, facet);
-      if (qh_setsize (neighbor->neighbors) < qh hull_dim) {
-        zinc_(Zdropdegen);
-        qh_appendmergeset (neighbor, neighbor, MRGdegen, &angledegen);
-        trace2((qh ferr, "qh_maydropneighbors: f%d is degenerate.\n", neighbor->id));
-      }
-    }
-  }
-  if (qh_setsize (facet->neighbors) < qh hull_dim) {
-    zinc_(Zdropdegen);
-    qh_appendmergeset (facet, facet, MRGdegen, &angledegen);
-    trace2((qh ferr, "qh_maydropneighbors: f%d is degenerate.\n", facet->id));
-  }
-} /* maydropneighbor */
-
-
-/*---------------------------------
-  
-  qh_merge_degenredundant()
-    merge all degenerate and redundant facets
-    qh.degen_mergeset contains merges from qh_degen_redundant_neighbors()
-
-  returns:
-    number of merges performed
-    resets facet->degenerate/redundant
-    if deleted (visible) facet has no neighbors
-      sets ->f.replace to NULL
-
-  notes:
-    redundant merges happen before degenerate ones
-    merging and renaming vertices can result in degen/redundant facets
-
-  design:
-    for each merge on qh.degen_mergeset
-      if redundant merge
-        if non-redundant facet merged into redundant facet
-          recheck facet for redundancy
-        else
-          merge redundant facet into other facet
-*/
-int qh_merge_degenredundant (void) {
-  int size;
-  mergeT *merge;
-  facetT *bestneighbor, *facet1, *facet2;
-  realT dist, mindist, maxdist;
-  vertexT *vertex, **vertexp;
-  int nummerges= 0;
-  mergeType mergetype;
-
-  while ((merge= (mergeT*)qh_setdellast (qh degen_mergeset))) {
-    facet1= merge->facet1;
-    facet2= merge->facet2;
-    mergetype= merge->type;
-    qh_memfree (merge, sizeof(mergeT));
-    if (facet1->visible)
-      continue;
-    facet1->degenerate= False; 
-    facet1->redundant= False; 
-    if (qh TRACEmerge-1 == zzval_(Ztotmerge))
-      qhmem.IStracing= qh IStracing= qh TRACElevel;
-    if (mergetype == MRGredundant) {
-      zinc_(Zneighbor);
-      while (facet2->visible) {
-        if (!facet2->f.replace) {
-          fprintf (qh ferr, "qhull internal error (qh_merge_degenredunant): f%d redundant but f%d has no replacement\n",
-	       facet1->id, facet2->id);
-          qh_errexit2 (qh_ERRqhull, facet1, facet2);
-        }
-        facet2= facet2->f.replace;
-      }
-      if (facet1 == facet2) {
-	qh_degen_redundant_facet (facet1); /* in case of others */
-	continue;
-      }
-      trace2((qh ferr, "qh_merge_degenredundant: facet f%d is contained in f%d, will merge\n",
-	    facet1->id, facet2->id));
-      qh_mergefacet(facet1, facet2, NULL, NULL, !qh_MERGEapex);
-      /* merge distance is already accounted for */
-      nummerges++;
-    }else {  /* mergetype == MRGdegen, other merges may have fixed */
-      if (!(size= qh_setsize (facet1->neighbors))) {
-        zinc_(Zdelfacetdup);
-        trace2((qh ferr, "qh_merge_degenredundant: facet f%d has no neighbors.  Deleted\n", facet1->id));
-        qh_willdelete (facet1, NULL);
-        FOREACHvertex_(facet1->vertices) {
-  	  qh_setdel (vertex->neighbors, facet1);
-	  if (!SETfirst_(vertex->neighbors)) {
-	    zinc_(Zdegenvertex);
-	    trace2((qh ferr, "qh_merge_degenredundant: deleted v%d because f%d has no neighbors\n",
-         	 vertex->id, facet1->id));
-	    vertex->deleted= True;
-	    qh_setappend (&qh del_vertices, vertex);
-	  }
-        }
-        nummerges++;
-      }else if (size < qh hull_dim) {
-        bestneighbor= qh_findbestneighbor(facet1, &dist, &mindist, &maxdist);
-        trace2((qh ferr, "qh_merge_degenredundant: facet f%d has %d neighbors, merge into f%d dist %2.2g\n",
-	      facet1->id, size, bestneighbor->id, dist));
-        qh_mergefacet(facet1, bestneighbor, &mindist, &maxdist, !qh_MERGEapex);
-        nummerges++;
-        if (qh PRINTstatistics) {
-	  zinc_(Zdegen);
-	  wadd_(Wdegentot, dist);
-	  wmax_(Wdegenmax, dist);
-        }
-      }	/* else, another merge fixed the degeneracy and redundancy tested */
-    }
-  }
-  return nummerges;
-} /* merge_degenredundant */
-
-/*---------------------------------
-  
-  qh_merge_nonconvex( facet1, facet2, mergetype )
-    remove non-convex ridge between facet1 into facet2 
-    mergetype gives why the facet's are non-convex
-
-  returns:
-    merges one of the facets into the best neighbor
-    
-  design:
-    if one of the facets is a new facet
-      prefer merging new facet into old facet
-    find best neighbors for both facets
-    merge the nearest facet into its best neighbor
-    update the statistics
-*/
-void qh_merge_nonconvex (facetT *facet1, facetT *facet2, mergeType mergetype) {
-  facetT *bestfacet, *bestneighbor, *neighbor;
-  realT dist, dist2, mindist, mindist2, maxdist, maxdist2;
-
-  if (qh TRACEmerge-1 == zzval_(Ztotmerge))
-    qhmem.IStracing= qh IStracing= qh TRACElevel;
-  trace3((qh ferr, "qh_merge_nonconvex: merge #%d for f%d and f%d type %d\n",
-      zzval_(Ztotmerge) + 1, facet1->id, facet2->id, mergetype));
-  /* concave or coplanar */
-  if (!facet1->newfacet) {
-    bestfacet= facet2;   /* avoid merging old facet if new is ok */
-    facet2= facet1;
-    facet1= bestfacet;
-  }else
-    bestfacet= facet1;
-  bestneighbor= qh_findbestneighbor(bestfacet, &dist, &mindist, &maxdist);
-  neighbor= qh_findbestneighbor(facet2, &dist2, &mindist2, &maxdist2);
-  if (dist < dist2) {
-    qh_mergefacet(bestfacet, bestneighbor, &mindist, &maxdist, !qh_MERGEapex);
-  }else if (qh AVOIDold && !facet2->newfacet
-  && ((mindist >= -qh MAXcoplanar && maxdist <= qh max_outside)
-       || dist * 1.5 < dist2)) {
-    zinc_(Zavoidold);
-    wadd_(Wavoidoldtot, dist);
-    wmax_(Wavoidoldmax, dist);
-    trace2((qh ferr, "qh_merge_nonconvex: avoid merging old facet f%d dist %2.2g.  Use f%d dist %2.2g instead\n",
-           facet2->id, dist2, facet1->id, dist2));
-    qh_mergefacet(bestfacet, bestneighbor, &mindist, &maxdist, !qh_MERGEapex);
-  }else {
-    qh_mergefacet(facet2, neighbor, &mindist2, &maxdist2, !qh_MERGEapex);
-    dist= dist2;
-  }
-  if (qh PRINTstatistics) {
-    if (mergetype == MRGanglecoplanar) {
-      zinc_(Zacoplanar);
-      wadd_(Wacoplanartot, dist);
-      wmax_(Wacoplanarmax, dist);
-    }else if (mergetype == MRGconcave) {
-      zinc_(Zconcave);
-      wadd_(Wconcavetot, dist);
-      wmax_(Wconcavemax, dist);
-    }else { /* MRGcoplanar */
-      zinc_(Zcoplanar);
-      wadd_(Wcoplanartot, dist);
-      wmax_(Wcoplanarmax, dist);
-    }
-  }
-} /* merge_nonconvex */
-
-/*---------------------------------
-  
-  qh_mergecycle( samecycle, newfacet )
-    merge a cycle of facets starting at samecycle into a newfacet 
-    newfacet is a horizon facet with ->normal
-    samecycle facets are simplicial from an apex
-
-  returns:
-    initializes vertex neighbors on first merge
-    samecycle deleted (placed on qh.visible_list)
-    newfacet at end of qh.facet_list
-    deleted vertices on qh.del_vertices
-
-  see:
-    qh_mergefacet()
-    called by qh_mergecycle_all() for multiple, same cycle facets
-
-  design:
-    make vertex neighbors if necessary
-    make ridges for newfacet
-    merge neighbor sets of samecycle into newfacet
-    merge ridges of samecycle into newfacet
-    merge vertex neighbors of samecycle into newfacet
-    make apex of samecycle the apex of newfacet
-    if newfacet wasn't a new facet
-      add its vertices to qh.newvertex_list
-    delete samecycle facets a make newfacet a newfacet
-*/
-void qh_mergecycle (facetT *samecycle, facetT *newfacet) {
-  int traceonce= False, tracerestore= 0;
-  vertexT *apex;
-#ifndef qh_NOtrace
-  facetT *same;
-#endif
-
-  if (newfacet->tricoplanar) {
-    if (!qh TRInormals) {
-      fprintf (qh ferr, "qh_mergecycle: does not work for tricoplanar facets.  Use option 'Q11'\n");
-      qh_errexit (qh_ERRqhull, newfacet, NULL);
-    }
-    newfacet->tricoplanar= False;
-    newfacet->keepcentrum= False;
-  }
-  if (!qh VERTEXneighbors)
-    qh_vertexneighbors();
-  zzinc_(Ztotmerge);
-  if (qh REPORTfreq2 && qh POSTmerging) {
-    if (zzval_(Ztotmerge) > qh mergereport + qh REPORTfreq2)
-      qh_tracemerging();
-  }
-#ifndef qh_NOtrace
-  if (qh TRACEmerge == zzval_(Ztotmerge))
-    qhmem.IStracing= qh IStracing= qh TRACElevel;
-  trace2((qh ferr, "qh_mergecycle: merge #%d for facets from cycle f%d into coplanar horizon f%d\n", 
-        zzval_(Ztotmerge), samecycle->id, newfacet->id));
-  if (newfacet == qh tracefacet) {
-    tracerestore= qh IStracing;
-    qh IStracing= 4;
-    fprintf (qh ferr, "qh_mergecycle: ========= trace merge %d of samecycle %d into trace f%d, furthest is p%d\n",
-	       zzval_(Ztotmerge), samecycle->id, newfacet->id,  qh furthest_id);
-    traceonce= True;
-  }
-  if (qh IStracing >=4) {
-    fprintf (qh ferr, "  same cycle:");
-    FORALLsame_cycle_(samecycle)
-      fprintf(qh ferr, " f%d", same->id);
-    fprintf (qh ferr, "\n");
-  }
-  if (qh IStracing >=4)
-    qh_errprint ("MERGING CYCLE", samecycle, newfacet, NULL, NULL);
-#endif /* !qh_NOtrace */
-  apex= SETfirstt_(samecycle->vertices, vertexT);
-  qh_makeridges (newfacet);
-  qh_mergecycle_neighbors (samecycle, newfacet);
-  qh_mergecycle_ridges (samecycle, newfacet);
-  qh_mergecycle_vneighbors (samecycle, newfacet);
-  if (SETfirstt_(newfacet->vertices, vertexT) != apex) 
-    qh_setaddnth (&newfacet->vertices, 0, apex);  /* apex has last id */
-  if (!newfacet->newfacet)
-    qh_newvertices (newfacet->vertices);
-  qh_mergecycle_facets (samecycle, newfacet);
-  qh_tracemerge (samecycle, newfacet);
-  /* check for degen_redundant_neighbors after qh_forcedmerges() */
-  if (traceonce) {
-    fprintf (qh ferr, "qh_mergecycle: end of trace facet\n");
-    qh IStracing= tracerestore;
-  }
-} /* mergecycle */
-
-/*---------------------------------
-  
-  qh_mergecycle_all( facetlist, wasmerge )
-    merge all samecycles of coplanar facets into horizon
-    don't merge facets with ->mergeridge (these already have ->normal)
-    all facets are simplicial from apex
-    all facet->cycledone == False
-
-  returns:
-    all newfacets merged into coplanar horizon facets
-    deleted vertices on  qh.del_vertices
-    sets wasmerge if any merge
-
-  see:
-    calls qh_mergecycle for multiple, same cycle facets
-
-  design:
-    for each facet on facetlist
-      skip facets with duplicate ridges and normals
-      check that facet is in a samecycle (->mergehorizon)
-      if facet only member of samecycle
-	sets vertex->delridge for all vertices except apex
-        merge facet into horizon
-      else
-        mark all facets in samecycle
-        remove facets with duplicate ridges from samecycle
-        merge samecycle into horizon (deletes facets from facetlist)
-*/
-void qh_mergecycle_all (facetT *facetlist, boolT *wasmerge) {
-  facetT *facet, *same, *prev, *horizon;
-  facetT *samecycle= NULL, *nextfacet, *nextsame;
-  vertexT *apex, *vertex, **vertexp;
-  int cycles=0, total=0, facets, nummerge;
-
-  trace2((qh ferr, "qh_mergecycle_all: begin\n"));
-  for (facet= facetlist; facet && (nextfacet= facet->next); facet= nextfacet) {
-    if (facet->normal)
-      continue;
-    if (!facet->mergehorizon) {
-      fprintf (qh ferr, "qh_mergecycle_all: f%d without normal\n", facet->id);
-      qh_errexit (qh_ERRqhull, facet, NULL);
-    }
-    horizon= SETfirstt_(facet->neighbors, facetT);
-    if (facet->f.samecycle == facet) {
-      zinc_(Zonehorizon);  
-      /* merge distance done in qh_findhorizon */
-      apex= SETfirstt_(facet->vertices, vertexT);
-      FOREACHvertex_(facet->vertices) {
-	if (vertex != apex)
-          vertex->delridge= True;
-      }
-      horizon->f.newcycle= NULL;
-      qh_mergefacet (facet, horizon, NULL, NULL, qh_MERGEapex);
-    }else {
-      samecycle= facet;
-      facets= 0;
-      prev= facet;
-      for (same= facet->f.samecycle; same;  /* FORALLsame_cycle_(facet) */
-	   same= (same == facet ? NULL :nextsame)) { /* ends at facet */
-	nextsame= same->f.samecycle;
-        if (same->cycledone || same->visible)
-          qh_infiniteloop (same);
-        same->cycledone= True;
-        if (same->normal) { 
-          prev->f.samecycle= same->f.samecycle; /* unlink ->mergeridge */
-	  same->f.samecycle= NULL;
-        }else {
-          prev= same;
-	  facets++;
-	}
-      }
-      while (nextfacet && nextfacet->cycledone)  /* will delete samecycle */
-	nextfacet= nextfacet->next;
-      horizon->f.newcycle= NULL;
-      qh_mergecycle (samecycle, horizon);
-      nummerge= horizon->nummerge + facets;
-      if (nummerge > qh_MAXnummerge) 
-      	horizon->nummerge= qh_MAXnummerge;
-      else
-        horizon->nummerge= nummerge;
-      zzinc_(Zcyclehorizon);
-      total += facets;
-      zzadd_(Zcyclefacettot, facets);
-      zmax_(Zcyclefacetmax, facets);
-    }
-    cycles++;
-  }
-  if (cycles)
-    *wasmerge= True;
-  trace1((qh ferr, "qh_mergecycle_all: merged %d same cycles or facets into coplanar horizons\n", cycles));
-} /* mergecycle_all */
-
-/*---------------------------------
-  
-  qh_mergecycle_facets( samecycle, newfacet )
-    finish merge of samecycle into newfacet
-
-  returns:
-    samecycle prepended to visible_list for later deletion and partitioning
-      each facet->f.replace == newfacet
-      
-    newfacet moved to end of qh.facet_list
-      makes newfacet a newfacet (get's facet1->id if it was old)
-      sets newfacet->newmerge
-      clears newfacet->center (unless merging into a large facet)
-      clears newfacet->tested and ridge->tested for facet1
-      
-    adds neighboring facets to facet_mergeset if redundant or degenerate
-
-  design:
-    make newfacet a new facet and set its flags
-    move samecycle facets to qh.visible_list for later deletion
-    unless newfacet is large
-      remove its centrum
-*/
-void qh_mergecycle_facets (facetT *samecycle, facetT *newfacet) {
-  facetT *same, *next;
-  
-  trace4((qh ferr, "qh_mergecycle_facets: make newfacet new and samecycle deleted\n"));  
-  qh_removefacet(newfacet);  /* append as a newfacet to end of qh facet_list */
-  qh_appendfacet(newfacet);
-  newfacet->newfacet= True;
-  newfacet->simplicial= False;
-  newfacet->newmerge= True;
-  
-  for (same= samecycle->f.samecycle; same; same= (same == samecycle ?  NULL : next)) {
-    next= same->f.samecycle;  /* reused by willdelete */
-    qh_willdelete (same, newfacet);
-  }
-  if (newfacet->center 
-      && qh_setsize (newfacet->vertices) <= qh hull_dim + qh_MAXnewcentrum) {
-    qh_memfree (newfacet->center, qh normal_size);
-    newfacet->center= NULL;
-  }
-  trace3((qh ferr, "qh_mergecycle_facets: merged facets from cycle f%d into f%d\n", 
-             samecycle->id, newfacet->id));
-} /* mergecycle_facets */
-
-/*---------------------------------
-  
-  qh_mergecycle_neighbors( samecycle, newfacet )
-    add neighbors for samecycle facets to newfacet
-
-  returns:
-    newfacet with updated neighbors and vice-versa
-    newfacet has ridges
-    all neighbors of newfacet marked with qh.visit_id
-    samecycle facets marked with qh.visit_id-1
-    ridges updated for simplicial neighbors of samecycle with a ridge
-
-  notes:
-    assumes newfacet not in samecycle
-    usually, samecycle facets are new, simplicial facets without internal ridges 
-      not so if horizon facet is coplanar to two different samecycles
-  
-  see:
-    qh_mergeneighbors()
-
-  design:
-    check samecycle
-    delete neighbors from newfacet that are also in samecycle
-    for each neighbor of a facet in samecycle
-      if neighbor is simplicial
-        if first visit
-          move the neighbor relation to newfacet
-          update facet links for its ridges
-        else
-          make ridges for neighbor
-          remove samecycle reference
-      else
-        update neighbor sets
-*/
-void qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet) {
-  facetT *same, *neighbor, **neighborp;
-  int delneighbors= 0, newneighbors= 0;
-  unsigned int samevisitid;
-  ridgeT *ridge, **ridgep;
-
-  samevisitid= ++qh visit_id;
-  FORALLsame_cycle_(samecycle) {
-    if (same->visitid == samevisitid || same->visible)
-      qh_infiniteloop (samecycle);
-    same->visitid= samevisitid;
-  }
-  newfacet->visitid= ++qh visit_id;
-  trace4((qh ferr, "qh_mergecycle_neighbors: delete shared neighbors from newfacet\n"));  
-  FOREACHneighbor_(newfacet) {
-    if (neighbor->visitid == samevisitid) {
-      SETref_(neighbor)= NULL;  /* samecycle neighbors deleted */
-      delneighbors++;
-    }else
-      neighbor->visitid= qh visit_id;
-  }
-  qh_setcompact (newfacet->neighbors);
-
-  trace4((qh ferr, "qh_mergecycle_neighbors: update neighbors\n"));  
-  FORALLsame_cycle_(samecycle) {
-    FOREACHneighbor_(same) {
-      if (neighbor->visitid == samevisitid)
-	continue;
-      if (neighbor->simplicial) {
-	if (neighbor->visitid != qh visit_id) {
-	  qh_setappend (&newfacet->neighbors, neighbor);
-	  qh_setreplace (neighbor->neighbors, same, newfacet);
-	  newneighbors++;
-	  neighbor->visitid= qh visit_id;
-	  FOREACHridge_(neighbor->ridges) { /* update ridge in case of qh_makeridges */
-	    if (ridge->top == same) {
-	      ridge->top= newfacet;
-	      break;
-	    }else if (ridge->bottom == same) {
-	      ridge->bottom= newfacet;
-	      break;
-	    }
-	  }
-	}else {
-	  qh_makeridges (neighbor);
-	  qh_setdel (neighbor->neighbors, same);
-	  /* same can't be horizon facet for neighbor */
-	}
-      }else { /* non-simplicial neighbor */
-        qh_setdel (neighbor->neighbors, same);
-        if (neighbor->visitid != qh visit_id) {
-          qh_setappend (&neighbor->neighbors, newfacet);
-          qh_setappend (&newfacet->neighbors, neighbor);
-          neighbor->visitid= qh visit_id;
-          newneighbors++;
-        } 
-      }
-    }
-  }
-  trace2((qh ferr, "qh_mergecycle_neighbors: deleted %d neighbors and added %d\n", 
-             delneighbors, newneighbors));
-} /* mergecycle_neighbors */
-
-/*---------------------------------
-  
-  qh_mergecycle_ridges( samecycle, newfacet )
-    add ridges/neighbors for facets in samecycle to newfacet
-    all new/old neighbors of newfacet marked with qh.visit_id
-    facets in samecycle marked with qh.visit_id-1
-    newfacet marked with qh.visit_id
-
-  returns:
-    newfacet has merged ridges
-  
-  notes:
-    ridge already updated for simplicial neighbors of samecycle with a ridge
-
-  see:
-    qh_mergeridges()
-    qh_makeridges()
-
-  design:
-    remove ridges between newfacet and samecycle
-    for each facet in samecycle
-      for each ridge in facet
-        update facet pointers in ridge
-        skip ridges processed in qh_mergecycle_neighors
-        free ridges between newfacet and samecycle
-        free ridges between facets of samecycle (on 2nd visit)
-        append remaining ridges to newfacet
-      if simpilicial facet
-        for each neighbor of facet
-          if simplicial facet
-          and not samecycle facet or newfacet
-            make ridge between neighbor and newfacet
-*/
-void qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet) {
-  facetT *same, *neighbor= NULL;
-  int numold=0, numnew=0;
-  int neighbor_i, neighbor_n;
-  unsigned int samevisitid;
-  ridgeT *ridge, **ridgep;
-  boolT toporient;
-  void **freelistp; /* used !qh_NOmem */
-
-  trace4((qh ferr, "qh_mergecycle_ridges: delete shared ridges from newfacet\n"));  
-  samevisitid= qh visit_id -1;
-  FOREACHridge_(newfacet->ridges) {
-    neighbor= otherfacet_(ridge, newfacet);
-    if (neighbor->visitid == samevisitid)
-      SETref_(ridge)= NULL; /* ridge free'd below */  
-  }
-  qh_setcompact (newfacet->ridges);
-  
-  trace4((qh ferr, "qh_mergecycle_ridges: add ridges to newfacet\n"));  
-  FORALLsame_cycle_(samecycle) {
-    FOREACHridge_(same->ridges) {
-      if (ridge->top == same) {
-        ridge->top= newfacet;
-	neighbor= ridge->bottom;
-      }else if (ridge->bottom == same) {
-	ridge->bottom= newfacet;
-	neighbor= ridge->top;
-      }else if (ridge->top == newfacet || ridge->bottom == newfacet) {
-        qh_setappend (&newfacet->ridges, ridge);
-        numold++;  /* already set by qh_mergecycle_neighbors */
-	continue;  
-      }else {
-	fprintf (qh ferr, "qhull internal error (qh_mergecycle_ridges): bad ridge r%d\n", ridge->id);
-	qh_errexit (qh_ERRqhull, NULL, ridge);
-      }
-      if (neighbor == newfacet) {
-        qh_setfree(&(ridge->vertices)); 
-        qh_memfree_(ridge, sizeof(ridgeT), freelistp);
-        numold++;
-      }else if (neighbor->visitid == samevisitid) {
-	qh_setdel (neighbor->ridges, ridge);
-	qh_setfree(&(ridge->vertices)); 
-	qh_memfree_(ridge, sizeof(ridgeT), freelistp);
-	numold++;
-      }else {
-        qh_setappend (&newfacet->ridges, ridge);
-        numold++;
-      }
-    }
-    if (same->ridges)
-      qh_settruncate (same->ridges, 0);
-    if (!same->simplicial)
-      continue;
-    FOREACHneighbor_i_(same) {       /* note: !newfact->simplicial */
-      if (neighbor->visitid != samevisitid && neighbor->simplicial) {
-        ridge= qh_newridge();
-        ridge->vertices= qh_setnew_delnthsorted (same->vertices, qh hull_dim,
-  					                  neighbor_i, 0);
-        toporient= same->toporient ^ (neighbor_i & 0x1);
-        if (toporient) {
-          ridge->top= newfacet;
-          ridge->bottom= neighbor;
-        }else {
-          ridge->top= neighbor;
-          ridge->bottom= newfacet;
-        }
-        qh_setappend(&(newfacet->ridges), ridge);
-        qh_setappend(&(neighbor->ridges), ridge);
-        numnew++;
-      }
-    }
-  }
-
-  trace2((qh ferr, "qh_mergecycle_ridges: found %d old ridges and %d new ones\n", 
-             numold, numnew));
-} /* mergecycle_ridges */
-
-/*---------------------------------
-  
-  qh_mergecycle_vneighbors( samecycle, newfacet )
-    create vertex neighbors for newfacet from vertices of facets in samecycle
-    samecycle marked with visitid == qh.visit_id - 1
-
-  returns:
-    newfacet vertices with updated neighbors
-    marks newfacet with qh.visit_id-1
-    deletes vertices that are merged away
-    sets delridge on all vertices (faster here than in mergecycle_ridges)
-
-  see:
-    qh_mergevertex_neighbors()
-
-  design:
-    for each vertex of samecycle facet
-      set vertex->delridge
-      delete samecycle facets from vertex neighbors
-      append newfacet to vertex neighbors
-      if vertex only in newfacet
-        delete it from newfacet
-        add it to qh.del_vertices for later deletion
-*/
-void qh_mergecycle_vneighbors (facetT *samecycle, facetT *newfacet) {
-  facetT *neighbor, **neighborp;
-  unsigned int mergeid;
-  vertexT *vertex, **vertexp, *apex;
-  setT *vertices;
-  
-  trace4((qh ferr, "qh_mergecycle_vneighbors: update vertex neighbors for newfacet\n"));  
-  mergeid= qh visit_id - 1;
-  newfacet->visitid= mergeid;
-  vertices= qh_basevertices (samecycle); /* temp */
-  apex= SETfirstt_(samecycle->vertices, vertexT);
-  qh_setappend (&vertices, apex);
-  FOREACHvertex_(vertices) {
-    vertex->delridge= True;
-    FOREACHneighbor_(vertex) {
-      if (neighbor->visitid == mergeid)
-        SETref_(neighbor)= NULL;
-    }
-    qh_setcompact (vertex->neighbors);
-    qh_setappend (&vertex->neighbors, newfacet);
-    if (!SETsecond_(vertex->neighbors)) {
-      zinc_(Zcyclevertex);
-      trace2((qh ferr, "qh_mergecycle_vneighbors: deleted v%d when merging cycle f%d into f%d\n",
-        vertex->id, samecycle->id, newfacet->id));
-      qh_setdelsorted (newfacet->vertices, vertex);
-      vertex->deleted= True;
-      qh_setappend (&qh del_vertices, vertex);
-    }
-  }
-  qh_settempfree (&vertices);
-  trace3((qh ferr, "qh_mergecycle_vneighbors: merged vertices from cycle f%d into f%d\n", 
-             samecycle->id, newfacet->id));
-} /* mergecycle_vneighbors */
-
-/*---------------------------------
-  
-  qh_mergefacet( facet1, facet2, mindist, maxdist, mergeapex )
-    merges facet1 into facet2
-    mergeapex==qh_MERGEapex if merging new facet into coplanar horizon
-    
-  returns:
-    qh.max_outside and qh.min_vertex updated
-    initializes vertex neighbors on first merge
-
-  returns:
-    facet2 contains facet1's vertices, neighbors, and ridges
-      facet2 moved to end of qh.facet_list
-      makes facet2 a newfacet
-      sets facet2->newmerge set
-      clears facet2->center (unless merging into a large facet)
-      clears facet2->tested and ridge->tested for facet1
-
-    facet1 prepended to visible_list for later deletion and partitioning
-      facet1->f.replace == facet2
-
-    adds neighboring facets to facet_mergeset if redundant or degenerate
-
-  notes: 
-    mindist/maxdist may be NULL
-    traces merge if fmax_(maxdist,-mindist) > TRACEdist
-
-  see: 
-    qh_mergecycle()
-
-  design:
-    trace merge and check for degenerate simplex
-    make ridges for both facets
-    update qh.max_outside, qh.max_vertex, qh.min_vertex
-    update facet2->maxoutside and keepcentrum
-    update facet2->nummerge
-    update tested flags for facet2
-    if facet1 is simplicial
-      merge facet1 into facet2
-    else
-      merge facet1's neighbors into facet2
-      merge facet1's ridges into facet2
-      merge facet1's vertices into facet2
-      merge facet1's vertex neighbors into facet2
-      add facet2's vertices to qh.new_vertexlist
-      unless qh_MERGEapex
-        test facet2 for degenerate or redundant neighbors
-      move facet1 to qh.visible_list for later deletion
-      move facet2 to end of qh.newfacet_list
-*/
-void qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex) {
-  boolT traceonce= False;
-  vertexT *vertex, **vertexp;
-  int tracerestore=0, nummerge;
-
-  if (facet1->tricoplanar || facet2->tricoplanar) {
-    if (!qh TRInormals) {
-      fprintf (qh ferr, "qh_mergefacet: does not work for tricoplanar facets.  Use option 'Q11'\n");
-      qh_errexit2 (qh_ERRqhull, facet1, facet2);
-    }
-    if (facet2->tricoplanar) {
-      facet2->tricoplanar= False;
-      facet2->keepcentrum= False;
-    }
-  }
-  zzinc_(Ztotmerge);
-  if (qh REPORTfreq2 && qh POSTmerging) {
-    if (zzval_(Ztotmerge) > qh mergereport + qh REPORTfreq2)
-      qh_tracemerging();
-  }
-#ifndef qh_NOtrace
-  if (qh build_cnt >= qh RERUN) {
-    if (mindist && (-*mindist > qh TRACEdist || *maxdist > qh TRACEdist)) {
-      tracerestore= 0;
-      qh IStracing= qh TRACElevel;
-      traceonce= True;
-      fprintf (qh ferr, "qh_mergefacet: ========= trace wide merge #%d (%2.2g) for f%d into f%d, last point was p%d\n", zzval_(Ztotmerge),
-	     fmax_(-*mindist, *maxdist), facet1->id, facet2->id, qh furthest_id);
-    }else if (facet1 == qh tracefacet || facet2 == qh tracefacet) {
-      tracerestore= qh IStracing;
-      qh IStracing= 4;
-      traceonce= True;
-      fprintf (qh ferr, "qh_mergefacet: ========= trace merge #%d involving f%d, furthest is p%d\n",
-		 zzval_(Ztotmerge), qh tracefacet_id,  qh furthest_id);
-    }
-  }
-  if (qh IStracing >= 2) {
-    realT mergemin= -2;
-    realT mergemax= -2;
-    
-    if (mindist) {
-      mergemin= *mindist;
-      mergemax= *maxdist;
-    }
-    fprintf (qh ferr, "qh_mergefacet: #%d merge f%d into f%d, mindist= %2.2g, maxdist= %2.2g\n", 
-    zzval_(Ztotmerge), facet1->id, facet2->id, mergemin, mergemax);
-  }
-#endif /* !qh_NOtrace */
-  if (facet1 == facet2 || facet1->visible || facet2->visible) {
-    fprintf (qh ferr, "qhull internal error (qh_mergefacet): either f%d and f%d are the same or one is a visible facet\n",
-	     facet1->id, facet2->id);
-    qh_errexit2 (qh_ERRqhull, facet1, facet2);
-  }
-  if (qh num_facets - qh num_visible <= qh hull_dim + 1) {
-    fprintf(qh ferr, "\n\
-qhull precision error: Only %d facets remain.  Can not merge another\n\
-pair.  The input is too degenerate or the convexity constraints are\n\
-too strong.\n", qh hull_dim+1);
-    if (qh hull_dim >= 5 && !qh MERGEexact)
-      fprintf(qh ferr, "Option 'Qx' may avoid this problem.\n");
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  if (!qh VERTEXneighbors)
-    qh_vertexneighbors();
-  qh_makeridges(facet1);
-  qh_makeridges(facet2);
-  if (qh IStracing >=4)
-    qh_errprint ("MERGING", facet1, facet2, NULL, NULL);
-  if (mindist) {
-    maximize_(qh max_outside, *maxdist);
-    maximize_(qh max_vertex, *maxdist);
-#if qh_MAXoutside
-    maximize_(facet2->maxoutside, *maxdist);
-#endif
-    minimize_(qh min_vertex, *mindist);
-    if (!facet2->keepcentrum 
-    && (*maxdist > qh WIDEfacet || *mindist < -qh WIDEfacet)) {
-      facet2->keepcentrum= True;
-      zinc_(Zwidefacet);
-    }
-  }
-  nummerge= facet1->nummerge + facet2->nummerge + 1;
-  if (nummerge >= qh_MAXnummerge) 
-    facet2->nummerge= qh_MAXnummerge;
-  else
-    facet2->nummerge= nummerge;
-  facet2->newmerge= True;
-  facet2->dupridge= False;
-  qh_updatetested  (facet1, facet2);
-  if (qh hull_dim > 2 && qh_setsize (facet1->vertices) == qh hull_dim)
-    qh_mergesimplex (facet1, facet2, mergeapex);
-  else {
-    qh vertex_visit++;
-    FOREACHvertex_(facet2->vertices)
-      vertex->visitid= qh vertex_visit;
-    if (qh hull_dim == 2) 
-      qh_mergefacet2d(facet1, facet2);
-    else {
-      qh_mergeneighbors(facet1, facet2);
-      qh_mergevertices(facet1->vertices, &facet2->vertices);
-    }
-    qh_mergeridges(facet1, facet2);
-    qh_mergevertex_neighbors(facet1, facet2);
-    if (!facet2->newfacet)
-      qh_newvertices (facet2->vertices);
-  }
-  if (!mergeapex)
-    qh_degen_redundant_neighbors (facet2, facet1);
-  if (facet2->coplanar || !facet2->newfacet) {
-    zinc_(Zmergeintohorizon);
-  }else if (!facet1->newfacet && facet2->newfacet) {
-    zinc_(Zmergehorizon);
-  }else {
-    zinc_(Zmergenew);
-  }
-  qh_willdelete (facet1, facet2);
-  qh_removefacet(facet2);  /* append as a newfacet to end of qh facet_list */
-  qh_appendfacet(facet2);
-  facet2->newfacet= True;
-  facet2->tested= False;
-  qh_tracemerge (facet1, facet2);
-  if (traceonce) {
-    fprintf (qh ferr, "qh_mergefacet: end of wide tracing\n");
-    qh IStracing= tracerestore;
-  }
-} /* mergefacet */
-
-
-/*---------------------------------
-  
-  qh_mergefacet2d( facet1, facet2 )
-    in 2d, merges neighbors and vertices of facet1 into facet2
-    
-  returns:
-    build ridges for neighbors if necessary
-    facet2 looks like a simplicial facet except for centrum, ridges
-      neighbors are opposite the corresponding vertex
-      maintains orientation of facet2
-
-  notes:
-    qh_mergefacet() retains non-simplicial structures
-      they are not needed in 2d, but later routines may use them
-    preserves qh.vertex_visit for qh_mergevertex_neighbors()
-  
-  design:
-    get vertices and neighbors
-    determine new vertices and neighbors
-    set new vertices and neighbors and adjust orientation
-    make ridges for new neighbor if needed
-*/
-void qh_mergefacet2d (facetT *facet1, facetT *facet2) {
-  vertexT *vertex1A, *vertex1B, *vertex2A, *vertex2B, *vertexA, *vertexB;
-  facetT *neighbor1A, *neighbor1B, *neighbor2A, *neighbor2B, *neighborA, *neighborB;
-
-  vertex1A= SETfirstt_(facet1->vertices, vertexT);
-  vertex1B= SETsecondt_(facet1->vertices, vertexT);
-  vertex2A= SETfirstt_(facet2->vertices, vertexT);
-  vertex2B= SETsecondt_(facet2->vertices, vertexT);
-  neighbor1A= SETfirstt_(facet1->neighbors, facetT);
-  neighbor1B= SETsecondt_(facet1->neighbors, facetT);
-  neighbor2A= SETfirstt_(facet2->neighbors, facetT);
-  neighbor2B= SETsecondt_(facet2->neighbors, facetT);
-  if (vertex1A == vertex2A) {
-    vertexA= vertex1B;
-    vertexB= vertex2B;
-    neighborA= neighbor2A;
-    neighborB= neighbor1A;
-  }else if (vertex1A == vertex2B) {
-    vertexA= vertex1B;
-    vertexB= vertex2A;
-    neighborA= neighbor2B;
-    neighborB= neighbor1A;
-  }else if (vertex1B == vertex2A) {
-    vertexA= vertex1A;
-    vertexB= vertex2B;
-    neighborA= neighbor2A;
-    neighborB= neighbor1B;
-  }else { /* 1B == 2B */
-    vertexA= vertex1A;
-    vertexB= vertex2A;
-    neighborA= neighbor2B;
-    neighborB= neighbor1B;
-  }
-  /* vertexB always from facet2, neighborB always from facet1 */
-  if (vertexA->id > vertexB->id) {
-    SETfirst_(facet2->vertices)= vertexA;
-    SETsecond_(facet2->vertices)= vertexB;
-    if (vertexB == vertex2A)
-      facet2->toporient= !facet2->toporient;
-    SETfirst_(facet2->neighbors)= neighborA;
-    SETsecond_(facet2->neighbors)= neighborB;
-  }else {
-    SETfirst_(facet2->vertices)= vertexB;
-    SETsecond_(facet2->vertices)= vertexA;
-    if (vertexB == vertex2B)
-      facet2->toporient= !facet2->toporient;
-    SETfirst_(facet2->neighbors)= neighborB;
-    SETsecond_(facet2->neighbors)= neighborA;
-  }
-  qh_makeridges (neighborB);
-  qh_setreplace(neighborB->neighbors, facet1, facet2);
-  trace4((qh ferr, "qh_mergefacet2d: merged v%d and neighbor f%d of f%d into f%d\n",
-       vertexA->id, neighborB->id, facet1->id, facet2->id));
-} /* mergefacet2d */
-
-
-/*---------------------------------
-  
-  qh_mergeneighbors( facet1, facet2 )
-    merges the neighbors of facet1 into facet2
-
-  see: 
-    qh_mergecycle_neighbors()
-
-  design:
-    for each neighbor of facet1
-      if neighbor is also a neighbor of facet2
-        if neighbor is simpilicial
-          make ridges for later deletion as a degenerate facet
-        update its neighbor set
-      else
-        move the neighbor relation to facet2
-    remove the neighbor relation for facet1 and facet2
-*/
-void qh_mergeneighbors(facetT *facet1, facetT *facet2) {
-  facetT *neighbor, **neighborp;
-
-  trace4((qh ferr, "qh_mergeneighbors: merge neighbors of f%d and f%d\n",
-	  facet1->id, facet2->id));
-  qh visit_id++;
-  FOREACHneighbor_(facet2) {
-    neighbor->visitid= qh visit_id;
-  }
-  FOREACHneighbor_(facet1) {
-    if (neighbor->visitid == qh visit_id) {
-      if (neighbor->simplicial)    /* is degen, needs ridges */
-	qh_makeridges (neighbor);
-      if (SETfirstt_(neighbor->neighbors, facetT) != facet1) /*keep newfacet->horizon*/
-	qh_setdel (neighbor->neighbors, facet1);
-      else {
-        qh_setdel(neighbor->neighbors, facet2);
-        qh_setreplace(neighbor->neighbors, facet1, facet2);
-      }
-    }else if (neighbor != facet2) {
-      qh_setappend(&(facet2->neighbors), neighbor);
-      qh_setreplace(neighbor->neighbors, facet1, facet2);
-    }
-  }
-  qh_setdel(facet1->neighbors, facet2);  /* here for makeridges */
-  qh_setdel(facet2->neighbors, facet1);
-} /* mergeneighbors */
-
-
-/*---------------------------------
-  
-  qh_mergeridges( facet1, facet2 )
-    merges the ridge set of facet1 into facet2
-
-  returns:
-    may delete all ridges for a vertex
-    sets vertex->delridge on deleted ridges
-
-  see:
-    qh_mergecycle_ridges()
-
-  design:
-    delete ridges between facet1 and facet2
-      mark (delridge) vertices on these ridges for later testing   
-    for each remaining ridge
-      rename facet1 to facet2  
-*/
-void qh_mergeridges(facetT *facet1, facetT *facet2) {
-  ridgeT *ridge, **ridgep;
-  vertexT *vertex, **vertexp;
-
-  trace4((qh ferr, "qh_mergeridges: merge ridges of f%d and f%d\n",
-	  facet1->id, facet2->id));
-  FOREACHridge_(facet2->ridges) {
-    if ((ridge->top == facet1) || (ridge->bottom == facet1)) {
-      FOREACHvertex_(ridge->vertices)
-        vertex->delridge= True;
-      qh_delridge(ridge);  /* expensive in high-d, could rebuild */
-      ridgep--; /*repeat*/
-    }
-  }
-  FOREACHridge_(facet1->ridges) {
-    if (ridge->top == facet1)
-      ridge->top= facet2;
-    else
-      ridge->bottom= facet2;
-    qh_setappend(&(facet2->ridges), ridge);
-  }
-} /* mergeridges */
-
-
-/*---------------------------------
-  
-  qh_mergesimplex( facet1, facet2, mergeapex )
-    merge simplicial facet1 into facet2
-    mergeapex==qh_MERGEapex if merging samecycle into horizon facet
-      vertex id is latest (most recently created)
-    facet1 may be contained in facet2
-    ridges exist for both facets
-
-  returns:
-    facet2 with updated vertices, ridges, neighbors
-    updated neighbors for facet1's vertices
-    facet1 not deleted
-    sets vertex->delridge on deleted ridges
-  
-  notes:
-    special case code since this is the most common merge
-    called from qh_mergefacet()
-
-  design:
-    if qh_MERGEapex
-      add vertices of facet2 to qh.new_vertexlist if necessary
-      add apex to facet2
-    else
-      for each ridge between facet1 and facet2
-        set vertex->delridge
-      determine the apex for facet1 (i.e., vertex to be merged)
-      unless apex already in facet2
-        insert apex into vertices for facet2
-      add vertices of facet2 to qh.new_vertexlist if necessary
-      add apex to qh.new_vertexlist if necessary
-      for each vertex of facet1
-        if apex
-          rename facet1 to facet2 in its vertex neighbors
-        else
-          delete facet1 from vertex neighors
-          if only in facet2
-            add vertex to qh.del_vertices for later deletion
-      for each ridge of facet1
-        delete ridges between facet1 and facet2
-        append other ridges to facet2 after renaming facet to facet2
-*/
-void qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex) {
-  vertexT *vertex, **vertexp, *apex;
-  ridgeT *ridge, **ridgep;
-  boolT issubset= False;
-  int vertex_i= -1, vertex_n;
-  facetT *neighbor, **neighborp, *otherfacet;
-
-  if (mergeapex) {
-    if (!facet2->newfacet)
-      qh_newvertices (facet2->vertices);  /* apex is new */
-    apex= SETfirstt_(facet1->vertices, vertexT);
-    if (SETfirstt_(facet2->vertices, vertexT) != apex) 
-      qh_setaddnth (&facet2->vertices, 0, apex);  /* apex has last id */
-    else
-      issubset= True;
-  }else {
-    zinc_(Zmergesimplex);
-    FOREACHvertex_(facet1->vertices)
-      vertex->seen= False;
-    FOREACHridge_(facet1->ridges) {
-      if (otherfacet_(ridge, facet1) == facet2) {
-	FOREACHvertex_(ridge->vertices) {
-	  vertex->seen= True;
-	  vertex->delridge= True;
-	}
-	break;
-      }
-    }
-    FOREACHvertex_(facet1->vertices) {
-      if (!vertex->seen)
-	break;  /* must occur */
-    }
-    apex= vertex;
-    trace4((qh ferr, "qh_mergesimplex: merge apex v%d of f%d into facet f%d\n",
-	  apex->id, facet1->id, facet2->id));
-    FOREACHvertex_i_(facet2->vertices) {
-      if (vertex->id < apex->id) {
-	break;
-      }else if (vertex->id == apex->id) {
-	issubset= True;
-	break;
-      }
-    }
-    if (!issubset)
-      qh_setaddnth (&facet2->vertices, vertex_i, apex);
-    if (!facet2->newfacet)
-      qh_newvertices (facet2->vertices);
-    else if (!apex->newlist) {
-      qh_removevertex (apex);
-      qh_appendvertex (apex);
-    }
-  }
-  trace4((qh ferr, "qh_mergesimplex: update vertex neighbors of f%d\n",
-	  facet1->id));
-  FOREACHvertex_(facet1->vertices) {
-    if (vertex == apex && !issubset)
-      qh_setreplace (vertex->neighbors, facet1, facet2);
-    else {
-      qh_setdel (vertex->neighbors, facet1);
-      if (!SETsecond_(vertex->neighbors))
-	qh_mergevertex_del (vertex, facet1, facet2);
-    }
-  }
-  trace4((qh ferr, "qh_mergesimplex: merge ridges and neighbors of f%d into f%d\n",
-	  facet1->id, facet2->id));
-  qh visit_id++;
-  FOREACHneighbor_(facet2)
-    neighbor->visitid= qh visit_id;
-  FOREACHridge_(facet1->ridges) {
-    otherfacet= otherfacet_(ridge, facet1);
-    if (otherfacet == facet2) {
-      qh_setdel (facet2->ridges, ridge);
-      qh_setfree(&(ridge->vertices)); 
-      qh_memfree (ridge, sizeof(ridgeT));
-      qh_setdel (facet2->neighbors, facet1);
-    }else {
-      qh_setappend (&facet2->ridges, ridge);
-      if (otherfacet->visitid != qh visit_id) {
-	qh_setappend (&facet2->neighbors, otherfacet);
-	qh_setreplace (otherfacet->neighbors, facet1, facet2);
-	otherfacet->visitid= qh visit_id;
-      }else {
-	if (otherfacet->simplicial)    /* is degen, needs ridges */
-	  qh_makeridges (otherfacet);
-	if (SETfirstt_(otherfacet->neighbors, facetT) != facet1)
-	  qh_setdel (otherfacet->neighbors, facet1);
-	else {   /*keep newfacet->neighbors->horizon*/
-	  qh_setdel(otherfacet->neighbors, facet2);
-	  qh_setreplace(otherfacet->neighbors, facet1, facet2);
-	}
-      }
-      if (ridge->top == facet1) /* wait until after qh_makeridges */
-	ridge->top= facet2;
-      else 
-	ridge->bottom= facet2;
-    }
-  }
-  SETfirst_(facet1->ridges)= NULL; /* it will be deleted */
-  trace3((qh ferr, "qh_mergesimplex: merged simplex f%d apex v%d into facet f%d\n",
-	  facet1->id, getid_(apex), facet2->id));
-} /* mergesimplex */
-
-/*---------------------------------
-  
-  qh_mergevertex_del( vertex, facet1, facet2 )
-    delete a vertex because of merging facet1 into facet2
-
-  returns:
-    deletes vertex from facet2
-    adds vertex to qh.del_vertices for later deletion 
-*/
-void qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2) {
-
-  zinc_(Zmergevertex);
-  trace2((qh ferr, "qh_mergevertex_del: deleted v%d when merging f%d into f%d\n",
-          vertex->id, facet1->id, facet2->id));
-  qh_setdelsorted (facet2->vertices, vertex);
-  vertex->deleted= True;
-  qh_setappend (&qh del_vertices, vertex);
-} /* mergevertex_del */
-
-/*---------------------------------
-  
-  qh_mergevertex_neighbors( facet1, facet2 )
-    merge the vertex neighbors of facet1 to facet2
-
-  returns:
-    if vertex is current qh.vertex_visit
-      deletes facet1 from vertex->neighbors
-    else
-      renames facet1 to facet2 in vertex->neighbors 
-    deletes vertices if only one neighbor
-  
-  notes:
-    assumes vertex neighbor sets are good
-*/
-void qh_mergevertex_neighbors(facetT *facet1, facetT *facet2) {
-  vertexT *vertex, **vertexp;
-
-  trace4((qh ferr, "qh_mergevertex_neighbors: merge vertex neighbors of f%d and f%d\n",
-	  facet1->id, facet2->id));
-  if (qh tracevertex) {
-    fprintf (qh ferr, "qh_mergevertex_neighbors: of f%d and f%d at furthest p%d f0= %p\n",
-	     facet1->id, facet2->id, qh furthest_id, qh tracevertex->neighbors->e[0].p);
-    qh_errprint ("TRACE", NULL, NULL, NULL, qh tracevertex);
-  }
-  FOREACHvertex_(facet1->vertices) {
-    if (vertex->visitid != qh vertex_visit) 
-      qh_setreplace(vertex->neighbors, facet1, facet2);
-    else {
-      qh_setdel(vertex->neighbors, facet1);
-      if (!SETsecond_(vertex->neighbors))
-	qh_mergevertex_del (vertex, facet1, facet2);
-    }
-  }
-  if (qh tracevertex) 
-    qh_errprint ("TRACE", NULL, NULL, NULL, qh tracevertex);
-} /* mergevertex_neighbors */
-
-
-/*---------------------------------
-  
-  qh_mergevertices( vertices1, vertices2 )
-    merges the vertex set of facet1 into facet2
-
-  returns:
-    replaces vertices2 with merged set
-    preserves vertex_visit for qh_mergevertex_neighbors
-    updates qh.newvertex_list
-
-  design:
-    create a merged set of both vertices (in inverse id order)
-*/
-void qh_mergevertices(setT *vertices1, setT **vertices2) {
-  int newsize= qh_setsize(vertices1)+qh_setsize(*vertices2) - qh hull_dim + 1;
-  setT *mergedvertices;
-  vertexT *vertex, **vertexp, **vertex2= SETaddr_(*vertices2, vertexT);
-
-  mergedvertices= qh_settemp (newsize);
-  FOREACHvertex_(vertices1) {
-    if (!*vertex2 || vertex->id > (*vertex2)->id)
-      qh_setappend (&mergedvertices, vertex);
-    else {
-      while (*vertex2 && (*vertex2)->id > vertex->id)
-	qh_setappend (&mergedvertices, *vertex2++);
-      if (!*vertex2 || (*vertex2)->id < vertex->id)
-	qh_setappend (&mergedvertices, vertex);
-      else
-	qh_setappend (&mergedvertices, *vertex2++);
-    }
-  }
-  while (*vertex2)
-    qh_setappend (&mergedvertices, *vertex2++);
-  if (newsize < qh_setsize (mergedvertices)) {
-    fprintf (qh ferr, "qhull internal error (qh_mergevertices): facets did not share a ridge\n");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  qh_setfree(vertices2);
-  *vertices2= mergedvertices;
-  qh_settemppop ();
-} /* mergevertices */
-
-
-/*---------------------------------
-  
-  qh_neighbor_intersections( vertex )
-    return intersection of all vertices in vertex->neighbors except for vertex
-
-  returns:
-    returns temporary set of vertices
-    does not include vertex
-    NULL if a neighbor is simplicial
-    NULL if empty set
-    
-  notes:
-    used for renaming vertices
-
-  design:
-    initialize the intersection set with vertices of the first two neighbors
-    delete vertex from the intersection
-    for each remaining neighbor
-      intersect its vertex set with the intersection set
-      return NULL if empty
-    return the intersection set  
-*/
-setT *qh_neighbor_intersections (vertexT *vertex) {
-  facetT *neighbor, **neighborp, *neighborA, *neighborB;
-  setT *intersect;
-  int neighbor_i, neighbor_n;
-
-  FOREACHneighbor_(vertex) {
-    if (neighbor->simplicial)
-      return NULL;
-  }
-  neighborA= SETfirstt_(vertex->neighbors, facetT);
-  neighborB= SETsecondt_(vertex->neighbors, facetT);
-  zinc_(Zintersectnum);
-  if (!neighborA)
-    return NULL;
-  if (!neighborB)
-    intersect= qh_setcopy (neighborA->vertices, 0);
-  else
-    intersect= qh_vertexintersect_new (neighborA->vertices, neighborB->vertices);
-  qh_settemppush (intersect);
-  qh_setdelsorted (intersect, vertex);
-  FOREACHneighbor_i_(vertex) {
-    if (neighbor_i >= 2) {
-      zinc_(Zintersectnum);
-      qh_vertexintersect (&intersect, neighbor->vertices);
-      if (!SETfirst_(intersect)) {
-        zinc_(Zintersectfail);
-        qh_settempfree (&intersect);
-        return NULL;
-      }
-    }
-  }
-  trace3((qh ferr, "qh_neighbor_intersections: %d vertices in neighbor intersection of v%d\n", 
-          qh_setsize (intersect), vertex->id));
-  return intersect;
-} /* neighbor_intersections */
-
-/*---------------------------------
-  
-  qh_newvertices( vertices )
-    add vertices to end of qh.vertex_list (marks as new vertices)
-
-  returns:
-    vertices on qh.newvertex_list
-    vertex->newlist set
-*/
-void qh_newvertices (setT *vertices) {
-  vertexT *vertex, **vertexp;
-
-  FOREACHvertex_(vertices) {
-    if (!vertex->newlist) {
-      qh_removevertex (vertex);
-      qh_appendvertex (vertex);
-    }
-  }
-} /* newvertices */
-
-/*---------------------------------
-  
-  qh_reducevertices()
-    reduce extra vertices, shared vertices, and redundant vertices
-    facet->newmerge is set if merged since last call
-    if !qh.MERGEvertices, only removes extra vertices
-
-  returns:
-    True if also merged degen_redundant facets
-    vertices are renamed if possible
-    clears facet->newmerge and vertex->delridge
-
-  notes:
-    ignored if 2-d
-
-  design:
-    merge any degenerate or redundant facets
-    for each newly merged facet
-      remove extra vertices
-    if qh.MERGEvertices
-      for each newly merged facet
-        for each vertex
-          if vertex was on a deleted ridge
-            rename vertex if it is shared
-      remove delridge flag from new vertices
-*/
-boolT qh_reducevertices (void) {
-  int numshare=0, numrename= 0;
-  boolT degenredun= False;
-  facetT *newfacet;
-  vertexT *vertex, **vertexp;
-
-  if (qh hull_dim == 2) 
-    return False;
-  if (qh_merge_degenredundant())
-    degenredun= True;
- LABELrestart:
-  FORALLnew_facets {
-    if (newfacet->newmerge) { 
-      if (!qh MERGEvertices)
-        newfacet->newmerge= False;
-      qh_remove_extravertices (newfacet);
-    }
-  }
-  if (!qh MERGEvertices)
-    return False;
-  FORALLnew_facets {
-    if (newfacet->newmerge) {
-      newfacet->newmerge= False;
-      FOREACHvertex_(newfacet->vertices) {
-	if (vertex->delridge) {
-	  if (qh_rename_sharedvertex (vertex, newfacet)) {
-	    numshare++;
-	    vertexp--; /* repeat since deleted vertex */
-	  }
-        }
-      }
-    }
-  }
-  FORALLvertex_(qh newvertex_list) {
-    if (vertex->delridge && !vertex->deleted) {
-      vertex->delridge= False;
-      if (qh hull_dim >= 4 && qh_redundant_vertex (vertex)) {
-	numrename++;
-	if (qh_merge_degenredundant()) {
-	  degenredun= True;
-	  goto LABELrestart;
-	}
-      }
-    }
-  }
-  trace1((qh ferr, "qh_reducevertices: renamed %d shared vertices and %d redundant vertices. Degen? %d\n",
-	  numshare, numrename, degenredun));
-  return degenredun;
-} /* reducevertices */
-      
-/*---------------------------------
-  
-  qh_redundant_vertex( vertex )
-    detect and rename a redundant vertex
-    vertices have full vertex->neighbors 
-
-  returns:
-    returns true if find a redundant vertex
-      deletes vertex (vertex->deleted)
-  
-  notes:
-    only needed if vertex->delridge and hull_dim >= 4
-    may add degenerate facets to qh.facet_mergeset
-    doesn't change vertex->neighbors or create redundant facets
-
-  design:
-    intersect vertices of all facet neighbors of vertex
-    determine ridges for these vertices
-    if find a new vertex for vertex amoung these ridges and vertices
-      rename vertex to the new vertex
-*/
-vertexT *qh_redundant_vertex (vertexT *vertex) {
-  vertexT *newvertex= NULL;
-  setT *vertices, *ridges;
-
-  trace3((qh ferr, "qh_redundant_vertex: check if v%d can be renamed\n", vertex->id));  
-  if ((vertices= qh_neighbor_intersections (vertex))) {
-    ridges= qh_vertexridges (vertex);
-    if ((newvertex= qh_find_newvertex (vertex, vertices, ridges)))
-      qh_renamevertex (vertex, newvertex, ridges, NULL, NULL);
-    qh_settempfree (&ridges);
-    qh_settempfree (&vertices);
-  }
-  return newvertex;
-} /* redundant_vertex */
-
-/*---------------------------------
-  
-  qh_remove_extravertices( facet )
-    remove extra vertices from non-simplicial facets
-
-  returns:
-    returns True if it finds them
-
-  design:
-    for each vertex in facet
-      if vertex not in a ridge (i.e., no longer used)
-        delete vertex from facet
-        delete facet from vertice's neighbors
-        unless vertex in another facet
-          add vertex to qh.del_vertices for later deletion
-*/
-boolT qh_remove_extravertices (facetT *facet) {
-  ridgeT *ridge, **ridgep;
-  vertexT *vertex, **vertexp;
-  boolT foundrem= False;
-
-  trace4((qh ferr, "qh_remove_extravertices: test f%d for extra vertices\n",
-	  facet->id));
-  FOREACHvertex_(facet->vertices)
-    vertex->seen= False;
-  FOREACHridge_(facet->ridges) { 
-    FOREACHvertex_(ridge->vertices)
-      vertex->seen= True;
-  }
-  FOREACHvertex_(facet->vertices) {
-    if (!vertex->seen) {
-      foundrem= True;
-      zinc_(Zremvertex);
-      qh_setdelsorted (facet->vertices, vertex);
-      qh_setdel (vertex->neighbors, facet);
-      if (!qh_setsize (vertex->neighbors)) {
-	vertex->deleted= True;
-	qh_setappend (&qh del_vertices, vertex);
-	zinc_(Zremvertexdel);
-	trace2((qh ferr, "qh_remove_extravertices: v%d deleted because it's lost all ridges\n", vertex->id));
-      }else
-	trace3((qh ferr, "qh_remove_extravertices: v%d removed from f%d because it's lost all ridges\n", vertex->id, facet->id));
-      vertexp--; /*repeat*/
-    }
-  }
-  return foundrem;
-} /* remove_extravertices */
-
-/*---------------------------------
-  
-  qh_rename_sharedvertex( vertex, facet )
-    detect and rename if shared vertex in facet
-    vertices have full ->neighbors
-
-  returns:
-    newvertex or NULL
-    the vertex may still exist in other facets (i.e., a neighbor was pinched)
-    does not change facet->neighbors
-    updates vertex->neighbors
-  
-  notes:
-    a shared vertex for a facet is only in ridges to one neighbor
-    this may undo a pinched facet
- 
-    it does not catch pinches involving multiple facets.  These appear
-      to be difficult to detect, since an exhaustive search is too expensive.
-
-  design:
-    if vertex only has two neighbors
-      determine the ridges that contain the vertex
-      determine the vertices shared by both neighbors
-      if can find a new vertex in this set
-        rename the vertex to the new vertex
-*/
-vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet) {
-  facetT *neighbor, **neighborp, *neighborA= NULL;
-  setT *vertices, *ridges;
-  vertexT *newvertex;
-
-  if (qh_setsize (vertex->neighbors) == 2) {
-    neighborA= SETfirstt_(vertex->neighbors, facetT);
-    if (neighborA == facet)
-      neighborA= SETsecondt_(vertex->neighbors, facetT);
-  }else if (qh hull_dim == 3)
-    return NULL;
-  else {
-    qh visit_id++;
-    FOREACHneighbor_(facet)
-      neighbor->visitid= qh visit_id;
-    FOREACHneighbor_(vertex) {
-      if (neighbor->visitid == qh visit_id) {
-        if (neighborA)
-          return NULL;
-        neighborA= neighbor;
-      }
-    }
-    if (!neighborA) {
-      fprintf (qh ferr, "qhull internal error (qh_rename_sharedvertex): v%d's neighbors not in f%d\n",
-        vertex->id, facet->id);
-      qh_errprint ("ERRONEOUS", facet, NULL, NULL, vertex);
-      qh_errexit (qh_ERRqhull, NULL, NULL);
-    }
-  }
-  /* the vertex is shared by facet and neighborA */
-  ridges= qh_settemp (qh TEMPsize);
-  neighborA->visitid= ++qh visit_id;
-  qh_vertexridges_facet (vertex, facet, &ridges);
-  trace2((qh ferr, "qh_rename_sharedvertex: p%d (v%d) is shared by f%d (%d ridges) and f%d\n",
-    qh_pointid(vertex->point), vertex->id, facet->id, qh_setsize (ridges), neighborA->id));
-  zinc_(Zintersectnum);
-  vertices= qh_vertexintersect_new (facet->vertices, neighborA->vertices);
-  qh_setdel (vertices, vertex);
-  qh_settemppush (vertices);
-  if ((newvertex= qh_find_newvertex (vertex, vertices, ridges))) 
-    qh_renamevertex (vertex, newvertex, ridges, facet, neighborA);
-  qh_settempfree (&vertices);
-  qh_settempfree (&ridges);
-  return newvertex;
-} /* rename_sharedvertex */
-
-/*---------------------------------
-  
-  qh_renameridgevertex( ridge, oldvertex, newvertex )
-    renames oldvertex as newvertex in ridge
-
-  returns:
-  
-  design:
-    delete oldvertex from ridge
-    if newvertex already in ridge
-      copy ridge->noconvex to another ridge if possible
-      delete the ridge
-    else
-      insert newvertex into the ridge
-      adjust the ridge's orientation
-*/
-void qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex) {
-  int nth= 0, oldnth;
-  facetT *temp;
-  vertexT *vertex, **vertexp;
-
-  oldnth= qh_setindex (ridge->vertices, oldvertex);
-  qh_setdelnthsorted (ridge->vertices, oldnth);
-  FOREACHvertex_(ridge->vertices) {
-    if (vertex == newvertex) {
-      zinc_(Zdelridge);
-      if (ridge->nonconvex) /* only one ridge has nonconvex set */
-	qh_copynonconvex (ridge);
-      qh_delridge (ridge);
-      trace2((qh ferr, "qh_renameridgevertex: ridge r%d deleted.  It contained both v%d and v%d\n",
-        ridge->id, oldvertex->id, newvertex->id));
-      return;
-    }
-    if (vertex->id < newvertex->id)
-      break;
-    nth++;
-  }
-  qh_setaddnth(&ridge->vertices, nth, newvertex);
-  if (abs(oldnth - nth)%2) {
-    trace3((qh ferr, "qh_renameridgevertex: swapped the top and bottom of ridge r%d\n", 
-	    ridge->id));
-    temp= ridge->top;
-    ridge->top= ridge->bottom;
-    ridge->bottom= temp;
-  }
-} /* renameridgevertex */
-
-
-/*---------------------------------
-  
-  qh_renamevertex( oldvertex, newvertex, ridges, oldfacet, neighborA )
-    renames oldvertex as newvertex in ridges 
-    gives oldfacet/neighborA if oldvertex is shared between two facets
-
-  returns:
-    oldvertex may still exist afterwards
-    
-
-  notes:
-    can not change neighbors of newvertex (since it's a subset)
-
-  design:
-    for each ridge in ridges
-      rename oldvertex to newvertex and delete degenerate ridges
-    if oldfacet not defined
-      for each neighbor of oldvertex
-        delete oldvertex from neighbor's vertices
-        remove extra vertices from neighbor
-      add oldvertex to qh.del_vertices
-    else if oldvertex only between oldfacet and neighborA
-      delete oldvertex from oldfacet and neighborA
-      add oldvertex to qh.del_vertices
-    else oldvertex is in oldfacet and neighborA and other facets (i.e., pinched)
-      delete oldvertex from oldfacet
-      delete oldfacet from oldvertice's neighbors
-      remove extra vertices (e.g., oldvertex) from neighborA
-*/
-void qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges, facetT *oldfacet, facetT *neighborA) {
-  facetT *neighbor, **neighborp;
-  ridgeT *ridge, **ridgep;
-  boolT istrace= False;
-
-  if (qh IStracing >= 2 || oldvertex->id == qh tracevertex_id ||
-	newvertex->id == qh tracevertex_id)
-    istrace= True;
-  FOREACHridge_(ridges) 
-    qh_renameridgevertex (ridge, oldvertex, newvertex);
-  if (!oldfacet) {
-    zinc_(Zrenameall);
-    if (istrace)
-      fprintf (qh ferr, "qh_renamevertex: renamed v%d to v%d in several facets\n",
-               oldvertex->id, newvertex->id);
-    FOREACHneighbor_(oldvertex) {
-      qh_maydropneighbor (neighbor);
-      qh_setdelsorted (neighbor->vertices, oldvertex);
-      if (qh_remove_extravertices (neighbor))
-        neighborp--; /* neighbor may be deleted */
-    }
-    if (!oldvertex->deleted) {
-      oldvertex->deleted= True;
-      qh_setappend (&qh del_vertices, oldvertex);
-    }
-  }else if (qh_setsize (oldvertex->neighbors) == 2) {
-    zinc_(Zrenameshare);
-    if (istrace)
-      fprintf (qh ferr, "qh_renamevertex: renamed v%d to v%d in oldfacet f%d\n", 
-               oldvertex->id, newvertex->id, oldfacet->id);
-    FOREACHneighbor_(oldvertex)
-      qh_setdelsorted (neighbor->vertices, oldvertex);
-    oldvertex->deleted= True;
-    qh_setappend (&qh del_vertices, oldvertex);
-  }else {
-    zinc_(Zrenamepinch);
-    if (istrace || qh IStracing)
-      fprintf (qh ferr, "qh_renamevertex: renamed pinched v%d to v%d between f%d and f%d\n", 
-               oldvertex->id, newvertex->id, oldfacet->id, neighborA->id);
-    qh_setdelsorted (oldfacet->vertices, oldvertex);
-    qh_setdel (oldvertex->neighbors, oldfacet);
-    qh_remove_extravertices (neighborA);
-  }
-} /* renamevertex */
-
-
-/*---------------------------------
-  
-  qh_test_appendmerge( facet, neighbor )
-    tests facet/neighbor for convexity
-    appends to mergeset if non-convex
-    if pre-merging, 
-      nop if qh.SKIPconvex, or qh.MERGEexact and coplanar
-
-  returns:
-    true if appends facet/neighbor to mergeset
-    sets facet->center as needed
-    does not change facet->seen
-
-  design:
-    if qh.cos_max is defined
-      if the angle between facet normals is too shallow
-        append an angle-coplanar merge to qh.mergeset
-        return True
-    make facet's centrum if needed
-    if facet's centrum is above the neighbor
-      set isconcave
-    else
-      if facet's centrum is not below the neighbor
-        set iscoplanar
-      make neighbor's centrum if needed
-      if neighbor's centrum is above the facet
-        set isconcave
-      else if neighbor's centrum is not below the facet
-        set iscoplanar
-   if isconcave or iscoplanar
-     get angle if needed
-     append concave or coplanar merge to qh.mergeset
-*/
-boolT qh_test_appendmerge (facetT *facet, facetT *neighbor) {
-  realT dist, dist2= -REALmax, angle= -REALmax;
-  boolT isconcave= False, iscoplanar= False, okangle= False;
-
-  if (qh SKIPconvex && !qh POSTmerging)
-    return False;
-  if ((!qh MERGEexact || qh POSTmerging) && qh cos_max < REALmax/2) {
-    angle= qh_getangle(facet->normal, neighbor->normal);
-    zinc_(Zangletests);
-    if (angle > qh cos_max) {
-      zinc_(Zcoplanarangle);
-      qh_appendmergeset(facet, neighbor, MRGanglecoplanar, &angle);
-      trace2((qh ferr, "qh_test_appendmerge: coplanar angle %4.4g between f%d and f%d\n",
-         angle, facet->id, neighbor->id));
-      return True;
-    }else
-      okangle= True;
-  }
-  if (!facet->center)
-    facet->center= qh_getcentrum (facet);
-  zzinc_(Zcentrumtests);
-  qh_distplane(facet->center, neighbor, &dist);
-  if (dist > qh centrum_radius)
-    isconcave= True;
-  else {
-    if (dist > -qh centrum_radius)
-      iscoplanar= True;
-    if (!neighbor->center)
-      neighbor->center= qh_getcentrum (neighbor);
-    zzinc_(Zcentrumtests);
-    qh_distplane(neighbor->center, facet, &dist2);
-    if (dist2 > qh centrum_radius)
-      isconcave= True;
-    else if (!iscoplanar && dist2 > -qh centrum_radius)
-      iscoplanar= True;
-  }
-  if (!isconcave && (!iscoplanar || (qh MERGEexact && !qh POSTmerging)))
-    return False;
-  if (!okangle && qh ANGLEmerge) {
-    angle= qh_getangle(facet->normal, neighbor->normal);
-    zinc_(Zangletests);
-  }
-  if (isconcave) {
-    zinc_(Zconcaveridge);
-    if (qh ANGLEmerge)
-      angle += qh_ANGLEconcave + 0.5;
-    qh_appendmergeset(facet, neighbor, MRGconcave, &angle);
-    trace0((qh ferr, "qh_test_appendmerge: concave f%d to f%d dist %4.4g and reverse dist %4.4g angle %4.4g during p%d\n",
-	   facet->id, neighbor->id, dist, dist2, angle, qh furthest_id));
-  }else /* iscoplanar */ {
-    zinc_(Zcoplanarcentrum);
-    qh_appendmergeset(facet, neighbor, MRGcoplanar, &angle);
-    trace2((qh ferr, "qh_test_appendmerge: coplanar f%d to f%d dist %4.4g, reverse dist %4.4g angle %4.4g\n",
-	      facet->id, neighbor->id, dist, dist2, angle));
-  }
-  return True;
-} /* test_appendmerge */
-
-/*---------------------------------
-  
-  qh_test_vneighbors()
-    test vertex neighbors for convexity
-    tests all facets on qh.newfacet_list
-
-  returns:
-    true if non-convex vneighbors appended to qh.facet_mergeset
-    initializes vertex neighbors if needed
-
-  notes:
-    assumes all facet neighbors have been tested
-    this can be expensive
-    this does not guarantee that a centrum is below all facets
-      but it is unlikely
-    uses qh.visit_id
-
-  design:
-    build vertex neighbors if necessary
-    for all new facets
-      for all vertices
-        for each unvisited facet neighbor of the vertex
-          test new facet and neighbor for convexity
-*/
-boolT qh_test_vneighbors (void /* qh newfacet_list */) {
-  facetT *newfacet, *neighbor, **neighborp;
-  vertexT *vertex, **vertexp;
-  int nummerges= 0;
-
-  trace1((qh ferr, "qh_test_vneighbors: testing vertex neighbors for convexity\n"));
-  if (!qh VERTEXneighbors)
-    qh_vertexneighbors();
-  FORALLnew_facets 
-    newfacet->seen= False;
-  FORALLnew_facets {
-    newfacet->seen= True;
-    newfacet->visitid= qh visit_id++;
-    FOREACHneighbor_(newfacet)
-      newfacet->visitid= qh visit_id;
-    FOREACHvertex_(newfacet->vertices) {
-      FOREACHneighbor_(vertex) {
-      	if (neighbor->seen || neighbor->visitid == qh visit_id)
-      	  continue;
-      	if (qh_test_appendmerge (newfacet, neighbor))
-          nummerges++;
-      }
-    }
-  }
-  zadd_(Ztestvneighbor, nummerges);
-  trace1((qh ferr, "qh_test_vneighbors: found %d non-convex, vertex neighbors\n",
-           nummerges));
-  return (nummerges > 0);    
-} /* test_vneighbors */
-
-/*---------------------------------
-  
-  qh_tracemerge( facet1, facet2 )
-    print trace message after merge
-*/
-void qh_tracemerge (facetT *facet1, facetT *facet2) {
-  boolT waserror= False;
-
-#ifndef qh_NOtrace
-  if (qh IStracing >= 4) 
-    qh_errprint ("MERGED", facet2, NULL, NULL, NULL);
-  if (facet2 == qh tracefacet || (qh tracevertex && qh tracevertex->newlist)) {
-    fprintf (qh ferr, "qh_tracemerge: trace facet and vertex after merge of f%d and f%d, furthest p%d\n", facet1->id, facet2->id, qh furthest_id);
-    if (facet2 != qh tracefacet)
-      qh_errprint ("TRACE", qh tracefacet, 
-        (qh tracevertex && qh tracevertex->neighbors) ? 
-           SETfirstt_(qh tracevertex->neighbors, facetT) : NULL,
-        NULL, qh tracevertex);      
-  }
-  if (qh tracevertex) {
-    if (qh tracevertex->deleted)
-      fprintf (qh ferr, "qh_tracemerge: trace vertex deleted at furthest p%d\n",
-	    qh furthest_id);
-    else
-      qh_checkvertex (qh tracevertex);
-  }
-  if (qh tracefacet) {
-    qh_checkfacet (qh tracefacet, True, &waserror);
-    if (waserror)
-      qh_errexit (qh_ERRqhull, qh tracefacet, NULL);
-  }
-#endif /* !qh_NOtrace */
-  if (qh CHECKfrequently || qh IStracing >= 4) { /* can't check polygon here */
-    qh_checkfacet (facet2, True, &waserror);
-    if (waserror)
-      qh_errexit(qh_ERRqhull, NULL, NULL);
-  }
-} /* tracemerge */
-
-/*---------------------------------
-  
-  qh_tracemerging()
-    print trace message during POSTmerging
-
-  returns:
-    updates qh.mergereport
-  
-  notes:
-    called from qh_mergecycle() and qh_mergefacet()
-  
-  see:
-    qh_buildtracing()
-*/
-void qh_tracemerging (void) {
-  realT cpu;
-  int total;
-  time_t timedata;
-  struct tm *tp;
-
-  qh mergereport= zzval_(Ztotmerge);
-  time (&timedata);
-  tp= localtime (&timedata);
-  cpu= qh_CPUclock;
-  cpu /= qh_SECticks;
-  total= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
-  fprintf (qh ferr, "\n\
-At %d:%d:%d & %2.5g CPU secs, qhull has merged %d facets.  The hull\n\
-  contains %d facets and %d vertices.\n",
-      tp->tm_hour, tp->tm_min, tp->tm_sec, cpu,
-      total, qh num_facets - qh num_visible,
-      qh num_vertices-qh_setsize (qh del_vertices));
-} /* tracemerging */
-
-/*---------------------------------
-  
-  qh_updatetested( facet1, facet2 )
-    clear facet2->tested and facet1->ridge->tested for merge
-
-  returns:
-    deletes facet2->center unless it's already large
-      if so, clears facet2->ridge->tested
-
-  design:
-    clear facet2->tested
-    clear ridge->tested for facet1's ridges
-    if facet2 has a centrum
-      if facet2 is large
-        set facet2->keepcentrum 
-      else if facet2 has 3 vertices due to many merges, or not large and post merging
-        clear facet2->keepcentrum
-      unless facet2->keepcentrum
-        clear facet2->center to recompute centrum later
-        clear ridge->tested for facet2's ridges
-*/
-void qh_updatetested (facetT *facet1, facetT *facet2) {
-  ridgeT *ridge, **ridgep;
-  int size;
-  
-  facet2->tested= False;
-  FOREACHridge_(facet1->ridges)
-    ridge->tested= False;
-  if (!facet2->center)
-    return;
-  size= qh_setsize (facet2->vertices);
-  if (!facet2->keepcentrum) {
-    if (size > qh hull_dim + qh_MAXnewcentrum) {
-      facet2->keepcentrum= True;
-      zinc_(Zwidevertices);
-    }
-  }else if (size <= qh hull_dim + qh_MAXnewcentrum) {
-    /* center and keepcentrum was set */
-    if (size == qh hull_dim || qh POSTmerging)
-      facet2->keepcentrum= False; /* if many merges need to recompute centrum */
-  }
-  if (!facet2->keepcentrum) {
-    qh_memfree (facet2->center, qh normal_size);
-    facet2->center= NULL;
-    FOREACHridge_(facet2->ridges)
-      ridge->tested= False;
-  }
-} /* updatetested */
-
-/*---------------------------------
-  
-  qh_vertexridges( vertex )
-    return temporary set of ridges adjacent to a vertex
-    vertex->neighbors defined
-
-  ntoes:
-    uses qh.visit_id
-    does not include implicit ridges for simplicial facets
-
-  design:
-    for each neighbor of vertex
-      add ridges that include the vertex to ridges  
-*/
-setT *qh_vertexridges (vertexT *vertex) {
-  facetT *neighbor, **neighborp;
-  setT *ridges= qh_settemp (qh TEMPsize);
-  int size;
-
-  qh visit_id++;
-  FOREACHneighbor_(vertex)
-    neighbor->visitid= qh visit_id;
-  FOREACHneighbor_(vertex) {
-    if (*neighborp)   /* no new ridges in last neighbor */
-      qh_vertexridges_facet (vertex, neighbor, &ridges);
-  }
-  if (qh PRINTstatistics || qh IStracing) {
-    size= qh_setsize (ridges);
-    zinc_(Zvertexridge);
-    zadd_(Zvertexridgetot, size);
-    zmax_(Zvertexridgemax, size);
-    trace3((qh ferr, "qh_vertexridges: found %d ridges for v%d\n",
-             size, vertex->id));
-  }
-  return ridges;
-} /* vertexridges */
-
-/*---------------------------------
-  
-  qh_vertexridges_facet( vertex, facet, ridges )
-    add adjacent ridges for vertex in facet
-    neighbor->visitid==qh.visit_id if it hasn't been visited
-
-  returns:
-    ridges updated
-    sets facet->visitid to qh.visit_id-1
-
-  design:
-    for each ridge of facet
-      if ridge of visited neighbor (i.e., unprocessed)
-        if vertex in ridge
-          append ridge to vertex
-    mark facet processed
-*/
-void qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges) {
-  ridgeT *ridge, **ridgep;
-  facetT *neighbor;
-
-  FOREACHridge_(facet->ridges) {
-    neighbor= otherfacet_(ridge, facet);
-    if (neighbor->visitid == qh visit_id 
-    && qh_setin (ridge->vertices, vertex))
-      qh_setappend (ridges, ridge);
-  }
-  facet->visitid= qh visit_id-1;
-} /* vertexridges_facet */
-
-/*---------------------------------
-  
-  qh_willdelete( facet, replace )
-    moves facet to visible list
-    sets facet->f.replace to replace (may be NULL)
-
-  returns:
-    bumps qh.num_visible
-*/
-void qh_willdelete (facetT *facet, facetT *replace) {
-
-  qh_removefacet(facet);
-  qh_prependfacet (facet, &qh visible_list);
-  qh num_visible++;
-  facet->visible= True;
-  facet->f.replace= replace;
-} /* willdelete */
-
-#else /* qh_NOmerge */
-void qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle) {
-}
-void qh_postmerge (char *reason, realT maxcentrum, realT maxangle, 
-                      boolT vneighbors) {
-}
-boolT qh_checkzero (boolT testall) {
-   }
-#endif /* qh_NOmerge */
-
diff --git a/extern/qhull/src/merge.h b/extern/qhull/src/merge.h
deleted file mode 100644
index 7fc2afa5967..00000000000
--- a/extern/qhull/src/merge.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
  ---------------------------------
-
-   merge.h 
-   header file for merge.c
-
-   see qh-merge.htm and merge.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFmerge
-#define qhDEFmerge 1
-
-
-/*============ -constants- ==============*/
-
-/*----------------------------------
-
-  qh_ANGLEredundant
-    indicates redundant merge in mergeT->angle
-*/
-#define qh_ANGLEredundant 6.0
-
-/*----------------------------------
-  
-  qh_ANGLEdegen
-    indicates degenerate facet in mergeT->angle
-*/
-#define qh_ANGLEdegen     5.0
-
-/*----------------------------------
-  
-  qh_ANGLEconcave
-    offset to indicate concave facets in mergeT->angle
-  
-  notes:
-    concave facets are assigned the range of [2,4] in mergeT->angle
-    roundoff error may make the angle less than 2
-*/
-#define qh_ANGLEconcave  1.5
-
-/*----------------------------------
-  
-  MRG... (mergeType)
-    indicates the type of a merge (mergeT->type)
-*/
-typedef enum {	/* in sort order for facet_mergeset */
-  MRGnone= 0,
-  MRGcoplanar,		/* centrum coplanar */
-  MRGanglecoplanar,	/* angle coplanar */
-  			/* could detect half concave ridges */
-  MRGconcave,		/* concave ridge */
-  MRGflip,		/* flipped facet. facet1 == facet2 */
-  MRGridge,		/* duplicate ridge (qh_MERGEridge) */
-                        /* degen and redundant go onto degen_mergeset */
-  MRGdegen,		/* degenerate facet (not enough neighbors) facet1 == facet2 */
-  MRGredundant,		/* redundant facet (vertex subset) */
-  			/* merge_degenredundant assumes degen < redundant */
-  MRGmirror,	        /* mirror facet from qh_triangulate */
-  ENDmrg
-} mergeType;
-
-/*----------------------------------
-  
-  qh_MERGEapex
-    flag for qh_mergefacet() to indicate an apex merge  
-*/
-#define qh_MERGEapex     True
-
-/*============ -structures- ====================*/
-
-/*----------------------------------
-     
-  mergeT
-    structure used to merge facets
-*/
-
-typedef struct mergeT mergeT;
-struct mergeT {		/* initialize in qh_appendmergeset */
-  realT   angle;        /* angle between normals of facet1 and facet2 */
-  facetT *facet1; 	/* will merge facet1 into facet2 */
-  facetT *facet2;
-  mergeType type;
-};
-
-
-/*=========== -macros- =========================*/
-
-/*----------------------------------
-     
-  FOREACHmerge_( merges ) {...}
-    assign 'merge' to each merge in merges
-       
-  notes:
-    uses 'mergeT *merge, **mergep;'
-    if qh_mergefacet(),
-      restart since qh.facet_mergeset may change
-    see FOREACHsetelement_
-*/
-#define FOREACHmerge_( merges ) FOREACHsetelement_(mergeT, merges, merge)
-
-/*============ prototypes in alphabetical order after pre/postmerge =======*/
-
-void    qh_premerge (vertexT *apex, realT maxcentrum, realT maxangle);
-void    qh_postmerge (char *reason, realT maxcentrum, realT maxangle, 
-             boolT vneighbors);
-void    qh_all_merges (boolT othermerge, boolT vneighbors);
-void    qh_appendmergeset(facetT *facet, facetT *neighbor, mergeType mergetype, realT *angle);
-setT   *qh_basevertices( facetT *samecycle);
-void    qh_checkconnect (void /* qh new_facets */);
-boolT   qh_checkzero (boolT testall);
-void    qh_copynonconvex (ridgeT *atridge);
-void    qh_degen_redundant_facet (facetT *facet);
-void   	qh_degen_redundant_neighbors (facetT *facet, facetT *delfacet);
-vertexT *qh_find_newvertex (vertexT *oldvertex, setT *vertices, setT *ridges);
-void    qh_findbest_test (boolT testcentrum, facetT *facet, facetT *neighbor,
-           facetT **bestfacet, realT *distp, realT *mindistp, realT *maxdistp);
-facetT *qh_findbestneighbor(facetT *facet, realT *distp, realT *mindistp, realT *maxdistp);
-void 	qh_flippedmerges(facetT *facetlist, boolT *wasmerge);
-void 	qh_forcedmerges( boolT *wasmerge);
-void	qh_getmergeset(facetT *facetlist);
-void 	qh_getmergeset_initial (facetT *facetlist);
-void    qh_hashridge (setT *hashtable, int hashsize, ridgeT *ridge, vertexT *oldvertex);
-ridgeT *qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge, 
-              vertexT *vertex, vertexT *oldvertex, int *hashslot);
-void 	qh_makeridges(facetT *facet);
-void    qh_mark_dupridges(facetT *facetlist);
-void    qh_maydropneighbor (facetT *facet);
-int     qh_merge_degenredundant (void);
-void    qh_merge_nonconvex( facetT *facet1, facetT *facet2, mergeType mergetype);
-void    qh_mergecycle (facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_all (facetT *facetlist, boolT *wasmerge);
-void    qh_mergecycle_facets( facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_neighbors(facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_ridges(facetT *samecycle, facetT *newfacet);
-void    qh_mergecycle_vneighbors( facetT *samecycle, facetT *newfacet);
-void 	qh_mergefacet(facetT *facet1, facetT *facet2, realT *mindist, realT *maxdist, boolT mergeapex);
-void    qh_mergefacet2d (facetT *facet1, facetT *facet2);
-void 	qh_mergeneighbors(facetT *facet1, facetT *facet2);
-void 	qh_mergeridges(facetT *facet1, facetT *facet2);
-void    qh_mergesimplex(facetT *facet1, facetT *facet2, boolT mergeapex);
-void    qh_mergevertex_del (vertexT *vertex, facetT *facet1, facetT *facet2);
-void    qh_mergevertex_neighbors(facetT *facet1, facetT *facet2);
-void	qh_mergevertices(setT *vertices1, setT **vertices);
-setT   *qh_neighbor_intersections (vertexT *vertex);
-void    qh_newvertices (setT *vertices);
-boolT   qh_reducevertices (void);
-vertexT *qh_redundant_vertex (vertexT *vertex);
-boolT   qh_remove_extravertices (facetT *facet);
-vertexT *qh_rename_sharedvertex (vertexT *vertex, facetT *facet);
-void	qh_renameridgevertex(ridgeT *ridge, vertexT *oldvertex, vertexT *newvertex);
-void    qh_renamevertex(vertexT *oldvertex, vertexT *newvertex, setT *ridges,
-			facetT *oldfacet, facetT *neighborA);
-boolT 	qh_test_appendmerge (facetT *facet, facetT *neighbor);
-boolT   qh_test_vneighbors (void /* qh newfacet_list */);
-void    qh_tracemerge (facetT *facet1, facetT *facet2);
-void    qh_tracemerging (void);
-void    qh_updatetested( facetT *facet1, facetT *facet2);
-setT   *qh_vertexridges (vertexT *vertex);
-void    qh_vertexridges_facet (vertexT *vertex, facetT *facet, setT **ridges);
-void    qh_willdelete (facetT *facet, facetT *replace);
-
-#endif /* qhDEFmerge */
diff --git a/extern/qhull/src/poly.c b/extern/qhull/src/poly.c
deleted file mode 100644
index 6319e43d66a..00000000000
--- a/extern/qhull/src/poly.c
+++ /dev/null
@@ -1,1180 +0,0 @@
-/*
  ---------------------------------
-
-   poly.c 
-   implements polygons and simplices
-
-   see qh-poly.htm, poly.h and qhull.h
-
-   infrequent code is in poly2.c 
-   (all but top 50 and their callers 12/3/95)
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*======== functions in alphabetical order ==========*/
-
-/*---------------------------------
-  
-  qh_appendfacet( facet )
-    appends facet to end of qh.facet_list,
-
-  returns:
-    updates qh.newfacet_list, facet_next, facet_list
-    increments qh.numfacets
-  
-  notes:
-    assumes qh.facet_list/facet_tail is defined (createsimplex)
-
-  see:
-    qh_removefacet()
-
-*/
-void qh_appendfacet(facetT *facet) {
-  facetT *tail= qh facet_tail;
-
-  if (tail == qh newfacet_list)
-    qh newfacet_list= facet;
-  if (tail == qh facet_next)
-    qh facet_next= facet;
-  facet->previous= tail->previous;
-  facet->next= tail;
-  if (tail->previous)
-    tail->previous->next= facet;
-  else
-    qh facet_list= facet;
-  tail->previous= facet;
-  qh num_facets++;
-  trace4((qh ferr, "qh_appendfacet: append f%d to facet_list\n", facet->id));
-} /* appendfacet */
-
-
-/*---------------------------------
-  
-  qh_appendvertex( vertex )
-    appends vertex to end of qh.vertex_list,
-
-  returns:
-    sets vertex->newlist
-    updates qh.vertex_list, newvertex_list
-    increments qh.num_vertices
-
-  notes:
-    assumes qh.vertex_list/vertex_tail is defined (createsimplex)
-
-*/
-void qh_appendvertex (vertexT *vertex) {
-  vertexT *tail= qh vertex_tail;
-
-  if (tail == qh newvertex_list)
-    qh newvertex_list= vertex;
-  vertex->newlist= True;
-  vertex->previous= tail->previous;
-  vertex->next= tail;
-  if (tail->previous)
-    tail->previous->next= vertex;
-  else
-    qh vertex_list= vertex;
-  tail->previous= vertex;
-  qh num_vertices++;
-  trace4((qh ferr, "qh_appendvertex: append v%d to vertex_list\n", vertex->id));
-} /* appendvertex */
-
-
-/*---------------------------------
-  
-  qh_attachnewfacets( )
-    attach horizon facets to new facets in qh.newfacet_list
-    newfacets have neighbor and ridge links to horizon but not vice versa
-    only needed for qh.ONLYgood
-
-  returns:
-    set qh.NEWfacets
-    horizon facets linked to new facets 
-      ridges changed from visible facets to new facets
-      simplicial ridges deleted
-    qh.visible_list, no ridges valid
-    facet->f.replace is a newfacet (if any)
-
-  design:
-    delete interior ridges and neighbor sets by
-      for each visible, non-simplicial facet
-        for each ridge
-          if last visit or if neighbor is simplicial
-            if horizon neighbor
-              delete ridge for horizon's ridge set
-            delete ridge
-        erase neighbor set
-    attach horizon facets and new facets by
-      for all new facets
-        if corresponding horizon facet is simplicial
-          locate corresponding visible facet {may be more than one}
-          link visible facet to new facet
-          replace visible facet with new facet in horizon
-        else it's non-simplicial
-          for all visible neighbors of the horizon facet
-            link visible neighbor to new facet
-            delete visible neighbor from horizon facet
-          append new facet to horizon's neighbors
-          the first ridge of the new facet is the horizon ridge
-          link the new facet into the horizon ridge
-*/
-void qh_attachnewfacets (void ) {
-  facetT *newfacet= NULL, *neighbor, **neighborp, *horizon, *visible;
-  ridgeT *ridge, **ridgep;
-
-  qh NEWfacets= True;
-  trace3((qh ferr, "qh_attachnewfacets: delete interior ridges\n"));
-  qh visit_id++;
-  FORALLvisible_facets {
-    visible->visitid= qh visit_id;
-    if (visible->ridges) {
-      FOREACHridge_(visible->ridges) {
-	neighbor= otherfacet_(ridge, visible);
-	if (neighbor->visitid == qh visit_id
-	    || (!neighbor->visible && neighbor->simplicial)) {
-	  if (!neighbor->visible)  /* delete ridge for simplicial horizon */
-	    qh_setdel (neighbor->ridges, ridge);
-	  qh_setfree (&(ridge->vertices)); /* delete on 2nd visit */
-	  qh_memfree (ridge, sizeof(ridgeT));
-	}
-      }
-      SETfirst_(visible->ridges)= NULL;
-    }
-    SETfirst_(visible->neighbors)= NULL;
-  }
-  trace1((qh ferr, "qh_attachnewfacets: attach horizon facets to new facets\n"));
-  FORALLnew_facets {
-    horizon= SETfirstt_(newfacet->neighbors, facetT);
-    if (horizon->simplicial) {
-      visible= NULL;
-      FOREACHneighbor_(horizon) {   /* may have more than one horizon ridge */
-	if (neighbor->visible) {
-	  if (visible) {
-	    if (qh_setequal_skip (newfacet->vertices, 0, horizon->vertices,
-				  SETindex_(horizon->neighbors, neighbor))) {
-	      visible= neighbor;
-	      break;
-	    }
-	  }else
-	    visible= neighbor;
-	}
-      }
-      if (visible) {
-	visible->f.replace= newfacet;
-	qh_setreplace (horizon->neighbors, visible, newfacet);
-      }else {
-	fprintf (qh ferr, "qhull internal error (qh_attachnewfacets): couldn't find visible facet for horizon f%d of newfacet f%d\n",
-		 horizon->id, newfacet->id);
-	qh_errexit2 (qh_ERRqhull, horizon, newfacet);
-      }
-    }else { /* non-simplicial, with a ridge for newfacet */
-      FOREACHneighbor_(horizon) {    /* may hold for many new facets */
-	if (neighbor->visible) {
-	  neighbor->f.replace= newfacet;
-	  qh_setdelnth (horizon->neighbors,
-			SETindex_(horizon->neighbors, neighbor));
-	  neighborp--; /* repeat */
-	}
-      }
-      qh_setappend (&horizon->neighbors, newfacet);
-      ridge= SETfirstt_(newfacet->ridges, ridgeT);
-      if (ridge->top == horizon)
-	ridge->bottom= newfacet;
-      else
-	ridge->top= newfacet;
-      }
-  } /* newfacets */
-  if (qh PRINTstatistics) {
-    FORALLvisible_facets {
-      if (!visible->f.replace) 
-	zinc_(Zinsidevisible);
-    }
-  }
-} /* attachnewfacets */
-
-/*---------------------------------
-  
-  qh_checkflipped( facet, dist, allerror )
-    checks facet orientation to interior point
-
-    if allerror set,
-      tests against qh.DISTround
-    else
-      tests against 0 since tested against DISTround before
-
-  returns:
-    False if it flipped orientation (sets facet->flipped)
-    distance if non-NULL
-*/
-boolT qh_checkflipped (facetT *facet, realT *distp, boolT allerror) {
-  realT dist;
-
-  if (facet->flipped && !distp)
-    return False;
-  zzinc_(Zdistcheck);
-  qh_distplane(qh interior_point, facet, &dist);
-  if (distp)
-    *distp= dist;
-  if ((allerror && dist > -qh DISTround)|| (!allerror && dist >= 0.0)) {
-    facet->flipped= True;
-    zzinc_(Zflippedfacets);
-    trace0((qh ferr, "qh_checkflipped: facet f%d is flipped, distance= %6.12g during p%d\n",
-              facet->id, dist, qh furthest_id));
-    qh_precision ("flipped facet");
-    return False;
-  }
-  return True;
-} /* checkflipped */
-
-/*---------------------------------
-  
-  qh_delfacet( facet )
-    removes facet from facet_list and frees up its memory
-
-  notes:
-    assumes vertices and ridges already freed
-*/
-void qh_delfacet(facetT *facet) {
-  void **freelistp; /* used !qh_NOmem */
-
-  trace4((qh ferr, "qh_delfacet: delete f%d\n", facet->id));
-  if (facet == qh tracefacet)
-    qh tracefacet= NULL;
-  if (facet == qh GOODclosest)
-    qh GOODclosest= NULL;
-  qh_removefacet(facet);
-  if (!facet->tricoplanar || facet->keepcentrum) {
-    qh_memfree_(facet->normal, qh normal_size, freelistp);
-    if (qh CENTERtype == qh_ASvoronoi) {   /* uses macro calls */
-      qh_memfree_(facet->center, qh center_size, freelistp);
-    }else /* AScentrum */ {
-      qh_memfree_(facet->center, qh normal_size, freelistp);
-    }
-  }
-  qh_setfree(&(facet->neighbors));
-  if (facet->ridges)
-    qh_setfree(&(facet->ridges));
-  qh_setfree(&(facet->vertices));
-  if (facet->outsideset)
-    qh_setfree(&(facet->outsideset));
-  if (facet->coplanarset)
-    qh_setfree(&(facet->coplanarset));
-  qh_memfree_(facet, sizeof(facetT), freelistp);
-} /* delfacet */
-
-
-/*---------------------------------
-  
-  qh_deletevisible()
-    delete visible facets and vertices
-
-  returns:
-    deletes each facet and removes from facetlist
-    at exit, qh.visible_list empty (== qh.newfacet_list)
-
-  notes:
-    ridges already deleted
-    horizon facets do not reference facets on qh.visible_list
-    new facets in qh.newfacet_list
-    uses   qh.visit_id;
-*/
-void qh_deletevisible (void /*qh visible_list*/) {
-  facetT *visible, *nextfacet;
-  vertexT *vertex, **vertexp;
-  int numvisible= 0, numdel= qh_setsize(qh del_vertices);
-
-  trace1((qh ferr, "qh_deletevisible: delete %d visible facets and %d vertices\n",
-         qh num_visible, numdel));
-  for (visible= qh visible_list; visible && visible->visible; 
-                visible= nextfacet) { /* deleting current */
-    nextfacet= visible->next;        
-    numvisible++;
-    qh_delfacet(visible);
-  }
-  if (numvisible != qh num_visible) {
-    fprintf (qh ferr, "qhull internal error (qh_deletevisible): qh num_visible %d is not number of visible facets %d\n",
-             qh num_visible, numvisible);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  qh num_visible= 0;
-  zadd_(Zvisfacettot, numvisible);
-  zmax_(Zvisfacetmax, numvisible);
-  zzadd_(Zdelvertextot, numdel);
-  zmax_(Zdelvertexmax, numdel);
-  FOREACHvertex_(qh del_vertices) 
-    qh_delvertex (vertex);
-  qh_settruncate (qh del_vertices, 0);
-} /* deletevisible */
-
-/*---------------------------------
-  
-  qh_facetintersect( facetA, facetB, skipa, skipB, prepend )
-    return vertices for intersection of two simplicial facets
-    may include 1 prepended entry (if more, need to settemppush)
-    
-  returns:
-    returns set of qh.hull_dim-1 + prepend vertices
-    returns skipped index for each test and checks for exactly one
-
-  notes:
-    does not need settemp since set in quick memory
-  
-  see also:
-    qh_vertexintersect and qh_vertexintersect_new
-    use qh_setnew_delnthsorted to get nth ridge (no skip information)
-
-  design:
-    locate skipped vertex by scanning facet A's neighbors
-    locate skipped vertex by scanning facet B's neighbors
-    intersect the vertex sets
-*/
-setT *qh_facetintersect (facetT *facetA, facetT *facetB,
-			 int *skipA,int *skipB, int prepend) {
-  setT *intersect;
-  int dim= qh hull_dim, i, j;
-  facetT **neighborsA, **neighborsB;
-
-  neighborsA= SETaddr_(facetA->neighbors, facetT);
-  neighborsB= SETaddr_(facetB->neighbors, facetT);
-  i= j= 0;
-  if (facetB == *neighborsA++)
-    *skipA= 0;
-  else if (facetB == *neighborsA++)
-    *skipA= 1;
-  else if (facetB == *neighborsA++)
-    *skipA= 2;
-  else {
-    for (i= 3; i < dim; i++) {
-      if (facetB == *neighborsA++) {
-        *skipA= i;
-        break;
-      }
-    }
-  }
-  if (facetA == *neighborsB++)
-    *skipB= 0;
-  else if (facetA == *neighborsB++)
-    *skipB= 1;
-  else if (facetA == *neighborsB++)
-    *skipB= 2;
-  else {
-    for (j= 3; j < dim; j++) {
-      if (facetA == *neighborsB++) {
-        *skipB= j;
-        break;
-      }
-    }
-  }
-  if (i >= dim || j >= dim) {
-    fprintf (qh ferr, "qhull internal error (qh_facetintersect): f%d or f%d not in others neighbors\n",
-            facetA->id, facetB->id);
-    qh_errexit2 (qh_ERRqhull, facetA, facetB);
-  }
-  intersect= qh_setnew_delnthsorted (facetA->vertices, qh hull_dim, *skipA, prepend);
-  trace4((qh ferr, "qh_facetintersect: f%d skip %d matches f%d skip %d\n",
-	  facetA->id, *skipA, facetB->id, *skipB));
-  return(intersect);
-} /* facetintersect */
-
-/*---------------------------------
-  
-  qh_gethash( hashsize, set, size, firstindex, skipelem )
-    return hashvalue for a set with firstindex and skipelem
-
-  notes:
-    assumes at least firstindex+1 elements
-    assumes skipelem is NULL, in set, or part of hash
-    
-    hashes memory addresses which may change over different runs of the same data
-    using sum for hash does badly in high d
-*/
-unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem) {
-  void **elemp= SETelemaddr_(set, firstindex, void);
-  ptr_intT hash = 0, elem;
-  int i;
-
-  switch (size-firstindex) {
-  case 1:
-    hash= (ptr_intT)(*elemp) - (ptr_intT) skipelem;
-    break;
-  case 2:
-    hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] - (ptr_intT) skipelem;
-    break;
-  case 3:
-    hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
-      - (ptr_intT) skipelem;
-    break;
-  case 4:
-    hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
-      + (ptr_intT)elemp[3] - (ptr_intT) skipelem;
-    break;
-  case 5:
-    hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
-      + (ptr_intT)elemp[3] + (ptr_intT)elemp[4] - (ptr_intT) skipelem;
-    break;
-  case 6:
-    hash= (ptr_intT)(*elemp) + (ptr_intT)elemp[1] + (ptr_intT)elemp[2]
-      + (ptr_intT)elemp[3] + (ptr_intT)elemp[4]+ (ptr_intT)elemp[5]
-      - (ptr_intT) skipelem;
-    break;
-  default:
-    hash= 0;
-    i= 3;
-    do {     /* this is about 10% in 10-d */
-      if ((elem= (ptr_intT)*elemp++) != (ptr_intT)skipelem) {
-        hash ^= (elem << i) + (elem >> (32-i));
-	i += 3;
-	if (i >= 32)
-	  i -= 32;
-      }
-    }while(*elemp);
-    break;
-  }
-  hash %= (ptr_intT) hashsize;
-  /* hash= 0; for debugging purposes */
-  return hash;
-} /* gethash */
-
-/*---------------------------------
-  
-  qh_makenewfacet( vertices, toporient, horizon )
-    creates a toporient? facet from vertices
-
-  returns:
-    returns newfacet
-      adds newfacet to qh.facet_list
-      newfacet->vertices= vertices
-      if horizon
-        newfacet->neighbor= horizon, but not vice versa
-    newvertex_list updated with vertices
-*/
-facetT *qh_makenewfacet(setT *vertices, boolT toporient,facetT *horizon) {
-  facetT *newfacet;
-  vertexT *vertex, **vertexp;
-
-  FOREACHvertex_(vertices) {
-    if (!vertex->newlist) {
-      qh_removevertex (vertex);
-      qh_appendvertex (vertex);
-    }
-  }
-  newfacet= qh_newfacet();
-  newfacet->vertices= vertices;
-  newfacet->toporient= toporient;
-  if (horizon)
-    qh_setappend(&(newfacet->neighbors), horizon);
-  qh_appendfacet(newfacet);
-  return(newfacet);
-} /* makenewfacet */
-
-
-/*---------------------------------
-  
-  qh_makenewplanes()
-    make new hyperplanes for facets on qh.newfacet_list
-
-  returns:
-    all facets have hyperplanes or are marked for   merging
-    doesn't create hyperplane if horizon is coplanar (will merge)
-    updates qh.min_vertex if qh.JOGGLEmax
-
-  notes:
-    facet->f.samecycle is defined for facet->mergehorizon facets
-*/
-void qh_makenewplanes (void /* newfacet_list */) {
-  facetT *newfacet;
-
-  FORALLnew_facets {
-    if (!newfacet->mergehorizon)
-      qh_setfacetplane (newfacet);  
-  }
-  if (qh JOGGLEmax < REALmax/2)  
-    minimize_(qh min_vertex, -wwval_(Wnewvertexmax));
-} /* makenewplanes */
-
-/*---------------------------------
-  
-  qh_makenew_nonsimplicial( visible, apex, numnew )
-    make new facets for ridges of a visible facet
-    
-  returns:
-    first newfacet, bumps numnew as needed
-    attaches new facets if !qh.ONLYgood
-    marks ridge neighbors for simplicial visible
-    if (qh.ONLYgood)
-      ridges on newfacet, horizon, and visible
-    else
-      ridge and neighbors between newfacet and   horizon
-      visible facet's ridges are deleted    
-
-  notes:
-    qh.visit_id if visible has already been processed
-    sets neighbor->seen for building f.samecycle
-      assumes all 'seen' flags initially false
-    
-  design:
-    for each ridge of visible facet
-      get neighbor of visible facet
-      if neighbor was already processed
-        delete the ridge (will delete all visible facets later)
-      if neighbor is a horizon facet
-        create a new facet
-        if neighbor coplanar
-          adds newfacet to f.samecycle for later merging
-        else 
-          updates neighbor's neighbor set
-          (checks for non-simplicial facet with multiple ridges to visible facet)
-        updates neighbor's ridge set
-        (checks for simplicial neighbor to non-simplicial visible facet)
-	(deletes ridge if neighbor is simplicial)
-          
-*/
-#ifndef qh_NOmerge
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew) {
-  void **freelistp; /* used !qh_NOmem */
-  ridgeT *ridge, **ridgep;
-  facetT *neighbor, *newfacet= NULL, *samecycle;
-  setT *vertices;
-  boolT toporient;
-  int ridgeid;
-
-  FOREACHridge_(visible->ridges) {
-    ridgeid= ridge->id;
-    neighbor= otherfacet_(ridge, visible);
-    if (neighbor->visible) {
-      if (!qh ONLYgood) {
-        if (neighbor->visitid == qh visit_id) {
-          qh_setfree (&(ridge->vertices));  /* delete on 2nd visit */
-	  qh_memfree_(ridge, sizeof(ridgeT), freelistp);
-	}
-      }
-    }else {  /* neighbor is an horizon facet */
-      toporient= (ridge->top == visible);
-      vertices= qh_setnew (qh hull_dim); /* makes sure this is quick */
-      qh_setappend (&vertices, apex);
-      qh_setappend_set (&vertices, ridge->vertices);
-      newfacet= qh_makenewfacet(vertices, toporient, neighbor);
-      (*numnew)++;
-      if (neighbor->coplanar) {
-	newfacet->mergehorizon= True;
-        if (!neighbor->seen) {
-          newfacet->f.samecycle= newfacet;
-          neighbor->f.newcycle= newfacet;
-        }else {
-          samecycle= neighbor->f.newcycle;
-          newfacet->f.samecycle= samecycle->f.samecycle;
-          samecycle->f.samecycle= newfacet;
-	}
-      }
-      if (qh ONLYgood) {
-        if (!neighbor->simplicial)
- 	  qh_setappend(&(newfacet->ridges), ridge);
-      }else {  /* qh_attachnewfacets */
-        if (neighbor->seen) {
-	  if (neighbor->simplicial) {
-	    fprintf (qh ferr, "qhull internal error (qh_makenew_nonsimplicial): simplicial f%d sharing two ridges with f%d\n", 
-	           neighbor->id, visible->id);
-	    qh_errexit2 (qh_ERRqhull, neighbor, visible);
-	  }
-	  qh_setappend (&(neighbor->neighbors), newfacet);
-	}else
-          qh_setreplace (neighbor->neighbors, visible, newfacet);
-        if (neighbor->simplicial) {
-          qh_setdel (neighbor->ridges, ridge);
-          qh_setfree (&(ridge->vertices)); 
-	  qh_memfree (ridge, sizeof(ridgeT));
-	}else {
- 	  qh_setappend(&(newfacet->ridges), ridge);
- 	  if (toporient)
- 	    ridge->top= newfacet;
- 	  else
- 	    ridge->bottom= newfacet;
- 	}
-      trace4((qh ferr, "qh_makenew_nonsimplicial: created facet f%d from v%d and r%d of horizon f%d\n",
-	    newfacet->id, apex->id, ridgeid, neighbor->id));
-      }
-    }
-    neighbor->seen= True;        
-  } /* for each ridge */
-  if (!qh ONLYgood)
-    SETfirst_(visible->ridges)= NULL;
-  return newfacet;
-} /* makenew_nonsimplicial */
-#else /* qh_NOmerge */
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew) {
-  return NULL;
-}
-#endif /* qh_NOmerge */
-
-/*---------------------------------
-  
-  qh_makenew_simplicial( visible, apex, numnew )
-    make new facets for simplicial visible facet and apex
-
-  returns:
-    attaches new facets if (!qh.ONLYgood)
-      neighbors between newfacet and horizon
-
-  notes:
-    nop if neighbor->seen or neighbor->visible (see qh_makenew_nonsimplicial)
-
-  design:
-    locate neighboring horizon facet for visible facet
-    determine vertices and orientation
-    create new facet
-    if coplanar,
-      add new facet to f.samecycle
-    update horizon facet's neighbor list        
-*/
-facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew) {
-  facetT *neighbor, **neighborp, *newfacet= NULL;
-  setT *vertices;
-  boolT flip, toporient;
-  int horizonskip, visibleskip;
-
-  FOREACHneighbor_(visible) {
-    if (!neighbor->seen && !neighbor->visible) {
-      vertices= qh_facetintersect(neighbor,visible, &horizonskip, &visibleskip, 1);
-      SETfirst_(vertices)= apex;
-      flip= ((horizonskip & 0x1) ^ (visibleskip & 0x1));
-      if (neighbor->toporient)         
-	toporient= horizonskip & 0x1;
-      else
-	toporient= (horizonskip & 0x1) ^ 0x1;
-      newfacet= qh_makenewfacet(vertices, toporient, neighbor);
-      (*numnew)++;
-      if (neighbor->coplanar && (qh PREmerge || qh MERGEexact)) {
-#ifndef qh_NOmerge
-	newfacet->f.samecycle= newfacet;
-	newfacet->mergehorizon= True;
-#endif
-      }
-      if (!qh ONLYgood)
-        SETelem_(neighbor->neighbors, horizonskip)= newfacet;
-      trace4((qh ferr, "qh_makenew_simplicial: create facet f%d top %d from v%d and horizon f%d skip %d top %d and visible f%d skip %d, flip? %d\n",
-	    newfacet->id, toporient, apex->id, neighbor->id, horizonskip,
-	      neighbor->toporient, visible->id, visibleskip, flip));
-    }
-  }
-  return newfacet;
-} /* makenew_simplicial */
-
-/*---------------------------------
-  
-  qh_matchneighbor( newfacet, newskip, hashsize, hashcount )
-    either match subridge of newfacet with neighbor or add to hash_table
-
-  returns:
-    duplicate ridges are unmatched and marked by qh_DUPLICATEridge
-
-  notes:
-    ridge is newfacet->vertices w/o newskip vertex
-    do not allocate memory (need to free hash_table cleanly)
-    uses linear hash chains
-  
-  see also:
-    qh_matchduplicates
-
-  design:
-    for each possible matching facet in qh.hash_table
-      if vertices match
-        set ismatch, if facets have opposite orientation
-        if ismatch and matching facet doesn't have a match
-          match the facets by updating their neighbor sets
-        else
-          indicate a duplicate ridge
-          set facet hyperplane for later testing
-          add facet to hashtable
-          unless the other facet was already a duplicate ridge
-            mark both facets with a duplicate ridge
-            add other facet (if defined) to hash table
-*/
-void qh_matchneighbor (facetT *newfacet, int newskip, int hashsize, int *hashcount) {
-  boolT newfound= False;   /* True, if new facet is already in hash chain */
-  boolT same, ismatch;
-  int hash, scan;
-  facetT *facet, *matchfacet;
-  int skip, matchskip;
-
-  hash= (int)qh_gethash (hashsize, newfacet->vertices, qh hull_dim, 1, 
-                     SETelem_(newfacet->vertices, newskip));
-  trace4((qh ferr, "qh_matchneighbor: newfacet f%d skip %d hash %d hashcount %d\n",
-	  newfacet->id, newskip, hash, *hashcount));
-  zinc_(Zhashlookup);
-  for (scan= hash; (facet= SETelemt_(qh hash_table, scan, facetT)); 
-       scan= (++scan >= hashsize ? 0 : scan)) {
-    if (facet == newfacet) {
-      newfound= True;
-      continue;
-    }
-    zinc_(Zhashtests);
-    if (qh_matchvertices (1, newfacet->vertices, newskip, facet->vertices, &skip, &same)) {
-      if (SETelem_(newfacet->vertices, newskip) == 
-          SETelem_(facet->vertices, skip)) {
-        qh_precision ("two facets with the same vertices");
-        fprintf (qh ferr, "qhull precision error: Vertex sets are the same for f%d and f%d.  Can not force output.\n",
-          facet->id, newfacet->id);
-        qh_errexit2 (qh_ERRprec, facet, newfacet);
-      }
-      ismatch= (same == (newfacet->toporient ^ facet->toporient));
-      matchfacet= SETelemt_(facet->neighbors, skip, facetT);
-      if (ismatch && !matchfacet) {
-        SETelem_(facet->neighbors, skip)= newfacet;
-        SETelem_(newfacet->neighbors, newskip)= facet;
-        (*hashcount)--;
-        trace4((qh ferr, "qh_matchneighbor: f%d skip %d matched with new f%d skip %d\n",
-           facet->id, skip, newfacet->id, newskip));
-        return;
-      }
-      if (!qh PREmerge && !qh MERGEexact) {
-        qh_precision ("a ridge with more than two neighbors");
-	fprintf (qh ferr, "qhull precision error: facets f%d, f%d and f%d meet at a ridge with more than 2 neighbors.  Can not continue.\n",
-		 facet->id, newfacet->id, getid_(matchfacet));
-	qh_errexit2 (qh_ERRprec, facet, newfacet);
-      }
-      SETelem_(newfacet->neighbors, newskip)= qh_DUPLICATEridge;
-      newfacet->dupridge= True;
-      if (!newfacet->normal)
-	qh_setfacetplane (newfacet);
-      qh_addhash (newfacet, qh hash_table, hashsize, hash);
-      (*hashcount)++;
-      if (!facet->normal)
-	qh_setfacetplane (facet);
-      if (matchfacet != qh_DUPLICATEridge) {
-	SETelem_(facet->neighbors, skip)= qh_DUPLICATEridge;
-	facet->dupridge= True;
-	if (!facet->normal)
-	  qh_setfacetplane (facet);
-	if (matchfacet) {
-	  matchskip= qh_setindex (matchfacet->neighbors, facet);
-	  SETelem_(matchfacet->neighbors, matchskip)= qh_DUPLICATEridge;
-	  matchfacet->dupridge= True;
-	  if (!matchfacet->normal)
-	    qh_setfacetplane (matchfacet);
-	  qh_addhash (matchfacet, qh hash_table, hashsize, hash);
-	  *hashcount += 2;
-	}
-      }
-      trace4((qh ferr, "qh_matchneighbor: new f%d skip %d duplicates ridge for f%d skip %d matching f%d ismatch %d at hash %d\n",
-	   newfacet->id, newskip, facet->id, skip, 
-	   (matchfacet == qh_DUPLICATEridge ? -2 : getid_(matchfacet)), 
-	   ismatch, hash));
-      return; /* end of duplicate ridge */
-    }
-  }
-  if (!newfound) 
-    SETelem_(qh hash_table, scan)= newfacet;  /* same as qh_addhash */
-  (*hashcount)++;
-  trace4((qh ferr, "qh_matchneighbor: no match for f%d skip %d at hash %d\n",
-           newfacet->id, newskip, hash));
-} /* matchneighbor */
-
-
-/*---------------------------------
-  
-  qh_matchnewfacets()
-    match newfacets in qh.newfacet_list to their newfacet neighbors
-
-  returns:
-    qh.newfacet_list with full neighbor sets
-      get vertices with nth neighbor by deleting nth vertex
-    if qh.PREmerge/MERGEexact or qh.FORCEoutput 
-      sets facet->flippped if flipped normal (also prevents point partitioning)
-    if duplicate ridges and qh.PREmerge/MERGEexact
-      sets facet->dupridge
-      missing neighbor links identifies extra ridges to be merging (qh_MERGEridge)
-
-  notes:
-    newfacets already have neighbor[0] (horizon facet)
-    assumes qh.hash_table is NULL
-    vertex->neighbors has not been updated yet
-    do not allocate memory after qh.hash_table (need to free it cleanly)
-
-  design:
-    delete neighbor sets for all new facets
-    initialize a hash table
-    for all new facets
-      match facet with neighbors
-    if unmatched facets (due to duplicate ridges)
-      for each new facet with a duplicate ridge
-        match it with a facet
-    check for flipped facets
-*/
-void qh_matchnewfacets (void /* qh newfacet_list */) {
-  int numnew=0, hashcount=0, newskip;
-  facetT *newfacet, *neighbor;
-  int dim= qh hull_dim, hashsize, neighbor_i, neighbor_n;
-  setT *neighbors;
-#ifndef qh_NOtrace
-  int facet_i, facet_n, numfree= 0;
-  facetT *facet;
-#endif
-  
-  trace1((qh ferr, "qh_matchnewfacets: match neighbors for new facets.\n"));
-  FORALLnew_facets {
-    numnew++;
-    {  /* inline qh_setzero (newfacet->neighbors, 1, qh hull_dim); */
-      neighbors= newfacet->neighbors;
-      neighbors->e[neighbors->maxsize].i= dim+1; /*may be overwritten*/
-      memset ((char *)SETelemaddr_(neighbors, 1, void), 0, dim * SETelemsize);
-    }    
-  }
-  qh_newhashtable (numnew*(qh hull_dim-1)); /* twice what is normally needed,
-                                     but every ridge could be DUPLICATEridge */
-  hashsize= qh_setsize (qh hash_table);
-  FORALLnew_facets {
-    for (newskip=1; newskipneighbors, k, facetT);
-	  if (!neighbor || neighbor == qh_DUPLICATEridge)
-	    count++;
-	}
-	if (facet == newfacet)
-	  break;
-      }
-      if (count != hashcount) {
-	fprintf (qh ferr, "qh_matchnewfacets: after adding facet %d, hashcount %d != count %d\n",
-		 newfacet->id, hashcount, count);
-	qh_errexit (qh_ERRqhull, newfacet, NULL);
-      }
-    }
-#endif  /* end of trap code */
-  }
-  if (hashcount) {
-    FORALLnew_facets {
-      if (newfacet->dupridge) {
-        FOREACHneighbor_i_(newfacet) {
-          if (neighbor == qh_DUPLICATEridge) {
-            qh_matchduplicates (newfacet, neighbor_i, hashsize, &hashcount);
-         	    /* this may report MERGEfacet */
-	  }
-        }
-      }
-    }
-  }
-  if (hashcount) {
-    fprintf (qh ferr, "qhull internal error (qh_matchnewfacets): %d neighbors did not match up\n",
-        hashcount);
-    qh_printhashtable (qh ferr);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-#ifndef qh_NOtrace
-  if (qh IStracing >= 2) {
-    FOREACHfacet_i_(qh hash_table) {
-      if (!facet)
-        numfree++;
-    }
-    fprintf (qh ferr, "qh_matchnewfacets: %d new facets, %d unused hash entries .  hashsize %d\n",
-	     numnew, numfree, qh_setsize (qh hash_table));
-  }
-#endif /* !qh_NOtrace */
-  qh_setfree (&qh hash_table);
-  if (qh PREmerge || qh MERGEexact) {
-    if (qh IStracing >= 4)
-      qh_printfacetlist (qh newfacet_list, NULL, qh_ALL);
-    FORALLnew_facets {
-      if (newfacet->normal)
-	qh_checkflipped (newfacet, NULL, qh_ALL);
-    }
-  }else if (qh FORCEoutput)
-    qh_checkflipped_all (qh newfacet_list);  /* prints warnings for flipped */
-} /* matchnewfacets */
-
-    
-/*---------------------------------
-  
-  qh_matchvertices( firstindex, verticesA, skipA, verticesB, skipB, same )
-    tests whether vertices match with a single skip
-    starts match at firstindex since all new facets have a common vertex
-
-  returns:
-    true if matched vertices
-    skip index for each set
-    sets same iff vertices have the same orientation
-
-  notes:
-    assumes skipA is in A and both sets are the same size
-
-  design:
-    set up pointers
-    scan both sets checking for a match
-    test orientation
-*/
-boolT qh_matchvertices (int firstindex, setT *verticesA, int skipA, 
-       setT *verticesB, int *skipB, boolT *same) {
-  vertexT **elemAp, **elemBp, **skipBp=NULL, **skipAp;
-
-  elemAp= SETelemaddr_(verticesA, firstindex, vertexT);
-  elemBp= SETelemaddr_(verticesB, firstindex, vertexT);
-  skipAp= SETelemaddr_(verticesA, skipA, vertexT);
-  do if (elemAp != skipAp) {
-    while (*elemAp != *elemBp++) {
-      if (skipBp)
-        return False;
-      skipBp= elemBp;  /* one extra like FOREACH */
-    }
-  }while(*(++elemAp));
-  if (!skipBp)
-    skipBp= ++elemBp;
-  *skipB= SETindex_(verticesB, skipB);
-  *same= !(((ptr_intT)skipA & 0x1) ^ ((ptr_intT)*skipB & 0x1));
-  trace4((qh ferr, "qh_matchvertices: matched by skip %d (v%d) and skip %d (v%d) same? %d\n",
-	  skipA, (*skipAp)->id, *skipB, (*(skipBp-1))->id, *same));
-  return (True);
-} /* matchvertices */
-
-/*---------------------------------
-  
-  qh_newfacet()
-    return a new facet 
-
-  returns:
-    all fields initialized or cleared   (NULL)
-    preallocates neighbors set
-*/
-facetT *qh_newfacet(void) {
-  facetT *facet;
-  void **freelistp; /* used !qh_NOmem */
-  
-  qh_memalloc_(sizeof(facetT), freelistp, facet, facetT);
-  memset ((char *)facet, 0, sizeof(facetT));
-  if (qh facet_id == qh tracefacet_id)
-    qh tracefacet= facet;
-  facet->id= qh facet_id++;
-  facet->neighbors= qh_setnew(qh hull_dim);
-#if !qh_COMPUTEfurthest
-  facet->furthestdist= 0.0;
-#endif
-#if qh_MAXoutside
-  if (qh FORCEoutput && qh APPROXhull)
-    facet->maxoutside= qh MINoutside;
-  else
-    facet->maxoutside= qh DISTround;
-#endif
-  facet->simplicial= True;
-  facet->good= True;
-  facet->newfacet= True;
-  trace4((qh ferr, "qh_newfacet: created facet f%d\n", facet->id));
-  return (facet);
-} /* newfacet */
-
-
-/*---------------------------------
-  
-  qh_newridge()
-    return a new ridge
-*/
-ridgeT *qh_newridge(void) {
-  ridgeT *ridge;
-  void **freelistp;   /* used !qh_NOmem */
-
-  qh_memalloc_(sizeof(ridgeT), freelistp, ridge, ridgeT);
-  memset ((char *)ridge, 0, sizeof(ridgeT));
-  zinc_(Ztotridges);
-  if (qh ridge_id == 0xFFFFFF) {
-    fprintf(qh ferr, "\
-qhull warning: more than %d ridges.  ID field overflows and two ridges\n\
-may have the same identifier.  Otherwise output ok.\n", 0xFFFFFF);
-  }
-  ridge->id= qh ridge_id++;     
-  trace4((qh ferr, "qh_newridge: created ridge r%d\n", ridge->id));
-  return (ridge);
-} /* newridge */
-
-
-/*---------------------------------
-  
-  qh_pointid(  )
-    return id for a point, 
-    returns -3 if null, -2 if interior, or -1 if not known
-
-  alternative code:
-    unsigned long id;
-    id= ((unsigned long)point - (unsigned long)qh.first_point)/qh.normal_size;
-
-  notes:
-    if point not in point array
-      the code does a comparison of unrelated pointers.
-*/
-int qh_pointid (pointT *point) {
-  long offset, id;
-
-  if (!point)
-    id= -3;
-  else if (point == qh interior_point)
-    id= -2;
-  else if (point >= qh first_point
-  && point < qh first_point + qh num_points * qh hull_dim) {
-    offset= point - qh first_point;
-    id= offset / qh hull_dim;
-  }else if ((id= qh_setindex (qh other_points, point)) != -1)
-    id += qh num_points;
-  else
-    id= -1;
-  return (int) id;
-} /* pointid */
-  
-/*---------------------------------
-  
-  qh_removefacet( facet )
-    unlinks facet from qh.facet_list,
-
-  returns:
-    updates qh.facet_list .newfacet_list .facet_next visible_list
-    decrements qh.num_facets
-
-  see:
-    qh_appendfacet
-*/
-void qh_removefacet(facetT *facet) {
-  facetT *next= facet->next, *previous= facet->previous;
-  
-  if (facet == qh newfacet_list)
-    qh newfacet_list= next;
-  if (facet == qh facet_next)
-    qh facet_next= next;
-  if (facet == qh visible_list)
-    qh visible_list= next; 
-  if (previous) {
-    previous->next= next;
-    next->previous= previous;
-  }else {  /* 1st facet in qh facet_list */
-    qh facet_list= next;
-    qh facet_list->previous= NULL;
-  }
-  qh num_facets--;
-  trace4((qh ferr, "qh_removefacet: remove f%d from facet_list\n", facet->id));
-} /* removefacet */
-
-
-/*---------------------------------
-  
-  qh_removevertex( vertex )
-    unlinks vertex from qh.vertex_list,
-
-  returns:
-    updates qh.vertex_list .newvertex_list 
-    decrements qh.num_vertices
-*/
-void qh_removevertex(vertexT *vertex) {
-  vertexT *next= vertex->next, *previous= vertex->previous;
-  
-  if (vertex == qh newvertex_list)
-    qh newvertex_list= next;
-  if (previous) {
-    previous->next= next;
-    next->previous= previous;
-  }else {  /* 1st vertex in qh vertex_list */
-    qh vertex_list= vertex->next;
-    qh vertex_list->previous= NULL;
-  }
-  qh num_vertices--;
-  trace4((qh ferr, "qh_removevertex: remove v%d from vertex_list\n", vertex->id));
-} /* removevertex */
-
-
-/*---------------------------------
-  
-  qh_updatevertices()
-    update vertex neighbors and delete interior vertices
-
-  returns:
-    if qh.VERTEXneighbors, updates neighbors for each vertex
-      if qh.newvertex_list, 
-         removes visible neighbors  from vertex neighbors
-      if qh.newfacet_list
-         adds new facets to vertex neighbors
-    if qh.visible_list
-       interior vertices added to qh.del_vertices for later partitioning
-
-  design:
-    if qh.VERTEXneighbors
-      deletes references to visible facets from vertex neighbors
-      appends new facets to the neighbor list for each vertex
-      checks all vertices of visible facets
-        removes visible facets from neighbor lists
-        marks unused vertices for deletion
-*/
-void qh_updatevertices (void /*qh newvertex_list, newfacet_list, visible_list*/) {
-  facetT *newfacet= NULL, *neighbor, **neighborp, *visible;
-  vertexT *vertex, **vertexp;
-
-  trace3((qh ferr, "qh_updatevertices: delete interior vertices and update vertex->neighbors\n"));
-  if (qh VERTEXneighbors) {
-    FORALLvertex_(qh newvertex_list) {
-      FOREACHneighbor_(vertex) {
-	if (neighbor->visible) 
-	  SETref_(neighbor)= NULL;
-      }
-      qh_setcompact (vertex->neighbors);
-    }
-    FORALLnew_facets {
-      FOREACHvertex_(newfacet->vertices)
-        qh_setappend (&vertex->neighbors, newfacet);
-    }
-    FORALLvisible_facets {
-      FOREACHvertex_(visible->vertices) {
-        if (!vertex->newlist && !vertex->deleted) {
-  	  FOREACHneighbor_(vertex) { /* this can happen under merging */
-	    if (!neighbor->visible)
-	      break;
-	  }
-	  if (neighbor)
-	    qh_setdel (vertex->neighbors, visible);
-	  else {
-	    vertex->deleted= True;
-	    qh_setappend (&qh del_vertices, vertex);
-	    trace2((qh ferr, "qh_updatevertices: delete vertex p%d (v%d) in f%d\n",
-		  qh_pointid(vertex->point), vertex->id, visible->id));
-  	  }
-        }
-      }
-    }
-  }else {  /* !VERTEXneighbors */
-    FORALLvisible_facets {
-      FOREACHvertex_(visible->vertices) {
-        if (!vertex->newlist && !vertex->deleted) {
-          vertex->deleted= True;
-	  qh_setappend (&qh del_vertices, vertex);
-	  trace2((qh ferr, "qh_updatevertices: delete vertex p%d (v%d) in f%d\n",
-		  qh_pointid(vertex->point), vertex->id, visible->id));
-  	}
-      }
-    }
-  }
-} /* updatevertices */
-
-
-
diff --git a/extern/qhull/src/poly.h b/extern/qhull/src/poly.h
deleted file mode 100644
index 294ec9527fc..00000000000
--- a/extern/qhull/src/poly.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
  ---------------------------------
-
-   poly.h 
-   header file for poly.c and poly2.c
-
-   see qh-poly.htm, qhull.h and poly.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFpoly
-#define qhDEFpoly 1
-
-/*===============   constants ========================== */
-
-/*----------------------------------
-  
-  ALGORITHMfault   
-    use as argument to checkconvex() to report errors during buildhull
-*/
-#define qh_ALGORITHMfault 0
-
-/*----------------------------------
-  
-  DATAfault        
-    use as argument to checkconvex() to report errors during initialhull
-*/
-#define qh_DATAfault 1
-
-/*----------------------------------
-  
-  DUPLICATEridge
-    special value for facet->neighbor to indicate a duplicate ridge
-  
-  notes:
-    set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_DUPLICATEridge ( facetT * ) 1L
-
-/*----------------------------------
-  
-  MERGEridge       flag in facet
-    special value for facet->neighbor to indicate a merged ridge
-  
-  notes:
-    set by matchneighbor, used by matchmatch and mark_dupridge
-*/
-#define qh_MERGEridge ( facetT * ) 2L
-
-
-/*============ -structures- ====================*/
-
-/*=========== -macros- =========================*/
-
-/*----------------------------------
-  
-  FORALLfacet_( facetlist ) { ... }
-    assign 'facet' to each facet in facetlist
-    
-  notes:
-    uses 'facetT *facet;'
-    assumes last facet is a sentinel
-    
-  see:
-    FORALLfacets
-*/
-#define FORALLfacet_( facetlist ) if ( facetlist ) for( facet=( facetlist );facet && facet->next;facet=facet->next )
-
-/*----------------------------------
-  
-  FORALLnew_facets { ... } 
-    assign 'newfacet' to each facet in qh.newfacet_list
-    
-  notes:
-    uses 'facetT *newfacet;'
-    at exit, newfacet==NULL
-*/
-#define FORALLnew_facets for( newfacet=qh newfacet_list;newfacet && newfacet->next;newfacet=newfacet->next )
-
-/*----------------------------------
-  
-  FORALLvertex_( vertexlist ) { ... }
-    assign 'vertex' to each vertex in vertexlist
-    
-  notes:
-    uses 'vertexT *vertex;'
-    at exit, vertex==NULL
-*/
-#define FORALLvertex_( vertexlist ) for ( vertex=( vertexlist );vertex && vertex->next;vertex= vertex->next )
-
-/*----------------------------------
-  
-  FORALLvisible_facets { ... }
-    assign 'visible' to each visible facet in qh.visible_list
-    
-  notes:
-    uses 'vacetT *visible;'
-    at exit, visible==NULL
-*/
-#define FORALLvisible_facets for (visible=qh visible_list; visible && visible->visible; visible= visible->next)
-
-/*----------------------------------
-  
-  FORALLsame_( newfacet ) { ... } 
-    assign 'same' to each facet in newfacet->f.samecycle
-    
-  notes:
-    uses 'facetT *same;'
-    stops when it returns to newfacet
-*/
-#define FORALLsame_(newfacet) for (same= newfacet->f.samecycle; same != newfacet; same= same->f.samecycle)
-
-/*----------------------------------
-  
-  FORALLsame_cycle_( newfacet ) { ... } 
-    assign 'same' to each facet in newfacet->f.samecycle
-    
-  notes:
-    uses 'facetT *same;'
-    at exit, same == NULL
-*/
-#define FORALLsame_cycle_(newfacet) \
-     for (same= newfacet->f.samecycle; \
-         same; same= (same == newfacet ?  NULL : same->f.samecycle))
-
-/*----------------------------------
-  
-  FOREACHneighborA_( facet ) { ... }
-    assign 'neighborA' to each neighbor in facet->neighbors
-  
-  FOREACHneighborA_( vertex ) { ... }
-    assign 'neighborA' to each neighbor in vertex->neighbors
-  
-  declare:
-    facetT *neighborA, **neighborAp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHneighborA_(facet)  FOREACHsetelement_(facetT, facet->neighbors, neighborA)
-
-/*----------------------------------
-  
-  FOREACHvisible_( facets ) { ... } 
-    assign 'visible' to each facet in facets
-    
-  notes:
-    uses 'facetT *facet, *facetp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHvisible_(facets) FOREACHsetelement_(facetT, facets, visible)
-
-/*----------------------------------
-  
-  FOREACHnewfacet_( facets ) { ... } 
-    assign 'newfacet' to each facet in facets
-    
-  notes:
-    uses 'facetT *newfacet, *newfacetp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHnewfacet_(facets) FOREACHsetelement_(facetT, facets, newfacet)
-
-/*----------------------------------
-  
-  FOREACHvertexA_( vertices ) { ... } 
-    assign 'vertexA' to each vertex in vertices
-    
-  notes:
-    uses 'vertexT *vertexA, *vertexAp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHvertexA_(vertices) FOREACHsetelement_(vertexT, vertices, vertexA)
-
-/*----------------------------------
-  
-  FOREACHvertexreverse12_( vertices ) { ... } 
-    assign 'vertex' to each vertex in vertices
-    reverse order of first two vertices
-    
-  notes:
-    uses 'vertexT *vertex, *vertexp;'
-    see FOREACHsetelement_
-*/
-#define FOREACHvertexreverse12_(vertices) FOREACHsetelementreverse12_(vertexT, vertices, vertex)
-
-
-/*=============== prototypes poly.c in alphabetical order ================*/
-
-void    qh_appendfacet(facetT *facet);
-void    qh_appendvertex(vertexT *vertex);
-void 	qh_attachnewfacets (void);
-boolT   qh_checkflipped (facetT *facet, realT *dist, boolT allerror);
-void	qh_delfacet(facetT *facet);
-void 	qh_deletevisible(void /*qh visible_list, qh horizon_list*/);
-setT   *qh_facetintersect (facetT *facetA, facetT *facetB, int *skipAp,int *skipBp, int extra);
-unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *skipelem);
-facetT *qh_makenewfacet(setT *vertices, boolT toporient, facetT *facet);
-void    qh_makenewplanes ( void /* newfacet_list */);
-facetT *qh_makenew_nonsimplicial (facetT *visible, vertexT *apex, int *numnew);
-facetT *qh_makenew_simplicial (facetT *visible, vertexT *apex, int *numnew);
-void    qh_matchneighbor (facetT *newfacet, int newskip, int hashsize,
-			  int *hashcount);
-void	qh_matchnewfacets (void);
-boolT   qh_matchvertices (int firstindex, setT *verticesA, int skipA, 
-			  setT *verticesB, int *skipB, boolT *same);
-facetT *qh_newfacet(void);
-ridgeT *qh_newridge(void);
-int     qh_pointid (pointT *point);
-void 	qh_removefacet(facetT *facet);
-void 	qh_removevertex(vertexT *vertex);
-void    qh_updatevertices (void);
-
-
-/*========== -prototypes poly2.c in alphabetical order ===========*/
-
-void    qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash);
-void 	qh_check_bestdist (void);
-void    qh_check_maxout (void);
-void    qh_check_output (void);
-void    qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2);
-void   	qh_check_points(void);
-void 	qh_checkconvex(facetT *facetlist, int fault);
-void    qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp);
-void 	qh_checkflipped_all (facetT *facetlist);
-void 	qh_checkpolygon(facetT *facetlist);
-void    qh_checkvertex (vertexT *vertex);
-void 	qh_clearcenters (qh_CENTER type);
-void 	qh_createsimplex(setT *vertices);
-void 	qh_delridge(ridgeT *ridge);
-void    qh_delvertex (vertexT *vertex);
-setT   *qh_facet3vertex (facetT *facet);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
-           realT *bestdist, boolT *isoutside);
-facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside,
-			  int *numpart);
-int 	qh_findgood (facetT *facetlist, int goodhorizon);
-void 	qh_findgood_all (facetT *facetlist);
-void    qh_furthestnext (void /* qh facet_list */);
-void    qh_furthestout (facetT *facet);
-void    qh_infiniteloop (facetT *facet);
-void 	qh_initbuild(void);
-void 	qh_initialhull(setT *vertices);
-setT   *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints);
-vertexT *qh_isvertex (pointT *point, setT *vertices);
-vertexT *qh_makenewfacets (pointT *point /*horizon_list, visible_list*/);
-void    qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount);
-void    qh_nearcoplanar ( void /* qh.facet_list */);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-int 	qh_newhashtable(int newsize);
-vertexT *qh_newvertex(pointT *point);
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp);
-void    qh_outcoplanar (void /* facet_list */);
-pointT *qh_point (int id);
-void 	qh_point_add (setT *set, pointT *point, void *elem);
-setT   *qh_pointfacet (void /*qh facet_list*/);
-setT   *qh_pointvertex (void /*qh facet_list*/);
-void 	qh_prependfacet(facetT *facet, facetT **facetlist);
-void	qh_printhashtable(FILE *fp);
-void    qh_printlists (void);
-void    qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/);
-void    qh_setvoronoi_all (void);
-void	qh_triangulate (void /*qh facet_list*/);
-void    qh_triangulate_facet (facetT *facetA, vertexT **first_vertex);
-void    qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB);
-void	qh_triangulate_mirror (facetT *facetA, facetT *facetB);
-void    qh_triangulate_null (facetT *facetA);
-void    qh_vertexintersect(setT **vertexsetA,setT *vertexsetB);
-setT   *qh_vertexintersect_new(setT *vertexsetA,setT *vertexsetB);
-void    qh_vertexneighbors (void /*qh facet_list*/);
-boolT 	qh_vertexsubset(setT *vertexsetA, setT *vertexsetB);
-
-
-#endif /* qhDEFpoly */
diff --git a/extern/qhull/src/poly2.c b/extern/qhull/src/poly2.c
deleted file mode 100644
index 713faab8bed..00000000000
--- a/extern/qhull/src/poly2.c
+++ /dev/null
@@ -1,3070 +0,0 @@
-/*
  ---------------------------------
-
-   poly2.c 
-   implements polygons and simplices
-
-   see qh-poly.htm, poly.h and qhull.h
-
-   frequently used code is in poly.c
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*======== functions in alphabetical order ==========*/
-
-/*---------------------------------
-  
-  qh_addhash( newelem, hashtable, hashsize, hash )
-    add newelem to linear hash table at hash if not already there
-*/
-void qh_addhash (void* newelem, setT *hashtable, int hashsize, unsigned hash) {
-  int scan;
-  void *elem;
-
-  for (scan= (int)hash; (elem= SETelem_(hashtable, scan)); 
-       scan= (++scan >= hashsize ? 0 : scan)) {
-    if (elem == newelem)
-      break;
-  }
-  /* loop terminates because qh_HASHfactor >= 1.1 by qh_initbuffers */
-  if (!elem)
-    SETelem_(hashtable, scan)= newelem;
-} /* addhash */
-
-/*---------------------------------
-  
-  qh_check_bestdist()
-    check that all points are within max_outside of the nearest facet
-    if qh.ONLYgood,
-      ignores !good facets
-
-  see: 
-    qh_check_maxout(), qh_outerinner()
-
-  notes:
-    only called from qh_check_points()
-      seldom used since qh.MERGING is almost always set
-    if notverified>0 at end of routine
-      some points were well inside the hull.  If the hull contains
-      a lens-shaped component, these points were not verified.  Use
-      options 'Qi Tv' to verify all points.  (Exhaustive check also verifies)
-
-  design:
-    determine facet for each point (if any)
-    for each point
-      start with the assigned facet or with the first facet
-      find the best facet for the point and check all coplanar facets
-      error if point is outside of facet
-*/
-void qh_check_bestdist (void) {
-  boolT waserror= False, unassigned;
-  facetT *facet, *bestfacet, *errfacet1= NULL, *errfacet2= NULL;
-  facetT *facetlist; 
-  realT dist, maxoutside, maxdist= -REALmax;
-  pointT *point;
-  int numpart= 0, facet_i, facet_n, notgood= 0, notverified= 0;
-  setT *facets;
-
-  trace1((qh ferr, "qh_check_bestdist: check points below nearest facet.  Facet_list f%d\n",
-      qh facet_list->id));
-  maxoutside= qh_maxouter();
-  maxoutside += qh DISTround;
-  /* one more qh.DISTround for check computation */
-  trace1((qh ferr, "qh_check_bestdist: check that all points are within %2.2g of best facet\n", maxoutside));
-  facets= qh_pointfacet (/*qh facet_list*/);
-  if (!qh_QUICKhelp && qh PRINTprecision)
-    fprintf (qh ferr, "\n\
-qhull output completed.  Verifying that %d points are\n\
-below %2.2g of the nearest %sfacet.\n",
-	     qh_setsize(facets), maxoutside, (qh ONLYgood ?  "good " : ""));
-  FOREACHfacet_i_(facets) {  /* for each point with facet assignment */
-    if (facet)
-      unassigned= False;
-    else {
-      unassigned= True;
-      facet= qh facet_list;
-    }
-    point= qh_point(facet_i);
-    if (point == qh GOODpointp)
-      continue;
-    qh_distplane(point, facet, &dist);
-    numpart++;
-    bestfacet= qh_findbesthorizon (!qh_IScheckmax, point, facet, qh_NOupper, &dist, &numpart);
-    /* occurs after statistics reported */
-    maximize_(maxdist, dist);
-    if (dist > maxoutside) {
-      if (qh ONLYgood && !bestfacet->good 
-	  && !((bestfacet= qh_findgooddist (point, bestfacet, &dist, &facetlist))
-	       && dist > maxoutside))
-	notgood++;
-      else {
-	waserror= True;
-	fprintf(qh ferr, "qhull precision error: point p%d is outside facet f%d, distance= %6.8g maxoutside= %6.8g\n", 
-		facet_i, bestfacet->id, dist, maxoutside);
-	if (errfacet1 != bestfacet) {
-	  errfacet2= errfacet1;
-	  errfacet1= bestfacet;
-	}
-      }
-    }else if (unassigned && dist < -qh MAXcoplanar)
-      notverified++;
-  }
-  qh_settempfree (&facets);
-  if (notverified && !qh DELAUNAY && !qh_QUICKhelp && qh PRINTprecision) 
-    fprintf(qh ferr, "\n%d points were well inside the hull.  If the hull contains\n\
-a lens-shaped component, these points were not verified.  Use\n\
-options 'Qci Tv' to verify all points.\n", notverified); 
-  if (maxdist > qh outside_err) {
-    fprintf( qh ferr, "qhull precision error (qh_check_bestdist): a coplanar point is %6.2g from convex hull.  The maximum value (qh.outside_err) is %6.2g\n",
-              maxdist, qh outside_err);
-    qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
-  }else if (waserror && qh outside_err > REALmax/2)
-    qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
-  else if (waserror)
-    ;                       /* the error was logged to qh.ferr but does not effect the output */
-  trace0((qh ferr, "qh_check_bestdist: max distance outside %2.2g\n", maxdist));
-} /* check_bestdist */
-
-/*---------------------------------
-  
-  qh_check_maxout()
-    updates qh.max_outside by checking all points against bestfacet
-    if qh.ONLYgood, ignores !good facets
-
-  returns:
-    updates facet->maxoutside via qh_findbesthorizon()
-    sets qh.maxoutdone
-    if printing qh.min_vertex (qh_outerinner), 
-      it is updated to the current vertices
-    removes inside/coplanar points from coplanarset as needed
-
-  notes:
-    defines coplanar as min_vertex instead of MAXcoplanar 
-    may not need to check near-inside points because of qh.MAXcoplanar 
-      and qh.KEEPnearinside (before it was -DISTround)
-
-  see also:
-    qh_check_bestdist()
-
-  design:
-    if qh.min_vertex is needed
-      for all neighbors of all vertices
-        test distance from vertex to neighbor
-    determine facet for each point (if any)
-    for each point with an assigned facet
-      find the best facet for the point and check all coplanar facets
-        (updates outer planes)
-    remove near-inside points from coplanar sets
-*/
-#ifndef qh_NOmerge
-void qh_check_maxout (void) {
-  facetT *facet, *bestfacet, *neighbor, **neighborp, *facetlist;
-  realT dist, maxoutside, minvertex, old_maxoutside;
-  pointT *point;
-  int numpart= 0, facet_i, facet_n, notgood= 0;
-  setT *facets, *vertices;
-  vertexT *vertex;
-
-  trace1((qh ferr, "qh_check_maxout: check and update maxoutside for each facet.\n"));
-  maxoutside= minvertex= 0;
-  if (qh VERTEXneighbors 
-  && (qh PRINTsummary || qh KEEPinside || qh KEEPcoplanar 
-	|| qh TRACElevel || qh PRINTstatistics
-	|| qh PRINTout[0] == qh_PRINTsummary || qh PRINTout[0] == qh_PRINTnone)) { 
-    trace1((qh ferr, "qh_check_maxout: determine actual maxoutside and minvertex\n"));
-    vertices= qh_pointvertex (/*qh facet_list*/);
-    FORALLvertices {
-      FOREACHneighbor_(vertex) {
-        zinc_(Zdistvertex);  /* distance also computed by main loop below */
-	qh_distplane (vertex->point, neighbor, &dist);
-	minimize_(minvertex, dist);
-	if (-dist > qh TRACEdist || dist > qh TRACEdist 
-	|| neighbor == qh tracefacet || vertex == qh tracevertex)
-	  fprintf (qh ferr, "qh_check_maxout: p%d (v%d) is %.2g from f%d\n",
-		    qh_pointid (vertex->point), vertex->id, dist, neighbor->id);
-      }
-    }
-    if (qh MERGING) {
-      wmin_(Wminvertex, qh min_vertex);
-    }
-    qh min_vertex= minvertex;
-    qh_settempfree (&vertices);  
-  }
-  facets= qh_pointfacet (/*qh facet_list*/);
-  do {
-    old_maxoutside= fmax_(qh max_outside, maxoutside);
-    FOREACHfacet_i_(facets) {     /* for each point with facet assignment */
-      if (facet) { 
-	point= qh_point(facet_i);
-	if (point == qh GOODpointp)
-	  continue;
-	zinc_(Ztotcheck);
-	qh_distplane(point, facet, &dist);
-	numpart++;
-	bestfacet= qh_findbesthorizon (qh_IScheckmax, point, facet, !qh_NOupper, &dist, &numpart);
-	if (bestfacet && dist > maxoutside) {
-	  if (qh ONLYgood && !bestfacet->good 
-	  && !((bestfacet= qh_findgooddist (point, bestfacet, &dist, &facetlist))
-	       && dist > maxoutside))
-	    notgood++;
-	  else
-	    maxoutside= dist;
-	}
-	if (dist > qh TRACEdist || (bestfacet && bestfacet == qh tracefacet))
-	  fprintf (qh ferr, "qh_check_maxout: p%d is %.2g above f%d\n",
-		     qh_pointid (point), dist, bestfacet->id);
-      }
-    }
-  }while 
-    (maxoutside > 2*old_maxoutside);
-    /* if qh.maxoutside increases substantially, qh_SEARCHdist is not valid 
-          e.g., RBOX 5000 s Z1 G1e-13 t1001200614 | qhull */
-  zzadd_(Zcheckpart, numpart);
-  qh_settempfree (&facets);
-  wval_(Wmaxout)= maxoutside - qh max_outside;
-  wmax_(Wmaxoutside, qh max_outside);
-  qh max_outside= maxoutside;
-  qh_nearcoplanar (/*qh.facet_list*/);
-  qh maxoutdone= True;
-  trace1((qh ferr, "qh_check_maxout: maxoutside %2.2g, min_vertex %2.2g, outside of not good %d\n",
-       maxoutside, qh min_vertex, notgood));
-} /* check_maxout */
-#else /* qh_NOmerge */
-void qh_check_maxout (void) {
-}
-#endif
-
-/*---------------------------------
-  
-  qh_check_output()
-    performs the checks at the end of qhull algorithm
-    Maybe called after voronoi output.  Will recompute otherwise centrums are Voronoi centers instead
-*/
-void qh_check_output (void) {
-  int i;
-
-  if (qh STOPcone)
-    return;
-  if (qh VERIFYoutput | qh IStracing | qh CHECKfrequently) {
-    qh_checkpolygon (qh facet_list);
-    qh_checkflipped_all (qh facet_list);
-    qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
-  }else if (!qh MERGING && qh_newstats (qhstat precision, &i)) {
-    qh_checkflipped_all (qh facet_list);
-    qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
-  }
-} /* check_output */
-
-
-
-/*---------------------------------
-  
-  qh_check_point( point, facet, maxoutside, maxdist, errfacet1, errfacet2 )
-    check that point is less than maxoutside from facet
-*/
-void qh_check_point (pointT *point, facetT *facet, realT *maxoutside, realT *maxdist, facetT **errfacet1, facetT **errfacet2) {
-  realT dist;
-
-  /* occurs after statistics reported */
-  qh_distplane(point, facet, &dist);
-  if (dist > *maxoutside) {
-    if (*errfacet1 != facet) {
-      *errfacet2= *errfacet1;
-      *errfacet1= facet;
-    }
-    fprintf(qh ferr, "qhull precision error: point p%d is outside facet f%d, distance= %6.8g maxoutside= %6.8g\n", 
-	      qh_pointid(point), facet->id, dist, *maxoutside);
-  }
-  maximize_(*maxdist, dist);
-} /* qh_check_point */
-
-
-/*---------------------------------
-  
-  qh_check_points()
-    checks that all points are inside all facets
-
-  notes:
-    if many points and qh_check_maxout not called (i.e., !qh.MERGING), 
-       calls qh_findbesthorizon (seldom done).
-    ignores flipped facets
-    maxoutside includes 2 qh.DISTrounds
-      one qh.DISTround for the computed distances in qh_check_points
-    qh_printafacet and qh_printsummary needs only one qh.DISTround
-    the computation for qh.VERIFYdirect does not account for qh.other_points
-
-  design:
-    if many points
-      use qh_check_bestdist()
-    else
-      for all facets
-        for all points
-          check that point is inside facet
-*/
-void qh_check_points (void) {
-  facetT *facet, *errfacet1= NULL, *errfacet2= NULL;
-  realT total, maxoutside, maxdist= -REALmax;
-  pointT *point, **pointp, *pointtemp;
-  boolT testouter;
-
-  maxoutside= qh_maxouter();
-  maxoutside += qh DISTround;
-  /* one more qh.DISTround for check computation */
-  trace1((qh ferr, "qh_check_points: check all points below %2.2g of all facet planes\n",
-	  maxoutside));
-  if (qh num_good)   /* miss counts other_points and !good facets */
-     total= (float) qh num_good * qh num_points;
-  else
-     total= (float) qh num_facets * qh num_points;
-  if (total >= qh_VERIFYdirect && !qh maxoutdone) {
-    if (!qh_QUICKhelp && qh SKIPcheckmax && qh MERGING)
-      fprintf (qh ferr, "\n\
-qhull input warning: merging without checking outer planes ('Q5' or 'Po').\n\
-Verify may report that a point is outside of a facet.\n");
-    qh_check_bestdist();
-  }else {
-    if (qh_MAXoutside && qh maxoutdone)
-      testouter= True;
-    else
-      testouter= False;
-    if (!qh_QUICKhelp) {
-      if (qh MERGEexact)
-	fprintf (qh ferr, "\n\
-qhull input warning: exact merge ('Qx').  Verify may report that a point\n\
-is outside of a facet.  See qh-optq.htm#Qx\n");
-      else if (qh SKIPcheckmax || qh NOnearinside)
-	fprintf (qh ferr, "\n\
-qhull input warning: no outer plane check ('Q5') or no processing of\n\
-near-inside points ('Q8').  Verify may report that a point is outside\n\
-of a facet.\n");
-    }
-    if (qh PRINTprecision) {
-      if (testouter)
-	fprintf (qh ferr, "\n\
-Output completed.  Verifying that all points are below outer planes of\n\
-all %sfacets.  Will make %2.0f distance computations.\n", 
-	      (qh ONLYgood ?  "good " : ""), total);
-      else
-	fprintf (qh ferr, "\n\
-Output completed.  Verifying that all points are below %2.2g of\n\
-all %sfacets.  Will make %2.0f distance computations.\n", 
-	      maxoutside, (qh ONLYgood ?  "good " : ""), total);
-    }
-    FORALLfacets {
-      if (!facet->good && qh ONLYgood)
-        continue;
-      if (facet->flipped)
-        continue;
-      if (!facet->normal) {
-	fprintf( qh ferr, "qhull warning (qh_check_points): missing normal for facet f%d\n", facet->id);
-        continue;
-      }
-      if (testouter) {
-#if qh_MAXoutside
-	maxoutside= facet->maxoutside + 2* qh DISTround;
-	/* one DISTround to actual point and another to computed point */
-#endif
-      }
-      FORALLpoints {
-	if (point != qh GOODpointp)
-	  qh_check_point (point, facet, &maxoutside, &maxdist, &errfacet1, &errfacet2);
-      }
-      FOREACHpoint_(qh other_points) {
-	if (point != qh GOODpointp)
-	  qh_check_point (point, facet, &maxoutside, &maxdist, &errfacet1, &errfacet2);
-      }
-    }
-    if (maxdist > qh outside_err) {
-      fprintf( qh ferr, "qhull precision error (qh_check_points): a coplanar point is %6.2g from convex hull.  The maximum value (qh.outside_err) is %6.2g\n",
-                maxdist, qh outside_err );
-      qh_errexit2( qh_ERRprec, errfacet1, errfacet2 );
-    }else if (errfacet1 && qh outside_err > REALmax/2)
-        qh_errexit2( qh_ERRprec, errfacet1, errfacet2 );
-    else if (errfacet1)
-        ;  /* the error was logged to qh.ferr but does not effect the output */
-    trace0((qh ferr, "qh_check_points: max distance outside %2.2g\n", maxdist));
-  }
-} /* check_points */
-
-
-/*---------------------------------
-  
-  qh_checkconvex( facetlist, fault )
-    check that each ridge in facetlist is convex
-    fault = qh_DATAfault if reporting errors
-          = qh_ALGORITHMfault otherwise
-
-  returns:
-    counts Zconcaveridges and Zcoplanarridges
-    errors if concaveridge or if merging an coplanar ridge
-
-  note:
-    if not merging, 
-      tests vertices for neighboring simplicial facets
-    else if ZEROcentrum, 
-      tests vertices for neighboring simplicial   facets
-    else 
-      tests centrums of neighboring facets
-
-  design:
-    for all facets
-      report flipped facets
-      if ZEROcentrum and simplicial neighbors
-        test vertices for neighboring simplicial facets
-      else
-        test centrum against all neighbors 
-*/
-void qh_checkconvex(facetT *facetlist, int fault) {
-  facetT *facet, *neighbor, **neighborp, *errfacet1=NULL, *errfacet2=NULL;
-  vertexT *vertex;
-  realT dist;
-  pointT *centrum;
-  boolT waserror= False, centrum_warning= False, tempcentrum= False, allsimplicial;
-  int neighbor_i;
-
-  trace1((qh ferr, "qh_checkconvex: check all ridges are convex\n"));
-  if (!qh RERUN) {
-    zzval_(Zconcaveridges)= 0;
-    zzval_(Zcoplanarridges)= 0;
-  }
-  FORALLfacet_(facetlist) {
-    if (facet->flipped) {
-      qh_precision ("flipped facet");
-      fprintf (qh ferr, "qhull precision error: f%d is flipped (interior point is outside)\n",
-	       facet->id);
-      errfacet1= facet;
-      waserror= True;
-      continue;
-    }
-    if (qh MERGING && (!qh ZEROcentrum || !facet->simplicial || facet->tricoplanar))
-      allsimplicial= False;
-    else {
-      allsimplicial= True;
-      neighbor_i= 0;
-      FOREACHneighbor_(facet) {
-        vertex= SETelemt_(facet->vertices, neighbor_i++, vertexT);
-	if (!neighbor->simplicial || neighbor->tricoplanar) {
-	  allsimplicial= False;
-	  continue;
-	}
-        qh_distplane (vertex->point, neighbor, &dist);
-        if (dist > -qh DISTround) {
-	  if (fault == qh_DATAfault) {
-            qh_precision ("coplanar or concave ridge");
-	    fprintf (qh ferr, "qhull precision error: initial simplex is not convex. Distance=%.2g\n", dist);
-	    qh_errexit(qh_ERRsingular, NULL, NULL);
-	  }
-          if (dist > qh DISTround) {
-            zzinc_(Zconcaveridges);
-            qh_precision ("concave ridge");
-            fprintf (qh ferr, "qhull precision error: f%d is concave to f%d, since p%d (v%d) is %6.4g above\n",
-              facet->id, neighbor->id, qh_pointid(vertex->point), vertex->id, dist);
-            errfacet1= facet;
-            errfacet2= neighbor;
-            waserror= True;
-          }else if (qh ZEROcentrum) {
-            if (dist > 0) {     /* qh_checkzero checks that dist < - qh DISTround */
-              zzinc_(Zcoplanarridges); 
-              qh_precision ("coplanar ridge");
-              fprintf (qh ferr, "qhull precision error: f%d is clearly not convex to f%d, since p%d (v%d) is %6.4g above\n",
-                facet->id, neighbor->id, qh_pointid(vertex->point), vertex->id, dist);
-              errfacet1= facet;
-              errfacet2= neighbor;
-              waserror= True;
-	    }
-	  }else {              
-            zzinc_(Zcoplanarridges);
-            qh_precision ("coplanar ridge");
-            trace0((qh ferr, "qhull precision error: f%d may be coplanar to f%d, since p%d (v%d) is within %6.4g during p%d\n",
-              facet->id, neighbor->id, qh_pointid(vertex->point), vertex->id, dist, qh furthest_id));
-          }
-        }
-      }
-    }
-    if (!allsimplicial) {
-      if (qh CENTERtype == qh_AScentrum) {
-        if (!facet->center)
-          facet->center= qh_getcentrum (facet);
-        centrum= facet->center;
-      }else {
-	if (!centrum_warning && (!facet->simplicial || facet->tricoplanar)) {
-	   centrum_warning= True;
-	   fprintf (qh ferr, "qhull note: recomputing centrums for convexity test.  This may lead to false, precision errors.\n");
-	}
-        centrum= qh_getcentrum(facet);
-        tempcentrum= True;
-      }
-      FOREACHneighbor_(facet) {
-	if (qh ZEROcentrum && facet->simplicial && neighbor->simplicial)
-	  continue;
-	if (facet->tricoplanar || neighbor->tricoplanar)
-	  continue;
-        zzinc_(Zdistconvex);
-        qh_distplane (centrum, neighbor, &dist);
-        if (dist > qh DISTround) {
-          zzinc_(Zconcaveridges);
-          qh_precision ("concave ridge");
-          fprintf (qh ferr, "qhull precision error: f%d is concave to f%d.  Centrum of f%d is %6.4g above f%d\n",
-            facet->id, neighbor->id, facet->id, dist, neighbor->id);
-          errfacet1= facet;
-          errfacet2= neighbor;
-          waserror= True;
-	}else if (dist >= 0.0) {   /* if arithmetic always rounds the same,
-				     can test against centrum radius instead */
-          zzinc_(Zcoplanarridges);
-          qh_precision ("coplanar ridge");
-          fprintf (qh ferr, "qhull precision error: f%d is coplanar or concave to f%d.  Centrum of f%d is %6.4g above f%d\n",
-            facet->id, neighbor->id, facet->id, dist, neighbor->id);
-	  errfacet1= facet;
-	  errfacet2= neighbor;
-	  waserror= True;
-        }
-      }
-      if (tempcentrum)
-        qh_memfree(centrum, qh normal_size);
-    }
-  }
-  if (waserror && !qh FORCEoutput)
-    qh_errexit2 (qh_ERRprec, errfacet1, errfacet2);
-} /* checkconvex */
-
-
-/*---------------------------------
-  
-  qh_checkfacet( facet, newmerge, waserror )
-    checks for consistency errors in facet
-    newmerge set if from merge.c
-
-  returns:
-    sets waserror if any error occurs
-
-  checks:
-    vertex ids are inverse sorted
-    unless newmerge, at least hull_dim neighbors and vertices (exactly if simplicial)
-    if non-simplicial, at least as many ridges as neighbors
-    neighbors are not duplicated
-    ridges are not duplicated
-    in 3-d, ridges=verticies
-    (qh.hull_dim-1) ridge vertices
-    neighbors are reciprocated
-    ridge neighbors are facet neighbors and a ridge for every neighbor
-    simplicial neighbors match facetintersect
-    vertex intersection matches vertices of common ridges 
-    vertex neighbors and facet vertices agree
-    all ridges have distinct vertex sets
-
-  notes:  
-    uses neighbor->seen
-
-  design:
-    check sets
-    check vertices
-    check sizes of neighbors and vertices
-    check for qh_MERGEridge and qh_DUPLICATEridge flags
-    check neighbor set
-    check ridge set
-    check ridges, neighbors, and vertices
-*/
-void qh_checkfacet(facetT *facet, boolT newmerge, boolT *waserrorp) {
-  facetT *neighbor, **neighborp, *errother=NULL;
-  ridgeT *ridge, **ridgep, *errridge= NULL, *ridge2;
-  vertexT *vertex, **vertexp;
-  unsigned previousid= INT_MAX;
-  int numneighbors, numvertices, numridges=0, numRvertices=0;
-  boolT waserror= False;
-  int skipA, skipB, ridge_i, ridge_n, i;
-  setT *intersection;
-
-  if (facet->visible) {
-    fprintf (qh ferr, "qhull internal error (qh_checkfacet): facet f%d is on the visible_list\n",
-      facet->id);
-    qh_errexit (qh_ERRqhull, facet, NULL);
-  }
-  if (!facet->normal) {
-    fprintf (qh ferr, "qhull internal error (qh_checkfacet): facet f%d does not have  a normal\n",
-      facet->id);
-    waserror= True;
-  }
-  qh_setcheck (facet->vertices, "vertices for f", facet->id);
-  qh_setcheck (facet->ridges, "ridges for f", facet->id);
-  qh_setcheck (facet->outsideset, "outsideset for f", facet->id);
-  qh_setcheck (facet->coplanarset, "coplanarset for f", facet->id);
-  qh_setcheck (facet->neighbors, "neighbors for f", facet->id);
-  FOREACHvertex_(facet->vertices) {
-    if (vertex->deleted) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): deleted vertex v%d in f%d\n", vertex->id, facet->id);
-      qh_errprint ("ERRONEOUS", NULL, NULL, NULL, vertex);
-      waserror= True;
-    }
-    if (vertex->id >= previousid) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): vertices of f%d are not in descending id order at v%d\n", facet->id, vertex->id);
-      waserror= True;
-      break;
-    }
-    previousid= vertex->id;
-  }
-  numneighbors= qh_setsize(facet->neighbors);
-  numvertices= qh_setsize(facet->vertices);
-  numridges= qh_setsize(facet->ridges);
-  if (facet->simplicial) {
-    if (numvertices+numneighbors != 2*qh hull_dim 
-    && !facet->degenerate && !facet->redundant) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): for simplicial facet f%d, #vertices %d + #neighbors %d != 2*qh hull_dim\n", 
-                facet->id, numvertices, numneighbors);
-      qh_setprint (qh ferr, "", facet->neighbors);
-      waserror= True;
-    }
-  }else { /* non-simplicial */
-    if (!newmerge 
-    &&(numvertices < qh hull_dim || numneighbors < qh hull_dim)
-    && !facet->degenerate && !facet->redundant) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): for facet f%d, #vertices %d or #neighbors %d < qh hull_dim\n",
-         facet->id, numvertices, numneighbors);
-       waserror= True;
-    }
-    /* in 3-d, can get a vertex twice in an edge list, e.g., RBOX 1000 s W1e-13 t995849315 D2 | QHULL d Tc Tv TP624 TW1e-13 T4 */
-    if (numridges < numneighbors
-    ||(qh hull_dim == 3 && numvertices > numridges && !qh NEWfacets)
-    ||(qh hull_dim == 2 && numridges + numvertices + numneighbors != 6)) {
-      if (!facet->degenerate && !facet->redundant) {
-	fprintf(qh ferr, "qhull internal error (qh_checkfacet): for facet f%d, #ridges %d < #neighbors %d or (3-d) > #vertices %d or (2-d) not all 2\n",
-	    facet->id, numridges, numneighbors, numvertices);
-	waserror= True;
-      }
-    }
-  }
-  FOREACHneighbor_(facet) {
-    if (neighbor == qh_MERGEridge || neighbor == qh_DUPLICATEridge) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d still has a MERGE or DUP neighbor\n", facet->id);
-      qh_errexit (qh_ERRqhull, facet, NULL);
-    }
-    neighbor->seen= True;
-  }
-  FOREACHneighbor_(facet) {
-    if (!qh_setin(neighbor->neighbors, facet)) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d has neighbor f%d, but f%d does not have neighbor f%d\n",
-	      facet->id, neighbor->id, neighbor->id, facet->id);
-      errother= neighbor;
-      waserror= True;
-    }
-    if (!neighbor->seen) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d has a duplicate neighbor f%d\n",
-	      facet->id, neighbor->id);
-      errother= neighbor;
-      waserror= True;
-    }    
-    neighbor->seen= False;
-  }
-  FOREACHridge_(facet->ridges) {
-    qh_setcheck (ridge->vertices, "vertices for r", ridge->id);
-    ridge->seen= False;
-  }
-  FOREACHridge_(facet->ridges) {
-    if (ridge->seen) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d has a duplicate ridge r%d\n",
-	      facet->id, ridge->id);
-      errridge= ridge;
-      waserror= True;
-    }    
-    ridge->seen= True;
-    numRvertices= qh_setsize(ridge->vertices);
-    if (numRvertices != qh hull_dim - 1) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): ridge between f%d and f%d has %d vertices\n", 
-                ridge->top->id, ridge->bottom->id, numRvertices);
-      errridge= ridge;
-      waserror= True;
-    }
-    neighbor= otherfacet_(ridge, facet);
-    neighbor->seen= True;
-    if (!qh_setin(facet->neighbors, neighbor)) {
-      fprintf(qh ferr, "qhull internal error (qh_checkfacet): for facet f%d, neighbor f%d of ridge r%d not in facet\n",
-           facet->id, neighbor->id, ridge->id);
-      errridge= ridge;
-      waserror= True;
-    }
-  }
-  if (!facet->simplicial) {
-    FOREACHneighbor_(facet) {
-      if (!neighbor->seen) {
-        fprintf(qh ferr, "qhull internal error (qh_checkfacet): facet f%d does not have a ridge for neighbor f%d\n",
-	      facet->id, neighbor->id);
-	errother= neighbor;
-        waserror= True;
-      }
-      intersection= qh_vertexintersect_new(facet->vertices, neighbor->vertices);
-      qh_settemppush (intersection);
-      FOREACHvertex_(facet->vertices) {
-	vertex->seen= False;
-	vertex->seen2= False;
-      }
-      FOREACHvertex_(intersection)
-	vertex->seen= True;
-      FOREACHridge_(facet->ridges) {
-	if (neighbor != otherfacet_(ridge, facet))
-	    continue;
-	FOREACHvertex_(ridge->vertices) {
-	  if (!vertex->seen) {
-	    fprintf (qh ferr, "qhull internal error (qh_checkfacet): vertex v%d in r%d not in f%d intersect f%d\n",
-  	          vertex->id, ridge->id, facet->id, neighbor->id);
-	    qh_errexit (qh_ERRqhull, facet, ridge);
-	  }
-	  vertex->seen2= True;
-	}
-      }
-      if (!newmerge) {
-	FOREACHvertex_(intersection) {
-	  if (!vertex->seen2) {
-	    if (qh IStracing >=3 || !qh MERGING) {
-	      fprintf (qh ferr, "qhull precision error (qh_checkfacet): vertex v%d in f%d intersect f%d but\n\
- not in a ridge.  This is ok under merging.  Last point was p%d\n",
-		     vertex->id, facet->id, neighbor->id, qh furthest_id);
-	      if (!qh FORCEoutput && !qh MERGING) {
-		qh_errprint ("ERRONEOUS", facet, neighbor, NULL, vertex);
-		if (!qh MERGING)
-		  qh_errexit (qh_ERRqhull, NULL, NULL);
-	      }
-	    }
-	  }
-	}
-      }      
-      qh_settempfree (&intersection);
-    }
-  }else { /* simplicial */
-    FOREACHneighbor_(facet) {
-      if (neighbor->simplicial) {    
-	skipA= SETindex_(facet->neighbors, neighbor);
-	skipB= qh_setindex (neighbor->neighbors, facet);
-	if (!qh_setequal_skip (facet->vertices, skipA, neighbor->vertices, skipB)) {
-	  fprintf (qh ferr, "qhull internal error (qh_checkfacet): facet f%d skip %d and neighbor f%d skip %d do not match \n",
-		   facet->id, skipA, neighbor->id, skipB);
-	  errother= neighbor;
-	  waserror= True;
-	}
-      }
-    }
-  }
-  if (qh hull_dim < 5 && (qh IStracing > 2 || qh CHECKfrequently)) {
-    FOREACHridge_i_(facet->ridges) {           /* expensive */
-      for (i= ridge_i+1; i < ridge_n; i++) {
-	ridge2= SETelemt_(facet->ridges, i, ridgeT);
-	if (qh_setequal (ridge->vertices, ridge2->vertices)) {
-	  fprintf (qh ferr, "qh_checkfacet: ridges r%d and r%d have the same vertices\n",
-		  ridge->id, ridge2->id);
-	  errridge= ridge;
-	  waserror= True;
-	}
-      }
-    }
-  }
-  if (waserror) {
-    qh_errprint("ERRONEOUS", facet, errother, errridge, NULL);
-    *waserrorp= True;
-  }
-} /* checkfacet */
-
-
-/*---------------------------------
-  
-  qh_checkflipped_all( facetlist )
-    checks orientation of facets in list against interior point
-*/
-void qh_checkflipped_all (facetT *facetlist) {
-  facetT *facet;
-  boolT waserror= False;
-  realT dist;
-
-  if (facetlist == qh facet_list)
-    zzval_(Zflippedfacets)= 0;
-  FORALLfacet_(facetlist) {
-    if (facet->normal && !qh_checkflipped (facet, &dist, !qh_ALL)) {
-      fprintf(qh ferr, "qhull precision error: facet f%d is flipped, distance= %6.12g\n",
-	      facet->id, dist);
-      if (!qh FORCEoutput) {
-	qh_errprint("ERRONEOUS", facet, NULL, NULL, NULL);
-	waserror= True;
-      }
-    }
-  }
-  if (waserror) {
-    fprintf (qh ferr, "\n\
-A flipped facet occurs when its distance to the interior point is\n\
-greater than %2.2g, the maximum roundoff error.\n", -qh DISTround);
-    qh_errexit(qh_ERRprec, NULL, NULL);
-  }
-} /* checkflipped_all */
-
-/*---------------------------------
-  
-  qh_checkpolygon( facetlist )
-    checks the correctness of the structure
-
-  notes:
-    call with either qh.facet_list or qh.newfacet_list
-    checks num_facets and num_vertices if qh.facet_list
-
-  design:
-    for each facet
-      checks facet and outside set
-    initializes vertexlist
-    for each facet
-      checks vertex set
-    if checking all facets (qh.facetlist)
-      check facet count
-      if qh.VERTEXneighbors
-        check vertex neighbors and count
-      check vertex count
-*/
-void qh_checkpolygon(facetT *facetlist) {
-  facetT *facet;
-  vertexT *vertex, **vertexp, *vertexlist;
-  int numfacets= 0, numvertices= 0, numridges= 0;
-  int totvneighbors= 0, totvertices= 0;
-  boolT waserror= False, nextseen= False, visibleseen= False;
-  
-  trace1((qh ferr, "qh_checkpolygon: check all facets from f%d\n", facetlist->id));
-  if (facetlist != qh facet_list || qh ONLYgood)
-    nextseen= True;
-  FORALLfacet_(facetlist) {
-    if (facet == qh visible_list)
-      visibleseen= True;
-    if (!facet->visible) {
-      if (!nextseen) {
-	if (facet == qh facet_next)
-	  nextseen= True;
-	else if (qh_setsize (facet->outsideset)) {
-	  if (!qh NARROWhull
-#if !qh_COMPUTEfurthest
-	       || facet->furthestdist >= qh MINoutside
-#endif
-			) {
-	    fprintf (qh ferr, "qhull internal error (qh_checkpolygon): f%d has outside points before qh facet_next\n",
-		     facet->id);
-	    qh_errexit (qh_ERRqhull, facet, NULL);
-	  }
-	}
-      }
-      numfacets++;
-      qh_checkfacet(facet, False, &waserror);
-    }
-  }
-  if (qh visible_list && !visibleseen && facetlist == qh facet_list) {
-    fprintf (qh ferr, "qhull internal error (qh_checkpolygon): visible list f%d no longer on facet list\n", qh visible_list->id);
-    qh_printlists();
-    qh_errexit (qh_ERRqhull, qh visible_list, NULL);
-  }
-  if (facetlist == qh facet_list)
-    vertexlist= qh vertex_list;
-  else if (facetlist == qh newfacet_list)
-    vertexlist= qh newvertex_list;
-  else
-    vertexlist= NULL;
-  FORALLvertex_(vertexlist) {
-    vertex->seen= False;
-    vertex->visitid= 0;
-  }  
-  FORALLfacet_(facetlist) {
-    if (facet->visible)
-      continue;
-    if (facet->simplicial)
-      numridges += qh hull_dim;
-    else
-      numridges += qh_setsize (facet->ridges);
-    FOREACHvertex_(facet->vertices) {
-      vertex->visitid++;
-      if (!vertex->seen) {
-	vertex->seen= True;
-	numvertices++;
-	if (qh_pointid (vertex->point) == -1) {
-	  fprintf (qh ferr, "qhull internal error (qh_checkpolygon): unknown point %p for vertex v%d first_point %p\n",
-		   vertex->point, vertex->id, qh first_point);
-	  waserror= True;
-	}
-      }
-    }
-  }
-  qh vertex_visit += numfacets;
-  if (facetlist == qh facet_list) {
-    if (numfacets != qh num_facets - qh num_visible) {
-      fprintf(qh ferr, "qhull internal error (qh_checkpolygon): actual number of facets is %d, cumulative facet count is %d - %d visible facets\n",
-	      numfacets, qh num_facets, qh num_visible);
-      waserror= True;
-    }
-    qh vertex_visit++;
-    if (qh VERTEXneighbors) {
-      FORALLvertices {
-	qh_setcheck (vertex->neighbors, "neighbors for v", vertex->id);
-	if (vertex->deleted)
-	  continue;
-	totvneighbors += qh_setsize (vertex->neighbors);
-      }
-      FORALLfacet_(facetlist)
-	totvertices += qh_setsize (facet->vertices);
-      if (totvneighbors != totvertices) {
-	fprintf(qh ferr, "qhull internal error (qh_checkpolygon): vertex neighbors inconsistent.  Totvneighbors %d, totvertices %d\n",
-		totvneighbors, totvertices);
-	waserror= True;
-      }
-    }
-    if (numvertices != qh num_vertices - qh_setsize(qh del_vertices)) {
-      fprintf(qh ferr, "qhull internal error (qh_checkpolygon): actual number of vertices is %d, cumulative vertex count is %d\n",
-	      numvertices, qh num_vertices - qh_setsize(qh del_vertices));
-      waserror= True;
-    }
-    if (qh hull_dim == 2 && numvertices != numfacets) {
-      fprintf (qh ferr, "qhull internal error (qh_checkpolygon): #vertices %d != #facets %d\n",
-        numvertices, numfacets);
-      waserror= True;
-    }
-    if (qh hull_dim == 3 && numvertices + numfacets - numridges/2 != 2) {
-      fprintf (qh ferr, "qhull warning: #vertices %d + #facets %d - #edges %d != 2\n\
-	A vertex appears twice in a edge list.  May occur during merging.",
-        numvertices, numfacets, numridges/2);
-      /* occurs if lots of merging and a vertex ends up twice in an edge list.  e.g., RBOX 1000 s W1e-13 t995849315 D2 | QHULL d Tc Tv */
-    }
-  }
-  if (waserror) 
-    qh_errexit(qh_ERRqhull, NULL, NULL);
-} /* checkpolygon */
-
-
-/*---------------------------------
-  
-  qh_checkvertex( vertex )
-    check vertex for consistency
-    checks vertex->neighbors
-
-  notes:
-    neighbors checked efficiently in checkpolygon
-*/
-void qh_checkvertex (vertexT *vertex) {
-  boolT waserror= False;
-  facetT *neighbor, **neighborp, *errfacet=NULL;
-
-  if (qh_pointid (vertex->point) == -1) {
-    fprintf (qh ferr, "qhull internal error (qh_checkvertex): unknown point id %p\n", vertex->point);
-    waserror= True;
-  }
-  if (vertex->id >= qh vertex_id) {
-    fprintf (qh ferr, "qhull internal error (qh_checkvertex): unknown vertex id %d\n", vertex->id);
-    waserror= True;
-  }
-  if (!waserror && !vertex->deleted) {
-    if (qh_setsize (vertex->neighbors)) {
-      FOREACHneighbor_(vertex) {
-        if (!qh_setin (neighbor->vertices, vertex)) {
-          fprintf (qh ferr, "qhull internal error (qh_checkvertex): neighbor f%d does not contain v%d\n", neighbor->id, vertex->id);
-	  errfacet= neighbor;
-	  waserror= True;
-	}
-      }
-    }
-  }
-  if (waserror) {
-    qh_errprint ("ERRONEOUS", NULL, NULL, NULL, vertex);
-    qh_errexit (qh_ERRqhull, errfacet, NULL);
-  }
-} /* checkvertex */
-  
-/*---------------------------------
-  
-  qh_clearcenters( type )
-    clear old data from facet->center
-
-  notes:
-    sets new centertype
-    nop if CENTERtype is the same
-*/
-void qh_clearcenters (qh_CENTER type) {
-  facetT *facet;
-  
-  if (qh CENTERtype != type) {
-    FORALLfacets {
-      if (qh CENTERtype == qh_ASvoronoi){
-        if (facet->center) {
-          qh_memfree (facet->center, qh center_size);
-          facet->center= NULL;
-        }
-      }else /* qh CENTERtype == qh_AScentrum */ {
-        if (facet->center) {
-          qh_memfree (facet->center, qh normal_size);
-	  facet->center= NULL;
-        }
-      }
-    }
-    qh CENTERtype= type;
-  }
-  trace2((qh ferr, "qh_clearcenters: switched to center type %d\n", type));
-} /* clearcenters */
-
-/*---------------------------------
-  
-  qh_createsimplex( vertices )
-    creates a simplex from a set of vertices
-
-  returns:
-    initializes qh.facet_list to the simplex
-    initializes qh.newfacet_list, .facet_tail
-    initializes qh.vertex_list, .newvertex_list, .vertex_tail
-
-  design:
-    initializes lists
-    for each vertex
-      create a new facet
-    for each new facet
-      create its neighbor set
-*/
-void qh_createsimplex(setT *vertices) {
-  facetT *facet= NULL, *newfacet;
-  boolT toporient= True;
-  int vertex_i, vertex_n, nth;
-  setT *newfacets= qh_settemp (qh hull_dim+1);
-  vertexT *vertex;
-  
-  qh facet_list= qh newfacet_list= qh facet_tail= qh_newfacet();
-  qh num_facets= qh num_vertices= qh num_visible= 0;
-  qh vertex_list= qh newvertex_list= qh vertex_tail= qh_newvertex(NULL);
-  FOREACHvertex_i_(vertices) {
-    newfacet= qh_newfacet();
-    newfacet->vertices= qh_setnew_delnthsorted (vertices, vertex_n,
-						vertex_i, 0);
-    newfacet->toporient= toporient;
-    qh_appendfacet(newfacet);
-    newfacet->newfacet= True;
-    qh_appendvertex (vertex);
-    qh_setappend (&newfacets, newfacet);
-    toporient ^= True;
-  }
-  FORALLnew_facets {
-    nth= 0;
-    FORALLfacet_(qh newfacet_list) {
-      if (facet != newfacet) 
-        SETelem_(newfacet->neighbors, nth++)= facet;
-    }
-    qh_settruncate (newfacet->neighbors, qh hull_dim);
-  }
-  qh_settempfree (&newfacets);
-  trace1((qh ferr, "qh_createsimplex: created simplex\n"));
-} /* createsimplex */
-
-/*---------------------------------
-  
-  qh_delridge( ridge )
-    deletes ridge from data structures it belongs to
-    frees up its memory
-
-  notes:
-    in merge.c, caller sets vertex->delridge for each vertex
-    ridges also freed in qh_freeqhull
-*/
-void qh_delridge(ridgeT *ridge) {
-  void **freelistp; /* used !qh_NOmem */
-  
-  qh_setdel(ridge->top->ridges, ridge);
-  qh_setdel(ridge->bottom->ridges, ridge);
-  qh_setfree(&(ridge->vertices));
-  qh_memfree_(ridge, sizeof(ridgeT), freelistp);
-} /* delridge */
-
-
-/*---------------------------------
-  
-  qh_delvertex( vertex )
-    deletes a vertex and frees its memory
-
-  notes:
-    assumes vertex->adjacencies have been updated if needed
-    unlinks from vertex_list
-*/
-void qh_delvertex (vertexT *vertex) {
-
-  if (vertex == qh tracevertex)
-    qh tracevertex= NULL;
-  qh_removevertex (vertex);
-  qh_setfree (&vertex->neighbors);
-  qh_memfree(vertex, sizeof(vertexT));
-} /* delvertex */
-
-
-/*---------------------------------
-  
-  qh_facet3vertex(  )
-    return temporary set of 3-d vertices in qh_ORIENTclock order
-
-  design:
-    if simplicial facet
-      build set from facet->vertices with facet->toporient
-    else
-      for each ridge in order
-        build set from ridge's vertices
-*/
-setT *qh_facet3vertex (facetT *facet) {
-  ridgeT *ridge, *firstridge;
-  vertexT *vertex;
-  int cntvertices, cntprojected=0;
-  setT *vertices;
-
-  cntvertices= qh_setsize(facet->vertices);
-  vertices= qh_settemp (cntvertices);
-  if (facet->simplicial) {
-    if (cntvertices != 3) {
-      fprintf (qh ferr, "qhull internal error (qh_facet3vertex): only %d vertices for simplicial facet f%d\n", 
-                  cntvertices, facet->id);
-      qh_errexit(qh_ERRqhull, facet, NULL);
-    }
-    qh_setappend (&vertices, SETfirst_(facet->vertices));
-    if (facet->toporient ^ qh_ORIENTclock)
-      qh_setappend (&vertices, SETsecond_(facet->vertices));
-    else
-      qh_setaddnth (&vertices, 0, SETsecond_(facet->vertices));
-    qh_setappend (&vertices, SETelem_(facet->vertices, 2));
-  }else {
-    ridge= firstridge= SETfirstt_(facet->ridges, ridgeT);   /* no infinite */
-    while ((ridge= qh_nextridge3d (ridge, facet, &vertex))) {
-      qh_setappend (&vertices, vertex);
-      if (++cntprojected > cntvertices || ridge == firstridge)
-        break;
-    }
-    if (!ridge || cntprojected != cntvertices) {
-      fprintf (qh ferr, "qhull internal error (qh_facet3vertex): ridges for facet %d don't match up.  got at least %d\n", 
-                  facet->id, cntprojected);
-      qh_errexit(qh_ERRqhull, facet, ridge);
-    }
-  }
-  return vertices;
-} /* facet3vertex */
-
-/*---------------------------------
-  
-  qh_findbestfacet( point, bestoutside, bestdist, isoutside )
-    find facet that is furthest below a point 
-
-    for Delaunay triangulations, 
-      Use qh_setdelaunay() to lift point to paraboloid and scale by 'Qbb' if needed
-      Do not use options 'Qbk', 'QBk', or 'QbB' since they scale the coordinates. 
-
-  returns:
-    if bestoutside is set (e.g., qh_ALL)
-      returns best facet that is not upperdelaunay
-      if Delaunay and inside, point is outside circumsphere of bestfacet
-    else
-      returns first facet below point
-      if point is inside, returns nearest, !upperdelaunay facet
-    distance to facet
-    isoutside set if outside of facet
-    
-  notes:
-    this works for all distributions
-    if inside, qh_findbestfacet performs an exhaustive search
-       this may be too conservative.  Sometimes it is clearly required.
-    qh_findbestfacet is not used by qhull.
-    uses qh.visit_id and qh.coplanarset
-    
-  see:
-    qh_findbest
-*/
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
-           realT *bestdist, boolT *isoutside) {
-  facetT *bestfacet= NULL;
-  int numpart, totpart= 0;
-  
-  bestfacet= qh_findbest (point, qh facet_list, 
-			    bestoutside, !qh_ISnewfacets, bestoutside /* qh_NOupper */,
-			    bestdist, isoutside, &totpart);
-  if (*bestdist < -qh DISTround) {
-    bestfacet= qh_findfacet_all (point, bestdist, isoutside, &numpart);
-    totpart += numpart;
-    if ((isoutside && bestoutside)
-    || (!isoutside && bestfacet->upperdelaunay)) {
-      bestfacet= qh_findbest (point, bestfacet, 
-			    bestoutside, False, bestoutside,
-			    bestdist, isoutside, &totpart);
-      totpart += numpart;
-    }
-  }
-  trace3((qh ferr, "qh_findbestfacet: f%d dist %2.2g isoutside %d totpart %d\n",
-	  bestfacet->id, *bestdist, *isoutside, totpart));
-  return bestfacet;
-} /* findbestfacet */ 
- 
-/*---------------------------------
-  
-  qh_findfacet_all( point, bestdist, isoutside, numpart )
-    exhaustive search for facet below a point 
-
-    for Delaunay triangulations, 
-      Use qh_setdelaunay() to lift point to paraboloid and scale by 'Qbb' if needed
-      Do not use options 'Qbk', 'QBk', or 'QbB' since they scale the coordinates. 
-
-  returns:
-    returns first facet below point
-    if point is inside, 
-      returns nearest facet
-    distance to facet
-    isoutside if point is outside of the hull
-    number of distance tests
-*/
-facetT *qh_findfacet_all (pointT *point, realT *bestdist, boolT *isoutside,
-			  int *numpart) {
-  facetT *bestfacet= NULL, *facet;
-  realT dist;
-  int totpart= 0;
-  
-  *bestdist= REALmin;
-  *isoutside= False;
-  FORALLfacets {
-    if (facet->flipped || !facet->normal)
-      continue;
-    totpart++;
-    qh_distplane (point, facet, &dist);
-    if (dist > *bestdist) {
-      *bestdist= dist;
-      bestfacet= facet;
-      if (dist > qh MINoutside) {
-        *isoutside= True;
-        break;
-      }
-    }
-  }
-  *numpart= totpart;
-  trace3((qh ferr, "qh_findfacet_all: f%d dist %2.2g isoutside %d totpart %d\n",
-	  getid_(bestfacet), *bestdist, *isoutside, totpart));
-  return bestfacet;
-} /* findfacet_all */ 
- 
-/*---------------------------------
-  
-  qh_findgood( facetlist, goodhorizon )
-    identify good facets for qh.PRINTgood
-    if qh.GOODvertex>0
-      facet includes point as vertex
-      if !match, returns goodhorizon
-      inactive if qh.MERGING
-    if qh.GOODpoint
-      facet is visible or coplanar (>0) or not visible (<0) 
-    if qh.GOODthreshold
-      facet->normal matches threshold
-    if !goodhorizon and !match, 
-      selects facet with closest angle
-      sets GOODclosest
-      
-  returns:
-    number of new, good facets found
-    determines facet->good
-    may update qh.GOODclosest
-    
-  notes:
-    qh_findgood_all further reduces the good region
-
-  design:
-    count good facets
-    mark good facets for qh.GOODpoint  
-    mark good facets for qh.GOODthreshold
-    if necessary
-      update qh.GOODclosest  
-*/
-int qh_findgood (facetT *facetlist, int goodhorizon) {
-  facetT *facet, *bestfacet= NULL;
-  realT angle, bestangle= REALmax, dist;
-  int  numgood=0;
-
-  FORALLfacet_(facetlist) {
-    if (facet->good)
-      numgood++;
-  }
-  if (qh GOODvertex>0 && !qh MERGING) {
-    FORALLfacet_(facetlist) {
-      if (!qh_isvertex (qh GOODvertexp, facet->vertices)) {
-        facet->good= False;
-        numgood--;
-      }
-    }
-  }
-  if (qh GOODpoint && numgood) {
-    FORALLfacet_(facetlist) {
-      if (facet->good && facet->normal) {
-        zinc_(Zdistgood);
-        qh_distplane (qh GOODpointp, facet, &dist);
-        if ((qh GOODpoint > 0) ^ (dist > 0.0)) {
-          facet->good= False;
-          numgood--;
-        }
-      }
-    }
-  }
-  if (qh GOODthreshold && (numgood || goodhorizon || qh GOODclosest)) {
-    FORALLfacet_(facetlist) {
-      if (facet->good && facet->normal) {
-        if (!qh_inthresholds (facet->normal, &angle)) {
-          facet->good= False;
-          numgood--;
-          if (angle < bestangle) {
-            bestangle= angle;
-            bestfacet= facet;
-          }
-        }
-      }
-    }
-    if (!numgood && (!goodhorizon || qh GOODclosest)) {
-      if (qh GOODclosest) {
-	if (qh GOODclosest->visible)
-	  qh GOODclosest= NULL;
-	else {
-	  qh_inthresholds (qh GOODclosest->normal, &angle);
-	  if (angle < bestangle)
-	    bestfacet= qh GOODclosest;
-	}
-      }
-      if (bestfacet && bestfacet != qh GOODclosest) {
-	if (qh GOODclosest)
-	  qh GOODclosest->good= False;
-	qh GOODclosest= bestfacet;
-	bestfacet->good= True;
-	numgood++;
-	trace2((qh ferr, "qh_findgood: f%d is closest (%2.2g) to thresholds\n", 
-           bestfacet->id, bestangle));
-	return numgood;
-      }
-    }else if (qh GOODclosest) { /* numgood > 0 */
-      qh GOODclosest->good= False;
-      qh GOODclosest= NULL;
-    }
-  }
-  zadd_(Zgoodfacet, numgood);
-  trace2((qh ferr, "qh_findgood: found %d good facets with %d good horizon\n",
-               numgood, goodhorizon));
-  if (!numgood && qh GOODvertex>0 && !qh MERGING) 
-    return goodhorizon;
-  return numgood;
-} /* findgood */
-
-/*---------------------------------
-  
-  qh_findgood_all( facetlist )
-    apply other constraints for good facets (used by qh.PRINTgood)
-    if qh.GOODvertex 
-      facet includes (>0) or doesn't include (<0) point as vertex
-      if last good facet and ONLYgood, prints warning and continues
-    if qh.SPLITthresholds
-      facet->normal matches threshold, or if none, the closest one
-    calls qh_findgood
-    nop if good not used
-
-  returns:
-    clears facet->good if not good
-    sets qh.num_good
-
-  notes:
-    this is like qh_findgood but more restrictive
-
-  design:
-    uses qh_findgood to mark good facets
-    marks facets for qh.GOODvertex
-    marks facets for qh.SPLITthreholds  
-*/
-void qh_findgood_all (facetT *facetlist) {
-  facetT *facet, *bestfacet=NULL;
-  realT angle, bestangle= REALmax;
-  int  numgood=0, startgood;
-
-  if (!qh GOODvertex && !qh GOODthreshold && !qh GOODpoint 
-  && !qh SPLITthresholds)
-    return;
-  if (!qh ONLYgood)
-    qh_findgood (qh facet_list, 0);
-  FORALLfacet_(facetlist) {
-    if (facet->good)
-      numgood++;
-  }
-  if (qh GOODvertex <0 || (qh GOODvertex > 0 && qh MERGING)) {
-    FORALLfacet_(facetlist) {
-      if (facet->good && ((qh GOODvertex > 0) ^ !!qh_isvertex (qh GOODvertexp, facet->vertices))) {
-        if (!--numgood) {
-	  if (qh ONLYgood) {
-            fprintf (qh ferr, "qhull warning: good vertex p%d does not match last good facet f%d.  Ignored.\n",
-               qh_pointid(qh GOODvertexp), facet->id);
-	    return;
-	  }else if (qh GOODvertex > 0)
-            fprintf (qh ferr, "qhull warning: point p%d is not a vertex ('QV%d').\n",
-		qh GOODvertex-1, qh GOODvertex-1);
-	  else
-            fprintf (qh ferr, "qhull warning: point p%d is a vertex for every facet ('QV-%d').\n",
-	        -qh GOODvertex - 1, -qh GOODvertex - 1);
-        }
-        facet->good= False;
-      }
-    }
-  }
-  startgood= numgood;
-  if (qh SPLITthresholds) {
-    FORALLfacet_(facetlist) {
-      if (facet->good) {
-        if (!qh_inthresholds (facet->normal, &angle)) {
-          facet->good= False;
-          numgood--;
-          if (angle < bestangle) {
-            bestangle= angle;
-            bestfacet= facet;
-          }
-        }
-      }
-    }
-    if (!numgood && bestfacet) {
-      bestfacet->good= True;
-      numgood++;
-      trace0((qh ferr, "qh_findgood_all: f%d is closest (%2.2g) to thresholds\n", 
-           bestfacet->id, bestangle));
-      return;
-    }
-  }
-  qh num_good= numgood;
-  trace0((qh ferr, "qh_findgood_all: %d good facets remain out of %d facets\n",
-        numgood, startgood));
-} /* findgood_all */
-
-/*---------------------------------
-  
-  qh_furthestnext()
-    set qh.facet_next to facet with furthest of all furthest points
-    searches all facets on qh.facet_list
-
-  notes:
-    this may help avoid precision problems
-*/
-void qh_furthestnext (void /* qh facet_list */) {
-  facetT *facet, *bestfacet= NULL;
-  realT dist, bestdist= -REALmax;
-
-  FORALLfacets {
-    if (facet->outsideset) {
-#if qh_COMPUTEfurthest
-      pointT *furthest;
-      furthest= (pointT*)qh_setlast (facet->outsideset);
-      zinc_(Zcomputefurthest);
-      qh_distplane (furthest, facet, &dist);
-#else
-      dist= facet->furthestdist;
-#endif
-      if (dist > bestdist) {
-	bestfacet= facet;
-	bestdist= dist;
-      }
-    }
-  }
-  if (bestfacet) {
-    qh_removefacet (bestfacet);
-    qh_prependfacet (bestfacet, &qh facet_next);
-    trace1((qh ferr, "qh_furthestnext: made f%d next facet (dist %.2g)\n",
-	    bestfacet->id, bestdist));
-  }
-} /* furthestnext */
-
-/*---------------------------------
-  
-  qh_furthestout( facet )
-    make furthest outside point the last point of outsideset
-
-  returns:
-    updates facet->outsideset
-    clears facet->notfurthest
-    sets facet->furthestdist
-
-  design:
-    determine best point of outsideset
-    make it the last point of outsideset
-*/
-void qh_furthestout (facetT *facet) {
-  pointT *point, **pointp, *bestpoint= NULL;
-  realT dist, bestdist= -REALmax;
-
-  FOREACHpoint_(facet->outsideset) {
-    qh_distplane (point, facet, &dist);
-    zinc_(Zcomputefurthest);
-    if (dist > bestdist) {
-      bestpoint= point;
-      bestdist= dist;
-    }
-  }
-  if (bestpoint) {
-    qh_setdel (facet->outsideset, point);
-    qh_setappend (&facet->outsideset, point);
-#if !qh_COMPUTEfurthest
-    facet->furthestdist= bestdist;
-#endif
-  }
-  facet->notfurthest= False;
-  trace3((qh ferr, "qh_furthestout: p%d is furthest outside point of f%d\n",
-	  qh_pointid (point), facet->id));
-} /* furthestout */
-
-
-/*---------------------------------
-  
-  qh_infiniteloop( facet )
-    report infinite loop error due to facet
-*/
-void qh_infiniteloop (facetT *facet) {
-
-  fprintf (qh ferr, "qhull internal error (qh_infiniteloop): potential infinite loop detected\n");
-  qh_errexit (qh_ERRqhull, facet, NULL);
-} /* qh_infiniteloop */
-
-/*---------------------------------
-  
-  qh_initbuild()
-    initialize hull and outside sets with point array
-    qh.FIRSTpoint/qh.NUMpoints is point array
-    if qh.GOODpoint
-      adds qh.GOODpoint to initial hull
-
-  returns:
-    qh_facetlist with initial hull
-    points partioned into outside sets, coplanar sets, or inside
-    initializes qh.GOODpointp, qh.GOODvertexp,
-
-  design:
-    initialize global variables used during qh_buildhull
-    determine precision constants and points with max/min coordinate values
-      if qh.SCALElast, scale last coordinate (for 'd')
-    build initial simplex
-    partition input points into facets of initial simplex
-    set up lists
-    if qh.ONLYgood
-      check consistency  
-      add qh.GOODvertex if defined
-*/
-void qh_initbuild( void) {
-  setT *maxpoints, *vertices;
-  facetT *facet;
-  int i, numpart;
-  realT dist;
-  boolT isoutside;
-
-  qh furthest_id= -1;
-  qh lastreport= 0;
-  qh facet_id= qh vertex_id= qh ridge_id= 0;
-  qh visit_id= qh vertex_visit= 0;
-  qh maxoutdone= False;
-
-  if (qh GOODpoint > 0) 
-    qh GOODpointp= qh_point (qh GOODpoint-1);
-  else if (qh GOODpoint < 0) 
-    qh GOODpointp= qh_point (-qh GOODpoint-1);
-  if (qh GOODvertex > 0)
-    qh GOODvertexp= qh_point (qh GOODvertex-1);
-  else if (qh GOODvertex < 0) 
-    qh GOODvertexp= qh_point (-qh GOODvertex-1);
-  if ((qh GOODpoint  
-       && (qh GOODpointp < qh first_point  /* also catches !GOODpointp */
-	   || qh GOODpointp > qh_point (qh num_points-1)))
-    || (qh GOODvertex
-	&& (qh GOODvertexp < qh first_point  /* also catches !GOODvertexp */
-	    || qh GOODvertexp > qh_point (qh num_points-1)))) {
-    fprintf (qh ferr, "qhull input error: either QGn or QVn point is > p%d\n",
-	     qh num_points-1);
-    qh_errexit (qh_ERRinput, NULL, NULL);
-  }
-  maxpoints= qh_maxmin(qh first_point, qh num_points, qh hull_dim);
-  if (qh SCALElast)
-    qh_scalelast (qh first_point, qh num_points, qh hull_dim,
-               qh MINlastcoord, qh MAXlastcoord, qh MAXwidth);
-  qh_detroundoff();
-  if (qh DELAUNAY && qh upper_threshold[qh hull_dim-1] > REALmax/2
-                  && qh lower_threshold[qh hull_dim-1] < -REALmax/2) {
-    for (i= qh_PRINTEND; i--; ) {
-      if (qh PRINTout[i] == qh_PRINTgeom && qh DROPdim < 0 
- 	  && !qh GOODthreshold && !qh SPLITthresholds)
-	break;  /* in this case, don't set upper_threshold */
-    }
-    if (i < 0) {
-      if (qh UPPERdelaunay) { /* matches qh.upperdelaunay in qh_setfacetplane */
-	qh lower_threshold[qh hull_dim-1]= qh ANGLEround * qh_ZEROdelaunay;
-	qh GOODthreshold= True;
-      }else { 
-	qh upper_threshold[qh hull_dim-1]= -qh ANGLEround * qh_ZEROdelaunay;
-        if (!qh GOODthreshold) 
-	  qh SPLITthresholds= True; /* build upper-convex hull even if Qg */
-          /* qh_initqhull_globals errors if Qg without Pdk/etc. */
-      }
-    }
-  }
-  vertices= qh_initialvertices(qh hull_dim, maxpoints, qh first_point, qh num_points); 
-  qh_initialhull (vertices);  /* initial qh facet_list */
-  qh_partitionall (vertices, qh first_point, qh num_points);
-  if (qh PRINToptions1st || qh TRACElevel || qh IStracing) {
-    if (qh TRACElevel || qh IStracing)
-      fprintf (qh ferr, "\nTrace level %d for %s | %s\n", 
-         qh IStracing ? qh IStracing : qh TRACElevel, qh rbox_command, qh qhull_command);
-    fprintf (qh ferr, "Options selected for Qhull %s:\n%s\n", qh_VERSION, qh qhull_options);
-  }
-  qh_resetlists (False, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
-  qh facet_next= qh facet_list;
-  qh_furthestnext (/* qh facet_list */);
-  if (qh PREmerge) {
-    qh cos_max= qh premerge_cos;
-    qh centrum_radius= qh premerge_centrum;
-  }
-  if (qh ONLYgood) {
-    if (qh GOODvertex > 0 && qh MERGING) {
-      fprintf (qh ferr, "qhull input error: 'Qg QVn' (only good vertex) does not work with merging.\nUse 'QJ' to joggle the input or 'Q0' to turn off merging.\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    if (!(qh GOODthreshold || qh GOODpoint
-         || (!qh MERGEexact && !qh PREmerge && qh GOODvertexp))) {
-      fprintf (qh ferr, "qhull input error: 'Qg' (ONLYgood) needs a good threshold ('Pd0D0'), a\n\
-good point (QGn or QG-n), or a good vertex with 'QJ' or 'Q0' (QVn).\n");
-      qh_errexit (qh_ERRinput, NULL, NULL);
-    }
-    if (qh GOODvertex > 0  && !qh MERGING  /* matches qh_partitionall */
-	&& !qh_isvertex (qh GOODvertexp, vertices)) {
-      facet= qh_findbestnew (qh GOODvertexp, qh facet_list, 
-			  &dist, !qh_ALL, &isoutside, &numpart);
-      zadd_(Zdistgood, numpart);
-      if (!isoutside) {
-        fprintf (qh ferr, "qhull input error: point for QV%d is inside initial simplex.  It can not be made a vertex.\n",
-	       qh_pointid(qh GOODvertexp));
-        qh_errexit (qh_ERRinput, NULL, NULL);
-      }
-      if (!qh_addpoint (qh GOODvertexp, facet, False)) {
-	qh_settempfree(&vertices);
-	qh_settempfree(&maxpoints);
-	return;
-      }
-    }
-    qh_findgood (qh facet_list, 0);
-  }
-  qh_settempfree(&vertices);
-  qh_settempfree(&maxpoints);
-  trace1((qh ferr, "qh_initbuild: initial hull created and points partitioned\n"));
-} /* initbuild */
-
-/*---------------------------------
-  
-  qh_initialhull( vertices )
-    constructs the initial hull as a DIM3 simplex of vertices
-
-  design:
-    creates a simplex (initializes lists)
-    determines orientation of simplex
-    sets hyperplanes for facets
-    doubles checks orientation (in case of axis-parallel facets with Gaussian elimination)
-    checks for flipped facets and qh.NARROWhull
-    checks the result   
-*/
-void qh_initialhull(setT *vertices) {
-  facetT *facet, *firstfacet, *neighbor, **neighborp;
-  realT dist, angle, minangle= REALmax;
-#ifndef qh_NOtrace
-  int k;
-#endif
-
-  qh_createsimplex(vertices);  /* qh facet_list */
-  qh_resetlists (False, qh_RESETvisible);
-  qh facet_next= qh facet_list;      /* advance facet when processed */
-  qh interior_point= qh_getcenter(vertices);
-  firstfacet= qh facet_list;
-  qh_setfacetplane(firstfacet);
-  zinc_(Znumvisibility); /* needs to be in printsummary */
-  qh_distplane(qh interior_point, firstfacet, &dist);
-  if (dist > 0) {  
-    FORALLfacets
-      facet->toporient ^= True;
-  }
-  FORALLfacets
-    qh_setfacetplane(facet);
-  FORALLfacets {
-    if (!qh_checkflipped (facet, NULL, qh_ALL)) {/* due to axis-parallel facet */
-      trace1((qh ferr, "qh_initialhull: initial orientation incorrect.  Correct all facets\n"));
-      facet->flipped= False;
-      FORALLfacets {
-	facet->toporient ^= True;
-	qh_orientoutside (facet);
-      }
-      break;
-    }
-  }
-  FORALLfacets {
-    if (!qh_checkflipped (facet, NULL, !qh_ALL)) {  /* can happen with 'R0.1' */
-      qh_precision ("initial facet is coplanar with interior point");
-      fprintf (qh ferr, "qhull precision error: initial facet %d is coplanar with the interior point\n",
-                   facet->id);
-      qh_errexit (qh_ERRsingular, facet, NULL);
-    }
-    FOREACHneighbor_(facet) {
-      angle= qh_getangle (facet->normal, neighbor->normal);
-      minimize_( minangle, angle);
-    }
-  }
-  if (minangle < qh_MAXnarrow && !qh NOnarrow) { 
-    realT diff= 1.0 + minangle;
-
-    qh NARROWhull= True;
-    qh_option ("_narrow-hull", NULL, &diff);
-    if (minangle < qh_WARNnarrow && !qh RERUN && qh PRINTprecision)
-      fprintf (qh ferr, "qhull precision warning: \n\
-The initial hull is narrow (cosine of min. angle is %.16f).\n\
-A coplanar point may lead to a wide facet.  Options 'QbB' (scale to unit box)\n\
-or 'Qbb' (scale last coordinate) may remove this warning.  Use 'Pp' to skip\n\
-this warning.  See 'Limitations' in qh-impre.htm.\n",
-          -minangle);   /* convert from angle between normals to angle between facets */
-  }
-  zzval_(Zprocessed)= qh hull_dim+1;
-  qh_checkpolygon (qh facet_list);
-  qh_checkconvex(qh facet_list,   qh_DATAfault);
-#ifndef qh_NOtrace
-  if (qh IStracing >= 1) {
-    fprintf(qh ferr, "qh_initialhull: simplex constructed, interior point:");
-    for (k=0; k < qh hull_dim; k++) 
-      fprintf (qh ferr, " %6.4g", qh interior_point[k]);
-    fprintf (qh ferr, "\n");
-  }
-#endif
-} /* initialhull */
-
-/*---------------------------------
-  
-  qh_initialvertices( dim, maxpoints, points, numpoints )
-    determines a non-singular set of initial vertices
-    maxpoints may include duplicate points
-
-  returns:
-    temporary set of dim+1 vertices in descending order by vertex id
-    if qh.RANDOMoutside && !qh.ALLpoints
-      picks random points
-    if dim >= qh_INITIALmax, 
-      uses min/max x and max points with non-zero determinants
-
-  notes:
-    unless qh.ALLpoints, 
-      uses maxpoints as long as determinate is non-zero
-*/
-setT *qh_initialvertices(int dim, setT *maxpoints, pointT *points, int numpoints) {
-  pointT *point, **pointp;
-  setT *vertices, *simplex, *tested;
-  realT randr;
-  int index, point_i, point_n, k;
-  boolT nearzero= False;
-  
-  vertices= qh_settemp (dim + 1);
-  simplex= qh_settemp (dim+1);
-  if (qh ALLpoints) 
-    qh_maxsimplex (dim, NULL, points, numpoints, &simplex);
-  else if (qh RANDOMoutside) {
-    while (qh_setsize (simplex) != dim+1) {
-      randr= qh_RANDOMint;
-      randr= randr/(qh_RANDOMmax+1);
-      index= (int)floor(qh num_points * randr);
-      while (qh_setin (simplex, qh_point (index))) {
-	index++; /* in case qh_RANDOMint always returns the same value */
-        index= index < qh num_points ? index : 0;
-      }
-      qh_setappend (&simplex, qh_point (index));
-    }
-  }else if (qh hull_dim >= qh_INITIALmax) {
-    tested= qh_settemp (dim+1);
-    qh_setappend (&simplex, SETfirst_(maxpoints));   /* max and min X coord */
-    qh_setappend (&simplex, SETsecond_(maxpoints));
-    qh_maxsimplex (fmin_(qh_INITIALsearch, dim), maxpoints, points, numpoints, &simplex);
-    k= qh_setsize (simplex);
-    FOREACHpoint_i_(maxpoints) { 
-      if (point_i & 0x1) {     /* first pick up max. coord. points */
-      	if (!qh_setin (simplex, point) && !qh_setin (tested, point)){
-	  qh_detsimplex(point, simplex, k, &nearzero);
-          if (nearzero)
-            qh_setappend (&tested, point);
-          else {
-            qh_setappend (&simplex, point);
-            if (++k == dim)  /* use search for last point */
-	      break;
-	  }
-	}
-      }
-    }
-    while (k != dim && (point= (pointT*)qh_setdellast (maxpoints))) {
-      if (!qh_setin (simplex, point) && !qh_setin (tested, point)){
-        qh_detsimplex (point, simplex, k, &nearzero);
-        if (nearzero)
-          qh_setappend (&tested, point);
-        else {
-          qh_setappend (&simplex, point);
-          k++;
-	}
-      }
-    }
-    index= 0;
-    while (k != dim && (point= qh_point (index++))) {
-      if (!qh_setin (simplex, point) && !qh_setin (tested, point)){
-        qh_detsimplex (point, simplex, k, &nearzero);
-        if (!nearzero){
-          qh_setappend (&simplex, point);
-          k++;
-	}
-      }
-    }
-    qh_settempfree (&tested);
-    qh_maxsimplex (dim, maxpoints, points, numpoints, &simplex);
-  }else
-    qh_maxsimplex (dim, maxpoints, points, numpoints, &simplex);
-  FOREACHpoint_(simplex) 
-    qh_setaddnth (&vertices, 0, qh_newvertex(point)); /* descending order */
-  qh_settempfree (&simplex);
-  return vertices;
-} /* initialvertices */
-
-
-/*---------------------------------
-  
-  qh_isvertex(  )
-    returns vertex if point is in vertex set, else returns NULL
-
-  notes:
-    for qh.GOODvertex
-*/
-vertexT *qh_isvertex (pointT *point, setT *vertices) {
-  vertexT *vertex, **vertexp;
-
-  FOREACHvertex_(vertices) {
-    if (vertex->point == point)
-      return vertex;
-  }
-  return NULL;
-} /* isvertex */
-
-/*---------------------------------
-  
-  qh_makenewfacets( point )
-    make new facets from point and qh.visible_list
-
-  returns:
-    qh.newfacet_list= list of new facets with hyperplanes and ->newfacet
-    qh.newvertex_list= list of vertices in new facets with ->newlist set
-    
-    if (qh.ONLYgood)
-      newfacets reference horizon facets, but not vice versa
-      ridges reference non-simplicial horizon ridges, but not vice versa
-      does not change existing facets
-    else
-      sets qh.NEWfacets
-      new facets attached to horizon facets and ridges
-      for visible facets, 
-        visible->r.replace is corresponding new facet
-
-  see also: 
-    qh_makenewplanes() -- make hyperplanes for facets
-    qh_attachnewfacets() -- attachnewfacets if not done here (qh ONLYgood)
-    qh_matchnewfacets() -- match up neighbors
-    qh_updatevertices() -- update vertex neighbors and delvertices
-    qh_deletevisible() -- delete visible facets
-    qh_checkpolygon() --check the result
-    qh_triangulate() -- triangulate a non-simplicial facet
-
-  design:
-    for each visible facet
-      make new facets to its horizon facets
-      update its f.replace 
-      clear its neighbor set
-*/
-vertexT *qh_makenewfacets (pointT *point /*visible_list*/) {
-  facetT *visible, *newfacet= NULL, *newfacet2= NULL, *neighbor, **neighborp;
-  vertexT *apex;
-  int numnew=0;
-
-  qh newfacet_list= qh facet_tail;
-  qh newvertex_list= qh vertex_tail;
-  apex= qh_newvertex(point);
-  qh_appendvertex (apex);  
-  qh visit_id++;
-  if (!qh ONLYgood)
-    qh NEWfacets= True;
-  FORALLvisible_facets {
-    FOREACHneighbor_(visible) 
-      neighbor->seen= False;
-    if (visible->ridges) {
-      visible->visitid= qh visit_id;
-      newfacet2= qh_makenew_nonsimplicial (visible, apex, &numnew);
-    }
-    if (visible->simplicial)
-      newfacet= qh_makenew_simplicial (visible, apex, &numnew);
-    if (!qh ONLYgood) {
-      if (newfacet2)  /* newfacet is null if all ridges defined */
-        newfacet= newfacet2;
-      if (newfacet)
-      	visible->f.replace= newfacet;
-      else
-        zinc_(Zinsidevisible);
-      SETfirst_(visible->neighbors)= NULL;
-    }
-  }
-  trace1((qh ferr, "qh_makenewfacets: created %d new facets from point p%d to horizon\n",
-	  numnew, qh_pointid(point)));
-  if (qh IStracing >= 4)
-    qh_printfacetlist (qh newfacet_list, NULL, qh_ALL);
-  return apex;
-} /* makenewfacets */
-
-/*---------------------------------
-  
-  qh_matchduplicates( atfacet, atskip, hashsize, hashcount )
-    match duplicate ridges in qh.hash_table for atfacet/atskip
-    duplicates marked with ->dupridge and qh_DUPLICATEridge
-
-  returns:
-    picks match with worst merge (min distance apart)
-    updates hashcount
-  
-  see also:
-    qh_matchneighbor
-
-  notes:
-
-  design:
-    compute hash value for atfacet and atskip
-    repeat twice -- once to make best matches, once to match the rest
-      for each possible facet in qh.hash_table
-        if it is a matching facet and pass 2
-          make match 
-	  unless tricoplanar, mark match for merging (qh_MERGEridge)
-          [e.g., tricoplanar RBOX s 1000 t993602376 | QHULL C-1e-3 d Qbb FA Qt]
-        if it is a matching facet and pass 1
-          test if this is a better match
-      if pass 1,
-        make best match (it will not be merged)
-*/
-#ifndef qh_NOmerge
-void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount) {
-  boolT same, ismatch;
-  int hash, scan;
-  facetT *facet, *newfacet, *maxmatch= NULL, *maxmatch2= NULL, *nextfacet;
-  int skip, newskip, nextskip= 0, maxskip= 0, maxskip2= 0, makematch;
-  realT maxdist= -REALmax, mindist, dist2, low, high;
-
-  hash= (int)qh_gethash (hashsize, atfacet->vertices, qh hull_dim, 1, 
-                     SETelem_(atfacet->vertices, atskip));
-  trace2((qh ferr, "qh_matchduplicates: find duplicate matches for f%d skip %d hash %d hashcount %d\n",
-	  atfacet->id, atskip, hash, *hashcount));
-  for (makematch= 0; makematch < 2; makematch++) {
-    qh visit_id++;
-    for (newfacet= atfacet, newskip= atskip; newfacet; newfacet= nextfacet, newskip= nextskip) {
-      zinc_(Zhashlookup);
-      nextfacet= NULL;
-      newfacet->visitid= qh visit_id;
-      for (scan= hash; (facet= SETelemt_(qh hash_table, scan, facetT)); 
-	   scan= (++scan >= hashsize ? 0 : scan)) {
-	if (!facet->dupridge || facet->visitid == qh visit_id)
-	  continue;
-	zinc_(Zhashtests);
-	if (qh_matchvertices (1, newfacet->vertices, newskip, facet->vertices, &skip, &same)) {
-	  ismatch= (same == (newfacet->toporient ^ facet->toporient));
-	  if (SETelemt_(facet->neighbors, skip, facetT) != qh_DUPLICATEridge) {
-	    if (!makematch) {
-	      fprintf (qh ferr, "qhull internal error (qh_matchduplicates): missing dupridge at f%d skip %d for new f%d skip %d hash %d\n",
-		     facet->id, skip, newfacet->id, newskip, hash);
-	      qh_errexit2 (qh_ERRqhull, facet, newfacet);
-	    }
-	  }else if (ismatch && makematch) {
-	    if (SETelemt_(newfacet->neighbors, newskip, facetT) == qh_DUPLICATEridge) {
-	      SETelem_(facet->neighbors, skip)= newfacet;
-	      if (newfacet->tricoplanar)
-  		SETelem_(newfacet->neighbors, newskip)= facet;
-	      else
-		SETelem_(newfacet->neighbors, newskip)= qh_MERGEridge;
-	      *hashcount -= 2; /* removed two unmatched facets */
-	      trace4((qh ferr, "qh_matchduplicates: duplicate f%d skip %d matched with new f%d skip %d merge\n",
-		    facet->id, skip, newfacet->id, newskip));
-	    }
-	  }else if (ismatch) {
-	    mindist= qh_getdistance (facet, newfacet, &low, &high);
-	    dist2= qh_getdistance (newfacet, facet, &low, &high);
-	    minimize_(mindist, dist2);
-	    if (mindist > maxdist) {
-	      maxdist= mindist;
-	      maxmatch= facet;
-	      maxskip= skip;
-	      maxmatch2= newfacet;
-	      maxskip2= newskip;
-	    }
-	    trace3((qh ferr, "qh_matchduplicates: duplicate f%d skip %d new f%d skip %d at dist %2.2g, max is now f%d f%d\n",
-		    facet->id, skip, newfacet->id, newskip, mindist, 
-		    maxmatch->id, maxmatch2->id));
-	  }else { /* !ismatch */
-	    nextfacet= facet;
-	    nextskip= skip;
-	  }
-	}
-	if (makematch && !facet 
-        && SETelemt_(facet->neighbors, skip, facetT) == qh_DUPLICATEridge) {
-	  fprintf (qh ferr, "qhull internal error (qh_matchduplicates): no MERGEridge match for duplicate f%d skip %d at hash %d\n",
-		     newfacet->id, newskip, hash);
-	  qh_errexit (qh_ERRqhull, newfacet, NULL);
-	}
-      }
-    } /* end of for each new facet at hash */
-    if (!makematch) {
-      if (!maxmatch) {
-	fprintf (qh ferr, "qhull internal error (qh_matchduplicates): no maximum match at duplicate f%d skip %d at hash %d\n",
-		     atfacet->id, atskip, hash);
-	qh_errexit (qh_ERRqhull, atfacet, NULL);
-      }
-      SETelem_(maxmatch->neighbors, maxskip)= maxmatch2;
-      SETelem_(maxmatch2->neighbors, maxskip2)= maxmatch;
-      *hashcount -= 2; /* removed two unmatched facets */
-      zzinc_(Zmultiridge);
-      trace0((qh ferr, "qh_matchduplicates: duplicate f%d skip %d matched with new f%d skip %d keep\n",
-	      maxmatch->id, maxskip, maxmatch2->id, maxskip2));
-      qh_precision ("ridge with multiple neighbors");
-      if (qh IStracing >= 4)
-	qh_errprint ("DUPLICATED/MATCH", maxmatch, maxmatch2, NULL, NULL);
-    }
-  }
-} /* matchduplicates */
-
-/*---------------------------------
-  
-  qh_nearcoplanar()
-    for all facets, remove near-inside points from facet->coplanarset
-    coplanar points defined by innerplane from qh_outerinner()
-
-  returns:
-    if qh KEEPcoplanar && !qh KEEPinside
-      facet->coplanarset only contains coplanar points
-    if qh.JOGGLEmax
-      drops inner plane by another qh.JOGGLEmax diagonal since a
-        vertex could shift out while a coplanar point shifts in
-  
-  notes:
-    used for qh.PREmerge and qh.JOGGLEmax
-    must agree with computation of qh.NEARcoplanar in qh_detroundoff()
-  design:
-    if not keeping coplanar or inside points
-      free all coplanar sets
-    else if not keeping both coplanar and inside points
-      remove !coplanar or !inside points from coplanar sets
-*/
-void qh_nearcoplanar ( void /* qh.facet_list */) {
-  facetT *facet;
-  pointT *point, **pointp;
-  int numpart;
-  realT dist, innerplane;
-
-  if (!qh KEEPcoplanar && !qh KEEPinside) {
-    FORALLfacets {
-      if (facet->coplanarset) 
-        qh_setfree( &facet->coplanarset);
-    }
-  }else if (!qh KEEPcoplanar || !qh KEEPinside) {
-    qh_outerinner (NULL, NULL, &innerplane);
-    if (qh JOGGLEmax < REALmax/2)
-      innerplane -= qh JOGGLEmax * sqrt (qh hull_dim);
-    numpart= 0;
-    FORALLfacets { 
-      if (facet->coplanarset) {
-        FOREACHpoint_(facet->coplanarset) {
-          numpart++;
-	  qh_distplane (point, facet, &dist); 
-  	  if (dist < innerplane) {
-	    if (!qh KEEPinside)
-              SETref_(point)= NULL;
-          }else if (!qh KEEPcoplanar)
-            SETref_(point)= NULL;
-        }
-	qh_setcompact (facet->coplanarset);
-      }
-    }
-    zzadd_(Zcheckpart, numpart);
-  }
-} /* nearcoplanar */
-
-/*---------------------------------
-  
-  qh_nearvertex( facet, point, bestdist )
-    return nearest vertex in facet to point
-
-  returns:
-    vertex and its distance
-    
-  notes:
-    if qh.DELAUNAY
-      distance is measured in the input set
-    searches neighboring tricoplanar facets (requires vertexneighbors)
-      Slow implementation.  Recomputes vertex set for each point.
-    The vertex set could be stored in the qh.keepcentrum facet.
-*/
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp) {
-  realT bestdist= REALmax, dist;
-  vertexT *bestvertex= NULL, *vertex, **vertexp, *apex;
-  coordT *center;
-  facetT *neighbor, **neighborp;
-  setT *vertices;
-  int dim= qh hull_dim;
-
-  if (qh DELAUNAY)
-    dim--;
-  if (facet->tricoplanar) {
-    if (!qh VERTEXneighbors || !facet->center) {
-      fprintf(qh ferr, "qhull internal error (qh_nearvertex): qh.VERTEXneighbors and facet->center required for tricoplanar facets\n");
-      qh_errexit(qh_ERRqhull, NULL, NULL);
-    }
-    vertices= qh_settemp (qh TEMPsize);
-    apex= SETfirst_(facet->vertices);
-    center= facet->center;
-    FOREACHneighbor_(apex) {
-      if (neighbor->center == center) {
-	FOREACHvertex_(neighbor->vertices) 
-	  qh_setappend(&vertices, vertex);
-      }
-    }
-  }else 
-    vertices= facet->vertices;
-  FOREACHvertex_(vertices) {
-    dist= qh_pointdist (vertex->point, point, -dim);
-    if (dist < bestdist) {
-      bestdist= dist;
-      bestvertex= vertex;
-    }
-  }
-  if (facet->tricoplanar)
-    qh_settempfree (&vertices);
-  *bestdistp= sqrt (bestdist);
-  return bestvertex;
-} /* nearvertex */
-
-/*---------------------------------
-  
-  qh_newhashtable( newsize )
-    returns size of qh.hash_table of at least newsize slots
-
-  notes:
-    assumes qh.hash_table is NULL
-    qh_HASHfactor determines the number of extra slots
-    size is not divisible by 2, 3, or 5
-*/
-int qh_newhashtable(int newsize) {
-  int size;
-
-  size= ((newsize+1)*qh_HASHfactor) | 0x1;  /* odd number */
-  while (True) { 
-    if ((size%3) && (size%5))
-      break;
-    size += 2;
-    /* loop terminates because there is an infinite number of primes */
-  }
-  qh hash_table= qh_setnew (size);
-  qh_setzero (qh hash_table, 0, size);
-  return size;
-} /* newhashtable */
-
-/*---------------------------------
-  
-  qh_newvertex( point )
-    returns a new vertex for point
-*/
-vertexT *qh_newvertex(pointT *point) {
-  vertexT *vertex;
-
-  zinc_(Ztotvertices);
-  vertex= (vertexT *)qh_memalloc(sizeof(vertexT));
-  memset ((char *) vertex, 0, sizeof (vertexT));
-  if (qh vertex_id == 0xFFFFFF) {
-    fprintf(qh ferr, "qhull input error: more than %d vertices.  ID field overflows and two vertices\n\
-may have the same identifier.  Vertices not sorted correctly.\n", 0xFFFFFF);
-    qh_errexit(qh_ERRinput, NULL, NULL);
-  }
-  if (qh vertex_id == qh tracevertex_id)
-    qh tracevertex= vertex;
-  vertex->id= qh vertex_id++;
-  vertex->point= point;
-  trace4((qh ferr, "qh_newvertex: vertex p%d (v%d) created\n", qh_pointid(vertex->point), 
-	  vertex->id));
-  return (vertex);
-} /* newvertex */
-
-/*---------------------------------
-  
-  qh_nextridge3d( atridge, facet, vertex )
-    return next ridge and vertex for a 3d facet
-
-  notes:
-    in qh_ORIENTclock order
-    this is a O(n^2) implementation to trace all ridges
-    be sure to stop on any 2nd visit
-  
-  design:
-    for each ridge
-      exit if it is the ridge after atridge
-*/
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp) {
-  vertexT *atvertex, *vertex, *othervertex;
-  ridgeT *ridge, **ridgep;
-
-  if ((atridge->top == facet) ^ qh_ORIENTclock)
-    atvertex= SETsecondt_(atridge->vertices, vertexT);
-  else
-    atvertex= SETfirstt_(atridge->vertices, vertexT);
-  FOREACHridge_(facet->ridges) {
-    if (ridge == atridge)
-      continue;
-    if ((ridge->top == facet) ^ qh_ORIENTclock) {
-      othervertex= SETsecondt_(ridge->vertices, vertexT);
-      vertex= SETfirstt_(ridge->vertices, vertexT);
-    }else {
-      vertex= SETsecondt_(ridge->vertices, vertexT);
-      othervertex= SETfirstt_(ridge->vertices, vertexT);
-    }
-    if (vertex == atvertex) {
-      if (vertexp)
-        *vertexp= othervertex;
-      return ridge;
-    }
-  }
-  return NULL;
-} /* nextridge3d */
-#else /* qh_NOmerge */
-void qh_matchduplicates (facetT *atfacet, int atskip, int hashsize, int *hashcount) {
-}
-ridgeT *qh_nextridge3d (ridgeT *atridge, facetT *facet, vertexT **vertexp) {
-
-  return NULL;
-}
-#endif /* qh_NOmerge */
-  
-/*---------------------------------
-  
-  qh_outcoplanar()
-    move points from all facets' outsidesets to their coplanarsets
-
-  notes:
-    for post-processing under qh.NARROWhull
-
-  design:
-    for each facet
-      for each outside point for facet
-        partition point into coplanar set
-*/
-void qh_outcoplanar (void /* facet_list */) {
-  pointT *point, **pointp;
-  facetT *facet;
-  realT dist;
-
-  trace1((qh ferr, "qh_outcoplanar: move outsideset to coplanarset for qh NARROWhull\n"));
-  FORALLfacets {
-    FOREACHpoint_(facet->outsideset) {
-      qh num_outside--;
-      if (qh KEEPcoplanar || qh KEEPnearinside) {
-	qh_distplane (point, facet, &dist);
-        zinc_(Zpartition);
-	qh_partitioncoplanar (point, facet, &dist);
-      }
-    }
-    qh_setfree (&facet->outsideset);
-  }
-} /* outcoplanar */
-
-/*---------------------------------
-  
-  qh_point( id )
-    return point for a point id, or NULL if unknown
-
-  alternative code:
-    return ((pointT *)((unsigned   long)qh.first_point
-           + (unsigned long)((id)*qh.normal_size)));
-*/
-pointT *qh_point (int id) {
-
-  if (id < 0)
-    return NULL;
-  if (id < qh num_points)
-    return qh first_point + id * qh hull_dim;
-  id -= qh num_points;
-  if (id < qh_setsize (qh other_points))
-    return SETelemt_(qh other_points, id, pointT);
-  return NULL;
-} /* point */
-  
-/*---------------------------------
-  
-  qh_point_add( set, point, elem )
-    stores elem at set[point.id]
-  
-  returns:
-    access function for qh_pointfacet and qh_pointvertex
-
-  notes:
-    checks point.id
-*/
-void qh_point_add (setT *set, pointT *point, void *elem) {
-  int id, size;
-
-  SETreturnsize_(set, size);
-  if ((id= qh_pointid(point)) < 0)
-    fprintf (qh ferr, "qhull internal warning (point_add): unknown point %p id %d\n", 
-      point, id);
-  else if (id >= size) {
-    fprintf (qh ferr, "qhull internal errror (point_add): point p%d is out of bounds (%d)\n",
-	     id, size);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }else
-    SETelem_(set, id)= elem;
-} /* point_add */
-
-
-/*---------------------------------
-  
-  qh_pointfacet()
-    return temporary set of facet for each point
-    the set is indexed by point id
-
-  notes:
-    vertices assigned to one of the facets
-    coplanarset assigned to the facet
-    outside set assigned to the facet
-    NULL if no facet for point (inside)
-      includes qh.GOODpointp
-
-  access:
-    FOREACHfacet_i_(facets) { ... }
-    SETelem_(facets, i)
-  
-  design:
-    for each facet
-      add each vertex
-      add each coplanar point
-      add each outside point
-*/
-setT *qh_pointfacet (void /*qh facet_list*/) {
-  int numpoints= qh num_points + qh_setsize (qh other_points);
-  setT *facets;
-  facetT *facet;
-  vertexT *vertex, **vertexp;
-  pointT *point, **pointp;
-  
-  facets= qh_settemp (numpoints);
-  qh_setzero (facets, 0, numpoints);
-  qh vertex_visit++;
-  FORALLfacets {
-    FOREACHvertex_(facet->vertices) {
-      if (vertex->visitid != qh vertex_visit) {
-        vertex->visitid= qh vertex_visit;
-        qh_point_add (facets, vertex->point, facet);
-      }
-    }
-    FOREACHpoint_(facet->coplanarset) 
-      qh_point_add (facets, point, facet);
-    FOREACHpoint_(facet->outsideset) 
-      qh_point_add (facets, point, facet);
-  }
-  return facets;
-} /* pointfacet */
-
-/*---------------------------------
-  
-  qh_pointvertex(  )
-    return temporary set of vertices indexed by point id
-    entry is NULL if no vertex for a point
-      this will include qh.GOODpointp
-
-  access:
-    FOREACHvertex_i_(vertices) { ... }
-    SETelem_(vertices, i)
-*/
-setT *qh_pointvertex (void /*qh facet_list*/) {
-  int numpoints= qh num_points + qh_setsize (qh other_points);
-  setT *vertices;
-  vertexT *vertex;
-  
-  vertices= qh_settemp (numpoints);
-  qh_setzero (vertices, 0, numpoints);
-  FORALLvertices 
-    qh_point_add (vertices, vertex->point, vertex);
-  return vertices;
-} /* pointvertex */
-
-
-/*---------------------------------
-  
-  qh_prependfacet( facet, facetlist )
-    prepend facet to the start of a facetlist
-
-  returns:
-    increments qh.numfacets
-    updates facetlist, qh.facet_list, facet_next
-  
-  notes:
-    be careful of prepending since it can lose a pointer.
-      e.g., can lose _next by deleting and then prepending before _next
-*/
-void qh_prependfacet(facetT *facet, facetT **facetlist) {
-  facetT *prevfacet, *list;
-  
-
-  trace4((qh ferr, "qh_prependfacet: prepend f%d before f%d\n",
-	  facet->id, getid_(*facetlist)));
-  if (!*facetlist)
-    (*facetlist)= qh facet_tail;
-  list= *facetlist;
-  prevfacet= list->previous;
-  facet->previous= prevfacet;
-  if (prevfacet)
-    prevfacet->next= facet;
-  list->previous= facet;
-  facet->next= *facetlist;
-  if (qh facet_list == list)  /* this may change *facetlist */
-    qh facet_list= facet;
-  if (qh facet_next == list)
-    qh facet_next= facet;
-  *facetlist= facet;
-  qh num_facets++;
-} /* prependfacet */
-
-
-/*---------------------------------
-  
-  qh_printhashtable( fp )
-    print hash table to fp
-
-  notes:
-    not in I/O to avoid bringing io.c in
-  
-  design:
-    for each hash entry
-      if defined
-        if unmatched or will merge (NULL, qh_MERGEridge, qh_DUPLICATEridge)
-          print entry and neighbors
-*/
-void qh_printhashtable(FILE *fp) {
-  facetT *facet, *neighbor;
-  int id, facet_i, facet_n, neighbor_i= 0, neighbor_n= 0;
-  vertexT *vertex, **vertexp;
-
-  FOREACHfacet_i_(qh hash_table) {
-    if (facet) {
-      FOREACHneighbor_i_(facet) {
-        if (!neighbor || neighbor == qh_MERGEridge || neighbor == qh_DUPLICATEridge) 
-          break;
-      }
-      if (neighbor_i == neighbor_n)
-        continue;
-      fprintf (fp, "hash %d f%d ", facet_i, facet->id);
-      FOREACHvertex_(facet->vertices)
-        fprintf (fp, "v%d ", vertex->id);
-      fprintf (fp, "\n neighbors:");
-      FOREACHneighbor_i_(facet) {
-	if (neighbor == qh_MERGEridge)
-	  id= -3;
-	else if (neighbor == qh_DUPLICATEridge)
-	  id= -2;
-	else
-	  id= getid_(neighbor);
-        fprintf (fp, " %d", id);
-      }
-      fprintf (fp, "\n");
-    }
-  }
-} /* printhashtable */
-     
-
-/*---------------------------------
-  
-  qh_printlists( fp )
-    print out facet and vertex list for debugging (without 'f/v' tags)
-*/
-void qh_printlists (void) {
-  facetT *facet;
-  vertexT *vertex;
-  int count= 0;
-  
-  fprintf (qh ferr, "qh_printlists: facets:");
-  FORALLfacets {
-    if (++count % 100 == 0)
-      fprintf (qh ferr, "\n     ");
-    fprintf (qh ferr, " %d", facet->id);
-  }
-  fprintf (qh ferr, "\n  new facets %d visible facets %d next facet for qh_addpoint %d\n  vertices (new %d):",
-     getid_(qh newfacet_list), getid_(qh visible_list), getid_(qh facet_next),
-     getid_(qh newvertex_list));
-  count = 0;
-  FORALLvertices {
-    if (++count % 100 == 0)
-      fprintf (qh ferr, "\n     ");
-    fprintf (qh ferr, " %d", vertex->id);
-  }
-  fprintf (qh ferr, "\n");
-} /* printlists */
-  
-/*---------------------------------
-  
-  qh_resetlists( stats, qh_RESETvisible )
-    reset newvertex_list, newfacet_list, visible_list
-    if stats, 
-      maintains statistics
-
-  returns:
-    visible_list is empty if qh_deletevisible was called
-*/
-void qh_resetlists (boolT stats, boolT resetVisible /*qh newvertex_list newfacet_list visible_list*/) {
-  vertexT *vertex;
-  facetT *newfacet, *visible;
-  int totnew=0, totver=0;
-  
-  if (stats) {
-    FORALLvertex_(qh newvertex_list)
-      totver++;
-    FORALLnew_facets 
-      totnew++;
-    zadd_(Zvisvertextot, totver);
-    zmax_(Zvisvertexmax, totver);
-    zadd_(Znewfacettot, totnew);
-    zmax_(Znewfacetmax, totnew);
-  }
-  FORALLvertex_(qh newvertex_list)
-    vertex->newlist= False;
-  qh newvertex_list= NULL;
-  FORALLnew_facets
-    newfacet->newfacet= False;
-  qh newfacet_list= NULL;
-  if (resetVisible) {
-    FORALLvisible_facets {
-      visible->f.replace= NULL;
-      visible->visible= False;
-    }
-    qh num_visible= 0;
-  }
-  qh visible_list= NULL; /* may still have visible facets via qh_triangulate */
-  qh NEWfacets= False;
-} /* resetlists */
-
-/*---------------------------------
-  
-  qh_setvoronoi_all()
-    compute Voronoi centers for all facets
-    includes upperDelaunay facets if qh.UPPERdelaunay ('Qu')
-
-  returns:
-    facet->center is the Voronoi center
-    
-  notes:
-    this is unused/untested code
-      please email bradb@shore.net if this works ok for you
-  
-  use:
-    FORALLvertices {...} to locate the vertex for a point.  
-    FOREACHneighbor_(vertex) {...} to visit the Voronoi centers for a Voronoi cell.
-*/
-void qh_setvoronoi_all (void) {
-  facetT *facet;
-
-  qh_clearcenters (qh_ASvoronoi);
-  qh_vertexneighbors();
-  
-  FORALLfacets {
-    if (!facet->normal || !facet->upperdelaunay || qh UPPERdelaunay) {
-      if (!facet->center)
-        facet->center= qh_facetcenter (facet->vertices);
-    }
-  }
-} /* setvoronoi_all */
-
-#ifndef qh_NOmerge
-
-/*---------------------------------
-  
-  qh_triangulate()
-    triangulate non-simplicial facets on qh.facet_list, 
-    if qh.CENTERtype=qh_ASvoronoi, sets Voronoi centers of non-simplicial facets
-
-  returns:
-    all facets simplicial
-    each tricoplanar facet has ->f.triowner == owner of ->center,normal,etc.
-
-  notes:
-    call after qh_check_output since may switch to Voronoi centers
-    Output may overwrite ->f.triowner with ->f.area
-*/
-void qh_triangulate (void /*qh facet_list*/) {
-  facetT *facet, *nextfacet, *owner;
-  int onlygood= qh ONLYgood;
-  facetT *neighbor, *visible= NULL, *facet1, *facet2, *new_facet_list= NULL;
-  facetT *orig_neighbor= NULL, *otherfacet;
-  vertexT *new_vertex_list= NULL;
-  mergeT *merge; 
-  mergeType mergetype;
-  int neighbor_i, neighbor_n;
-
-  trace1((qh ferr, "qh_triangulate: triangulate non-simplicial facets\n"));
-  if (qh hull_dim == 2)
-    return;
-  if (qh VORONOI) {  /* otherwise lose Voronoi centers [could rebuild vertex set from tricoplanar] */
-    qh_clearcenters (qh_ASvoronoi);
-    qh_vertexneighbors();
-  }
-  qh ONLYgood= False; /* for makenew_nonsimplicial */
-  qh visit_id++;
-  qh NEWfacets= True;
-  qh degen_mergeset= qh_settemp (qh TEMPsize);
-  qh newvertex_list= qh vertex_tail;
-  for (facet= qh facet_list; facet && facet->next; facet= nextfacet) { /* non-simplicial facets moved to end */
-    nextfacet= facet->next;
-    if (facet->visible || facet->simplicial)
-      continue;
-    /* triangulate all non-simplicial facets, otherwise merging does not work, e.g., RBOX c P-0.1 P+0.1 P+0.1 D3 | QHULL d Qt Tv */
-    if (!new_facet_list)
-      new_facet_list= facet;  /* will be moved to end */
-    qh_triangulate_facet (facet, &new_vertex_list);
-  }
-  trace2((qh ferr, "qh_triangulate: delete null facets from f%d -- apex same as second vertex\n", getid_(new_facet_list)));
-  for (facet= new_facet_list; facet && facet->next; facet= nextfacet) { /* null facets moved to end */
-    nextfacet= facet->next;
-    if (facet->visible) 
-      continue;
-    if (facet->ridges) {
-      if (qh_setsize(facet->ridges) > 0) {
-	fprintf( qh ferr, "qhull error (qh_triangulate): ridges still defined for f%d\n", facet->id);
-	qh_errexit (qh_ERRqhull, facet, NULL);
-      }
-      qh_setfree (&facet->ridges);
-    }
-    if (SETfirst_(facet->vertices) == SETsecond_(facet->vertices)) {
-      zinc_(Ztrinull);
-      qh_triangulate_null (facet);
-    }
-  }
-  trace2((qh ferr, "qh_triangulate: delete %d or more mirror facets -- same vertices and neighbors\n", qh_setsize(qh degen_mergeset)));
-  qh visible_list= qh facet_tail;
-  while ((merge= (mergeT*)qh_setdellast (qh degen_mergeset))) {
-    facet1= merge->facet1;
-    facet2= merge->facet2;
-    mergetype= merge->type;
-    qh_memfree (merge, sizeof(mergeT));
-    if (mergetype == MRGmirror) {
-      zinc_(Ztrimirror);
-      qh_triangulate_mirror (facet1, facet2);
-    }
-  }
-  qh_settempfree(&qh degen_mergeset);
-  trace2((qh ferr, "qh_triangulate: update neighbor lists for vertices from v%d\n", getid_(new_vertex_list)));
-  qh newvertex_list= new_vertex_list;  /* all vertices of new facets */
-  qh visible_list= NULL;
-  qh_updatevertices(/*qh newvertex_list, empty newfacet_list and visible_list*/);
-  qh_resetlists (False, !qh_RESETvisible /*qh newvertex_list, empty newfacet_list and visible_list*/);
-
-  trace2((qh ferr, "qh_triangulate: identify degenerate tricoplanar facets from f%d\n", getid_(new_facet_list)));
-  trace2((qh ferr, "qh_triangulate: and replace facet->f.triowner with tricoplanar facets that own center, normal, etc.\n"));
-  FORALLfacet_(new_facet_list) {
-    if (facet->tricoplanar && !facet->visible) {
-      FOREACHneighbor_i_(facet) {
-	if (neighbor_i == 0) {  /* first iteration */
-	  if (neighbor->tricoplanar)
-            orig_neighbor= neighbor->f.triowner;
-	  else
-	    orig_neighbor= neighbor;
-	}else {
-	  if (neighbor->tricoplanar)
-  	    otherfacet= neighbor->f.triowner;
-	  else
-	    otherfacet= neighbor;
-	  if (orig_neighbor == otherfacet) {
-	    zinc_(Ztridegen);
-	    facet->degenerate= True;
-	    break;
-	  }
-	}
-      }
-    }
-  }
-
-  trace2((qh ferr, "qh_triangulate: delete visible facets -- non-simplicial, null, and mirrored facets\n"));
-  owner= NULL;
-  visible= NULL;
-  for (facet= new_facet_list; facet && facet->next; facet= nextfacet) { /* may delete facet */
-    nextfacet= facet->next;
-    if (facet->visible) {
-      if (facet->tricoplanar) { /* a null or mirrored facet */
-	qh_delfacet(facet);
-	qh num_visible--;
-      }else {  /* a non-simplicial facet followed by its tricoplanars */
-	if (visible && !owner) {
-	  /*  RBOX 200 s D5 t1001471447 | QHULL Qt C-0.01 Qx Qc Tv Qt -- f4483 had 6 vertices/neighbors and 8 ridges */
-	  trace2((qh ferr, "qh_triangulate: all tricoplanar facets degenerate for non-simplicial facet f%d\n",
-		       visible->id));
-	  qh_delfacet(visible);
-	  qh num_visible--;
-	}
-	visible= facet;
-	owner= NULL;
-      }
-    }else if (facet->tricoplanar) {
-      if (facet->f.triowner != visible) { 
-	fprintf( qh ferr, "qhull error (qh_triangulate): tricoplanar facet f%d not owned by its visible, non-simplicial facet f%d\n", facet->id, getid_(visible));
-	qh_errexit2 (qh_ERRqhull, facet, visible);
-      }
-      if (owner) 
-	facet->f.triowner= owner;
-      else if (!facet->degenerate) {
-	owner= facet;
-	nextfacet= visible->next; /* rescan tricoplanar facets with owner */
-	facet->keepcentrum= True;  /* one facet owns ->normal, etc. */
-	facet->coplanarset= visible->coplanarset;
-	facet->outsideset= visible->outsideset;
-  	visible->coplanarset= NULL;
-	visible->outsideset= NULL;
-        if (!qh TRInormals) { /* center and normal copied to tricoplanar facets */
-	  visible->center= NULL;
-	  visible->normal= NULL;
-	}
-	qh_delfacet(visible);
-	qh num_visible--;
-      }
-    }
-  }
-  if (visible && !owner) {
-    trace2((qh ferr, "qh_triangulate: all tricoplanar facets degenerate for last non-simplicial facet f%d\n",
-	         visible->id));
-    qh_delfacet(visible);
-    qh num_visible--;
-  }
-  qh NEWfacets= False;
-  qh ONLYgood= onlygood; /* restore value */
-  if (qh CHECKfrequently) 
-    qh_checkpolygon (qh facet_list);
-} /* triangulate */
-
-
-/*---------------------------------
-  
-  qh_triangulate_facet (facetA)
-    triangulate a non-simplicial facet
-      if qh.CENTERtype=qh_ASvoronoi, sets its Voronoi center
-  returns:
-    qh.newfacet_list == simplicial facets
-      facet->tricoplanar set and ->keepcentrum false
-      facet->degenerate set if duplicated apex
-      facet->f.trivisible set to facetA
-      facet->center copied from facetA (created if qh_ASvoronoi)
-	qh_eachvoronoi, qh_detvridge, qh_detvridge3 assume centers copied
-      facet->normal,offset,maxoutside copied from facetA
-
-  notes:
-      qh_makenew_nonsimplicial uses neighbor->seen for the same
-
-  see also:
-      qh_addpoint() -- add a point
-      qh_makenewfacets() -- construct a cone of facets for a new vertex
-
-  design:
-      if qh_ASvoronoi, 
-	 compute Voronoi center (facet->center)
-      select first vertex (highest ID to preserve ID ordering of ->vertices)
-      triangulate from vertex to ridges
-      copy facet->center, normal, offset
-      update vertex neighbors
-*/
-void qh_triangulate_facet (facetT *facetA, vertexT **first_vertex) {
-  facetT *newfacet;
-  facetT *neighbor, **neighborp;
-  vertexT *apex;
-  int numnew=0;
-
-  trace3((qh ferr, "qh_triangulate_facet: triangulate facet f%d\n", facetA->id));
-
-  if (qh IStracing >= 4)
-    qh_printfacet (qh ferr, facetA);
-  FOREACHneighbor_(facetA) {
-    neighbor->seen= False;
-    neighbor->coplanar= False;
-  }
-  if (qh CENTERtype == qh_ASvoronoi && !facetA->center  /* matches upperdelaunay in qh_setfacetplane() */
-        && fabs_(facetA->normal[qh hull_dim -1]) >= qh ANGLEround * qh_ZEROdelaunay) {
-    facetA->center= qh_facetcenter (facetA->vertices);
-  }
-  qh_willdelete (facetA, NULL);
-  qh newfacet_list= qh facet_tail;
-  facetA->visitid= qh visit_id;
-  apex= SETfirst_(facetA->vertices);
-  qh_makenew_nonsimplicial (facetA, apex, &numnew);
-  SETfirst_(facetA->neighbors)= NULL;
-  FORALLnew_facets {
-    newfacet->tricoplanar= True;
-    newfacet->f.trivisible= facetA;
-    newfacet->degenerate= False;
-    newfacet->upperdelaunay= facetA->upperdelaunay;
-    newfacet->good= facetA->good;
-    if (qh TRInormals) { 
-      newfacet->keepcentrum= True;
-      newfacet->normal= qh_copypoints (facetA->normal, 1, qh hull_dim);
-      if (qh CENTERtype == qh_AScentrum) 
-	newfacet->center= qh_getcentrum (newfacet);
-      else
-	newfacet->center= qh_copypoints (facetA->center, 1, qh hull_dim);
-    }else {
-      newfacet->keepcentrum= False;
-      newfacet->normal= facetA->normal;
-      newfacet->center= facetA->center;
-    }
-    newfacet->offset= facetA->offset;
-#if qh_MAXoutside
-    newfacet->maxoutside= facetA->maxoutside;
-#endif
-  }
-  qh_matchnewfacets(/*qh newfacet_list*/);
-  zinc_(Ztricoplanar);
-  zadd_(Ztricoplanartot, numnew);
-  zmax_(Ztricoplanarmax, numnew);
-  qh visible_list= NULL;
-  if (!(*first_vertex))
-    (*first_vertex)= qh newvertex_list;
-  qh newvertex_list= NULL;
-  qh_updatevertices(/*qh newfacet_list, empty visible_list and newvertex_list*/);
-  qh_resetlists (False, !qh_RESETvisible /*qh newfacet_list, empty visible_list and newvertex_list*/);
-} /* triangulate_facet */
-
-/*---------------------------------
-  
-  qh_triangulate_link (oldfacetA, facetA, oldfacetB, facetB)
-    relink facetA to facetB via oldfacets
-  returns:
-    adds mirror facets to qh degen_mergeset (4-d and up only)
-  design:
-    if they are already neighbors, the opposing neighbors become MRGmirror facets
-*/
-void qh_triangulate_link (facetT *oldfacetA, facetT *facetA, facetT *oldfacetB, facetT *facetB) {
-  int errmirror= False;
-
-  trace3((qh ferr, "qh_triangulate_link: relink old facets f%d and f%d between neighbors f%d and f%d\n", 
-         oldfacetA->id, oldfacetB->id, facetA->id, facetB->id));
-  if (qh_setin (facetA->neighbors, facetB)) {
-    if (!qh_setin (facetB->neighbors, facetA)) 
-      errmirror= True;
-    else
-      qh_appendmergeset (facetA, facetB, MRGmirror, NULL);
-  }else if (qh_setin (facetB->neighbors, facetA)) 
-    errmirror= True;
-  if (errmirror) {
-    fprintf( qh ferr, "qhull error (qh_triangulate_link): mirror facets f%d and f%d do not match for old facets f%d and f%d\n",
-       facetA->id, facetB->id, oldfacetA->id, oldfacetB->id);
-    qh_errexit2 (qh_ERRqhull, facetA, facetB);
-  }
-  qh_setreplace (facetB->neighbors, oldfacetB, facetA);
-  qh_setreplace (facetA->neighbors, oldfacetA, facetB);
-} /* triangulate_link */
-
-/*---------------------------------
-  
-  qh_triangulate_mirror (facetA, facetB)
-    delete mirrored facets from qh_triangulate_null() and qh_triangulate_mirror
-      a mirrored facet shares the same vertices of a logical ridge
-  design:
-    since a null facet duplicates the first two vertices, the opposing neighbors absorb the null facet
-    if they are already neighbors, the opposing neighbors become MRGmirror facets
-*/
-void qh_triangulate_mirror (facetT *facetA, facetT *facetB) {
-  facetT *neighbor, *neighborB;
-  int neighbor_i, neighbor_n;
-
-  trace3((qh ferr, "qh_triangulate_mirror: delete mirrored facets f%d and f%d\n", 
-         facetA->id, facetB->id));
-  FOREACHneighbor_i_(facetA) {
-    neighborB= SETelemt_(facetB->neighbors, neighbor_i, facetT);
-    if (neighbor == neighborB)
-      continue; /* occurs twice */
-    qh_triangulate_link (facetA, neighbor, facetB, neighborB);
-  }
-  qh_willdelete (facetA, NULL);
-  qh_willdelete (facetB, NULL);
-} /* triangulate_mirror */
-
-/*---------------------------------
-  
-  qh_triangulate_null (facetA)
-    remove null facetA from qh_triangulate_facet()
-      a null facet has vertex #1 (apex) == vertex #2
-  returns:
-    adds facetA to ->visible for deletion after qh_updatevertices
-    qh degen_mergeset contains mirror facets (4-d and up only)
-  design:
-    since a null facet duplicates the first two vertices, the opposing neighbors absorb the null facet
-    if they are already neighbors, the opposing neighbors become MRGmirror facets
-*/
-void qh_triangulate_null (facetT *facetA) {
-  facetT *neighbor, *otherfacet;
-
-  trace3((qh ferr, "qh_triangulate_null: delete null facet f%d\n", facetA->id));
-  neighbor= SETfirst_(facetA->neighbors);
-  otherfacet= SETsecond_(facetA->neighbors);
-  qh_triangulate_link (facetA, neighbor, facetA, otherfacet);
-  qh_willdelete (facetA, NULL);
-} /* triangulate_null */
-
-#else /* qh_NOmerge */
-void qh_triangulate (void) {
-}
-#endif /* qh_NOmerge */
-
-   /*---------------------------------
-  
-  qh_vertexintersect( vertexsetA, vertexsetB )
-    intersects two vertex sets (inverse id ordered)
-    vertexsetA is a temporary set at the top of qhmem.tempstack
-
-  returns:
-    replaces vertexsetA with the intersection
-  
-  notes:
-    could overwrite vertexsetA if currently too slow
-*/
-void qh_vertexintersect(setT **vertexsetA,setT *vertexsetB) {
-  setT *intersection;
-
-  intersection= qh_vertexintersect_new (*vertexsetA, vertexsetB);
-  qh_settempfree (vertexsetA);
-  *vertexsetA= intersection;
-  qh_settemppush (intersection);
-} /* vertexintersect */
-
-/*---------------------------------
-  
-  qh_vertexintersect_new(  )
-    intersects two vertex sets (inverse id ordered)
-
-  returns:
-    a new set
-*/
-setT *qh_vertexintersect_new (setT *vertexsetA,setT *vertexsetB) {
-  setT *intersection= qh_setnew (qh hull_dim - 1);
-  vertexT **vertexA= SETaddr_(vertexsetA, vertexT); 
-  vertexT **vertexB= SETaddr_(vertexsetB, vertexT); 
-
-  while (*vertexA && *vertexB) {
-    if (*vertexA  == *vertexB) {
-      qh_setappend(&intersection, *vertexA);
-      vertexA++; vertexB++;
-    }else {
-      if ((*vertexA)->id > (*vertexB)->id)
-        vertexA++;
-      else
-        vertexB++;
-    }
-  }
-  return intersection;
-} /* vertexintersect_new */
-
-/*---------------------------------
-  
-  qh_vertexneighbors()
-    for each vertex in qh.facet_list, 
-      determine its neighboring facets 
-
-  returns:
-    sets qh.VERTEXneighbors
-      nop if qh.VERTEXneighbors already set
-      qh_addpoint() will maintain them
-
-  notes:
-    assumes all vertex->neighbors are NULL
-
-  design:
-    for each facet
-      for each vertex
-        append facet to vertex->neighbors
-*/
-void qh_vertexneighbors (void /*qh facet_list*/) {
-  facetT *facet;
-  vertexT *vertex, **vertexp;
-
-  if (qh VERTEXneighbors)
-    return;
-  trace1((qh ferr, "qh_vertexneighbors: determing neighboring facets for each vertex\n"));
-  qh vertex_visit++;
-  FORALLfacets {
-    if (facet->visible)
-      continue;
-    FOREACHvertex_(facet->vertices) {
-      if (vertex->visitid != qh vertex_visit) {
-        vertex->visitid= qh vertex_visit;
-        vertex->neighbors= qh_setnew (qh hull_dim);
-      }
-      qh_setappend (&vertex->neighbors, facet);
-    }
-  }
-  qh VERTEXneighbors= True;
-} /* vertexneighbors */
-
-/*---------------------------------
-  
-  qh_vertexsubset( vertexsetA, vertexsetB )
-    returns True if vertexsetA is a subset of vertexsetB
-    assumes vertexsets are sorted
-
-  note:    
-    empty set is a subset of any other set
-*/
-boolT qh_vertexsubset(setT *vertexsetA, setT *vertexsetB) {
-  vertexT **vertexA= (vertexT **) SETaddr_(vertexsetA, vertexT);
-  vertexT **vertexB= (vertexT **) SETaddr_(vertexsetB, vertexT);
-
-  while (True) {
-    if (!*vertexA)
-      return True;
-    if (!*vertexB)
-      return False;
-    if ((*vertexA)->id > (*vertexB)->id)
-      return False;
-    if (*vertexA  == *vertexB)
-      vertexA++;
-    vertexB++; 
-  }
-  return False; /* avoid warnings */
-} /* vertexsubset */
diff --git a/extern/qhull/src/qconvex.c b/extern/qhull/src/qconvex.c
deleted file mode 100644
index 67b78646e50..00000000000
--- a/extern/qhull/src/qconvex.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
  ---------------------------------
-
-   qconvex.c
-      compute convex hulls using qhull
-
-   see unix.c for full interface
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include 
-#include 
-#include 
-#include 
-
-#elif __cplusplus
-extern "C" {
-  int isatty (int);
-}
-
-#elif _MSC_VER
-#include 
-#define isatty _isatty
-
-#else
-int isatty (int);  /* returns 1 if stdin is a tty
-		   if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*---------------------------------
-
-  qh_prompt
-    long prompt for qconvex
-    
-  notes:
-    restricted version of qhull.c
-
-  see:
-    concise prompt below
-*/  
-
-/* duplicated in qconvex.htm */
-char hidden_options[]=" d v H Qbb Qf Qg Qm Qr Qu Qv Qx Qz TR E V Fp Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-	       
-char qh_prompta[]= "\n\
-qconvex- compute the convex hull\n\
-    http://www.geom.umn.edu/software/qhull  %s\n\
-\n\
-input (stdin):\n\
-    first lines: dimension and number of points (or vice-versa).\n\
-    other lines: point coordinates, best if one point per line\n\
-    comments:    start with a non-numeric character\n\
-\n\
-options:\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Qc   - keep coplanar points with nearest facet\n\
-    Qi   - keep interior points with nearest facet\n\
-\n\
-Qhull control options:\n\
-    Qbk:n   - scale coord k so that low bound is n\n\
-      QBk:n - scale coord k so that upper bound is n (QBk is %2.2g)\n\
-    QbB  - scale input to unit cube centered at the origin\n\
-    Qbk:0Bk:0 - remove k-th coordinate from input\n\
-    QJn  - randomly joggle input in range [-n,n]\n\
-    QRn  - random rotation (n=seed, n=0 time, n=-1 time/no rotate)\n\
-%s%s%s%s";  /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
-    Qs   - search all points for the initial simplex\n\
-    QGn  - good facet if visible from point n, -n for not visible\n\
-    QVn  - good facet if it includes point n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
-    T4   - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
-    Tc   - check frequently during execution\n\
-    Ts   - print statistics\n\
-    Tv   - verify result: structure, convexity, and point inclusion\n\
-    Tz   - send all output to stdout\n\
-    TFn  - report summary when n or more facets created\n\
-    TI file - input data from file, no spaces or single quotes\n\
-    TO file - output results to file, may be enclosed in single quotes\n\
-    TPn  - turn on tracing when point n added to hull\n\
-     TMn - turn on tracing at merge n\n\
-     TWn - trace merge facets when width > n\n\
-    TVn  - stop qhull after adding point n, -n for before (see TCn)\n\
-     TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
-    Cn   - radius of centrum (roundoff added).  Merge facets if non-convex\n\
-     An  - cosine of maximum angle.  Merge facets if cosine > n or non-convex\n\
-           C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
-    Rn   - randomly perturb computations by a factor of [1-n,1+n]\n\
-    Un   - max distance below plane for a new, coplanar point\n\
-    Wn   - min facet width for outside point (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
-    f    - facet dump\n\
-    G    - Geomview output (see below)\n\
-    i    - vertices incident to each facet\n\
-    m    - Mathematica output (2-d and 3-d)\n\
-    n    - normals with offsets\n\
-    o    - OFF file format (dim, points and facets; Voronoi regions)\n\
-    p    - point coordinates \n\
-    s    - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
-    Fa   - area for each facet\n\
-    FA   - compute total area and volume for option 's'\n\
-    Fc   - count plus coplanar points for each facet\n\
-           use 'Qc' (default) for coplanar and 'Qi' for interior\n\
-    FC   - centrum for each facet\n\
-    Fd   - use cdd format for input (homogeneous with offset first)\n\
-    FD   - use cdd format for numeric output (offset first)\n\
-    FF   - facet dump without ridges\n\
-    Fi   - inner plane for each facet\n\
-    FI   - ID for each facet\n\
-    Fm   - merge count for each facet (511 max)\n\
-    Fn   - count plus neighboring facets for each facet\n\
-    FN   - count plus neighboring facets for each point\n\
-    Fo   - outer plane (or max_outside) for each facet\n\
-    FO   - options and precision constants\n\
-    FP   - nearest vertex for each coplanar point\n\
-    FQ   - command used for qconvex\n\
-    Fs   - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
-                      for output: #vertices, #facets,\n\
-                                  #coplanar points, #non-simplicial facets\n\
-                    #real (2), max outer plane, min vertex\n\
-    FS   - sizes:   #int (0) \n\
-                    #real(2) tot area, tot volume\n\
-    Ft   - triangulation with centrums for non-simplicial facets (OFF format)\n\
-    Fv   - count plus vertices for each facet\n\
-    FV   - average of vertices (a feasible point for 'H')\n\
-    Fx   - extreme points (in order for 2-d)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview output (2-d, 3-d, and 4-d)\n\
-    Ga   - all points as dots\n\
-     Gp  -  coplanar points and vertices as radii\n\
-     Gv  -  vertices as spheres\n\
-    Gi   - inner planes only\n\
-     Gn  -  no planes\n\
-     Go  -  outer planes only\n\
-    Gc   - centrums\n\
-    Gh   - hyperplane intersections\n\
-    Gr   - ridges\n\
-    GDn  - drop dimension n in 3-d and 4-d output\n\
-\n\
-Print options:\n\
-    PAn  - keep n largest facets by area\n\
-    Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
-    PDk:n - drop facet if normal[k] >= n\n\
-    Pg   - print good facets (needs 'QGn' or 'QVn')\n\
-    PFn  - keep facets whose area is at least n\n\
-    PG   - print neighbors of good facets\n\
-    PMn  - keep n facets with most merges\n\
-    Po   - force output.  If error, output neighborhood of facet\n\
-    Pp   - do not report precision problems\n\
-\n\
-    .    - list of all options\n\
-    -    - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt2
-    synopsis for qhull 
-*/  
-char qh_prompt2[]= "\n\
-qconvex- compute the convex hull.  Qhull %s\n\
-    input (stdin): dimension, number of points, point coordinates\n\
-    comments start with a non-numeric character\n\
-\n\
-options (qconvex.htm):\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Tv   - verify result: structure, convexity, and point inclusion\n\
-    .    - concise list of all options\n\
-    -    - one-line description of all options\n\
-\n\
-output options (subset):\n\
-    s    - summary of results (default)\n\
-    i    - vertices incident to each facet\n\
-    n    - normals with offsets\n\
-    p    - vertex coordinates (includes coplanar points if 'Qc')\n\
-    Fx   - extreme points (convex hull vertices)\n\
-    FA   - compute total area and volume\n\
-    o    - OFF format (dim, n, points, facets)\n\
-    G    - Geomview output (2-d, 3-d, and 4-d)\n\
-    m    - Mathematica output (2-d and 3-d)\n\
-    QVn  - print facets that include point n, -n if not\n\
-    TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
-    rbox c D2 | qconvex s n                    rbox c D2 | qconvex i\n\
-    rbox c D2 | qconvex o                      rbox 1000 s | qconvex s Tv FA\n\
-    rbox c d D2 | qconvex s Qc Fx              rbox y 1000 W0 | qconvex s n\n\
-    rbox y 1000 W0 | qconvex s QJ              rbox d G1 D12 | qconvex QR0 FA Pp\n\
-    rbox c D7 | qconvex FA TF1000\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt3
-    concise prompt for qhull 
-*/  
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- incidences     mathematica    normals        OFF_format     points\n\
- summary        facet_dump\n\
-\n\
- Farea          FArea_total    Fcoplanars     FCentrums      Fd_cdd_in\n\
- FD_cdd_out     FFacet_xridge  Finner         FIDs           Fmerges\n\
- Fneighbors     FNeigh_vertex  Fouter         FOptions       FPoint_near\n\
- FQhull         Fsummary       FSize          Fvertices      FVertex_ave\n\
- Fxtremes\n\
-\n\
- Gvertices      Gpoints        Gall_points    Gno_planes     Ginner\n\
- Gcentrums      Ghyperplanes   Gridges        Gouter         GDrop_dim\n\
-\n\
- PArea_keep     Pdrop d0:0D0   PFacet_area_keep Pgood        PGood_neighbors\n\
- PMerge_keep    Poutput_forced Pprecision_not\n\
-\n\
- QbBound 0:0.5  QbB_scale_box  Qcoplanar      QGood_point    Qinterior\n\
- QJoggle        Qrandom        QRotate        Qsearch_1st    Qtriangulate\n\
- QVertex_good\n\
-\n\
- T4_trace       Tcheck_often   Tstatistics    Tverify        Tz_stdout\n\
- TFacet_log     TInput_file    TPoint_trace   TMerge_trace   TOutput_file\n\
- TWide_trace    TVertex_stop   TCone_stop\n\
-\n\
- Angle_max      Centrum_size   Random_dist    Ucoplanar_max  Wide_outside\n\
-";
-
-/*---------------------------------
-  
-  main( argc, argv )
-    processes the command line, calls qhull() to do the work, and exits
-  
-  design:
-    initializes data structures
-    reads points
-    finishes initialization
-    computes convex hull and other structures
-    checks the result
-    writes the output
-    frees memory
-*/
-int main(int argc, char *argv[]) {
-  int curlong, totlong; /* used !qh_NOmem */
-  int exitcode, numpoints, dim;
-  coordT *points;
-  boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
-  char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
-  SIOUXSettings.showstatusline= false;
-  SIOUXSettings.tabspaces= 1;
-  SIOUXSettings.rows= 40;
-  if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0   /* w/o, SIOUX I/O is slow*/
-  || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
-  || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0)) 
-    fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
-  argc= ccommand(&argv);
-#endif
-
-  if ((argc == 1) && isatty( 0 /*stdin*/)) {      
-    fprintf(stdout, qh_prompt2, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompta, qh_VERSION, qh_DEFAULTbox, 
-		qh_promptb, qh_promptc, qh_promptd, qh_prompte);
-    exit(qh_ERRnone);
-  }
-  if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompt3, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  qh_init_A (stdin, stdout, stderr, argc, argv);  /* sets qh qhull_command */
-  exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
-  if (!exitcode) {
-    qh_checkflags (qh qhull_command, hidden_options);
-    qh_initflags (qh qhull_command);
-    points= qh_readpoints (&numpoints, &dim, &ismalloc);
-    if (dim >= 5) {
-      qh_option ("Qxact_merge", NULL, NULL);
-      qh MERGEexact= True; /* 'Qx' always */
-    }
-    qh_init_B (points, numpoints, dim, ismalloc);
-    qh_qhull();
-    qh_check_output();
-    qh_produce_output();
-    if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points();
-    exitcode= qh_ERRnone;
-  }
-  qh NOerrexit= True;  /* no more setjmp */
-#ifdef qh_NOmem
-  qh_freeqhull( True);
-#else
-  qh_freeqhull( False);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong) 
-    fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-#endif
-  return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/qdelaun.c b/extern/qhull/src/qdelaun.c
deleted file mode 100644
index 0e49d9c381e..00000000000
--- a/extern/qhull/src/qdelaun.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
  ---------------------------------
-
-   qdelaun.c
-     compute Delaunay triangulations and furthest-point Delaunay
-     triangulations using qhull
-
-   see unix.c for full interface
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include 
-#include 
-#include 
-#include 
-
-#elif __cplusplus
-extern "C" {
-  int isatty (int);
-}
-
-#elif _MSC_VER
-#include 
-#define isatty _isatty
-
-#else
-int isatty (int);  /* returns 1 if stdin is a tty
-		   if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*---------------------------------
-
-  qh_prompt 
-    long prompt for qhull
-    
-  notes:
-    restricted version of qhull.c
- 
-  see:
-    concise prompt below
-*/  
-
-/* duplicated in qdelau_f.htm and qdelaun.htm */
-char hidden_options[]=" d n v H U Qb QB Qc Qf Qg Qi Qm Qr QR Qv Qx TR E V FC Fi Fo Ft Fp FV Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qdelaunay- compute the Delaunay triangulation\n\
-    http://www.geom.umn.edu/software/qhull  %s\n\
-\n\
-input (stdin):\n\
-    first lines: dimension and number of points (or vice-versa).\n\
-    other lines: point coordinates, best if one point per line\n\
-    comments:    start with a non-numeric character\n\
-\n\
-options:\n\
-    Qu   - compute furthest-site Delaunay triangulation\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-\n\
-Qhull control options:\n\
-    QJn  - randomly joggle input in range [-n,n]\n\
-%s%s%s%s";  /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
-    Qs   - search all points for the initial simplex\n\
-    Qz   - add point-at-infinity to Delaunay triangulation\n\
-    QGn  - print Delaunay region if visible from point n, -n if not\n\
-    QVn  - print Delaunay regions that include point n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
-    T4   - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
-    Tc   - check frequently during execution\n\
-    Ts   - print statistics\n\
-    Tv   - verify result: structure, convexity, and in-circle test\n\
-    Tz   - send all output to stdout\n\
-    TFn  - report summary when n or more facets created\n\
-    TI file - input data from file, no spaces or single quotes\n\
-    TO file - output results to file, may be enclosed in single quotes\n\
-    TPn  - turn on tracing when point n added to hull\n\
-     TMn - turn on tracing at merge n\n\
-     TWn - trace merge facets when width > n\n\
-    TVn  - stop qhull after adding point n, -n for before (see TCn)\n\
-     TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
-    Cn   - radius of centrum (roundoff added).  Merge facets if non-convex\n\
-     An  - cosine of maximum angle.  Merge facets if cosine > n or non-convex\n\
-           C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
-    Rn   - randomly perturb computations by a factor of [1-n,1+n]\n\
-    Wn   - min facet width for outside point (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
-    f    - facet dump\n\
-    G    - Geomview output (see below)\n\
-    i    - vertices incident to each Delaunay region\n\
-    m    - Mathematica output (2-d only, lifted to a paraboloid)\n\
-    o    - OFF format (dim, points, and facets as a paraboloid)\n\
-    p    - point coordinates (lifted to a paraboloid)\n\
-    s    - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
-    Fa   - area for each Delaunay region\n\
-    FA   - compute total area for option 's'\n\
-    Fc   - count plus coincident points for each Delaunay region\n\
-    Fd   - use cdd format for input (homogeneous with offset first)\n\
-    FD   - use cdd format for numeric output (offset first)\n\
-    FF   - facet dump without ridges\n\
-    FI   - ID of each Delaunay region\n\
-    Fm   - merge count for each Delaunay region (511 max)\n\
-    Fn   - count plus neighboring region for each Delaunay region\n\
-    FN   - count plus neighboring region for each point\n\
-    FO   - options and precision constants\n\
-    FP   - nearest point and distance for each coincident point\n\
-    FQ   - command used for qdelaunay\n\
-    Fs   - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
-                    for output: #vertices, #Delaunay regions,\n\
-                                #coincident points, #non-simplicial regions\n\
-                    #real (2), max outer plane, min vertex\n\
-    FS   - sizes:   #int (0)\n\
-                    #real(2) tot area, 0\n\
-    Fv   - count plus vertices for each Delaunay region\n\
-    Fx   - extreme points of Delaunay triangulation (on convex hull)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview options (2-d and 3-d)\n\
-    Ga   - all points as dots\n\
-     Gp  -  coplanar points and vertices as radii\n\
-     Gv  -  vertices as spheres\n\
-    Gi   - inner planes only\n\
-     Gn  -  no planes\n\
-     Go  -  outer planes only\n\
-    Gc	   - centrums\n\
-    Gh   - hyperplane intersections\n\
-    Gr   - ridges\n\
-    GDn  - drop dimension n in 3-d and 4-d output\n\
-    Gt   - transparent outer ridges to view 3-d Delaunay\n\
-\n\
-Print options:\n\
-    PAn  - keep n largest Delaunay regions by area\n\
-    Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
-    PDk:n - drop facet if normal[k] >= n\n\
-    Pg   - print good Delaunay regions (needs 'QGn' or 'QVn')\n\
-    PFn  - keep Delaunay regions whose area is at least n\n\
-    PG   - print neighbors of good regions (needs 'QGn' or 'QVn')\n\
-    PMn  - keep n Delaunay regions with most merges\n\
-    Po   - force output.  If error, output neighborhood of facet\n\
-    Pp   - do not report precision problems\n\
-\n\
-    .    - list of all options\n\
-    -    - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt2
-    synopsis for qhull 
-*/  
-char qh_prompt2[]= "\n\
-qdelaunay- compute the Delaunay triangulation. Qhull %s\n\
-    input (stdin): dimension, number of points, point coordinates\n\
-    comments start with a non-numeric character\n\
-\n\
-options (qdelaun.htm):\n\
-    Qu   - furthest-site Delaunay triangulation\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Tv   - verify result: structure, convexity, and in-circle test\n\
-    .    - concise list of all options\n\
-    -    - one-line description of all options\n\
-\n\
-output options (subset):\n\
-    s    - summary of results (default)\n\
-    i    - vertices incident to each Delaunay region\n\
-    Fx   - extreme points (vertices of the convex hull)\n\
-    o    - OFF format (shows the points lifted to a paraboloid)\n\
-    G    - Geomview output (2-d and 3-d points lifted to a paraboloid)\n\
-    m    - Mathematica output (2-d inputs lifted to a paraboloid)\n\
-    QVn  - print Delaunay regions that include point n, -n if not\n\
-    TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
-    rbox c P0 D2 | qdelaunay s o          rbox c P0 D2 | qdelaunay i\n\
-    rbox c P0 D2 | qdelaunay Fv           rbox c P0 D2 | qdelaunay s Qu Fv\n\
-    rbox c G1 d D2 | qdelaunay s i        rbox c G1 d D2 | qdelaunay Qt\n\
-    rbox M3,4 z 100 D2 | qdelaunay s      rbox M3,4 z 100 D2 | qdelaunay s Qt\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt3
-    concise prompt for qhull 
-*/  
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- incidences     mathematica    OFF_format     points_lifted  summary\n\
- facet_dump\n\
-\n\
- Farea          FArea_total    Fcoincident    Fd_cdd_in      FD_cdd_out\n\
- FF_dump_xridge FIDs           Fmerges        Fneighbors     FNeigh_vertex\n\
- FOptions       FPoint_near    FQdelaun       Fsummary       FSize\n\
- Fvertices      Fxtremes\n\
-\n\
- Gvertices      Gpoints        Gall_points    Gno_planes     Ginner\n\
- Gcentrums      Ghyperplanes   Gridges        Gouter         GDrop_dim\n\
- Gtransparent\n\
-\n\
- PArea_keep     Pdrop d0:0D0   Pgood          PFacet_area_keep\n\
- PGood_neighbors PMerge_keep   Poutput_forced Pprecision_not\n\
-\n\
- QGood_point    QJoggle        Qsearch_1st    Qtriangulate   QupperDelaunay\n\
- QVertex_good   Qzinfinite\n\
-\n\
- T4_trace       Tcheck_often   Tstatistics    Tverify        Tz_stdout\n\
- TFacet_log     TInput_file    TPoint_trace   TMerge_trace   TOutput_file\n\
- TWide_trace    TVertex_stop   TCone_stop\n\
-\n\
- Angle_max      Centrum_size   Random_dist    Wide_outside\n\
-";
-
-/*---------------------------------
-  
-  main( argc, argv )
-    processes the command line, calls qhull() to do the work, and exits
-  
-  design:
-    initializes data structures
-    reads points
-    finishes initialization
-    computes convex hull and other structures
-    checks the result
-    writes the output
-    frees memory
-*/
-int main(int argc, char *argv[]) {
-  int curlong, totlong; /* used !qh_NOmem */
-  int exitcode, numpoints, dim;
-  coordT *points;
-  boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
-  char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
-  SIOUXSettings.showstatusline= false;
-  SIOUXSettings.tabspaces= 1;
-  SIOUXSettings.rows= 40;
-  if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0   /* w/o, SIOUX I/O is slow*/
-  || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
-  || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0)) 
-    fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
-  argc= ccommand(&argv);
-#endif
-
-  if ((argc == 1) && isatty( 0 /*stdin*/)) {      
-    fprintf(stdout, qh_prompt2, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompta, qh_VERSION,  
-		qh_promptb, qh_promptc, qh_promptd, qh_prompte);
-    exit(qh_ERRnone);
-  }
-  if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompt3, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  qh_init_A (stdin, stdout, stderr, argc, argv);  /* sets qh qhull_command */
-  exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
-  if (!exitcode) {
-    qh_option ("delaunay  Qbbound-last", NULL, NULL);
-    qh DELAUNAY= True;     /* 'd'   */
-    qh SCALElast= True;    /* 'Qbb' */
-    qh KEEPcoplanar= True; /* 'Qc', to keep coplanars in 'p' */
-    qh_checkflags (qh qhull_command, hidden_options);
-    qh_initflags (qh qhull_command);
-    points= qh_readpoints (&numpoints, &dim, &ismalloc);
-    if (dim >= 5) {
-      qh_option ("Qxact_merge", NULL, NULL);
-      qh MERGEexact= True; /* 'Qx' always */
-    }
-    qh_init_B (points, numpoints, dim, ismalloc);
-    qh_qhull();
-    qh_check_output();
-    qh_produce_output();
-    if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points();
-    exitcode= qh_ERRnone;
-  }
-  qh NOerrexit= True;  /* no more setjmp */
-#ifdef qh_NOmem
-  qh_freeqhull( True);
-#else
-  qh_freeqhull( False);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong) 
-    fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-#endif
-  return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/qhalf.c b/extern/qhull/src/qhalf.c
deleted file mode 100644
index a2b3875dd7f..00000000000
--- a/extern/qhull/src/qhalf.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
  ---------------------------------
-
-   qhalf.c
-     compute the intersection of halfspaces about a point
-
-   see unix.c for full interface
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include 
-#include 
-#include 
-#include 
-
-#elif __cplusplus
-extern "C" {
-  int isatty (int);
-}
-
-#elif _MSC_VER
-#include 
-#define isatty _isatty
-
-#else
-int isatty (int);  /* returns 1 if stdin is a tty
-		   if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*---------------------------------
-
-  qh_prompt 
-    long prompt for qhull
-    
-  notes:
-    restricted version of qhull.c
- 
-  see:
-    concise prompt below
-*/  
-
-/* duplicated in qhalf.htm */
-char hidden_options[]=" d n v Qbb QbB Qf Qg Qm Qr QR Qv Qx Qz TR E V Fa FA FC FD FS Ft FV Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qhalf- compute the intersection of halfspaces about a point\n\
-    http://www.geom.umn.edu/software/qhull  %s\n\
-\n\
-input (stdin):\n\
-    optional interior point: dimension, 1, coordinates\n\
-    first lines: dimension+1 and number of halfspaces\n\
-    other lines: halfspace coefficients followed by offset\n\
-    comments:    start with a non-numeric character\n\
-\n\
-options:\n\
-    Hn,n - specify coordinates of interior point\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Qc   - keep coplanar halfspaces\n\
-    Qi   - keep other redundant halfspaces\n\
-\n\
-Qhull control options:\n\
-    QJn  - randomly joggle input in range [-n,n]\n\
-%s%s%s%s";  /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
-    Qbk:0Bk:0 - remove k-th coordinate from input\n\
-    Qs   - search all halfspaces for the initial simplex\n\
-    QGn  - print intersection if visible to halfspace n, -n for not\n\
-    QVn  - print intersections for halfspace n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
-    T4   - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
-    Tc   - check frequently during execution\n\
-    Ts   - print statistics\n\
-    Tv   - verify result: structure, convexity, and redundancy\n\
-    Tz   - send all output to stdout\n\
-    TFn  - report summary when n or more facets created\n\
-    TI file - input data from file, no spaces or single quotes\n\
-    TO file - output results to file, may be enclosed in single quotes\n\
-    TPn  - turn on tracing when halfspace n added to intersection\n\
-    TMn  - turn on tracing at merge n\n\
-    TWn  - trace merge facets when width > n\n\
-    TVn  - stop qhull after adding halfspace n, -n for before (see TCn)\n\
-    TCn  - stop qhull after building cone for halfspace n (see TVn)\n\
-\n\
-Precision options:\n\
-    Cn   - radius of centrum (roundoff added).  Merge facets if non-convex\n\
-     An  - cosine of maximum angle.  Merge facets if cosine > n or non-convex\n\
-           C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
-    Rn   - randomly perturb computations by a factor of [1-n,1+n]\n\
-    Un   - max distance below plane for a new, coplanar halfspace\n\
-    Wn   - min facet width for outside halfspace (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
-    f    - facet dump\n\
-    G    - Geomview output (dual convex hull)\n\
-    i    - non-redundant halfspaces incident to each intersection\n\
-    m    - Mathematica output (dual convex hull)\n\
-    o    - OFF format (dual convex hull: dimension, points, and facets)\n\
-    p    - vertex coordinates of dual convex hull (coplanars if 'Qc' or 'Qi')\n\
-    s    - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
-    Fc   - count plus redundant halfspaces for each intersection\n\
-         -   Qc (default) for coplanar and Qi for other redundant\n\
-    Fd   - use cdd format for input (homogeneous with offset first)\n\
-    FF   - facet dump without ridges\n\
-    FI   - ID of each intersection\n\
-    Fm   - merge count for each intersection (511 max)\n\
-    Fn   - count plus neighboring intersections for each intersection\n\
-    FN   - count plus intersections for each non-redundant halfspace\n\
-    FO   - options and precision constants\n\
-    Fp   - dim, count, and intersection coordinates\n\
-    FP   - nearest halfspace and distance for each redundant halfspace\n\
-    FQ   - command used for qhalf\n\
-    Fs   - summary: #int (8), dim, #halfspaces, #non-redundant, #intersections\n\
-                      for output: #non-redundant, #intersections, #coplanar\n\
-                                  halfspaces, #non-simplicial intersections\n\
-                    #real (2), max outer plane, min vertex\n\
-    Fv   - count plus non-redundant halfspaces for each intersection\n\
-    Fx   - non-redundant halfspaces\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview output (2-d, 3-d and 4-d; dual convex hull)\n\
-    Ga   - all points (i.e., transformed halfspaces) as dots\n\
-     Gp  -  coplanar points and vertices as radii\n\
-     Gv  -  vertices (i.e., non-redundant halfspaces) as spheres\n\
-    Gi   - inner planes (i.e., halfspace intersections) only\n\
-     Gn  -  no planes\n\
-     Go  -  outer planes only\n\
-    Gc	 - centrums\n\
-    Gh   - hyperplane intersections\n\
-    Gr   - ridges\n\
-    GDn  - drop dimension n in 3-d and 4-d output\n\
-\n\
-Print options:\n\
-    PAn  - keep n largest facets (i.e., intersections) by area\n\
-    Pdk:n- drop facet if normal[k] <= n (default 0.0)\n\
-    PDk:n- drop facet if normal[k] >= n\n\
-    Pg   - print good facets (needs 'QGn' or 'QVn')\n\
-    PFn  - keep facets whose area is at least n\n\
-    PG   - print neighbors of good facets\n\
-    PMn  - keep n facets with most merges\n\
-    Po   - force output.  If error, output neighborhood of facet\n\
-    Pp   - do not report precision problems\n\
-\n\
-    .    - list of all options\n\
-    -    - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt2
-    synopsis for qhull 
-*/  
-char qh_prompt2[]= "\n\
-qhalf- halfspace intersection about a point. Qhull %s\n\
-    input (stdin): [dim, 1, interior point], dim+1, n, coefficients+offset\n\
-    comments start with a non-numeric character\n\
-\n\
-options (qhalf.htm):\n\
-    Hn,n - specify coordinates of interior point\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Tv   - verify result: structure, convexity, and redundancy\n\
-    .    - concise list of all options\n\
-    -    - one-line description of all options\n\
-\n\
-output options (subset):\n\
-    s    - summary of results (default)\n\
-    Fp   - intersection coordinates\n\
-    Fv   - non-redundant halfspaces incident to each intersection\n\
-    Fx   - non-redundant halfspaces\n\
-    o    - OFF file format (dual convex hull)\n\
-    G    - Geomview output (dual convex hull)\n\
-    m    - Mathematica output (dual convex hull)\n\
-    QVn  - print intersections for halfspace n, -n if not\n\
-    TO file - output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
-    rbox d | qconvex FQ n | qhalf s H0,0,0 Fp\n\
-    rbox c | qconvex FQ FV n | qhalf s i\n\
-    rbox c | qconvex FQ FV n | qhalf s o\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt3
-    concise prompt for qhull 
-*/  
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper_case options take an argument.\n\
-\n\
- incidences     Geomview       mathematica    OFF_format     point_dual\n\
- summary        facet_dump\n\
-\n\
- Fc_redundant   Fd_cdd_in      FF_dump_xridge FIDs           Fmerges\n\
- Fneighbors     FN_intersect   FOptions       Fp_coordinates FP_nearest\n\
- FQhalf         Fsummary       Fv_halfspace   Fx_non_redundant\n\
-\n\
- Gvertices      Gpoints        Gall_points    Gno_planes     Ginner\n\
- Gcentrums      Ghyperplanes   Gridges        Gouter         GDrop_dim\n\
-\n\
- PArea_keep     Pdrop d0:0D0   Pgood          PFacet_area_keep\n\
- PGood_neighbors PMerge_keep   Poutput_forced Pprecision_not\n\
-\n\
- Qbk:0Bk:0_drop Qcoplanar      QG_half_good   Qi_redundant   QJoggle\n\
- Qsearch_1st    Qtriangulate   QVertex_good\n\
-\n\
- T4_trace       Tcheck_often   Tstatistics    Tverify        Tz_stdout\n\
- TFacet_log     TInput_file    TPoint_trace   TMerge_trace   TOutput_file\n\
- TWide_trace    TVertex_stop   TCone_stop\n\
-\n\
- Angle_max      Centrum_size   Random_dist    Ucoplanar_max  Wide_outside\n\
-";
-
-/*---------------------------------
-  
-  main( argc, argv )
-    processes the command line, calls qhull() to do the work, and exits
-  
-  design:
-    initializes data structures
-    reads points
-    finishes initialization
-    computes convex hull and other structures
-    checks the result
-    writes the output
-    frees memory
-*/
-int main(int argc, char *argv[]) {
-  int curlong, totlong; /* used !qh_NOmem */
-  int exitcode, numpoints, dim;
-  coordT *points;
-  boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
-  char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
-  SIOUXSettings.showstatusline= false;
-  SIOUXSettings.tabspaces= 1;
-  SIOUXSettings.rows= 40;
-  if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0   /* w/o, SIOUX I/O is slow*/
-  || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
-  || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0)) 
-    fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
-  argc= ccommand(&argv);
-#endif
-
-  if ((argc == 1) && isatty( 0 /*stdin*/)) {      
-    fprintf(stdout, qh_prompt2, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompta, qh_VERSION, 
-        qh_promptb, qh_promptc, qh_promptd, qh_prompte);
-    exit(qh_ERRnone);
-  }
-  if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompt3, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  qh_init_A (stdin, stdout, stderr, argc, argv);  /* sets qh qhull_command */
-  exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
-  if (!exitcode) {
-    qh_option ("Halfspace", NULL, NULL);
-    qh HALFspace= True;    /* 'H'   */
-    qh_checkflags (qh qhull_command, hidden_options);
-    qh_initflags (qh qhull_command);
-    if (qh SCALEinput) {
-      fprintf(qh ferr, "\
-qhull error: options 'Qbk:n' and 'QBk:n' are not used with qhalf.\n\
-             Use 'Qbk:0Bk:0 to drop dimension k.\n");
-      qh_errexit(qh_ERRinput, NULL, NULL);
-    }
-    points= qh_readpoints (&numpoints, &dim, &ismalloc);
-    if (dim >= 5) {
-      qh_option ("Qxact_merge", NULL, NULL);
-      qh MERGEexact= True; /* 'Qx' always */
-    }
-    qh_init_B (points, numpoints, dim, ismalloc);
-    qh_qhull();
-    qh_check_output();
-    qh_produce_output();
-    if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points();
-    exitcode= qh_ERRnone;
-  }
-  qh NOerrexit= True;  /* no more setjmp */
-#ifdef qh_NOmem
-  qh_freeqhull( True);
-#else
-  qh_freeqhull( False);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong) 
-    fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-#endif
-  return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/qhull.c b/extern/qhull/src/qhull.c
deleted file mode 100644
index dc835bb4f28..00000000000
--- a/extern/qhull/src/qhull.c
+++ /dev/null
@@ -1,1395 +0,0 @@
-/*
  ---------------------------------
-
-   qhull.c
-   Quickhull algorithm for convex hulls
-
-   qhull() and top-level routines
-
-   see qh-qhull.htm, qhull.h, unix.c
-
-   see qhull_a.h for internal functions
-
-   copyright (c) 1993-2002 The Geometry Center        
-*/
-
-#include "qhull_a.h" 
-
-/*============= functions in alphabetic order after qhull() =======*/
-
-/*---------------------------------
-  
-  qh_qhull()
-    compute DIM3 convex hull of qh.num_points starting at qh.first_point
-    qh contains all global options and variables
-
-  returns:
-    returns polyhedron
-      qh.facet_list, qh.num_facets, qh.vertex_list, qh.num_vertices,
-    
-    returns global variables
-      qh.hulltime, qh.max_outside, qh.interior_point, qh.max_vertex, qh.min_vertex
-    
-    returns precision constants
-      qh.ANGLEround, centrum_radius, cos_max, DISTround, MAXabs_coord, ONEmerge
-
-  notes:
-    unless needed for output
-      qh.max_vertex and qh.min_vertex are max/min due to merges
-      
-  see:
-    to add individual points to either qh.num_points
-      use qh_addpoint()
-      
-    if qh.GETarea
-      qh_produceoutput() returns qh.totarea and qh.totvol via qh_getarea()
-
-  design:
-    record starting time
-    initialize hull and partition points
-    build convex hull
-    unless early termination
-      update facet->maxoutside for vertices, coplanar, and near-inside points
-    error if temporary sets exist
-    record end time
-*/
-void qh_qhull (void) {
-  int numoutside;
-
-  qh hulltime= qh_CPUclock;
-  if (qh RERUN || qh JOGGLEmax < REALmax/2) 
-    qh_build_withrestart();
-  else {
-    qh_initbuild();
-    qh_buildhull();
-  }
-  if (!qh STOPpoint && !qh STOPcone) {
-    if (qh ZEROall_ok && !qh TESTvneighbors && qh MERGEexact)
-      qh_checkzero( qh_ALL);
-    if (qh ZEROall_ok && !qh TESTvneighbors && !qh WAScoplanar) {
-      trace2((qh ferr, "qh_qhull: all facets are clearly convex and no coplanar points.  Post-merging and check of maxout not needed.\n"));
-      qh DOcheckmax= False;
-    }else {
-      if (qh MERGEexact || (qh hull_dim > qh_DIMreduceBuild && qh PREmerge))
-        qh_postmerge ("First post-merge", qh premerge_centrum, qh premerge_cos, 
-             (qh POSTmerge ? False : qh TESTvneighbors));
-      else if (!qh POSTmerge && qh TESTvneighbors) 
-        qh_postmerge ("For testing vertex neighbors", qh premerge_centrum,
-             qh premerge_cos, True); 
-      if (qh POSTmerge)
-        qh_postmerge ("For post-merging", qh postmerge_centrum, 
-             qh postmerge_cos, qh TESTvneighbors);
-      if (qh visible_list == qh facet_list) { /* i.e., merging done */
-        qh findbestnew= True;
-        qh_partitionvisible (/*visible_list, newfacet_list*/ !qh_ALL, &numoutside);
-        qh findbestnew= False;
-        qh_deletevisible (/*qh visible_list*/);
-        qh_resetlists (False, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
-      }
-    }
-    if (qh DOcheckmax){
-      if (qh REPORTfreq) {
-	qh_buildtracing (NULL, NULL); 
-	fprintf (qh ferr, "\nTesting all coplanar points.\n");
-      }
-      qh_check_maxout();
-    }
-    if (qh KEEPnearinside && !qh maxoutdone)  
-      qh_nearcoplanar();
-  }
-  if (qh_setsize ((setT*)qhmem.tempstack) != 0) {
-    fprintf (qh ferr, "qhull internal error (qh_qhull): temporary sets not empty (%d)\n",
-	     qh_setsize ((setT*)qhmem.tempstack));
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  qh hulltime= qh_CPUclock - qh hulltime;
-  qh QHULLfinished= True;
-  trace1((qh ferr, "qh_qhull: algorithm completed\n"));
-} /* qhull */
-
-/*---------------------------------
-  
-  qh_addpoint( furthest, facet, checkdist )
-    add point (usually furthest point) above facet to hull 
-    if checkdist, 
-      check that point is above facet.
-      if point is not outside of the hull, uses qh_partitioncoplanar()
-      assumes that facet is defined by qh_findbestfacet()
-    else if facet specified,
-      assumes that point is above facet (major damage if below)
-    for Delaunay triangulations, 
-      Use qh_setdelaunay() to lift point to paraboloid and scale by 'Qbb' if needed
-      Do not use options 'Qbk', 'QBk', or 'QbB' since they scale the coordinates. 
-
-  returns:
-    returns False if user requested an early termination
-     qh.visible_list, newfacet_list, delvertex_list, NEWfacets may be defined
-    updates qh.facet_list, qh.num_facets, qh.vertex_list, qh.num_vertices
-    clear qh.maxoutdone (will need to call qh_check_maxout() for facet->maxoutside)
-    if unknown point, adds a pointer to qh.other_points
-      do not deallocate the point's coordinates
-  
-  notes:
-    assumes point is near its best facet and not at a local minimum of a lens
-      distributions.  Use qh_findbestfacet to avoid this case.
-    uses qh.visible_list, qh.newfacet_list, qh.delvertex_list, qh.NEWfacets
-
-  see also:
-    qh_triangulate() -- triangulate non-simplicial facets
-
-  design:
-    check point in qh.first_point/.num_points
-    if checkdist
-      if point not above facet
-        partition coplanar point 
-        exit
-    exit if pre STOPpoint requested
-    find horizon and visible facets for point
-    make new facets for point to horizon
-    make hyperplanes for point
-    compute balance statistics
-    match neighboring new facets
-    update vertex neighbors and delete interior vertices
-    exit if STOPcone requested
-    merge non-convex new facets
-    if merge found, many merges, or 'Qf'
-       use qh_findbestnew() instead of qh_findbest()
-    partition outside points from visible facets
-    delete visible facets
-    check polyhedron if requested
-    exit if post STOPpoint requested
-    reset working lists of facets and vertices
-*/
-boolT qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist) {
-  int goodvisible, goodhorizon;
-  vertexT *vertex;
-  facetT *newfacet;
-  realT dist, newbalance, pbalance;
-  boolT isoutside= False;
-  int numpart, numpoints, numnew, firstnew;
-
-  qh maxoutdone= False;
-  if (qh_pointid (furthest) == -1)
-    qh_setappend (&qh other_points, furthest);
-  if (!facet) {
-    fprintf (qh ferr, "qh_addpoint: NULL facet.  Need to call qh_findbestfacet first\n");
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  if (checkdist) {
-    facet= qh_findbest (furthest, facet, !qh_ALL, !qh_ISnewfacets, !qh_NOupper,
-			&dist, &isoutside, &numpart);
-    zzadd_(Zpartition, numpart);
-    if (!isoutside) {
-      zinc_(Znotmax);  /* last point of outsideset is no longer furthest. */
-      facet->notfurthest= True;
-      qh_partitioncoplanar (furthest, facet, &dist);
-      return True;
-    }
-  }
-  qh_buildtracing (furthest, facet);
-  if (qh STOPpoint < 0 && qh furthest_id == -qh STOPpoint-1) {
-    facet->notfurthest= True;
-    return False;
-  }
-  qh_findhorizon (furthest, facet, &goodvisible, &goodhorizon); 
-  if (qh ONLYgood && !(goodvisible+goodhorizon) && !qh GOODclosest) {
-    zinc_(Znotgood);  
-    facet->notfurthest= True;
-    /* last point of outsideset is no longer furthest.  This is ok
-       since all points of the outside are likely to be bad */
-    qh_resetlists (False, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
-    return True;
-  }
-  zzinc_(Zprocessed);
-  firstnew= qh facet_id;
-  vertex= qh_makenewfacets (furthest /*visible_list, attaches if !ONLYgood */);
-  qh_makenewplanes (/* newfacet_list */);
-  numnew= qh facet_id - firstnew;
-  newbalance= numnew - (realT) (qh num_facets-qh num_visible)
-                         * qh hull_dim/qh num_vertices;
-  wadd_(Wnewbalance, newbalance);
-  wadd_(Wnewbalance2, newbalance * newbalance);
-  if (qh ONLYgood 
-  && !qh_findgood (qh newfacet_list, goodhorizon) && !qh GOODclosest) {
-    FORALLnew_facets 
-      qh_delfacet (newfacet);
-    qh_delvertex (vertex);
-    qh_resetlists (True, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
-    zinc_(Znotgoodnew);
-    facet->notfurthest= True;
-    return True;
-  }
-  if (qh ONLYgood)
-    qh_attachnewfacets(/*visible_list*/);
-  qh_matchnewfacets();
-  qh_updatevertices();
-  if (qh STOPcone && qh furthest_id == qh STOPcone-1) {
-    facet->notfurthest= True;
-    return False;  /* visible_list etc. still defined */
-  }
-  qh findbestnew= False;
-  if (qh PREmerge || qh MERGEexact) {
-    qh_premerge (vertex, qh premerge_centrum, qh premerge_cos);
-    if (qh_USEfindbestnew)
-      qh findbestnew= True;
-    else {
-      FORALLnew_facets {
-	if (!newfacet->simplicial) {
-	  qh findbestnew= True;  /* use qh_findbestnew instead of qh_findbest*/
-	  break;
-	}
-      }
-    }
-  }else if (qh BESToutside)
-    qh findbestnew= True;
-  qh_partitionvisible (/*visible_list, newfacet_list*/ !qh_ALL, &numpoints);
-  qh findbestnew= False;
-  qh findbest_notsharp= False;
-  zinc_(Zpbalance);
-  pbalance= numpoints - (realT) qh hull_dim /* assumes all points extreme */
-                * (qh num_points - qh num_vertices)/qh num_vertices;
-  wadd_(Wpbalance, pbalance);
-  wadd_(Wpbalance2, pbalance * pbalance);
-  qh_deletevisible (/*qh visible_list*/);
-  zmax_(Zmaxvertex, qh num_vertices);
-  qh NEWfacets= False;
-  if (qh IStracing >= 4) {
-    if (qh num_facets < 2000)
-      qh_printlists();
-    qh_printfacetlist (qh newfacet_list, NULL, True);
-    qh_checkpolygon (qh facet_list);
-  }else if (qh CHECKfrequently) {
-    if (qh num_facets < 50)
-      qh_checkpolygon (qh facet_list);
-    else
-      qh_checkpolygon (qh newfacet_list);
-  }
-  if (qh STOPpoint > 0 && qh furthest_id == qh STOPpoint-1) 
-    return False; 
-  qh_resetlists (True, qh_RESETvisible /*qh visible_list newvertex_list newfacet_list */);
-  /* qh_triangulate(); to test qh.TRInormals */
-  trace2((qh ferr, "qh_addpoint: added p%d new facets %d new balance %2.2g point balance %2.2g\n",
-    qh_pointid (furthest), numnew, newbalance, pbalance));
-  return True;
-} /* addpoint */
-
-/*---------------------------------
-  
-  qh_build_withrestart()
-    allow restarts due to qh.JOGGLEmax while calling qh_buildhull()
-    qh.FIRSTpoint/qh.NUMpoints is point array
-        it may be moved by qh_joggleinput()
-*/
-void qh_build_withrestart (void) {
-  int restart;
-
-  qh ALLOWrestart= True;
-  while (True) {
-    restart= setjmp (qh restartexit); /* simple statement for CRAY J916 */
-    if (restart) {       /* only from qh_precision() */
-      zzinc_(Zretry);
-      wmax_(Wretrymax, qh JOGGLEmax);
-      qh ERREXITcalled= False;
-      qh STOPcone= True; /* if break, prevents normal output */
-    }
-    if (!qh RERUN && qh JOGGLEmax < REALmax/2) {
-      if (qh build_cnt > qh_JOGGLEmaxretry) {
-	fprintf(qh ferr, "\n\
-qhull precision error: %d attempts to construct a convex hull\n\
-        with joggled input.  Increase joggle above 'QJ%2.2g'\n\
-	or modify qh_JOGGLE... parameters in user.h\n",
-	   qh build_cnt, qh JOGGLEmax);
-	qh_errexit (qh_ERRqhull, NULL, NULL);
-      }
-      if (qh build_cnt && !restart)
-	break;
-    }else if (qh build_cnt && qh build_cnt >= qh RERUN)
-      break;
-    qh STOPcone= False;
-    qh_freebuild (True);  /* first call is a nop */
-    qh build_cnt++;
-    if (!qh qhull_optionsiz)
-      qh qhull_optionsiz= strlen (qh qhull_options);
-    else { 
-      qh qhull_options [qh qhull_optionsiz]= '\0';
-      qh qhull_optionlen= 80;
-    }
-    qh_option("_run", &qh build_cnt, NULL);
-    if (qh build_cnt == qh RERUN) {
-      qh IStracing= qh TRACElastrun;  /* duplicated from qh_initqhull_globals */
-      if (qh TRACEpoint != -1 || qh TRACEdist < REALmax/2 || qh TRACEmerge) {
-        qh TRACElevel= (qh IStracing? qh IStracing : 3);
-        qh IStracing= 0;
-      }
-      qhmem.IStracing= qh IStracing;
-    }
-    if (qh JOGGLEmax < REALmax/2)
-      qh_joggleinput();
-    qh_initbuild();
-    qh_buildhull();
-    if (qh JOGGLEmax < REALmax/2 && !qh MERGING)
-      qh_checkconvex (qh facet_list, qh_ALGORITHMfault);
-  }
-  qh ALLOWrestart= False;
-} /* qh_build_withrestart */
-
-/*---------------------------------
-  
-  qh_buildhull()
-    construct a convex hull by adding outside points one at a time
-
-  returns:
-  
-  notes:
-    may be called multiple times
-    checks facet and vertex lists for incorrect flags
-    to recover from STOPcone, call qh_deletevisible and qh_resetlists
-
-  design:
-    check visible facet and newfacet flags
-    check newlist vertex flags and qh.STOPcone/STOPpoint
-    for each facet with a furthest outside point
-      add point to facet
-      exit if qh.STOPcone or qh.STOPpoint requested
-    if qh.NARROWhull for initial simplex
-      partition remaining outside points to coplanar sets
-*/
-void qh_buildhull(void) {
-  facetT *facet;
-  pointT *furthest;
-  vertexT *vertex;
-  int id;
-  
-  trace1((qh ferr, "qh_buildhull: start build hull\n"));
-  FORALLfacets {
-    if (facet->visible || facet->newfacet) {
-      fprintf (qh ferr, "qhull internal error (qh_buildhull): visible or new facet f%d in facet list\n",
-                   facet->id);    
-      qh_errexit (qh_ERRqhull, facet, NULL);
-    }
-  }
-  FORALLvertices {
-    if (vertex->newlist) {
-      fprintf (qh ferr, "qhull internal error (qh_buildhull): new vertex f%d in vertex list\n",
-                   vertex->id);
-      qh_errprint ("ERRONEOUS", NULL, NULL, NULL, vertex);
-      qh_errexit (qh_ERRqhull, NULL, NULL);
-    }
-    id= qh_pointid (vertex->point);
-    if ((qh STOPpoint>0 && id == qh STOPpoint-1) ||
-	(qh STOPpoint<0 && id == -qh STOPpoint-1) ||
-	(qh STOPcone>0 && id == qh STOPcone-1)) {
-      trace1((qh ferr,"qh_buildhull: stop point or cone P%d in initial hull\n", id));
-      return;
-    }
-  }
-  qh facet_next= qh facet_list;      /* advance facet when processed */
-  while ((furthest= qh_nextfurthest (&facet))) {
-    qh num_outside--;  /* if ONLYmax, furthest may not be outside */
-    if (!qh_addpoint (furthest, facet, qh ONLYmax))
-      break;
-  }
-  if (qh NARROWhull) /* move points from outsideset to coplanarset */
-    qh_outcoplanar( /* facet_list */ );
-  if (qh num_outside && !furthest) {
-    fprintf (qh ferr, "qhull internal error (qh_buildhull): %d outside points were never processed.\n", qh num_outside);
-    qh_errexit (qh_ERRqhull, NULL, NULL);
-  }
-  trace1((qh ferr, "qh_buildhull: completed the hull construction\n"));
-} /* buildhull */
-  
-
-/*---------------------------------
-  
-  qh_buildtracing( furthest, facet )
-    trace an iteration of qh_buildhull() for furthest point and facet
-    if !furthest, prints progress message
-
-  returns:
-    tracks progress with qh.lastreport
-    updates qh.furthest_id (-3 if furthest is NULL)
-    also resets visit_id, vertext_visit on wrap around
-
-  see:
-    qh_tracemerging()
-
-  design:
-    if !furthest
-      print progress message
-      exit
-    if 'TFn' iteration
-      print progress message
-    else if tracing
-      trace furthest point and facet
-    reset qh.visit_id and qh.vertex_visit if overflow may occur
-    set qh.furthest_id for tracing
-*/
-void qh_buildtracing (pointT *furthest, facetT *facet) {
-  realT dist= 0;
-  float cpu;
-  int total, furthestid;
-  time_t timedata;
-  struct tm *tp;
-  vertexT *vertex;
-
-  qh old_randomdist= qh RANDOMdist;
-  qh RANDOMdist= False;
-  if (!furthest) {
-    time (&timedata);
-    tp= localtime (&timedata);
-    cpu= qh_CPUclock - qh hulltime;
-    cpu /= qh_SECticks;
-    total= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
-    fprintf (qh ferr, "\n\
-At %02d:%02d:%02d & %2.5g CPU secs, qhull has created %d facets and merged %d.\n\
- The current hull contains %d facets and %d vertices.  Last point was p%d\n",
-      tp->tm_hour, tp->tm_min, tp->tm_sec, cpu, qh facet_id -1,
-      total, qh num_facets, qh num_vertices, qh furthest_id);
-    return;
-  }
-  furthestid= qh_pointid (furthest);
-  if (qh TRACEpoint == furthestid) {
-    qh IStracing= qh TRACElevel;
-    qhmem.IStracing= qh TRACElevel;
-  }else if (qh TRACEpoint != -1 && qh TRACEdist < REALmax/2) {
-    qh IStracing= 0;
-    qhmem.IStracing= 0;
-  }
-  if (qh REPORTfreq && (qh facet_id-1 > qh lastreport+qh REPORTfreq)) {
-    qh lastreport= qh facet_id-1;
-    time (&timedata);
-    tp= localtime (&timedata);
-    cpu= qh_CPUclock - qh hulltime;
-    cpu /= qh_SECticks;
-    total= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
-    zinc_(Zdistio);
-    qh_distplane (furthest, facet, &dist);
-    fprintf (qh ferr, "\n\
-At %02d:%02d:%02d & %2.5g CPU secs, qhull has created %d facets and merged %d.\n\
- The current hull contains %d facets and %d vertices.  There are %d\n\
- outside points.  Next is point p%d (v%d), %2.2g above f%d.\n",
-      tp->tm_hour, tp->tm_min, tp->tm_sec, cpu, qh facet_id -1,
-      total, qh num_facets, qh num_vertices, qh num_outside+1,
-      furthestid, qh vertex_id, dist, getid_(facet));
-  }else if (qh IStracing >=1) {
-    cpu= qh_CPUclock - qh hulltime;
-    cpu /= qh_SECticks;
-    qh_distplane (furthest, facet, &dist);
-    fprintf (qh ferr, "qh_addpoint: add p%d (v%d) to hull of %d facets (%2.2g above f%d) and %d outside at %4.4g CPU secs.  Previous was p%d.\n",
-      furthestid, qh vertex_id, qh num_facets, dist,
-      getid_(facet), qh num_outside+1, cpu, qh furthest_id);
-  }
-  if (qh visit_id > (unsigned) INT_MAX) {
-    qh visit_id= 0;
-    FORALLfacets
-      facet->visitid= qh visit_id;
-  }
-  if (qh vertex_visit > (unsigned) INT_MAX) {
-    qh vertex_visit= 0;
-    FORALLvertices
-      vertex->visitid= qh vertex_visit;
-  }
-  qh furthest_id= furthestid;
-  qh RANDOMdist= qh old_randomdist;
-} /* buildtracing */
-
-/*---------------------------------
-  
-  qh_errexit2( exitcode, facet, otherfacet )
-    return exitcode to system after an error
-    report two facets
-
-  returns:
-    assumes exitcode non-zero
-
-  see:
-    normally use qh_errexit() in user.c (reports a facet and a ridge)
-*/
-void qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet) {
-  
-  qh_errprint("ERRONEOUS", facet, otherfacet, NULL, NULL);
-  qh_errexit (exitcode, NULL, NULL);
-} /* errexit2 */
-
-
-/*---------------------------------
-  
-  qh_findhorizon( point, facet, goodvisible, goodhorizon )
-    given a visible facet, find the point's horizon and visible facets
-    for all facets, !facet-visible
-
-  returns:
-    returns qh.visible_list/num_visible with all visible facets 
-      marks visible facets with ->visible 
-    updates count of good visible and good horizon facets
-    updates qh.max_outside, qh.max_vertex, facet->maxoutside
-
-  see:
-    similar to qh_delpoint()
-
-  design:
-    move facet to qh.visible_list at end of qh.facet_list
-    for all visible facets
-     for each unvisited neighbor of a visible facet
-       compute distance of point to neighbor
-       if point above neighbor
-         move neighbor to end of qh.visible_list
-       else if point is coplanar with neighbor
-         update qh.max_outside, qh.max_vertex, neighbor->maxoutside
-         mark neighbor coplanar (will create a samecycle later)
-         update horizon statistics         
-*/
-void qh_findhorizon(pointT *point, facetT *facet, int *goodvisible, int *goodhorizon) {
-  facetT *neighbor, **neighborp, *visible;
-  int numhorizon= 0, coplanar= 0;
-  realT dist;
-  
-  trace1((qh ferr,"qh_findhorizon: find horizon for point p%d facet f%d\n",qh_pointid(point),facet->id));
-  *goodvisible= *goodhorizon= 0;
-  zinc_(Ztotvisible);
-  qh_removefacet(facet);  /* visible_list at end of qh facet_list */
-  qh_appendfacet(facet);
-  qh num_visible= 1;
-  if (facet->good)
-    (*goodvisible)++;
-  qh visible_list= facet;
-  facet->visible= True;
-  facet->f.replace= NULL;
-  if (qh IStracing >=4)
-    qh_errprint ("visible", facet, NULL, NULL, NULL);
-  qh visit_id++;
-  FORALLvisible_facets {
-    if (visible->tricoplanar && !qh TRInormals) {
-      fprintf (qh ferr, "qh_findhorizon: does not work for tricoplanar facets.  Use option 'Q11'\n");
-      qh_errexit (qh_ERRqhull, visible, NULL);
-    }
-    visible->visitid= qh visit_id;
-    FOREACHneighbor_(visible) {
-      if (neighbor->visitid == qh visit_id) 
-        continue;
-      neighbor->visitid= qh visit_id;
-      zzinc_(Znumvisibility);
-      qh_distplane(point, neighbor, &dist);
-      if (dist > qh MINvisible) {
-        zinc_(Ztotvisible);
-	qh_removefacet(neighbor);  /* append to end of qh visible_list */
-	qh_appendfacet(neighbor);
-	neighbor->visible= True;
-        neighbor->f.replace= NULL;
-	qh num_visible++;
-	if (neighbor->good)
-	  (*goodvisible)++;
-        if (qh IStracing >=4)
-          qh_errprint ("visible", neighbor, NULL, NULL, NULL);
-      }else {
- 	if (dist > - qh MAXcoplanar) {
-    	  neighbor->coplanar= True;
-          zzinc_(Zcoplanarhorizon);
-          qh_precision ("coplanar horizon");
-	  coplanar++;
-	  if (qh MERGING) {
-	    if (dist > 0) {
-	      maximize_(qh max_outside, dist);
-	      maximize_(qh max_vertex, dist);
-#if qh_MAXoutside
-	      maximize_(neighbor->maxoutside, dist);
-#endif
-	    }else
-	      minimize_(qh min_vertex, dist);  /* due to merge later */
-	  }
-      	  trace2((qh ferr, "qh_findhorizon: point p%d is coplanar to horizon f%d, dist=%2.7g < qh MINvisible (%2.7g)\n",
-	      qh_pointid(point), neighbor->id, dist, qh MINvisible));
-	}else
-    	  neighbor->coplanar= False;
-    	zinc_(Ztothorizon);
-        numhorizon++;
-	if (neighbor->good)
-	  (*goodhorizon)++;
-        if (qh IStracing >=4)
-          qh_errprint ("horizon", neighbor, NULL, NULL, NULL);
-      }
-    }
-  }
-  if (!numhorizon) {
-    qh_precision ("empty horizon");
-    fprintf(qh ferr, "qhull precision error (qh_findhorizon): empty horizon\n\
-Point p%d was above all facets.\n", qh_pointid(point));
-    qh_printfacetlist (qh facet_list, NULL, True);
-    qh_errexit(qh_ERRprec, NULL, NULL);
-  }
-  trace1((qh ferr, "qh_findhorizon: %d horizon facets (good %d), %d visible (good %d), %d coplanar\n", 
-       numhorizon, *goodhorizon, qh num_visible, *goodvisible, coplanar));
-  if (qh IStracing >= 4 && qh num_facets < 50) 
-    qh_printlists ();
-} /* findhorizon */
-
-/*---------------------------------
-  
-  qh_nextfurthest( visible )
-    returns next furthest point and visible facet for qh_addpoint()
-    starts search at qh.facet_next
-
-  returns:
-    removes furthest point from outside set
-    NULL if none available
-    advances qh.facet_next over facets with empty outside sets  
-
-  design:
-    for each facet from qh.facet_next
-      if empty outside set
-        advance qh.facet_next
-      else if qh.NARROWhull
-        determine furthest outside point
-        if furthest point is not outside
-          advance qh.facet_next (point will be coplanar)
-    remove furthest point from outside set
-*/
-pointT *qh_nextfurthest (facetT **visible) {
-  facetT *facet;
-  int size, index;
-  realT randr, dist;
-  pointT *furthest;
-
-  while ((facet= qh facet_next) != qh facet_tail) {
-    if (!facet->outsideset) {
-      qh facet_next= facet->next;
-      continue;
-    }
-    SETreturnsize_(facet->outsideset, size);
-    if (!size) {
-      qh_setfree (&facet->outsideset);
-      qh facet_next= facet->next;
-      continue;
-    }
-    if (qh NARROWhull) {
-      if (facet->notfurthest) 
-	qh_furthestout (facet);
-      furthest= (pointT*)qh_setlast (facet->outsideset);
-#if qh_COMPUTEfurthest
-      qh_distplane (furthest, facet, &dist);
-      zinc_(Zcomputefurthest);
-#else
-      dist= facet->furthestdist;
-#endif
-      if (dist < qh MINoutside) { /* remainder of outside set is coplanar for qh_outcoplanar */
-	qh facet_next= facet->next;
-	continue;
-      }
-    }
-    if (!qh RANDOMoutside && !qh VIRTUALmemory) {
-      if (qh PICKfurthest) {
-	qh_furthestnext (/* qh facet_list */);
-	facet= qh facet_next;
-      }
-      *visible= facet;
-      return ((pointT*)qh_setdellast (facet->outsideset));
-    }
-    if (qh RANDOMoutside) {
-      int outcoplanar = 0;
-      if (qh NARROWhull) {
-        FORALLfacets {
-	  if (facet == qh facet_next)
-	    break;
-	  if (facet->outsideset)
-  	    outcoplanar += qh_setsize( facet->outsideset);
-	}
-      }
-      randr= qh_RANDOMint;
-      randr= randr/(qh_RANDOMmax+1);
-      index= (int)floor((qh num_outside - outcoplanar) * randr);
-      FORALLfacet_(qh facet_next) {
-        if (facet->outsideset) {
-          SETreturnsize_(facet->outsideset, size);
-          if (!size)
-            qh_setfree (&facet->outsideset);
-          else if (size > index) {
-            *visible= facet;
-            return ((pointT*)qh_setdelnth (facet->outsideset, index));
-          }else
-            index -= size;
-        }
-      }
-      fprintf (qh ferr, "qhull internal error (qh_nextfurthest): num_outside %d is too low\nby at least %d, or a random real %g >= 1.0\n",
-              qh num_outside, index+1, randr);
-      qh_errexit (qh_ERRqhull, NULL, NULL);
-    }else { /* VIRTUALmemory */
-      facet= qh facet_tail->previous;
-      if (!(furthest= (pointT*)qh_setdellast(facet->outsideset))) {
-        if (facet->outsideset)
-          qh_setfree (&facet->outsideset);
-        qh_removefacet (facet);
-        qh_prependfacet (facet, &qh facet_list);
-        continue;
-      }
-      *visible= facet;
-      return furthest;
-    }
-  }
-  return NULL;
-} /* nextfurthest */
-
-/*---------------------------------
-  
-  qh_partitionall( vertices, points, numpoints )
-    partitions all points in points/numpoints to the outsidesets of facets
-    vertices= vertices in qh.facet_list (not partitioned)
-
-  returns:
-    builds facet->outsideset
-    does not partition qh.GOODpoint
-    if qh.ONLYgood && !qh.MERGING, 
-      does not partition qh.GOODvertex
-
-  notes:
-    faster if qh.facet_list sorted by anticipated size of outside set
-
-  design:
-    initialize pointset with all points
-    remove vertices from pointset
-    remove qh.GOODpointp from pointset (unless it's qh.STOPcone or qh.STOPpoint)
-    for all facets
-      for all remaining points in pointset
-        compute distance from point to facet
-        if point is outside facet
-          remove point from pointset (by not reappending)
-          update bestpoint
-          append point or old bestpoint to facet's outside set
-      append bestpoint to facet's outside set (furthest)
-    for all points remaining in pointset
-      partition point into facets' outside sets and coplanar sets
-*/
-void qh_partitionall(setT *vertices, pointT *points, int numpoints){
-  setT *pointset;
-  vertexT *vertex, **vertexp;
-  pointT *point, **pointp, *bestpoint;
-  int size, point_i, point_n, point_end, remaining, i, id;
-  facetT *facet;
-  realT bestdist= -REALmax, dist, distoutside;
-    
-  trace1((qh ferr, "qh_partitionall: partition all points into outside sets\n"));
-  pointset= qh_settemp (numpoints);
-  qh num_outside= 0;
-  pointp= SETaddr_(pointset, pointT);
-  for (i=numpoints, point= points; i--; point += qh hull_dim)
-    *(pointp++)= point;
-  qh_settruncate (pointset, numpoints);
-  FOREACHvertex_(vertices) {
-    if ((id= qh_pointid(vertex->point)) >= 0)
-      SETelem_(pointset, id)= NULL;
-  }
-  id= qh_pointid (qh GOODpointp);
-  if (id >=0 && qh STOPcone-1 != id && -qh STOPpoint-1 != id)
-    SETelem_(pointset, id)= NULL;
-  if (qh GOODvertexp && qh ONLYgood && !qh MERGING) { /* matches qhull()*/
-    if ((id= qh_pointid(qh GOODvertexp)) >= 0)
-      SETelem_(pointset, id)= NULL;
-  }
-  if (!qh BESToutside) {  /* matches conditional for qh_partitionpoint below */
-    distoutside= qh_DISToutside; /* multiple of qh.MINoutside & qh.max_outside, see user.h */
-    zval_(Ztotpartition)= qh num_points - qh hull_dim - 1; /*misses GOOD... */
-    remaining= qh num_facets;
-    point_end= numpoints;
-    FORALLfacets {
-      size= point_end/(remaining--) + 100;
-      facet->outsideset= qh_setnew (size);
-      bestpoint= NULL;
-      point_end= 0;
-      FOREACHpoint_i_(pointset) {
-        if (point) {
-          zzinc_(Zpartitionall);
-          qh_distplane (point, facet, &dist);
-          if (dist < distoutside)
-            SETelem_(pointset, point_end++)= point;
-          else {
-	    qh num_outside++;
-            if (!bestpoint) {
-              bestpoint= point;
-              bestdist= dist;
-            }else if (dist > bestdist) {
-              qh_setappend (&facet->outsideset, bestpoint);
-              bestpoint= point;
-              bestdist= dist;
-            }else 
-              qh_setappend (&facet->outsideset, point);
-          }
-        }
-      }
-      if (bestpoint) {
-        qh_setappend (&facet->outsideset, bestpoint);
-#if !qh_COMPUTEfurthest
-	facet->furthestdist= bestdist;
-#endif
-      }else
-        qh_setfree (&facet->outsideset);
-      qh_settruncate (pointset, point_end);
-    }
-  }
-  /* if !qh BESToutside, pointset contains points not assigned to outsideset */
-  if (qh BESToutside || qh MERGING || qh KEEPcoplanar || qh KEEPinside) {
-    qh findbestnew= True;
-    FOREACHpoint_i_(pointset) { 
-      if (point)
-        qh_partitionpoint(point, qh facet_list);
-    }
-    qh findbestnew= False;
-  }
-  zzadd_(Zpartitionall, zzval_(Zpartition));
-  zzval_(Zpartition)= 0;
-  qh_settempfree(&pointset);
-  if (qh IStracing >= 4)
-    qh_printfacetlist (qh facet_list, NULL, True);
-} /* partitionall */
-
-
-/*---------------------------------
-  
-  qh_partitioncoplanar( point, facet, dist )
-    partition coplanar point to a facet
-    dist is distance from point to facet
-    if dist NULL, 
-      searches for bestfacet and does nothing if inside
-    if qh.findbestnew set, 
-      searches new facets instead of using qh_findbest()
-
-  returns:
-    qh.max_ouside updated
-    if qh.KEEPcoplanar or qh.KEEPinside
-      point assigned to best coplanarset
-  
-  notes:
-    facet->maxoutside is updated at end by qh_check_maxout
-
-  design:
-    if dist undefined
-      find best facet for point
-      if point sufficiently below facet (depends on qh.NEARinside and qh.KEEPinside)
-        exit
-    if keeping coplanar/nearinside/inside points
-      if point is above furthest coplanar point
-        append point to coplanar set (it is the new furthest)
-        update qh.max_outside
-      else
-        append point one before end of coplanar set
-    else if point is clearly outside of qh.max_outside and bestfacet->coplanarset
-    and bestfacet is more than perpendicular to facet
-      repartition the point using qh_findbest() -- it may be put on an outsideset
-    else
-      update qh.max_outside
-*/
-void qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist) {
-  facetT *bestfacet;
-  pointT *oldfurthest;
-  realT bestdist, dist2, angle;
-  int numpart= 0, oldfindbest;
-  boolT isoutside;
-
-  qh WAScoplanar= True;
-  if (!dist) {
-    if (qh findbestnew)
-      bestfacet= qh_findbestnew (point, facet, &bestdist, qh_ALL, &isoutside, &numpart);
-    else
-      bestfacet= qh_findbest (point, facet, qh_ALL, !qh_ISnewfacets, qh DELAUNAY, 
-                          &bestdist, &isoutside, &numpart);
-    zinc_(Ztotpartcoplanar);
-    zzadd_(Zpartcoplanar, numpart);
-    if (!qh DELAUNAY && !qh KEEPinside) { /*  for 'd', bestdist skips upperDelaunay facets */
-      if (qh KEEPnearinside) {
-        if (bestdist < -qh NEARinside) { 
-          zinc_(Zcoplanarinside);
-	  trace4((qh ferr, "qh_partitioncoplanar: point p%d is more than near-inside facet f%d dist %2.2g findbestnew %d\n",
-		  qh_pointid(point), bestfacet->id, bestdist, qh findbestnew));
-          return;
-        }
-      }else if (bestdist < -qh MAXcoplanar) {
-	  trace4((qh ferr, "qh_partitioncoplanar: point p%d is inside facet f%d dist %2.2g findbestnew %d\n",
-		  qh_pointid(point), bestfacet->id, bestdist, qh findbestnew));
-        zinc_(Zcoplanarinside);
-        return;
-      }
-    }
-  }else {
-    bestfacet= facet;
-    bestdist= *dist;
-  }
-  if (bestdist > qh max_outside) {
-    if (!dist && facet != bestfacet) { 
-      zinc_(Zpartangle);
-      angle= qh_getangle(facet->normal, bestfacet->normal);
-      if (angle < 0) {
-	/* typically due to deleted vertex and coplanar facets, e.g.,
-	     RBOX 1000 s Z1 G1e-13 t1001185205 | QHULL Tv */
-	zinc_(Zpartflip);
-	trace2((qh ferr, "qh_partitioncoplanar: repartition point p%d from f%d.  It is above flipped facet f%d dist %2.2g\n",
-		qh_pointid(point), facet->id, bestfacet->id, bestdist));
-	oldfindbest= qh findbestnew;
-        qh findbestnew= False;
-	qh_partitionpoint(point, bestfacet);
-        qh findbestnew= oldfindbest;
-	return;
-      }
-    }
-    qh max_outside= bestdist;
-    if (bestdist > qh TRACEdist) {
-      fprintf (qh ferr, "qh_partitioncoplanar: ====== p%d from f%d increases max_outside to %2.2g of f%d last p%d\n",
-		     qh_pointid(point), facet->id, bestdist, bestfacet->id, qh furthest_id);
-      qh_errprint ("DISTANT", facet, bestfacet, NULL, NULL);
-    }
-  }
-  if (qh KEEPcoplanar + qh KEEPinside + qh KEEPnearinside) {
-    oldfurthest= (pointT*)qh_setlast (bestfacet->coplanarset);
-    if (oldfurthest) {
-      zinc_(Zcomputefurthest);
-      qh_distplane (oldfurthest, bestfacet, &dist2);
-    }
-    if (!oldfurthest || dist2 < bestdist) 
-      qh_setappend(&bestfacet->coplanarset, point);
-    else 
-      qh_setappend2ndlast(&bestfacet->coplanarset, point);
-  }
-  trace4((qh ferr, "qh_partitioncoplanar: point p%d is coplanar with facet f%d (or inside) dist %2.2g\n",
-	  qh_pointid(point), bestfacet->id, bestdist));
-} /* partitioncoplanar */
-
-/*---------------------------------
-  
-  qh_partitionpoint( point, facet )
-    assigns point to an outside set, coplanar set, or inside set (i.e., dropt)
-    if qh.findbestnew
-      uses qh_findbestnew() to search all new facets
-    else
-      uses qh_findbest()
-  
-  notes:
-    after qh_distplane(), this and qh_findbest() are most expensive in 3-d
-
-  design:
-    find best facet for point 
-      (either exhaustive search of new facets or directed search from facet)
-    if qh.NARROWhull
-      retain coplanar and nearinside points as outside points
-    if point is outside bestfacet
-      if point above furthest point for bestfacet
-        append point to outside set (it becomes the new furthest)
-        if outside set was empty
-          move bestfacet to end of qh.facet_list (i.e., after qh.facet_next)
-        update bestfacet->furthestdist
-      else
-        append point one before end of outside set
-    else if point is coplanar to bestfacet
-      if keeping coplanar points or need to update qh.max_outside
-        partition coplanar point into bestfacet
-    else if near-inside point        
-      partition as coplanar point into bestfacet
-    else is an inside point
-      if keeping inside points 
-        partition as coplanar point into bestfacet
-*/
-void qh_partitionpoint (pointT *point, facetT *facet) {
-  realT bestdist;
-  boolT isoutside;
-  facetT *bestfacet;
-  int numpart;
-#if qh_COMPUTEfurthest
-  realT dist;
-#endif
-
-  if (qh findbestnew)
-    bestfacet= qh_findbestnew (point, facet, &bestdist, qh BESToutside, &isoutside, &numpart);
-  else
-    bestfacet= qh_findbest (point, facet, qh BESToutside, qh_ISnewfacets, !qh_NOupper,
-			  &bestdist, &isoutside, &numpart);
-  zinc_(Ztotpartition);
-  zzadd_(Zpartition, numpart);
-  if (qh NARROWhull) {
-    if (qh DELAUNAY && !isoutside && bestdist >= -qh MAXcoplanar)
-      qh_precision ("nearly incident point (narrow hull)");
-    if (qh KEEPnearinside) {
-      if (bestdist >= -qh NEARinside)
-	isoutside= True;
-    }else if (bestdist >= -qh MAXcoplanar)
-      isoutside= True;
-  }
-
-  if (isoutside) {
-    if (!bestfacet->outsideset 
-    || !qh_setlast (bestfacet->outsideset)) {
-      qh_setappend(&(bestfacet->outsideset), point);
-      if (!bestfacet->newfacet) {
-        qh_removefacet (bestfacet);  /* make sure it's after qh facet_next */
-        qh_appendfacet (bestfacet);
-      }
-#if !qh_COMPUTEfurthest
-      bestfacet->furthestdist= bestdist;
-#endif
-    }else {
-#if qh_COMPUTEfurthest
-      zinc_(Zcomputefurthest);
-      qh_distplane (oldfurthest, bestfacet, &dist);
-      if (dist < bestdist) 
-	qh_setappend(&(bestfacet->outsideset), point);
-      else
-	qh_setappend2ndlast(&(bestfacet->outsideset), point);
-#else
-      if (bestfacet->furthestdist < bestdist) {
-	qh_setappend(&(bestfacet->outsideset), point);
-	bestfacet->furthestdist= bestdist;
-      }else
-	qh_setappend2ndlast(&(bestfacet->outsideset), point);
-#endif
-    }
-    qh num_outside++;
-    trace4((qh ferr, "qh_partitionpoint: point p%d is outside facet f%d new? %d(or narrowhull)\n",
-	  qh_pointid(point), bestfacet->id, bestfacet->newfacet));
-  }else if (qh DELAUNAY || bestdist >= -qh MAXcoplanar) { /* for 'd', bestdist skips upperDelaunay facets */
-    zzinc_(Zcoplanarpart);
-    if (qh DELAUNAY)
-      qh_precision ("nearly incident point");
-    if ((qh KEEPcoplanar + qh KEEPnearinside) || bestdist > qh max_outside) 
-      qh_partitioncoplanar (point, bestfacet, &bestdist);
-    else {
-      trace4((qh ferr, "qh_partitionpoint: point p%d is coplanar to facet f%d (dropped)\n",
-	  qh_pointid(point), bestfacet->id));
-    }
-  }else if (qh KEEPnearinside && bestdist > -qh NEARinside) {
-    zinc_(Zpartnear);
-    qh_partitioncoplanar (point, bestfacet, &bestdist);
-  }else {
-    zinc_(Zpartinside);
-    trace4((qh ferr, "qh_partitionpoint: point p%d is inside all facets, closest to f%d dist %2.2g\n",
-	  qh_pointid(point), bestfacet->id, bestdist));
-    if (qh KEEPinside)
-      qh_partitioncoplanar (point, bestfacet, &bestdist);
-  }
-} /* partitionpoint */
-
-/*---------------------------------
-  
-  qh_partitionvisible( allpoints, numoutside )
-    partitions points in visible facets to qh.newfacet_list
-    qh.visible_list= visible facets
-    for visible facets
-      1st neighbor (if any) points to a horizon facet or a new facet
-    if allpoints (not used),
-      repartitions coplanar points
-
-  returns:
-    updates outside sets and coplanar sets of qh.newfacet_list
-    updates qh.num_outside (count of outside points)
-  
-  notes:
-    qh.findbest_notsharp should be clear (extra work if set)
-
-  design:
-    for all visible facets with outside set or coplanar set
-      select a newfacet for visible facet
-      if outside set
-        partition outside set into new facets
-      if coplanar set and keeping coplanar/near-inside/inside points
-        if allpoints
-          partition coplanar set into new facets, may be assigned outside
-        else
-          partition coplanar set into coplanar sets of new facets
-    for each deleted vertex
-      if allpoints
-        partition vertex into new facets, may be assigned outside
-      else
-        partition vertex into coplanar sets of new facets
-*/
-void qh_partitionvisible(/*visible_list*/ boolT allpoints, int *numoutside) {
-  facetT *visible, *newfacet;
-  pointT *point, **pointp;
-  int coplanar=0, size;
-  unsigned count;
-  vertexT *vertex, **vertexp;
-  
-  if (qh ONLYmax)
-    maximize_(qh MINoutside, qh max_vertex);
-  *numoutside= 0;
-  FORALLvisible_facets {
-    if (!visible->outsideset && !visible->coplanarset)
-      continue;
-    newfacet= visible->f.replace;
-    count= 0;
-    while (newfacet && newfacet->visible) {
-      newfacet= newfacet->f.replace;
-      if (count++ > qh facet_id)
-	qh_infiniteloop (visible);
-    }
-    if (!newfacet)
-      newfacet= qh newfacet_list;
-    if (newfacet == qh facet_tail) {
-      fprintf (qh ferr, "qhull precision error (qh_partitionvisible): all new facets deleted as\n        degenerate facets. Can not continue.\n");
-      qh_errexit (qh_ERRprec, NULL, NULL);
-    }
-    if (visible->outsideset) {
-      size= qh_setsize (visible->outsideset);
-      *numoutside += size;
-      qh num_outside -= size;
-      FOREACHpoint_(visible->outsideset) 
-        qh_partitionpoint (point, newfacet);
-    }
-    if (visible->coplanarset && (qh KEEPcoplanar + qh KEEPinside + qh KEEPnearinside)) {
-      size= qh_setsize (visible->coplanarset);
-      coplanar += size;
-      FOREACHpoint_(visible->coplanarset) {
-        if (allpoints) /* not used */
-          qh_partitionpoint (point, newfacet);
-        else
-          qh_partitioncoplanar (point, newfacet, NULL);
-      }
-    }
-  }
-  FOREACHvertex_(qh del_vertices) {
-    if (vertex->point) {
-      if (allpoints) /* not used */
-        qh_partitionpoint (vertex->point, qh newfacet_list);
-      else
-        qh_partitioncoplanar (vertex->point, qh newfacet_list, NULL);
-    }
-  }
-  trace1((qh ferr,"qh_partitionvisible: partitioned %d points from outsidesets and %d points from coplanarsets\n", *numoutside, coplanar));
-} /* partitionvisible */
-
-
-
-/*---------------------------------
-  
-  qh_precision( reason )
-    restart on precision errors if not merging and if 'QJn'
-*/
-void qh_precision (char *reason) {
-
-  if (qh ALLOWrestart && !qh PREmerge && !qh MERGEexact) {
-    if (qh JOGGLEmax < REALmax/2) {
-      trace0((qh ferr, "qh_precision: qhull restart because of %s\n", reason));
-      longjmp(qh restartexit, qh_ERRprec);
-    }
-  }
-} /* qh_precision */
-
-/*---------------------------------
-  
-  qh_printsummary( fp )
-    prints summary to fp
-
-  notes:
-    not in io.c so that user_eg.c can prevent io.c from loading
-    qh_printsummary and qh_countfacets must match counts
-
-  design:
-    determine number of points, vertices, and coplanar points
-    print summary
-*/
-void qh_printsummary(FILE *fp) {
-  realT ratio, outerplane, innerplane;
-  float cpu;
-  int size, id, nummerged, numvertices, numcoplanars= 0, nonsimplicial=0;
-  int goodused;
-  facetT *facet;
-  char *s;
-  int numdel= zzval_(Zdelvertextot);
-  int numtricoplanars= 0;
-
-  size= qh num_points + qh_setsize (qh other_points);
-  numvertices= qh num_vertices - qh_setsize (qh del_vertices);
-  id= qh_pointid (qh GOODpointp);
-  FORALLfacets {
-    if (facet->coplanarset)
-      numcoplanars += qh_setsize( facet->coplanarset);
-    if (facet->good) {
-      if (facet->simplicial) {
-	if (facet->keepcentrum && facet->tricoplanar)
-	  numtricoplanars++;
-      }else if (qh_setsize(facet->vertices) != qh hull_dim)
-	nonsimplicial++;
-    }
-  }
-  if (id >=0 && qh STOPcone-1 != id && -qh STOPpoint-1 != id)
-    size--;
-  if (qh STOPcone || qh STOPpoint)
-      fprintf (fp, "\nAt a premature exit due to 'TVn', 'TCn', 'TRn', or precision error.");
-  if (qh UPPERdelaunay)
-    goodused= qh GOODvertex + qh GOODpoint + qh SPLITthresholds;
-  else if (qh DELAUNAY)
-    goodused= qh GOODvertex + qh GOODpoint + qh GOODthreshold;
-  else
-    goodused= qh num_good;
-  nummerged= zzval_(Ztotmerge) - zzval_(Zcyclehorizon) + zzval_(Zcyclefacettot);
-  if (qh VORONOI) {
-    if (qh UPPERdelaunay)
-      fprintf (fp, "\n\
-Furthest-site Voronoi vertices by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
-    else
-      fprintf (fp, "\n\
-Voronoi diagram by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
-    fprintf(fp, "  Number of Voronoi regions%s: %d\n",
-              qh ATinfinity ? " and at-infinity" : "", numvertices);
-    if (numdel)
-      fprintf(fp, "  Total number of deleted points due to merging: %d\n", numdel); 
-    if (numcoplanars - numdel > 0) 
-      fprintf(fp, "  Number of nearly incident points: %d\n", numcoplanars - numdel); 
-    else if (size - numvertices - numdel > 0) 
-      fprintf(fp, "  Total number of nearly incident points: %d\n", size - numvertices - numdel); 
-    fprintf(fp, "  Number of%s Voronoi vertices: %d\n", 
-              goodused ? " 'good'" : "", qh num_good);
-    if (nonsimplicial) 
-      fprintf(fp, "  Number of%s non-simplicial Voronoi vertices: %d\n", 
-              goodused ? " 'good'" : "", nonsimplicial);
-  }else if (qh DELAUNAY) {
-    if (qh UPPERdelaunay)
-      fprintf (fp, "\n\
-Furthest-site Delaunay triangulation by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
-    else
-      fprintf (fp, "\n\
-Delaunay triangulation by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
-    fprintf(fp, "  Number of input sites%s: %d\n", 
-              qh ATinfinity ? " and at-infinity" : "", numvertices);
-    if (numdel)
-      fprintf(fp, "  Total number of deleted points due to merging: %d\n", numdel); 
-    if (numcoplanars - numdel > 0) 
-      fprintf(fp, "  Number of nearly incident points: %d\n", numcoplanars - numdel); 
-    else if (size - numvertices - numdel > 0)
-      fprintf(fp, "  Total number of nearly incident points: %d\n", size - numvertices - numdel); 
-    fprintf(fp, "  Number of%s Delaunay regions: %d\n", 
-              goodused ? " 'good'" : "", qh num_good);
-    if (nonsimplicial) 
-      fprintf(fp, "  Number of%s non-simplicial Delaunay regions: %d\n", 
-              goodused ? " 'good'" : "", nonsimplicial);
-  }else if (qh HALFspace) {
-    fprintf (fp, "\n\
-Halfspace intersection by the convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
-    fprintf(fp, "  Number of halfspaces: %d\n", size);
-    fprintf(fp, "  Number of non-redundant halfspaces: %d\n", numvertices);
-    if (numcoplanars) {
-      if (qh KEEPinside && qh KEEPcoplanar)
-      	s= "similar and redundant";
-      else if (qh KEEPinside)
-        s= "redundant";
-      else
-        s= "similar"; 
-      fprintf(fp, "  Number of %s halfspaces: %d\n", s, numcoplanars);
-    } 
-    fprintf(fp, "  Number of intersection points: %d\n", qh num_facets - qh num_visible);
-    if (goodused)
-      fprintf(fp, "  Number of 'good' intersection points: %d\n", qh num_good);
-    if (nonsimplicial) 
-      fprintf(fp, "  Number of%s non-simplicial intersection points: %d\n", 
-              goodused ? " 'good'" : "", nonsimplicial);
-  }else {
-    fprintf (fp, "\n\
-Convex hull of %d points in %d-d:\n\n", size, qh hull_dim);
-    fprintf(fp, "  Number of vertices: %d\n", numvertices);
-    if (numcoplanars) {
-      if (qh KEEPinside && qh KEEPcoplanar)
-      	s= "coplanar and interior";
-      else if (qh KEEPinside)
-        s= "interior";
-      else
-        s= "coplanar"; 
-      fprintf(fp, "  Number of %s points: %d\n", s, numcoplanars);
-    } 
-    fprintf(fp, "  Number of facets: %d\n", qh num_facets - qh num_visible);
-    if (goodused)
-      fprintf(fp, "  Number of 'good' facets: %d\n", qh num_good);
-    if (nonsimplicial) 
-      fprintf(fp, "  Number of%s non-simplicial facets: %d\n", 
-              goodused ? " 'good'" : "", nonsimplicial);
-  }
-  if (numtricoplanars)
-      fprintf(fp, "  Number of triangulated facets: %d\n", numtricoplanars);
-  fprintf(fp, "\nStatistics for: %s | %s", 
-                      qh rbox_command, qh qhull_command);
-  if (qh ROTATErandom != INT_MIN)
-    fprintf(fp, " QR%d\n\n", qh ROTATErandom);
-  else
-    fprintf(fp, "\n\n");
-  fprintf(fp, "  Number of points processed: %d\n", zzval_(Zprocessed));
-  fprintf(fp, "  Number of hyperplanes created: %d\n", zzval_(Zsetplane));
-  if (qh DELAUNAY)
-    fprintf(fp, "  Number of facets in hull: %d\n", qh num_facets - qh num_visible);
-  fprintf(fp, "  Number of distance tests for qhull: %d\n", zzval_(Zpartition)+
-      zzval_(Zpartitionall)+zzval_(Znumvisibility)+zzval_(Zpartcoplanar));
-#if 0  /* NOTE: must print before printstatistics() */
-  {realT stddev, ave;
-  fprintf(fp, "  average new facet balance: %2.2g\n",
-	  wval_(Wnewbalance)/zval_(Zprocessed));
-  stddev= qh_stddev (zval_(Zprocessed), wval_(Wnewbalance), 
-                                 wval_(Wnewbalance2), &ave);
-  fprintf(fp, "  new facet standard deviation: %2.2g\n", stddev);
-  fprintf(fp, "  average partition balance: %2.2g\n",
-	  wval_(Wpbalance)/zval_(Zpbalance));
-  stddev= qh_stddev (zval_(Zpbalance), wval_(Wpbalance), 
-                                 wval_(Wpbalance2), &ave);
-  fprintf(fp, "  partition standard deviation: %2.2g\n", stddev);
-  }
-#endif
-  if (nummerged) {
-    fprintf(fp,"  Number of distance tests for merging: %d\n",zzval_(Zbestdist)+
-          zzval_(Zcentrumtests)+zzval_(Zdistconvex)+zzval_(Zdistcheck)+
-          zzval_(Zdistzero));
-    fprintf(fp,"  Number of distance tests for checking: %d\n",zzval_(Zcheckpart));
-    fprintf(fp,"  Number of merged facets: %d\n", nummerged);
-  }
-  if (!qh RANDOMoutside && qh QHULLfinished) {
-    cpu= qh hulltime;
-    cpu /= qh_SECticks;
-    wval_(Wcpu)= cpu;
-    fprintf (fp, "  CPU seconds to compute hull (after input): %2.4g\n", cpu);
-  }
-  if (qh RERUN) {
-    if (!qh PREmerge && !qh MERGEexact)
-      fprintf(fp, "  Percentage of runs with precision errors: %4.1f\n",
-	   zzval_(Zretry)*100.0/qh build_cnt);  /* careful of order */
-  }else if (qh JOGGLEmax < REALmax/2) {
-    if (zzval_(Zretry))
-      fprintf(fp, "  After %d retries, input joggled by: %2.2g\n",
-         zzval_(Zretry), qh JOGGLEmax);
-    else
-      fprintf(fp, "  Input joggled by: %2.2g\n", qh JOGGLEmax);
-  }
-  if (qh totarea != 0.0) 
-    fprintf(fp, "  %s facet area:   %2.8g\n", 
-	    zzval_(Ztotmerge) ? "Approximate" : "Total", qh totarea);
-  if (qh totvol != 0.0) 
-    fprintf(fp, "  %s volume:       %2.8g\n", 
-	    zzval_(Ztotmerge) ? "Approximate" : "Total", qh totvol);
-  if (qh MERGING) {
-    qh_outerinner (NULL, &outerplane, &innerplane);
-    if (outerplane > 2 * qh DISTround) {
-      fprintf(fp, "  Maximum distance of %spoint above facet: %2.2g", 
-	    (qh QHULLfinished ? "" : "merged "), outerplane);
-      ratio= outerplane/(qh ONEmerge + qh DISTround);
-      /* don't report ratio if MINoutside is large */
-      if (ratio > 0.05 && 2* qh ONEmerge > qh MINoutside && qh JOGGLEmax > REALmax/2)
-        fprintf (fp, " (%.1fx)\n", ratio);
-      else
-        fprintf (fp, "\n");
-    }
-    if (innerplane < -2 * qh DISTround) {
-      fprintf(fp, "  Maximum distance of %svertex below facet: %2.2g", 
-	    (qh QHULLfinished ? "" : "merged "), innerplane);
-      ratio= -innerplane/(qh ONEmerge+qh DISTround);
-      if (ratio > 0.05 && qh JOGGLEmax > REALmax/2)
-        fprintf (fp, " (%.1fx)\n", ratio);
-      else
-        fprintf (fp, "\n");
-    }
-  }
-  fprintf(fp, "\n");
-} /* printsummary */
-
-
diff --git a/extern/qhull/src/qhull.h b/extern/qhull/src/qhull.h
deleted file mode 100644
index 896ec1e9c18..00000000000
--- a/extern/qhull/src/qhull.h
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*
  ---------------------------------
-
-   qhull.h
-   user-level header file for using qhull.a library
-
-   see qh-qhull.htm, qhull_a.h
-
-   copyright (c) 1993-2002, The Geometry Center
-
-   NOTE: access to qh_qh is via the 'qh' macro.  This allows
-   qh_qh to be either a pointer or a structure.  An example
-   of using qh is "qh DROPdim" which accesses the DROPdim
-   field of qh_qh.  Similarly, access to qh_qhstat is via
-   the 'qhstat' macro.
-
-   includes function prototypes for qhull.c, geom.c, global.c, io.c, user.c
-
-   use mem.h for mem.c
-   use qset.h for qset.c
-
-   see unix.c for an example of using qhull.h
-
-   recompile qhull if you change this file
-*/
-
-#ifndef qhDEFqhull
-#define qhDEFqhull 1
-
-/*=========================== -included files ==============*/
-
-#include 
-#include 
-#include 
-
-#if __MWERKS__ && __POWERPC__
-#include  
-#include  
-#include	
-#endif
-
-#ifndef __STDC__
-#ifndef __cplusplus
-#if     !_MSC_VER
-#error  Neither __STDC__ nor __cplusplus is defined.  Please use strict ANSI C or C++ to compile
-#error  Qhull.  You may need to turn off compiler extensions in your project configuration.  If
-#error  your compiler is a standard C compiler, you can delete this warning from qhull.h
-#endif
-#endif
-#endif
-
-#include "user.h"      /* user defineable constants */
-
-/*============ constants and basic types ====================*/
-
-/*----------------------------------
-
-  qh_VERSION
-    version string by year and date
-
-    the revision increases on code changes only
-
-  notes:
-    change date:    Changes.txt, Announce.txt, README.txt, qhull.man
-                    qhull-news.html, Eudora signatures, 
-    change version: README.txt, qhull.html, file_id.diz, Makefile
-    change year:    Copying.txt
-    check download size
-    recompile user_eg.c, rbox.c, qhull.c, qconvex.c, qdelaun.c qvoronoi.c, qhalf.c
-    make copy of qhull-news.html as qh-news.htm
-*/
-
-#define qh_VERSION "2002.1 2002/8/20"
-
-/*----------------------------------
-
-  coordT
-    coordinates and coefficients are stored as realT (i.e., double)
-
-  notes:
-    could use 'float' for data and 'double' for calculations (realT vs. coordT)
-      This requires many type casts, and adjusted error bounds.
-      Also C compilers may do expressions in double anyway.
-*/
-#define coordT realT
-
-/*----------------------------------
-
-  pointT
-    a point is an array of DIM3 coordinates
-*/
-#define pointT coordT
-
-/*----------------------------------
-
-  flagT
-    Boolean flag as a bit
-*/
-#define flagT unsigned int
-
-/*----------------------------------
-
-  boolT
-    boolean value, either True or False
-
-  notes:
-    needed for portability
-*/
-#define boolT unsigned int
-#ifdef False
-#undef False
-#endif
-#ifdef True
-#undef True
-#endif
-#define False 0
-#define True 1
-
-/*----------------------------------
-
-  qh_CENTER
-    to distinguish facet->center
-*/
-typedef enum
-{
-    qh_ASnone = 0, qh_ASvoronoi, qh_AScentrum
-}
-qh_CENTER;
-
-/*----------------------------------
-
-  qh_PRINT
-    output formats for printing (qh.PRINTout).
-    'Fa' 'FV' 'Fc' 'FC' 
-       
-
-   notes:
-   some of these names are similar to qh names.  The similar names are only
-   used in switch statements in qh_printbegin() etc.
-*/
-typedef enum {qh_PRINTnone= 0, 
-  qh_PRINTarea, qh_PRINTaverage,           /* 'Fa' 'FV' 'Fc' 'FC' */
-  qh_PRINTcoplanars, qh_PRINTcentrums, 
-  qh_PRINTfacets, qh_PRINTfacets_xridge,   /* 'f' 'FF' 'G' 'FI' 'Fi' 'Fn' */
-  qh_PRINTgeom, qh_PRINTids, qh_PRINTinner, qh_PRINTneighbors, 
-  qh_PRINTnormals, qh_PRINTouter,          /* 'n' 'Fo' 'i' 'm' 'Fm' 'o' */
-  qh_PRINTincidences, qh_PRINTmathematica, qh_PRINTmerges, qh_PRINToff, 
-  qh_PRINToptions, qh_PRINTpointintersect, /* 'FO' 'Fp' 'FP' 'p' 'FQ' 'FS' */
-  qh_PRINTpointnearest, qh_PRINTpoints, qh_PRINTqhull, qh_PRINTsize, 
-  qh_PRINTsummary, qh_PRINTtriangles,      /* 'Fs' 'Ft' 'Fv' 'FN' 'Fx' */
-  qh_PRINTvertices, qh_PRINTvneighbors, qh_PRINTextremes,
-  qh_PRINTEND} qh_PRINT;
-
-/*----------------------------------
-
-  qh_ALL
-    argument flag for selecting everything
-*/
-#define qh_ALL      True
-#define qh_NOupper  True     /* argument for qh_findbest */
-#define qh_IScheckmax  True     /* argument for qh_findbesthorizon */
-#define qh_ISnewfacets  True     /* argument for qh_findbest */
-#define qh_RESETvisible  True     /* argument for qh_resetlists */
-
-/*----------------------------------
-
-  qh_ERR
-    Qhull exit codes, for indicating errors
-*/
-#define qh_ERRnone  0    /* no error occurred during qhull */
-#define qh_ERRinput 1    /* input inconsistency */
-#define qh_ERRsingular 2 /* singular input data */
-#define qh_ERRprec  3    /* precision error */
-#define qh_ERRmem   4    /* insufficient memory, matches mem.h */
-#define qh_ERRqhull 5    /* internal error detected, matches mem.h */
-
-/* ============ -structures- ====================
-   each of the following structures is defined by a typedef
-   all realT and coordT fields occur at the beginning of a structure
-        (otherwise space may be wasted due to alignment)
-   define all flags together and pack into 32-bit number
-*/
-
-typedef struct vertexT vertexT;
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT;          /* defined in qset.h */
-#endif
-
-/*----------------------------------
-
-  facetT
-    defines a facet
-
-  notes:
-   qhull() generates the hull as a list of facets.
-
-  topological information:
-    f.previous,next     doubly-linked list of facets
-    f.vertices          set of vertices
-    f.ridges            set of ridges
-    f.neighbors         set of neighbors
-    f.toporient         True if facet has top-orientation (else bottom)
-
-  geometric information:
-    f.offset,normal     hyperplane equation
-    f.maxoutside        offset to outer plane -- all points inside
-    f.center            centrum for testing convexity
-    f.simplicial        True if facet is simplicial
-    f.flipped           True if facet does not include qh.interior_point
-
-  for constructing hull:
-    f.visible           True if facet on list of visible facets (will be deleted)
-    f.newfacet          True if facet on list of newly created facets
-    f.coplanarset       set of points coplanar with this facet
-                        (includes near-inside points for later testing)
-    f.outsideset        set of points outside of this facet
-    f.furthestdist      distance to furthest point of outside set
-    f.visitid           marks visited facets during a loop
-    f.replace           replacement facet for to-be-deleted, visible facets
-    f.samecycle,newcycle cycle of facets for merging into horizon facet
-
-  see below for other flags and fields
-*/
-struct facetT {
-#if !qh_COMPUTEfurthest
-  coordT   furthestdist;/* distance to furthest point of outsideset */
-#endif
-#if qh_MAXoutside
-  coordT   maxoutside;  /* max computed distance of point to facet
-  			Before QHULLfinished this is an approximation
-  			since maxdist not always set for mergefacet
-			Actual outer plane is +DISTround and
-			computed outer plane is +2*DISTround */
-#endif
-  coordT   offset;      /* exact offset of hyperplane from origin */
-  coordT  *normal;      /* normal of hyperplane, hull_dim coefficients */
-			/*   if tricoplanar, shared with a neighbor */
-  union {               /* in order of testing */
-   realT   area;        /* area of facet, only in io.c if  ->isarea */
-   facetT *replace;	/*  replacement facet if ->visible and NEWfacets
-  			     is NULL only if qh_mergedegen_redundant or interior */
-   facetT *samecycle;   /*  cycle of facets from the same visible/horizon intersection,
-   			     if ->newfacet */
-   facetT *newcycle;    /*  in horizon facet, current samecycle of new facets */ 
-   facetT *trivisible;  /* visible facet for ->tricoplanar facets during qh_triangulate() */
-   facetT *triowner;    /* owner facet for ->tricoplanar, !isarea facets w/ ->keepcentrum */
-  }f;
-  coordT  *center;      /*  centrum for convexity, qh CENTERtype == qh_AScentrum */
-      			/*  Voronoi center, qh CENTERtype == qh_ASvoronoi */
-			/*   if tricoplanar, shared with a neighbor */
-  facetT  *previous;    /* previous facet in the facet_list */
-  facetT  *next;        /* next facet in the facet_list */
-  setT    *vertices;    /* vertices for this facet, inverse sorted by ID 
-                           if simplicial, 1st vertex was apex/furthest */
-  setT    *ridges;      /* explicit ridges for nonsimplicial facets.
-  			   for simplicial facets, neighbors defines ridge */
-  setT    *neighbors;   /* neighbors of the facet.  If simplicial, the kth
-			   neighbor is opposite the kth vertex, and the first
-			   neighbor is the horizon facet for the first vertex*/
-  setT    *outsideset;  /* set of points outside this facet
-		           if non-empty, last point is furthest
-			   if NARROWhull, includes coplanars for partitioning*/
-  setT    *coplanarset; /* set of points coplanar with this facet
-  			   > qh.min_vertex and <= facet->max_outside
-                           a point is assigned to the furthest facet
-		           if non-empty, last point is furthest away */
-  unsigned visitid;     /* visit_id, for visiting all neighbors,
-			   all uses are independent */
-  unsigned id;	        /* unique identifier from qh facet_id */
-  unsigned nummerge:9;  /* number of merges */
-#define qh_MAXnummerge 511 /*     2^9-1, 32 flags total, see "flags:" in io.c */
-  flagT    tricoplanar:1; /* True if TRIangulate and simplicial and coplanar with a neighbor */
-			  /*   all tricoplanars share the same ->center, ->normal, ->offset, ->maxoutside */
-			  /*   all tricoplanars share the same apex */
-                          /*   if ->degenerate, does not span facet (one logical ridge) */
-                          /*   one tricoplanar has ->keepcentrum and ->coplanarset */
-                          /*   during qh_triangulate, f.trivisible points to original facet */
-  flagT	   newfacet:1;  /* True if facet on qh newfacet_list (new or merged) */
-  flagT	   visible:1;   /* True if visible facet (will be deleted) */
-  flagT    toporient:1; /* True if created with top orientation
-			   after merging, use ridge orientation */
-  flagT    simplicial:1;/* True if simplicial facet, ->ridges may be implicit */
-  flagT    seen:1;      /* used to perform operations only once, like visitid */
-  flagT    seen2:1;     /* used to perform operations only once, like visitid */
-  flagT	   flipped:1;   /* True if facet is flipped */
-  flagT    upperdelaunay:1; /* True if facet is upper envelope of Delaunay triangulation */
-  flagT    notfurthest:1; /* True if last point of outsideset is not furthest*/
-
-/*-------- flags primarily for output ---------*/
-  flagT	   good:1;      /* True if a facet marked good for output */
-  flagT    isarea:1;    /* True if facet->f.area is defined */
-
-/*-------- flags for merging ------------------*/
-  flagT    dupridge:1;  /* True if duplicate ridge in facet */
-  flagT    mergeridge:1; /* True if facet or neighbor contains a qh_MERGEridge
-                            ->normal defined (also defined for mergeridge2) */
-  flagT    mergeridge2:1; /* True if neighbor contains a qh_MERGEridge (mark_dupridges */
-  flagT    coplanar:1;  /* True if horizon facet is coplanar at last use */
-  flagT     mergehorizon:1; /* True if will merge into horizon (->coplanar) */
-  flagT	    cycledone:1;/* True if mergecycle_all already done */
-  flagT    tested:1;    /* True if facet convexity has been tested (false after merge */
-  flagT    keepcentrum:1; /* True if keep old centrum after a merge, or marks owner for ->tricoplanar */
-  flagT	   newmerge:1;  /* True if facet is newly merged for reducevertices */
-  flagT	   degenerate:1; /* True if facet is degenerate (degen_mergeset or ->tricoplanar) */
-  flagT	   redundant:1;  /* True if facet is redundant (degen_mergeset) */
-};
-
-
-/*----------------------------------
-
-  ridgeT
-    defines a ridge
-
-  notes:
-  a ridge is DIM3-1 simplex between two neighboring facets.  If the
-  facets are non-simplicial, there may be more than one ridge between
-  two facets.  E.G. a 4-d hypercube has two triangles between each pair
-  of neighboring facets.
-
-  topological information:
-    vertices            a set of vertices
-    top,bottom          neighboring facets with orientation
-
-  geometric information:
-    tested              True if ridge is clearly convex
-    nonconvex           True if ridge is non-convex
-*/
-struct ridgeT {
-  setT    *vertices;    /* vertices belonging to this ridge, inverse sorted by ID 
-                           NULL if a degen ridge (matchsame) */
-  facetT  *top;         /* top facet this ridge is part of */
-  facetT  *bottom;      /* bottom facet this ridge is part of */
-  unsigned id:24;       /* unique identifier, =>room for 8 flags */
-  flagT    seen:1;      /* used to perform operations only once */
-  flagT    tested:1;    /* True when ridge is tested for convexity */
-  flagT    nonconvex:1; /* True if getmergeset detected a non-convex neighbor
-			   only one ridge between neighbors may have nonconvex */
-};
-
-/*----------------------------------
-
-  vertexT
-     defines a vertex
-
-  topological information:
-    next,previous       doubly-linked list of all vertices
-    neighbors           set of adjacent facets (only if qh.VERTEXneighbors)
-
-  geometric information:
-    point               array of DIM3 coordinates
-*/
-struct vertexT {
-  vertexT *next;        /* next vertex in vertex_list */
-  vertexT *previous;    /* previous vertex in vertex_list */
-  pointT  *point;       /* hull_dim coordinates (coordT) */
-  setT    *neighbors;   /* neighboring facets of vertex, qh_vertexneighbors()
-			   inits in io.c or after first merge */
-  unsigned visitid; /* for use with qh vertex_visit */
-  unsigned id:24;   /* unique identifier, =>room for 8 flags */
-  flagT    seen:1;      /* used to perform operations only once */
-  flagT    seen2:1;     /* another seen flag */
-  flagT    delridge:1;  /* vertex was part of a deleted ridge */
-  flagT	   deleted:1;   /* true if vertex on qh del_vertices */
-  flagT    newlist:1;   /* true if vertex on qh newvertex_list */
-};
-
-/*======= -global variables -qh ============================*/
-
-/*----------------------------------
-
-  qh
-   all global variables for qhull are in qh, qhmem, and qhstat
-
-  notes:
-   qhmem is defined in mem.h and qhstat is defined in stat.h
-   access to qh_qh is via the "qh" macro.  See qh_QHpointer in user.h
-*/
-typedef struct qhT qhT;
-#if qh_QHpointer
-#define qh qh_qh->
-extern qhT *qh_qh;     /* allocated in global.c */
-#else
-#define qh qh_qh.
-extern qhT qh_qh;
-#endif
-
-struct qhT {
-
-/*----------------------------------
-
-  qh constants
-    configuration flags and constants for Qhull
-
-  notes:
-    The user configures Qhull by defining flags.  They are
-    copied into qh by qh_setflags().  qh-quick.htm#options defines the flags.
-*/
-  boolT ALLpoints;        /* true 'Qs' if search all points for initial simplex */
-  boolT ANGLEmerge;	  /* true 'Qa' if sort potential merges by angle */
-  boolT APPROXhull;       /* true 'Wn' if MINoutside set */
-  realT MINoutside;       /*   'Wn' min. distance for an outside point */
-  boolT ATinfinity;       /* true 'Qz' if point num_points-1 is "at-infinity"
-                             for improving precision in Delaunay triangulations */
-  boolT AVOIDold;         /* true 'Q4' if avoid old->new merges */
-  boolT BESToutside;      /* true 'Qf' if partition points into best outsideset */
-  boolT CDDinput;         /* true 'Pc' if input uses CDD format (1.0/offset first) */
-  boolT CDDoutput;        /* true 'PC' if print normals in CDD format (offset first) */
-  boolT CHECKfrequently;  /* true 'Tc' if checking frequently */
-  realT premerge_cos;     /*   'A-n'   cos_max when pre merging */
-  realT postmerge_cos;    /*   'An'    cos_max when post merging */
-  boolT DELAUNAY;         /* true 'd' if computing DELAUNAY triangulation */
-  boolT DOintersections;  /* true 'Gh' if print hyperplane intersections */
-  int   DROPdim;          /* drops dim 'GDn' for 4-d -> 3-d output */
-  boolT FORCEoutput;      /* true 'Po' if forcing output despite degeneracies */
-  int   GOODpoint;        /* 1+n for 'QGn', good facet if visible/not(-) from point n*/
-  pointT *GOODpointp;     /*   the actual point */
-  boolT GOODthreshold;    /* true if qh lower_threshold/upper_threshold defined
-  			     false if qh SPLITthreshold */
-  int   GOODvertex;       /* 1+n, good facet if vertex for point n */
-  pointT *GOODvertexp;     /*   the actual point */
-  boolT HALFspace;        /* true 'Hn,n,n' if halfspace intersection */
-  int   IStracing;        /* trace execution, 0=none, 1=least, 4=most, -1=events */
-  int   KEEParea;         /* 'PAn' number of largest facets to keep */
-  boolT KEEPcoplanar;     /* true 'Qc' if keeping nearest facet for coplanar points */
-  boolT KEEPinside;       /* true 'Qi' if keeping nearest facet for inside points
-			      set automatically if 'd Qc' */
-  int   KEEPmerge;        /* 'PMn' number of facets to keep with most merges */
-  realT KEEPminArea;      /* 'PFn' minimum facet area to keep */
-  realT MAXcoplanar;      /* 'Un' max distance below a facet to be coplanar*/
-  boolT MERGEexact;	  /* true 'Qx' if exact merges (coplanar, degen, dupridge, flipped) */
-  boolT MERGEindependent; /* true 'Q2' if merging independent sets */
-  boolT MERGING;          /* true if exact-, pre- or post-merging, with angle and centrum tests */
-  realT   premerge_centrum;  /*   'C-n' centrum_radius when pre merging.  Default is round-off */
-  realT   postmerge_centrum; /*   'Cn' centrum_radius when post merging.  Default is round-off */
-  boolT MERGEvertices;	  /* true 'Q3' if merging redundant vertices */
-  realT MINvisible;       /* 'Vn' min. distance for a facet to be visible */
-  boolT NOnarrow;         /* true 'Q10' if no special processing for narrow distributions */
-  boolT NOnearinside;     /* true 'Q8' if ignore near-inside points when partitioning */
-  boolT NOpremerge;       /* true 'Q0' if no defaults for C-0 or Qx */
-  boolT ONLYgood; 	  /* true 'Qg' if process points with good visible or horizon facets */
-  boolT ONLYmax; 	  /* true 'Qm' if only process points that increase max_outside */
-  boolT PICKfurthest;     /* true 'Q9' if process furthest of furthest points*/
-  boolT POSTmerge;        /* true if merging after buildhull (Cn or An) */
-  boolT PREmerge;         /* true if merging during buildhull (C-n or A-n) */
-  			/* NOTE: some of these names are similar to qh_PRINT names */
-  boolT PRINTcentrums;	  /* true 'Gc' if printing centrums */
-  boolT PRINTcoplanar;    /* true 'Gp' if printing coplanar points */
-  int	PRINTdim;      	  /* print dimension for Geomview output */
-  boolT PRINTdots;        /* true 'Ga' if printing all points as dots */
-  boolT PRINTgood;        /* true 'Pg' if printing good facets */
-  boolT PRINTinner;	  /* true 'Gi' if printing inner planes */
-  boolT PRINTneighbors;	  /* true 'PG' if printing neighbors of good facets */
-  boolT PRINTnoplanes;	  /* true 'Gn' if printing no planes */
-  boolT PRINToptions1st;  /* true 'FO' if printing options to stderr */
-  boolT PRINTouter;	  /* true 'Go' if printing outer planes */
-  boolT PRINTprecision;   /* false 'Pp' if not reporting precision problems */
-  qh_PRINT PRINTout[qh_PRINTEND]; /* list of output formats to print */
-  boolT PRINTridges;      /* true 'Gr' if print ridges */
-  boolT PRINTspheres;     /* true 'Gv' if print vertices as spheres */
-  boolT PRINTstatistics;  /* true 'Ts' if printing statistics to stderr */
-  boolT PRINTsummary;     /* true 's' if printing summary to stderr */
-  boolT PRINTtransparent; /* true 'Gt' if print transparent outer ridges */
-  boolT PROJECTdelaunay;  /* true if DELAUNAY, no readpoints() and
-			     need projectinput() for Delaunay in qh_init_B */
-  int   PROJECTinput;     /* number of projected dimensions 'bn:0Bn:0' */
-  boolT QUICKhelp;	  /* true if quick help message for degen input */
-  boolT RANDOMdist;       /* true if randomly change distplane and setfacetplane */
-  realT RANDOMfactor;     /*    maximum random perturbation */
-  realT RANDOMa;         /*  qh_randomfactor is randr * RANDOMa + RANDOMb */
-  realT RANDOMb;
-  boolT RANDOMoutside;    /* true if select a random outside point */
-  int	REPORTfreq;       /* buildtracing reports every n facets */
-  int   REPORTfreq2;	  /* tracemerging reports every REPORTfreq/2 facets */
-  int	RERUN;            /* 'TRn' rerun qhull n times (qh.build_cnt) */
-  int	ROTATErandom;	  /* 'QRn' seed, 0 time, >= rotate input */
-  boolT SCALEinput;       /* true 'Qbk' if scaling input */
-  boolT SCALElast;        /* true 'Qbb' if scale last coord to max prev coord */
-  boolT SETroundoff;      /* true 'E' if qh DISTround is predefined */
-  boolT SKIPcheckmax;	  /* true 'Q5' if skip qh_check_maxout */
-  boolT SKIPconvex;       /* true 'Q6' if skip convexity testing during pre-merge */
-  boolT SPLITthresholds;  /* true if upper_/lower_threshold defines a region
-                               used only for printing (not for qh ONLYgood) */
-  int	STOPcone;         /* 'TCn' 1+n for stopping after cone for point n*/
-			  /*       also used by qh_build_withresart for err exit*/
-  int	STOPpoint;        /* 'TVn' 'TV-n' 1+n for stopping after/before(-)
-			                adding point n */
-  int	TESTpoints;	  /* 'QTn' num of test points after qh.num_points.  Test points always coplanar. */
-  boolT TESTvneighbors;   /*  true 'Qv' if test vertex neighbors at end */
-  int   TRACElevel;       /* 'Tn' conditional IStracing level */
-  int	TRACElastrun;	  /*  qh.TRACElevel applies to last qh.RERUN */
-  int   TRACEpoint;       /* 'TPn' start tracing when point n is a vertex */
-  realT TRACEdist;        /* 'TWn' start tracing when merge distance too big */
-  int   TRACEmerge;       /* 'TMn' start tracing before this merge */
-  boolT TRIangulate;	  /* true 'Qt' if triangulate non-simplicial facets */
-  boolT TRInormals;	  /* true 'Q11' if triangulate duplicates normals (sets Qt) */
-  boolT UPPERdelaunay;    /* true 'Qu' if computing furthest-site Delaunay */
-  boolT VERIFYoutput;     /* true 'Tv' if verify output at end of qhull */
-  boolT VIRTUALmemory;    /* true 'Q7' if depth-first processing in buildhull */
-  boolT VORONOI;	  /* true 'v' if computing Voronoi diagram */
-
-  /*--------input constants ---------*/
-  realT AREAfactor;       /* 1/(hull_dim-1)! for converting det's to area */
-  boolT DOcheckmax;       /* true if calling qh_check_maxout (qh_initqhull_globals) */
-  char	*feasible_string;  /* feasible point 'Hn,n,n' for halfspace intersection */
-  coordT *feasible_point;  /*    as coordinates, both malloc'd */
-  boolT GETarea;          /* true 'Fa', 'FA', 'FS', 'PAn', 'PFn' if compute facet area/Voronoi volume in io.c */
-  boolT KEEPnearinside;   /* true if near-inside points in coplanarset */
-  int 	hull_dim;         /* dimension of hull, set by initbuffers */
-  int 	input_dim;	  /* dimension of input, set by initbuffers */
-  int 	num_points;       /* number of input points */
-  pointT *first_point;    /* array of input points, see POINTSmalloc */
-  boolT POINTSmalloc;     /*   true if qh first_point/num_points allocated */
-  pointT *input_points;   /* copy of original qh.first_point for input points for qh_joggleinput */
-  boolT input_malloc;     /* true if qh input_points malloc'd */
-  char 	qhull_command[256];/* command line that invoked this program */
-  char 	rbox_command[256]; /* command line that produced the input points */
-  char  qhull_options[512];/* descriptive list of options */
-  int   qhull_optionlen;  /*    length of last line */
-  int   qhull_optionsiz;  /*     size of qhull_options before qh_initbuild */
-  boolT VERTEXneighbors;  /* true if maintaining vertex neighbors */
-  boolT ZEROcentrum;      /* true if 'C-0' or 'C-0 Qx'.  sets ZEROall_ok */
-  realT *upper_threshold; /* don't print if facet->normal[k]>=upper_threshold[k]
-                             must set either GOODthreshold or SPLITthreshold
-  			     if Delaunay, default is 0.0 for upper envelope */
-  realT *lower_threshold; /* don't print if facet->normal[k] <=lower_threshold[k] */
-  realT *upper_bound;     /* scale point[k] to new upper bound */
-  realT *lower_bound;     /* scale point[k] to new lower bound
-  			     project if both upper_ and lower_bound == 0 */
-
-/*----------------------------------
-
-  qh precision constants
-    precision constants for Qhull
-
-  notes:
-    qh_detroundoff() computes the maximum roundoff error for distance
-    and other computations.  It also sets default values for the
-    qh constants above.
-*/
-  realT ANGLEround;       /* max round off error for angles */
-  realT centrum_radius;   /* max centrum radius for convexity (roundoff added) */
-  realT cos_max;	  /* max cosine for convexity (roundoff added) */
-  realT DISTround;        /* max round off error for distances, 'E' overrides */
-  realT MAXabs_coord;     /* max absolute coordinate */
-  realT MAXlastcoord;     /* max last coordinate for qh_scalelast */
-  realT MAXsumcoord;      /* max sum of coordinates */
-  realT MAXwidth;         /* max rectilinear width of point coordinates */
-  realT MINdenom_1;       /* min. abs. value for 1/x */
-  realT MINdenom;         /*    use divzero if denominator < MINdenom */
-  realT MINdenom_1_2;     /* min. abs. val for 1/x that allows normalization */
-  realT MINdenom_2;       /*    use divzero if denominator < MINdenom_2 */
-  realT MINlastcoord;     /* min. last coordinate for qh_scalelast */
-  boolT NARROWhull;       /* set in qh_initialhull if angle < qh_MAXnarrow */
-  realT *NEARzero;        /* hull_dim array for near zero in gausselim */
-  realT NEARinside;       /* keep points for qh_check_maxout if close to facet */
-  realT ONEmerge;         /* max distance for merging simplicial facets */
-  realT outside_err;      /* application's epsilon for coplanar points
-                             qh_check_bestdist() qh_check_points() reports error if point outside */
-  realT WIDEfacet;        /* size of wide facet for skipping ridge in
-			     area computation and locking centrum */
-  
-/*----------------------------------
-
-  qh internal constants
-    internal constants for Qhull
-*/
-  char qhull[sizeof("qhull")]; /* for checking ownership */
-  void *old_stat;         /* pointer to saved qh_qhstat, qh_save_qhull */
-  jmp_buf errexit;        /* exit label for qh_errexit, defined by setjmp() */
-  char jmpXtra[40];       /* extra bytes in case jmp_buf is defined wrong by compiler */
-  jmp_buf restartexit;    /* restart label for qh_errexit, defined by setjmp() */
-  char jmpXtra2[40];      /* extra bytes in case jmp_buf is defined wrong by compiler*/
-  FILE *fin;              /* pointer to input file, init by qh_meminit */
-  FILE *fout;             /* pointer to output file */
-  FILE *ferr;             /* pointer to error file */
-  pointT *interior_point; /* center point of the initial simplex*/
-  int   normal_size;      /* size in bytes for facet normals and point coords*/
-  int   center_size;      /* size in bytes for Voronoi centers */
-  int   TEMPsize;         /* size for small, temporary sets (in quick mem) */
-
-/*----------------------------------
-
-  qh facet and vertex lists
-    defines lists of facets, new facets, visible facets, vertices, and
-    new vertices.  Includes counts, next ids, and trace ids.
-  see:
-    qh_resetlists()
-*/
-  facetT *facet_list;     /* first facet */
-  facetT  *facet_tail;     /* end of facet_list (dummy facet) */
-  facetT *facet_next;     /* next facet for buildhull()
-    			     previous facets do not have outside sets
-                             NARROWhull: previous facets may have coplanar outside sets for qh_outcoplanar */
-  facetT *newfacet_list;  /* list of new facets to end of facet_list */
-  facetT *visible_list;   /* list of visible facets preceeding newfacet_list,
-                             facet->visible set */
-  int       num_visible;  /* current number of visible facets */
-  unsigned tracefacet_id;  /* set at init, then can print whenever */
-  facetT *tracefacet;     /*   set in newfacet/mergefacet, undone in delfacet*/
-  unsigned tracevertex_id;  /* set at buildtracing, can print whenever */
-  vertexT *tracevertex;     /*   set in newvertex, undone in delvertex*/
-  vertexT *vertex_list;     /* list of all vertices, to vertex_tail */
-  vertexT  *vertex_tail;    /*      end of vertex_list (dummy vertex) */
-  vertexT *newvertex_list; /* list of vertices in newfacet_list, to vertex_tail
-                             all vertices have 'newlist' set */
-  int 	num_facets;	  /* number of facets in facet_list
-			     includes visble faces (num_visible) */
-  int 	num_vertices;     /* number of vertices in facet_list */
-  int   num_outside;      /* number of points in outsidesets (for tracing and RANDOMoutside)
-                               includes coplanar outsideset points for NARROWhull/qh_outcoplanar() */
-  int   num_good;         /* number of good facets (after findgood_all) */
-  unsigned facet_id;      /* ID of next, new facet from newfacet() */
-  unsigned ridge_id;      /* ID of next, new ridge from newridge() */
-  unsigned vertex_id;     /* ID of next, new vertex from newvertex() */
-
-/*----------------------------------
-
-  qh global variables
-    defines minimum and maximum distances, next visit ids, several flags,
-    and other global variables.
-    initialize in qh_initbuild or qh_maxmin if used in qh_buildhull
-*/
-  unsigned long hulltime; /* ignore time to set up input and randomize */
-                          /*   use unsigned to avoid wrap-around errors */
-  boolT ALLOWrestart;     /* true if qh_precision can use qh.restartexit */
-  int   build_cnt;        /* number of calls to qh_initbuild */
-  qh_CENTER CENTERtype;   /* current type of facet->center, qh_CENTER */
-  int 	furthest_id;      /* pointid of furthest point, for tracing */
-  facetT *GOODclosest;    /* closest facet to GOODthreshold in qh_findgood */
-  realT JOGGLEmax;        /* set 'QJn' if randomly joggle input */
-  boolT maxoutdone;       /* set qh_check_maxout(), cleared by qh_addpoint() */
-  realT max_outside;      /* maximum distance from a point to a facet,
-			       before roundoff, not simplicial vertices
-			       actual outer plane is +DISTround and
-			       computed outer plane is +2*DISTround */
-  realT max_vertex;       /* maximum distance (>0) from vertex to a facet,
-			       before roundoff, due to a merge */
-  realT min_vertex;       /* minimum distance (<0) from vertex to a facet,
-			       before roundoff, due to a merge
-			       if qh.JOGGLEmax, qh_makenewplanes sets it
-  			       recomputed if qh.DOcheckmax, default -qh.DISTround */
-  boolT NEWfacets;        /* true while visible facets invalid due to new or merge
-			      from makecone/attachnewfacets to deletevisible */
-  boolT findbestnew;	  /* true if partitioning calls qh_findbestnew */
-  boolT findbest_notsharp; /* true if new facets are at least 90 degrees */
-  boolT NOerrexit;        /* true if qh.errexit is not available */
-  realT PRINTcradius;     /* radius for printing centrums */
-  realT PRINTradius;      /* radius for printing vertex spheres and points */
-  boolT POSTmerging;      /* true when post merging */
-  int 	printoutvar;	  /* temporary variable for qh_printbegin, etc. */
-  int 	printoutnum;	  /* number of facets printed */
-  boolT QHULLfinished;    /* True after qhull() is finished */
-  realT totarea;          /* 'FA': total facet area computed by qh_getarea */
-  realT totvol;           /* 'FA': total volume computed by qh_getarea */
-  unsigned int visit_id;  /* unique ID for searching neighborhoods, */
-  unsigned int vertex_visit; /* unique ID for searching vertices */
-  boolT ZEROall_ok;       /* True if qh_checkzero always succeeds */
-  boolT WAScoplanar;      /* True if qh_partitioncoplanar (qh_check_maxout) */
-  
-/*----------------------------------
-
-  qh global sets
-    defines sets for merging, initial simplex, hashing, extra input points,
-    and deleted vertices
-*/
-  setT *facet_mergeset;   /* temporary set of merges to be done */
-  setT *degen_mergeset;   /* temporary set of degenerate and redundant merges */
-  setT *hash_table;	  /* hash table for matching ridges in qh_matchfacets
-                             size is setsize() */
-  setT *other_points;     /* additional points (first is qh interior_point) */
-  setT *del_vertices;     /* vertices to partition and delete with visible
-                             facets.  Have deleted set for checkfacet */
-
-/*----------------------------------
-
-  qh global buffers
-    defines buffers for maxtrix operations, input, and error messages
-*/
-  coordT *gm_matrix;      /* (dim+1)Xdim matrix for geom.c */
-  coordT **gm_row;        /* array of gm_matrix rows */
-  char* line;             /* malloc'd input line of maxline+1 chars */
-  int maxline;
-  coordT *half_space;     /* malloc'd input array for halfspace (qh normal_size+coordT) */
-  coordT *temp_malloc;    /* malloc'd input array for points */
-  
-/*----------------------------------
-
-  qh static variables
-    defines static variables for individual functions
-
-  notes:
-    do not use 'static' within a function.  Multiple instances of qhull
-    may exist.
-
-    do not assume zero initialization, 'QPn' may cause a restart
-*/
-  boolT ERREXITcalled;    /* true during errexit (prevents duplicate calls */
-  boolT firstcentrum; 	  /* for qh_printcentrum */
-  realT last_low;         /* qh_scalelast parameters for qh_setdelaunay */
-  realT last_high;
-  realT last_newhigh;
-  unsigned lastreport;    /* for qh_buildtracing */
-  int mergereport;        /* for qh_tracemerging */
-  boolT old_randomdist;   /* save RANDOMdist when io, tracing, or statistics */
-  int   ridgeoutnum;      /* number of ridges in 4OFF output */
-  void *old_qhstat;       /* for saving qh_qhstat in save_qhull() */
-  setT *old_tempstack;     /* for saving qhmem.tempstack in save_qhull */
-  setT *coplanarset;      /* set of coplanar facets for searching qh_findbesthorizon() */
-};
-
-/*=========== -macros- =========================*/
-
-/*----------------------------------
-
-  otherfacet_(ridge, facet)
-    return neighboring facet for a ridge in facet
-*/
-#define otherfacet_(ridge, facet) \
-                        (((ridge)->top == (facet)) ? (ridge)->bottom : (ridge)->top)
-
-/*----------------------------------
-
-  getid_(p)
-    return ID for facet, ridge, or vertex
-    return MAXINT if NULL (-1 causes type conversion error )
-*/
-#define getid_(p)       ((p) ? (p)->id : -1)
-
-/*============== FORALL macros ===================*/
-
-/*----------------------------------
-
-  FORALLfacets { ... }
-    assign 'facet' to each facet in qh.facet_list
-
-  notes:
-    uses 'facetT *facet;'
-    assumes last facet is a sentinel
-
-  see:
-    FORALLfacet_( facetlist )
-*/
-#define FORALLfacets for (facet=qh facet_list;facet && facet->next;facet=facet->next)
-
-/*----------------------------------
-
-  FORALLpoints { ... }
-    assign 'point' to each point in qh.first_point, qh.num_points
-
-  declare:
-    coordT *point, *pointtemp;
-*/
-#define FORALLpoints FORALLpoint_(qh first_point, qh num_points)
-
-/*----------------------------------
-
-  FORALLpoint_( points, num) { ... }
-    assign 'point' to each point in points array of num points
-
-  declare:
-    coordT *point, *pointtemp;
-*/
-#define FORALLpoint_(points, num) for(point= (points), \
-      pointtemp= (points)+qh hull_dim*(num); point < pointtemp; point += qh hull_dim)
-
-/*----------------------------------
-
-  FORALLvertices { ... }
-    assign 'vertex' to each vertex in qh.vertex_list
-
-  declare:
-    vertexT *vertex;
-
-  notes:
-    assumes qh.vertex_list terminated with a sentinel
-*/
-#define FORALLvertices for (vertex=qh vertex_list;vertex && vertex->next;vertex= vertex->next)
-
-/*----------------------------------
-
-  FOREACHfacet_( facets ) { ... }
-    assign 'facet' to each facet in facets
-
-  declare:
-    facetT *facet, **facetp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHfacet_(facets)    FOREACHsetelement_(facetT, facets, facet)
-
-/*----------------------------------
-
-  FOREACHneighbor_( facet ) { ... }
-    assign 'neighbor' to each neighbor in facet->neighbors
-
-  FOREACHneighbor_( vertex ) { ... }
-    assign 'neighbor' to each neighbor in vertex->neighbors
-
-  declare:
-    facetT *neighbor, **neighborp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHneighbor_(facet)  FOREACHsetelement_(facetT, facet->neighbors, neighbor)
-
-/*----------------------------------
-
-  FOREACHpoint_( points ) { ... }
-    assign 'point' to each point in points set
-
-  declare:
-    pointT *point, **pointp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHpoint_(points)    FOREACHsetelement_(pointT, points, point)
-
-/*----------------------------------
-
-  FOREACHridge_( ridges ) { ... }
-    assign 'ridge' to each ridge in ridges set
-
-  declare:
-    ridgeT *ridge, **ridgep;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHridge_(ridges)    FOREACHsetelement_(ridgeT, ridges, ridge)
-
-/*----------------------------------
-
-  FOREACHvertex_( vertices ) { ... }
-    assign 'vertex' to each vertex in vertices set
-
-  declare:
-    vertexT *vertex, **vertexp;
-
-  see:
-    FOREACHsetelement_
-*/
-#define FOREACHvertex_(vertices) FOREACHsetelement_(vertexT, vertices,vertex)
-
-/*----------------------------------
-
-  FOREACHfacet_i_( facets ) { ... }
-    assign 'facet' and 'facet_i' for each facet in facets set
-
-  declare:
-    facetT *facet;
-    int     facet_n, facet_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHfacet_i_(facets)    FOREACHsetelement_i_(facetT, facets, facet)
-
-/*----------------------------------
-
-  FOREACHneighbor_i_( facet ) { ... }
-    assign 'neighbor' and 'neighbor_i' for each neighbor in facet->neighbors
-
-  FOREACHneighbor_i_( vertex ) { ... }
-    assign 'neighbor' and 'neighbor_i' for each neighbor in vertex->neighbors
-
-  declare:
-    facetT *neighbor;
-    int     neighbor_n, neighbor_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHneighbor_i_(facet)  FOREACHsetelement_i_(facetT, facet->neighbors, neighbor)
-
-/*----------------------------------
-
-  FOREACHpoint_i_( points ) { ... }
-    assign 'point' and 'point_i' for each point in points set
-
-  declare:
-    pointT *point;
-    int     point_n, point_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHpoint_i_(points)    FOREACHsetelement_i_(pointT, points, point)
-
-/*----------------------------------
-
-  FOREACHridge_i_( ridges ) { ... }
-    assign 'ridge' and 'ridge_i' for each ridge in ridges set
-
-  declare:
-    ridgeT *ridge;
-    int     ridge_n, ridge_i;
-
-  see:
-    FOREACHsetelement_i_
-*/
-#define FOREACHridge_i_(ridges)    FOREACHsetelement_i_(ridgeT, ridges, ridge)
-
-/*----------------------------------
-
-  FOREACHvertex_i_( vertices ) { ... }
-    assign 'vertex' and 'vertex_i' for each vertex in vertices set
-
-  declare:
-    vertexT *vertex;
-    int     vertex_n, vertex_i;
-
-  see:
-    FOREACHsetelement_i_
- */
-#define FOREACHvertex_i_(vertices) FOREACHsetelement_i_(vertexT, vertices,vertex)
-
-/********* -qhull.c prototypes (duplicated from qhull_a.h) **********************/
-
-void    qh_qhull (void);
-boolT   qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void	qh_printsummary(FILE *fp);
-
-/********* -user.c prototypes (alphabetical) **********************/
-
-void 	qh_errexit(int exitcode, facetT *facet, ridgeT *ridge);
-void 	qh_errprint(char* string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex);
-int     qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc,
-		char *qhull_cmd, FILE *outfile, FILE *errfile);
-void    qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall);
-void 	qh_user_memsizes (void);
-
-/***** -geom.c/geom2.c prototypes (duplicated from geom.h) ****************/
-
-facetT *qh_findbest (pointT *point, facetT *startfacet,
-		     boolT bestoutside, boolT newfacets, boolT noupper,
-		     realT *dist, boolT *isoutside, int *numpart);
-facetT *qh_findbestnew (pointT *point, facetT *startfacet,
-                     realT *dist, boolT bestoutside, boolT *isoutside, int *numpart);
-boolT   qh_gram_schmidt(int dim, realT **rows);
-void    qh_outerinner (facetT *facet, realT *outerplane, realT *innerplane);
-void	qh_printsummary(FILE *fp);
-void    qh_projectinput (void);
-void    qh_randommatrix (realT *buffer, int dim, realT **row);
-void    qh_rotateinput (realT **rows);
-void    qh_scaleinput (void);
-void    qh_setdelaunay (int dim, int count, pointT *points);
-coordT  *qh_sethalfspace_all (int dim, int count, coordT *halfspaces, pointT *feasible);
-
-/***** -global.c prototypes (alphabetical) ***********************/
-
-unsigned long qh_clock (void);
-void 	qh_checkflags (char *command, char *hiddenflags);
-void 	qh_freebuffers (void);
-void    qh_freeqhull (boolT allmem);
-void    qh_init_A (FILE *infile, FILE *outfile, FILE *errfile, int argc, char *argv[]);
-void    qh_init_B (coordT *points, int numpoints, int dim, boolT ismalloc);
-void 	qh_init_qhull_command (int argc, char *argv[]);
-void    qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-void 	qh_initflags (char *command);
-void 	qh_initqhull_buffers (void);
-void 	qh_initqhull_globals (coordT *points, int numpoints, int dim, boolT ismalloc);
-void    qh_initqhull_mem (void);
-void 	qh_initqhull_start (FILE *infile, FILE *outfile, FILE *errfile);
-void 	qh_initthresholds (char *command);
-void    qh_option (char *option, int *i, realT *r);
-#if qh_QHpointer
-void 	qh_restore_qhull (qhT **oldqh);
-qhT    *qh_save_qhull (void);
-#endif
-
-/***** -io.c prototypes (duplicated from io.h) ***********************/
-
-void    dfacet( unsigned id);
-void    dvertex( unsigned id);
-void	qh_printneighborhood (FILE *fp, int format, facetT *facetA, facetT *facetB, boolT printall);
-void	qh_produce_output(void);
-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
-
-
-/********* -mem.c prototypes (duplicated from mem.h) **********************/
-
-void qh_meminit (FILE *ferr);
-void qh_memfreeshort (int *curlong, int *totlong);
-
-/********* -poly.c/poly2.c prototypes (duplicated from poly.h) **********************/
-
-void    qh_check_output (void);
-void    qh_check_points (void);
-setT   *qh_facetvertices (facetT *facetlist, setT *facets, boolT allfacets);
-facetT *qh_findbestfacet (pointT *point, boolT bestoutside,
-           realT *bestdist, boolT *isoutside);
-vertexT *qh_nearvertex (facetT *facet, pointT *point, realT *bestdistp);
-pointT *qh_point (int id);
-setT   *qh_pointfacet (void /*qh.facet_list*/);
-int     qh_pointid (pointT *point);
-setT   *qh_pointvertex (void /*qh.facet_list*/);
-void    qh_setvoronoi_all (void);
-void	qh_triangulate (void /*qh facet_list*/);
-
-/********* -stat.c prototypes (duplicated from stat.h) **********************/
-
-void    qh_collectstatistics (void);
-void    qh_printallstatistics (FILE *fp, char *string);
-
-#endif /* qhDEFqhull */
diff --git a/extern/qhull/src/qhull_a.h b/extern/qhull/src/qhull_a.h
deleted file mode 100644
index d4e69b071be..00000000000
--- a/extern/qhull/src/qhull_a.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
  ---------------------------------
-
-   qhull_a.h 
-   all header files for compiling qhull
-
-   see qh-qhull.htm
-
-   see qhull.h for user-level definitions
-   
-   see user.h for user-defineable constants
-   
-   defines internal functions for qhull.c global.c
-
-   copyright (c) 1993-2002, The Geometry Center
-
-   Notes:  grep for ((" and (" to catch fprintf("lkasdjf");
-           full parens around (x?y:z)
-	   use '#include qhull/qhull_a.h' to avoid name clashes
-*/
-
-#ifndef qhDEFqhulla
-#define qhDEFqhulla
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include     /* some compilers will not need float.h */
-#include 
-#include 
-#include 
-/*** uncomment here and qset.c
-     if string.h does not define memcpy()
-#include 
-*/
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-#include "geom.h"
-#include "merge.h"
-#include "poly.h"
-#include "io.h"
-#include "stat.h"
-
-#if qh_CLOCKtype == 2  /* defined in user.h from qhull.h */
-#include 
-#include 
-#include 
-#endif
-
-#ifdef _MSC_VER  /* Microsoft Visual C++ */
-#pragma warning( disable : 4056)  /* float constant expression.  Looks like a compiler bug */
-#pragma warning( disable : 4146)  /* unary minus applied to unsigned type */
-#pragma warning( disable : 4244)  /* conversion from 'unsigned long' to 'real' */
-#pragma warning( disable : 4305)  /* conversion from 'const double' to 'float' */
-#endif
-
-/* ======= -macros- =========== */
-
-/*----------------------------------
-  
-  traceN((fp.ferr, "format\n", vars));  
-    calls fprintf if qh.IStracing >= N
-  
-  notes:
-    removing tracing reduces code size but doesn't change execution speed
-*/
-#ifndef qh_NOtrace
-#define trace0(args) {if (qh IStracing) fprintf args;}
-#define trace1(args) {if (qh IStracing >= 1) fprintf args;}
-#define trace2(args) {if (qh IStracing >= 2) fprintf args;}
-#define trace3(args) {if (qh IStracing >= 3) fprintf args;}
-#define trace4(args) {if (qh IStracing >= 4) fprintf args;}
-#define trace5(args) {if (qh IStracing >= 5) fprintf args;}
-#else /* qh_NOtrace */
-#define trace0(args) {}
-#define trace1(args) {}
-#define trace2(args) {}
-#define trace3(args) {}
-#define trace4(args) {}
-#define trace5(args) {}
-#endif /* qh_NOtrace */
-
-/***** -qhull.c prototypes (alphabetical after qhull) ********************/
-
-void 	qh_qhull (void);
-boolT   qh_addpoint (pointT *furthest, facetT *facet, boolT checkdist);
-void 	qh_buildhull(void);
-void    qh_buildtracing (pointT *furthest, facetT *facet);
-void    qh_build_withrestart (void);
-void 	qh_errexit2(int exitcode, facetT *facet, facetT *otherfacet);
-void    qh_findhorizon(pointT *point, facetT *facet, int *goodvisible,int *goodhorizon);
-pointT *qh_nextfurthest (facetT **visible);
-void 	qh_partitionall(setT *vertices, pointT *points,int npoints);
-void    qh_partitioncoplanar (pointT *point, facetT *facet, realT *dist);
-void    qh_partitionpoint (pointT *point, facetT *facet);
-void 	qh_partitionvisible(boolT allpoints, int *numpoints);
-void    qh_precision (char *reason);
-void	qh_printsummary(FILE *fp);
-
-/***** -global.c internal prototypes (alphabetical) ***********************/
-
-void    qh_appendprint (qh_PRINT format);
-void 	qh_freebuild (boolT allmem);
-void 	qh_freebuffers (void);
-void    qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-int     qh_strtol (const char *s, char **endp);
-double  qh_strtod (const char *s, char **endp);
-
-/***** -stat.c internal prototypes (alphabetical) ***********************/
-
-void	qh_allstatA (void);
-void	qh_allstatB (void);
-void	qh_allstatC (void);
-void	qh_allstatD (void);
-void	qh_allstatE (void);
-void	qh_allstatE2 (void);
-void	qh_allstatF (void);
-void	qh_allstatG (void);
-void	qh_allstatH (void);
-void 	qh_freebuffers (void);
-void    qh_initbuffers (coordT *points, int numpoints, int dim, boolT ismalloc);
-
-#endif /* qhDEFqhulla */
diff --git a/extern/qhull/src/qhull_interface.cpp b/extern/qhull/src/qhull_interface.cpp
deleted file mode 100644
index 6ecc640e82b..00000000000
--- a/extern/qhull/src/qhull_interface.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
  ---------------------------------
-*/
-
-#include 
-#include 
-
-//--- Include qhull, so it works from with in a C++ source file
-//---
-//--- In MVC one cannot just do:
-//---
-//---    extern "C"
-//---    {
-//---      #include "qhull_a.h"
-//---    }
-//---
-//--- Because qhull_a.h includes math.h, which can not appear
-//--- inside a extern "C" declaration.
-//---
-//--- Maybe that why Numerical recipes in C avoid this problem, by removing
-//--- standard include headers from its header files and add them in the
-//--- respective source files instead.
-//---
-//--- [K. Erleben]
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#if defined(__cplusplus)
-}
-#endif
-
-/*********************************************************************/
-/*                                                                   */
-/*                                                                   */
-/*                                                                   */
-/*                                                                   */
-/*********************************************************************/
-
-void compute_convex_hull(void)
-{  
-	int dim;  	              /* dimension of points */
-	int numpoints;            /* number of points */
-	coordT *points;           /* array of coordinates for each point */ 
-	boolT ismalloc;           /* True if qhull should free points in qh_freeqhull() or reallocation */ 
-	char flags[]= "qhull Tv"; /* option flags for qhull, see qh_opt.htm */
-	FILE *outfile= stdout;    /* output from qh_produce_output()			
-	                             use NULL to skip qh_produce_output() */ 
-	FILE *errfile= stderr;    /* error messages from qhull code */ 
-	int exitcode;             /* 0 if no error from qhull */
-	facetT *facet;	          /* set by FORALLfacets */
-	int curlong, totlong;	  /* memory remaining after qh_memfreeshort */
-
-   	/* initialize dim, numpoints, points[], ismalloc here */
-	exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
-							flags, outfile, errfile);
-	if (!exitcode) { /* if no error */ 
-		/* 'qh facet_list' contains the convex hull */
-		FORALLfacets {
-			/* ... your code ... */ 
-		}
-	}
-	qh_freeqhull(!qh_ALL);  
-	qh_memfreeshort (&curlong, &totlong);
-	if (curlong || totlong)
-		fprintf (errfile, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n", 
-		             totlong, curlong);
-};
-
-/*********************************************************************/
-/*                                                                   */
-/*                                                                   */
-/*                                                                   */
-/*                                                                   */
-/*********************************************************************/
-
-void main() 
-{ 
-	cout << "Hello world" << endl;
-	
-	cout << "Press any key..." << endl;  
-	
-	while(!_kbhit());
-
-};
diff --git a/extern/qhull/src/qset.c b/extern/qhull/src/qset.c
deleted file mode 100644
index 9e78464c07e..00000000000
--- a/extern/qhull/src/qset.c
+++ /dev/null
@@ -1,1301 +0,0 @@
-/*
  ---------------------------------
-
-   qset.c 
-   implements set manipulations needed for quickhull 
-
-   see qh-set.htm and qset.h
-
-   copyright (c) 1993-2002 The Geometry Center        
-*/
-
-#include 
-#include 
-/*** uncomment here and qhull_a.h 
-     if string.h does not define memcpy()
-#include 
-*/
-#include "qset.h"
-#include "mem.h"
-
-#ifndef qhDEFqhull
-typedef struct ridgeT ridgeT;
-typedef struct facetT facetT;
-void    qh_errexit(int exitcode, facetT *, ridgeT *);
-#endif
-
-/*=============== internal macros ===========================*/
-
-/*---------------------------------
-   
-  SETsizeaddr_(set) 
-    return pointer to actual size+1 of set (set CANNOT be NULL!!)
-      
-  notes:
-    *SETsizeaddr==NULL or e[*SETsizeaddr-1].p==NULL
-*/
-#define SETsizeaddr_(set) (&((set)->e[(set)->maxsize].i))
-
-/*============ functions in alphabetical order ===================*/
-  
-/*----------------------------------
-   
-  qh_setaddnth( setp, nth, newelem)
-    adds newelem as n'th element of sorted or unsorted *setp
-      
-  notes:
-    *setp and newelem must be defined
-    *setp may be a temp set
-    nth=0 is first element
-    errors if nth is out of bounds
-   
-  design:
-    expand *setp if empty or full
-    move tail of *setp up one
-    insert newelem
-*/
-void qh_setaddnth(setT **setp, int nth, void *newelem) {
-  int *sizep, oldsize, i;
-  void **oldp, **newp;
-
-  if (!*setp || !*(sizep= SETsizeaddr_(*setp))) {
-    qh_setlarger(setp);
-    sizep= SETsizeaddr_(*setp);
-  }
-  oldsize= *sizep - 1;
-  if (nth < 0 || nth > oldsize) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
-    qh_setprint (qhmem.ferr, "", *setp);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  (*sizep)++;
-  oldp= SETelemaddr_(*setp, oldsize, void);   /* NULL */
-  newp= oldp+1;
-  for (i= oldsize-nth+1; i--; )  /* move at least NULL  */
-    *(newp--)= *(oldp--);       /* may overwrite *sizep */
-  *newp= newelem;
-} /* setaddnth */
-
-
-/*----------------------------------
-   
-  setaddsorted( setp, newelem )
-    adds an newelem into sorted *setp
-      
-  notes:
-    *setp and newelem must be defined
-    *setp may be a temp set
-    nop if newelem already in set
-  
-  design:
-    find newelem's position in *setp
-    insert newelem
-*/
-void qh_setaddsorted(setT **setp, void *newelem) {
-  int newindex=0;
-  void *elem, **elemp;
-
-  FOREACHelem_(*setp) {          /* could use binary search instead */
-    if (elem < newelem)
-      newindex++;
-    else if (elem == newelem)
-      return;
-    else
-      break;
-  }
-  qh_setaddnth(setp, newindex, newelem);
-} /* setaddsorted */
-
-
-/*---------------------------------
-  
-  qh_setappend( setp, newelem)
-    append newelem to *setp
-
-  notes:
-    *setp may be a temp set
-    *setp and newelem may be NULL
-
-  design:
-    expand *setp if empty or full
-    append newelem to *setp
-    
-*/
-void qh_setappend(setT **setp, void *newelem) {
-  int *sizep;
-  void **endp;
-
-  if (!newelem)
-    return;
-  if (!*setp || !*(sizep= SETsizeaddr_(*setp))) {
-    qh_setlarger(setp);
-    sizep= SETsizeaddr_(*setp);
-  }
-  *(endp= &((*setp)->e[(*sizep)++ - 1].p))= newelem;
-  *(++endp)= NULL;
-} /* setappend */
-
-/*---------------------------------
-  
-  qh_setappend_set( setp, setA) 
-    appends setA to *setp
-
-  notes:
-    *setp can not be a temp set
-    *setp and setA may be NULL
-
-  design:
-    setup for copy
-    expand *setp if it is too small
-    append all elements of setA to *setp 
-*/
-void qh_setappend_set(setT **setp, setT *setA) {
-  int *sizep, sizeA, size;
-  setT *oldset;
-
-  if (!setA)
-    return;
-  SETreturnsize_(setA, sizeA);
-  if (!*setp)
-    *setp= qh_setnew (sizeA);
-  sizep= SETsizeaddr_(*setp);
-  if (!(size= *sizep))
-    size= (*setp)->maxsize;
-  else
-    size--;
-  if (size + sizeA > (*setp)->maxsize) {
-    oldset= *setp;
-    *setp= qh_setcopy (oldset, sizeA);
-    qh_setfree (&oldset);
-    sizep= SETsizeaddr_(*setp);
-  }
-  *sizep= size+sizeA+1;   /* memcpy may overwrite */
-  if (sizeA > 0) 
-    memcpy((char *)&((*setp)->e[size].p), (char *)&(setA->e[0].p), SETelemsize *(sizeA+1));
-} /* setappend_set */
-
-
-/*---------------------------------
-  
-  qh_setappend2ndlast( setp, newelem )
-    makes newelem the next to the last element in *setp
-
-  notes:
-    *setp must have at least one element
-    newelem must be defined
-    *setp may be a temp set
-
-  design:
-    expand *setp if empty or full
-    move last element of *setp up one
-    insert newelem
-*/
-void qh_setappend2ndlast(setT **setp, void *newelem) {
-  int *sizep;
-  void **endp, **lastp;
-  
-  if (!*setp || !*(sizep= SETsizeaddr_(*setp))) {
-    qh_setlarger(setp);
-    sizep= SETsizeaddr_(*setp);
-  }
-  endp= SETelemaddr_(*setp, (*sizep)++ -1, void); /* NULL */
-  lastp= endp-1;
-  *(endp++)= *lastp;
-  *endp= NULL;    /* may overwrite *sizep */
-  *lastp= newelem;
-} /* setappend2ndlast */
-
-
-/*---------------------------------
-  
-  qh_setcheck( set, typename, id ) 
-    check set for validity
-    report errors with typename and id
-
-  design:
-    checks that maxsize, actual size, and NULL terminator agree
-*/
-void qh_setcheck(setT *set, char *tname, int id) {
-  int maxsize, size;
-  int waserr= 0;
-
-  if (!set)
-    return;
-  SETreturnsize_(set, size);
-  maxsize= set->maxsize;
-  if (size > maxsize || !maxsize) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setcheck): actual size %d of %s%d is greater than max size %d\n",
-	     size, tname, id, maxsize);
-    waserr= 1;
-  }else if (set->e[size].p) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setcheck): %s%d (size %d max %d) is not null terminated.\n",
-	     tname, id, maxsize, size-1);
-    waserr= 1;
-  }
-  if (waserr) {
-    qh_setprint (qhmem.ferr, "ERRONEOUS", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-} /* setcheck */
-
-
-/*---------------------------------
-  
-  qh_setcompact( set )
-    remove internal NULLs from an unsorted set
-
-  returns:
-    updated set
-
-  notes:
-    set may be NULL
-    it would be faster to swap tail of set into holes, like qh_setdel
-
-  design:
-    setup pointers into set
-    skip NULLs while copying elements to start of set 
-    update the actual size
-*/
-void qh_setcompact(setT *set) {
-  int size;
-  void **destp, **elemp, **endp, **firstp;
-
-  if (!set)
-    return;
-  SETreturnsize_(set, size);
-  destp= elemp= firstp= SETaddr_(set, void);
-  endp= destp + size;
-  while (1) {
-    if (!(*destp++ = *elemp++)) {
-      destp--;
-      if (elemp > endp)
-	break;
-    }
-  }
-  qh_settruncate (set, destp-firstp);
-} /* setcompact */
-
-
-/*---------------------------------
-  
-  qh_setcopy( set, extra )
-    make a copy of a sorted or unsorted set with extra slots
-
-  returns:
-    new set
-
-  design:
-    create a newset with extra slots
-    copy the elements to the newset
-    
-*/
-setT *qh_setcopy(setT *set, int extra) {
-  setT *newset;
-  int size;
-
-  if (extra < 0)
-    extra= 0;
-  SETreturnsize_(set, size);
-  newset= qh_setnew(size+extra);
-  *SETsizeaddr_(newset)= size+1;    /* memcpy may overwrite */
-  memcpy((char *)&(newset->e[0].p), (char *)&(set->e[0].p), SETelemsize *(size+1));
-  return (newset);
-} /* setcopy */
-
-
-/*---------------------------------
-  
-  qh_setdel( set, oldelem )
-    delete oldelem from an unsorted set
-
-  returns:
-    returns oldelem if found
-    returns NULL otherwise
-    
-  notes:
-    set may be NULL
-    oldelem must not be NULL;
-    only deletes one copy of oldelem in set
-     
-  design:
-    locate oldelem
-    update actual size if it was full
-    move the last element to the oldelem's location
-*/
-void *qh_setdel(setT *set, void *oldelem) {
-  void **elemp, **lastp;
-  int *sizep;
-
-  if (!set)
-    return NULL;
-  elemp= SETaddr_(set, void);
-  while (*elemp != oldelem && *elemp)
-    elemp++;
-  if (*elemp) {
-    sizep= SETsizeaddr_(set);
-    if (!(*sizep)--)         /*  if was a full set */
-      *sizep= set->maxsize;  /*     *sizep= (maxsize-1)+ 1 */
-    lastp= SETelemaddr_(set, *sizep-1, void);
-    *elemp= *lastp;      /* may overwrite itself */
-    *lastp= NULL;
-    return oldelem;
-  }
-  return NULL;
-} /* setdel */
-
-
-/*---------------------------------
-  
-  qh_setdellast( set) 
-    return last element of set or NULL
-
-  notes:
-    deletes element from set
-    set may be NULL
-
-  design:
-    return NULL if empty
-    if full set
-      delete last element and set actual size
-    else
-      delete last element and update actual size 
-*/
-void *qh_setdellast(setT *set) {
-  int setsize;  /* actually, actual_size + 1 */
-  int maxsize;
-  int *sizep;
-  void *returnvalue;
-  
-  if (!set || !(set->e[0].p))
-    return NULL;
-  sizep= SETsizeaddr_(set);
-  if ((setsize= *sizep)) {
-    returnvalue= set->e[setsize - 2].p;
-    set->e[setsize - 2].p= NULL;
-    (*sizep)--;
-  }else {
-    maxsize= set->maxsize;
-    returnvalue= set->e[maxsize - 1].p;
-    set->e[maxsize - 1].p= NULL;
-    *sizep= maxsize;
-  }
-  return returnvalue;
-} /* setdellast */
-
-
-/*---------------------------------
-  
-  qh_setdelnth( set, nth )
-    deletes nth element from unsorted set 
-    0 is first element
-
-  returns:
-    returns the element (needs type conversion)
-
-  notes:
-    errors if nth invalid
-
-  design:
-    setup points and check nth
-    delete nth element and overwrite with last element
-*/
-void *qh_setdelnth(setT *set, int nth) {
-  void **elemp, **lastp, *elem;
-  int *sizep;
-
-
-  elemp= SETelemaddr_(set, nth, void);
-  sizep= SETsizeaddr_(set);
-  if (!(*sizep)--)         /*  if was a full set */
-    *sizep= set->maxsize;  /*     *sizep= (maxsize-1)+ 1 */
-  if (nth < 0 || nth >= *sizep) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
-    qh_setprint (qhmem.ferr, "", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  lastp= SETelemaddr_(set, *sizep-1, void);
-  elem= *elemp;
-  *elemp= *lastp;      /* may overwrite itself */
-  *lastp= NULL;
-  return elem;
-} /* setdelnth */
-
-/*---------------------------------
-  
-  qh_setdelnthsorted( set, nth )
-    deletes nth element from sorted set
-
-  returns:
-    returns the element (use type conversion)
-  
-  notes:
-    errors if nth invalid
-    
-  see also: 
-    setnew_delnthsorted
-
-  design:
-    setup points and check nth
-    copy remaining elements down one
-    update actual size  
-*/
-void *qh_setdelnthsorted(setT *set, int nth) {
-  void **newp, **oldp, *elem;
-  int *sizep;
-
-  sizep= SETsizeaddr_(set);
-  if (nth < 0 || (*sizep && nth >= *sizep-1) || nth >= set->maxsize) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
-    qh_setprint (qhmem.ferr, "", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  newp= SETelemaddr_(set, nth, void);
-  elem= *newp;
-  oldp= newp+1;
-  while ((*(newp++)= *(oldp++)))
-    ; /* copy remaining elements and NULL */
-  if (!(*sizep)--)         /*  if was a full set */
-    *sizep= set->maxsize;  /*     *sizep= (max size-1)+ 1 */
-  return elem;
-} /* setdelnthsorted */
-
-
-/*---------------------------------
-  
-  qh_setdelsorted( set, oldelem )
-    deletes oldelem from sorted set
-
-  returns:
-    returns oldelem if it was deleted
-  
-  notes:
-    set may be NULL
-
-  design:
-    locate oldelem in set
-    copy remaining elements down one
-    update actual size  
-*/
-void *qh_setdelsorted(setT *set, void *oldelem) {
-  void **newp, **oldp;
-  int *sizep;
-
-  if (!set)
-    return NULL;
-  newp= SETaddr_(set, void);
-  while(*newp != oldelem && *newp)
-    newp++;
-  if (*newp) {
-    oldp= newp+1;
-    while ((*(newp++)= *(oldp++)))
-      ; /* copy remaining elements */
-    sizep= SETsizeaddr_(set);
-    if (!(*sizep)--)    /*  if was a full set */
-      *sizep= set->maxsize;  /*     *sizep= (max size-1)+ 1 */
-    return oldelem;
-  }
-  return NULL;
-} /* setdelsorted */
-
-
-/*---------------------------------
-  
-  qh_setduplicate( set, elemsize )
-    duplicate a set of elemsize elements
-
-  notes:
-    use setcopy if retaining old elements
-
-  design:
-    create a new set
-    for each elem of the old set
-      create a newelem
-      append newelem to newset
-*/
-setT *qh_setduplicate (setT *set, int elemsize) {
-  void		*elem, **elemp, *newElem;
-  setT		*newSet;
-  int		size;
-  
-  if (!(size= qh_setsize (set)))
-    return NULL;
-  newSet= qh_setnew (size);
-  FOREACHelem_(set) {
-    newElem= qh_memalloc (elemsize);
-    memcpy (newElem, elem, elemsize);
-    qh_setappend (&newSet, newElem);
-  }
-  return newSet;
-} /* setduplicate */
-
-
-/*---------------------------------
-  
-  qh_setequal(  )
-    returns 1 if two sorted sets are equal, otherwise returns 0
-
-  notes:
-    either set may be NULL
-
-  design:
-    check size of each set
-    setup pointers
-    compare elements of each set
-*/
-int qh_setequal(setT *setA, setT *setB) {
-  void **elemAp, **elemBp;
-  int sizeA, sizeB;
-  
-  SETreturnsize_(setA, sizeA);
-  SETreturnsize_(setB, sizeB);
-  if (sizeA != sizeB)
-    return 0;
-  if (!sizeA)
-    return 1;
-  elemAp= SETaddr_(setA, void);
-  elemBp= SETaddr_(setB, void);
-  if (!memcmp((char *)elemAp, (char *)elemBp, sizeA*SETelemsize))
-    return 1;
-  return 0;
-} /* setequal */
-
-
-/*---------------------------------
-  
-  qh_setequal_except( setA, skipelemA, setB, skipelemB )
-    returns 1 if sorted setA and setB are equal except for skipelemA & B
-
-  returns:
-    false if either skipelemA or skipelemB are missing
-  
-  notes:
-    neither set may be NULL
-
-    if skipelemB is NULL, 
-      can skip any one element of setB
-
-  design:
-    setup pointers
-    search for skipelemA, skipelemB, and mismatches
-    check results
-*/
-int qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB) {
-  void **elemA, **elemB;
-  int skip=0;
-
-  elemA= SETaddr_(setA, void);
-  elemB= SETaddr_(setB, void);
-  while (1) {
-    if (*elemA == skipelemA) {
-      skip++;
-      elemA++;
-    }
-    if (skipelemB) {
-      if (*elemB == skipelemB) {
-        skip++;
-        elemB++;
-      }
-    }else if (*elemA != *elemB) {
-      skip++;
-      if (!(skipelemB= *elemB++))
-        return 0;
-    }
-    if (!*elemA)
-      break;
-    if (*elemA++ != *elemB++) 
-      return 0;
-  }
-  if (skip != 2 || *elemB)
-    return 0;
-  return 1;
-} /* setequal_except */
-  
-
-/*---------------------------------
-  
-  qh_setequal_skip( setA, skipA, setB, skipB )
-    returns 1 if sorted setA and setB are equal except for elements skipA & B
-
-  returns:
-    false if different size
-
-  notes:
-    neither set may be NULL
-
-  design:
-    setup pointers
-    search for mismatches while skipping skipA and skipB
-*/
-int qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB) {
-  void **elemA, **elemB, **skipAp, **skipBp;
-
-  elemA= SETaddr_(setA, void);
-  elemB= SETaddr_(setB, void);
-  skipAp= SETelemaddr_(setA, skipA, void);
-  skipBp= SETelemaddr_(setB, skipB, void);
-  while (1) {
-    if (elemA == skipAp)
-      elemA++;
-    if (elemB == skipBp)
-      elemB++;
-    if (!*elemA)
-      break;
-    if (*elemA++ != *elemB++) 
-      return 0;
-  }
-  if (*elemB)
-    return 0;
-  return 1;
-} /* setequal_skip */
-  
-
-/*---------------------------------
-  
-  qh_setfree( setp )
-    frees the space occupied by a sorted or unsorted set
-
-  returns:
-    sets setp to NULL
-    
-  notes:
-    set may be NULL
-
-  design:
-    free array
-    free set
-*/
-void qh_setfree(setT **setp) {
-  int size;
-  void **freelistp;  /* used !qh_NOmem */
-  
-  if (*setp) {
-    size= sizeof(setT) + ((*setp)->maxsize)*SETelemsize; 
-    if (size <= qhmem.LASTsize) {
-      qh_memfree_(*setp, size, freelistp);
-    }else
-      qh_memfree (*setp, size);
-    *setp= NULL;
-  }
-} /* setfree */
-
-
-/*---------------------------------
-  
-  qh_setfree2( setp, elemsize )
-    frees the space occupied by a set and its elements
-
-  notes:
-    set may be NULL
-
-  design:
-    free each element
-    free set 
-*/
-void qh_setfree2 (setT **setp, int elemsize) {
-  void		*elem, **elemp;
-  
-  FOREACHelem_(*setp)
-    qh_memfree (elem, elemsize);
-  qh_setfree (setp);
-} /* setfree2 */
-
-
-      
-/*---------------------------------
-  
-  qh_setfreelong( setp )
-    frees a set only if it's in long memory
-
-  returns:
-    sets setp to NULL if it is freed
-    
-  notes:
-    set may be NULL
-
-  design:
-    if set is large
-      free it    
-*/
-void qh_setfreelong(setT **setp) {
-  int size;
-  
-  if (*setp) {
-    size= sizeof(setT) + ((*setp)->maxsize)*SETelemsize; 
-    if (size > qhmem.LASTsize) {
-      qh_memfree (*setp, size);
-      *setp= NULL;
-    }
-  }
-} /* setfreelong */
-
-
-/*---------------------------------
-  
-  qh_setin( set, setelem )
-    returns 1 if setelem is in a set, 0 otherwise
-
-  notes:
-    set may be NULL or unsorted
-
-  design:
-    scans set for setelem
-*/
-int qh_setin(setT *set, void *setelem) {
-  void *elem, **elemp;
-
-  FOREACHelem_(set) {
-    if (elem == setelem)
-      return 1;
-  }
-  return 0;
-} /* setin */
-
-
-/*---------------------------------
-  
-  qh_setindex( set, atelem )
-    returns the index of atelem in set.   
-    returns -1, if not in set or maxsize wrong
-
-  notes:
-    set may be NULL and may contain nulls.
-
-  design:
-    checks maxsize
-    scans set for atelem
-*/
-int qh_setindex(setT *set, void *atelem) {
-  void **elem;
-  int size, i;
-
-  SETreturnsize_(set, size);
-  if (size > set->maxsize)
-    return -1;
-  elem= SETaddr_(set, void);
-  for (i=0; i < size; i++) {
-    if (*elem++ == atelem)
-      return i;
-  }
-  return -1;
-} /* setindex */
-
-
-/*---------------------------------
-  
-  qh_setlarger( oldsetp )
-    returns a larger set that contains all elements of *oldsetp
-
-  notes:
-    the set is at least twice as large
-    if temp set, updates qhmem.tempstack
-
-  design:
-    creates a new set
-    copies the old set to the new set
-    updates pointers in tempstack
-    deletes the old set
-*/
-void qh_setlarger(setT **oldsetp) {
-  int size= 1, *sizep;
-  setT *newset, *set, **setp, *oldset;
-  void **oldp, **newp;
-
-  if (*oldsetp) {
-    oldset= *oldsetp;
-    SETreturnsize_(oldset, size);
-    qhmem.cntlarger++;
-    qhmem.totlarger += size+1;
-    newset= qh_setnew(2 * size);
-    oldp= SETaddr_(oldset, void);
-    newp= SETaddr_(newset, void);
-    memcpy((char *)newp, (char *)oldp, (size+1) * SETelemsize);
-    sizep= SETsizeaddr_(newset);
-    *sizep= size+1;
-    FOREACHset_((setT *)qhmem.tempstack) {
-      if (set == oldset)
-	*(setp-1)= newset;
-    }
-    qh_setfree(oldsetp);
-  }else 
-    newset= qh_setnew(3);
-  *oldsetp= newset;
-} /* setlarger */
-
-
-/*---------------------------------
-  
-  qh_setlast(  )
-    return last element of set or NULL (use type conversion)
-
-  notes:
-    set may be NULL
-
-  design:
-    return last element  
-*/
-void *qh_setlast(setT *set) {
-  int size;
-
-  if (set) {
-    size= *SETsizeaddr_(set);
-    if (!size) 
-      return SETelem_(set, set->maxsize - 1);
-    else if (size > 1)
-      return SETelem_(set, size - 2);
-  }
-  return NULL;
-} /* setlast */
-
-
-/*---------------------------------
-  
-  qh_setnew( setsize )
-    creates and allocates space for a set
-
-  notes:
-    setsize means the number of elements (NOT including the NULL terminator)
-    use qh_settemp/qh_setfreetemp if set is temporary
-
-  design:
-    allocate memory for set
-    roundup memory if small set
-    initialize as empty set
-*/
-setT *qh_setnew(int setsize) {
-  setT *set;
-  int sizereceived; /* used !qh_NOmem */
-  int size;
-  void **freelistp; /* used !qh_NOmem */
-
-  if (!setsize)
-    setsize++;
-  size= sizeof(setT) + setsize * SETelemsize;
-  if ((unsigned) size <= (unsigned) qhmem.LASTsize) {
-    qh_memalloc_(size, freelistp, set, setT);
-#ifndef qh_NOmem
-    sizereceived= qhmem.sizetable[ qhmem.indextable[size]];
-    if (sizereceived > size) 
-      setsize += (sizereceived - size)/SETelemsize;
-#endif
-  }else
-    set= (setT*)qh_memalloc (size);
-  set->maxsize= setsize;
-  set->e[setsize].i= 1;
-  set->e[0].p= NULL;
-  return (set);
-} /* setnew */
-
-
-/*---------------------------------
-  
-  qh_setnew_delnthsorted( set, size, nth, prepend )
-    creates a sorted set not containing nth element
-    if prepend, the first prepend elements are undefined
-
-  notes:
-    set must be defined
-    checks nth
-    see also: setdelnthsorted
-
-  design:
-    create new set
-    setup pointers and allocate room for prepend'ed entries
-    append head of old set to new set
-    append tail of old set to new set
-*/
-setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend) {
-  setT *newset;
-  void **oldp, **newp;
-  int tailsize= size - nth -1, newsize;
-
-  if (tailsize < 0) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setaddnth): nth %d is out-of-bounds for set:\n", nth);
-    qh_setprint (qhmem.ferr, "", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  newsize= size-1 + prepend;
-  newset= qh_setnew(newsize);
-  newset->e[newset->maxsize].i= newsize+1;  /* may be overwritten */
-  oldp= SETaddr_(set, void);
-  newp= SETaddr_(newset, void) + prepend;
-  switch (nth) {
-  case 0:
-    break;
-  case 1:
-    *(newp++)= *oldp++;
-    break;
-  case 2:
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    break;
-  case 3:
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    break;
-  case 4:
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    break;
-  default:
-    memcpy((char *)newp, (char *)oldp, nth * SETelemsize);
-    newp += nth;
-    oldp += nth;
-    break;
-  }
-  oldp++;
-  switch (tailsize) {
-  case 0:
-    break;
-  case 1:
-    *(newp++)= *oldp++;
-    break;
-  case 2:
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    break;
-  case 3:
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    break;
-  case 4:
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    *(newp++)= *oldp++;
-    break;
-  default:
-    memcpy((char *)newp, (char *)oldp, tailsize * SETelemsize);
-    newp += tailsize;
-  }
-  *newp= NULL;
-  return(newset);
-} /* setnew_delnthsorted */
-
-
-/*---------------------------------
-  
-  qh_setprint( fp, string, set )
-    print set elements to fp with identifying string
-
-  notes:
-    never errors
-*/
-void qh_setprint(FILE *fp, char* string, setT *set) {
-  int size, k;
-
-  if (!set)
-    fprintf (fp, "%s set is null\n", string);
-  else {
-    SETreturnsize_(set, size);
-    fprintf (fp, "%s set=%p maxsize=%d size=%d elems=",
-	     string, set, set->maxsize, size);
-    if (size > set->maxsize)
-      size= set->maxsize+1;
-    for (k=0; k < size; k++)
-      fprintf(fp, " %p", set->e[k].p);
-    fprintf(fp, "\n");
-  }
-} /* setprint */
-
-/*---------------------------------
-  
-  qh_setreplace( set, oldelem, newelem )
-    replaces oldelem in set with newelem
-
-  notes:
-    errors if oldelem not in the set
-    newelem may be NULL, but it turns the set into an indexed set (no FOREACH)
-
-  design:
-    find oldelem
-    replace with newelem
-*/
-void qh_setreplace(setT *set, void *oldelem, void *newelem) {
-  void **elemp;
-  
-  elemp= SETaddr_(set, void);
-  while(*elemp != oldelem && *elemp)
-    elemp++;
-  if (*elemp)
-    *elemp= newelem;
-  else {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setreplace): elem %p not found in set\n",
-       oldelem);
-    qh_setprint (qhmem.ferr, "", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-} /* setreplace */
-
-
-/*---------------------------------
-  
-  qh_setsize( set )
-    returns the size of a set
-
-  notes:
-    errors if set's maxsize is incorrect
-    same as SETreturnsize_(set)
-
-  design:
-    determine actual size of set from maxsize
-*/
-int qh_setsize(setT *set) {
-  int size, *sizep;
-  
-  if (!set)
-    return (0);
-  sizep= SETsizeaddr_(set);
-  if ((size= *sizep)) {
-    size--;
-    if (size > set->maxsize) {
-      fprintf (qhmem.ferr, "qhull internal error (qh_setsize): current set size %d is greater than maximum size %d\n",
-	       size, set->maxsize);
-      qh_setprint (qhmem.ferr, "set: ", set);
-      qh_errexit (qhmem_ERRqhull, NULL, NULL);
-    }
-  }else
-    size= set->maxsize;
-  return size;
-} /* setsize */
-
-/*---------------------------------
-  
-  qh_settemp( setsize )
-    return a stacked, temporary set of upto setsize elements
-
-  notes:
-    use settempfree or settempfree_all to release from qhmem.tempstack
-    see also qh_setnew
-
-  design:
-    allocate set
-    append to qhmem.tempstack
-    
-*/
-setT *qh_settemp(int setsize) {
-  setT *newset;
-  
-  newset= qh_setnew (setsize);
-  qh_setappend ((setT **)&qhmem.tempstack, newset);
-  if (qhmem.IStracing >= 5)
-    fprintf (qhmem.ferr, "qh_settemp: temp set %p of %d elements, depth %d\n",
-       newset, newset->maxsize, qh_setsize ((setT*)qhmem.tempstack));
-  return newset;
-} /* settemp */
-
-/*---------------------------------
-  
-  qh_settempfree( set )
-    free temporary set at top of qhmem.tempstack
-
-  notes:
-    nop if set is NULL
-    errors if set not from previous   qh_settemp
-  
-  to locate errors:
-    use 'T2' to find source and then find mis-matching qh_settemp
-
-  design:
-    check top of qhmem.tempstack
-    free it
-*/
-void qh_settempfree(setT **set) {
-  setT *stackedset;
-
-  if (!*set)
-    return;
-  stackedset= qh_settemppop ();
-  if (stackedset != *set) {
-    qh_settemppush(stackedset);
-    fprintf (qhmem.ferr, "qhull internal error (qh_settempfree): set %p (size %d) was not last temporary allocated (depth %d, set %p, size %d)\n",
-	     *set, qh_setsize(*set), qh_setsize((setT*)qhmem.tempstack)+1,
-	     stackedset, qh_setsize(stackedset));
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  qh_setfree (set);
-} /* settempfree */
-
-/*---------------------------------
-  
-  qh_settempfree_all(  )
-    free all temporary sets in qhmem.tempstack
-
-  design:
-    for each set in tempstack
-      free set
-    free qhmem.tempstack
-*/
-void qh_settempfree_all(void) {
-  setT *set, **setp;
-
-  FOREACHset_((setT *)qhmem.tempstack) 
-    qh_setfree(&set);
-  qh_setfree((setT **)&qhmem.tempstack);
-} /* settempfree_all */
-
-/*---------------------------------
-  
-  qh_settemppop(  )
-    pop and return temporary set from qhmem.tempstack 
-
-  notes:
-    the returned set is permanent
-    
-  design:
-    pop and check top of qhmem.tempstack
-*/
-setT *qh_settemppop(void) {
-  setT *stackedset;
-  
-  stackedset= (setT*)qh_setdellast((setT *)qhmem.tempstack);
-  if (!stackedset) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_settemppop): pop from empty temporary stack\n");
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  if (qhmem.IStracing >= 5)
-    fprintf (qhmem.ferr, "qh_settemppop: depth %d temp set %p of %d elements\n",
-       qh_setsize((setT*)qhmem.tempstack)+1, stackedset, qh_setsize(stackedset));
-  return stackedset;
-} /* settemppop */
-
-/*---------------------------------
-  
-  qh_settemppush( set )
-    push temporary set unto qhmem.tempstack (makes it temporary)
-
-  notes:
-    duplicates settemp() for tracing
-
-  design:
-    append set to tempstack  
-*/
-void qh_settemppush(setT *set) {
-  
-  qh_setappend ((setT**)&qhmem.tempstack, set);
-  if (qhmem.IStracing >= 5)
-    fprintf (qhmem.ferr, "qh_settemppush: depth %d temp set %p of %d elements\n",
-    qh_setsize((setT*)qhmem.tempstack), set, qh_setsize(set));
-} /* settemppush */
-
- 
-/*---------------------------------
-  
-  qh_settruncate( set, size )
-    truncate set to size elements
-
-  notes:
-    set must be defined
-  
-  see:
-    SETtruncate_
-
-  design:
-    check size
-    update actual size of set
-*/
-void qh_settruncate (setT *set, int size) {
-
-  if (size < 0 || size > set->maxsize) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_settruncate): size %d out of bounds for set:\n", size);
-    qh_setprint (qhmem.ferr, "", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  set->e[set->maxsize].i= size+1;   /* maybe overwritten */
-  set->e[size].p= NULL;
-} /* settruncate */
-    
-/*---------------------------------
-  
-  qh_setunique( set, elem )
-    add elem to unsorted set unless it is already in set
-
-  notes:
-    returns 1 if it is appended
-
-  design:
-    if elem not in set
-      append elem to set
-*/
-int qh_setunique (setT **set, void *elem) {
-
-  if (!qh_setin (*set, elem)) {
-    qh_setappend (set, elem);
-    return 1;
-  }
-  return 0;
-} /* setunique */
-    
-/*---------------------------------
-  
-  qh_setzero( set, index, size )
-    zero elements from index on
-    set actual size of set to size
-
-  notes:
-    set must be defined
-    the set becomes an indexed set (can not use FOREACH...)
-  
-  see also:
-    qh_settruncate
-    
-  design:
-    check index and size
-    update actual size
-    zero elements starting at e[index]   
-*/
-void qh_setzero (setT *set, int index, int size) {
-  int count;
-
-  if (index < 0 || index >= size || size > set->maxsize) {
-    fprintf (qhmem.ferr, "qhull internal error (qh_setzero): index %d or size %d out of bounds for set:\n", index, size);
-    qh_setprint (qhmem.ferr, "", set);
-    qh_errexit (qhmem_ERRqhull, NULL, NULL);
-  }
-  set->e[set->maxsize].i=  size+1;  /* may be overwritten */
-  count= size - index + 1;   /* +1 for NULL terminator */
-  memset ((char *)SETelemaddr_(set, index, void), 0, count * SETelemsize);
-} /* setzero */
-
-    
diff --git a/extern/qhull/src/qset.h b/extern/qhull/src/qset.h
deleted file mode 100644
index 6c0ff758de4..00000000000
--- a/extern/qhull/src/qset.h
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
  ---------------------------------
-
-   qset.h
-     header file for qset.c that implements set
-
-   see qh-set.htm and qset.c
-   
-   only uses mem.c, malloc/free
-
-   for error handling, writes message and calls
-      qh_errexit (qhmem_ERRqhull, NULL, NULL);
-   
-   set operations satisfy the following properties:
-    - sets have a max size, the actual size (if different) is stored at the end
-    - every set is NULL terminated
-    - sets may be sorted or unsorted, the caller must distinguish this
-   
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#ifndef qhDEFset
-#define qhDEFset 1
-
-/*================= -structures- ===============*/
-
-#ifndef DEFsetT
-#define DEFsetT 1
-typedef struct setT setT;   /* a set is a sorted or unsorted array of pointers */
-#endif
-
-/*------------------------------------------
-   
-setT
-  a set or list of pointers with maximum size and actual size.
-
-variations:
-  unsorted, unique   -- a list of unique pointers with NULL terminator
-  			   user guarantees uniqueness
-  sorted	     -- a sorted list of unique pointers with NULL terminator
-  			   qset.c guarantees uniqueness
-  unsorted           -- a list of pointers terminated with NULL
-  indexed  	     -- an array of pointers with NULL elements 
-
-structure for set of n elements:
-
-	--------------
-	|  maxsize 
-	--------------
-	|  e[0] - a pointer, may be NULL for indexed sets
-	--------------
-	|  e[1]
-	
-	--------------
-	|  ...
-	--------------
-	|  e[n-1]
-	--------------
-	|  e[n] = NULL
-	--------------
-	|  ...
-	--------------
-	|  e[maxsize] - n+1 or NULL (determines actual size of set)
-	--------------
-
-*/
-
-/*-- setelemT -- internal type to allow both pointers and indices
-*/
-typedef union setelemT setelemT;
-union setelemT {
-  void    *p;
-  int      i;         /* integer used for e[maxSize] */
-};
-
-struct setT {
-  int maxsize;          /* maximum number of elements (except NULL) */
-  setelemT e[1];        /* array of pointers, tail is NULL */
-                        /* last slot (unless NULL) is actual size+1 
-                           e[maxsize]==NULL or e[e[maxsize]-1]==NULL */
-                        /* this may generate a warning since e[] contains
-			   maxsize elements */
-};
-
-/*=========== -constants- =========================*/
-
-/*-------------------------------------
-   
-  SETelemsize
-    size of a set element in bytes
-*/
-#define SETelemsize sizeof(setelemT) 
-
-
-/*=========== -macros- =========================*/
-
-/*-------------------------------------
-   
-   FOREACHsetelement_(type, set, variable)
-     define FOREACH iterator
-
-   declare:  
-     assumes *variable and **variablep are declared
-     no space in "variable)" [DEC Alpha cc compiler]
-
-   each iteration:
-     variable is set element
-     variablep is one beyond variable.  
-
-   to repeat an element:
-     variablep--; / *repeat* /
-
-   at exit:
-     variable is NULL at end of loop
-
-   example:  
-     #define FOREACHfacet_( facets ) FOREACHsetelement_( facetT, facets, facet )
-
-   notes:
-     use FOREACHsetelement_i_() if need index or include NULLs
-
-   WARNING: 
-     nested loops can't use the same variable (define another FOREACH)
-   
-     needs braces if nested inside another FOREACH
-     this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_(type, set, variable) \
-        if (((variable= NULL), set)) for(\
-          variable##p= (type **)&((set)->e[0].p); \
-	  (variable= *variable##p++);)
-
-/*------------------------------------------
-
-   FOREACHsetelement_i_(type, set, variable)
-     define indexed FOREACH iterator
-
-   declare:  
-     type *variable, variable_n, variable_i;
-
-   each iteration:
-     variable is set element, may be NULL
-     variable_i is index, variable_n is qh_setsize()
-
-   to repeat an element:
-     variable_i--; variable_n-- repeats for deleted element
-
-   at exit:
-     variable==NULL and variable_i==variable_n
-
-   example:
-     #define FOREACHfacet_i_( facets ) FOREACHsetelement_i_( facetT, facets, facet )
-   
-   WARNING: 
-     nested loops can't use the same variable (define another FOREACH)
-   
-     needs braces if nested inside another FOREACH
-     this includes intervening blocks, e.g. FOREACH...{ if () FOREACH...} )
-*/
-#define FOREACHsetelement_i_(type, set, variable) \
-        if (((variable= NULL), set)) for (\
-          variable##_i= 0, variable= (type *)((set)->e[0].p), \
-                   variable##_n= qh_setsize(set);\
-          variable##_i < variable##_n;\
-          variable= (type *)((set)->e[++variable##_i].p) )
-
-/*----------------------------------------
-
-   FOREACHsetelementreverse_(type, set, variable)- 
-     define FOREACH iterator in reverse order
-
-   declare:  
-     assumes *variable and **variablep are declared
-     also declare 'int variabletemp'
-
-   each iteration:
-     variable is set element
-
-   to repeat an element:
-     variabletemp++; / *repeat* /
-
-   at exit:
-     variable is NULL
-
-   example:
-     #define FOREACHvertexreverse_( vertices ) FOREACHsetelementreverse_( vertexT, vertices, vertex )
-  
-   notes:
-     use FOREACHsetelementreverse12_() to reverse first two elements
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse_(type, set, variable) \
-        if (((variable= NULL), set)) for(\
-	   variable##temp= qh_setsize(set)-1, variable= qh_setlast(set);\
-	   variable; variable= \
-	   ((--variable##temp >= 0) ? SETelemt_(set, variable##temp, type) : NULL))
-
-/*-------------------------------------
-
-   FOREACHsetelementreverse12_(type, set, variable)- 
-     define FOREACH iterator with e[1] and e[0] reversed
-
-   declare:  
-     assumes *variable and **variablep are declared
-
-   each iteration:
-     variable is set element
-     variablep is one after variable.  
-
-   to repeat an element:
-     variablep--; / *repeat* /
-
-   at exit:
-     variable is NULL at end of loop
-  
-   example
-     #define FOREACHvertexreverse12_( vertices ) FOREACHsetelementreverse12_( vertexT, vertices, vertex )
-
-   notes:
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHsetelementreverse12_(type, set, variable) \
-        if (((variable= NULL), set)) for(\
-          variable##p= (type **)&((set)->e[1].p); \
-	  (variable= *variable##p); \
-          variable##p == ((type **)&((set)->e[0].p))?variable##p += 2: \
-	      (variable##p == ((type **)&((set)->e[1].p))?variable##p--:variable##p++))
-
-/*-------------------------------------
-
-   FOREACHelem_( set )- 
-     iterate elements in a set
-
-   declare:  
-     void *elem, *elemp;
-
-   each iteration:
-     elem is set element
-     elemp is one beyond
-
-   to repeat an element:
-     elemp--; / *repeat* /
-
-   at exit:
-     elem == NULL at end of loop
-  
-   example:
-     FOREACHelem_(set) {
-     
-   notes:
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHelem_(set) FOREACHsetelement_(void, set, elem)
-
-/*-------------------------------------
-
-   FOREACHset_( set )- 
-     iterate a set of sets
-
-   declare:  
-     setT *set, **setp;
-
-   each iteration:
-     set is set element
-     setp is one beyond
-
-   to repeat an element:
-     setp--; / *repeat* /
-
-   at exit:
-     set == NULL at end of loop
-  
-   example
-     FOREACHset_(sets) {
-     
-   notes:
-     WARNING: needs braces if nested inside another FOREACH
-*/
-#define FOREACHset_(sets) FOREACHsetelement_(setT, sets, set)
-
-/*-------------------------------------------
-
-   SETindex_( set, elem )
-     return index of elem in set
-
-   notes:   
-     for use with FOREACH iteration
-
-   example:
-     i= SETindex_(ridges, ridge)
-*/
-#define SETindex_(set, elem) ((void **)elem##p - (void **)&(set)->e[1].p)
-
-/*-----------------------------------------
-
-   SETref_( elem )
-     l.h.s. for modifying the current element in a FOREACH iteration
-
-   example:
-     SETref_(ridge)= anotherridge;
-*/
-#define SETref_(elem) (elem##p[-1])
-
-/*-----------------------------------------
-
-   SETelem_(set, n)
-     return the n'th element of set
-   
-   notes:
-      assumes that n is valid [0..size] and that set is defined
-      use SETelemt_() for type cast
-*/
-#define SETelem_(set, n)           ((set)->e[n].p)
-
-/*-----------------------------------------
-
-   SETelemt_(set, n, type)
-     return the n'th element of set as a type
-   
-   notes:
-      assumes that n is valid [0..size] and that set is defined
-*/
-#define SETelemt_(set, n, type)    ((type*)((set)->e[n].p))
-
-/*-----------------------------------------
-
-   SETelemaddr_(set, n, type)
-     return address of the n'th element of a set
-   
-   notes:
-      assumes that n is valid [0..size] and set is defined 
-*/
-#define SETelemaddr_(set, n, type) ((type **)(&((set)->e[n].p)))
-
-/*-----------------------------------------
-
-   SETfirst_(set)
-     return first element of set
-   
-*/
-#define SETfirst_(set)             ((set)->e[0].p)
-
-/*-----------------------------------------
-
-   SETfirstt_(set, type)
-     return first element of set as a type
-   
-*/
-#define SETfirstt_(set, type)      ((type*)((set)->e[0].p))
-
-/*-----------------------------------------
-
-   SETsecond_(set)
-     return second element of set
-   
-*/
-#define SETsecond_(set)            ((set)->e[1].p)
-
-/*-----------------------------------------
-
-   SETsecondt_(set, type)
-     return second element of set as a type
-*/
-#define SETsecondt_(set, type)     ((type*)((set)->e[1].p))
-
-/*-----------------------------------------
-
-   SETaddr_(set, type)
-       return address of set's elements
-*/
-#define SETaddr_(set,type)	   ((type **)(&((set)->e[0].p)))
-
-/*-----------------------------------------
-
-   SETreturnsize_(set, size) 
-     return size of a set
-   
-   notes:
-      set must be defined
-      use qh_setsize(set) unless speed is critical
-*/
-#define SETreturnsize_(set, size) (((size)= ((set)->e[(set)->maxsize].i))?(--(size)):((size)= (set)->maxsize))
-
-/*-----------------------------------------
-
-   SETempty_(set) 
-     return true (1) if set is empty
-   
-   notes:
-      set may be NULL
-*/
-#define SETempty_(set) 	          (!set || (SETfirst_(set) ? 0:1))
-
-/*-----------------------------------------
-
-   SETtruncate_(set)
-     return first element of set
-
-   see:
-     qh_settruncate()
-   
-*/
-#define SETtruncate_(set, size) {set->e[set->maxsize].i= size+1; /* maybe overwritten */ \
-      set->e[size].p= NULL;}
-
-/*======= prototypes in alphabetical order ============*/
-
-void  qh_setaddsorted(setT **setp, void *elem);
-void  qh_setaddnth(setT **setp, int nth, void *newelem);
-void  qh_setappend(setT **setp, void *elem);
-void  qh_setappend_set(setT **setp, setT *setA);
-void  qh_setappend2ndlast(setT **setp, void *elem);
-void  qh_setcheck(setT *set, char *tname, int id);
-void  qh_setcompact(setT *set);
-setT *qh_setcopy(setT *set, int extra);
-void *qh_setdel(setT *set, void *elem);
-void *qh_setdellast(setT *set);
-void *qh_setdelnth(setT *set, int nth);
-void *qh_setdelnthsorted(setT *set, int nth);
-void *qh_setdelsorted(setT *set, void *newelem);
-setT *qh_setduplicate( setT *set, int elemsize);
-int   qh_setequal(setT *setA, setT *setB);
-int   qh_setequal_except (setT *setA, void *skipelemA, setT *setB, void *skipelemB);
-int   qh_setequal_skip (setT *setA, int skipA, setT *setB, int skipB);
-void  qh_setfree(setT **set);
-void  qh_setfree2( setT **setp, int elemsize);
-void  qh_setfreelong(setT **set);
-int   qh_setin(setT *set, void *setelem);
-int   qh_setindex(setT *set, void *setelem);
-void  qh_setlarger(setT **setp);
-void *qh_setlast(setT *set);
-setT *qh_setnew(int size);
-setT *qh_setnew_delnthsorted(setT *set, int size, int nth, int prepend);
-void  qh_setprint(FILE *fp, char* string, setT *set);
-void  qh_setreplace(setT *set, void *oldelem, void *newelem);
-int   qh_setsize(setT *set);
-setT *qh_settemp(int setsize);
-void  qh_settempfree(setT **set);
-void  qh_settempfree_all(void);
-setT *qh_settemppop(void);
-void  qh_settemppush(setT *set);
-void  qh_settruncate (setT *set, int size);
-int   qh_setunique (setT **set, void *elem);
-void  qh_setzero (setT *set, int index, int size);
-
-
-#endif /* qhDEFset */
diff --git a/extern/qhull/src/qvoronoi.c b/extern/qhull/src/qvoronoi.c
deleted file mode 100644
index ebeb7367b87..00000000000
--- a/extern/qhull/src/qvoronoi.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
  ---------------------------------
-
-   qvoronoi.c
-     compute Voronoi diagrams and furthest-point Voronoi
-     diagrams using qhull
-
-   see unix.c for full interface
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include 
-#include 
-#include 
-#include 
-
-#elif __cplusplus
-extern "C" {
-  int isatty (int);
-}
-
-#elif _MSC_VER
-#include 
-#define isatty _isatty
-
-#else
-int isatty (int);  /* returns 1 if stdin is a tty
-		   if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*---------------------------------
-
-  qh_prompt 
-    long prompt for qhull
-    
-  notes:
-    restricted version of qhull.c
- 
-  see:
-    concise prompt below
-*/  
-
-/* duplicated in qvoron_f.htm and qvoronoi.htm */
-char hidden_options[]=" d n m v H U Qb QB Qc Qf Qg Qi Qm Qr QR Qv Qx TR E V Fa FA FC Fp FS Ft FV Pv Gt Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 ";
-
-char qh_prompta[]= "\n\
-qvoronoi- compute the Voronoi diagram\n\
-    http://www.geom.umn.edu/software/qhull  %s\n\
-\n\
-input (stdin):\n\
-    first lines: dimension and number of points (or vice-versa).\n\
-    other lines: point coordinates, best if one point per line\n\
-    comments:    start with a non-numeric character\n\
-\n\
-options:\n\
-    Qu   - compute furthest-site Voronoi diagram\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-\n\
-Qhull control options:\n\
-    Qz   - add point-at-infinity to Voronoi diagram\n\
-    QJn  - randomly joggle input in range [-n,n]\n\
-%s%s%s%s";  /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
-    Qs   - search all points for the initial simplex\n\
-    QGn  - Voronoi vertices if visible from point n, -n if not\n\
-    QVn  - Voronoi vertices for input point n, -n if not\n\
-\n\
-";
-char qh_promptc[]= "\
-Trace options:\n\
-    T4   - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
-    Tc   - check frequently during execution\n\
-    Ts   - statistics\n\
-    Tv   - verify result: structure, convexity, and in-circle test\n\
-    Tz   - send all output to stdout\n\
-    TFn  - report summary when n or more facets created\n\
-    TI file - input data from file, no spaces or single quotes\n\
-    TO file - output results to file, may be enclosed in single quotes\n\
-    TPn  - turn on tracing when point n added to hull\n\
-     TMn - turn on tracing at merge n\n\
-     TWn - trace merge facets when width > n\n\
-    TVn  - stop qhull after adding point n, -n for before (see TCn)\n\
-     TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
-    Cn   - radius of centrum (roundoff added).  Merge facets if non-convex\n\
-     An  - cosine of maximum angle.  Merge facets if cosine > n or non-convex\n\
-           C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
-    Rn   - randomly perturb computations by a factor of [1-n,1+n]\n\
-    Wn   - min facet width for non-coincident point (before roundoff)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
-    s    - summary to stderr\n\
-    p    - Voronoi vertices\n\
-    o    - OFF format (dim, Voronoi vertices, and Voronoi regions)\n\
-    i    - Delaunay regions (use 'Pp' to avoid warning)\n\
-    f    - facet dump\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
-    Fc   - count plus coincident points (by Voronoi vertex)\n\
-    Fd   - use cdd format for input (homogeneous with offset first)\n\
-    FD   - use cdd format for output (offset first)\n\
-    FF   - facet dump without ridges\n\
-    Fi   - separating hyperplanes for bounded Voronoi regions\n\
-    FI   - ID for each Voronoi vertex\n\
-    Fm   - merge count for each Voronoi vertex (511 max)\n\
-    Fn   - count plus neighboring Voronoi vertices for each Voronoi vertex\n\
-    FN   - count and Voronoi vertices for each Voronoi region\n\
-    Fo   - separating hyperplanes for unbounded Voronoi regions\n\
-    FO   - options and precision constants\n\
-    FP   - nearest point and distance for each coincident point\n\
-    FQ   - command used for qvoronoi\n\
-    Fs   - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
-                    for output: #Voronoi regions, #Voronoi vertices,\n\
-                                #coincident points, #non-simplicial regions\n\
-                    #real (2), max outer plane and min vertex\n\
-    Fv   - Voronoi diagram as Voronoi vertices between adjacent input sites\n\
-    Fx   - extreme points of Delaunay triangulation (on convex hull)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview options (2-d only)\n\
-    Ga   - all points as dots\n\
-     Gp  -  coplanar points and vertices as radii\n\
-     Gv  -  vertices as spheres\n\
-    Gi   - inner planes only\n\
-     Gn  -  no planes\n\
-     Go  -  outer planes only\n\
-    Gc	 - centrums\n\
-    Gh   - hyperplane intersections\n\
-    Gr   - ridges\n\
-    GDn  - drop dimension n in 3-d and 4-d output\n\
-\n\
-Print options:\n\
-    PAn  - keep n largest Voronoi vertices by 'area'\n\
-    Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
-    PDk:n - drop facet if normal[k] >= n\n\
-    Pg   - print good Voronoi vertices (needs 'QGn' or 'QVn')\n\
-    PFn  - keep Voronoi vertices whose 'area' is at least n\n\
-    PG   - print neighbors of good Voronoi vertices\n\
-    PMn  - keep n Voronoi vertices with most merges\n\
-    Po   - force output.  If error, output neighborhood of facet\n\
-    Pp   - do not report precision problems\n\
-\n\
-    .    - list of all options\n\
-    -    - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt2
-    synopsis for qhull 
-*/  
-char qh_prompt2[]= "\n\
-qvoronoi- compute the Voronoi diagram. Qhull %s\n\
-    input (stdin): dimension, number of points, point coordinates\n\
-    comments start with a non-numeric character\n\
-\n\
-options (qvoronoi.htm):\n\
-    Qu   - compute furthest-site Voronoi diagram\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Tv   - verify result: structure, convexity, and in-circle test\n\
-    .    - concise list of all options\n\
-    -    - one-line description of all options\n\
-\n\
-output options (subset):\n\
-    s    - summary of results (default)\n\
-    p    - Voronoi vertices\n\
-    o    - OFF file format (dim, Voronoi vertices, and Voronoi regions)\n\
-    FN   - count and Voronoi vertices for each Voronoi region\n\
-    Fv   - Voronoi diagram as Voronoi vertices between adjacent input sites\n\
-    Fi   - separating hyperplanes for bounded regions, 'Fo' for unbounded\n\
-    G    - Geomview output (2-d only)\n\
-    QVn  - Voronoi vertices for input point n, -n if not\n\
-    TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
-rbox c P0 D2 | qvoronoi s o         rbox c P0 D2 | qvoronoi Fi\n\
-rbox c P0 D2 | qvoronoi Fo          rbox c P0 D2 | qvoronoi Fv\n\
-rbox c P0 D2 | qvoronoi s Qu Fv     rbox c P0 D2 | qvoronoi Qu Fo\n\
-rbox c G1 d D2 | qvoronoi s p       rbox c G1 d D2 | qvoronoi QJ s p\n\
-rbox c P0 D2 | qvoronoi s Fv QV0\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt3
-    concise prompt for qhull 
-*/  
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- OFF_format     p_vertices     i_delaunay     summary        facet_dump\n\
-\n\
- Fcoincident    Fd_cdd_in      FD_cdd_out     FF-dump-xridge Fi_bounded\n\
- Fxtremes       Fmerges        Fneighbors     FNeigh_region  FOptions\n\
- Fo_unbounded   FPoint_near    FQvoronoi      Fsummary       Fvoronoi\n\
- FIDs\n\
-\n\
- Gvertices      Gpoints        Gall_points    Gno_planes     Ginner\n\
- Gcentrums      Ghyperplanes   Gridges        Gouter         GDrop_dim\n\
-\n\
- PArea_keep     Pdrop d0:0D0   Pgood          PFacet_area_keep\n\
- PGood_neighbors PMerge_keep   Poutput_forced Pprecision_not\n\
-\n\
- QG_vertex_good QJoggle        Qsearch_1st    Qtriangulate   Qupper_voronoi\n\
- QV_point_good  Qzinfinite\n\
-\n\
- T4_trace       Tcheck_often   Tstatistics    Tverify        Tz_stdout\n\
- TFacet_log     TInput_file    TPoint_trace   TMerge_trace   TOutput_file\n\
- TWide_trace    TVertex_stop   TCone_stop\n\
-\n\
- Angle_max      Centrum_size   Random_dist    Wide_outside\n\
-";
-
-/*---------------------------------
-  
-  main( argc, argv )
-    processes the command line, calls qhull() to do the work, and exits
-  
-  design:
-    initializes data structures
-    reads points
-    finishes initialization
-    computes convex hull and other structures
-    checks the result
-    writes the output
-    frees memory
-*/
-int main(int argc, char *argv[]) {
-  int curlong, totlong; /* used !qh_NOmem */
-  int exitcode, numpoints, dim;
-  coordT *points;
-  boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
-  char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
-  SIOUXSettings.showstatusline= false;
-  SIOUXSettings.tabspaces= 1;
-  SIOUXSettings.rows= 40;
-  if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0   /* w/o, SIOUX I/O is slow*/
-  || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
-  || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0)) 
-    fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
-  argc= ccommand(&argv);
-#endif
-
-  if ((argc == 1) && isatty( 0 /*stdin*/)) {      
-    fprintf(stdout, qh_prompt2, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompta, qh_VERSION,  
-		qh_promptb, qh_promptc, qh_promptd, qh_prompte);
-    exit(qh_ERRnone);
-  }
-  if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompt3, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  qh_init_A (stdin, stdout, stderr, argc, argv);  /* sets qh qhull_command */
-  exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
-  if (!exitcode) {
-    qh_option ("voronoi  _bbound-last  _coplanar-keep", NULL, NULL);
-    qh DELAUNAY= True;     /* 'v'   */
-    qh VORONOI= True; 
-    qh SCALElast= True;    /* 'Qbb' */
-    qh_checkflags (qh qhull_command, hidden_options);
-    qh_initflags (qh qhull_command);
-    points= qh_readpoints (&numpoints, &dim, &ismalloc);
-    if (dim >= 5) {
-      qh_option ("_merge-exact", NULL, NULL);
-      qh MERGEexact= True; /* 'Qx' always */
-    }
-    qh_init_B (points, numpoints, dim, ismalloc);
-    qh_qhull();
-    qh_check_output();
-    qh_produce_output();
-    if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points();
-    exitcode= qh_ERRnone;
-  }
-  qh NOerrexit= True;  /* no more setjmp */
-#ifdef qh_NOmem
-  qh_freeqhull( True);
-#else
-  qh_freeqhull( False);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong) 
-    fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-#endif
-  return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/rbox.c b/extern/qhull/src/rbox.c
deleted file mode 100644
index 1c288bddc96..00000000000
--- a/extern/qhull/src/rbox.c
+++ /dev/null
@@ -1,788 +0,0 @@
-/*
  ---------------------------------
-
-   rbox.c
-     Generate input points for qhull.
-   
-   notes:
-     50 points generated for 'rbox D4'
-
-     This code needs a full rewrite.  It needs separate procedures for each 
-     distribution with common, helper procedures.
-   
-   WARNING: 
-     incorrect range if qh_RANDOMmax is defined wrong (user.h)
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "user.h"
-#if __MWERKS__ && __POWERPC__
-#include 
-#include 
-#include 
-#include 
-#endif
-
-#ifdef _MSC_VER  /* Microsoft Visual C++ */
-#pragma warning( disable : 4244)  /* conversion from double to int */
-#endif
-
-#define MINVALUE 0.8
-#define MAXdim 200
-#define PI 3.1415926535897932384
-#define DEFAULTzbox 1e6
-
-char prompt[]= "\n\
--rbox- generate various point distributions.  Default is random in cube.\n\
-\n\
-args (any order, space separated):                    Version: 2001/06/24\n\
-  3000    number of random points in cube, lens, spiral, sphere or grid\n\
-  D3      dimension 3-d\n\
-  c       add a unit cube to the output ('c G2.0' sets size)\n\
-  d       add a unit diamond to the output ('d G2.0' sets size)\n\
-  l       generate a regular 3-d spiral\n\
-  r       generate a regular polygon, ('r s Z1 G0.1' makes a cone)\n\
-  s       generate cospherical points\n\
-  x       generate random points in simplex, may use 'r' or 'Wn'\n\
-  y       same as 'x', plus simplex\n\
-  Pn,m,r  add point [n,m,r] first, pads with 0\n\
-\n\
-  Ln      lens distribution of radius n.  Also 's', 'r', 'G', 'W'.\n\
-  Mn,m,r  lattice (Mesh) rotated by [n,-m,0], [m,n,0], [0,0,r], ...\n\
-          '27 M1,0,1' is {0,1,2} x {0,1,2} x {0,1,2}.  Try 'M3,4 z'.\n\
-  W0.1    random distribution within 0.1 of the cube's or sphere's surface\n\
-  Z0.5 s  random points in a 0.5 disk projected to a sphere\n\
-  Z0.5 s G0.6 same as Z0.5 within a 0.6 gap\n\
-\n\
-  Bn      bounding box coordinates, default %2.2g\n\
-  h       output as homogeneous coordinates for cdd\n\
-  n       remove command line from the first line of output\n\
-  On      offset coordinates by n\n\
-  t       use time as the random number seed (default is command line)\n\
-  tn      use n as the random number seed\n\
-  z       print integer coordinates, default 'Bn' is %2.2g\n\
-";
-
-/* ------------------------------ prototypes ----------------*/
-int roundi( double a);
-void out1( double a);
-void out2n( double a, double b);
-void out3n( double a, double b, double c);
-int     qh_rand( void);
-void    qh_srand( int seed);
-
-
-/* ------------------------------ globals -------------------*/
-
-    FILE *fp;
-    int isinteger= 0;
-    double out_offset= 0.0;
-
-
-/*--------------------------------------------
--rbox-  main procedure of rbox application
-*/
-int main(int argc, char **argv) {
-    int i,j,k;
-    int gendim;
-    int cubesize, diamondsize, seed=0, count, apex;
-    int dim=3 , numpoints= 0, totpoints, addpoints=0;
-    int issphere=0, isaxis=0,  iscdd= 0, islens= 0, isregular=0, iswidth=0, addcube=0;
-    int isgap=0, isspiral=0, NOcommand= 0, adddiamond=0, istime=0;
-    int isbox=0, issimplex=0, issimplex2=0, ismesh=0;
-    double width=0.0, gap=0.0, radius= 0.0;
-    double coord[MAXdim], offset, meshm=3.0, meshn=4.0, meshr=5.0;
-    double *simplex, *simplexp;
-    int nthroot, mult[MAXdim];
-    double norm, factor, randr, rangap, lensangle= 0, lensbase= 1;
-    double anglediff, angle, x, y, cube= 0.0, diamond= 0.0;
-    double box= qh_DEFAULTbox; /* scale all numbers before output */
-    double randmax= qh_RANDOMmax;
-    char command[200], *s, seedbuf[200];    
-    time_t timedata;
-
-#if __MWERKS__ && __POWERPC__
-    char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
-    SIOUXSettings.showstatusline= False;
-    SIOUXSettings.tabspaces= 1;
-    SIOUXSettings.rows= 40;
-    if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0   /* w/o, SIOUX I/O is slow*/
-    || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
-    || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0)) 
-      	fprintf ( stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
-    argc= ccommand(&argv);
-#endif
-    if (argc == 1) {
- 	printf (prompt, box, DEFAULTzbox);
-    	exit(1);
-    }
-    if ((s = strrchr( argv[0], '\\'))) /* Borland gives full path */
-      strcpy (command, s+1);
-    else
-      strcpy (command, argv[0]);
-    if ((s= strstr (command, ".EXE"))
-    ||  (s= strstr (command, ".exe")))
-      *s= '\0';
-    /* ============= read flags =============== */
-    for (i=1; i < argc; i++) {
-  	if (strlen (command) + strlen(argv[i]) + 1 < sizeof(command) ) {
-	    strcat (command, " ");
-	    strcat (command, argv[i]);
-	}
-        if (isdigit (argv[i][0])) {
-      	    numpoints= atoi (argv[i]);
-      	    continue;
-	}
-	if (argv[i][0] == '-')
-	  (argv[i])++;
-        switch (argv[i][0]) {
-	  case 'c':
-	    addcube= 1;
-	    if (i+1 < argc && argv[i+1][0] == 'G')
-	      cube= (double) atof (&argv[++i][1]);
-	    break;
-	  case 'd':
-	    adddiamond= 1;
-	    if (i+1 < argc && argv[i+1][0] == 'G')
-	      diamond= (double) atof (&argv[++i][1]);
-	    break;
-	  case 'h':
-	    iscdd= 1;
-            break;
-	  case 'l':
-	    isspiral= 1;
-            break;
-	  case 'n':
-	    NOcommand= 1;
-	    break;
-	  case 'r':
-	    isregular= 1;
-	    break;
-	  case 's':
-	    issphere= 1;
-            break;
-	  case 't':
-	    istime= 1;
-	    if (isdigit (argv[i][1]))
-	      seed= atoi (&argv[i][1]);
-	    else {
-	      seed= time (&timedata);
-	      sprintf (seedbuf, "%d", seed);
-	      strcat (command, seedbuf);
-	    }
-            break;
-	  case 'x':
-	    issimplex= 1;
-	    break;
-	  case 'y':
-	    issimplex2= 1;
-	    break;
-	  case 'z':
-	    isinteger= 1;
-	    break;
-	  case 'B':
-	    box= (double) atof (&argv[i][1]);
-	    isbox= 1;
-	    break;
-	  case 'D':
-	    dim= atoi (&argv[i][1]);
-	    if (dim < 1
-	    || dim > MAXdim) {
-		fprintf (stderr, "rbox error: dim %d too large or too small\n", dim);
-		exit (1);
-	    }
-            break;
-	  case 'G':
-	    if (argv[i][1])
-	      gap= (double) atof (&argv[i][1]);
-	    else
-	      gap= 0.5;
-	    isgap= 1;
-	    break;
-	  case 'L':
-	    if (argv[i][1])
-	      radius= (double) atof (&argv[i][1]);
-	    else
-	      radius= 10;
-	    islens= 1;
-	    break;
-	  case 'M':
-	    ismesh= 1;
-    	    s= argv[i]+1;
-	    if (*s)
-	      meshn= strtod (s, &s);
-	    if (*s == ',')
-	      meshm= strtod (++s, &s);
-	    else
-	      meshm= 0.0;
-	    if (*s == ',')
-	      meshr= strtod (++s, &s);
-	    else
-	      meshr= sqrt (meshn*meshn + meshm*meshm);
-	    if (*s) {
-	      fprintf (stderr, "rbox warning: assuming 'M3,4,5' since mesh args are not integers or reals\n");
-	      meshn= 3.0, meshm=4.0, meshr=5.0;
-	    }
-	    break;
-	  case 'O':
-	    out_offset= (double) atof (&argv[i][1]);
-	    break;
-	  case 'P':
-	    addpoints++;
-	    break;
-	  case 'W':
-	    width= (double) atof (&argv[i][1]);
-	    iswidth= 1;
-	    break;
-	  case 'Z':
-	    if (argv[i][1])
-	      radius= (double) atof (&argv[i][1]);
-	    else
-	      radius= 1.0;
-	    isaxis= 1;
-	    break;
-	  default:
-            fprintf (stderr, "rbox warning: unknown flag %s.\nExecute 'rbox' without arguments for documentation.\n", argv[i]);
-	}
-    }
-    /* ============= defaults, constants, and sizes =============== */
-    if (isinteger && !isbox)
-      box= DEFAULTzbox;
-    if (addcube) {
-      cubesize= floor(ldexp(1.0,dim)+0.5);
-      if (cube == 0.0)
-        cube= box;
-    }else
-      cubesize= 0;
-    if (adddiamond) {
-      diamondsize= 2*dim;
-      if (diamond == 0.0)
-        diamond= box;
-    }else
-      diamondsize= 0;
-    if (islens) {
-      if (isaxis) {
-  	fprintf (stderr, "rbox error: can not combine 'Ln' with 'Zn'\n");
-  	exit(1);
-      }
-      if (radius <= 1.0) {
-  	fprintf (stderr, "rbox error: lens radius %.2g should be greater than 1.0\n",
-  	       radius);
-  	exit(1);
-      }
-      lensangle= asin (1.0/radius);
-      lensbase= radius * cos (lensangle);
-    }
-    if (!numpoints) {
-      if (issimplex2)
-	; /* ok */
-      else if (isregular + issimplex + islens + issphere + isaxis + isspiral + iswidth + ismesh) {
-	fprintf (stderr, "rbox error: missing count\n");
-	exit(1);
-      }else if (adddiamond + addcube + addpoints)
-	; /* ok */
-      else { 
-	numpoints= 50;  /* ./rbox D4 is the test case */
-	issphere= 1;
-      }
-    }
-    if ((issimplex + islens + isspiral + ismesh > 1) 
-    || (issimplex + issphere + isspiral + ismesh > 1)) {
-      fprintf (stderr, "rbox error: can only specify one of 'l', 's', 'x', 'Ln', or 'Mn,m,r' ('Ln s' is ok).\n");
-      exit(1);
-    }
-    fp= stdout;
-    /* ============= print header with total points =============== */
-    if (issimplex || ismesh)
-      totpoints= numpoints;
-    else if (issimplex2)
-      totpoints= numpoints+dim+1;
-    else if (isregular) {
-      totpoints= numpoints;
-      if (dim == 2) {
-      	if (islens)
-      	  totpoints += numpoints - 2;
-      }else if (dim == 3) {
-      	if (islens)
-      	  totpoints += 2 * numpoints;
-        else if (isgap)
-          totpoints += 1 + numpoints;
-        else
-          totpoints += 2;
-      }
-    }else
-      totpoints= numpoints + isaxis;
-    totpoints += cubesize + diamondsize + addpoints;
-    if (iscdd) 
-      fprintf(fp, "%s\nbegin\n        %d %d %s\n", 
-            NOcommand ? "" : command, 
-            totpoints, dim+1,
-            isinteger ? "integer" : "real");
-    else if (NOcommand)
-      fprintf(fp,  "%d\n%d\n", dim, totpoints);
-    else
-      fprintf(fp,  "%d %s\n%d\n", dim, command, totpoints);
-    /* ============= seed randoms =============== */
-    if (istime == 0) {
-      for (s=command; *s; s++) {
-	if (issimplex2 && *s == 'y') /* make 'y' same seed as 'x' */
-	  i= 'x';
-	else
-	  i= *s;
-	seed= 11*seed + i;
-      }
-    } /* else, seed explicitly set to n or to time */
-    qh_RANDOMseed_(seed);
-    /* ============= explicit points =============== */
-    for (i=1; i < argc; i++) {
-      if (argv[i][0] == 'P') {
-	s= argv[i]+1;
-	count= 0;
-	if (iscdd)
-	  out1( 1.0);
-	while (*s) {
-	  out1( strtod (s, &s));
-	  count++;
-	  if (*s) { 
-	    if (*s++ != ',') {
-	      fprintf (stderr, "rbox error: missing comma after coordinate in %s\n\n", argv[i]);
-	      exit (1);
-	    }
-          }
-	}
-	if (count < dim) {
-	  for (k= dim-count; k--; )
-	    out1( 0.0);
-	}else if (count > dim) {
-	  fprintf (stderr, "rbox error: %d coordinates instead of %d coordinates in %s\n\n", 
-                 count, dim, argv[i]);
-	  exit (1);
-	}
-	fprintf (fp, "\n");
-      }
-    }
-    /* ============= simplex distribution =============== */
-    if (issimplex+issimplex2) {
-      if (!(simplex= malloc( dim * (dim+1) * sizeof(double)))) {
-	fprintf (stderr, "insufficient memory for simplex\n");
-	exit(0);
-      }
-      simplexp= simplex;
-      if (isregular) {
-        for (i= 0; i randmax/2)
-	    coord[dim-1]= -coord[dim-1];
-	/* ============= project 'Wn' point toward boundary =============== */
-	}else if (iswidth && !issphere) {
-	  j= qh_RANDOMint % gendim;
-	  if (coord[j] < 0)
-	    coord[j]= -1.0 - coord[j] * width;
-	  else
-	    coord[j]= 1.0 - coord[j] * width;
-	}
-	/* ============= write point =============== */
-	if (iscdd)
-	  out1( 1.0);
-	for (k=0; k < dim; k++) 
-	  out1( coord[k] * box);
-	fprintf (fp, "\n");
-      }
-    }
-    /* ============= write cube vertices =============== */
-    if (addcube) {
-      for (j=0; j=0; k--) {
-	  if (j & ( 1 << k))
-	    out1( cube);
-	  else
-	    out1( -cube);
-	}
-	fprintf (fp, "\n");
-      }
-    }
-    /* ============= write diamond vertices =============== */
-    if (adddiamond) {
-      for (j=0; j=0; k--) {
-	  if (j/2 != k)
-	    out1( 0.0);
-	  else if (j & 0x1)
-	    out1( diamond);
-	  else
-	    out1( -diamond);
-	}
-	fprintf (fp, "\n");
-      }
-    }
-    if (iscdd)
-      fprintf (fp, "end\nhull\n");
-    return 0;
-  } /* rbox */
-
-/*------------------------------------------------
--outxxx - output functions
-*/
-int roundi( double a) {
-  if (a < 0.0) {
-    if (a - 0.5 < INT_MIN) {
-      fprintf(stderr, "rbox input error: coordinate %2.2g is too large.  Reduce 'Bn'\n", a);
-      exit (1);
-    }
-    return a - 0.5;
-  }else {
-    if (a + 0.5 > INT_MAX) {
-      fprintf(stderr, "rbox input error: coordinate %2.2g is too large.  Reduce 'Bn'\n", a);
-      exit (1);
-    }
-    return a + 0.5;
-  }
-} /* roundi */
-
-void out1(double a) {
-
-  if (isinteger) 
-    fprintf(fp, "%d ", roundi( a+out_offset));
-  else
-    fprintf(fp, qh_REAL_1, a+out_offset);
-} /* out1 */
-
-void out2n( double a, double b) {
-
-  if (isinteger)
-    fprintf(fp, "%d %d\n", roundi(a+out_offset), roundi(b+out_offset));
-  else
-    fprintf(fp, qh_REAL_2n, a+out_offset, b+out_offset);
-} /* out2n */
-
-void out3n( double a, double b, double c) { 
-
-  if (isinteger)
-    fprintf(fp, "%d %d %d\n", roundi(a+out_offset), roundi(b+out_offset), roundi(c+out_offset));
-  else
-    fprintf(fp, qh_REAL_3n, a+out_offset, b+out_offset, c+out_offset);
-} /* out3n */
-
-/*-------------------------------------------------
--rand & srand- generate pseudo-random number between 1 and 2^31 -2
-  from Park & Miller's minimimal standard random number generator
-  Communications of the ACM, 31:1192-1201, 1988.
-notes:
-  does not use 0 or 2^31 -1
-  this is silently enforced by qh_srand()
-  copied from geom2.c
-*/
-static int seed = 1;  /* global static */
-
-int qh_rand( void) {
-#define qh_rand_a 16807
-#define qh_rand_m 2147483647
-#define qh_rand_q 127773  /* m div a */
-#define qh_rand_r 2836    /* m mod a */
-  int lo, hi, test;
-
-  hi = seed / qh_rand_q;  /* seed div q */
-  lo = seed % qh_rand_q;  /* seed mod q */
-  test = qh_rand_a * lo - qh_rand_r * hi;
-  if (test > 0)
-    seed= test;
-  else
-    seed= test + qh_rand_m;
-  return seed;
-} /* rand */
-
-void qh_srand( int newseed) {
-  if (newseed < 1)
-    seed= 1;
-  else if (newseed >= qh_rand_m)
-    seed= qh_rand_m - 1;
-  else
-    seed= newseed;
-} /* qh_srand */
-
diff --git a/extern/qhull/src/stat.c b/extern/qhull/src/stat.c
deleted file mode 100644
index ede0323cb88..00000000000
--- a/extern/qhull/src/stat.c
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
  ---------------------------------
-
-   stat.c 
-   contains all statistics that are collected for qhull
-
-   see qh-stat.htm and stat.h
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include "qhull_a.h"
-
-/*============ global data structure ==========*/
-
-#if qh_QHpointer
-qhstatT *qh_qhstat=NULL;  /* global data structure */
-#else
-qhstatT qh_qhstat;   /* add "={0}" if this causes a compiler error */
-#endif
-
-/*========== functions in alphabetic order ================*/
-
-/*---------------------------------
-  
-  qh_allstatA()
-    define statistics in groups of 20
-
-  notes:
-    (otherwise, 'gcc -O2' uses too much memory)
-    uses qhstat.next
-*/
-void qh_allstatA (void) {
-  
-   /* zdef_(type,name,doc,average) */
-  zzdef_(zdoc, Zdoc2, "precision statistics", -1);
-  zdef_(zinc, Znewvertex, NULL, -1);
-  zdef_(wadd, Wnewvertex, "ave. distance of a new vertex to a facet (not 0s)", Znewvertex);
-  zzdef_(wmax, Wnewvertexmax, "max. distance of a new vertex to a facet", -1);
-  zdef_(wmax, Wvertexmax, "max. distance of an output vertex to a facet", -1);
-  zdef_(wmin, Wvertexmin, "min. distance of an output vertex to a facet", -1);
-  zdef_(wmin, Wmindenom, "min. denominator in hyperplane computation", -1);
-
-  qhstat precision= qhstat next;  /* call qh_precision for each of these */
-  zzdef_(zdoc, Zdoc3, "precision problems (corrected unless 'Q0' or an error)", -1);
-  zzdef_(zinc, Zcoplanarridges, "coplanar half ridges in output", -1);
-  zzdef_(zinc, Zconcaveridges, "concave half ridges in output", -1);
-  zzdef_(zinc, Zflippedfacets, "flipped facets", -1);
-  zzdef_(zinc, Zcoplanarhorizon, "coplanar horizon facets for new vertices", -1);
-  zzdef_(zinc, Zcoplanarpart, "coplanar points during partitioning", -1);
-  zzdef_(zinc, Zminnorm, "degenerate hyperplanes recomputed with gaussian elimination", -1);
-  zzdef_(zinc, Znearlysingular, "nearly singular or axis-parallel hyperplanes", -1);
-  zzdef_(zinc, Zback0, "zero divisors during back substitute", -1);
-  zzdef_(zinc, Zgauss0, "zero divisors during gaussian elimination", -1);
-  zzdef_(zinc, Zmultiridge, "ridges with multiple neighbors", -1);
-}
-void qh_allstatB (void) {
-  zzdef_(zdoc, Zdoc1, "summary information", -1);
-  zdef_(zinc, Zvertices, "number of vertices in output", -1);
-  zdef_(zinc, Znumfacets, "number of facets in output", -1);
-  zdef_(zinc, Znonsimplicial, "number of non-simplicial facets in output", -1);
-  zdef_(zinc, Znowsimplicial, "number of simplicial facets that were merged", -1);
-  zdef_(zinc, Znumridges, "number of ridges in output", -1);
-  zdef_(zadd, Znumridges, "average number of ridges per facet", Znumfacets);
-  zdef_(zmax, Zmaxridges, "maximum number of ridges", -1);
-  zdef_(zadd, Znumneighbors, "average number of neighbors per facet", Znumfacets);
-  zdef_(zmax, Zmaxneighbors, "maximum number of neighbors", -1);
-  zdef_(zadd, Znumvertices, "average number of vertices per facet", Znumfacets);
-  zdef_(zmax, Zmaxvertices, "maximum number of vertices", -1);
-  zdef_(zadd, Znumvneighbors, "average number of neighbors per vertex", Zvertices);
-  zdef_(zmax, Zmaxvneighbors, "maximum number of neighbors", -1);
-  zdef_(wadd, Wcpu, "cpu seconds for qhull after input", -1);
-  zdef_(zinc, Ztotvertices, "vertices created altogether", -1);
-  zzdef_(zinc, Zsetplane, "facets created altogether", -1);
-  zdef_(zinc, Ztotridges, "ridges created altogether", -1);
-  zdef_(zinc, Zpostfacets, "facets before post merge", -1);
-  zdef_(zadd, Znummergetot, "average merges per facet (at most 511)", Znumfacets);
-  zdef_(zmax, Znummergemax, "  maximum merges for a facet (at most 511)", -1);
-  zdef_(zinc, Zangle, NULL, -1);
-  zdef_(wadd, Wangle, "average angle (cosine) of facet normals for all ridges", Zangle);
-  zdef_(wmax, Wanglemax, "  maximum angle (cosine) of facet normals across a ridge", -1);
-  zdef_(wmin, Wanglemin, "  minimum angle (cosine) of facet normals across a ridge", -1);
-  zdef_(wadd, Wareatot, "total area of facets", -1);
-  zdef_(wmax, Wareamax, "  maximum facet area", -1);
-  zdef_(wmin, Wareamin, "  minimum facet area", -1);
-}  
-void qh_allstatC (void) {
-  zdef_(zdoc, Zdoc9, "build hull statistics", -1);
-  zzdef_(zinc, Zprocessed, "points processed", -1);
-  zzdef_(zinc, Zretry, "retries due to precision problems", -1);
-  zdef_(wmax, Wretrymax, "  max. random joggle", -1);
-  zdef_(zmax, Zmaxvertex, "max. vertices at any one time", -1);
-  zdef_(zinc, Ztotvisible, "ave. visible facets per iteration", Zprocessed);
-  zdef_(zinc, Zinsidevisible, "  ave. visible facets without an horizon neighbor", Zprocessed);
-  zdef_(zadd, Zvisfacettot,  "  ave. facets deleted per iteration", Zprocessed);
-  zdef_(zmax, Zvisfacetmax,  "    maximum", -1);
-  zdef_(zadd, Zvisvertextot, "ave. visible vertices per iteration", Zprocessed);
-  zdef_(zmax, Zvisvertexmax, "    maximum", -1);
-  zdef_(zinc, Ztothorizon, "ave. horizon facets per iteration", Zprocessed);
-  zdef_(zadd, Znewfacettot,  "ave. new or merged facets per iteration", Zprocessed);
-  zdef_(zmax, Znewfacetmax,  "    maximum (includes initial simplex)", -1);
-  zdef_(wadd, Wnewbalance, "average new facet balance", Zprocessed);
-  zdef_(wadd, Wnewbalance2, "  standard deviation", -1);
-  zdef_(wadd, Wpbalance, "average partition balance", Zpbalance);
-  zdef_(wadd, Wpbalance2, "  standard deviation", -1);
-  zdef_(zinc, Zpbalance, "  number of trials", -1);
-  zdef_(zinc, Zsearchpoints, "searches of all points for initial simplex", -1);
-  zdef_(zinc, Zdetsimplex, "determinants computed (area & initial hull)", -1);
-  zdef_(zinc, Znoarea, "determinants not computed because vertex too low", -1);
-  zdef_(zinc, Znotmax, "points ignored (not above max_outside)", -1);
-  zdef_(zinc, Znotgood, "points ignored (not above a good facet)", -1);
-  zdef_(zinc, Znotgoodnew, "points ignored (didn't create a good new facet)", -1);
-  zdef_(zinc, Zgoodfacet, "good facets found", -1);
-  zzdef_(zinc, Znumvisibility, "distance tests for facet visibility", -1);
-  zdef_(zinc, Zdistvertex, "distance tests to report minimum vertex", -1);
-  zdef_(zinc, Ztotcheck, "points checked for facets' outer planes", -1);
-  zzdef_(zinc, Zcheckpart, "  ave. distance tests per check", Ztotcheck);
-}
-void qh_allstatD(void) {
-  zdef_(zdoc, Zdoc4, "partitioning statistics (see previous for outer planes)", -1);
-  zzdef_(zadd, Zdelvertextot, "total vertices deleted", -1);
-  zdef_(zmax, Zdelvertexmax, "    maximum vertices deleted per iteration", -1);
-  zdef_(zinc, Zfindbest, "calls to findbest", -1);
-  zdef_(zadd, Zfindbesttot, " ave. facets tested", Zfindbest);
-  zdef_(zmax, Zfindbestmax, " max. facets tested", -1);
-  zdef_(zadd, Zfindcoplanar, " ave. coplanar search", Zfindbest);
-  zdef_(zinc, Zfindnew, "calls to findbestnew", -1);
-  zdef_(zadd, Zfindnewtot, " ave. facets tested", Zfindnew);
-  zdef_(zmax, Zfindnewmax, " max. facets tested", -1);
-  zdef_(zinc, Zfindnewjump, " ave. clearly better", Zfindnew);
-  zdef_(zinc, Zfindnewsharp, " calls due to qh_sharpnewfacets", -1);
-  zdef_(zinc, Zfindhorizon, "calls to findhorizon", -1);
-  zdef_(zadd, Zfindhorizontot, " ave. facets tested", Zfindhorizon);
-  zdef_(zmax, Zfindhorizonmax, " max. facets tested", -1);
-  zdef_(zinc, Zfindjump,       " ave. clearly better", Zfindhorizon);
-  zdef_(zinc, Zparthorizon, " horizon facets better than bestfacet", -1);
-  zdef_(zinc, Zpartangle, "angle tests for repartitioned coplanar points", -1);
-  zdef_(zinc, Zpartflip, "  repartitioned coplanar points for flipped orientation", -1);
-  zdef_(zinc, Zpartinside, "inside points", -1);
-  zdef_(zinc, Zpartnear, "  inside points kept with a facet", -1);
-  zdef_(zinc, Zcoplanarinside, "  inside points that were coplanar with a facet", -1);
-  zdef_(wadd, Wmaxout, "difference in max_outside at final check", -1);
-}
-void qh_allstatE(void) {
-  zzdef_(zinc, Zpartitionall, "distance tests for initial partition", -1);
-  zdef_(zinc, Ztotpartition, "partitions of a point", -1);
-  zzdef_(zinc, Zpartition, "distance tests for partitioning", -1);
-  zzdef_(zinc, Zdistcheck, "distance tests for checking flipped facets", -1); 
-  zzdef_(zinc, Zdistconvex, "distance tests for checking convexity", -1); 
-  zdef_(zinc, Zdistgood, "distance tests for checking good point", -1); 
-  zdef_(zinc, Zdistio, "distance tests for output", -1); 
-  zdef_(zinc, Zdiststat, "distance tests for statistics", -1); 
-  zdef_(zinc, Zdistplane, "total number of distance tests", -1);
-  zdef_(zinc, Ztotpartcoplanar, "partitions of coplanar points or deleted vertices", -1);
-  zzdef_(zinc, Zpartcoplanar, "   distance tests for these partitions", -1);
-  zdef_(zinc, Zcomputefurthest, "distance tests for computing furthest", -1);
-}
-void qh_allstatE2(void) {
-  zdef_(zdoc, Zdoc5, "statistics for matching ridges", -1);
-  zdef_(zinc, Zhashlookup, "total lookups for matching ridges of new facets", -1);
-  zdef_(zinc, Zhashtests, "average number of tests to match a ridge", Zhashlookup);
-  zdef_(zinc, Zhashridge, "total lookups of subridges (duplicates and boundary)", -1);
-  zdef_(zinc, Zhashridgetest, "average number of tests per subridge", Zhashridge);
-  zdef_(zinc, Zdupsame, "duplicated ridges in same merge cycle", -1);
-  zdef_(zinc, Zdupflip, "duplicated ridges with flipped facets", -1);
-
-  zdef_(zdoc, Zdoc6, "statistics for determining merges", -1);
-  zdef_(zinc, Zangletests, "angles computed for ridge convexity", -1);
-  zdef_(zinc, Zbestcentrum, "best merges used centrum instead of vertices",-1);
-  zzdef_(zinc, Zbestdist, "distance tests for best merge", -1);
-  zzdef_(zinc, Zcentrumtests, "distance tests for centrum convexity", -1);
-  zzdef_(zinc, Zdistzero, "distance tests for checking simplicial convexity", -1);
-  zdef_(zinc, Zcoplanarangle, "coplanar angles in getmergeset", -1);
-  zdef_(zinc, Zcoplanarcentrum, "coplanar centrums in getmergeset", -1);
-  zdef_(zinc, Zconcaveridge, "concave ridges in getmergeset", -1);
-}
-void qh_allstatF(void) {
-  zdef_(zdoc, Zdoc7, "statistics for merging", -1);
-  zdef_(zinc, Zpremergetot, "merge iterations", -1);
-  zdef_(zadd, Zmergeinittot, "ave. initial non-convex ridges per iteration", Zpremergetot);
-  zdef_(zadd, Zmergeinitmax, "  maximum", -1);
-  zdef_(zadd, Zmergesettot, "  ave. additional non-convex ridges per iteration", Zpremergetot);
-  zdef_(zadd, Zmergesetmax, "  maximum additional in one pass", -1);
-  zdef_(zadd, Zmergeinittot2, "initial non-convex ridges for post merging", -1);
-  zdef_(zadd, Zmergesettot2, "  additional non-convex ridges", -1);
-  zdef_(wmax, Wmaxoutside, "max distance of vertex or coplanar point above facet (w/roundoff)", -1);
-  zdef_(wmin, Wminvertex, "max distance of merged vertex below facet (or roundoff)", -1);
-  zdef_(zinc, Zwidefacet, "centrums frozen due to a wide merge", -1);
-  zdef_(zinc, Zwidevertices, "centrums frozen due to extra vertices", -1);
-  zzdef_(zinc, Ztotmerge, "total number of facets or cycles of facets merged", -1);
-  zdef_(zinc, Zmergesimplex, "merged a simplex", -1);
-  zdef_(zinc, Zonehorizon, "simplices merged into coplanar horizon", -1);
-  zzdef_(zinc, Zcyclehorizon, "cycles of facets merged into coplanar horizon", -1);
-  zzdef_(zadd, Zcyclefacettot, "  ave. facets per cycle", Zcyclehorizon);
-  zdef_(zmax, Zcyclefacetmax, "  max. facets", -1);
-  zdef_(zinc, Zmergeintohorizon, "new facets merged into horizon", -1);
-  zdef_(zinc, Zmergenew, "new facets merged", -1);
-  zdef_(zinc, Zmergehorizon, "horizon facets merged into new facets", -1);
-  zdef_(zinc, Zmergevertex, "vertices deleted by merging", -1);
-  zdef_(zinc, Zcyclevertex, "vertices deleted by merging into coplanar horizon", -1);
-  zdef_(zinc, Zdegenvertex, "vertices deleted by degenerate facet", -1);
-  zdef_(zinc, Zmergeflipdup, "merges due to flipped facets in duplicated ridge", -1);
-  zdef_(zinc, Zneighbor, "merges due to redundant neighbors", -1);
-  zdef_(zadd, Ztestvneighbor, "non-convex vertex neighbors", -1); 
-}
-void qh_allstatG(void) {
-  zdef_(zinc, Zacoplanar, "merges due to angle coplanar facets", -1);
-  zdef_(wadd, Wacoplanartot, "  average merge distance", Zacoplanar);
-  zdef_(wmax, Wacoplanarmax, "  maximum merge distance", -1);
-  zdef_(zinc, Zcoplanar, "merges due to coplanar facets", -1);
-  zdef_(wadd, Wcoplanartot, "  average merge distance", Zcoplanar);
-  zdef_(wmax, Wcoplanarmax, "  maximum merge distance", -1);
-  zdef_(zinc, Zconcave, "merges due to concave facets", -1);
-  zdef_(wadd, Wconcavetot, "  average merge distance", Zconcave);
-  zdef_(wmax, Wconcavemax, "  maximum merge distance", -1);
-  zdef_(zinc, Zavoidold, "coplanar/concave merges due to avoiding old merge", -1);
-  zdef_(wadd, Wavoidoldtot, "  average merge distance", Zavoidold);
-  zdef_(wmax, Wavoidoldmax, "  maximum merge distance", -1);
-  zdef_(zinc, Zdegen, "merges due to degenerate facets", -1);
-  zdef_(wadd, Wdegentot, "  average merge distance", Zdegen);
-  zdef_(wmax, Wdegenmax, "  maximum merge distance", -1);
-  zdef_(zinc, Zflipped, "merges due to removing flipped facets", -1);
-  zdef_(wadd, Wflippedtot, "  average merge distance", Zflipped);
-  zdef_(wmax, Wflippedmax, "  maximum merge distance", -1);
-  zdef_(zinc, Zduplicate, "merges due to duplicated ridges", -1);
-  zdef_(wadd, Wduplicatetot, "  average merge distance", Zduplicate);
-  zdef_(wmax, Wduplicatemax, "  maximum merge distance", -1);
-}
-void qh_allstatH(void) {
-  zdef_(zdoc, Zdoc8, "renamed vertex statistics", -1);
-  zdef_(zinc, Zrenameshare, "renamed vertices shared by two facets", -1);
-  zdef_(zinc, Zrenamepinch, "renamed vertices in a pinched facet", -1);
-  zdef_(zinc, Zrenameall, "renamed vertices shared by multiple facets", -1);
-  zdef_(zinc, Zfindfail, "rename failures due to duplicated ridges", -1);
-  zdef_(zinc, Zdupridge, "  duplicate ridges detected", -1);
-  zdef_(zinc, Zdelridge, "deleted ridges due to renamed vertices", -1);
-  zdef_(zinc, Zdropneighbor, "dropped neighbors due to renamed vertices", -1);
-  zdef_(zinc, Zdropdegen, "degenerate facets due to dropped neighbors", -1);
-  zdef_(zinc, Zdelfacetdup, "  facets deleted because of no neighbors", -1);
-  zdef_(zinc, Zremvertex, "vertices removed from facets due to no ridges", -1);
-  zdef_(zinc, Zremvertexdel, "  deleted", -1);
-  zdef_(zinc, Zintersectnum, "vertex intersections for locating redundant vertices", -1);
-  zdef_(zinc, Zintersectfail, "intersections failed to find a redundant vertex", -1);
-  zdef_(zinc, Zintersect, "intersections found redundant vertices", -1);
-  zdef_(zadd, Zintersecttot, "   ave. number found per vertex", Zintersect);
-  zdef_(zmax, Zintersectmax, "   max. found for a vertex", -1);
-  zdef_(zinc, Zvertexridge, NULL, -1);
-  zdef_(zadd, Zvertexridgetot, "  ave. number of ridges per tested vertex", Zvertexridge);
-  zdef_(zmax, Zvertexridgemax, "  max. number of ridges per tested vertex", -1);
-
-  zdef_(zdoc, Zdoc10, "memory usage statistics (in bytes)", -1);
-  zdef_(zadd, Zmemfacets, "for facets and their normals, neighbor and vertex sets", -1);
-  zdef_(zadd, Zmemvertices, "for vertices and their neighbor sets", -1);
-  zdef_(zadd, Zmempoints, "for input points and outside and coplanar sets",-1);
-  zdef_(zadd, Zmemridges, "for ridges and their vertex sets", -1);
-} /* allstat */
-
-void qh_allstatI(void) {
-  qhstat vridges= qhstat next;
-  zzdef_(zdoc, Zdoc11, "Voronoi ridge statistics", -1);
-  zzdef_(zinc, Zridge, "non-simplicial Voronoi vertices for all ridges", -1);
-  zzdef_(wadd, Wridge, "  ave. distance to ridge", Zridge);
-  zzdef_(wmax, Wridgemax, "  max. distance to ridge", -1);
-  zzdef_(zinc, Zridgemid, "bounded ridges", -1);
-  zzdef_(wadd, Wridgemid, "  ave. distance of midpoint to ridge", Zridgemid);
-  zzdef_(wmax, Wridgemidmax, "  max. distance of midpoint to ridge", -1);
-  zzdef_(zinc, Zridgeok, "bounded ridges with ok normal", -1);
-  zzdef_(wadd, Wridgeok, "  ave. angle to ridge", Zridgeok);
-  zzdef_(wmax, Wridgeokmax, "  max. angle to ridge", -1);
-  zzdef_(zinc, Zridge0, "bounded ridges with near-zero normal", -1);
-  zzdef_(wadd, Wridge0, "  ave. angle to ridge", Zridge0);
-  zzdef_(wmax, Wridge0max, "  max. angle to ridge", -1);
-
-  zdef_(zdoc, Zdoc12, "Triangulation statistics (Qt)", -1);
-  zdef_(zinc, Ztricoplanar, "non-simplicial facets triangulated", -1);
-  zdef_(zadd, Ztricoplanartot, "  ave. new facets created (may be deleted)", Ztricoplanar);
-  zdef_(zmax, Ztricoplanarmax, "  max. new facets created", -1);
-  zdef_(zinc, Ztrinull, "null new facets deleted (duplicated vertex)", -1);
-  zdef_(zinc, Ztrimirror, "mirrored pairs of new facets deleted (same vertices)", -1);
-  zdef_(zinc, Ztridegen, "degenerate new facets in output (same ridge)", -1);
-} /* allstat */
-
-/*---------------------------------
-  
-  qh_allstatistics()
-    reset printed flag for all statistics
-*/
-void qh_allstatistics (void) {
-  int i;
-  
-  for (i=ZEND; i--; ) 
-    qhstat printed[i]= False;
-} /* allstatistics */
-
-#if qh_KEEPstatistics
-/*---------------------------------
-  
-  qh_collectstatistics()
-    collect statistics for qh.facet_list
-
-*/
-void qh_collectstatistics (void) {
-  facetT *facet, *neighbor, **neighborp;
-  vertexT *vertex, **vertexp;
-  realT dotproduct, dist;
-  int sizneighbors, sizridges, sizvertices, i;
-  
-  qh old_randomdist= qh RANDOMdist;
-  qh RANDOMdist= False;
-  zval_(Zmempoints)= qh num_points * qh normal_size + 
-                             sizeof (qhT) + sizeof (qhstatT);
-  zval_(Zmemfacets)= 0;
-  zval_(Zmemridges)= 0;
-  zval_(Zmemvertices)= 0;
-  zval_(Zangle)= 0;
-  wval_(Wangle)= 0.0;
-  zval_(Znumridges)= 0;
-  zval_(Znumfacets)= 0;
-  zval_(Znumneighbors)= 0;
-  zval_(Znumvertices)= 0;
-  zval_(Znumvneighbors)= 0;
-  zval_(Znummergetot)= 0;
-  zval_(Znummergemax)= 0;
-  zval_(Zvertices)= qh num_vertices - qh_setsize (qh del_vertices);
-  if (qh MERGING || qh APPROXhull || qh JOGGLEmax < REALmax/2)
-    wmax_(Wmaxoutside, qh max_outside);
-  if (qh MERGING)
-    wmin_(Wminvertex, qh min_vertex);
-  FORALLfacets
-    facet->seen= False;
-  if (qh DELAUNAY) {
-    FORALLfacets {
-      if (facet->upperdelaunay != qh UPPERdelaunay)
-        facet->seen= True; /* remove from angle statistics */
-    }
-  }
-  FORALLfacets {
-    if (facet->visible && qh NEWfacets)
-      continue;
-    sizvertices= qh_setsize (facet->vertices);
-    sizneighbors= qh_setsize (facet->neighbors);
-    sizridges= qh_setsize (facet->ridges);
-    zinc_(Znumfacets);
-    zadd_(Znumvertices, sizvertices);
-    zmax_(Zmaxvertices, sizvertices);
-    zadd_(Znumneighbors, sizneighbors);
-    zmax_(Zmaxneighbors, sizneighbors);
-    zadd_(Znummergetot, facet->nummerge);
-    i= facet->nummerge; /* avoid warnings */
-    zmax_(Znummergemax, i); 
-    if (!facet->simplicial) {
-      if (sizvertices == qh hull_dim) {
-	zinc_(Znowsimplicial);
-      }else {
-        zinc_(Znonsimplicial);
-      }
-    }
-    if (sizridges) {
-      zadd_(Znumridges, sizridges);
-      zmax_(Zmaxridges, sizridges);
-    }
-    zadd_(Zmemfacets, sizeof (facetT) + qh normal_size + 2*sizeof (setT) 
-       + SETelemsize * (sizneighbors + sizvertices));
-    if (facet->ridges) {
-      zadd_(Zmemridges,
-	 sizeof (setT) + SETelemsize * sizridges + sizridges * 
-         (sizeof (ridgeT) + sizeof (setT) + SETelemsize * (qh hull_dim-1))/2);
-    }
-    if (facet->outsideset)
-      zadd_(Zmempoints, sizeof (setT) + SETelemsize * qh_setsize (facet->outsideset));
-    if (facet->coplanarset)
-      zadd_(Zmempoints, sizeof (setT) + SETelemsize * qh_setsize (facet->coplanarset));
-    if (facet->seen) /* Delaunay upper envelope */
-      continue;
-    facet->seen= True;
-    FOREACHneighbor_(facet) {
-      if (neighbor == qh_DUPLICATEridge || neighbor == qh_MERGEridge
-	  || neighbor->seen || !facet->normal || !neighbor->normal)
-	continue;
-      dotproduct= qh_getangle(facet->normal, neighbor->normal);
-      zinc_(Zangle);
-      wadd_(Wangle, dotproduct);
-      wmax_(Wanglemax, dotproduct)
-      wmin_(Wanglemin, dotproduct)
-    }
-    if (facet->normal) {
-      FOREACHvertex_(facet->vertices) {
-        zinc_(Zdiststat);
-        qh_distplane(vertex->point, facet, &dist);
-        wmax_(Wvertexmax, dist);
-        wmin_(Wvertexmin, dist);
-      }
-    }
-  }
-  FORALLvertices {
-    if (vertex->deleted)
-      continue;
-    zadd_(Zmemvertices, sizeof (vertexT));
-    if (vertex->neighbors) {
-      sizneighbors= qh_setsize (vertex->neighbors);
-      zadd_(Znumvneighbors, sizneighbors);
-      zmax_(Zmaxvneighbors, sizneighbors);
-      zadd_(Zmemvertices, sizeof (vertexT) + SETelemsize * sizneighbors);
-    }
-  }
-  qh RANDOMdist= qh old_randomdist;
-} /* collectstatistics */
-#endif /* qh_KEEPstatistics */
-
-/*---------------------------------
-  
-  qh_freestatistics(  )
-    free memory used for statistics
-*/
-void qh_freestatistics (void) {
-
-#if qh_QHpointer
-  free (qh_qhstat);
-  qh_qhstat= NULL;
-#endif
-} /* freestatistics */
-
-/*---------------------------------
-  
-  qh_initstatistics(  )
-    allocate and initialize statistics
-
-  notes:
-    uses malloc() instead of qh_memalloc() since mem.c not set up yet
-*/
-void qh_initstatistics (void) {
-  int i;
-  realT realx;
-  int intx;
-
-#if qh_QHpointer
-  if (!(qh_qhstat= (qhstatT *)malloc (sizeof(qhstatT)))) {
-    fprintf (qhmem.ferr, "qhull error (qh_initstatistics): insufficient memory\n");
-    exit (1);  /* can not use qh_errexit() */
-  }
-#endif
-  
-  qhstat next= 0;
-  qh_allstatA();
-  qh_allstatB();
-  qh_allstatC();
-  qh_allstatD();
-  qh_allstatE();
-  qh_allstatE2();
-  qh_allstatF();
-  qh_allstatG();
-  qh_allstatH();
-  qh_allstatI();
-  if (qhstat next > sizeof(qhstat id)) {
-    fprintf (qhmem.ferr, "qhull error (qh_initstatistics): increase size of qhstat.id[].\n\
-      qhstat.next %d should be <= sizeof(qhstat id) %ld\n", qhstat next, sizeof(qhstat id));
-#if 0 /* for locating error, Znumridges should be duplicated */
-    for (i=0; i < ZEND; i++) {
-      int j;
-      for (j=i+1; j < ZEND; j++) {
-	if (qhstat id[i] == qhstat id[j]) {
-          fprintf (qhmem.ferr, "qhull error (qh_initstatistics): duplicated statistic %d at indices %d and %d\n", 
-	      qhstat id[i], i, j);
-	}
-      }
-    }
-#endif 
-    exit (1);  /* can not use qh_errexit() */
-  }
-  qhstat init[zinc].i= 0;
-  qhstat init[zadd].i= 0;
-  qhstat init[zmin].i= INT_MAX;
-  qhstat init[zmax].i= INT_MIN;
-  qhstat init[wadd].r= 0;
-  qhstat init[wmin].r= REALmax;
-  qhstat init[wmax].r= -REALmax;
-  for (i=0; i < ZEND; i++) {
-    if (qhstat type[i] > ZTYPEreal) {
-      realx= qhstat init[(unsigned char)(qhstat type[i])].r;
-      qhstat stats[i].r= realx;
-    }else if (qhstat type[i] != zdoc) {
-      intx= qhstat init[(unsigned char)(qhstat type[i])].i;
-      qhstat stats[i].i= intx;
-    }
-  }
-} /* initstatistics */
-
-/*---------------------------------
-  
-  qh_newstats(  )
-    returns True if statistics for zdoc
-
-  returns:
-    next zdoc
-*/
-boolT qh_newstats (int index, int *nextindex) {
-  boolT isnew= False;
-  int start, i;
-
-  if (qhstat type[qhstat id[index]] == zdoc) 
-    start= index+1;
-  else
-    start= index;
-  for (i= start; i < qhstat next && qhstat type[qhstat id[i]] != zdoc; i++) {
-    if (!qh_nostatistic(qhstat id[i]) && !qhstat printed[qhstat id[i]])
-	isnew= True;
-  }
-  *nextindex= i;
-  return isnew;
-} /* newstats */
-
-/*---------------------------------
-  
-  qh_nostatistic( index )
-    true if no statistic to print
-*/
-boolT qh_nostatistic (int i) {
-  
-  if ((qhstat type[i] > ZTYPEreal
-       &&qhstat stats[i].r == qhstat init[(unsigned char)(qhstat type[i])].r)
-      || (qhstat type[i] < ZTYPEreal
-	  &&qhstat stats[i].i == qhstat init[(unsigned char)(qhstat type[i])].i))
-    return True;
-  return False;
-} /* nostatistic */
-
-#if qh_KEEPstatistics
-/*---------------------------------
-  
-  qh_printallstatistics( fp, string )
-    print all statistics with header 'string'
-*/
-void qh_printallstatistics (FILE *fp, char *string) {
-
-  qh_allstatistics();
-  qh_collectstatistics();
-  qh_printstatistics (fp, string);
-  qh_memstatistics (fp);
-}
-
-
-/*---------------------------------
-  
-  qh_printstatistics( fp, string )
-    print statistics to a file with header 'string'
-    skips statistics with qhstat.printed[] (reset with qh_allstatistics)
-
-  see: 
-    qh_printallstatistics()
-*/
-void qh_printstatistics (FILE *fp, char *string) {
-  int i, k;
-  realT ave;
-  
-  if (qh num_points != qh num_vertices) {
-    wval_(Wpbalance)= 0;
-    wval_(Wpbalance2)= 0;
-  }else
-    wval_(Wpbalance2)= qh_stddev (zval_(Zpbalance), wval_(Wpbalance), 
-                                 wval_(Wpbalance2), &ave);
-  wval_(Wnewbalance2)= qh_stddev (zval_(Zprocessed), wval_(Wnewbalance), 
-                                 wval_(Wnewbalance2), &ave);
-  fprintf (fp, "\n\
-%s\n\
- qhull invoked by: %s | %s\n%s with options:\n%s\n", string, qh rbox_command, 
-     qh qhull_command, qh_VERSION, qh qhull_options);
-  fprintf (fp, "\nprecision constants:\n\
- %6.2g max. abs. coordinate in the (transformed) input ('Qbd:n')\n\
- %6.2g max. roundoff error for distance computation ('En')\n\
- %6.2g max. roundoff error for angle computations\n\
- %6.2g min. distance for outside points ('Wn')\n\
- %6.2g min. distance for visible facets ('Vn')\n\
- %6.2g max. distance for coplanar facets ('Un')\n\
- %6.2g max. facet width for recomputing centrum and area\n\
-", 
-  qh MAXabs_coord, qh DISTround, qh ANGLEround, qh MINoutside, 
-        qh MINvisible, qh MAXcoplanar, qh WIDEfacet);
-  if (qh KEEPnearinside)
-    fprintf(fp, "\
- %6.2g max. distance for near-inside points\n", qh NEARinside);
-  if (qh premerge_cos < REALmax/2) fprintf (fp, "\
- %6.2g max. cosine for pre-merge angle\n", qh premerge_cos);
-  if (qh PREmerge) fprintf (fp, "\
- %6.2g radius of pre-merge centrum\n", qh premerge_centrum);
-  if (qh postmerge_cos < REALmax/2) fprintf (fp, "\
- %6.2g max. cosine for post-merge angle\n", qh postmerge_cos);
-  if (qh POSTmerge) fprintf (fp, "\
- %6.2g radius of post-merge centrum\n", qh postmerge_centrum);
-  fprintf (fp, "\
- %6.2g max. distance for merging two simplicial facets\n\
- %6.2g max. roundoff error for arithmetic operations\n\
- %6.2g min. denominator for divisions\n\
-  zero diagonal for Gauss: ", qh ONEmerge, REALepsilon, qh MINdenom);
-  for (k=0; k < qh hull_dim; k++)
-    fprintf (fp, "%6.2e ", qh NEARzero[k]);
-  fprintf (fp, "\n\n");
-  for (i=0 ; i < qhstat next; ) 
-    qh_printstats (fp, i, &i);
-} /* printstatistics */
-#endif /* qh_KEEPstatistics */
-
-/*---------------------------------
-  
-  qh_printstatlevel( fp, id )
-    print level information for a statistic
-
-  notes:
-    nop if id >= ZEND, printed, or same as initial value
-*/
-void qh_printstatlevel (FILE *fp, int id, int start) {
-#define NULLfield "       "
-
-  if (id >= ZEND || qhstat printed[id])
-    return;
-  if (qhstat type[id] == zdoc) {
-    fprintf (fp, "%s\n", qhstat doc[id]);
-    return;
-  }
-  start= 0; /* not used */
-  if (qh_nostatistic(id) || !qhstat doc[id])
-    return;
-  qhstat printed[id]= True;
-  if (qhstat count[id] != -1 
-      && qhstat stats[(unsigned char)(qhstat count[id])].i == 0)
-    fprintf (fp, " *0 cnt*");
-  else if (qhstat type[id] >= ZTYPEreal && qhstat count[id] == -1)
-    fprintf (fp, "%7.2g", qhstat stats[id].r);
-  else if (qhstat type[id] >= ZTYPEreal && qhstat count[id] != -1)
-    fprintf (fp, "%7.2g", qhstat stats[id].r/ qhstat stats[(unsigned char)(qhstat count[id])].i);
-  else if (qhstat type[id] < ZTYPEreal && qhstat count[id] == -1)
-    fprintf (fp, "%7d", qhstat stats[id].i);
-  else if (qhstat type[id] < ZTYPEreal && qhstat count[id] != -1)
-    fprintf (fp, "%7.3g", (realT) qhstat stats[id].i / qhstat stats[(unsigned char)(qhstat count[id])].i);
-  fprintf (fp, " %s\n", qhstat doc[id]);
-} /* printstatlevel */
-
-
-/*---------------------------------
-  
-  qh_printstats( fp, index, nextindex )
-    print statistics for a zdoc group
-
-  returns:
-    next zdoc if non-null
-*/
-void qh_printstats (FILE *fp, int index, int *nextindex) {
-  int j, nexti;
-
-  if (qh_newstats (index, &nexti)) {
-    fprintf (fp, "\n");
-    for (j=index; j--------------------------------
-  
-  qh_stddev( num, tot, tot2, ave )
-    compute the standard deviation and average from statistics
-
-    tot2 is the sum of the squares
-  notes:
-    computes r.m.s.: 
-      (x-ave)^2 
-      == x^2 - 2x tot/num +   (tot/num)^2
-      == tot2 - 2 tot tot/num + tot tot/num 
-      == tot2 - tot ave
-*/
-realT qh_stddev (int num, realT tot, realT tot2, realT *ave) {
-  realT stddev;
-
-  *ave= tot/num;
-  stddev= sqrt (tot2/num - *ave * *ave);
-  return stddev;
-} /* stddev */
-
-#endif /* qh_KEEPstatistics */ 
-
-#if !qh_KEEPstatistics
-void    qh_collectstatistics (void) {}
-void    qh_printallstatistics (FILE *fp, char *string) {};
-void    qh_printstatistics (FILE *fp, char *string) {}
-#endif
-
diff --git a/extern/qhull/src/stat.h b/extern/qhull/src/stat.h
deleted file mode 100644
index 1dae54ed21d..00000000000
--- a/extern/qhull/src/stat.h
+++ /dev/null
@@ -1,520 +0,0 @@
-  /*
  ---------------------------------
-
-   stat.h 
-     contains all statistics that are collected for qhull
-
-   see qh-stat.htm and stat.c
-
-   copyright (c) 1993-2002, The Geometry Center
-
-   recompile qhull if you change this file
-
-   Integer statistics are Z* while real statistics are W*.  
-
-   define maydebugx to call a routine at every statistic event
-
-*/
-
-#ifndef qhDEFstat
-#define qhDEFstat 1
-
-
-/*---------------------------------
-
-  qh_KEEPstatistics
-    0 turns off statistic gathering (except zzdef/zzinc/zzadd/zzval/wwval)
-*/
-#ifndef qh_KEEPstatistics
-#define qh_KEEPstatistics 1
-#endif
-
-/*---------------------------------
-
-  Zxxx for integers, Wxxx for reals
-
-  notes:
-    be sure that all statistics are defined in stat.c
-      otherwise initialization may core dump
-    can pick up all statistics by:
-      grep '[zw].*_[(][ZW]' *.c >z.x
-    remove trailers with query">-
-    remove leaders with  query-replace-regexp [ ^I]+  (
-*/
-#if qh_KEEPstatistics
-enum statistics {     /* alphabetical after Z/W */
-    Zacoplanar,
-    Wacoplanarmax,
-    Wacoplanartot,
-    Zangle,
-    Wangle,
-    Wanglemax,
-    Wanglemin,
-    Zangletests,
-    Wareatot,
-    Wareamax,
-    Wareamin,
-    Zavoidold,
-    Wavoidoldmax,
-    Wavoidoldtot,
-    Zback0,
-    Zbestcentrum,
-    Zbestdist,
-    Zcentrumtests,
-    Zcheckpart,
-    Zcomputefurthest,
-    Zconcave,
-    Wconcavemax,
-    Wconcavetot,
-    Zconcaveridges,
-    Zconcaveridge,
-    Zcoplanar,
-    Wcoplanarmax,
-    Wcoplanartot,
-    Zcoplanarangle,
-    Zcoplanarcentrum,
-    Zcoplanarhorizon,
-    Zcoplanarinside,
-    Zcoplanarpart,
-    Zcoplanarridges,
-    Wcpu,
-    Zcyclefacetmax,
-    Zcyclefacettot,
-    Zcyclehorizon,
-    Zcyclevertex,
-    Zdegen,
-    Wdegenmax,
-    Wdegentot,
-    Zdegenvertex,
-    Zdelfacetdup, 
-    Zdelridge,
-    Zdelvertextot,
-    Zdelvertexmax,
-    Zdetsimplex,
-    Zdistcheck,
-    Zdistconvex,
-    Zdistgood,
-    Zdistio,
-    Zdistplane,
-    Zdiststat,
-    Zdistvertex,
-    Zdistzero,
-    Zdoc1,
-    Zdoc2,
-    Zdoc3,
-    Zdoc4,
-    Zdoc5,
-    Zdoc6,
-    Zdoc7,
-    Zdoc8,
-    Zdoc9,
-    Zdoc10,
-    Zdoc11,
-    Zdoc12,
-    Zdropdegen,
-    Zdropneighbor,
-    Zdupflip,
-    Zduplicate,
-    Wduplicatemax,
-    Wduplicatetot,
-    Zdupridge,
-    Zdupsame,
-    Zflipped, 
-    Wflippedmax, 
-    Wflippedtot, 
-    Zflippedfacets,
-    Zfindbest,
-    Zfindbestmax,
-    Zfindbesttot,
-    Zfindcoplanar,
-    Zfindfail,
-    Zfindhorizon,
-    Zfindhorizonmax,
-    Zfindhorizontot,
-    Zfindjump,
-    Zfindnew,
-    Zfindnewmax,
-    Zfindnewtot,
-    Zfindnewjump,
-    Zfindnewsharp,
-    Zgauss0,
-    Zgoodfacet,
-    Zhashlookup,
-    Zhashridge,
-    Zhashridgetest,
-    Zhashtests,
-    Zinsidevisible,
-    Zintersect,
-    Zintersectfail,
-    Zintersectmax,
-    Zintersectnum,
-    Zintersecttot,
-    Zmaxneighbors,
-    Wmaxout,
-    Wmaxoutside,
-    Zmaxridges,
-    Zmaxvertex,
-    Zmaxvertices,
-    Zmaxvneighbors,
-    Zmemfacets,
-    Zmempoints,
-    Zmemridges,
-    Zmemvertices,
-    Zmergeflipdup,
-    Zmergehorizon,
-    Zmergeinittot,
-    Zmergeinitmax,
-    Zmergeinittot2,
-    Zmergeintohorizon,
-    Zmergenew,
-    Zmergesettot,
-    Zmergesetmax,
-    Zmergesettot2,
-    Zmergesimplex,
-    Zmergevertex,
-    Wmindenom,
-    Wminvertex,
-    Zminnorm,
-    Zmultiridge,
-    Znearlysingular,
-    Zneighbor,
-    Wnewbalance,
-    Wnewbalance2,
-    Znewfacettot,
-    Znewfacetmax,
-    Znewvertex,
-    Wnewvertex,
-    Wnewvertexmax,
-    Znoarea,
-    Znonsimplicial,
-    Znowsimplicial,
-    Znotgood,
-    Znotgoodnew,
-    Znotmax,
-    Znumfacets,
-    Znummergemax,
-    Znummergetot,
-    Znumneighbors,
-    Znumridges,
-    Znumvertices,
-    Znumvisibility,
-    Znumvneighbors,
-    Zonehorizon,
-    Zpartangle,
-    Zpartcoplanar,
-    Zpartflip,
-    Zparthorizon,
-    Zpartinside,
-    Zpartition, 
-    Zpartitionall,
-    Zpartnear,
-    Zpbalance,
-    Wpbalance,
-    Wpbalance2, 
-    Zpostfacets, 
-    Zpremergetot,
-    Zprocessed,
-    Zremvertex,
-    Zremvertexdel,
-    Zrenameall,
-    Zrenamepinch,
-    Zrenameshare,
-    Zretry,
-    Wretrymax,
-    Zridge,
-    Wridge,
-    Wridgemax,
-    Zridge0,
-    Wridge0,
-    Wridge0max,
-    Zridgemid,
-    Wridgemid,
-    Wridgemidmax,
-    Zridgeok,
-    Wridgeok,
-    Wridgeokmax,
-    Zsearchpoints,
-    Zsetplane,
-    Ztestvneighbor,
-    Ztotcheck,
-    Ztothorizon,
-    Ztotmerge,
-    Ztotpartcoplanar,
-    Ztotpartition,
-    Ztotridges,
-    Ztotvertices,
-    Ztotvisible,
-    Ztricoplanar,
-    Ztricoplanarmax,
-    Ztricoplanartot,
-    Ztridegen,
-    Ztrimirror,
-    Ztrinull,
-    Wvertexmax,
-    Wvertexmin,
-    Zvertexridge,
-    Zvertexridgetot,
-    Zvertexridgemax,
-    Zvertices,
-    Zvisfacettot,
-    Zvisfacetmax,
-    Zvisvertextot,
-    Zvisvertexmax,
-    Zwidefacet,
-    Zwidevertices,
-    ZEND};
-
-/*---------------------------------
-
-  Zxxx/Wxxx statistics that remain defined if qh_KEEPstatistics=0
-
-  notes:
-    be sure to use zzdef, zzinc, etc. with these statistics (no double checking!)
-*/
-#else
-enum statistics {     /* for zzdef etc. macros */
-  Zback0,
-  Zbestdist,
-  Zcentrumtests,
-  Zcheckpart,
-  Zconcaveridges,
-  Zcoplanarhorizon,
-  Zcoplanarpart,
-  Zcoplanarridges,
-  Zcyclefacettot,
-  Zcyclehorizon,
-  Zdelvertextot,
-  Zdistcheck,
-  Zdistconvex,
-  Zdistzero,
-  Zdoc1,
-  Zdoc2,
-  Zdoc3,
-  Zdoc11,
-  Zflippedfacets,
-  Zgauss0,
-  Zminnorm,
-  Zmultiridge,
-  Znearlysingular,
-  Wnewvertexmax,
-  Znumvisibility,
-  Zpartcoplanar,
-  Zpartition,
-  Zpartitionall,
-  Zprocessed,
-  Zretry,
-  Zridge,
-  Wridge,
-  Wridgemax,
-  Zridge0,
-  Wridge0,
-  Wridge0max,
-  Zridgemid,
-  Wridgemid,
-  Wridgemidmax,
-  Zridgeok,
-  Wridgeok,
-  Wridgeokmax,
-  Zsetplane,
-  Ztotmerge,
-    ZEND};
-#endif
-
-/*---------------------------------
-  
-  ztype
-    the type of a statistic sets its initial value.  
-
-  notes:
-    The type should be the same as the macro for collecting the statistic
-*/
-enum ztypes {zdoc,zinc,zadd,zmax,zmin,ZTYPEreal,wadd,wmax,wmin,ZTYPEend};
-
-/*========== macros and constants =============*/
-
-/*----------------------------------
-  
-  MAYdebugx
-    define as maydebug() to be called frequently for error trapping
-*/
-#define MAYdebugx 
-
-/*----------------------------------
-  
-  zzdef_, zdef_( type, name, doc, -1)
-    define a statistic (assumes 'qhstat.next= 0;')
-
-  zdef_( type, name, doc, count)
-    define an averaged statistic
-    printed as name/count
-*/
-#define zzdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
-   qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#if qh_KEEPstatistics
-#define zdef_(stype,name,string,cnt) qhstat id[qhstat next++]=name; \
-   qhstat doc[name]= string; qhstat count[name]= cnt; qhstat type[name]= stype
-#else
-#define zdef_(type,name,doc,count)
-#endif
-
-/*----------------------------------
-  
-  zzinc_( name ), zinc_( name)
-    increment an integer statistic
-*/
-#define zzinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#if qh_KEEPstatistics
-#define zinc_(id) {MAYdebugx; qhstat stats[id].i++;}
-#else
-#define zinc_(id) {}
-#endif
-
-/*----------------------------------
-  
-  zzadd_( name, value ), zadd_( name, value ), wadd_( name, value )
-    add value to an integer or real statistic
-*/
-#define zzadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wwadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#if qh_KEEPstatistics
-#define zadd_(id, val) {MAYdebugx; qhstat stats[id].i += (val);}
-#define wadd_(id, val) {MAYdebugx; qhstat stats[id].r += (val);}
-#else
-#define zadd_(id, val) {}
-#define wadd_(id, val) {}
-#endif
-
-/*----------------------------------
-
-  zzval_( name ), zval_( name ), wwval_( name )
-    set or return value of a statistic
-*/
-#define zzval_(id) ((qhstat stats[id]).i)
-#define wwval_(id) ((qhstat stats[id]).r)
-#if qh_KEEPstatistics
-#define zval_(id) ((qhstat stats[id]).i)
-#define wval_(id) ((qhstat stats[id]).r)
-#else
-#define zval_(id) qhstat tempi
-#define wval_(id) qhstat tempr
-#endif
-
-/*----------------------------------
-
-  zmax_( id, val ), wmax_( id, value )
-    maximize id with val
-*/
-#define wwmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#if qh_KEEPstatistics
-#define zmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].i,(val));}
-#define wmax_(id, val) {MAYdebugx; maximize_(qhstat stats[id].r,(val));}
-#else
-#define zmax_(id, val) {}
-#define wmax_(id, val) {}
-#endif
-
-/*----------------------------------
-
-  zmin_( id, val ), wmin_( id, value )
-    minimize id with val
-*/
-#if qh_KEEPstatistics
-#define zmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].i,(val));}
-#define wmin_(id, val) {MAYdebugx; minimize_(qhstat stats[id].r,(val));}
-#else
-#define zmin_(id, val) {}
-#define wmin_(id, val) {}
-#endif
-
-/*================== stat.h types ==============*/
-
-
-/*----------------------------------
- 
-  intrealT
-    union of integer and real, used for statistics
-*/
-typedef union intrealT intrealT;    /* union of int and realT */
-union intrealT {
-    int i;
-    realT r;
-};
-
-/*----------------------------------
-  
-  qhstat
-    global data structure for statistics
-  
-  notes:
-   access to qh_qhstat is via the "qhstat" macro.  There are two choices
-   qh_QHpointer = 1     access globals via a pointer
-                        enables qh_saveqhull() and qh_restoreqhull()
-		= 0     qh_qhstat is a static data structure
-		        only one instance of qhull() can be active at a time
-			default value
-   qh_QHpointer is defined in qhull.h
-
-   allocated in stat.c
-*/
-typedef struct qhstatT qhstatT; 
-#if qh_QHpointer
-#define qhstat qh_qhstat->
-extern qhstatT *qh_qhstat;
-#else
-#define qhstat qh_qhstat.
-extern qhstatT qh_qhstat; 
-#endif
-struct qhstatT {  
-  intrealT   stats[ZEND];     /* integer and real statistics */
-  unsigned   char id[ZEND+10]; /* id's in print order */
-  char      *doc[ZEND];       /* array of documentation strings */
-  short int  count[ZEND];     /* -1 if none, else index of count to use */
-  char       type[ZEND];      /* type, see ztypes above */
-  char       printed[ZEND];   /* true, if statistic has been printed */
-  intrealT   init[ZTYPEend];  /* initial values by types, set initstatistics */
-
-  int        next;            /* next index for zdef_ */
-  int        precision;       /* index for precision problems */
-  int        vridges;         /* index for Voronoi ridges */
-  int        tempi;
-  realT      tempr;
-};
-
-/*========== function prototypes ===========*/
-
-void    qh_allstatA(void);
-void    qh_allstatB(void);
-void    qh_allstatC(void);
-void    qh_allstatD(void);
-void    qh_allstatE(void);
-void    qh_allstatE2(void);
-void    qh_allstatF(void);
-void    qh_allstatG(void);
-void    qh_allstatH(void);
-void    qh_allstatI(void);
-void    qh_allstatistics (void);
-void    qh_collectstatistics (void);
-void	qh_freestatistics (void);
-void    qh_initstatistics (void);
-boolT 	qh_newstats (int index, int *nextindex);
-boolT 	qh_nostatistic (int i);
-void    qh_printallstatistics (FILE *fp, char *string);
-void    qh_printstatistics (FILE *fp, char *string);
-void  	qh_printstatlevel (FILE *fp, int id, int start);
-void  	qh_printstats (FILE *fp, int index, int *nextindex);
-realT   qh_stddev (int num, realT tot, realT tot2, realT *ave);
-
-#endif   /* qhDEFstat */
diff --git a/extern/qhull/src/unix.c b/extern/qhull/src/unix.c
deleted file mode 100644
index 5ec5feab16c..00000000000
--- a/extern/qhull/src/unix.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
  ---------------------------------
-
-   unix.c
-     command line interface to qhull
-	 includes SIOUX interface for Macintoshes
-
-   see qh-qhull.htm
-
-   copyright (c) 1993-2002, The Geometry Center
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "qhull.h"
-#include "mem.h"
-#include "qset.h"
-
-#if __MWERKS__ && __POWERPC__
-#include 
-#include 
-#include 
-#include 
-
-#elif __cplusplus
-extern "C" {
-  int isatty (int);
-}
-
-#elif _MSC_VER
-#include 
-#define isatty _isatty
-
-#else
-int isatty (int);  /* returns 1 if stdin is a tty
-		   if "Undefined symbol" this can be deleted along with call in main() */
-#endif
-
-/*---------------------------------
-
-  qh_prompt 
-    long prompt for qhull
-    
-  see:
-    concise prompt below
-*/  
-char qh_prompta[]= "\n\
-qhull- compute convex hulls and related structures.\n\
-    http://www.geom.umn.edu/software/qhull  %s\n\
-\n\
-input (stdin):\n\
-    first lines: dimension and number of points (or vice-versa).\n\
-    other lines: point coordinates, best if one point per line\n\
-    comments:    start with a non-numeric character\n\
-    halfspaces:  use dim plus one and put offset after coefficients.\n\
-                 May be preceeded by a single interior point ('H').\n\
-\n\
-options:\n\
-    d    - Delaunay triangulation by lifting points to a paraboloid\n\
-    d Qu - furthest-site Delaunay triangulation (upper convex hull)\n\
-    v    - Voronoi diagram (dual of the Delaunay triangulation)\n\
-    v Qu - furthest-site Voronoi diagram\n\
-    Hn,n,... - halfspace intersection about point [n,n,0,...]\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Qc   - keep coplanar points with nearest facet\n\
-    Qi   - keep interior points with nearest facet\n\
-\n\
-Qhull control options:\n\
-    Qbk:n   - scale coord k so that low bound is n\n\
-      QBk:n - scale coord k so that upper bound is n (QBk is %2.2g)\n\
-    QbB  - scale input to unit cube centered at the origin\n\
-    Qbb  - scale last coordinate to [0,m] for Delaunay triangulations\n\
-    Qbk:0Bk:0 - remove k-th coordinate from input\n\
-    QJn  - randomly joggle input in range [-n,n]\n\
-    QRn  - random rotation (n=seed, n=0 time, n=-1 time/no rotate)\n\
-%s%s%s%s";  /* split up qh_prompt for Visual C++ */
-char qh_promptb[]= "\
-    Qf   - partition point to furthest outside facet\n\
-    Qg   - only build good facets (needs 'QGn', 'QVn', or 'PdD')\n\
-    Qm   - only process points that would increase max_outside\n\
-    Qr   - process random outside points instead of furthest ones\n\
-    Qs   - search all points for the initial simplex\n\
-    Qu   - for 'd' or 'v', compute upper hull without point at-infinity\n\
-              returns furthest-site Delaunay triangulation\n\
-    Qv   - test vertex neighbors for convexity\n\
-    Qx   - exact pre-merges (skips coplanar and angle-coplanar facets)\n\
-    Qz   - add point-at-infinity to Delaunay triangulation\n\
-    QGn  - good facet if visible from point n, -n for not visible\n\
-    QVn  - good facet if it includes point n, -n if not\n\
-    Q0   - turn off default premerge with 'C-0'/'Qx'\n\
-    Q1	   - sort merges by type instead of angle\n\
-    Q2   - merge all non-convex at once instead of independent sets\n\
-    Q3   - do not merge redundant vertices\n\
-    Q4   - avoid old->new merges\n\
-    Q5   - do not correct outer planes at end of qhull\n\
-    Q6   - do not pre-merge concave or coplanar facets\n\
-    Q7   - depth-first processing instead of breadth-first\n\
-    Q8   - do not process near-inside points\n\
-    Q9   - process furthest of furthest points\n\
-    Q10  - no special processing for narrow distributions\n\
-    Q11  - copy normals and recompute centrums for tricoplanar facets\n\
-\n\
-";
-char qh_promptc[]= "\
-Topts- Trace options:\n\
-    T4   - trace at level n, 4=all, 5=mem/gauss, -1= events\n\
-    Tc   - check frequently during execution\n\
-    Ts   - print statistics\n\
-    Tv   - verify result: structure, convexity, and point inclusion\n\
-    Tz   - send all output to stdout\n\
-    TFn  - report summary when n or more facets created\n\
-    TI file - input data from file, no spaces or single quotes\n\
-    TO file - output results to file, may be enclosed in single quotes\n\
-    TPn  - turn on tracing when point n added to hull\n\
-     TMn - turn on tracing at merge n\n\
-     TWn - trace merge facets when width > n\n\
-    TRn  - rerun qhull n times.  Use with 'QJn'\n\
-    TVn  - stop qhull after adding point n, -n for before (see TCn)\n\
-     TCn - stop qhull after building cone for point n (see TVn)\n\
-\n\
-Precision options:\n\
-    Cn   - radius of centrum (roundoff added).  Merge facets if non-convex\n\
-     An  - cosine of maximum angle.  Merge facets if cosine > n or non-convex\n\
-           C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge\n\
-    En   - max roundoff error for distance computation\n\
-    Rn   - randomly perturb computations by a factor of [1-n,1+n]\n\
-    Vn   - min distance above plane for a visible facet (default 3C-n or En)\n\
-    Un   - max distance below plane for a new, coplanar point (default Vn)\n\
-    Wn   - min facet width for outside point (before roundoff, default 2Vn)\n\
-\n\
-Output formats (may be combined; if none, produces a summary to stdout):\n\
-    f    - facet dump\n\
-    G    - Geomview output (see below)\n\
-    i    - vertices incident to each facet\n\
-    m    - Mathematica output (2-d and 3-d)\n\
-    o    - OFF format (dim, points and facets; Voronoi regions)\n\
-    n    - normals with offsets\n\
-    p    - vertex coordinates or Voronoi vertices (coplanar points if 'Qc')\n\
-    s    - summary (stderr)\n\
-\n\
-";
-char qh_promptd[]= "\
-More formats:\n\
-    Fa   - area for each facet\n\
-    FA   - compute total area and volume for option 's'\n\
-    Fc   - count plus coplanar points for each facet\n\
-           use 'Qc' (default) for coplanar and 'Qi' for interior\n\
-    FC   - centrum or Voronoi center for each facet\n\
-    Fd   - use cdd format for input (homogeneous with offset first)\n\
-    FD   - use cdd format for numeric output (offset first)\n\
-    FF   - facet dump without ridges\n\
-    Fi   - inner plane for each facet\n\
-           for 'v', separating hyperplanes for bounded Voronoi regions\n\
-    FI   - ID of each facet\n\
-    Fm   - merge count for each facet (511 max)\n\
-    Fn   - count plus neighboring facets for each facet\n\
-    FN   - count plus neighboring facets for each point\n\
-    Fo   - outer plane (or max_outside) for each facet\n\
-           for 'v', separating hyperplanes for unbounded Voronoi regions\n\
-    FO   - options and precision constants\n\
-    Fp   - dim, count, and intersection coordinates (halfspace only)\n\
-    FP   - nearest vertex and distance for each coplanar point\n\
-    FQ   - command used for qhull\n\
-    Fs   - summary: #int (8), dimension, #points, tot vertices, tot facets,\n\
-                      output: #vertices, #facets, #coplanars, #nonsimplicial\n\
-                    #real (2), max outer plane, min vertex\n\
-    FS   - sizes:   #int (0)\n\
-                    #real(2) tot area, tot volume\n\
-    Ft   - triangulation with centrums for non-simplicial facets (OFF format)\n\
-    Fv   - count plus vertices for each facet\n\
-           for 'v', Voronoi diagram as Voronoi vertices for pairs of sites\n\
-    FV   - average of vertices (a feasible point for 'H')\n\
-    Fx   - extreme points (in order for 2-d)\n\
-\n\
-";
-char qh_prompte[]= "\
-Geomview options (2-d, 3-d, and 4-d; 2-d Voronoi)\n\
-    Ga   - all points as dots\n\
-     Gp  -  coplanar points and vertices as radii\n\
-     Gv  -  vertices as spheres\n\
-    Gi   - inner planes only\n\
-     Gn  -  no planes\n\
-     Go  -  outer planes only\n\
-    Gc   - centrums\n\
-    Gh   - hyperplane intersections\n\
-    Gr   - ridges\n\
-    GDn  - drop dimension n in 3-d and 4-d output\n\
-    Gt   - for 3-d 'd', transparent outer ridges\n\
-\n\
-Print options:\n\
-    PAn  - keep n largest facets by area\n\
-    Pdk:n - drop facet if normal[k] <= n (default 0.0)\n\
-    PDk:n - drop facet if normal[k] >= n\n\
-    Pg   - print good facets (needs 'QGn' or 'QVn')\n\
-    PFn  - keep facets whose area is at least n\n\
-    PG   - print neighbors of good facets\n\
-    PMn  - keep n facets with most merges\n\
-    Po   - force output.  If error, output neighborhood of facet\n\
-    Pp   - do not report precision problems\n\
-\n\
-    .    - list of all options\n\
-    -    - one line descriptions of all options\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt2
-    synopsis for qhull
-*/
-char qh_prompt2[]= "\n\
-qhull- compute convex hulls and related structures.  %s\n\
-    input (stdin): dimension, n, point coordinates\n\
-    comments start with a non-numeric character\n\
-    halfspace: use dim+1 and put offsets after coefficients\n\
-\n\
-options (qh-quick.htm):\n\
-    d    - Delaunay triangulation by lifting points to a paraboloid\n\
-    d Qu - furthest-site Delaunay triangulation (upper convex hull)\n\
-    v    - Voronoi diagram as the dual of the Delaunay triangulation\n\
-    v Qu - furthest-site Voronoi diagram\n\
-    H1,1 - Halfspace intersection about [1,1,0,...] via polar duality\n\
-    Qt   - triangulated output\n\
-    QJ   - joggled input instead of merged facets\n\
-    Tv   - verify result: structure, convexity, and point inclusion\n\
-    .    - concise list of all options\n\
-    -    - one-line description of all options\n\
-\n\
-Output options (subset):\n\
-    s    - summary of results (default)\n\
-    i    - vertices incident to each facet\n\
-    n    - normals with offsets\n\
-    p    - vertex coordinates (if 'Qc', includes coplanar points)\n\
-           if 'v', Voronoi vertices\n\
-    Fp   - halfspace intersections\n\
-    Fx   - extreme points (convex hull vertices)\n\
-    FA   - compute total area and volume\n\
-    o    - OFF format (if 'v', outputs Voronoi regions)\n\
-    G    - Geomview output (2-d, 3-d and 4-d)\n\
-    m    - Mathematica output (2-d and 3-d)\n\
-    QVn  - print facets that include point n, -n if not\n\
-    TO file- output results to file, may be enclosed in single quotes\n\
-\n\
-examples:\n\
-    rbox c d D2 | qhull Qc s f Fx | more      rbox 1000 s | qhull Tv s FA\n\
-    rbox 10 D2 | qhull d QJ s i TO result     rbox 10 D2 | qhull v QJ p\n\
-    rbox 10 D2 | qhull d Qu QJ m              rbox 10 D2 | qhull v Qu QJ o\n\
-    rbox c | qhull n                          rbox c | qhull FV n | qhull H Fp\n\
-    rbox d D12 | qhull QR0 FA                 rbox c D7 | qhull FA TF1000\n\
-    rbox y 1000 W0 | qhull                    rbox 10 | qhull v QJ o Fv\n\
-\n\
-";
-/* for opts, don't assign 'e' or 'E' to a flag (already used for exponent) */
-
-/*---------------------------------
-
-  qh_prompt3
-    concise prompt for qhull
-*/
-char qh_prompt3[]= "\n\
-Qhull %s.\n\
-Except for 'F.' and 'PG', upper-case options take an argument.\n\
-\n\
- delaunay       voronoi	       Geomview       Halfspace      facet_dump\n\
- incidences     mathematica    normals        OFF_format     points\n\
- summary\n\
-\n\
- Farea          FArea-total    Fcoplanars     FCentrums      Fd-cdd-in\n\
- FD-cdd-out     FF-dump-xridge Finner         FIDs           Fmerges\n\
- Fneighbors     FNeigh-vertex  Fouter         FOptions       Fpoint-intersect\n\
- FPoint_near    FQhull         Fsummary       FSize          Ftriangles\n\
- Fvertices      Fvoronoi       FVertex-ave    Fxtremes\n\
-\n\
- Gvertices      Gpoints        Gall_points    Gno_planes     Ginner\n\
- Gcentrums      Ghyperplanes   Gridges        Gouter         GDrop_dim\n\
- Gtransparent\n\
-\n\
- PArea-keep     Pdrop d0:0D0   Pgood          PFacet_area_keep\n\
- PGood_neighbors PMerge-keep   Poutput_forced Pprecision_not\n\
-\n\
- QbBound 0:0.5  Qbk:0Bk:0_drop QbB-scale-box  Qbb-scale-last Qcoplanar\n\
- Qfurthest      Qgood_only     QGood_point    Qinterior      Qmax_out\n\
- QJoggle        Qrandom        QRotate        Qsearch_1st    Qtriangulate\n\
- QupperDelaunay QVertex_good   Qvneighbors    Qxact_merge    Qzinfinite\n\
-\n\
- Q0_no_premerge Q1_no_angle    Q2_no_independ Q3_no_redundant Q4_no_old\n\
- Q5_no_check_out Q6_no_concave Q7_depth_first Q8_no_near_in  Q9_pick_furthest\n\
- Q10_no_narrow  Q11_trinormals\n\
-\n\
- T4_trace       Tcheck_often   Tstatistics    Tverify        Tz_stdout\n\
- TFacet_log     TInput_file    TPoint_trace   TMerge_trace   TOutput_file\n\
- TRerun         TWide_trace    TVertex_stop   TCone_stop\n\
-\n\
- Angle_max      Centrum_size   Error_round    Random_dist    Visible_min\n\
- Ucoplanar_max  Wide_outside\n\
-";
-
-/*---------------------------------
-
-  main( argc, argv )
-    processes the command line, calls qhull() to do the work, and exits
-
-  design:
-    initializes data structures
-    reads points
-    finishes initialization
-    computes convex hull and other structures
-    checks the result
-    writes the output
-    frees memory
-*/
-int main(int argc, char *argv[]) {
-  int curlong, totlong; /* used !qh_NOmem */
-  int exitcode, numpoints, dim;
-  coordT *points;
-  boolT ismalloc;
-
-#if __MWERKS__ && __POWERPC__
-  char inBuf[BUFSIZ], outBuf[BUFSIZ], errBuf[BUFSIZ];
-  SIOUXSettings.showstatusline= false;
-  SIOUXSettings.tabspaces= 1;
-  SIOUXSettings.rows= 40;
-  if (setvbuf (stdin, inBuf, _IOFBF, sizeof(inBuf)) < 0   /* w/o, SIOUX I/O is slow*/
-  || setvbuf (stdout, outBuf, _IOFBF, sizeof(outBuf)) < 0
-  || (stdout != stderr && setvbuf (stderr, errBuf, _IOFBF, sizeof(errBuf)) < 0))
-    fprintf (stderr, "qhull internal warning (main): could not change stdio to fully buffered.\n");
-  argc= ccommand(&argv);
-#endif
-
-  if ((argc == 1) && isatty( 0 /*stdin*/)) {
-    fprintf(stdout, qh_prompt2, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  if (argc > 1 && *argv[1] == '-' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompta, qh_VERSION, qh_DEFAULTbox,
-		qh_promptb, qh_promptc, qh_promptd, qh_prompte);
-    exit(qh_ERRnone);
-  }
-  if (argc >1 && *argv[1] == '.' && !*(argv[1]+1)) {
-    fprintf(stdout, qh_prompt3, qh_VERSION);
-    exit(qh_ERRnone);
-  }
-  qh_init_A (stdin, stdout, stderr, argc, argv);  /* sets qh qhull_command */
-  exitcode= setjmp (qh errexit); /* simple statement for CRAY J916 */
-  if (!exitcode) {
-    qh_initflags (qh qhull_command);
-    points= qh_readpoints (&numpoints, &dim, &ismalloc);
-    qh_init_B (points, numpoints, dim, ismalloc);
-    qh_qhull();
-    qh_check_output();
-    qh_produce_output();
-    if (qh VERIFYoutput && !qh FORCEoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points();
-    exitcode= qh_ERRnone;
-  }
-  qh NOerrexit= True;  /* no more setjmp */
-#ifdef qh_NOmem
-  qh_freeqhull( True);
-#else
-  qh_freeqhull( False);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong)
-    fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-#endif
-  return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/user.c b/extern/qhull/src/user.c
deleted file mode 100644
index 94b31aaf99f..00000000000
--- a/extern/qhull/src/user.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
  ---------------------------------
-
-   user.c 
-   user redefinable functions
-
-   see README.txt  see COPYING.txt for copyright information.
-
-   see qhull.h for data structures, macros, and user-callable functions.
-
-   see user_eg.c, unix.c, and qhull_interface.cpp for examples.
-
-   see user.h for user-definable constants
-
-      use qh_NOmem in mem.h to turn off memory management
-      use qh_NOmerge in user.h to turn off facet merging
-      set qh_KEEPstatistics in user.h to 0 to turn off statistics
-
-   This is unsupported software.  You're welcome to make changes,
-   but you're on your own if something goes wrong.  Use 'Tc' to
-   check frequently.  Usually qhull will report an error if 
-   a data structure becomes inconsistent.  If so, it also reports
-   the last point added to the hull, e.g., 102.  You can then trace
-   the execution of qhull with "T4P102".  
-
-   Please report any errors that you fix to qhull@geom.umn.edu
-
-   call_qhull is a template for calling qhull from within your application
-
-   if you recompile and load this module, then user.o will not be loaded
-   from qhull.a
-
-   you can add additional quick allocation sizes in qh_user_memsizes
-
-   if the other functions here are redefined to not use qh_print...,
-   then io.o will not be loaded from qhull.a.  See user_eg.c for an
-   example.  We recommend keeping io.o for the extra debugging 
-   information it supplies.
-*/
-
-#include "qhull_a.h" 
-
-/*---------------------------------
-
-  qh_call_qhull( void )
-    template for calling qhull from inside your program
-    remove #if 0, #endif to compile
-
-  returns: 
-    exit code (see qh_ERR... in qhull.h)
-    all memory freed
-
-  notes:
-    This can be called any number of times.  
-
-  see:
-    qh_call_qhull_once()
-    
-*/
-#if 0
-{
-  int dim;	            /* dimension of points */
-  int numpoints;            /* number of points */
-  coordT *points;           /* array of coordinates for each point */
-  boolT ismalloc;           /* True if qhull should free points in qh_freeqhull() or reallocation */
-  char flags[]= "qhull Tv"; /* option flags for qhull, see qh_opt.htm */
-  FILE *outfile= stdout;    /* output from qh_produce_output()
-			       use NULL to skip qh_produce_output() */
-  FILE *errfile= stderr;    /* error messages from qhull code */
-  int exitcode;             /* 0 if no error from qhull */
-  facetT *facet;	    /* set by FORALLfacets */
-  int curlong, totlong;	    /* memory remaining after qh_memfreeshort */
-
-  /* initialize dim, numpoints, points[], ismalloc here */
-  exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
-                      flags, outfile, errfile); 
-  if (!exitcode) {                  /* if no error */
-    /* 'qh facet_list' contains the convex hull */
-    FORALLfacets {
-       /* ... your code ... */
-    }
-  }
-  qh_freeqhull(!qh_ALL);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong) 
-    fprintf (errfile, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
-}
-#endif
-
-/*---------------------------------
-
-  qh_new_qhull( dim, numpoints, points, ismalloc, qhull_cmd, outfile, errfile )
-    build new qhull data structure and return exitcode (0 if no errors)
-
-  notes:
-    do not modify points until finished with results.
-      The qhull data structure contains pointers into the points array.
-    do not call qhull functions before qh_new_qhull().
-      The qhull data structure is not initialized until qh_new_qhull().
-
-    outfile may be null
-    qhull_cmd must start with "qhull "
-    projects points to a new point array for Delaunay triangulations ('d' and 'v')
-    transforms points into a new point array for halfspace intersection ('H')
-       
-
-  To allow multiple, concurrent calls to qhull() 
-    - set qh_QHpointer in user.h
-    - use qh_save_qhull and qh_restore_qhull to swap the global data structure between calls.
-    - use qh_freeqhull(qh_ALL) to free intermediate convex hulls
-
-  see:
-    user_eg.c for an example
-*/
-int qh_new_qhull (int dim, int numpoints, coordT *points, boolT ismalloc, 
-		char *qhull_cmd, FILE *outfile, FILE *errfile) {
-  int exitcode, hulldim;
-  boolT new_ismalloc;
-  static boolT firstcall = True;
-  coordT *new_points;
-
-  if (firstcall) {
-    qh_meminit (errfile);
-    firstcall= False;
-  }
-  if (strncmp (qhull_cmd,"qhull ", 6)) {
-    fprintf (errfile, "qh_new_qhull: start qhull_cmd argument with \"qhull \"\n");
-    exit(1);
-  }
-  qh_initqhull_start (NULL, outfile, errfile);
-  trace1(( qh ferr, "qh_new_qhull: build new Qhull for %d %d-d points with %s\n", numpoints, dim, qhull_cmd));
-  exitcode = setjmp (qh errexit);
-  if (!exitcode)
-  {
-    qh NOerrexit = False;
-    qh_initflags (qhull_cmd);
-    if (qh DELAUNAY)
-      qh PROJECTdelaunay= True;
-    if (qh HALFspace) {
-      /* points is an array of halfspaces, 
-         the last coordinate of each halfspace is its offset */
-      hulldim= dim-1;
-      qh_setfeasible (hulldim); 
-      new_points= qh_sethalfspace_all (dim, numpoints, points, qh feasible_point);
-      new_ismalloc= True;
-      if (ismalloc)
-	free (points);
-    }else {
-      hulldim= dim;
-      new_points= points;
-      new_ismalloc= ismalloc;
-    }
-    qh_init_B (new_points, numpoints, hulldim, new_ismalloc);
-    qh_qhull();
-    qh_check_output();
-    if (outfile)
-      qh_produce_output(); 
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points();
-  }
-  qh NOerrexit = True;
-  return exitcode;
-} /* new_qhull */
-
-/*---------------------------------
-  
-  qh_errexit( exitcode, facet, ridge )
-    report and exit from an error
-    report facet and ridge if non-NULL
-    reports useful information such as last point processed
-    set qh.FORCEoutput to print neighborhood of facet
-
-  see: 
-    qh_errexit2() in qhull.c for printing 2 facets
-
-  design:
-    check for error within error processing
-    compute qh.hulltime
-    print facet and ridge (if any)
-    report commandString, options, qh.furthest_id
-    print summary and statistics (including precision statistics)
-    if qh_ERRsingular
-      print help text for singular data set
-    exit program via long jump (if defined) or exit()      
-*/
-void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge) {
-
-  if (qh ERREXITcalled) {
-    fprintf (qh ferr, "\nqhull error while processing previous error.  Exit program\n");
-    exit(1);
-  }
-  qh ERREXITcalled= True;
-  if (!qh QHULLfinished)
-    qh hulltime= qh_CPUclock - qh hulltime;
-  qh_errprint("ERRONEOUS", facet, NULL, ridge, NULL);
-  fprintf (qh ferr, "\nWhile executing: %s | %s\n", qh rbox_command, qh qhull_command);
-  fprintf(qh ferr, "Options selected for Qhull %s:\n%s\n", qh_VERSION, qh qhull_options);
-  if (qh furthest_id >= 0) {
-    fprintf(qh ferr, "Last point added to hull was p%d.", qh furthest_id);
-    if (zzval_(Ztotmerge))
-      fprintf(qh ferr, "  Last merge was #%d.", zzval_(Ztotmerge));
-    if (qh QHULLfinished)
-      fprintf(qh ferr, "\nQhull has finished constructing the hull.");
-    else if (qh POSTmerging)
-      fprintf(qh ferr, "\nQhull has started post-merging.");
-    fprintf (qh ferr, "\n");
-  }
-  if (qh FORCEoutput && (qh QHULLfinished || (!facet && !ridge)))
-    qh_produce_output();
-  else {
-    if (exitcode != qh_ERRsingular && zzval_(Zsetplane) > qh hull_dim+1) {
-      fprintf (qh ferr, "\nAt error exit:\n");
-      qh_printsummary (qh ferr);
-      if (qh PRINTstatistics) {
-	qh_collectstatistics();
-	qh_printstatistics(qh ferr, "at error exit");
-	qh_memstatistics (qh ferr);
-      }
-    }
-    if (qh PRINTprecision)
-      qh_printstats (qh ferr, qhstat precision, NULL);
-  }
-  if (!exitcode)
-    exitcode= qh_ERRqhull;
-  else if (exitcode == qh_ERRsingular)
-    qh_printhelp_singular(qh ferr);
-  else if (exitcode == qh_ERRprec && !qh PREmerge)
-    qh_printhelp_degenerate (qh ferr);
-  if (qh NOerrexit) {
-    fprintf (qh ferr, "qhull error while ending program.  Exit program\n");
-    exit(1);
-  }
-  qh NOerrexit= True;
-  longjmp(qh errexit, exitcode);
-} /* errexit */
-
-
-/*---------------------------------
-  
-  qh_errprint( fp, string, atfacet, otherfacet, atridge, atvertex )
-    prints out the information of facets and ridges to fp
-    also prints neighbors and geomview output
-    
-  notes:
-    except for string, any parameter may be NULL
-*/
-void qh_errprint(char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex) {
-  int i;
-
-  if (atfacet) {
-    fprintf(qh ferr, "%s FACET:\n", string);
-    qh_printfacet(qh ferr, atfacet);
-  }
-  if (otherfacet) {
-    fprintf(qh ferr, "%s OTHER FACET:\n", string);
-    qh_printfacet(qh ferr, otherfacet);
-  }
-  if (atridge) {
-    fprintf(qh ferr, "%s RIDGE:\n", string);
-    qh_printridge(qh ferr, atridge);
-    if (atridge->top && atridge->top != atfacet && atridge->top != otherfacet)
-      qh_printfacet(qh ferr, atridge->top);
-    if (atridge->bottom
-	&& atridge->bottom != atfacet && atridge->bottom != otherfacet)
-      qh_printfacet(qh ferr, atridge->bottom);
-    if (!atfacet)
-      atfacet= atridge->top;
-    if (!otherfacet)
-      otherfacet= otherfacet_(atridge, atfacet);
-  }
-  if (atvertex) {
-    fprintf(qh ferr, "%s VERTEX:\n", string);
-    qh_printvertex (qh ferr, atvertex);
-  }
-  if (qh fout && qh FORCEoutput && atfacet && !qh QHULLfinished && !qh IStracing) {
-    fprintf(qh ferr, "ERRONEOUS and NEIGHBORING FACETS to output\n");
-    for (i= 0; i < qh_PRINTEND; i++)  /* use fout for geomview output */
-      qh_printneighborhood (qh fout, qh PRINTout[i], atfacet, otherfacet,
-			    !qh_ALL);
-  }
-} /* errprint */
-
-
-/*---------------------------------
-  
-  qh_printfacetlist( fp, facetlist, facets, printall )
-    print all fields for a facet list and/or set of facets to fp
-    if !printall, 
-      only prints good facets
-
-  notes:
-    also prints all vertices
-*/
-void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall) {
-  facetT *facet, **facetp;
-
-  qh_printbegin (qh ferr, qh_PRINTfacets, facetlist, facets, printall);
-  FORALLfacet_(facetlist)
-    qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall);
-  FOREACHfacet_(facets)
-    qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall);
-  qh_printend (qh ferr, qh_PRINTfacets, facetlist, facets, printall);
-} /* printfacetlist */
-
-
-/*---------------------------------
-  
-  qh_user_memsizes()
-    allocate up to 10 additional, quick allocation sizes
-
-  notes:
-    increase maximum number of allocations in qh_initqhull_mem()
-*/
-void qh_user_memsizes (void) {
-
-  /* qh_memsize (size); */
-} /* user_memsizes */
-
diff --git a/extern/qhull/src/user.h b/extern/qhull/src/user.h
deleted file mode 100644
index 79558967a52..00000000000
--- a/extern/qhull/src/user.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/*
  ---------------------------------
-
-   user.h
-   user redefinable constants
-
-   see qh-user.htm.  see COPYING for copyright information.
-
-   before reading any code, review qhull.h for data structure definitions and 
-   the "qh" macro.
-*/
-
-#ifndef qhDEFuser
-#define qhDEFuser 1
-
-/*============= data types and configuration macros ==========*/
-
-/*----------------------------------
-  
-  realT
-    set the size of floating point numbers
-  
-  qh_REALdigits 
-    maximimum number of significant digits
-  
-  qh_REAL_1, qh_REAL_2n, qh_REAL_3n
-    format strings for printf
-  
-  qh_REALmax, qh_REALmin
-    maximum and minimum (near zero) values  
-  
-  qh_REALepsilon
-    machine roundoff.  Maximum roundoff error for addition and multiplication.
-    
-  notes:
-   Select whether to store floating point numbers in single precision (float)
-   or double precision (double).
-   
-   Use 'float' to save about 8% in time and 25% in space.  This is particularly
-   help if high-d where convex hulls are space limited.  Using 'float' also
-   reduces the printed size of Qhull's output since numbers have 8 digits of 
-   precision.
-   
-   Use 'double' when greater arithmetic precision is needed.  This is needed
-   for Delaunay triangulations and Voronoi diagrams when you are not merging 
-   facets.
-
-   If 'double' gives insufficient precision, your data probably includes
-   degeneracies.  If so you should use facet merging (done by default)
-   or exact arithmetic (see imprecision section of manual, qh-impre.htm).  
-   You may also use option 'Po' to force output despite precision errors.
-
-   You may use 'long double', but many format statements need to be changed
-   and you may need a 'long double' square root routine.  S. Grundmann
-   (sg@eeiwzb.et.tu-dresden.de) has done this.  He reports that the code runs 
-   much slower with little gain in precision.    
-
-   WARNING: on some machines,    int f(){realT a= REALmax;return (a == REALmax);}
-      returns False.  Use (a > REALmax/2) instead of (a == REALmax).
-
-   REALfloat =   1      all numbers are 'float' type
-             =   0      all numbers are 'double' type
-*/
-#define REALfloat 0
-
-#if (REALfloat == 1)
-#define realT float
-#define REALmax FLT_MAX
-#define REALmin FLT_MIN
-#define REALepsilon FLT_EPSILON
-#define qh_REALdigits 8   /* maximum number of significant digits */
-#define qh_REAL_1 "%6.8g "
-#define qh_REAL_2n "%6.8g %6.8g\n"
-#define qh_REAL_3n "%6.8g %6.8g %6.8g\n"
-
-#elif (REALfloat == 0)
-#define realT double
-#define REALmax DBL_MAX
-#define REALmin DBL_MIN
-#define REALepsilon DBL_EPSILON
-#define qh_REALdigits 16    /* maximum number of significant digits */
-#define qh_REAL_1 "%6.16g "
-#define qh_REAL_2n "%6.16g %6.16g\n"
-#define qh_REAL_3n "%6.16g %6.16g %6.16g\n"
-
-#else
-#error unknown float option
-#endif
-
-/*----------------------------------
-  
-  qh_CPUclock
-    define the clock() function for reporting the total time spent by Qhull
-    returns CPU ticks as a 'long int'
-    qh_CPUclock is only used for reporting the total time spent by Qhull
-
-  qh_SECticks 
-    the number of clock ticks per second
-
-  notes:
-    looks for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or assumes microseconds
-    to define a custom clock, set qh_CLOCKtype to 0
-
-    if your system does not use clock() to return CPU ticks, replace
-    qh_CPUclock with the corresponding function.  It is converted
-    to unsigned long to prevent wrap-around during long runs.
-   
-
-   Set qh_CLOCKtype to
-   
-     1	   	for CLOCKS_PER_SEC, CLOCKS_PER_SECOND, or microsecond
-                Note:  may fail if more than 1 hour elapsed time
-
-     2	   	use qh_clock() with POSIX times() (see global.c)
-*/
-#define qh_CLOCKtype 1  /* change to the desired number */
-
-#if (qh_CLOCKtype == 1)
-
-#if defined (CLOCKS_PER_SECOND)
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SECOND
-
-#elif defined (CLOCKS_PER_SEC)
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks CLOCKS_PER_SEC
-
-#elif defined (CLK_TCK)
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks CLK_TCK
-
-#else
-#define qh_CPUclock    ((unsigned long)clock())  /* return CPU clock */
-#define qh_SECticks 1E6
-#endif
-
-#elif (qh_CLOCKtype == 2)
-#define qh_CPUclock    qh_clock()  /* return CPU clock */
-#define qh_SECticks 100
-
-#else /* qh_CLOCKtype == ? */
-#error unknown clock option
-#endif
-
-/*----------------------------------
-  
-  qh_RANDOMtype, qh_RANDOMmax, qh_RANDOMseed
-    define random number generator
-
-    qh_RANDOMint generates a random integer between 0 and qh_RANDOMmax.  
-    qh_RANDOMseed sets the random number seed for qh_RANDOMint
-
-  Set qh_RANDOMtype (default 5) to:
-    1       for random() with 31 bits (UCB)
-    2       for rand() with RAND_MAX or 15 bits (system 5)
-    3       for rand() with 31 bits (Sun)
-    4       for lrand48() with 31 bits (Solaris)
-    5       for qh_rand() with 31 bits (included with Qhull)
-  
-  notes:
-    Random numbers are used by rbox to generate point sets.  Random
-    numbers are used by Qhull to rotate the input ('QRn' option),
-    simulate a randomized algorithm ('Qr' option), and to simulate
-    roundoff errors ('Rn' option).
-
-    Random number generators differ between systems.  Most systems provide
-    rand() but the period varies.  The period of rand() is not critical
-    since qhull does not normally use random numbers.  
-
-    The default generator is Park & Miller's minimal standard random
-    number generator [CACM 31:1195 '88].  It is included with Qhull.
-
-    If qh_RANDOMmax is wrong, qhull will report a warning and Geomview 
-    output will likely be invisible.
-*/
-#define qh_RANDOMtype 5   /* *** change to the desired number *** */
-
-#if (qh_RANDOMtype == 1)
-#define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, random()/MAX */
-#define qh_RANDOMint random()
-#define qh_RANDOMseed_(seed) srandom(seed);
-
-#elif (qh_RANDOMtype == 2)
-#ifdef RAND_MAX
-#define qh_RANDOMmax ((realT)RAND_MAX)
-#else
-#define qh_RANDOMmax ((realT)32767)   /* 15 bits (System 5) */
-#endif
-#define qh_RANDOMint  rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-  
-#elif (qh_RANDOMtype == 3)
-#define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, Sun */
-#define qh_RANDOMint  rand()
-#define qh_RANDOMseed_(seed) srand((unsigned)seed);
-
-#elif (qh_RANDOMtype == 4)
-#define qh_RANDOMmax ((realT)0x7fffffffUL)  /* 31 bits, lrand38()/MAX */
-#define qh_RANDOMint lrand48()
-#define qh_RANDOMseed_(seed) srand48(seed);
-
-#elif (qh_RANDOMtype == 5)
-#define qh_RANDOMmax ((realT)2147483646UL)  /* 31 bits, qh_rand/MAX */
-#define qh_RANDOMint qh_rand()
-#define qh_RANDOMseed_(seed) qh_srand(seed);
-/* unlike rand(), never returns 0 */
-
-#else
-#error: unknown random option
-#endif
-
-/*----------------------------------
-  
-  qh_ORIENTclock
-    0 for inward pointing normals by Geomview convention
-*/
-#define qh_ORIENTclock 0 
-
-
-/*========= performance related constants =========*/
-
-/*----------------------------------
-  
-  qh_HASHfactor
-    total hash slots / used hash slots.  Must be at least 1.1.
-      
-  notes:
-    =2 for at worst 50% occupancy for qh hash_table and normally 25% occupancy
-*/
-#define qh_HASHfactor 2
-
-/*----------------------------------
-  
-  qh_VERIFYdirect
-    with 'Tv' verify all points against all facets if op count is smaller
-
-  notes:
-    if greater, calls qh_check_bestdist() instead
-*/
-#define qh_VERIFYdirect 1000000 
-
-/*----------------------------------
-  
-  qh_INITIALsearch
-     if qh_INITIALmax, search points up to this dimension
-*/
-#define qh_INITIALsearch 6
-
-/*----------------------------------
-  
-  qh_INITIALmax
-    if dim >= qh_INITIALmax, use min/max coordinate points for initial simplex
-      
-  notes:
-    from points with non-zero determinants
-    use option 'Qs' to override (much slower)
-*/
-#define qh_INITIALmax 8
-
-/*----------------------------------
-  
-  qh_JOGGLEdefault
-    default qh.JOGGLEmax is qh.DISTround * qh_JOGGLEdefault
-
-  notes:
-    rbox s r 100 | qhull QJ1e-15 QR0 generates 90% faults at distround 7e-16
-    rbox s r 100 | qhull QJ1e-14 QR0 generates 70% faults
-    rbox s r 100 | qhull QJ1e-13 QR0 generates 35% faults
-    rbox s r 100 | qhull QJ1e-12 QR0 generates 8% faults
-    rbox s r 100 | qhull QJ1e-11 QR0 generates 1% faults
-    rbox s r 100 | qhull QJ1e-10 QR0 generates 0% faults
-    rbox 1000 W0 | qhull QJ1e-12 QR0 generates 86% faults
-    rbox 1000 W0 | qhull QJ1e-11 QR0 generates 20% faults
-    rbox 1000 W0 | qhull QJ1e-10 QR0 generates 2% faults
-    the later have about 20 points per facet, each of which may interfere
-
-    pick a value large enough to avoid retries on most inputs
-*/
-#define qh_JOGGLEdefault 30000.0
-
-/*----------------------------------
-  
-  qh_JOGGLEincrease
-    factor to increase qh.JOGGLEmax on qh_JOGGLEretry or qh_JOGGLEagain
-*/
-#define qh_JOGGLEincrease 10.0
-
-/*----------------------------------
-  
-  qh_JOGGLEretry
-    if ZZretry = qh_JOGGLEretry, increase qh.JOGGLEmax
-
-  notes:
-    try twice at the original value in case of bad luck the first time
-*/
-#define qh_JOGGLEretry 2
-
-/*----------------------------------
-  
-  qh_JOGGLEagain
-    every following qh_JOGGLEagain, increase qh.JOGGLEmax
-
-  notes:
-    1 is OK since it's already failed qh_JOGGLEretry times
-*/
-#define qh_JOGGLEagain 1
-
-/*----------------------------------
-  
-  qh_JOGGLEmaxincrease
-    maximum qh.JOGGLEmax due to qh_JOGGLEincrease
-    relative to qh.MAXwidth
-
-  notes:
-    qh.joggleinput will retry at this value until qh_JOGGLEmaxretry
-*/
-#define qh_JOGGLEmaxincrease 1e-2
-
-/*----------------------------------
-  
-  qh_JOGGLEmaxretry
-    stop after qh_JOGGLEmaxretry attempts
-*/
-#define qh_JOGGLEmaxretry 100
-
-/*========= memory constants =========*/
-
-/*----------------------------------
-  
-  qh_MEMalign
-    memory alignment for qh_meminitbuffers() in global.c
-    
-  notes:
-    to avoid bus errors, memory allocation must consider alignment requirements.
-    malloc() automatically takes care of alignment.   Since mem.c manages
-    its own memory, we need to explicitly specify alignment in
-    qh_meminitbuffers().
-
-    A safe choice is sizeof(double).  sizeof(float) may be used if doubles 
-    do not occur in data structures and pointers are the same size.  Be careful
-    of machines (e.g., DEC Alpha) with large pointers. 
-
-    If using gcc, best alignment is
-              #define qh_MEMalign fmax_(__alignof__(realT),__alignof__(void *))
-*/
-#define qh_MEMalign fmax_(sizeof(realT), sizeof(void *))
-
-/*----------------------------------
-  
-  qh_MEMbufsize
-    size of additional memory buffers
-    
-  notes:
-    used for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMbufsize 0x10000       /* allocate 64K memory buffers */
-
-/*----------------------------------
-  
-  qh_MEMinitbuf
-    size of initial memory buffer
-    
-  notes:
-    use for qh_meminitbuffers() in global.c
-*/
-#define qh_MEMinitbuf 0x20000      /* initially allocate 128K buffer */
-
-/*----------------------------------
-  
-  qh_INFINITE
-    on output, indicates Voronoi center at infinity
-*/
-#define qh_INFINITE  -10.101
-
-/*----------------------------------
-  
-  qh_DEFAULTbox
-    default box size (Geomview expects 0.5)
-*/
-#define qh_DEFAULTbox 0.5 
-
-/*======= conditional compilation ============================*/
-
-/*----------------------------------
-
-  __cplusplus
-    defined by C++ compilers
-
-  __MSC_VER
-    defined by Microsoft Visual C++
-  
-  __MWERKS__ && __POWERPC__
-    defined by Metrowerks when compiling for the Power Macintosh
-
-  __STDC__
-    defined for strict ANSI C 
-*/
-
-/*----------------------------------
- 
-  qh_COMPUTEfurthest 
-    compute furthest distance to an outside point instead of storing it with the facet
-    =1 to compute furthest
-  
-  notes:
-    computing furthest saves memory but costs time
-      about 40% more distance tests for partitioning
-      removes facet->furthestdist 
-*/
-#define qh_COMPUTEfurthest 0
-                         
-/*----------------------------------
- 
-  qh_KEEPstatistics   
-    =0 removes most of statistic gathering and reporting
-
-  notes:
-    if 0, code size is reduced by about 4%.
-*/
-#define qh_KEEPstatistics 1
-                       
-/*----------------------------------
- 
-  qh_MAXoutside 
-    record outer plane for each facet
-    =1 to record facet->maxoutside
-  
-  notes:
-    this takes a realT per facet and slightly slows down qhull
-    it produces better outer planes for geomview output 
-*/
-#define qh_MAXoutside 1
-
-/*----------------------------------
- 
-  qh_NOmerge
-    disables facet merging if defined
-    
-  notes:
-    This saves about 10% space.
-    
-    Unless 'Q0'
-      qh_NOmerge sets 'QJ' to avoid precision errors
-
-    #define qh_NOmerge    
-
-  see:
-    qh_NOmem in mem.c
-    
-    see user.c/user_eg.c for removing io.o
-*/  
-    
-/*----------------------------------
- 
-  qh_NOtrace
-    no tracing if defined 
-  
-  notes:
-    This saves about 5% space.
-
-    #define qh_NOtrace
-*/    
-
-/*----------------------------------
-  
-  qh_QHpointer
-    access global data with pointer or static structure
-
-  qh_QHpointer  = 1     access globals via a pointer to allocated memory
-                        enables qh_saveqhull() and qh_restoreqhull()
-			costs about 8% in time and 2% in space
-
-		= 0     qh_qh and qh_qhstat are static data structures
-		        only one instance of qhull() can be active at a time
-			default value
-
-  notes:
-    all global variables for qhull are in qh, qhmem, and qhstat
-    qh is defined in qhull.h
-    qhmem is defined in mem.h
-    qhstat is defined in stat.h
-
-  see:
-    user_eg.c for an example
-*/
-#define qh_QHpointer 0
-#if 0  /* sample code */
-    qhT *oldqhA, *oldqhB;
-
-    exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
-                      flags, outfile, errfile); 
-    /* use results from first call to qh_new_qhull */
-    oldqhA= qh_save_qhull();
-    exitcode= qh_new_qhull (dimB, numpointsB, pointsB, ismalloc,
-                      flags, outfile, errfile); 
-    /* use results from second call to qh_new_qhull */
-    oldqhB= qh_save_qhull();
-    qh_restore_qhull (&oldqhA);
-    /* use results from first call to qh_new_qhull */
-    qh_freeqhull (qh_ALL);  /* frees all memory used by first call */
-    qh_restore_qhull (&oldqhB);
-    /* use results from second call to qh_new_qhull */
-    qh_freeqhull (!qh_ALL); /* frees long memory used by second call */
-    qh_memfreeshort (&curlong, &totlong);  /* frees short memory and memory allocator */
-#endif
-
-/*----------------------------------
- 
-  qh_QUICKhelp        
-    =1 to use abbreviated help messages, e.g., for degenerate inputs
-*/
-#define qh_QUICKhelp    0  
-
-/* ============ -merge constants- ====================
-
-   These constants effect facet merging.  You probably will not need
-   to modify these.  They effect the performance of facet merging.
-*/
-
-/*----------------------------------
-  
-  qh_DIMmergeVertex
-    max dimension for vertex merging (it is not effective in high-d)
-*/
-#define qh_DIMmergeVertex 6
-
-/*----------------------------------
-  
-  qh_DIMreduceBuild
-     max dimension for vertex reduction during build (slow in high-d)
-*/
-#define qh_DIMreduceBuild 5
-
-/*----------------------------------
-     
-  qh_BESTcentrum
-     if > 2*dim+n vertices, qh_findbestneighbor() tests centrums (faster)
-     else, qh_findbestneighbor() tests all vertices (much better merges)
-
-  qh_BESTcentrum2
-     if qh_BESTcentrum2 * DIM3 + BESTcentrum < #vertices tests centrums
-*/
-#define qh_BESTcentrum 20
-#define qh_BESTcentrum2 2
-
-/*----------------------------------
-  
-  qh_BESTnonconvex
-    if > dim+n neighbors, qh_findbestneighbor() tests nonconvex ridges.
-    
-  notes:
-    It is needed because qh_findbestneighbor is slow for large facets
-*/
-#define qh_BESTnonconvex 15 
-
-/*----------------------------------
-  
-  qh_MAXnewmerges
-    if >n newmerges, qh_merge_nonconvex() calls qh_reducevertices_centrums.
-     
-  notes:
-    It is needed because postmerge can merge many facets at once
-*/
-#define qh_MAXnewmerges 2
-
-/*----------------------------------
-  
-  qh_MAXnewcentrum
-    if <= dim+n vertices (n approximates the number of merges),
-      reset the centrum in qh_updatetested() and qh_mergecycle_facets()
-    
-  notes:
-    needed to reduce cost and because centrums may move too much if 
-    many vertices in high-d
-*/
-#define qh_MAXnewcentrum 5
-
-/*----------------------------------
-  
-  qh_COPLANARratio
-    for 3-d+ merging, qh.MINvisible is n*premerge_centrum
-
-  notes:
-    for non-merging, it's DISTround
-*/
-#define qh_COPLANARratio 3
-
-/*----------------------------------
-  
-  qh_DISToutside
-    When is a point clearly outside of a facet?  
-    Stops search in qh_findbestnew or qh_partitionall
-    qh_findbest uses qh.MINoutside since since it is only called if no merges.
-     
-  notes:
-    'Qf' always searches for best facet
-    if !qh.MERGING, same as qh.MINoutside. 
-    if qh_USEfindbestnew, increase value since neighboring facets may be ill-behaved
-      [Note: Zdelvertextot occurs normally with interior points]
-            RBOX 1000 s Z1 G1e-13 t1001188774 | QHULL Tv
-    When there is a sharp edge, need to move points to a
-    clearly good facet; otherwise may be lost in another partitioning.
-    if too big then O(n^2) behavior for partitioning in cone
-    if very small then important points not processed
-    Needed in qh_partitionall for
-      RBOX 1000 s Z1 G1e-13 t1001032651 | QHULL Tv
-    Needed in qh_findbestnew for many instances of
-      RBOX 1000 s Z1 G1e-13 t | QHULL Tv
-
-  See:  
-    qh_DISToutside -- when is a point clearly outside of a facet
-    qh_SEARCHdist -- when is facet coplanar with the best facet?
-    qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_DISToutside ((qh_USEfindbestnew ? 2 : 1) * \
-     fmax_((qh MERGING ? 2 : 1)*qh MINoutside, qh max_outside))
-
-/*----------------------------------
-  
-  qh_RATIOnearinside
-    ratio of qh.NEARinside to qh.ONEmerge for retaining inside points for
-    qh_check_maxout().  
-  
-  notes:
-    This is overkill since do not know the correct value.
-    It effects whether 'Qc' reports all coplanar points
-    Not used for 'd' since non-extreme points are coplanar
-*/
-#define qh_RATIOnearinside 5
-
-/*----------------------------------
-  
-  qh_SEARCHdist
-    When is a facet coplanar with the best facet?  
-    qh_findbesthorizon: all coplanar facets of the best facet need to be searched.
-
-  See:
-    qh_DISToutside -- when is a point clearly outside of a facet
-    qh_SEARCHdist -- when is facet coplanar with the best facet?
-    qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_SEARCHdist ((qh_USEfindbestnew ? 2 : 1) * \
-      (qh max_outside + 2 * qh DISTround + fmax_( qh MINvisible, qh MAXcoplanar)));
-
-/*----------------------------------
-  
-  qh_USEfindbestnew
-     Always use qh_findbestnew for qh_partitionpoint, otherwise use
-     qh_findbestnew if merged new facet or sharpnewfacets.
-  
-  See:
-    qh_DISToutside -- when is a point clearly outside of a facet
-    qh_SEARCHdist -- when is facet coplanar with the best facet?
-    qh_USEfindbestnew -- when to use qh_findbestnew for qh_partitionpoint()
-*/
-#define qh_USEfindbestnew (zzval_(Ztotmerge) > 50)
-
-/*----------------------------------
-  
-  qh_WIDEcoplanar
-    n*MAXcoplanar or n*MINvisible for a WIDEfacet 
-    
-    if vertex is further than qh.WIDEfacet from the hyperplane
-    then its ridges are not counted in computing the area, and
-    the facet's centrum is frozen. 
-    
-  notes:
-   qh.WIDEfacet= max(qh.MAXoutside,qh_WIDEcoplanar*qh.MAXcoplanar,
-      qh_WIDEcoplanar * qh.MINvisible);
-*/
-#define qh_WIDEcoplanar 6
-
-/*----------------------------------
-  
-  qh_MAXnarrow
-    max. cosine in initial hull that sets qh.NARROWhull
-       
-  notes:
-    If qh.NARROWhull, the initial partition does not make 
-    coplanar points.  If narrow, a coplanar point can be 
-    coplanar to two facets of opposite orientations and
-    distant from the exact convex hull.
-
-    Conservative estimate.  Don't actually see problems until it is -1.0
-*/
-#define qh_MAXnarrow -0.99999999
-
-/*----------------------------------
-  
-  qh_WARNnarrow
-    max. cosine in initial hull to warn about qh.NARROWhull
-      
-  notes:
-    this is a conservative estimate.  
-    Don't actually see problems until it is -1.0.  See qh-impre.htm
-*/
-#define qh_WARNnarrow -0.999999999999999
-
-/*----------------------------------
-  
-  qh_ZEROdelaunay
-    a zero Delaunay facet occurs for input sites coplanar with their convex hull
-    the last normal coefficient of a zero Delaunay facet is within
-        qh_ZEROdelaunay * qh.ANGLEround of 0
-      
-  notes:
-    qh_ZEROdelaunay does not allow for joggled input ('QJ').
-
-    You can avoid zero Delaunay facets by surrounding the input with a box.
-
-    Use option 'PDk:-n' to explicitly define zero Delaunay facets
-      k= dimension of input sites (e.g., 3 for 3-d Delaunay triangulation)
-      n= the cutoff for zero Delaunay facets (e.g., 'PD3:-1e-12')
-*/
-#define qh_ZEROdelaunay 2
-
-#endif /* qh_DEFuser */
-
-
-
diff --git a/extern/qhull/src/user_eg.c b/extern/qhull/src/user_eg.c
deleted file mode 100644
index 97e4aa7a89a..00000000000
--- a/extern/qhull/src/user_eg.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
  ---------------------------------
-
-  user_eg.c
-  sample code for calling qhull() from an application
-  
-  call with:
-
-     user_eg "cube/diamond options" "delaunay options" "halfspace options"
-
-  for example:
-
-     user_eg                             # return summaries
-
-     user_eg "n" "o" "Fp"                # return normals, OFF, points
-
-     user_eg "n Qt" "o" "Fp"             # triangulated cube
-
-     user_eg "QR0 p" "QR0 v p" "QR0 Fp"  # rotate input and return points
-                                         # 'v' returns Voronoi
-					 # transform is rotated for halfspaces
-
-   main() makes three runs of qhull.
-
-     1) compute the convex hull of a cube
-
-     2a) compute the Delaunay triangulation of random points
-
-     2b) find the Delaunay triangle closest to a point.
-
-     3) compute the halfspace intersection of a diamond
-
- notes:
- 
-   For another example, see main() in unix.c and user_eg2.c.
-   These examples, call qh_qhull() directly.  They allow
-   tighter control on the code loaded with Qhull.
-
-   For a simple C++ example, see qhull_interface.cpp
-
-   Summaries are sent to stderr if other output formats are used
-
-   compiled by 'make user_eg'
-
-   see qhull.h for data structures, macros, and user-callable functions.
-*/
-
-#include "qhull_a.h"
-
-/*-------------------------------------------------
--internal function prototypes
-*/
-void print_summary (void);
-void makecube (coordT *points, int numpoints, int dim);
-void makeDelaunay (coordT *points, int numpoints, int dim, int seed);
-void findDelaunay (int dim);
-void makehalf (coordT *points, int numpoints, int dim);
-
-/*-------------------------------------------------
--print_summary()
-*/
-void print_summary (void) {
-  facetT *facet;
-  int k;
-
-  printf ("\n%d vertices and %d facets with normals:\n", 
-                 qh num_vertices, qh num_facets);
-  FORALLfacets {
-    for (k=0; k < qh hull_dim; k++) 
-      printf ("%6.2g ", facet->normal[k]);
-    printf ("\n");
-  }
-}
-
-/*--------------------------------------------------
--makecube- set points to vertices of cube
-  points is numpoints X dim
-*/
-void makecube (coordT *points, int numpoints, int dim) {
-  int j,k;
-  coordT *point;
-
-  for (j=0; jvertices) {
-    for (k=0; k < dim; k++)
-      printf ("%5.2f ", vertex->point[k]);
-    printf ("\n");
-  }
-} /*.findDelaunay.*/
-
-/*--------------------------------------------------
--makehalf- set points to halfspaces for a (dim)-dimensional diamond
-  points is numpoints X dim+1
-
-  each halfspace consists of dim coefficients followed by an offset
-*/
-void makehalf (coordT *points, int numpoints, int dim) {
-  int j,k;
-  coordT *point;
-
-  for (j=0; j= 2 ? argv[1] : "");
-  numpoints= SIZEcube;
-  makecube (points, numpoints, DIM);
-  for (i=numpoints; i--; )
-    rows[i]= points+dim*i;
-  qh_printmatrix (outfile, "input", rows, numpoints, dim);
-  exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
-                      flags, outfile, errfile); 
-  if (!exitcode) {                  /* if no error */
-    /* 'qh facet_list' contains the convex hull */
-    print_summary();
-    FORALLfacets {
-       /* ... your code ... */
-    }
-  }
-  qh_freeqhull(!qh_ALL);                   /* free long memory  */
-  qh_memfreeshort (&curlong, &totlong);    /* free short memory and memory allocator */
-  if (curlong || totlong) 
-    fprintf (errfile, "qhull internal warning (user_eg, #1): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
-
-  /*
-    Run 2: Delaunay triangulation
-  */
-
-  printf( "\ncompute 3-d Delaunay triangulation\n");
-  sprintf (flags, "qhull s d Tcv %s", argc >= 3 ? argv[2] : "");
-  numpoints= SIZEcube;
-  makeDelaunay (points, numpoints, dim, time(NULL));
-  for (i=numpoints; i--; )
-    rows[i]= points+dim*i;
-  qh_printmatrix (outfile, "input", rows, numpoints, dim);
-  exitcode= qh_new_qhull (dim, numpoints, points, ismalloc,
-                      flags, outfile, errfile); 
-  if (!exitcode) {                  /* if no error */
-    /* 'qh facet_list' contains the convex hull */
-    /* If you want a Voronoi diagram ('v') and do not request output (i.e., outfile=NULL), 
-       call qh_setvoronoi_all() after qh_new_qhull(). */
-    print_summary();
-    FORALLfacets {
-       /* ... your code ... */
-    }
-    printf( "\nfind 3-d Delaunay triangle closest to [0.5, 0.5, ...]\n");
-    exitcode= setjmp (qh errexit);  
-    if (!exitcode) {
-      /* Trap Qhull errors in findDelaunay().  Without the setjmp(), Qhull
-         will exit() after reporting an error */
-      qh NOerrexit= False;
-      findDelaunay (DIM);
-    }
-    qh NOerrexit= True;
-  }
-#if qh_QHpointer  /* see user.h */
-  {
-    qhT *oldqhA, *oldqhB;
-    coordT pointsB[DIM*TOTpoints]; /* array of coordinates for each point */
-
-
-    printf( "\nsave first triangulation and compute a new triangulation\n");
-    oldqhA= qh_save_qhull();
-    sprintf (flags, "qhull s d Tcv %s", argc >= 3 ? argv[2] : "");
-    numpoints= SIZEcube;
-    makeDelaunay (pointsB, numpoints, dim, time(NULL)+1);
-    for (i=numpoints; i--; )
-      rows[i]= pointsB+dim*i;
-    qh_printmatrix (outfile, "input", rows, numpoints, dim);
-    exitcode= qh_new_qhull (dim, numpoints, pointsB, ismalloc,
-                      flags, outfile, errfile); 
-    if (!exitcode)
-      print_summary();
-    printf( "\nsave second triangulation and restore first one\n");
-    oldqhB= qh_save_qhull();
-    qh_restore_qhull (&oldqhA);
-    print_summary();
-    printf( "\nfree first triangulation and restore second one.\n");
-    qh_freeqhull (qh_ALL);               /* free short and long memory used by first call */
-			                 /* do not use qh_memfreeshort */
-    qh_restore_qhull (&oldqhB);
-    print_summary();
-  }
-#endif
-  qh_freeqhull(!qh_ALL);                 /* free long memory */
-  qh_memfreeshort (&curlong, &totlong);  /* free short memory and memory allocator */
-  if (curlong || totlong) 
-    fprintf (errfile, "qhull internal warning (user_eg, #2): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
-
-  /*
-    Run 3: halfspace intersection about the origin
-  */
-  printf( "\ncompute halfspace intersection about the origin for a diamond\n");
-  sprintf (flags, "qhull H0 s Tcv %s", argc >= 4 ? argv[3] : "Fp");
-  numpoints= SIZEcube;
-  makehalf (points, numpoints, dim);
-  for (i=numpoints; i--; )
-    rows[i]= points+(dim+1)*i;
-  qh_printmatrix (outfile, "input as halfspace coefficients + offsets", rows, numpoints, dim+1);
-  /* use qh_sethalfspace_all to transform the halfspaces yourself.  
-     If so, set 'qh feasible_point and do not use option 'Hn,...' [it would retransform the halfspaces]
-  */
-  exitcode= qh_new_qhull (dim+1, numpoints, points, ismalloc,
-                      flags, outfile, errfile); 
-  if (!exitcode) 
-    print_summary();
-  qh_freeqhull (!qh_ALL);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong)  /* could also check previous runs */
-    fprintf (stderr, "qhull internal warning (user_eg, #3): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-  return exitcode;
-} /* main */
-
diff --git a/extern/qhull/src/user_eg2.c b/extern/qhull/src/user_eg2.c
deleted file mode 100644
index 1eb42ccfe8a..00000000000
--- a/extern/qhull/src/user_eg2.c
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
  ---------------------------------
-
-  user_eg2.c
-
-  sample code for calling qhull() from an application.
-
-  See user_eg.c for a simpler method using qh_new_qhull().
-  The method used here and in unix.c gives you additional
-  control over Qhull. 
-  
-  call with:
-
-     user_eg2 "triangulated cube/diamond options" "delaunay options" "halfspace options"
-
-  for example:
-
-     user_eg2                             # return summaries
-
-     user_eg2 "n" "o" "Fp"                # return normals, OFF, points
-
-     user_eg2 "QR0 p" "QR0 v p" "QR0 Fp"  # rotate input and return points
-                                         # 'v' returns Voronoi
-					 # transform is rotated for halfspaces
-
-   main() makes three runs of qhull.
-
-     1) compute the convex hull of a cube, and incrementally add a diamond
-
-     2a) compute the Delaunay triangulation of random points, and add points.
-
-     2b) find the Delaunay triangle closest to a point.
-
-     3) compute the halfspace intersection of a diamond, and add a cube
-
- notes:
- 
-   summaries are sent to stderr if other output formats are used
-
-   derived from unix.c and compiled by 'make user_eg2'
-
-   see qhull.h for data structures, macros, and user-callable functions.
-   
-   If you want to control all output to stdio and input to stdin,
-   set the #if below to "1" and delete all lines that contain "io.c".  
-   This prevents the loading of io.o.  Qhull will
-   still write to 'qh ferr' (stderr) for error reporting and tracing.
-
-   Defining #if 1, also prevents user.o from being loaded.
-*/
-
-#include "qhull_a.h"
-
-/*-------------------------------------------------
--internal function prototypes
-*/
-void print_summary (void);
-void makecube (coordT *points, int numpoints, int dim);
-void adddiamond (coordT *points, int numpoints, int numnew, int dim);
-void makeDelaunay (coordT *points, int numpoints, int dim);
-void addDelaunay (coordT *points, int numpoints, int numnew, int dim);
-void findDelaunay (int dim);
-void makehalf (coordT *points, int numpoints, int dim);
-void addhalf (coordT *points, int numpoints, int numnew, int dim, coordT *feasible);
-
-/*-------------------------------------------------
--print_summary()
-*/
-void print_summary (void) {
-  facetT *facet;
-  int k;
-
-  printf ("\n%d vertices and %d facets with normals:\n", 
-                 qh num_vertices, qh num_facets);
-  FORALLfacets {
-    for (k=0; k < qh hull_dim; k++) 
-      printf ("%6.2g ", facet->normal[k]);
-    printf ("\n");
-  }
-}
-
-/*--------------------------------------------------
--makecube- set points to vertices of cube
-  points is numpoints X dim
-*/
-void makecube (coordT *points, int numpoints, int dim) {
-  int j,k;
-  coordT *point;
-
-  for (j=0; jvertices) {
-    for (k=0; k < dim-1; k++)
-      printf ("%5.2f ", vertex->point[k]);
-    printf ("\n");
-  }
-} /*.findDelaunay.*/
-
-/*--------------------------------------------------
--makehalf- set points to halfspaces for a (dim)-d diamond
-  points is numpoints X dim+1
-
-  each halfspace consists of dim coefficients followed by an offset
-*/
-void makehalf (coordT *points, int numpoints, int dim) {
-  int j,k;
-  coordT *point;
-
-  for (j=0; j= 2 ? argv[1] : "");
-    qh_initflags (options);
-    printf( "\ncompute triangulated convex hull of cube after rotating input\n");
-    makecube (array[0], SIZEcube, DIM);
-    qh_init_B (array[0], SIZEcube, DIM, ismalloc);
-    qh_qhull();
-    qh_check_output();
-    qh_triangulate();  /* requires option 'Q11' if want to add points */ 
-    print_summary ();
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points ();
-    printf( "\nadd points in a diamond\n");
-    adddiamond (array[0], SIZEcube, SIZEdiamond, DIM);
-    qh_check_output();
-    print_summary (); 
-    qh_produce_output();  /* delete this line to help avoid io.c */
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points ();
-  }
-  qh NOerrexit= True;
-  qh_freeqhull (!qh_ALL);
-  qh_memfreeshort (&curlong, &totlong);
-  /*
-    Run 2: Delaunay triangulation
-  */
-  qh_init_A (stdin, stdout, stderr, 0, NULL);
-  exitcode= setjmp (qh errexit);
-  if (!exitcode) {
-    coordT array[TOTpoints][DIM];
-
-    strcat (qh rbox_command, "user_eg Delaunay");
-    sprintf (options, "qhull s d Tcv %s", argc >= 3 ? argv[2] : "");
-    qh_initflags (options);
-    printf( "\ncompute 2-d Delaunay triangulation\n");
-    makeDelaunay (array[0], SIZEcube, DIM);
-    /* Instead of makeDelaunay with qh_setdelaunay, you may
-       produce a 2-d array of points, set DIM to 2, and set 
-       qh PROJECTdelaunay to True.  qh_init_B will call 
-       qh_projectinput to project the points to the paraboloid
-       and add a point "at-infinity".
-    */
-    qh_init_B (array[0], SIZEcube, DIM, ismalloc);
-    qh_qhull();
-    /* If you want Voronoi ('v') without qh_produce_output(), call
-       qh_setvoronoi_all() after qh_qhull() */
-    qh_check_output();
-    print_summary ();
-    qh_produce_output();  /* delete this line to help avoid io.c */
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points ();
-    printf( "\nadd points to triangulation\n");
-    addDelaunay (array[0], SIZEcube, SIZEdiamond, DIM); 
-    qh_check_output();
-    qh_produce_output();  /* delete this line to help avoid io.c */
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points ();
-    printf( "\nfind Delaunay triangle closest to [0.5, 0.5, ...]\n");
-    findDelaunay (DIM);
-  }
-  qh NOerrexit= True;
-  qh_freeqhull (!qh_ALL);
-  qh_memfreeshort (&curlong, &totlong);
-  /*
-    Run 3: halfspace intersection
-  */
-  qh_init_A (stdin, stdout, stderr, 0, NULL);
-  exitcode= setjmp (qh errexit);
-  if (!exitcode) {
-    coordT array[TOTpoints][DIM+1];  /* +1 for halfspace offset */
-    pointT *points;
-
-    strcat (qh rbox_command, "user_eg halfspaces");
-    sprintf (options, "qhull H0 s Tcv %s", argc >= 4 ? argv[3] : "");
-    qh_initflags (options);
-    printf( "\ncompute halfspace intersection about the origin for a diamond\n");
-    makehalf (array[0], SIZEcube, DIM);
-    qh_setfeasible (DIM); /* from io.c, sets qh feasible_point from 'Hn,n' */
-    /* you may malloc and set qh feasible_point directly.  It is only used for
-       option 'Fp' */
-    points= qh_sethalfspace_all ( DIM+1, SIZEcube, array[0], qh feasible_point); 
-    qh_init_B (points, SIZEcube, DIM, True); /* qh_freeqhull frees points */
-    qh_qhull();
-    qh_check_output();
-    qh_produce_output();  /* delete this line to help avoid io.c */
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points ();
-    printf( "\nadd halfspaces for cube to intersection\n");
-    addhalf (array[0], SIZEcube, SIZEdiamond, DIM, qh feasible_point); 
-    qh_check_output();
-    qh_produce_output();  /* delete this line to help avoid io.c */
-    if (qh VERIFYoutput && !qh STOPpoint && !qh STOPcone)
-      qh_check_points ();
-  }
-  qh NOerrexit= True;
-  qh NOerrexit= True;
-  qh_freeqhull (!qh_ALL);
-  qh_memfreeshort (&curlong, &totlong);
-  if (curlong || totlong)  /* could also check previous runs */
-    fprintf (stderr, "qhull internal warning (main): did not free %d bytes of long memory (%d pieces)\n",
-       totlong, curlong);
-  return exitcode;
-} /* main */
-
-#if 1    /* use 1 to prevent loading of io.o and user.o */
-/*-------------------------------------------
--errexit- return exitcode to system after an error
-  assumes exitcode non-zero
-  prints useful information
-  see qh_errexit2() in qhull.c for 2 facets
-*/
-void qh_errexit(int exitcode, facetT *facet, ridgeT *ridge) {
-
-  if (qh ERREXITcalled) {
-    fprintf (qh ferr, "qhull error while processing previous error.  Exit program\n");
-    exit(1);
-  }
-  qh ERREXITcalled= True;
-  if (!qh QHULLfinished)
-    qh hulltime= (unsigned)clock() - qh hulltime;
-  fprintf (qh ferr, "\nWhile executing: %s | %s\n", qh rbox_command, qh qhull_command);
-  fprintf(qh ferr, "Options selected:\n%s\n", qh qhull_options);
-  if (qh furthest_id >= 0) {
-    fprintf(qh ferr, "\nLast point added to hull was p%d", qh furthest_id);
-    if (zzval_(Ztotmerge))
-      fprintf(qh ferr, "  Last merge was #%d.", zzval_(Ztotmerge));
-    if (qh QHULLfinished)
-      fprintf(qh ferr, "\nQhull has finished constructing the hull.");
-    else if (qh POSTmerging)
-      fprintf(qh ferr, "\nQhull has started post-merging");
-    fprintf(qh ferr, "\n\n");
-  }
-  if (qh NOerrexit) {
-    fprintf (qh ferr, "qhull error while ending program.  Exit program\n");
-    exit(1);
-  }
-  if (!exitcode)
-    exitcode= qh_ERRqhull;
-  qh NOerrexit= True;
-  longjmp(qh errexit, exitcode);
-} /* errexit */
-
-
-/*-------------------------------------------
--errprint- prints out the information of the erroneous object
-    any parameter may be NULL, also prints neighbors and geomview output
-*/
-void qh_errprint(char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex) {
-
-  fprintf (qh ferr, "%s facets f%d f%d ridge r%d vertex v%d\n",
-	   string, getid_(atfacet), getid_(otherfacet), getid_(atridge),
-	   getid_(atvertex));
-} /* errprint */
-
-
-void qh_printfacetlist(facetT *facetlist, setT *facets, boolT printall) {
-  facetT *facet, **facetp;
-
-  /* remove these calls to help avoid io.c */
-  qh_printbegin (qh ferr, qh_PRINTfacets, facetlist, facets, printall);/*io.c*/
-  FORALLfacet_(facetlist)                                              /*io.c*/
-    qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall);          /*io.c*/
-  FOREACHfacet_(facets)                                                /*io.c*/
-    qh_printafacet(qh ferr, qh_PRINTfacets, facet, printall);          /*io.c*/
-  qh_printend (qh ferr, qh_PRINTfacets, facetlist, facets, printall);  /*io.c*/
-
-  FORALLfacet_(facetlist)
-    fprintf( qh ferr, "facet f%d\n", facet->id);
-} /* printfacetlist */
-
-
-
-/*-----------------------------------------
--user_memsizes- allocate up to 10 additional, quick allocation sizes
-*/
-void qh_user_memsizes (void) {
-
-  /* qh_memsize (size); */
-} /* user_memsizes */
-
-#endif
diff --git a/extern/solid/CMakeLists.txt b/extern/solid/CMakeLists.txt
deleted file mode 100644
index 7840dd6b423..00000000000
--- a/extern/solid/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id$
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-SET(INC include src src/broad src/complex src/convex ../qhull/include)
-
-FILE(GLOB SRC src/*.cpp src/convex/*.cpp src/complex/*.cpp src/broad/*.cpp)
-
-ADD_DEFINITIONS(-DUSE_DOUBLES -DQHULL -D_LIB)
-
-BLENDERLIB(extern_solid "${SRC}" "${INC}")
-#, libtype=['game2','player'], priority=[45, 75]
diff --git a/extern/solid/LICENSE_GPL.txt b/extern/solid/LICENSE_GPL.txt
deleted file mode 100644
index 07db89585a2..00000000000
--- a/extern/solid/LICENSE_GPL.txt
+++ /dev/null
@@ -1,349 +0,0 @@
-
- The SOLID library is Copyright (C) 2001-2003  Dtecta.
-
- You may use, distribute and copy the SOLID library under the terms of
- GNU General Public License version 2, which is displayed below.
-
--------------------------------------------------------------------------
-
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    
-    Copyright (C)   
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  , 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
--------------------------------------------------------------------------
diff --git a/extern/solid/LICENSE_QPL.txt b/extern/solid/LICENSE_QPL.txt
deleted file mode 100644
index 3fca00466e2..00000000000
--- a/extern/solid/LICENSE_QPL.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-
- The SOLID library is Copyright (C) 2001-2003  Dtecta.
-
- You may use, distribute and copy the SOLID library under the terms of
- the Q Public License, which is displayed below.
-
--------------------------------------------------------------------------
-			     THE Q PUBLIC LICENSE
-				  version 1.0
-
-		   Copyright (C) 1999-2000 Trolltech AS, Norway.
-		       Everyone is permitted to copy and
-		       distribute this license document.
-
-The intent of this license is to establish freedom to share and change the
-software regulated by this license under the open source model.
-
-This license applies to any software containing a notice placed by the
-copyright holder saying that it may be distributed under the terms of
-the Q Public License version 1.0.  Such software is herein referred to as
-the Software.  This license covers modification and distribution of the
-Software, use of third-party application programs based on the Software,
-and development of free software which uses the Software.
-
-				 Granted Rights
-
-1. You are granted the non-exclusive rights set forth in this license
-   provided you agree to and comply with any and all conditions in this
-   license.  Whole or partial distribution of the Software, or software
-   items that link with the Software, in any form signifies acceptance of
-   this license.
-
-2. You may copy and distribute the Software in unmodified form provided
-   that the entire package, including - but not restricted to - copyright,
-   trademark notices and disclaimers, as released by the initial developer
-   of the Software, is distributed.
-
-3. You may make modifications to the Software and distribute your
-   modifications, in a form that is separate from the Software, such as
-   patches. The following restrictions apply to modifications:
-
-     a. Modifications must not alter or remove any copyright notices in
-        the Software.
-
-     b. When modifications to the Software are released under this
-        license, a non-exclusive royalty-free right is granted to the
-        initial developer of the Software to distribute your modification
-        in future versions of the Software provided such versions remain
-        available under these terms in addition to any other license(s) of
-        the initial developer.
-
-4. You may distribute machine-executable forms of the Software or
-   machine-executable forms of modified versions of the Software, provided
-   that you meet these restrictions:
-
-     a. You must include this license document in the distribution.
-
-     b. You must ensure that all recipients of the machine-executable forms
-        are also able to receive the complete machine-readable source code
-        to the distributed Software, including all modifications, without
-        any charge beyond the costs of data transfer, and place prominent
-        notices in the distribution explaining this.
-
-     c. You must ensure that all modifications included in the
-        machine-executable forms are available under the terms of this
-        license.
-
-5. You may use the original or modified versions of the Software to
-   compile, link and run application programs legally developed by you
-   or by others.
-
-6. You may develop application programs, reusable components and other
-   software items that link with the original or modified versions of the
-   Software.  These items, when distributed, are subject to the following
-   requirements:
-
-     a. You must ensure that all recipients of machine-executable forms of
-        these items are also able to receive and use the complete
-        machine-readable source code to the items without any charge
-        beyond the costs of data transfer.
-
-     b. You must explicitly license all recipients of your items to use
-        and re-distribute original and modified versions of the items in
-        both machine-executable and source code forms. The recipients must
-        be able to do so without any charges whatsoever, and they must be
-        able to re-distribute to anyone they choose.
-
-
-     c. If the items are not available to the general public, and the
-        initial developer of the Software requests a copy of the items,
-        then you must supply one.
-
-			    Limitations of Liability
-
-In no event shall the initial developers or copyright holders be liable
-for any damages whatsoever, including - but not restricted to - lost
-revenue or profits or other direct, indirect, special, incidental or
-consequential damages, even if they have been advised of the possibility
-of such damages, except to the extent invariable law, if any, provides
-otherwise.
-
-			          No Warranty
-
-The Software and this license document are provided AS IS with NO WARRANTY
-OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE.
-                                 Choice of Law
-
-This license is governed by the Laws of Norway. Disputes shall be settled
-by Oslo City Court.
diff --git a/extern/solid/Makefile b/extern/solid/Makefile
deleted file mode 100644
index 3b333c5141d..00000000000
--- a/extern/solid/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-include nan_definitions.mk
-
-SOURCEDIR = extern/solid
-LIBNAMES = solid solid_broad solid_convex solid_complex
-DIR = $(OCGDIR)/extern/
-DIRS = src
-
-include nan_subdirs.mk
-
-install: all debug
-	@[ -d $(NAN_SOLID) ] || mkdir -p $(NAN_SOLID)
-	@[ -d $(NAN_SOLID)/include/SOLID ] || mkdir -p $(NAN_SOLID)/include/SOLID
-	@[ -d $(NAN_SOLID)/include/SOLID/MT ] || mkdir -p $(NAN_SOLID)/include/SOLID/MT
-	@[ -d $(NAN_SOLID)/lib ] || mkdir -p $(NAN_SOLID)/lib
-	@[ -d $(NAN_SOLID)/lib/debug ] || mkdir -p $(NAN_SOLID)/lib/debug
-	@for i in $(LIBNAMES); do \
-	    $(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$$i/lib$$i.a $(NAN_SOLID)/lib/ ; \
-	    $(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$$i/debug/lib$$i.a $(NAN_SOLID)/lib/debug/ ; \
-	    if [ $(OS) = darwin ] ; then \
-            ranlib $(NAN_SOLID)/lib/lib$$i.a ; \
-            ranlib $(NAN_SOLID)/lib/debug/lib$$i.a ; \
-        fi ; \
-	done
-	@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh include/*.h $(NAN_SOLID)/include/SOLID
-	@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh include/MT/*.h $(NAN_SOLID)/include/SOLID/MT
-
-
diff --git a/extern/solid/README.txt b/extern/solid/README.txt
deleted file mode 100644
index 348d92b35cb..00000000000
--- a/extern/solid/README.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-
-		 SOLID - Software Library for Interference Detection
-
-SOLID is a software library containing functions for performing
-intersection tests and proximity queries that are useful in the context
-of collision detection. Collision detection is the process of detecting
-pairs of geometric objects that are intersecting or are within a given
-proximity of each other. In particular, SOLID is useful for detecting
-collisions between objects that are moving relatively of each other over
-time. The motions of objects are controlled by the client application,
-and are not determined or affected by SOLID. 
-
-This open-source edition of SOLID version 3 is released under the terms of
-either the GNU Public License (GPL) or the Q Public License (QPL). This means
-that for software created with SOLID version 3 you must comply with the terms
-of one of these licenses. You may choose wich of these licenses best suits
-your purpose. See the following files contained in this distribution for a
-complete list of terms and conditions of these licenses:  
-
-		 LICENSE_QPL.txt	 The Q Public License 
-		 LICENSE_GPL.txt	 The GNU General Public License
-
-These licenses do not permit the use of SOLID 3 in closed-source software
-products. For enquiries about commercial use of SOLID, please contact
-info@dtecta.com.    
-
-SOLID 3 uses Qhull from The Geometry Center of the University of Minnesota.
-Qhull is copyrighted as noted below.  Qhull is free software and may be
-obtained via anonymous ftp from geom.umn.edu.   
-        
-                    Qhull, Copyright (c) 1993-2002
-
-       The National Science and Technology Research Center for
-        Computation and Visualization of Geometric Structures
-                        (The Geometry Center)
-                       University of Minnesota
-                            400 Lind Hall
-                        207 Church Street S.E.
-                      Minneapolis, MN 55455  USA
-
-                       email: qhull@geom.umn.edu
-
-Installation
-
-For details on how to install SOLID see the documention in the 'doc' directory.
-
-Platforms
-
-SOLID 3 has been tested on the following platforms:
-
-    Linux IA32  gcc 2.95.3, gcc 3.3
-	Win32		MSVC++ 6.0 SP4, MSVC++ 7.1 
-
-  
-
diff --git a/extern/solid/SConscript b/extern/solid/SConscript
deleted file mode 100644
index 7482014c0a4..00000000000
--- a/extern/solid/SConscript
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-import sys
-
-Import('env')
-
-defs = 'USE_DOUBLES QHULL _LIB'
-cflags = []
-
-if env['OURPLATFORM']=='win32-vc':
-    defs += ' WIN32 NDEBUG _WINDOWS _LIB'
-    cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
-elif env['OURPLATFORM']=='win32-mingw':
-    defs += ' NDEBUG'
-    cflags += ['-O2']
-elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform=='openbsd3' or sys.platform=='sunos5':
-    defs += ' NDEBUG'
-    cflags += ['-O2']
-elif sys.platform=='darwin' :
-    defs += ' NDEBUG'
-    cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
-
-else:
-    print "################################################"
-    print 
-    print "Check if solid builds on your platform correctly"
-    print "Add your platform specific defines"
-    print "and cflags / cxxflags to the"
-    print "extern/solid/SConscript file"
-
-sources = env.Glob('src/*.cpp') + env.Glob('src/convex/*.cpp') + env.Glob('src/complex/*.cpp') + env.Glob('src/broad/*.cpp')
-
-incs = 'include src src/broad src/complex src/convex ../qhull/include'
-
-env.BlenderLib ( libname='extern_solid', sources=sources, includes=Split(incs), defines=Split(defs), libtype=['game2','player'], priority=[45, 75] , compileflags = cflags)
diff --git a/extern/solid/SOLID/SOLID.h b/extern/solid/SOLID/SOLID.h
deleted file mode 100644
index 37d74340f8c..00000000000
--- a/extern/solid/SOLID/SOLID.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_H
-#define SOLID_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" { 
-#endif
-    
-	DT_DECLARE_HANDLE(DT_ObjectHandle);
-	DT_DECLARE_HANDLE(DT_SceneHandle);
-	DT_DECLARE_HANDLE(DT_ShapeHandle);
-	DT_DECLARE_HANDLE(DT_VertexBaseHandle);
-	DT_DECLARE_HANDLE(DT_RespTableHandle);
-	DT_DECLARE_HANDLE(DT_ArchiveHandle);
-
-	typedef unsigned int DT_ResponseClass;
-
-	typedef enum DT_ResponseType { 
-		DT_NO_RESPONSE,                  /* No response (obsolete) */        
-		DT_BROAD_RESPONSE,      
-		DT_SIMPLE_RESPONSE,              /* No collision data */
-		DT_WITNESSED_RESPONSE,           /* A point common to both objects
-											is returned as collision data
-										 */
-		DT_DEPTH_RESPONSE                /* The penetration depth is returned
-											as collision data. The penetration depth
-											is the shortest vector over which one 
-											object needs to be translated in order
-											to bring the objects in touching contact. 
-										 */ 
-	} DT_ResponseType;
-    
-/* For witnessed response, the following structure represents a common point. The world 
-   coordinates of 'point1' and 'point2' coincide. 'normal' is the zero vector.
-   
-   For depth response, the following structure represents the penetration depth. 
-   'point1' en 'point2' are the witness points of the penetration depth in world coordinates.
-   The penetration depth vector in world coordinates is represented by 'normal'.
-*/
-
-	typedef struct DT_CollData {
-		DT_Vector3 point1;               /* Point in object1 in world coordinates */ 
-		DT_Vector3 point2;               /* Point in object2 in world coordinates */
-		DT_Vector3 normal;               /* point2 - point1 */ 
-	} DT_CollData;
-
-/* A response callback is called by SOLID for each pair of collding objects. 'client-data'
-   is a pointer to an arbitrary structure in the client application. The client objects are
-   pointers to structures in the client application associated with the coliding objects.
-   'coll_data' is the collision data computed by SOLID.
-*/
-
-	typedef DT_Bool (*DT_ResponseCallback)(void *client_data,
-										   void *client_object1,
-										   void *client_object2,
-										   const DT_CollData *coll_data);
-										
-/* Shape definition */
-
-
-	extern DECLSPEC DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z);
-	extern DECLSPEC DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height);
-	extern DECLSPEC DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height);
-	extern DECLSPEC DT_ShapeHandle DT_NewSphere(DT_Scalar radius);
-	extern DECLSPEC DT_ShapeHandle DT_NewPoint(const DT_Vector3 point);
-	extern DECLSPEC DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target);
-	extern DECLSPEC DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
-	extern DECLSPEC DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
-
-	extern DECLSPEC DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride);
-	extern DECLSPEC void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase);	
-	extern DECLSPEC void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer);
-
-	extern DECLSPEC DT_ShapeHandle DT_NewComplexShape(DT_VertexBaseHandle vertexBase);
-	extern DECLSPEC void           DT_EndComplexShape();
-
-	extern DECLSPEC DT_ShapeHandle DT_NewPolytope(DT_VertexBaseHandle vertexBase);
-	extern DECLSPEC void           DT_EndPolytope();
-
-	extern DECLSPEC void DT_Begin();
-	extern DECLSPEC void DT_End();
-
-	extern DECLSPEC void DT_Vertex(const DT_Vector3 vertex);
-	extern DECLSPEC void DT_VertexIndex(DT_Index index);
-
-	extern DECLSPEC void DT_VertexIndices(DT_Count count, const DT_Index *indices);
-	extern DECLSPEC void DT_VertexRange(DT_Index first, DT_Count count); 
-
-	extern DECLSPEC void DT_DeleteShape(DT_ShapeHandle shape);
-
-/* Object  */
-
-	extern DECLSPEC DT_ObjectHandle DT_CreateObject(
-		void *client_object,      /* pointer to object in client memory */
-		DT_ShapeHandle shape  /* the shape or geometry of the object */
-		);
-
-	extern DECLSPEC void DT_DestroyObject(DT_ObjectHandle object);
-
-
-
-	extern DECLSPEC void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position);
-	extern DECLSPEC void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation);
-	extern DECLSPEC void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling);
-
-/* The margin is an offset from the actual shape. The actual geometry of an
-   object is the set of points whose distance to the transformed shape is at 
-   most the  margin. During the lifetime of an object the margin can be 
-   modified. 
-*/
-   
-	extern DECLSPEC void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin);
-
-
-/* These commands assume a column-major 4x4 OpenGL matrix representation */
-
-	extern DECLSPEC void DT_SetMatrixf(DT_ObjectHandle object, const float *m); 
-	extern DECLSPEC void DT_GetMatrixf(DT_ObjectHandle object, float *m); 
-
-	extern DECLSPEC void DT_SetMatrixd(DT_ObjectHandle object, const double *m); 
-	extern DECLSPEC void DT_GetMatrixd(DT_ObjectHandle object, double *m); 
-
-	extern DECLSPEC void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max);
-
-
-	extern DECLSPEC DT_Bool  DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2,
-												DT_Vector3 v);
-/* This next command returns the distance between the objects. De returned
-   closest points are given in world coordinates.
-*/
-	extern DECLSPEC DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2,
-												DT_Vector3 point1, DT_Vector3 point2);  
-
-	extern DECLSPEC DT_Bool   DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2,
-												DT_Vector3 point);
-
-	extern DECLSPEC DT_Bool   DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2,
-											 DT_Vector3 point1, DT_Vector3 point2);  
-
-/* Scene */
-
-	extern DECLSPEC DT_SceneHandle DT_CreateScene(); 
-	extern DECLSPEC void           DT_DestroyScene(DT_SceneHandle scene);
-
-	extern DECLSPEC void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object);
-	extern DECLSPEC void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object);
-
-/* Note that objects can be assigned to multiple scenes! */
-
-/* Response */
-
-/* Response tables are defined independent of the scenes in which they are used.
-   Multiple response tables can be used in one scene, and a response table
-   can be shared among scenes.
-*/
-	extern DECLSPEC DT_RespTableHandle DT_CreateRespTable(); 
-	extern DECLSPEC void               DT_DestroyRespTable(DT_RespTableHandle respTable); 
-
-/* Responses are defined on (pairs of) response classes. Each response table 
-   maintains its set of response classes.
-*/
-	extern DECLSPEC DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable);
-
-/* To each object for which a response is defined in the response table a
-   response class needs to be assigned. 
-*/
-
-	extern DECLSPEC void DT_SetResponseClass(DT_RespTableHandle respTable,
-											 DT_ObjectHandle object,
-											 DT_ResponseClass responseClass);
-
-	extern DECLSPEC void DT_ClearResponseClass(DT_RespTableHandle respTable, 
-											   DT_ObjectHandle object);
-
-	extern DECLSPEC void DT_CallResponse(DT_RespTableHandle respTable,
-										 DT_ObjectHandle object1,
-										 DT_ObjectHandle object2,
-										 const DT_CollData *coll_data);
-
-/* For each pair of objects multiple responses can be defined. A response is a callback
-   together with its response type and client data. */
-    
-/* Responses can be defined for all pairs of response classes... */
-	extern DECLSPEC void DT_AddDefaultResponse(DT_RespTableHandle respTable,
-											   DT_ResponseCallback response, 
-											   DT_ResponseType type, void *client_data);
-
-	extern DECLSPEC void DT_RemoveDefaultResponse(DT_RespTableHandle respTable,
-												  DT_ResponseCallback response);
-/* ...per response class... */
-	extern DECLSPEC void DT_AddClassResponse(DT_RespTableHandle respTable,
-											 DT_ResponseClass responseClass,
-											 DT_ResponseCallback response,
-											 DT_ResponseType type, void *client_data);
-
-	extern DECLSPEC void DT_RemoveClassResponse(DT_RespTableHandle respTable,
-												DT_ResponseClass responseClass,
-												DT_ResponseCallback response);
-
-/* ... and per pair of response classes...*/
-	extern DECLSPEC void DT_AddPairResponse(DT_RespTableHandle respTable,
-											DT_ResponseClass responseClass1,
-											DT_ResponseClass responseClass2, 
-											DT_ResponseCallback response,
-											DT_ResponseType type, void *client_data);
-	extern DECLSPEC void DT_RemovePairResponse(DT_RespTableHandle respTable,
-											   DT_ResponseClass responseClass1,
-											   DT_ResponseClass responseClass2,
-											   DT_ResponseCallback response);
-
-/* The next command calls the response callbacks for all intersecting pairs of objects in a scene. 
-   'DT_Test' returns the number of pairs of objects for which callbacks have been called. 
-*/
- 
-	extern DECLSPEC DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable);
-
-/* Set the maximum relative error in the closest points and penetration depth
-   computation. The default for `max_error' is 1.0e-3. Larger errors result
-   in better performance. Non-positive error tolerances are ignored.
-*/ 
-
-	extern DECLSPEC void DT_SetAccuracy(DT_Scalar max_error);
-
-/* Set the maximum tolerance on relative errors due to rounding.  The default for `tol_error' 
-   is the machine epsilon. Very large tolerances result in false collisions. Setting tol_error too small 
-   results in missed collisions. Non-positive error tolerances are ignored. 
-*/ 
-    
-	extern DECLSPEC void DT_SetTolerance(DT_Scalar tol_error);
-
-
-/* This function returns the client pointer to the first object in a scene hit by the ray 
-   (actually a line segment) defined by the points 'from' en 'to'. The spot is the hit point 
-   on the object in local coordinates. 'normal' is the normal to the surface of the object in
-   world coordinates. The ignore_client pointer is used to make one of the objects transparent.
-
-   NB: Currently ray tests are implemented for spheres, boxes, and meshes only!!
-*/   
-
-	extern DECLSPEC void *DT_RayCast(DT_SceneHandle scene, void *ignore_client,
-									 const DT_Vector3 source, const DT_Vector3 target,
-									 DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-/* Similar, only here a single object is tested and a boolean is returned */
-
-	extern DECLSPEC DT_Bool DT_ObjectRayCast(DT_ObjectHandle object,
-											 const DT_Vector3 source, const DT_Vector3 target,
-											 DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/SOLID/SOLID_broad.h b/extern/solid/SOLID/SOLID_broad.h
deleted file mode 100644
index 74e4214fa67..00000000000
--- a/extern/solid/SOLID/SOLID_broad.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_BROAD_H
-#define SOLID_BROAD_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-	DT_DECLARE_HANDLE(BP_SceneHandle);
-	DT_DECLARE_HANDLE(BP_ProxyHandle);
-	
-	typedef void (*BP_Callback)(void *client_data,
-								void *object1,
-								void *object2);
-
-	typedef bool (*BP_RayCastCallback)(void *client_data,
-									   void *object,
-									   const DT_Vector3 source,
-									   const DT_Vector3 target,
-									   DT_Scalar *lambda);
-	
-	extern DECLSPEC BP_SceneHandle BP_CreateScene(void *client_data,
-												  BP_Callback beginOverlap,
-												  BP_Callback endOverlap);
-	
-	extern DECLSPEC void           BP_DestroyScene(BP_SceneHandle scene);
-	
-	extern DECLSPEC BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, 
-												  void *object,
-												  const DT_Vector3 min, 
-												  const DT_Vector3 max);
-	
-	extern DECLSPEC void           BP_DestroyProxy(BP_SceneHandle scene, 
-												  BP_ProxyHandle proxy);
-	
-	extern DECLSPEC void BP_SetBBox(BP_ProxyHandle proxy, 
-									const DT_Vector3 min, 
-									const DT_Vector3 max);
-	
-	extern DECLSPEC void *BP_RayCast(BP_SceneHandle scene, 
-									 BP_RayCastCallback objectRayCast, 
-									 void *client_data,
-									 const DT_Vector3 source,
-									 const DT_Vector3 target,
-									 DT_Scalar *lambda);		
-	
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/SOLID/SOLID_types.h b/extern/solid/SOLID/SOLID_types.h
deleted file mode 100644
index 630594e447f..00000000000
--- a/extern/solid/SOLID/SOLID_types.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_TYPES_H
-#define SOLID_TYPES_H
-
-#ifndef DECLSPEC
-# ifdef WIN32
-#  define DECLSPEC __declspec(dllexport)
-# else
-#  define DECLSPEC
-# endif
-#endif
-
-#define DT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
-    
-
-typedef unsigned short DT_Index;
-typedef unsigned short DT_Count;
-typedef unsigned int   DT_Size;
-typedef float          DT_Scalar; 
-typedef int            DT_Bool;
-
-#define DT_FALSE 0
-#define DT_TRUE  1
-
-#define DT_CONTINUE 0
-#define DT_DONE 1
-
-typedef DT_Scalar DT_Vector3[3]; 
-typedef DT_Scalar DT_Quaternion[4]; 
-
-#endif
diff --git a/extern/solid/VisualC6/broad/broad.dsp b/extern/solid/VisualC6/broad/broad.dsp
deleted file mode 100644
index 1161d68fcd6..00000000000
--- a/extern/solid/VisualC6/broad/broad.dsp
+++ /dev/null
@@ -1,132 +0,0 @@
-# Microsoft Developer Studio Project File - Name="broad" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=broad - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "broad.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "broad.mak" CFG="broad - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "broad - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "broad - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "broad - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "broad - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "broad - Win32 Release"
-# Name "broad - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\src\broad\BP_C-api.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_EndpointList.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Proxy.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Scene.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Endpoint.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_EndpointList.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Proxy.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_ProxyList.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\broad\BP_Scene.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/complex/complex.dsp b/extern/solid/VisualC6/complex/complex.dsp
deleted file mode 100644
index 74ea67b9e23..00000000000
--- a/extern/solid/VisualC6/complex/complex.dsp
+++ /dev/null
@@ -1,116 +0,0 @@
-# Microsoft Developer Studio Project File - Name="complex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=complex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "complex.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "complex.mak" CFG="complex - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "complex - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "complex - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "complex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../src/convex" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "complex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "complex - Win32 Release"
-# Name "complex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_BBoxTree.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_Complex.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_BBoxTree.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_CBox.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\complex\DT_Complex.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/convex/convex.dsp b/extern/solid/VisualC6/convex/convex.dsp
deleted file mode 100644
index ec9caace9d9..00000000000
--- a/extern/solid/VisualC6/convex/convex.dsp
+++ /dev/null
@@ -1,232 +0,0 @@
-# Microsoft Developer Studio Project File - Name="convex" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=convex - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "convex.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "convex.mak" CFG="convex - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "convex - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "convex - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "convex - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../../qhull/include" /D "NDEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "convex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../../qhull/include" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "convex - Win32 Release"
-# Name "convex - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Accuracy.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Box.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cone.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Convex.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cylinder.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Facet.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_LineSegment.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_PenDepth.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Point.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polyhedron.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polytope.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Sphere.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Triangle.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Accuracy.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Array.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Box.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cone.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Convex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Cylinder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Facet.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_GJK.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Hull.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_IndexArray.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_LineSegment.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Minkowski.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_PenDepth.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Point.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polyhedron.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Polytope.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Shape.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Sphere.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Transform.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_Triangle.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\convex\DT_VertexBase.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/dynamics/dynamics.dsp b/extern/solid/VisualC6/dynamics/dynamics.dsp
deleted file mode 100644
index 9659cbf8a56..00000000000
--- a/extern/solid/VisualC6/dynamics/dynamics.dsp
+++ /dev/null
@@ -1,120 +0,0 @@
-# Microsoft Developer Studio Project File - Name="dynamics" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=dynamics - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "dynamics.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "dynamics.mak" CFG="dynamics - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "dynamics - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "dynamics - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "dynamics - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "dynamics - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "dynamics - Win32 Release"
-# Name "dynamics - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Dynamic.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Kinetic.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\RigidBody.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Dynamic.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\Kinetic.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\examples\dynamics\RigidBody.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/gldemo/gldemo.dsp b/extern/solid/VisualC6/gldemo/gldemo.dsp
deleted file mode 100644
index f3cde286161..00000000000
--- a/extern/solid/VisualC6/gldemo/gldemo.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="gldemo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=gldemo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "gldemo.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "gldemo.mak" CFG="gldemo - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "gldemo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "gldemo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "gldemo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "gldemo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "gldemo - Win32 Release"
-# Name "gldemo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\gldemo.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/mnm/mnm.dsp b/extern/solid/VisualC6/mnm/mnm.dsp
deleted file mode 100644
index 2df6d951794..00000000000
--- a/extern/solid/VisualC6/mnm/mnm.dsp
+++ /dev/null
@@ -1,100 +0,0 @@
-# Microsoft Developer Studio Project File - Name="mnm" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=mnm - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "mnm.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "mnm.mak" CFG="mnm - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "mnm - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "mnm - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "mnm - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "mnm - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "mnm - Win32 Release"
-# Name "mnm - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\mnm.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/physics/physics.dsp b/extern/solid/VisualC6/physics/physics.dsp
deleted file mode 100644
index dd69b6a35b2..00000000000
--- a/extern/solid/VisualC6/physics/physics.dsp
+++ /dev/null
@@ -1,100 +0,0 @@
-# Microsoft Developer Studio Project File - Name="physics" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=physics - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "physics.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "physics.mak" CFG="physics - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "physics - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "physics - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "physics - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "physics - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "physics - Win32 Release"
-# Name "physics - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\physics.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/sample/sample.dsp b/extern/solid/VisualC6/sample/sample.dsp
deleted file mode 100644
index c6e0423cd04..00000000000
--- a/extern/solid/VisualC6/sample/sample.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="sample" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sample - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "sample.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "sample.mak" CFG="sample - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "sample - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sample - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "sample - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "sample - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "sample - Win32 Release"
-# Name "sample - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\examples\sample.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/solid.dsw b/extern/solid/VisualC6/solid.dsw
deleted file mode 100644
index 397cc4bf371..00000000000
--- a/extern/solid/VisualC6/solid.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "broad"=".\broad\broad.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "complex"=".\complex\complex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "convex"=".\convex\convex.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name qhull
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "qhull"="..\..\qhull\VisualC6\qhull\qhull.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "solid"=".\solid\solid.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name broad
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name complex
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name convex
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/extern/solid/VisualC6/solid/solid.dsp b/extern/solid/VisualC6/solid/solid.dsp
deleted file mode 100644
index 4ac7459c2f9..00000000000
--- a/extern/solid/VisualC6/solid/solid.dsp
+++ /dev/null
@@ -1,148 +0,0 @@
-# Microsoft Developer Studio Project File - Name="solid" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=solid - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "solid.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "solid.mak" CFG="solid - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "solid - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "solid - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "solid - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "NDEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=XCOPY   /Y   ..\..\include\SOLID*.h   ..\..\..\..\..\lib\windows\solid\include\solid\  	XCOPY   /Y   Release\*.lib   ..\..\..\..\..\lib\windows\solid\lib\ 
-# End Special Build Tool
-
-!ELSEIF  "$(CFG)" == "solid - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-LINK32=cwlink.exe
-MTL=midl.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Special Build Tool
-SOURCE="$(InputPath)"
-PostBuild_Cmds=XCOPY   /Y   ..\..\include\SOLID*.h   ..\..\..\..\..\lib\windows\solid\include\solid\  	XCOPY   /Y   Debug\*.lib   ..\..\..\..\..\lib\windows\solid\lib\Debug\ 
-# End Special Build Tool
-
-!ENDIF 
-
-# Begin Target
-
-# Name "solid - Win32 Release"
-# Name "solid - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\src\DT_C-api.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\DT_AlgoTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Response.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/VisualC6/solid_dll/solid_dll.dsp b/extern/solid/VisualC6/solid_dll/solid_dll.dsp
deleted file mode 100644
index eed092502e0..00000000000
--- a/extern/solid/VisualC6/solid_dll/solid_dll.dsp
+++ /dev/null
@@ -1,147 +0,0 @@
-# Microsoft Developer Studio Project File - Name="solid_dll" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=solid_dll - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "solid_dll.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "solid_dll.mak" CFG="solid_dll - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "solid_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "solid_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "solid_dll - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "../../lib/win32/vc6"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "NDEBUG" /D "USE_DOUBLES" /D "QHULL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../lib/win32/vc6/solid.dll"
-
-!ELSEIF  "$(CFG)" == "solid_dll - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "../../lib/win32/vc6"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../lib/win32/vc6/solidd.dll" /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "solid_dll - Win32 Release"
-# Name "solid_dll - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE="..\..\src\DT_C-api.cpp"
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\DT_AlgoTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Encounter.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Response.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_RespTable.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\DT_Scene.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/extern/solid/include/GEN_MinMax.h b/extern/solid/include/GEN_MinMax.h
deleted file mode 100644
index 9ea961cfe4f..00000000000
--- a/extern/solid/include/GEN_MinMax.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef GEN_MINMAX_H
-#define GEN_MINMAX_H
-
-template 
-inline const T& GEN_min(const T& a, const T& b) 
-{
-  return b < a ? b : a;
-}
-
-template 
-inline const T& GEN_max(const T& a, const T& b) 
-{
-  return  a < b ? b : a;
-}
-
-template 
-inline const T& GEN_clamped(const T& a, const T& lb, const T& ub) 
-{
-	return a < lb ? lb : (ub < a ? ub : a); 
-}
-
-template 
-inline void GEN_set_min(T& a, const T& b) 
-{
-    if (b < a) 
-	{
-		a = b;
-	}
-}
-
-template 
-inline void GEN_set_max(T& a, const T& b) 
-{
-    if (a < b) 
-	{
-		a = b;
-	}
-}
-
-template 
-inline void GEN_clamp(T& a, const T& lb, const T& ub) 
-{
-	if (a < lb) 
-	{
-		a = lb; 
-	}
-	else if (ub < a) 
-	{
-		a = ub;
-	}
-}
-
-#endif
diff --git a/extern/solid/include/GEN_random.h b/extern/solid/include/GEN_random.h
deleted file mode 100644
index 4690a05511a..00000000000
--- a/extern/solid/include/GEN_random.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef GEN_RANDOM_H
-#define GEN_RANDOM_H
-
-#ifdef MT19937
-
-#include 
-#include 
-
-#define GEN_RAND_MAX UINT_MAX
-
-inline void         GEN_srand(unsigned int seed) { init_genrand(seed); }
-inline unsigned int GEN_rand()                   { return genrand_int32(); }
-
-#else
-
-#include 
-
-#define GEN_RAND_MAX RAND_MAX
-
-inline void         GEN_srand(unsigned int seed) { srand(seed); } 
-inline unsigned int GEN_rand()                   { return rand(); }
-
-#endif
-
-#endif
-
diff --git a/extern/solid/include/MT/Interval.h b/extern/solid/include/MT/Interval.h
deleted file mode 100644
index c6ba2fc1681..00000000000
--- a/extern/solid/include/MT/Interval.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef INTERVAL_H
-#define INTERVAL_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-#include 
-#include 
-
-namespace MT {
-
-	template 
-	class Interval {
-	public:
-		Interval() {}
-		
-
-#if _MSC_VER <= 1200
-        explicit Interval(const Scalar& x) 
-		    : m_lb(x), m_ub(x)
-	    {}
-        
- 
-		Interval(const Scalar& lb, const Scalar& ub) 
-			: m_lb(lb), m_ub(ub)
-		{
-			assert(lb <= ub);
-		}
-#else
-		template 
-		explicit Interval(const Scalar2& x) 
-			: m_lb(x), m_ub(x)
-		{}
-		
-		template 
-		Interval(const Scalar2& lb, const Scalar2& ub) 
-			: m_lb(lb), m_ub(ub)
-		{
-			assert(lb <= ub);
-		}
-		
-		template 
-		Interval(const Interval& z) 
-		{ 
-			*this = z; 
-		}
-		
-		template 
-		Interval& operator=(const Interval& z) 
-		{ 
-			m_lb = Scalar(z.lower()); 
-			m_ub = Scalar(z.upper()); 
-			return *this;
-		}
-#endif
-      
-		
-
-		Scalar&       lower()       { return m_lb; }
-		const Scalar& lower() const { return m_lb; }
-		
-		Scalar&       upper()       { return m_ub; }
-		const Scalar& upper() const { return m_ub; }
-		 
-		Scalar center() const { return (m_lb + m_ub) * Scalar(0.5); } 
-		Scalar extent() const { return (m_ub - m_lb) * Scalar(0.5); } 
-
-	
-	protected:
-		Scalar m_lb, m_ub;
-	};
-
-	template 
-	inline Interval 
-	operator+(const Interval& z1, const Interval& z2)
-	{
-		return Interval(z1.lower() + z2.lower(), 
-								z1.upper() + z2.upper());
-	}
-
-	template 
-	inline Interval 
-	operator-(const Interval& z1, const Interval& z2)
-	{
-		return Interval(z1.lower() - z2.upper(), 
-								z1.upper() - z2.lower());
-	}
-	
-	template 
-	inline std::ostream& 
-	operator<<(std::ostream& os, const Interval& z)
-	{
-		return os << '[' << z.lower() << ", " << z.upper() << ']';
-	}
-
-	template 
-	inline Scalar 
-	median(const Interval& z) 
-	{
-		return (z.lower() + z.upper()) * Scalar(0.5);
-	}
-	
-	template 
-	inline Scalar 
-	width(const Interval& z) 
-	{
-		return z.upper() - z.lower();
-	}
-	
-	template 
-	inline bool 
-	overlap(const Interval& z1, const Interval& z2) 
-	{
-		return z1.lower() <= z2.upper() && z2.lower() <= z1.upper();
-	}
-
-	template 
-	inline bool 
-	in(const Interval& z1, const Interval& z2) 
-	{
-		return z2.lower() <= z1.lower() && z1.upper() <= z2.upper();
-	}
-
-	template 
-	inline bool 
-	in(Scalar x, const Interval& z) 
-	{
-		return z.lower() <= x && x <= z.upper();
-	}
-	
-	template 
-	inline Interval 
-	widen(const Interval& z, const Scalar& x) 
-	{
-		return Interval(z.lower() - x, z.upper() + x);
-	}	
-		
-	template
-	inline Interval
-	hull(const Interval& z1, const Interval& z2)
-	{
-		return Interval(GEN_min(z1.lower(), z2.lower()), 
-								GEN_max(z1.upper(), z2.upper()));
-	}	
-   
-   template
-	inline Interval
-	operator+(Scalar x, const Interval& z)
-	{
-		return Interval(x + z.lower(), x + z.upper());
-	}
-}
-
-#endif
diff --git a/extern/solid/include/MT/Matrix3x3.h b/extern/solid/include/MT/Matrix3x3.h
deleted file mode 100644
index 85e0d4cac84..00000000000
--- a/extern/solid/include/MT/Matrix3x3.h
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MATRIX3X3_H
-#define MATRIX3X3_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-#include "Vector3.h"
-#include "Quaternion.h"
-
-namespace MT {
-
-  // Row-major 3x3 matrix
-  
-	template 
-	class Matrix3x3 {
-	public:
-		Matrix3x3() {}
-		
-		template 
-		explicit Matrix3x3(const Scalar2 *m) { setValue(m); }
-		
-		explicit Matrix3x3(const Quaternion& q) { setRotation(q); }
-		
-		template 
-		Matrix3x3(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
-		{ 
-			setEuler(yaw, pitch, roll);
-		}
-		
-		template 
-		Matrix3x3(const Scalar2& xx, const Scalar2& xy, const Scalar2& xz,
-				  const Scalar2& yx, const Scalar2& yy, const Scalar2& yz,
-				  const Scalar2& zx, const Scalar2& zy, const Scalar2& zz)
-		{ 
-			setValue(xx, xy, xz, 
-					 yx, yy, yz, 
-					 zx, zy, zz);
-		}
-		
-		Vector3&  operator[](int i)
-		{ 
-			assert(0 <= i && i < 3);
-			return m_el[i]; 
-		}
-		
-		const Vector3& operator[](int i) const
-		{
-			assert(0 <= i && i < 3);
-			return m_el[i]; 
-		}
-		
-		Matrix3x3& operator*=(const Matrix3x3& m); 
-		
-		template 
-		void setValue(const Scalar2 *m)
-		{
-			m_el[0][0] = Scalar(m[0]); 
-			m_el[1][0] = Scalar(m[1]); 
-			m_el[2][0] = Scalar(m[2]);
-			m_el[0][1] = Scalar(m[4]); 
-			m_el[1][1] = Scalar(m[5]); 
-			m_el[2][1] = Scalar(m[6]);
-			m_el[0][2] = Scalar(m[8]); 
-			m_el[1][2] = Scalar(m[9]); 
-			m_el[2][2] = Scalar(m[10]);
-		}
-
-		template 
-		void setValue(const Scalar2& xx, const Scalar2& xy, const Scalar2& xz, 
-					  const Scalar2& yx, const Scalar2& yy, const Scalar2& yz, 
-					  const Scalar2& zx, const Scalar2& zy, const Scalar2& zz)
-		{
-			m_el[0][0] = Scalar(xx); 
-			m_el[0][1] = Scalar(xy); 
-			m_el[0][2] = Scalar(xz);
-			m_el[1][0] = Scalar(yx); 
-			m_el[1][1] = Scalar(yy); 
-			m_el[1][2] = Scalar(yz);
-			m_el[2][0] = Scalar(zx); 
-			m_el[2][1] = Scalar(zy); 
-			m_el[2][2] = Scalar(zz);
-		}
-  
-		void setRotation(const Quaternion& q) 
-		{
-			Scalar d = q.length2();
-			assert(d != Scalar(0.0));
-			Scalar s = Scalar(2.0) / d;
-			Scalar xs = q[0] * s,   ys = q[1] * s,   zs = q[2] * s;
-			Scalar wx = q[3] * xs,  wy = q[3] * ys,  wz = q[3] * zs;
-			Scalar xx = q[0] * xs,  xy = q[0] * ys,  xz = q[0] * zs;
-			Scalar yy = q[1] * ys,  yz = q[1] * zs,  zz = q[2] * zs;
-			setValue(Scalar(1.0) - (yy + zz), xy - wz, xz + wy,
-					 xy + wz, Scalar(1.0) - (xx + zz), yz - wx,
-					 xz - wy, yz + wx, Scalar(1.0) - (xx + yy));
-		}
-		
-		template  
-		void setEuler(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll) 
-		{
-			Scalar cy(Scalar_traits::cos(yaw)); 
-			Scalar sy(Scalar_traits::sin(yaw)); 
-			Scalar cp(Scalar_traits::cos(pitch)); 
-			Scalar sp(Scalar_traits::sin(pitch)); 
-			Scalar cr(Scalar_traits::cos(roll));
-			Scalar sr(Scalar_traits::sin(roll));
-			Scalar cc = cy * cr; 
-			Scalar cs = cy * sr; 
-			Scalar sc = sy * cr; 
-			Scalar ss = sy * sr;
-			setValue(cy * cp, -sc + sp * cs,  ss - sp * cc,
-					 sy * cp,  cc + sp * ss, -cs + sp * sc,
-					     -sp,       cp * sr,       cp * cr);
-		}
-		void setIdentity()
-		{ 
-			setValue(Scalar(1.0), Scalar(0.0), Scalar(0.0), 
-					 Scalar(0.0), Scalar(1.0), Scalar(0.0), 
-					 Scalar(0.0), Scalar(0.0), Scalar(1.0)); 
-		}
-    
-		template 
-		void getValue(Scalar2 *m) const 
-		{
-			m[0]  = Scalar2(m_el[0][0]); 
-			m[1]  = Scalar2(m_el[1][0]);
-			m[2]  = Scalar2(m_el[2][0]);
-			m[3]  = Scalar2(0.0); 
-			m[4]  = Scalar2(m_el[0][1]);
-			m[5]  = Scalar2(m_el[1][1]);
-			m[6]  = Scalar2(m_el[2][1]);
-			m[7]  = Scalar2(0.0); 
-			m[8]  = Scalar2(m_el[0][2]); 
-			m[9]  = Scalar2(m_el[1][2]);
-			m[10] = Scalar2(m_el[2][2]);
-			m[11] = Scalar2(0.0); 
-		}
-		
-		void getRotation(Quaternion& q) const
-		{
-			Scalar trace = m_el[0][0] + m_el[1][1] + m_el[2][2];
-			
-			if (trace > Scalar(0.0)) 
-			{
-				Scalar s = Scalar_traits::sqrt(trace + Scalar(1.0));
-				q[3] = s * Scalar(0.5);
-				s = Scalar(0.5) / s;
-				
-				q[0] = (m_el[2][1] - m_el[1][2]) * s;
-				q[1] = (m_el[0][2] - m_el[2][0]) * s;
-				q[2] = (m_el[1][0] - m_el[0][1]) * s;
-			} 
-			else 
-			{
-				int i = m_el[0][0] < m_el[1][1] ? 
-					(m_el[1][1] < m_el[2][2] ? 2 : 1) :
-					(m_el[0][0] < m_el[2][2] ? 2 : 0); 
-				int j = (i + 1) % 3;  
-				int k = (i + 2) % 3;
-				
-				Scalar s = Scalar_traits::sqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + Scalar(1.0));
-				q[i] = s * Scalar(0.5);
-				s = Scalar(0.5) / s;
-				
-				q[3] = (m_el[k][j] - m_el[j][k]) * s;
-				q[j] = (m_el[j][i] + m_el[i][j]) * s;
-				q[k] = (m_el[k][i] + m_el[i][k]) * s;
-			}
-		}
-
-
-		
-		template 
-		void getEuler(Scalar2& yaw, Scalar2& pitch, Scalar2& roll) const
-		{
-			pitch = Scalar2(Scalar_traits::asin(-m_el[2][0]));
-			if (pitch < Scalar_traits::TwoTimesPi())
-			{
-				if (pitch > Scalar_traits::TwoTimesPi())
-				{
-					yaw = Scalar2(Scalar_traits::atan2(m_el[1][0], m_el[0][0]));
-					roll = Scalar2(Scalar_traits::atan2(m_el[2][1], m_el[2][2]));
-				}
-				else 
-				{
-					yaw = Scalar2(-Scalar_traits::atan2(-m_el[0][1], m_el[0][2]));
-					roll = Scalar2(0.0);
-				}
-			}
-			else
-			{
-				yaw = Scalar2(Scalar_traits::atan2(-m_el[0][1], m_el[0][2]));
-				roll = Scalar2(0.0);
-			}
-		}
-
-		Vector3 getScaling() const
-		{
-			return Vector3(m_el[0][0] * m_el[0][0] + m_el[1][0] * m_el[1][0] + m_el[2][0] * m_el[2][0],
-								   m_el[0][1] * m_el[0][1] + m_el[1][1] * m_el[1][1] + m_el[2][1] * m_el[2][1],
-								   m_el[0][2] * m_el[0][2] + m_el[1][2] * m_el[1][2] + m_el[2][2] * m_el[2][2]);
-		}
-		
-		
-		Matrix3x3 scaled(const Vector3& s) const
-		{
-			return Matrix3x3(m_el[0][0] * s[0], m_el[0][1] * s[1], m_el[0][2] * s[2],
-									 m_el[1][0] * s[0], m_el[1][1] * s[1], m_el[1][2] * s[2],
-									 m_el[2][0] * s[0], m_el[2][1] * s[1], m_el[2][2] * s[2]);
-		}
-
-		Scalar            determinant() const;
-		Matrix3x3 adjoint() const;
-		Matrix3x3 absolute() const;
-		Matrix3x3 transpose() const;
-		Matrix3x3 inverse() const; 
-		
-		Matrix3x3 transposeTimes(const Matrix3x3& m) const;
-		Matrix3x3 timesTranspose(const Matrix3x3& m) const;
-		
-		Scalar tdot(int c, const Vector3& v) const 
-		{
-			return m_el[0][c] * v[0] + m_el[1][c] * v[1] + m_el[2][c] * v[2];
-		}
-		
-	protected:
-		Scalar cofac(int r1, int c1, int r2, int c2) const 
-		{
-			return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1];
-		}
-
-		Vector3 m_el[3];
-	};
-	
-	template 
-	inline std::ostream& 
-	operator<<(std::ostream& os, const Matrix3x3& m)
-	{
-		return os << m[0] << std::endl << m[1] << std::endl << m[2] << std::endl;
-	}
-	
-	template 
-	inline Matrix3x3& 
-	Matrix3x3::operator*=(const Matrix3x3& m)
-	{
-		setValue(m.tdot(0, m_el[0]), m.tdot(1, m_el[0]), m.tdot(2, m_el[0]),
-				 m.tdot(0, m_el[1]), m.tdot(1, m_el[1]), m.tdot(2, m_el[1]),
-				 m.tdot(0, m_el[2]), m.tdot(1, m_el[2]), m.tdot(2, m_el[2]));
-		return *this;
-	}
-	
-	template 
-	inline Scalar 
-	Matrix3x3::determinant() const
-	{ 
-		return triple((*this)[0], (*this)[1], (*this)[2]);
-	}
-	
-
-	template 
-	inline Matrix3x3 
-	Matrix3x3::absolute() const
-	{
-		return Matrix3x3(
-			Scalar_traits::abs(m_el[0][0]), Scalar_traits::abs(m_el[0][1]), Scalar_traits::abs(m_el[0][2]),
-			Scalar_traits::abs(m_el[1][0]), Scalar_traits::abs(m_el[1][1]), Scalar_traits::abs(m_el[1][2]),
-			Scalar_traits::abs(m_el[2][0]), Scalar_traits::abs(m_el[2][1]), Scalar_traits::abs(m_el[2][2]));
-	}
-
-	template 
-	inline Matrix3x3 
-	Matrix3x3::transpose() const 
-	{
-		return Matrix3x3(m_el[0][0], m_el[1][0], m_el[2][0],
-								 m_el[0][1], m_el[1][1], m_el[2][1],
-								 m_el[0][2], m_el[1][2], m_el[2][2]);
-	}
-	
-	template 
-	inline Matrix3x3 
-	Matrix3x3::adjoint() const 
-	{
-		return Matrix3x3(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2),
-								 cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0),
-								 cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1));
-	}
-	
-	template 
-	inline Matrix3x3 
-	Matrix3x3::inverse() const
-	{
-		Vector3 co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1));
-		Scalar det = (*this)[0].dot(co);
-		assert(det != Scalar(0.0));
-		Scalar s = Scalar(1.0) / det;
-		return Matrix3x3(co[0] * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s,
-								 co[1] * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s,
-								 co[2] * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s);
-	}
-	
-	template 
-	inline Matrix3x3 
-	Matrix3x3::transposeTimes(const Matrix3x3& m) const
-	{
-		return Matrix3x3(
-			m_el[0][0] * m[0][0] + m_el[1][0] * m[1][0] + m_el[2][0] * m[2][0],
-			m_el[0][0] * m[0][1] + m_el[1][0] * m[1][1] + m_el[2][0] * m[2][1],
-			m_el[0][0] * m[0][2] + m_el[1][0] * m[1][2] + m_el[2][0] * m[2][2],
-			m_el[0][1] * m[0][0] + m_el[1][1] * m[1][0] + m_el[2][1] * m[2][0],
-			m_el[0][1] * m[0][1] + m_el[1][1] * m[1][1] + m_el[2][1] * m[2][1],
-			m_el[0][1] * m[0][2] + m_el[1][1] * m[1][2] + m_el[2][1] * m[2][2],
-			m_el[0][2] * m[0][0] + m_el[1][2] * m[1][0] + m_el[2][2] * m[2][0],
-			m_el[0][2] * m[0][1] + m_el[1][2] * m[1][1] + m_el[2][2] * m[2][1],
-			m_el[0][2] * m[0][2] + m_el[1][2] * m[1][2] + m_el[2][2] * m[2][2]);
-	}
-	
-	template 
-	inline Matrix3x3 
-	Matrix3x3::timesTranspose(const Matrix3x3& m) const
-	{
-		return Matrix3x3(
-			m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]),
-			m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]),
-			m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2]));
-		
-	}
-
-	template 
-	inline Vector3 
-	operator*(const Matrix3x3& m, const Vector3& v) 
-	{
-		return Vector3(m[0].dot(v), m[1].dot(v), m[2].dot(v));
-	}
-	
-
-	template 
-	inline Vector3
-	operator*(const Vector3& v, const Matrix3x3& m)
-	{
-		return Vector3(m.tdot(0, v), m.tdot(1, v), m.tdot(2, v));
-	}
-
-	template 
-	inline Matrix3x3 
-	operator*(const Matrix3x3& m1, const Matrix3x3& m2)
-	{
-		return Matrix3x3(
-			m2.tdot(0, m1[0]), m2.tdot(1, m1[0]), m2.tdot(2, m1[0]),
-			m2.tdot(0, m1[1]), m2.tdot(1, m1[1]), m2.tdot(2, m1[1]),
-			m2.tdot(0, m1[2]), m2.tdot(1, m1[2]), m2.tdot(2, m1[2]));
-	}
-}
-
-#endif
diff --git a/extern/solid/include/MT/Quaternion.h b/extern/solid/include/MT/Quaternion.h
deleted file mode 100644
index a925f21cd5d..00000000000
--- a/extern/solid/include/MT/Quaternion.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef QUATERNION_H
-#define QUATERNION_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-#include "Tuple4.h"
-#include "Vector3.h"
-
-namespace MT {
-
-	template 	
-	class Quaternion : public Tuple4 {
-	public:
-		Quaternion() {}
-		
-		template 
-		explicit Quaternion(const Scalar2 *v) : Tuple4(v) {}
-		
-		template 
-		Quaternion(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w) 
-			: Tuple4(x, y, z, w) 
-		{}
-		
-		Quaternion(const Vector3& axis, const Scalar& angle) 
-		{ 
-			setRotation(axis, angle); 
-		}
-
-		template 
-		Quaternion(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
-		{ 
-			setEuler(yaw, pitch, roll); 
-		}
-
-		void setRotation(const Vector3& axis, const Scalar& angle)
-		{
-			Scalar d = axis.length();
-			assert(d != Scalar(0.0));
-			Scalar s = Scalar_traits::sin(angle * Scalar(0.5)) / d;
-			setValue(axis[0] * s, axis[1] * s, axis[2] * s, 
-					 Scalar_traits::cos(angle * Scalar(0.5)));
-		}
-
-		template 
-		void setEuler(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll)
-		{
-			Scalar halfYaw = Scalar(yaw) * Scalar(0.5);  
-			Scalar halfPitch = Scalar(pitch) * Scalar(0.5);  
-			Scalar halfRoll = Scalar(roll) * Scalar(0.5);  
-			Scalar cosYaw = Scalar_traits::cos(halfYaw);
-			Scalar sinYaw = Scalar_traits::sin(halfYaw);
-			Scalar cosPitch = Scalar_traits::cos(halfPitch);
-			Scalar sinPitch = Scalar_traits::sin(halfPitch);
-			Scalar cosRoll = Scalar_traits::cos(halfRoll);
-			Scalar sinRoll = Scalar_traits::sin(halfRoll);
-			setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
-					 cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
-					 sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
-					 cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
-		}
-  
-		Quaternion& operator+=(const Quaternion& q)
-		{
-			this->m_co[0] += q[0]; this->m_co[1] += q[1]; this->m_co[2] += q[2]; this->m_co[3] += q[3];
-			return *this;
-		}
-		
-		Quaternion& operator-=(const Quaternion& q) 
-		{
-			this->m_co[0] -= q[0]; this->m_co[1] -= q[1]; this->m_co[2] -= q[2]; this->m_co[3] -= q[3];
-			return *this;
-		}
-
-		Quaternion& operator*=(const Scalar& s)
-		{
-			this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; this->m_co[3] *= s;
-			return *this;
-		}
-		
-		Quaternion& operator/=(const Scalar& s) 
-		{
-			assert(s != Scalar(0.0));
-			return *this *= Scalar(1.0) / s;
-		}
-  
-		Quaternion& operator*=(const Quaternion& q)
-		{
-			setValue(this->m_co[3] * q[0] + this->m_co[0] * q[3] + this->m_co[1] * q[2] - this->m_co[2] * q[1],
-					 this->m_co[3] * q[1] + this->m_co[1] * q[3] + this->m_co[2] * q[0] - this->m_co[0] * q[2],
-					 this->m_co[3] * q[2] + this->m_co[2] * q[3] + this->m_co[0] * q[1] - this->m_co[1] * q[0],
-					 this->m_co[3] * q[3] - this->m_co[0] * q[0] - this->m_co[1] * q[1] - this->m_co[2] * q[2]);
-			return *this;
-		}
-	
-		Scalar dot(const Quaternion& q) const
-		{
-			return this->m_co[0] * q[0] + this->m_co[1] * q[1] + this->m_co[2] * q[2] + this->m_co[3] * q[3];
-		}
-
-		Scalar length2() const
-		{
-			return dot(*this);
-		}
-
-		Scalar length() const
-		{
-			return Scalar_traits::sqrt(length2());
-		}
-
-		Quaternion& normalize() 
-		{
-			return *this /= length();
-		}
-		
-		Quaternion normalized() const 
-		{
-			return *this / length();
-		} 
-
-		Scalar angle(const Quaternion& q) const 
-		{
-			Scalar s = Scalar_traits::sqrt(length2() * q.length2());
-			assert(s != Scalar(0.0));
-			return Scalar_traits::acos(dot(q) / s);
-		}
-   
-		Quaternion conjugate() const 
-		{
-			return Quaternion(-this->m_co[0], -this->m_co[1], -this->m_co[2], this->m_co[3]);
-		}
-
-		Quaternion inverse() const
-		{
-			return conjugate / length2();
-		}
-		
-		Quaternion slerp(const Quaternion& q, const Scalar& t) const
-		{
-			Scalar theta = angle(q);
-			if (theta != Scalar(0.0))
-			{
-				Scalar d = Scalar(1.0) / Scalar_traits::sin(theta);
-				Scalar s0 = Scalar_traits::sin((Scalar(1.0) - t) * theta);
-				Scalar s1 = Scalar_traits::sin(t * theta);   
-				return Quaternion((this->m_co[0] * s0 + q[0] * s1) * d,
-										  (this->m_co[1] * s0 + q[1] * s1) * d,
-										  (this->m_co[2] * s0 + q[2] * s1) * d,
-										  (this->m_co[3] * s0 + q[3] * s1) * d);
-			}
-			else
-			{
-				return *this;
-			}
-		}
-
-		static Quaternion random() 
-		{
-			// From: "Uniform Random Rotations", Ken Shoemake, Graphics Gems III, 
-            //       pg. 124-132
-			Scalar x0 = Scalar_traits::random();
-			Scalar r1 = Scalar_traits::sqrt(Scalar(1.0) - x0);
-			Scalar r2 = Scalar_traits::sqrt(x0);
-			Scalar t1 = Scalar_traits::TwoTimesPi() * Scalar_traits::random();
-			Scalar t2 = Scalar_traits::TwoTimesPi() * Scalar_traits::random();
-			Scalar c1 = Scalar_traits::cos(t1);
-			Scalar s1 = Scalar_traits::sin(t1);
-			Scalar c2 = Scalar_traits::cos(t2);
-			Scalar s2 = Scalar_traits::sin(t2);
-			return Quaternion(s1 * r1, c1 * r1, s2 * r2, c2 * r2);
-		}
-
-	};
-
-	template 
-	inline Quaternion
-	operator+(const Quaternion& q1, const Quaternion& q2)
-	{
-		return Quaternion(q1[0] + q2[0], q1[1] + q2[1], q1[2] + q2[2], q1[3] + q2[3]);
-	}
-	
-	template 
-	inline Quaternion
-	operator-(const Quaternion& q1, const Quaternion& q2)
-	{
-		return Quaternion(q1[0] - q2[0], q1[1] - q2[1], q1[2] - q2[2], q1[3] - q2[3]);
-	}
-	
-	template 
-	inline Quaternion
-	operator-(const Quaternion& q)
-	{
-		return Quaternion(-q[0], -q[1], -q[2], -q[3]);
-	}
-
-	template 
-	inline Quaternion
-	operator*(const Quaternion& q, const Scalar& s)
-	{
-		return Quaternion(q[0] * s, q[1] * s, q[2] * s, q[3] * s);
-	}
-	
-	template 
-	inline Quaternion
-	operator*(const Scalar& s, const Quaternion& q)
-	{
-		return q * s;
-	}
-	
-	template 
-	inline Quaternion
-	operator*(const Quaternion& q1, const Quaternion& q2) {
-		return Quaternion(q1[3] * q2[0] + q1[0] * q2[3] + q1[1] * q2[2] - q1[2] * q2[1],
-								  q1[3] * q2[1] + q1[1] * q2[3] + q1[2] * q2[0] - q1[0] * q2[2],
-								  q1[3] * q2[2] + q1[2] * q2[3] + q1[0] * q2[1] - q1[1] * q2[0],
-								  q1[3] * q2[3] - q1[0] * q2[0] - q1[1] * q2[1] - q1[2] * q2[2]); 
-	}
-	
-	template 
-	inline Quaternion
-	operator*(const Quaternion& q, const Vector3& w)
-	{
-		return Quaternion( q[3] * w[0] + q[1] * w[2] - q[2] * w[1],
-								   q[3] * w[1] + q[2] * w[0] - q[0] * w[2],
-								   q[3] * w[2] + q[0] * w[1] - q[1] * w[0],
-								  -q[0] * w[0] - q[1] * w[1] - q[2] * w[2]); 
-	}
-	
-	template 
-	inline Quaternion
-	operator*(const Vector3& w, const Quaternion& q)
-	{
-		return Quaternion( w[0] * q[3] + w[1] * q[2] - w[2] * q[1],
-								   w[1] * q[3] + w[2] * q[0] - w[0] * q[2],
-								   w[2] * q[3] + w[0] * q[1] - w[1] * q[0],
-								  -w[0] * q[0] - w[1] * q[1] - w[2] * q[2]); 
-	}
-	
-	template 
-	inline Scalar 
-	dot(const Quaternion& q1, const Quaternion& q2) 
-	{ 
-		return q1.dot(q2); 
-	}
-
-	template 
-	inline Scalar
-	length2(const Quaternion& q) 
-	{ 
-		return q.length2(); 
-	}
-
-	template 
-	inline Scalar
-	length(const Quaternion& q) 
-	{ 
-		return q.length(); 
-	}
-
-	template 
-	inline Scalar
-	angle(const Quaternion& q1, const Quaternion& q2) 
-	{ 
-		return q1.angle(q2); 
-	}
-
-	template 
-	inline Quaternion
-	conjugate(const Quaternion& q) 
-	{
-		return q.conjugate();
-	}
-
-	template 
-	inline Quaternion
-	inverse(const Quaternion& q) 
-	{
-		return q.inverse();
-	}
-
-	template 
-	inline Quaternion
-	slerp(const Quaternion& q1, const Quaternion& q2, const Scalar& t) 
-	{
-		return q1.slerp(q2, t);
-	}
-	
-}
-
-#endif
diff --git a/extern/solid/include/MT/Transform.h b/extern/solid/include/MT/Transform.h
deleted file mode 100644
index b80dc1bc18b..00000000000
--- a/extern/solid/include/MT/Transform.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef TRANSFORM_H
-#define TRANSFORM_H
-
-#include "Vector3.h"
-#include "Matrix3x3.h"
-
-namespace MT {
-
-	template 
-	class Transform {
-		enum { 
-			TRANSLATION = 0x01,
-			ROTATION    = 0x02,
-			RIGID       = TRANSLATION | ROTATION,  
-			SCALING     = 0x04,
-			LINEAR      = ROTATION | SCALING,
-			AFFINE      = TRANSLATION | LINEAR
-		};
-    
-	public:
-		Transform() {}
-		
-		template 
-		explicit Transform(const Scalar2 *m) { setValue(m); }
-
-		explicit Transform(const Quaternion& q, 
-						   const Vector3& c = Vector3(Scalar(0), Scalar(0), Scalar(0))) 
-			: m_basis(q),
-			  m_origin(c),
-			  m_type(RIGID)
-		{}
-
-		explicit Transform(const Matrix3x3& b, 
-						   const Vector3& c = Vector3(Scalar(0), Scalar(0), Scalar(0)), 
-						   unsigned int type = AFFINE)
-			: m_basis(b),
-			  m_origin(c),
-			  m_type(type)
-		{}
-
-		Vector3 operator()(const Vector3& x) const
-		{
-			return Vector3(m_basis[0].dot(x) + m_origin[0], 
-								   m_basis[1].dot(x) + m_origin[1], 
-								   m_basis[2].dot(x) + m_origin[2]);
-		}
-    
-		Vector3 operator*(const Vector3& x) const
-		{
-			return (*this)(x);
-		}
-
-		Matrix3x3&       getBasis()          { return m_basis; }
-		const Matrix3x3& getBasis()    const { return m_basis; }
-
-		Vector3&         getOrigin()         { return m_origin; }
-		const Vector3&   getOrigin()   const { return m_origin; }
-
-		Quaternion getRotation() const { return m_basis.getRotation(); }
-		template 
-		void setValue(const Scalar2 *m) 
-		{
-			m_basis.setValue(m);
-			m_origin.setValue(&m[12]);
-			m_type = AFFINE;
-		}
-
-		template 
-		void getValue(Scalar2 *m) const 
-		{
-			m_basis.getValue(m);
-			m_origin.getValue(&m[12]);
-			m[15] = Scalar2(1.0);
-		}
-
-		void setOrigin(const Vector3& origin) 
-		{ 
-			m_origin = origin;
-			m_type |= TRANSLATION;
-		}
-
-		void setBasis(const Matrix3x3& basis)
-		{ 
-			m_basis = basis;
-			m_type |= LINEAR;
-		}
-
-		void setRotation(const Quaternion& q)
-		{
-			m_basis.setRotation(q);
-			m_type = (m_type & ~LINEAR) | ROTATION;
-		}
-
-    	void scale(const Vector3& scaling)
-		{
-			m_basis = m_basis.scaled(scaling);
-			m_type |= SCALING;
-		}
-    
-		void setIdentity()
-		{
-			m_basis.setIdentity();
-			m_origin.setValue(Scalar(0.0), Scalar(0.0), Scalar(0.0));
-			m_type = 0x0;
-		}
-		
-		bool isIdentity() const { return m_type == 0x0; }
-    
-		Transform& operator*=(const Transform& t) 
-		{
-			m_origin += m_basis * t.m_origin;
-			m_basis *= t.m_basis;
-			m_type |= t.m_type; 
-			return *this;
-		}
-
-		Transform inverse() const
-		{ 
-			Matrix3x3 inv = (m_type & SCALING) ? 
-				                    m_basis.inverse() : 
-				                    m_basis.transpose();
-			
-			return Transform(inv, inv * -m_origin, m_type);
-		}
-
-		Transform inverseTimes(const Transform& t) const;  
-
-		Transform operator*(const Transform& t) const;
-
-	private:
-		
-		Matrix3x3 m_basis;
-		Vector3   m_origin;
-		unsigned int      m_type;
-	};
-
-
-	template 
-	inline Transform 
-	Transform::inverseTimes(const Transform& t) const  
-	{
-		Vector3 v = t.getOrigin() - m_origin;
-		if (m_type & SCALING) 
-		{
-			Matrix3x3 inv = m_basis.inverse();
-			return Transform(inv * t.getBasis(), inv * v, 
-									 m_type | t.m_type);
-		}
-		else 
-		{
-			return Transform(m_basis.transposeTimes(t.m_basis),
-									 v * m_basis, m_type | t.m_type);
-		}
-	}
-
-	template 
-	inline Transform 
-	Transform::operator*(const Transform& t) const
-	{
-		return Transform(m_basis * t.m_basis, 
-								 (*this)(t.m_origin), 
-								 m_type | t.m_type);
-	}	
-}
-
-#endif
diff --git a/extern/solid/include/MT/Tuple3.h b/extern/solid/include/MT/Tuple3.h
deleted file mode 100644
index 52ea33b7f58..00000000000
--- a/extern/solid/include/MT/Tuple3.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef TUPLE3_H
-#define TUPLE3_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-#include 
-
-namespace MT {
-
-	template 
-	class Tuple3 {
-	public:
-		Tuple3() {}
-		
-		template 
-		explicit Tuple3(const Scalar2 *v) 
-		{ 
-			setValue(v);
-		}
-		
-		template 
-		Tuple3(const Scalar2& x, const Scalar2& y, const Scalar2& z) 
-		{ 
-			setValue(x, y, z); 
-		}
-		
-		template 
-		Tuple3(const Tuple3& t) 
-		{ 
-			*this = t; 
-		}
-		
-		template 
-		Tuple3& operator=(const Tuple3& t) 
-		{ 
-			m_co[0] = Scalar(t[0]); 
-			m_co[1] = Scalar(t[1]); 
-			m_co[2] = Scalar(t[2]);
-			return *this;
-		}
-		
-		operator       Scalar *()       { return m_co; }
-		operator const Scalar *() const { return m_co; }
-
-		Scalar&       operator[](int i)       { return m_co[i];	}      
-		const Scalar& operator[](int i) const { return m_co[i]; }
-
-		Scalar&       x()       { return m_co[0]; }
-		const Scalar& x() const { return m_co[0]; }
-		
-		Scalar&       y()       { return m_co[1]; }
-		const Scalar& y() const { return m_co[1]; }
-		
-		Scalar&       z()       { return m_co[2]; }
-		const Scalar& z() const { return m_co[2]; }
-
-		template 
-		void setValue(const Scalar2 *v) 
-		{
-			m_co[0] = Scalar(v[0]); 
-			m_co[1] = Scalar(v[1]); 
-			m_co[2] = Scalar(v[2]);
-		}
-
-		template 
-		void setValue(const Scalar2& x, const Scalar2& y, const Scalar2& z)
-		{
-			m_co[0] = Scalar(x); 
-			m_co[1] = Scalar(y); 
-			m_co[2] = Scalar(z);
-		}
-
-		template 
-		void getValue(Scalar2 *v) const 
-		{
-			v[0] = Scalar2(m_co[0]);
-			v[1] = Scalar2(m_co[1]);
-			v[2] = Scalar2(m_co[2]);
-		}
-    
-	protected:
-		Scalar m_co[3];                            
-	};
-
-	template 
-	inline std::ostream& 
-	operator<<(std::ostream& os, const Tuple3& t)
-	{
-		return os << t[0] << ' ' << t[1] << ' ' << t[2];
-	}
-}
-
-#endif
diff --git a/extern/solid/include/MT/Tuple4.h b/extern/solid/include/MT/Tuple4.h
deleted file mode 100644
index 6930541271e..00000000000
--- a/extern/solid/include/MT/Tuple4.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef TUPLE4_H
-#define TUPLE4_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-#include 
-
-namespace MT {
-
-	template 
-	class Tuple4 {
-	public:
-		Tuple4() {}
-		
-		template 
-		explicit Tuple4(const Scalar2 *v) 
-		{ 
-			setValue(v);
-		}
-		
-		template 
-		Tuple4(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w) 
-		{ 
-			setValue(x, y, z, w); 
-		}
-		
-		operator       Scalar *()       { return m_co; }
-		operator const Scalar *() const { return m_co; }
-
-		Scalar&       operator[](int i)       { return m_co[i]; }      
-		const Scalar& operator[](int i) const {	return m_co[i];	}
-		
-		Scalar&       x()       { return m_co[0]; }
-		const Scalar& x() const { return m_co[0]; }
-		
-		Scalar&       y()       { return m_co[1]; }
-		const Scalar& y() const { return m_co[1]; }
-		
-		Scalar&       z()       { return m_co[2]; }
-		const Scalar& z() const { return m_co[2]; }
-
-		Scalar&       w()       { return m_co[3]; }
-		const Scalar& w() const { return m_co[3]; }
-    
-		template 
-		void setValue(const Scalar2 *v) 
-		{
-			m_co[0] = Scalar(v[0]); 
-			m_co[1] = Scalar(v[1]); 
-			m_co[2] = Scalar(v[2]);
-			m_co[3] = Scalar(v[3]);
-		}
-
-		template 
-		void setValue(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w)
-		{
-			m_co[0] = Scalar(x); 
-			m_co[1] = Scalar(y); 
-			m_co[2] = Scalar(z);
-			m_co[3] = Scalar(w);
-		}
-
-		template 
-		void getValue(Scalar2 *v) const 
-		{
-			v[0] = Scalar2(m_co[0]);
-			v[1] = Scalar2(m_co[1]);
-			v[2] = Scalar2(m_co[2]);
-			v[3] = Scalar2(m_co[3]);
-		}
-
-	protected:
-		Scalar m_co[4];
-	};
-
-	template 
-	inline std::ostream&
-	operator<<(std::ostream& os, const Tuple4& t)
-	{
-		return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3];
-	}
-
-}
-
-#endif
diff --git a/extern/solid/include/MT/Vector3.h b/extern/solid/include/MT/Vector3.h
deleted file mode 100644
index b569c003f59..00000000000
--- a/extern/solid/include/MT/Vector3.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef VECTOR3_H
-#define VECTOR3_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-#include "Tuple3.h"
-
-namespace MT {
-
-	template 	
-	class Vector3 : public Tuple3 {
-	public:
-		Vector3() {}
-	
-		template 
-		explicit Vector3(const Scalar2 *v) : Tuple3(v) {}
-		
-		template 
-		Vector3(const Scalar2& x, const Scalar2& y, const Scalar2& z) 
-			: Tuple3(x, y, z) 
-		{}
-		
-		Vector3& operator+=(const Vector3& v)
-		{
-			this->m_co[0] += v[0]; this->m_co[1] += v[1]; this->m_co[2] += v[2];
-			return *this;
-		}
-		
-		Vector3& operator-=(const Vector3& v) 
-		{
-			this->m_co[0] -= v[0]; this->m_co[1] -= v[1]; this->m_co[2] -= v[2];
-			return *this;
-		}
-
-		Vector3& operator*=(const Scalar& s)
-		{
-			this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s;
-			return *this;
-		}
-		
-		Vector3& operator/=(const Scalar& s) 
-		{
-			assert(s != Scalar(0.0));
-			return *this *= Scalar(1.0) / s;
-		}
-  
-		Scalar dot(const Vector3& v) const
-		{
-			return this->m_co[0] * v[0] + this->m_co[1] * v[1] + this->m_co[2] * v[2];
-		}
-
-		Scalar length2() const
-		{
-			return dot(*this);
-		}
-
-		Scalar length() const
-		{
-			return Scalar_traits::sqrt(length2());
-		}
-
-		Scalar distance2(const Vector3& v) const 
-		{
-			return (v - *this).length2();
-		}
-
-		Scalar distance(const Vector3& v) const 
-		{
-			return (v - *this).length();
-		}
-		
-		Vector3& normalize() 
-		{
-			return *this /= length();
-		}
-		
-		Vector3 normalized() const 
-		{
-			return *this / length();
-		} 
-
-		Scalar angle(const Vector3& v) const 
-		{
-			Scalar s = Scalar_traits::sqrt(length2() * v.length2());
-			assert(s != Scalar(0.0));
-			return Scalar_traits::acos(dot(v) / s);
-		}
-   
-		Vector3 absolute() const 
-		{
-			return Vector3(Scalar_traits::abs(this->m_co[0]), 
-								   Scalar_traits::abs(this->m_co[1]), 
-								   Scalar_traits::abs(this->m_co[2]));
-		}
-
-		Vector3 cross(const Vector3& v) const
-		{
-			return Vector3(this->m_co[1] * v[2] - this->m_co[2] * v[1],
-								   this->m_co[2] * v[0] - this->m_co[0] * v[2],
-								   this->m_co[0] * v[1] - this->m_co[1] * v[0]);
-		}
-		
-		Scalar triple(const Vector3& v1, const Vector3& v2) const
-		{
-			return this->m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) + 
-				   this->m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) + 
-				   this->m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]);
-		}
-
-		int minAxis() const
-		{
-			return this->m_co[0] < this->m_co[1] ? (this->m_co[0] < this->m_co[2] ? 0 : 2) : (this->m_co[1] < this->m_co[2] ? 1 : 2);
-		}
-
-		int maxAxis() const 
-		{
-			return this->m_co[0] < this->m_co[1] ? (this->m_co[1] < this->m_co[2] ? 2 : 1) : (this->m_co[0] < this->m_co[2] ? 2 : 0);
-		}
-
-		int furthestAxis() const
-		{
-			return absolute().minAxis();
-		}
-
-		int closestAxis() const 
-		{
-			return absolute().maxAxis();
-		}
-
-		Vector3 lerp(const Vector3& v, const Scalar& t) const 
-		{
-			return Vector3(this->m_co[0] + (v[0] - this->m_co[0]) * t,
-								   this->m_co[1] + (v[1] - this->m_co[1]) * t,
-								   this->m_co[2] + (v[2] - this->m_co[2]) * t);
-		}
-    
-		static Vector3 random() 
-		{
-			Scalar z = Scalar(2.0) * Scalar_traits::random() - Scalar(1.0);
-			Scalar r = Scalar_traits::sqrt(Scalar(1.0) - z * z);
-			Scalar t = Scalar_traits::TwoTimesPi() * Scalar_traits::random();
-			return Vector3(r * Scalar_traits::cos(t), 
-								   r * Scalar_traits::sin(t), 
-								   z);
-		}
-	};
-
-	template 
-	inline Vector3 
-	operator+(const Vector3& v1, const Vector3& v2) 
-	{
-		return Vector3(v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]);
-	}
-
-	template 
-	inline Vector3 
-	operator-(const Vector3& v1, const Vector3& v2)
-	{
-		return Vector3(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]);
-	}
-	
-	template 
-	inline Vector3 
-	operator-(const Vector3& v)
-	{
-		return Vector3(-v[0], -v[1], -v[2]);
-	}
-	
-	template 
-	inline Vector3 
-	operator*(const Vector3& v, const Scalar& s)
-	{
-		return Vector3(v[0] * s, v[1] * s, v[2] * s);
-	}
-	
-	template 
-	inline Vector3 
-	operator*(const Scalar& s, const Vector3& v)
-	{ 
-		return v * s; 
-	}
-	
-	template 
-	inline Vector3
-	operator/(const Vector3& v, const Scalar& s)
-	{
-		assert(s != Scalar(0.0));
-		return v * (Scalar(1.0) / s);
-	}
-	
-	template 
-	inline Scalar 
-	dot(const Vector3& v1, const Vector3& v2) 
-	{ 
-		return v1.dot(v2); 
-	}
-	
-	template 
-	inline Scalar
-	length2(const Vector3& v) 
-	{ 
-		return v.length2(); 
-	}
-
-	template 
-	inline Scalar
-	length(const Vector3& v) 
-	{ 
-		return v.length(); 
-	}
-
-	template 
-	inline Scalar
-	distance2(const Vector3& v1, const Vector3& v2) 
-	{ 
-		return v1.distance2(v2); 
-	}
-
-	template 
-	inline Scalar
-	distance(const Vector3& v1, const Vector3& v2) 
-	{ 
-		return v1.distance(v2); 
-	}
-
-	template 
-	inline Scalar
-	angle(const Vector3& v1, const Vector3& v2) 
-	{ 
-		return v1.angle(v2); 
-	}
-
-	template 
-	inline Vector3 
-	cross(const Vector3& v1, const Vector3& v2) 
-	{ 
-		return v1.cross(v2); 
-	}
-
-	template 
-	inline Scalar
-	triple(const Vector3& v1, const Vector3& v2, const Vector3& v3)
-	{
-		return v1.triple(v2, v3);
-	}
-
-	template 
-	inline Vector3 
-	lerp(const Vector3& v1, const Vector3& v2, const Scalar& t)
-	{
-		return v1.lerp(v2, t);
-	}
-
-}
-
-#endif
diff --git a/extern/solid/include/MT_BBox.h b/extern/solid/include/MT_BBox.h
deleted file mode 100644
index b5dc537e0d9..00000000000
--- a/extern/solid/include/MT_BBox.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_BBOX_H
-#define MT_BBOX_H
-
-#include "MT_Scalar.h"
-#include "MT_Point3.h"
-#include "MT_Vector3.h"
-
-#include  
-#include "MT_Interval.h" 
-
-
-
-class MT_BBox : public MT::Tuple3 {
-public:
-    MT_BBox() {}
-	MT_BBox(const MT_Point3& p)
-		: MT::Tuple3(MT_Interval(p[0]), 
-				                  MT_Interval(p[1]), 
-				                  MT_Interval(p[2]))
-	{}
-	MT_BBox(const MT_Point3& lb, const MT_Point3& ub)
-		: MT::Tuple3(MT_Interval(lb[0], ub[0]),
-				                  MT_Interval(lb[1], ub[1]),
-				                  MT_Interval(lb[2], ub[2]))
-	{}
-	MT_BBox(const MT_Interval& x, const MT_Interval& y, const MT_Interval& z) 
-		: MT::Tuple3(x, y, z) 
-	{}
-
-	MT_Point3 getMin() const 
-	{ 
-		return MT_Point3(m_co[0].lower(), m_co[1].lower(), m_co[2].lower());
-	}
-
-	MT_Point3 getMax() const 
-	{ 
-		return MT_Point3(m_co[0].upper(), m_co[1].upper(), m_co[2].upper());
-	}
-	
-	MT_Point3 getCenter() const
-	{
-		return MT_Point3(MT::median(m_co[0]), MT::median(m_co[1]), MT::median(m_co[2]));
-	}
-
-	MT_Vector3 getExtent() const
-	{
-		return MT_Vector3(MT::width(m_co[0]) * MT_Scalar(0.5), MT::width(m_co[1]) * MT_Scalar(0.5), MT::width(m_co[2]) * MT_Scalar(0.5));
-	}
-
-	void extend(const MT_Vector3& v) 
-	{
-		m_co[0] = MT::widen(m_co[0], v[0]);
-		m_co[1] = MT::widen(m_co[1], v[1]);
-		m_co[2] = MT::widen(m_co[2], v[2]);
-	}
-
-    bool overlaps(const MT_BBox& b) const 
-	{
-        return MT::overlap(m_co[0], b[0]) &&
-			   MT::overlap(m_co[1], b[1]) &&
-			   MT::overlap(m_co[2], b[2]);
-    }
-
-	bool inside(const MT_BBox& b) const 
-	{
-        return MT::in(m_co[0], b[0]) &&
-			   MT::in(m_co[1], b[1]) &&
-			   MT::in(m_co[2], b[2]);
-    }
-
-	MT_BBox hull(const MT_BBox& b) const 
-	{
-		return MT_BBox(MT::hull(m_co[0], b[0]), 
-					   MT::hull(m_co[1], b[1]), 
-					   MT::hull(m_co[2], b[2])); 
-	}
-
-	bool contains(const MT_Point3& p) const 
-	{
-		return MT::in(p[0], m_co[0]) && MT::in(p[1], m_co[1]) && MT::in(p[2], m_co[2]);
-	}
-};
-
-inline MT_BBox operator+(const MT_BBox& b1, const MT_BBox& b2) 
-{
-	return MT_BBox(b1[0] + b2[0], b1[1] + b2[1], b1[2] + b2[2]);
-}
-
-inline MT_BBox operator-(const MT_BBox& b1, const MT_BBox& b2) 
-{
-	return MT_BBox(b1[0] - b2[0], b1[1] - b2[1], b1[2] - b2[2]);
-}
-
-#endif
-
-
diff --git a/extern/solid/include/MT_Interval.h b/extern/solid/include/MT_Interval.h
deleted file mode 100644
index 25ebfd0a67d..00000000000
--- a/extern/solid/include/MT_Interval.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_INTERVAL_H
-#define MT_INTERVAL_H
-
-#include 
-
-#include "MT_Scalar.h"
-
-typedef MT::Interval MT_Interval;
-
-#endif
diff --git a/extern/solid/include/MT_Matrix3x3.h b/extern/solid/include/MT_Matrix3x3.h
deleted file mode 100644
index f7572f90fa2..00000000000
--- a/extern/solid/include/MT_Matrix3x3.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_MATRIX3X3_H
-#define MT_MATRIX3X3_H
-
-#include "MT_Scalar.h"
-#include 
-
-typedef MT::Matrix3x3 MT_Matrix3x3;
-
-
-
-#endif
diff --git a/extern/solid/include/MT_Point3.h b/extern/solid/include/MT_Point3.h
deleted file mode 100644
index ca84f652b65..00000000000
--- a/extern/solid/include/MT_Point3.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_POINT3_H
-#define MT_POINT3_H
-
-#include "MT_Vector3.h"
-
-typedef MT_Vector3 MT_Point3;
-
-#endif
diff --git a/extern/solid/include/MT_Quaternion.h b/extern/solid/include/MT_Quaternion.h
deleted file mode 100644
index ca860db711c..00000000000
--- a/extern/solid/include/MT_Quaternion.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_QUATERNION_H
-#define MT_QUATERNION_H
-
-#include "MT_Scalar.h"
-#include 
-
-typedef MT::Quaternion MT_Quaternion;
-
-#endif
-
-
-
diff --git a/extern/solid/include/MT_Scalar.h b/extern/solid/include/MT_Scalar.h
deleted file mode 100644
index 663a1f1839c..00000000000
--- a/extern/solid/include/MT_Scalar.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_SCALAR_H
-#define MT_SCALAR_H
-
-#if defined (__sun__) || defined ( __sun ) || defined (__sparc) || defined (__sparc__) || defined (__sgi)
-#include 
-#include 
-#else
-#include 
-#include 
-#include 
-#endif
-
-#undef max
-
-#include "SOLID_types.h"
-
-#include "GEN_MinMax.h"
-#include "GEN_random.h"
-
-template 
-struct Scalar_traits {};
-
-template<>
-struct Scalar_traits {
-	static float TwoTimesPi() { return 6.283185307179586232f; }
-	static float epsilon() { return FLT_EPSILON; }
-	static float max() { return FLT_MAX; }
-	
-	static float random() { return float(GEN_rand()) / float(GEN_RAND_MAX); }
-#if defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__APPLE__)
-	static float sqrt(float x) { return ::sqrt(x); } 
-	static float abs(float x) { return ::fabs(x); } 
-
-	static float cos(float x) { return ::cos(x); } 
-	static float sin(float x) { return ::sin(x); } 
-	static float tan(float x) { return ::tan(x); } 
-
-	static float acos(float x) { return ::acos(x); } 
-	static float asin(float x) { return ::asin(x); } 
-	static float atan(float x) { return ::atan(x); } 
-	static float atan2(float x, float y) { return ::atan2(x, y); } 
-
-	static float exp(float x) { return ::exp(x); } 
-	static float log(float x) { return ::log(x); } 
-	static float pow(float x, float y) { return ::pow(x, y); } 
-
-#else
-	static float sqrt(float x) { return ::sqrtf(x); } 
-	static float abs(float x) { return ::fabsf(x); } 
-
-	static float cos(float x) { return ::cosf(x); } 
-	static float sin(float x) { return ::sinf(x); } 
-	static float tan(float x) { return ::tanf(x); } 
-
-	static float acos(float x) { return ::acosf(x); } 
-	static float asin(float x) { return ::asinf(x); } 
-	static float atan(float x) { return ::atanf(x); } 
-	static float atan2(float x, float y) { return ::atan2f(x, y); } 
-
-	static float exp(float x) { return ::expf(x); } 
-	static float log(float x) { return ::logf(x); } 
-	static float pow(float x, float y) { return ::powf(x, y); } 
-#endif
-};
-
-template<>
-struct Scalar_traits {
-	static double TwoTimesPi() { return 6.283185307179586232; }
-	static double epsilon() { return DBL_EPSILON; }
-	static double max() { return DBL_MAX; }
-	
-	static double random() { return double(GEN_rand()) / double(GEN_RAND_MAX); }
-	static double sqrt(double x) { return ::sqrt(x); } 
-	static double abs(double x) { return ::fabs(x); } 
-
-	static double cos(double x) { return ::cos(x); } 
-	static double sin(double x) { return ::sin(x); } 
-	static double tan(double x) { return ::tan(x); } 
-
-	static double acos(double x) { return ::acos(x); } 
-	static double asin(double x) { return ::asin(x); } 
-	static double atan(double x) { return ::atan(x); } 
-	static double atan2(double x, double y) { return ::atan2(x, y); } 
-
-	static double exp(double x) { return ::exp(x); } 
-	static double log(double x) { return ::log(x); } 
-	static double pow(double x, double y) { return ::pow(x, y); } 
-};
-
-#ifdef USE_TRACER
-#include "MT_ScalarTracer.h"
-
-#ifdef USE_DOUBLES
-typedef MT_ScalarTracer   MT_Scalar;
-#else
-typedef MT_ScalarTracer    MT_Scalar;
-#endif
-
-#else
-
-#ifdef USE_DOUBLES
-typedef double   MT_Scalar;
-#else
-typedef float    MT_Scalar;
-#endif
-
-#endif
-
-
-const MT_Scalar  MT_2_PI         = Scalar_traits::TwoTimesPi();
-const MT_Scalar  MT_PI           = MT_2_PI * MT_Scalar(0.5);
-const MT_Scalar  MT_HALF_PI		 = MT_2_PI * MT_Scalar(0.25);
-const MT_Scalar  MT_RADS_PER_DEG = MT_2_PI / MT_Scalar(360.0);
-const MT_Scalar  MT_DEGS_PER_RAD = MT_Scalar(360.0) / MT_2_PI;
-
-const MT_Scalar  MT_EPSILON      = Scalar_traits::epsilon();
-const MT_Scalar  MT_INFINITY     = Scalar_traits::max();
-
-inline MT_Scalar MT_random() { return  Scalar_traits::random(); }
-inline MT_Scalar MT_abs(MT_Scalar x) { return Scalar_traits::abs(x); }
-inline MT_Scalar MT_sqrt(MT_Scalar x) { return Scalar_traits::sqrt(x); }
-
-inline MT_Scalar MT_cos(MT_Scalar x) { return Scalar_traits::cos(x); }
-inline MT_Scalar MT_sin(MT_Scalar x) { return Scalar_traits::sin(x); }
-inline MT_Scalar MT_tan(MT_Scalar x) { return Scalar_traits::tan(x); }
-
-inline MT_Scalar MT_acos(MT_Scalar x) { return Scalar_traits::acos(x); }
-inline MT_Scalar MT_asin(MT_Scalar x) { return Scalar_traits::asin(x); }
-inline MT_Scalar MT_atan(MT_Scalar x) { return Scalar_traits::atan(x); }
-inline MT_Scalar MT_atan2(MT_Scalar x, MT_Scalar y) { return Scalar_traits::atan2(x, y); }
-
-inline MT_Scalar MT_radians(MT_Scalar x) { return x * MT_RADS_PER_DEG; }
-inline MT_Scalar MT_degrees(MT_Scalar x) { return x * MT_DEGS_PER_RAD; }
-
-#endif
diff --git a/extern/solid/include/MT_Transform.h b/extern/solid/include/MT_Transform.h
deleted file mode 100644
index 66f92428054..00000000000
--- a/extern/solid/include/MT_Transform.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_TRANSFORM_H
-#define MT_TRANSFORM_H
-
-#include "MT_Scalar.h"
-#include 
-
-typedef MT::Matrix3x3 MT_Matrix3x3;
-typedef MT::Transform MT_Transform;
-
-#endif
-
-
-
-
-
diff --git a/extern/solid/include/MT_Vector3.h b/extern/solid/include/MT_Vector3.h
deleted file mode 100644
index d50e80dc287..00000000000
--- a/extern/solid/include/MT_Vector3.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef MT_VECTOR3_H
-#define MT_VECTOR3_H
-
-#include "MT_Scalar.h"
-#include 
-
-typedef MT::Vector3 MT_Vector3;
-
-#ifdef CPU_CMP
-
-inline bool operator==(const MT_Vector3& p1, const MT_Vector3& p2) 
-{
-	const unsigned int *i1 = (const unsigned int *)&p1;
-	const unsigned int *i2 = (const unsigned int *)&p2;
-    return i1[0] == i2[0] && i1[1] == i2[1] && i1[2] == i2[2];
-}
-
-#else
-
-inline bool operator==(const MT_Vector3& p1, const MT_Vector3& p2) 
-{
-	return p1[0] == p2[0] && p1[1] == p2[1] && p1[2] == p2[2];
-}
-
-#endif
-
-#endif
diff --git a/extern/solid/include/SOLID.h b/extern/solid/include/SOLID.h
deleted file mode 100644
index 96d40f1ea6b..00000000000
--- a/extern/solid/include/SOLID.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_H
-#define SOLID_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" { 
-#endif
-    
-	DT_DECLARE_HANDLE(DT_ObjectHandle);
-	DT_DECLARE_HANDLE(DT_SceneHandle);
-	DT_DECLARE_HANDLE(DT_ShapeHandle);
-	DT_DECLARE_HANDLE(DT_VertexBaseHandle);
-	DT_DECLARE_HANDLE(DT_RespTableHandle);
-	DT_DECLARE_HANDLE(DT_ArchiveHandle);
-
-	typedef unsigned int DT_ResponseClass;
-
-	typedef enum DT_ResponseType { 
-		DT_NO_RESPONSE,                  /* No response (obsolete) */
-		DT_BROAD_RESPONSE,               /* Broad phase response is returned. */
-		DT_SIMPLE_RESPONSE,              /* No collision data */
-		DT_WITNESSED_RESPONSE,           /* A point common to both objects
-											is returned as collision data
-										 */
-		DT_DEPTH_RESPONSE                /* The penetration depth is returned
-											as collision data. The penetration depth
-											is the shortest vector over which one 
-											object needs to be translated in order
-											to bring the objects in touching contact. 
-										 */ 
-	} DT_ResponseType;
-    
-/* For witnessed response, the following structure represents a common point. The world 
-   coordinates of 'point1' and 'point2' coincide. 'normal' is the zero vector.
-   
-   For depth response, the following structure represents the penetration depth. 
-   'point1' en 'point2' are the witness points of the penetration depth in world coordinates.
-   The penetration depth vector in world coordinates is represented by 'normal'.
-*/
-
-	typedef struct DT_CollData {
-		DT_Vector3 point1;               /* Point in object1 in world coordinates */ 
-		DT_Vector3 point2;               /* Point in object2 in world coordinates */
-		DT_Vector3 normal;               /* point2 - point1 */ 
-	} DT_CollData;
-
-/* A response callback is called by SOLID for each pair of collding objects. 'client-data'
-   is a pointer to an arbitrary structure in the client application. The client objects are
-   pointers to structures in the client application associated with the coliding objects.
-   'coll_data' is the collision data computed by SOLID.
-*/
-
-	typedef DT_Bool (*DT_ResponseCallback)(void *client_data,
-										   void *client_object1,
-										   void *client_object2,
-										   const DT_CollData *coll_data);
-										
-/* Shape definition */
-
-
-	extern DECLSPEC DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z);
-	extern DECLSPEC DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height);
-	extern DECLSPEC DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height);
-	extern DECLSPEC DT_ShapeHandle DT_NewSphere(DT_Scalar radius);
-	extern DECLSPEC DT_ShapeHandle DT_NewPoint(const DT_Vector3 point);
-	extern DECLSPEC DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target);
-	extern DECLSPEC DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
-	extern DECLSPEC DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2);
-
-	extern DECLSPEC DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride);
-	extern DECLSPEC void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase);	
-	extern DECLSPEC void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer);
-
-	extern DECLSPEC DT_ShapeHandle DT_NewComplexShape(DT_VertexBaseHandle vertexBase);
-	extern DECLSPEC void           DT_EndComplexShape();
-
-	extern DECLSPEC DT_ShapeHandle DT_NewPolytope(DT_VertexBaseHandle vertexBase);
-	extern DECLSPEC void           DT_EndPolytope();
-
-	extern DECLSPEC void DT_Begin();
-	extern DECLSPEC void DT_End();
-
-	extern DECLSPEC void DT_Vertex(const DT_Vector3 vertex);
-	extern DECLSPEC void DT_VertexIndex(DT_Index index);
-
-	extern DECLSPEC void DT_VertexIndices(DT_Count count, const DT_Index *indices);
-	extern DECLSPEC void DT_VertexRange(DT_Index first, DT_Count count); 
-
-	extern DECLSPEC void DT_DeleteShape(DT_ShapeHandle shape);
-
-/* Object  */
-
-	extern DECLSPEC DT_ObjectHandle DT_CreateObject(
-		void *client_object,      /* pointer to object in client memory */
-		DT_ShapeHandle shape  /* the shape or geometry of the object */
-		);
-
-	extern DECLSPEC void DT_DestroyObject(DT_ObjectHandle object);
-
-
-
-	extern DECLSPEC void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position);
-	extern DECLSPEC void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation);
-	extern DECLSPEC void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling);
-
-/* The margin is an offset from the actual shape. The actual geometry of an
-   object is the set of points whose distance to the transformed shape is at 
-   most the  margin. During the lifetime of an object the margin can be 
-   modified. 
-*/
-   
-	extern DECLSPEC void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin);
-
-
-/* These commands assume a column-major 4x4 OpenGL matrix representation */
-
-	extern DECLSPEC void DT_SetMatrixf(DT_ObjectHandle object, const float *m); 
-	extern DECLSPEC void DT_GetMatrixf(DT_ObjectHandle object, float *m); 
-
-	extern DECLSPEC void DT_SetMatrixd(DT_ObjectHandle object, const double *m); 
-	extern DECLSPEC void DT_GetMatrixd(DT_ObjectHandle object, double *m); 
-
-	extern DECLSPEC void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max);
-
-	
-	extern DECLSPEC DT_Bool  DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2,
-												DT_Vector3 v);
-/* This next command returns the distance between the objects. De returned
-   closest points are given in world coordinates.
-*/
-	extern DECLSPEC DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2,
-												DT_Vector3 point1, DT_Vector3 point2);  
-
-	extern DECLSPEC DT_Bool   DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2,
-												DT_Vector3 point);
-
-	extern DECLSPEC DT_Bool   DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2,
-											 DT_Vector3 point1, DT_Vector3 point2);  
-
-/* Scene */
-
-	extern DECLSPEC DT_SceneHandle DT_CreateScene(); 
-	extern DECLSPEC void           DT_DestroyScene(DT_SceneHandle scene);
-
-	extern DECLSPEC void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object);
-	extern DECLSPEC void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object);
-
-/* Note that objects can be assigned to multiple scenes! */
-
-/* Response */
-
-/* Response tables are defined independent of the scenes in which they are used.
-   Multiple response tables can be used in one scene, and a response table
-   can be shared among scenes.
-*/
-	extern DECLSPEC DT_RespTableHandle DT_CreateRespTable(); 
-	extern DECLSPEC void               DT_DestroyRespTable(DT_RespTableHandle respTable); 
-
-/* Responses are defined on (pairs of) response classes. Each response table 
-   maintains its set of response classes.
-*/
-	extern DECLSPEC DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable);
-
-/* To each object for which a response is defined in the response table a
-   response class needs to be assigned. 
-*/
-
-	extern DECLSPEC void DT_SetResponseClass(DT_RespTableHandle respTable,
-											 DT_ObjectHandle object,
-											 DT_ResponseClass responseClass);
-
-	extern DECLSPEC void DT_ClearResponseClass(DT_RespTableHandle respTable, 
-											   DT_ObjectHandle object);
-
-	extern DECLSPEC void DT_CallResponse(DT_RespTableHandle respTable,
-										 DT_ObjectHandle object1,
-										 DT_ObjectHandle object2,
-										 const DT_CollData *coll_data);
-
-/* For each pair of objects multiple responses can be defined. A response is a callback
-   together with its response type and client data. */
-    
-/* Responses can be defined for all pairs of response classes... */
-	extern DECLSPEC void DT_AddDefaultResponse(DT_RespTableHandle respTable,
-											   DT_ResponseCallback response, 
-											   DT_ResponseType type, void *client_data);
-
-	extern DECLSPEC void DT_RemoveDefaultResponse(DT_RespTableHandle respTable,
-												  DT_ResponseCallback response);
-/* ...per response class... */
-	extern DECLSPEC void DT_AddClassResponse(DT_RespTableHandle respTable,
-											 DT_ResponseClass responseClass,
-											 DT_ResponseCallback response,
-											 DT_ResponseType type, void *client_data);
-
-	extern DECLSPEC void DT_RemoveClassResponse(DT_RespTableHandle respTable,
-												DT_ResponseClass responseClass,
-												DT_ResponseCallback response);
-
-/* ... and per pair of response classes...*/
-	extern DECLSPEC void DT_AddPairResponse(DT_RespTableHandle respTable,
-											DT_ResponseClass responseClass1,
-											DT_ResponseClass responseClass2, 
-											DT_ResponseCallback response,
-											DT_ResponseType type, void *client_data);
-	extern DECLSPEC void DT_RemovePairResponse(DT_RespTableHandle respTable,
-											   DT_ResponseClass responseClass1,
-											   DT_ResponseClass responseClass2,
-											   DT_ResponseCallback response);
-
-/* The next command calls the response callbacks for all intersecting pairs of objects in a scene. 
-   'DT_Test' returns the number of pairs of objects for which callbacks have been called. 
-*/
- 
-	extern DECLSPEC DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable);
-
-/* Set the maximum relative error in the closest points and penetration depth
-   computation. The default for `max_error' is 1.0e-3. Larger errors result
-   in better performance. Non-positive error tolerances are ignored.
-*/ 
-
-	extern DECLSPEC void DT_SetAccuracy(DT_Scalar max_error);
-
-/* Set the maximum tolerance on relative errors due to rounding.  The default for `tol_error' 
-   is the machine epsilon. Very large tolerances result in false collisions. Setting tol_error too small 
-   results in missed collisions. Non-positive error tolerances are ignored. 
-*/ 
-    
-	extern DECLSPEC void DT_SetTolerance(DT_Scalar tol_error);
-
-
-/* This function returns the client pointer to the first object in a scene hit by the ray 
-   (actually a line segment) defined by the points 'from' en 'to'. The spot is the hit point 
-   on the object in local coordinates. 'normal' is the normal to the surface of the object in
-   world coordinates. The ignore_client pointer is used to make one of the objects transparent.
-
-   NB: Currently ray tests are implemented for spheres, boxes, and meshes only!!
-*/   
-
-	extern DECLSPEC void *DT_RayCast(DT_SceneHandle scene, void *ignore_client,
-									 const DT_Vector3 source, const DT_Vector3 target,
-									 DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-/* Similar, only here a single object is tested and a boolean is returned */
-
-	extern DECLSPEC DT_Bool DT_ObjectRayCast(DT_ObjectHandle object,
-											 const DT_Vector3 source, const DT_Vector3 target,
-											 DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/include/SOLID_broad.h b/extern/solid/include/SOLID_broad.h
deleted file mode 100644
index 74e4214fa67..00000000000
--- a/extern/solid/include/SOLID_broad.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_BROAD_H
-#define SOLID_BROAD_H
-
-#include "SOLID_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-    
-	DT_DECLARE_HANDLE(BP_SceneHandle);
-	DT_DECLARE_HANDLE(BP_ProxyHandle);
-	
-	typedef void (*BP_Callback)(void *client_data,
-								void *object1,
-								void *object2);
-
-	typedef bool (*BP_RayCastCallback)(void *client_data,
-									   void *object,
-									   const DT_Vector3 source,
-									   const DT_Vector3 target,
-									   DT_Scalar *lambda);
-	
-	extern DECLSPEC BP_SceneHandle BP_CreateScene(void *client_data,
-												  BP_Callback beginOverlap,
-												  BP_Callback endOverlap);
-	
-	extern DECLSPEC void           BP_DestroyScene(BP_SceneHandle scene);
-	
-	extern DECLSPEC BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, 
-												  void *object,
-												  const DT_Vector3 min, 
-												  const DT_Vector3 max);
-	
-	extern DECLSPEC void           BP_DestroyProxy(BP_SceneHandle scene, 
-												  BP_ProxyHandle proxy);
-	
-	extern DECLSPEC void BP_SetBBox(BP_ProxyHandle proxy, 
-									const DT_Vector3 min, 
-									const DT_Vector3 max);
-	
-	extern DECLSPEC void *BP_RayCast(BP_SceneHandle scene, 
-									 BP_RayCastCallback objectRayCast, 
-									 void *client_data,
-									 const DT_Vector3 source,
-									 const DT_Vector3 target,
-									 DT_Scalar *lambda);		
-	
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/extern/solid/include/SOLID_types.h b/extern/solid/include/SOLID_types.h
deleted file mode 100644
index 630594e447f..00000000000
--- a/extern/solid/include/SOLID_types.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef SOLID_TYPES_H
-#define SOLID_TYPES_H
-
-#ifndef DECLSPEC
-# ifdef WIN32
-#  define DECLSPEC __declspec(dllexport)
-# else
-#  define DECLSPEC
-# endif
-#endif
-
-#define DT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
-    
-
-typedef unsigned short DT_Index;
-typedef unsigned short DT_Count;
-typedef unsigned int   DT_Size;
-typedef float          DT_Scalar; 
-typedef int            DT_Bool;
-
-#define DT_FALSE 0
-#define DT_TRUE  1
-
-#define DT_CONTINUE 0
-#define DT_DONE 1
-
-typedef DT_Scalar DT_Vector3[3]; 
-typedef DT_Scalar DT_Quaternion[4]; 
-
-#endif
diff --git a/extern/solid/make/msvc_7_0/broad/broad.vcproj b/extern/solid/make/msvc_7_0/broad/broad.vcproj
deleted file mode 100644
index adb56424e60..00000000000
--- a/extern/solid/make/msvc_7_0/broad/broad.vcproj
+++ /dev/null
@@ -1,262 +0,0 @@
-
-
-	
-		
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-
diff --git a/extern/solid/make/msvc_7_0/complex/complex.vcproj b/extern/solid/make/msvc_7_0/complex/complex.vcproj
deleted file mode 100644
index 2a895fa28d3..00000000000
--- a/extern/solid/make/msvc_7_0/complex/complex.vcproj
+++ /dev/null
@@ -1,252 +0,0 @@
-
-
-	
-		
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-
diff --git a/extern/solid/make/msvc_7_0/convex/convex.vcproj b/extern/solid/make/msvc_7_0/convex/convex.vcproj
deleted file mode 100644
index da088b5972f..00000000000
--- a/extern/solid/make/msvc_7_0/convex/convex.vcproj
+++ /dev/null
@@ -1,337 +0,0 @@
-
-
-	
-		
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-
diff --git a/extern/solid/make/msvc_7_0/solid.vcproj b/extern/solid/make/msvc_7_0/solid.vcproj
deleted file mode 100644
index d9e6332987c..00000000000
--- a/extern/solid/make/msvc_7_0/solid.vcproj
+++ /dev/null
@@ -1,462 +0,0 @@
-
-
-	
-		
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-			
-				
-					
-				
-				
-					
-				
-				
-					
-				
-				
-					
-				
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-
diff --git a/extern/solid/src/DT_AlgoTable.h b/extern/solid/src/DT_AlgoTable.h
deleted file mode 100644
index 0749ca7fdd9..00000000000
--- a/extern/solid/src/DT_AlgoTable.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ALGOTABLE_H
-#define DT_ALGOTABLE_H
-
-#include "DT_Shape.h"
-
-template 
-class AlgoTable {
-public:
-  void addEntry(DT_ShapeType type1, DT_ShapeType type2, Function function) 
-  { 
-    table[type2][type1] = function;
-    table[type1][type2] = function;
-  }
-
-  Function lookup(DT_ShapeType type1, DT_ShapeType type2) const 
-  {
-    return table[type1][type2];
-  }
-
-private:
-  Function table[NUM_TYPES][NUM_TYPES];
-};
-
-#endif
diff --git a/extern/solid/src/DT_C-api.cpp b/extern/solid/src/DT_C-api.cpp
deleted file mode 100644
index ac16deda87d..00000000000
--- a/extern/solid/src/DT_C-api.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-
-#include "SOLID.h"
-
-#include "DT_Box.h"
-#include "DT_Cone.h"
-#include "DT_Cylinder.h"
-#include "DT_Sphere.h"
-#include "DT_Complex.h"
-#include "DT_Polytope.h"
-#include "DT_Polyhedron.h"
-#include "DT_Point.h"
-#include "DT_LineSegment.h"
-#include "DT_Triangle.h"
-#include "DT_Minkowski.h"
-#include "DT_Hull.h"
-
-#include "DT_Response.h"
-#include "DT_RespTable.h"
-
-#include "DT_Scene.h"
-#include "DT_Object.h"
-
-#include "DT_VertexBase.h"
-
-#include "DT_Accuracy.h"
-
-typedef MT::Tuple3 T_Vertex;
-typedef std::vector T_VertexBuf;
-typedef std::vector T_IndexBuf;
-typedef std::vector T_PolyList;
-
-static T_VertexBuf vertexBuf;
-static T_IndexBuf indexBuf;
-static T_PolyList polyList; 
-
-static DT_Complex       *currentComplex    = 0;
-static DT_Polyhedron    *currentPolyhedron = 0;
-static DT_VertexBase    *currentBase = 0;
-
-
-
-
-
-		
-DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride) 
-{
-    return (DT_VertexBaseHandle)new DT_VertexBase(pointer, stride);
-}
-
-void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase) 
-{ 
-    delete (DT_VertexBase *)vertexBase; 
-}
-
-void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer) 
-{ 
-	DT_VertexBase *base = (DT_VertexBase *)vertexBase;
-	base->setPointer(pointer);
-	const DT_ComplexList& complexList = base->getComplexList();
-	DT_ComplexList::const_iterator it;
-	for (it = complexList.begin(); it != complexList.end(); ++it)
-	{
-		(*it)->refit();
-	}
-}
-
-
-DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z) 
-{
-    return (DT_ShapeHandle)new DT_Box(MT_Scalar(x) * MT_Scalar(0.5), 
-									  MT_Scalar(y) * MT_Scalar(0.5), 
-									  MT_Scalar(z) * MT_Scalar(0.5));
-}
-
-DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height)
-{
-    return (DT_ShapeHandle)new DT_Cone(MT_Scalar(radius), MT_Scalar(height));
-}
-
-DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height) 
-{
-    return (DT_ShapeHandle)new DT_Cylinder(MT_Scalar(radius), MT_Scalar(height));
-}
-
-DT_ShapeHandle DT_NewSphere(DT_Scalar radius) 
-{
-    return (DT_ShapeHandle)new DT_Sphere(MT_Scalar(radius));
-}
-
-DT_ShapeHandle DT_NewPoint(const DT_Vector3 point) 
-{
-	return (DT_ShapeHandle)new DT_Point(MT_Point3(point));
-}
-
-DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target) 
-{
-	return (DT_ShapeHandle)new DT_LineSegment(MT_Point3(source), MT_Point3(target));
-}
-
-DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2) 
-{
-	if (((DT_Shape *)shape1)->getType() != CONVEX ||
-		((DT_Shape *)shape2)->getType() != CONVEX) 
-	{
-		return 0;
-	}
-
-	return (DT_ShapeHandle)new DT_Minkowski(*(DT_Convex *)shape1, *(DT_Convex *)shape2);
-}
-	
-DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2)
-{
-	if (((DT_Shape *)shape1)->getType() != CONVEX ||
-		((DT_Shape *)shape2)->getType() != CONVEX) 
-	{
-		return 0;
-	}
-
-	return (DT_ShapeHandle)new DT_Hull(*(DT_Convex *)shape1, *(DT_Convex *)shape2);
-}
-
-DT_ShapeHandle DT_NewComplexShape(const DT_VertexBaseHandle vertexBase) 
-{
-    if (!currentComplex) 
-	{
-		currentBase = vertexBase ? (DT_VertexBase *)vertexBase : new DT_VertexBase;
-		currentComplex = new DT_Complex(currentBase);
-	}
-    return (DT_ShapeHandle)currentComplex;
-}
-
-void DT_EndComplexShape() 
-{
-    if (currentComplex) 
-	{
-        if (currentBase->getPointer() == 0) 
-		{
-            T_Vertex *vertexArray = new T_Vertex[vertexBuf.size()];   
-			assert(vertexArray);	
-            std::copy(vertexBuf.begin(), vertexBuf.end(), &vertexArray[0]);
-            currentBase->setPointer(vertexArray, true);		
-        }
-		
-		vertexBuf.clear();
-        
-        currentComplex->finish(polyList.size(), &polyList[0]);
-        polyList.clear();
-        currentComplex = 0;
-        currentBase = 0; 
-    }
-}
-
-DT_ShapeHandle DT_NewPolytope(const DT_VertexBaseHandle vertexBase) 
-{
-    if (!currentPolyhedron) 
-	{
-		currentBase = vertexBase ? (DT_VertexBase *)vertexBase : new DT_VertexBase;
-        currentPolyhedron = new DT_Polyhedron;
-		
-    }
-    return (DT_ShapeHandle)currentPolyhedron;
-}
-
-void DT_EndPolytope() 
-{
-    if (currentPolyhedron) 
-	{
-        if (currentBase->getPointer() == 0) 
-		{
-			currentBase->setPointer(&vertexBuf[0]);		
-			new (currentPolyhedron) DT_Polyhedron(currentBase, indexBuf.size(), &indexBuf[0]);
-			
-			delete currentBase;
-		}
-		else
-		{
-			new (currentPolyhedron) DT_Polyhedron(currentBase, indexBuf.size(), &indexBuf[0]);
-		}
-		vertexBuf.clear();
-        indexBuf.clear();
-        currentPolyhedron = 0;
-        currentBase = 0;
-    }
-}
-
-void DT_Begin() 
-{}
-
-void DT_End() 
-{ 
-	if (currentComplex) 
-	{
-		DT_VertexIndices(indexBuf.size(), &indexBuf[0]);
-		indexBuf.clear();
-	}
-}
-
-void DT_Vertex(const DT_Vector3 vertex)
-{
-    MT::Vector3 p(vertex);
-    int i = GEN_max((int)vertexBuf.size() - 20, 0);
-	int n = static_cast(vertexBuf.size());
-	
-    while (i != n  && !(vertexBuf[i] == p)) 
-	{
-		++i;
-	}
-
-    if (i == n) 
-	{
-		vertexBuf.push_back(p);
-	}
-    indexBuf.push_back(i);
-}
-
-
-void DT_VertexIndex(DT_Index index) { indexBuf.push_back(index); }
-
-void DT_VertexIndices(DT_Count count, const DT_Index *indices) 
-{
-    if (currentComplex) 
-	{
-		DT_Convex *poly = count == 3 ? 
-			              static_cast(new DT_Triangle(currentBase, indices[0], indices[1], indices[2])) :
-						  static_cast(new DT_Polytope(currentBase, count, indices));  
-		polyList.push_back(poly);
-      
-    }
-
-    if (currentPolyhedron) 
-	{
-		int i;
-		for (i = 0; i < count; ++i) 
-		{
-            indexBuf.push_back(indices[i]);
-        }
-    }   
-}
-
-void DT_VertexRange(DT_Index first, DT_Count count) 
-{
-    DT_Index *indices = new DT_Index[count];
-    
-	DT_Index i;
-    for (i = 0; i != count; ++i) 
-	{
-        indices[i] = first + i;
-    }
-    DT_VertexIndices(count, indices);
-
-    delete [] indices;	
-}
-
-void DT_DeleteShape(DT_ShapeHandle shape) 
-{ 
-    delete (DT_Shape *)shape; 
-}
-
-
-
-
-// Scene
-
-
-DT_SceneHandle DT_CreateScene() 
-{
-    return (DT_SceneHandle)new DT_Scene; 
-}
-
-void DT_DestroyScene(DT_SceneHandle scene) 
-{
-    delete (DT_Scene *)scene;
-}
-
-void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object) 
-{
-    assert(scene);
-    assert(object);
-    ((DT_Scene *)scene)->addObject(*(DT_Object *)object);
-}
-
-void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object) 
-{
-    assert(scene);
-    assert(object);
-    ((DT_Scene *)scene)->removeObject(*(DT_Object *)object);
-}
-
-
-// Object instantiation
-
-
-DT_ObjectHandle DT_CreateObject(void *client_object,
-                                DT_ShapeHandle shape)
-{
-	return (DT_ObjectHandle)new DT_Object(client_object, *(DT_Shape *)shape);
-}
-
-void DT_DestroyObject(DT_ObjectHandle object) 
-{
-    delete (DT_Object *)object;
-}
-
-void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin) 
-{
-    ((DT_Object *)object)->setMargin(MT_Scalar(margin));
-}
-
-
-void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling) 
-{
-    ((DT_Object *)object)->setScaling(MT_Vector3(scaling));
-}
-
-void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position) 
-{
-    ((DT_Object *)object)->setPosition(MT_Point3(position));
-}
-
-void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation) 
-{
-    ((DT_Object *)object)->setOrientation(MT_Quaternion(orientation));   
-}
-
-
-void DT_SetMatrixf(DT_ObjectHandle object, const float *m) 
-{
-    ((DT_Object *)object)->setMatrix(m);
-}
-
-void DT_GetMatrixf(DT_ObjectHandle object, float *m) 
-{
-    ((DT_Object *)object)->getMatrix(m);
-}
-
-void DT_SetMatrixd(DT_ObjectHandle object, const double *m) 
-{
-    ((DT_Object *)object)->setMatrix(m);
-}
-void DT_GetMatrixd(DT_ObjectHandle object, double *m) 
-{
-    ((DT_Object *)object)->getMatrix(m);
-}
-
-void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max) 
-{
-	const MT_BBox& bbox = ((DT_Object *)object)->getBBox();
-	bbox.getMin().getValue(min);
-	bbox.getMax().getValue(max);
-}
-
-DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2, DT_Vector3 vec)
-{
-	MT_Vector3 v;
-	DT_Bool result = intersect(*(DT_Object*)object1, *(DT_Object*)object2, v);
-	v.getValue(vec);
-	return result;
-}
-
-DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2,
-							DT_Vector3 point1, DT_Vector3 point2) 
-{
-    MT_Point3 p1, p2;
-    
-    MT_Scalar result = closest_points(*(DT_Object *)object1, 
-									  *(DT_Object *)object2,
-									  p1, p2);
-	p1.getValue(point1);
-	p2.getValue(point2);
-
-    return MT_sqrt(result);
-}
-
-DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2,
-						  DT_Vector3 point) 
-{
-    MT_Point3   p1, p2;
-	MT_Vector3  v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); 
-    
-    bool result = common_point(*(DT_Object *)object1, *(DT_Object *)object2, v, p1, p2);
-
-	if (result) 
-	{
-		p1.getValue(point);
-	}
-
-    return result;
-}
-
-DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2,
-				    DT_Vector3 point1, DT_Vector3 point2) 
-{
-    MT_Point3   p1, p2;
-	MT_Vector3  v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); 
-    
-    bool result = penetration_depth(*(DT_Object *)object1, *(DT_Object *)object2, v, p1, p2);
-
-	if (result) 
-	{
-		p1.getValue(point1);
-		p2.getValue(point2);
-	}
-
-    return result;
-}
-
-// Response
-
-DT_RespTableHandle DT_CreateRespTable() 
-{
-    return (DT_RespTableHandle)new DT_RespTable;
-}    
-
-void DT_DestroyRespTable(DT_RespTableHandle respTable) 
-{
-    delete (DT_RespTable *)respTable;
-}
-
-DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable) 
-{
-	return ((DT_RespTable *)respTable)->genResponseClass();
-}
-
-void DT_SetResponseClass(DT_RespTableHandle respTable, DT_ObjectHandle object,
-						 DT_ResponseClass responseClass)
-{
-	((DT_RespTable *)respTable)->setResponseClass(object, responseClass);
-}
-
-void DT_ClearResponseClass(DT_RespTableHandle respTable, 
-						   DT_ObjectHandle object)
-{
-	((DT_RespTable *)respTable)->clearResponseClass(object);
-}
-
-void DT_CallResponse(DT_RespTableHandle respTable,
-					 DT_ObjectHandle object1,
-					 DT_ObjectHandle object2,
-					 const DT_CollData *coll_data)
-{
-	const DT_ResponseList& responseList =
-		((DT_RespTable *)respTable)->find(object1, object2);
-	
-	if (responseList.getType() != DT_NO_RESPONSE) 
-	{
-		responseList(((DT_Object *)object1)->getClientObject(), 
-					 ((DT_Object *)object2)->getClientObject(),
-					 coll_data);
-	}
-}
-
-
-void DT_AddDefaultResponse(DT_RespTableHandle respTable,
-                           DT_ResponseCallback response, 
-						   DT_ResponseType type, void *client_data)
-{
-    ((DT_RespTable *)respTable)->addDefault(DT_Response(response, type, client_data));
-}
-
-void DT_RemoveDefaultResponse(DT_RespTableHandle respTable,
-							  DT_ResponseCallback response)
-{
-      ((DT_RespTable *)respTable)->removeDefault(DT_Response(response));
-}
-
-void DT_AddClassResponse(DT_RespTableHandle respTable,
-						 DT_ResponseClass responseClass, 
-						 DT_ResponseCallback response, 
-						 DT_ResponseType type, void *client_data)
-{
-    ((DT_RespTable *)respTable)->addSingle(responseClass, 
-										   DT_Response(response, type, client_data));
-}
-
-void DT_RemoveClassResponse(DT_RespTableHandle respTable,
-							DT_ResponseClass responseClass, 
-							DT_ResponseCallback response) 
-{
-    ((DT_RespTable *)respTable)->removeSingle(responseClass, 
-											  DT_Response(response));
-}
-
-void DT_AddPairResponse(DT_RespTableHandle respTable,
-                        DT_ResponseClass responseClass1, 
-						DT_ResponseClass responseClass2, 
-                        DT_ResponseCallback response,
-						DT_ResponseType type, void *client_data)
-{
-    ((DT_RespTable *)respTable)->addPair(responseClass1, responseClass2, 
-										 DT_Response(response, type, client_data));
-}
-
-void DT_RemovePairResponse(DT_RespTableHandle respTable,
-						   DT_ResponseClass responseClass1, 
-						   DT_ResponseClass responseClass2, 
-						   DT_ResponseCallback response)
-{
-    ((DT_RespTable *)respTable)->removePair(responseClass1, responseClass2, 
-											DT_Response(response));
-}
-
-
-// Runtime
-
-void DT_SetAccuracy(DT_Scalar max_error) 
-{ 
-	if (max_error > MT_Scalar(0.0)) 
-	{
-		DT_Accuracy::setAccuracy(MT_Scalar(max_error)); 
-	}
-}
-
-void DT_SetTolerance(DT_Scalar tol_error) 
-{ 
-	if (tol_error > MT_Scalar(0.0)) 
-	{
-		DT_Accuracy::setTolerance(MT_Scalar(tol_error)); 
-	}
-}
-
-DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable) 
-{ 
-    return ((DT_Scene *)scene)->handleCollisions((DT_RespTable *)respTable);
-}
-
-void *DT_RayCast(DT_SceneHandle scene, void *ignore_client,
-				 const DT_Vector3 source, const DT_Vector3 target,
-				 DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal) 
-{
-	DT_Scalar  lambda = max_param;
-
-	void *client_object = ((DT_Scene *)scene)->rayCast(ignore_client, source, target, 
-													   lambda, normal);
-   if (client_object)
-   {
-      *param = lambda;
-   }
-	return client_object;
-}
-
-DT_Bool DT_ObjectRayCast(DT_ObjectHandle object,
-	   				     const DT_Vector3 source, const DT_Vector3 target,
-					     DT_Scalar max_param, DT_Scalar *param, DT_Vector3 hit_normal) 
-{
-	MT_Scalar lambda = MT_Scalar(max_param);
-	MT_Vector3 normal;  
-
-	bool result = ((DT_Object *)object)->ray_cast(MT_Point3(source), MT_Point3(target), 
-												  lambda, normal);
-
-	if (result) 
-	{
-		*param = lambda;
-		normal.getValue(hit_normal);
-	}
-	return result;
-}
-
diff --git a/extern/solid/src/DT_Encounter.cpp b/extern/solid/src/DT_Encounter.cpp
deleted file mode 100644
index 36de33154a3..00000000000
--- a/extern/solid/src/DT_Encounter.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_RespTable.h"
-#include "DT_Encounter.h"
-#include "DT_Object.h"
-#include "GEN_MinMax.h"
-
-DT_Bool DT_Encounter::exactTest(const DT_RespTable *respTable, int& count) const 
-{
-	const DT_ResponseList& responseList = respTable->find(m_obj_ptr1, m_obj_ptr2);
-
-   switch (responseList.getType()) 
-   {
-   case DT_BROAD_RESPONSE:
-	   return (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) ?
-			   responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), 0) :   
-			   responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), 0);    
-   case DT_SIMPLE_RESPONSE: 
-	   if (intersect(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis)) 
-	   {
-		   ++count;
-		   return (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) ?
-			   responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), 0) :   
-			   responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), 0);    
- 
-	   }
-	   break;
-   case DT_WITNESSED_RESPONSE: {
-	   MT_Point3  p1, p2;
-	   
-	   if (common_point(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis, p1, p2)) 
-	   { 
-		   ++count;
-           if (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2))
-           {
-			   DT_CollData coll_data;
-			   
-			   p1.getValue(coll_data.point1);
-			   p2.getValue(coll_data.point2);
-			   
-               return responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), &coll_data);
-           }
-           else
-           {
-			   DT_CollData coll_data;
-			   
-			   p1.getValue(coll_data.point2);
-			   p2.getValue(coll_data.point1);
-			   
-               return responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), &coll_data);
-           }
-	   }
-	   break;
-   }
-   case DT_DEPTH_RESPONSE: {
-	   MT_Point3  p1, p2;
-	   
-	   if (penetration_depth(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis, p1, p2)) 
-	   { 
-		   ++count;
-           if (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2))
-           {
-			   DT_CollData coll_data;
-			   
-			   p1.getValue(coll_data.point1);
-			   p2.getValue(coll_data.point2);	
-               (p2 - p1).getValue(coll_data.normal);
-			   
-               return responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), &coll_data);
-           }
-           else
-           {
-			   DT_CollData coll_data;
-			   
-			   p1.getValue(coll_data.point2);
-			   p2.getValue(coll_data.point1); 
-               (p1 - p2).getValue(coll_data.normal);
-			   
-               return responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), &coll_data);
-           }
-	   }
-	   break;
-   }
-   case DT_NO_RESPONSE:
-	   break;
-   default:
-	   assert(false);
-   }
-   return DT_CONTINUE;
-}
diff --git a/extern/solid/src/DT_Encounter.h b/extern/solid/src/DT_Encounter.h
deleted file mode 100644
index f20ea3936b0..00000000000
--- a/extern/solid/src/DT_Encounter.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ENCOUNTER_H
-#define DT_ENCOUNTER_H
-
-#include 
-
-#include "MT_Vector3.h"
-#include "DT_Object.h"
-#include "DT_Shape.h"
-
-class DT_RespTable;
-
-class DT_Encounter {
-public:
-    DT_Encounter() {}
-    DT_Encounter(DT_Object *obj_ptr1, DT_Object *obj_ptr2) 
-        : m_sep_axis(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)) 
-    {
-		assert(obj_ptr1 != obj_ptr2);
-        if (obj_ptr2->getType() < obj_ptr1->getType() || 
-            (obj_ptr2->getType() == obj_ptr1->getType() &&
-             obj_ptr2 < obj_ptr1))
-        { 
-            m_obj_ptr1 = obj_ptr2; 
-            m_obj_ptr2 = obj_ptr1; 
-        }
-        else 
-        { 
-            m_obj_ptr1 = obj_ptr1; 
-            m_obj_ptr2 = obj_ptr2; 
-        }
-    }
-
-    DT_Object         *first()          const { return m_obj_ptr1; }
-    DT_Object         *second()         const { return m_obj_ptr2; }
-    const MT_Vector3&  separatingAxis() const { return m_sep_axis; }
-
- 	DT_Bool exactTest(const DT_RespTable *respTable, int& count) const;
-
-private:
-    DT_Object          *m_obj_ptr1;
-    DT_Object          *m_obj_ptr2;
-    mutable MT_Vector3  m_sep_axis;
-};
-
-inline bool operator<(const DT_Encounter& a, const DT_Encounter& b) 
-{ 
-    return a.first() < b.first() || 
-        (a.first() == b.first() && a.second() < b.second()); 
-}
-
-
-
-inline std::ostream& operator<<(std::ostream& os, const DT_Encounter& a) {
-    return os << '(' << a.first() << ", " << a.second() << ')';
-}
-
-
-
-typedef std::set DT_EncounterTable;
-
-#endif
diff --git a/extern/solid/src/DT_Object.cpp b/extern/solid/src/DT_Object.cpp
deleted file mode 100644
index ed43a7bdaf2..00000000000
--- a/extern/solid/src/DT_Object.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Object.h"
-#include "DT_AlgoTable.h"
-#include "DT_Convex.h" 
-#include "DT_Complex.h" 
-#include "DT_LineSegment.h" 
-#include "DT_Transform.h"
-#include "DT_Minkowski.h"
-#include "DT_Sphere.h"
-
-void DT_Object::setBBox() 
-{
-	m_bbox = m_shape.bbox(m_xform, m_margin); 
-	DT_Vector3 min, max;
-	m_bbox.getMin().getValue(min);
-	m_bbox.getMax().getValue(max);
-	
-	T_ProxyList::const_iterator it;
-	for (it = m_proxies.begin(); it != m_proxies.end(); ++it) 
-	{
-		BP_SetBBox(*it, min, max);
-	}
-}
-
-bool DT_Object::ray_cast(const MT_Point3& source, const MT_Point3& target, 
-						 MT_Scalar& lambda, MT_Vector3& normal) const 
-{	
-	MT_Transform inv_xform = m_xform.inverse();
-	MT_Point3 local_source = inv_xform(source);
-	MT_Point3 local_target = inv_xform(target);
-	MT_Vector3 local_normal;
-
-	bool result = m_shape.ray_cast(local_source, local_target, lambda, local_normal);
-    	
-	if (result) 
-	{
-		normal = local_normal * inv_xform.getBasis();
-      MT_Scalar len = normal.length();
-		if (len > MT_Scalar(0.0))
-      {
-         normal /= len;
-      }
-	}
-
-	return result;
-}
-
-
-typedef AlgoTable IntersectTable;
-typedef AlgoTable Common_pointTable;
-typedef AlgoTable Penetration_depthTable;
-typedef AlgoTable Closest_pointsTable;
-
-
-bool intersectConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-						   const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                           MT_Vector3& v) 
-{
-	DT_Transform ta(a2w, (const DT_Convex&)a);
-	DT_Transform tb(b2w, (const DT_Convex&)b);
-    return intersect((a_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast(ta)), 
-			         (b_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast(tb)), v);
-}
-
-bool intersectComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-						    const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                            MT_Vector3& v) 
-{
-	if (a.getType() == COMPLEX)
-	{
-		DT_Transform tb(b2w, (const DT_Convex&)b);
-		return intersect((const DT_Complex&)a, a2w, a_margin, 
-		             (b_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast(tb)), v);
-	}
-	
-	bool r = intersectComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v);
-	v *= -1.;
-	return r;
-}
-
-bool intersectComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-							 const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                             MT_Vector3& v) 
-{
-    return intersect((const DT_Complex&)a, a2w, a_margin, 
-					 (const DT_Complex&)b, b2w, b_margin, v);
-}
-
-IntersectTable *intersectInitialize() 
-{
-    IntersectTable *p = new IntersectTable;
-    p->addEntry(COMPLEX, COMPLEX, intersectComplexComplex);
-    p->addEntry(COMPLEX, CONVEX, intersectComplexConvex);
-    p->addEntry(CONVEX, CONVEX, intersectConvexConvex);
-    return p;
-}
-
-bool intersect(const DT_Object& a, const DT_Object& b, MT_Vector3& v) 
-{
-    static IntersectTable *intersectTable = intersectInitialize();
-    Intersect intersect = intersectTable->lookup(a.getType(), b.getType());
-    return intersect(a.m_shape, a.m_xform, a.m_margin, 
-		             b.m_shape, b.m_xform, b.m_margin, v);
-}
-
-bool common_pointConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-							  const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-							  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-	DT_Transform ta(a2w, (const DT_Convex&)a);
-	DT_Transform tb(b2w, (const DT_Convex&)b);
-    return common_point((a_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast(ta)), 
-						(b_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast(tb)), v, pa, pb);
-}
-
-bool common_pointComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-							   const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-							   MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-	if (a.getType() == COMPLEX)
-	{
-		DT_Transform tb(b2w, (const DT_Convex&)b);
-		return common_point((const DT_Complex&)a, a2w, a_margin,
-					(b_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast(tb)), v, pa, pb);
-	}
-	
-	bool r = common_pointComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v, pb, pa);
-	v *= -1.;
-	return r;
-}
-
-bool common_pointComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-								const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-								MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    return common_point((const DT_Complex&)a, a2w, a_margin, 
-						(const DT_Complex&)b, b2w, b_margin, v, pa, pb);
-}
-
-Common_pointTable *common_pointInitialize() 
-{
-    Common_pointTable *p = new Common_pointTable;
-    p->addEntry(COMPLEX, COMPLEX, common_pointComplexComplex);
-    p->addEntry(COMPLEX, CONVEX, common_pointComplexConvex);
-    p->addEntry(CONVEX, CONVEX, common_pointConvexConvex);
-    return p;
-}
-
-bool common_point(const DT_Object& a, const DT_Object& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    static Common_pointTable *common_pointTable = common_pointInitialize();
-    Common_point common_point = common_pointTable->lookup(a.getType(), b.getType());
-    return common_point(a.m_shape, a.m_xform, a.m_margin, 
-						b.m_shape, b.m_xform, b.m_margin, v, pa, pb);
-}
-
-
-
-bool penetration_depthConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-								   const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                                   MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    return hybrid_penetration_depth(DT_Transform(a2w, (const DT_Convex&)a), a_margin, 
-									DT_Transform(b2w, (const DT_Convex&)b), b_margin, v, pa, pb);
-}
-
-bool penetration_depthComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-									const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                                    MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    if (a.getType() == COMPLEX)
-    	return penetration_depth((const DT_Complex&)a, a2w, a_margin,
-							 DT_Transform(b2w, (const DT_Convex&)b), b_margin, v, pa, pb);
-
-    bool r = penetration_depthComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v, pb, pa);
-    v *= -1.;
-    return r;
-}
-
-bool penetration_depthComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-									 const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                                     MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    return penetration_depth((const DT_Complex&)a, a2w, a_margin, (const DT_Complex&)b, b2w, b_margin, v, pa, pb);
-}
-
-Penetration_depthTable *penetration_depthInitialize() 
-{
-    Penetration_depthTable *p = new Penetration_depthTable;
-    p->addEntry(COMPLEX, COMPLEX, penetration_depthComplexComplex);
-    p->addEntry(COMPLEX, CONVEX, penetration_depthComplexConvex);
-    p->addEntry(CONVEX, CONVEX, penetration_depthConvexConvex);
-    return p;
-}
-
-bool penetration_depth(const DT_Object& a, const DT_Object& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    static Penetration_depthTable *penetration_depthTable = penetration_depthInitialize();
-    Penetration_depth penetration_depth = penetration_depthTable->lookup(a.getType(), b.getType());
-    return penetration_depth(a.m_shape, a.m_xform, a.m_margin, 
-		                     b.m_shape, b.m_xform, b.m_margin, v, pa, pb);
-}
-
-
-MT_Scalar closest_pointsConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-									 const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-									 MT_Point3& pa, MT_Point3& pb)
-{
-	DT_Transform ta(a2w, (const DT_Convex&)a);
-	DT_Transform tb(b2w, (const DT_Convex&)b);
-    return closest_points((a_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast(ta)), 
-						  (b_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast(tb)), MT_INFINITY, pa, pb);
-}
-
-MT_Scalar closest_pointsComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-									  const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-									  MT_Point3& pa, MT_Point3& pb)
-{
-    if (a.getType() == COMPLEX)
-    {
-	DT_Transform tb(b2w, (const DT_Convex&)b);
-	return closest_points((const DT_Complex&)a, a2w, a_margin,
-							(b_margin > MT_Scalar(0.0) ? static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast(tb)), pa, pb);
-    }
-    
-    return closest_pointsComplexConvex(b, b2w, b_margin, a, a2w, a_margin, pb, pa);
-}
-
-MT_Scalar closest_pointsComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-									   const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-									   MT_Point3& pa, MT_Point3& pb) 
-{
-    return closest_points((const DT_Complex&)a, a2w, a_margin, 
-						  (const DT_Complex&)b, b2w, b_margin, pa, pb);
-}
-
-Closest_pointsTable *closest_pointsInitialize()
-{
-    Closest_pointsTable *p = new Closest_pointsTable;
-    p->addEntry(COMPLEX, COMPLEX, closest_pointsComplexComplex);
-    p->addEntry(COMPLEX, CONVEX, closest_pointsComplexConvex);
-    p->addEntry(CONVEX, CONVEX, closest_pointsConvexConvex);
-    return p;
-}
-
-MT_Scalar closest_points(const DT_Object& a, const DT_Object& b,
-						 MT_Point3& pa, MT_Point3& pb) 
-{
-    static Closest_pointsTable *closest_pointsTable = closest_pointsInitialize();
-    Closest_points closest_points = closest_pointsTable->lookup(a.getType(), b.getType());
-    return closest_points(a.m_shape, a.m_xform, a.m_margin, 
-						  b.m_shape, b.m_xform, b.m_margin, pa, pb);
-}
-
diff --git a/extern/solid/src/DT_Object.h b/extern/solid/src/DT_Object.h
deleted file mode 100644
index 78beee2ab57..00000000000
--- a/extern/solid/src/DT_Object.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_OBJECT_H
-#define DT_OBJECT_H
-
-#include 
-
-#include "SOLID.h"
-#include "SOLID_broad.h"
-
-#include "MT_Transform.h"
-#include "MT_Quaternion.h"
-#include "MT_BBox.h"
-#include "DT_Shape.h"
-
-class DT_Convex;
-
-class DT_Object {
-public:
-    DT_Object(void *client_object, const DT_Shape& shape) :
-		m_client_object(client_object),
-		m_shape(shape), 
-		m_margin(MT_Scalar(0.0))
-	{
-		m_xform.setIdentity();
-		setBBox();
-	}
-
-	void setMargin(MT_Scalar margin) 
-	{ 
-		m_margin = margin; 
-		setBBox();
-	}
-
-	void setScaling(const MT_Vector3& scaling)
-	{
-        m_xform.scale(scaling);
-        setBBox();
-    }
-
-    void setPosition(const MT_Point3& pos) 
-	{ 
-        m_xform.setOrigin(pos);
-        setBBox();
-    }
-    
-    void setOrientation(const MT_Quaternion& orn)
-	{
-		m_xform.setRotation(orn);
-		setBBox();
-    }
-
-	void setMatrix(const float *m) 
-	{
-        m_xform.setValue(m);
-		assert(m_xform.getBasis().determinant() != MT_Scalar(0.0));
-        setBBox();
-    }
-
-    void setMatrix(const double *m)
-	{
-        m_xform.setValue(m);
-		assert(m_xform.getBasis().determinant() != MT_Scalar(0.0));
-        setBBox();
-    }
-
-    void getMatrix(float *m) const
-	{
-        m_xform.getValue(m);
-    }
-
-    void getMatrix(double *m) const 
-	{
-        m_xform.getValue(m);
-    }
-
-	void setBBox();
-
-	const MT_BBox& getBBox() const { return m_bbox; }	
-	
-    DT_ResponseClass getResponseClass() const { return m_responseClass; }
-    
-	void setResponseClass(DT_ResponseClass responseClass) 
-	{ 
-		m_responseClass = responseClass;
-	}
-
-    DT_ShapeType getType() const { return m_shape.getType(); }
-
-    void *getClientObject() const { return m_client_object; }
-
-	bool ray_cast(const MT_Point3& source, const MT_Point3& target, 
-				  MT_Scalar& param, MT_Vector3& normal) const; 
-
-	void addProxy(BP_ProxyHandle proxy) { m_proxies.push_back(proxy); }
-
-	void removeProxy(BP_ProxyHandle proxy) 
-	{ 
-		T_ProxyList::iterator it = std::find(m_proxies.begin(), m_proxies.end(), proxy);
-		if (it != m_proxies.end()) {
-			m_proxies.erase(it);
-		}
-	}
-
-
-	friend bool intersect(const DT_Object&, const DT_Object&, MT_Vector3& v);
-	
-	friend bool common_point(const DT_Object&, const DT_Object&, MT_Vector3&, 
-							 MT_Point3&, MT_Point3&);
-	
-	friend bool penetration_depth(const DT_Object&, const DT_Object&, 
-								  MT_Vector3&, MT_Point3&, MT_Point3&);
-	
-	friend MT_Scalar closest_points(const DT_Object&, const DT_Object&, 
-									MT_Point3&, MT_Point3&);
-
-private:
-	typedef std::vector T_ProxyList;
-
-	void              *m_client_object;
-	DT_ResponseClass   m_responseClass;
-    const DT_Shape&    m_shape;
-    MT_Scalar          m_margin;
-	MT_Transform       m_xform;
-	T_ProxyList		   m_proxies;
-	MT_BBox            m_bbox;
-};
-
-#endif
-
-
-
-
-
-
-
diff --git a/extern/solid/src/DT_RespTable.cpp b/extern/solid/src/DT_RespTable.cpp
deleted file mode 100644
index 20fbfc06aac..00000000000
--- a/extern/solid/src/DT_RespTable.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_RespTable.h"
-
-#include 
-
-DT_ResponseList DT_RespTable::g_emptyResponseList;
-
-DT_RespTable::~DT_RespTable()
-{
-	DT_ResponseClass i;
-	for (i = 0; i < m_responseClass; ++i) 
-	{
-		delete [] m_table[i];
-	}
-}
-
-DT_ResponseClass DT_RespTable::genResponseClass()
-{
-	DT_ResponseClass newClass = m_responseClass++;
-	DT_ResponseList *newList = new DT_ResponseList[m_responseClass];
-	assert(newList);
-	m_table.push_back(newList);
-	m_singleList.resize(m_responseClass);
-	DT_ResponseClass i;
-	for (i = 0; i < m_responseClass; ++i) 
-	{
-		newList[i].append(m_default);
-		newList[i].append(m_singleList[i]);
-	}
-	return newClass;
-}
-
-void DT_RespTable::setResponseClass(void *object, 
-									DT_ResponseClass responseClass) 
-{
-	assert(responseClass < m_responseClass);
-	m_objectMap[object] = responseClass;
-}
-
-DT_ResponseClass DT_RespTable::getResponseClass(void *object) const
-{
-	T_ObjectMap::const_iterator it = m_objectMap.find(object);
-	assert(it != m_objectMap.end());
-	return (*it).second;
-}
-
-void DT_RespTable::clearResponseClass(void *object) 
-{
-	m_objectMap.erase(object);
-}
-
-const DT_ResponseList& DT_RespTable::find(void *object1, void *object2) const
-{
-	T_ObjectMap::const_iterator it = m_objectMap.find(object1);
-	if (it != m_objectMap.end()) 
-	{
-		DT_ResponseClass responseClass1 = (*it).second;
-		it = m_objectMap.find(object2);
-		if (it != m_objectMap.end()) 
-		{
-			DT_ResponseClass responseClass2 = (*it).second;
-			if (responseClass1 < responseClass2) 
-			{
-				std::swap(responseClass1, responseClass2);
-			}
-			return m_table[responseClass1][responseClass2];
-		}
-	}
-	return g_emptyResponseList;
-}
-
-void DT_RespTable::addDefault(const DT_Response& response)
-{
-	m_default.addResponse(response);
-	DT_ResponseClass i;
-	for (i = 0; i < m_responseClass; ++i) 
-	{
-		DT_ResponseClass j;
-		for (j = 0; j <= i; ++j) 
-		{
-			m_table[i][j].addResponse(response);
-		}
-	}
-}
-
-void DT_RespTable::removeDefault(const DT_Response& response)
-{
-	m_default.removeResponse(response);
-	DT_ResponseClass i;
-	for (i = 0; i < m_responseClass; ++i) 
-	{
-		DT_ResponseClass j;
-		for (j = 0; j <= i; ++j) 
-		{
-			m_table[i][j].removeResponse(response);
-		}
-	}
-}
-
-void DT_RespTable::addSingle(DT_ResponseClass responseClass, 
-							 const DT_Response& response)
-{	
-	assert(responseClass < m_responseClass);
-	m_singleList[responseClass].addResponse(response);
-	DT_ResponseClass j;
-	for (j = 0; j < responseClass; ++j) 
-	{
-		m_table[responseClass][j].addResponse(response);
-	}
-	
-	DT_ResponseClass i;
-	for (i = responseClass; i < m_responseClass; ++i) 
-	{
-		m_table[i][responseClass].addResponse(response);
-	}
-}
-
-void DT_RespTable::removeSingle(DT_ResponseClass responseClass, 
-								const DT_Response& response)
-{	
-	assert(responseClass < m_responseClass);
-	m_singleList[responseClass].removeResponse(response);
-	DT_ResponseClass j;
-	for (j = 0; j < responseClass; ++j) 
-	{
-		m_table[responseClass][j].removeResponse(response);
-	}
-	
-	DT_ResponseClass i;
-	for (i = responseClass; i < m_responseClass; ++i) 
-	{
-		m_table[i][responseClass].removeResponse(response);
-	}
-}
-
-void DT_RespTable::addPair(DT_ResponseClass responseClass1,
-						   DT_ResponseClass responseClass2, 
-						   const DT_Response& response)
-{
-	assert(responseClass1 < m_responseClass);
-	assert(responseClass2 < m_responseClass);
-	if (responseClass1 < responseClass2) 
-	{
-		std::swap(responseClass1, responseClass2);
-	}
-	m_table[responseClass1][responseClass2].addResponse(response);
-}
-
-
-void DT_RespTable::removePair(DT_ResponseClass responseClass1,
-							  DT_ResponseClass responseClass2, 
-							  const DT_Response& response)
-{
-	assert(responseClass1 < m_responseClass);
-	assert(responseClass2 < m_responseClass);
-	if (responseClass1 < responseClass2) 
-	{
-		std::swap(responseClass1, responseClass2);
-	}
-	m_table[responseClass1][responseClass2].removeResponse(response);
-}
-
diff --git a/extern/solid/src/DT_RespTable.h b/extern/solid/src/DT_RespTable.h
deleted file mode 100644
index 9a17f562937..00000000000
--- a/extern/solid/src/DT_RespTable.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_RESPTABLE_H
-#define DT_RESPTABLE_H
-
-#include 
-#include 
-#include 
-#include 
-#include "GEN_MinMax.h"
-#include "DT_Response.h"
-
-class DT_ResponseList : public std::list {
-public:
-    DT_ResponseList() : m_type(DT_NO_RESPONSE) {}
-
-	DT_ResponseType getType() const { return m_type; }
-
-    void addResponse(const DT_Response& response) 
-	{
-        if (response.getType() != DT_NO_RESPONSE) 
-		{
-            push_back(response);
-            GEN_set_max(m_type, response.getType());
-        }
-    }
-
-    void removeResponse(const DT_Response& response) 
-	{
-		iterator it = std::find(begin(), end(), response);
-		if (it != end()) 
-		{
-			erase(it);
-			m_type = DT_NO_RESPONSE;
-			for (it = begin(); it != end(); ++it) 
-			{
-				GEN_set_max(m_type, (*it).getType());
-			}
-		}
-    }
-	
-    void append(const DT_ResponseList& responseList) 
-	{
-        if (responseList.getType() != DT_NO_RESPONSE) 
-		{
-			const_iterator it;
-			for (it = responseList.begin(); it != responseList.end(); ++it) 
-			{
-				addResponse(*it);
-			}
-		}
-	}
-
-    DT_Bool operator()(void *a, void *b, const DT_CollData *coll_data) const 
-	{
-		DT_Bool done = DT_CONTINUE;
-		const_iterator it;
-        for (it = begin(); !done && it != end(); ++it) 
-		{
-            done = (*it)(a, b, coll_data);
-        }
-		return done;
-    }
-    
-private:
-	DT_ResponseType    m_type;
-};
-
-class DT_RespTable {
-private:
-	typedef std::map T_ObjectMap; 
-	typedef std::vector T_PairTable;
-	typedef std::vector T_SingleList;
-
-public:
-	DT_RespTable() : m_responseClass(0) {}
-
-	~DT_RespTable();
-
-	DT_ResponseClass genResponseClass();
-	
-	void setResponseClass(void *object, DT_ResponseClass responseClass);
-	DT_ResponseClass getResponseClass(void *object) const;
-	
-	void clearResponseClass(void *object);
-	
-	const DT_ResponseList& find(void *object1, void *object2) const;
-
-    void addDefault(const DT_Response& response); 
-    void removeDefault(const DT_Response& response); 
-
-    void addSingle(DT_ResponseClass responseClass, 
-				   const DT_Response& response);
-    void removeSingle(DT_ResponseClass responseClass, 
-					  const DT_Response& response);
-	
-    void addPair(DT_ResponseClass responseClass1, 
-				 DT_ResponseClass responseClass2, 
-				 const DT_Response& response);
-    void removePair(DT_ResponseClass responseClass1, 
-					DT_ResponseClass responseClass2, 
-					const DT_Response& response);
-
-private:
-	static DT_ResponseList g_emptyResponseList;
-
-	T_ObjectMap      m_objectMap;
-	DT_ResponseClass m_responseClass;
-	T_PairTable      m_table;
-	T_SingleList     m_singleList;
-    DT_ResponseList  m_default;
-};
-
-#endif
-
-
-
-
diff --git a/extern/solid/src/DT_Response.h b/extern/solid/src/DT_Response.h
deleted file mode 100644
index e58d9bb9944..00000000000
--- a/extern/solid/src/DT_Response.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_RESPONSE_H
-#define DT_RESPONSE_H
-
-#include "SOLID.h"
-
-class DT_Response {
-public:
-    DT_Response(DT_ResponseCallback response    = 0, 
-				DT_ResponseType     type        = DT_NO_RESPONSE, 
-				void               *client_data = 0) 
-	  : m_response(response), 
-		m_type(type), 
-		m_client_data(client_data) {}
-    
-	DT_ResponseType getType() const { return m_type; }
-
-	DT_Bool operator()(void *a, void *b, const DT_CollData *coll_data) const 
-	{  
-		return (*m_response)(m_client_data, a, b, coll_data); 
-	}
-
-	friend bool operator==(const DT_Response& a, const DT_Response& b) 
-	{
-		return a.m_response == b.m_response;
-	}
-    
-	friend bool operator!=(const DT_Response& a, const DT_Response& b) 
-	{
-		return a.m_response != b.m_response;
-	}
-    
-private:
-    DT_ResponseCallback  m_response;
-    DT_ResponseType      m_type;
-    void                *m_client_data;
-};
-
-#endif  
-
-
diff --git a/extern/solid/src/DT_Scene.cpp b/extern/solid/src/DT_Scene.cpp
deleted file mode 100644
index 56cea1633ca..00000000000
--- a/extern/solid/src/DT_Scene.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Scene.h"
-#include "DT_Object.h"
-#include "DT_Convex.h"
-
-//#define DEBUG
-
-static void beginOverlap(void *client_data, void *object1, void *object2) 
-{
-	DT_Encounter e((DT_Object *)object1, (DT_Object *)object2);
-	DT_EncounterTable *encounterTable = static_cast(client_data);
-
-#ifdef DEBUG	
-	std::cout << "Begin: " << e << std::endl; 
-#endif
-
-	encounterTable->insert(e);
-}
-
-
-static void endOverlap(void *client_data, void *object1, void *object2) 
-{
-	DT_Encounter e((DT_Object *)object1, (DT_Object *)object2);
-	DT_EncounterTable *encounterTable = static_cast(client_data);
-
-#ifdef DEBUG
-	std::cout << "End:   " << e << std::endl; 
-#endif
-	
-	assert(encounterTable->find(e) != encounterTable->end()); 
-	encounterTable->erase(e);
-}
-
-struct DT_RayCastData {
-	DT_RayCastData(const void *ignore) 
-	  : m_ignore(ignore) 
-	{}
-
-	const void  *m_ignore;
-	MT_Vector3  m_normal;
-};
-
-static bool objectRayCast(void *client_data, 
-						  void *object,  
-						  const DT_Vector3 source,
-						  const DT_Vector3 target,
-						  DT_Scalar *lambda) 
-{
-	DT_RayCastData *data = static_cast(client_data); 
-	if (((DT_Object *)object)->getClientObject() != data->m_ignore)
-	{
-		MT_Scalar param = MT_Scalar(*lambda);
-		
-		if (((DT_Object *)object)->ray_cast(MT_Point3(source), MT_Point3(target),
-											param, data->m_normal))
-		{
-			*lambda = param;
-			return true;
-		}
-	}
-	return false;
-}
-
-DT_Scene::DT_Scene() 
-  : m_broadphase(BP_CreateScene(&m_encounterTable, &beginOverlap, &endOverlap))
-{}
-
-DT_Scene::~DT_Scene()
-{
-	BP_DestroyScene(m_broadphase);
-}
-
-void DT_Scene::addObject(DT_Object &object)
-{
-	const MT_BBox& bbox = object.getBBox();
-	DT_Vector3 min, max;
-	bbox.getMin().getValue(min);
-	bbox.getMax().getValue(max);
-    BP_ProxyHandle proxy = BP_CreateProxy(m_broadphase, &object, min, max);
-	
-#ifdef DEBUG
-	DT_EncounterTable::iterator it;	
-	std::cout << "Add " << &object << ':';
-	for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it) {
-		std::cout << ' ' << (*it);
-	}
-	std::cout << std::endl;
-#endif
-	object.addProxy(proxy);
-    m_objectList.push_back(std::make_pair(&object, proxy));
-}
-
-
-
-void DT_Scene::removeObject(DT_Object& object)
-{
-    T_ObjectList::iterator it = m_objectList.begin();
-
-    while (it != m_objectList.end() && &object != (*it).first)
-	{
-        ++it;
-    }
-
-    if (it != m_objectList.end())
-	{
-		object.removeProxy((*it).second);
-        BP_DestroyProxy(m_broadphase, (*it).second);
-		m_objectList.erase(it);
-
-#ifdef DEBUG
-		std::cout << "Remove " << &object << ':';
-		DT_EncounterTable::iterator it;	
-		for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it)
-		{
-			std::cout << ' ' << (*it);
-			assert((*it).first() != &object &&
-				   (*it).second() != &object);
-		}
-		std::cout << std::endl;
-#endif
-    }
-}
-
-
-
-int DT_Scene::handleCollisions(const DT_RespTable *respTable)
-{
-    int count = 0;
-
-    assert(respTable);
-
-	DT_EncounterTable::iterator it;	
-	for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it)
-	{
-		if ((*it).exactTest(respTable, count))
-		{
-			break;
-        }
-	
-    }
-    return count;
-}
-
-void *DT_Scene::rayCast(const void *ignore_client,
-						const DT_Vector3 source, const DT_Vector3 target, 
-						DT_Scalar& lambda, DT_Vector3 normal) const 
-{
-	DT_RayCastData data(ignore_client);
-	DT_Object *object = (DT_Object *)BP_RayCast(m_broadphase, 
-												&objectRayCast, 
-												&data, 
-												source, target,
-												&lambda);
-	if (object)
-	{
-		data.m_normal.getValue(normal);
-		return object->getClientObject();
-	}
-	
-	return 0;
-}
diff --git a/extern/solid/src/DT_Scene.h b/extern/solid/src/DT_Scene.h
deleted file mode 100644
index 9b061910312..00000000000
--- a/extern/solid/src/DT_Scene.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_SCENE_H
-#define DT_SCENE_H
-
-#include 
-
-#include "SOLID_broad.h"
-#include "DT_Encounter.h"
-
-class DT_Object;
-class DT_RespTable;
-
-class DT_Scene {
-public:
-    DT_Scene();
-    ~DT_Scene();
-
-    void addObject(DT_Object& object);
-    void removeObject(DT_Object& object);
-
-    int  handleCollisions(const DT_RespTable *respTable);
-
-	void *rayCast(const void *ignore_client, 
-				  const DT_Vector3 source, const DT_Vector3 target, 
-				  DT_Scalar& lambda, DT_Vector3 normal) const;
-
-private:
-	typedef std::vector > T_ObjectList;
-
-	BP_SceneHandle      m_broadphase;
-	T_ObjectList        m_objectList;
-    DT_EncounterTable   m_encounterTable;
-};
-
-#endif
diff --git a/extern/solid/src/Makefile b/extern/solid/src/Makefile
deleted file mode 100644
index e8ef7a606c9..00000000000
--- a/extern/solid/src/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-SOURCEDIR = extern/solid/src
-LIBNAME = solid
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-DIRS = broad complex convex
-
-include nan_subdirs.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../include -I$(NAN_QHULL)/include
-CPPFLAGS += -Iconvex -Icomplex
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk 
-
diff --git a/extern/solid/src/broad/BP_C-api.cpp b/extern/solid/src/broad/BP_C-api.cpp
deleted file mode 100644
index 43e1172927b..00000000000
--- a/extern/solid/src/broad/BP_C-api.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "SOLID_broad.h"
-
-#include "BP_Scene.h"
-#include "BP_Proxy.h"
-
-BP_SceneHandle BP_CreateScene(void *client_data,
-							  BP_Callback beginOverlap,
-							  BP_Callback endOverlap)
-{
-	return (BP_SceneHandle)new BP_Scene(client_data, 
-										beginOverlap, 
-										endOverlap);
-}
-
- 
-void BP_DestroyScene(BP_SceneHandle scene)
-{
-	delete (BP_Scene *)scene;
-}
-	
-
-BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, void *object,
-							  const DT_Vector3 min, const DT_Vector3 max)
-{
-	return (BP_ProxyHandle)
-		((BP_Scene *)scene)->createProxy(object, min, max);
-}
-
-
-void BP_DestroyProxy(BP_SceneHandle scene, BP_ProxyHandle proxy) 
-{
-	((BP_Scene *)scene)->destroyProxy((BP_Proxy *)proxy);
-}
-
-
-
-void BP_SetBBox(BP_ProxyHandle proxy, const DT_Vector3 min, const DT_Vector3 max)	
-{
-	((BP_Proxy *)proxy)->setBBox(min, max);
-}
-
-void *BP_RayCast(BP_SceneHandle scene, 
-				 BP_RayCastCallback objectRayCast,
-				 void *client_data,
-				 const DT_Vector3 source,
-				 const DT_Vector3 target,
-				 DT_Scalar *lambda) 
-{
-	return ((BP_Scene *)scene)->rayCast(objectRayCast,
-										client_data,
-										source,	target,
-										*lambda);
-}
-
diff --git a/extern/solid/src/broad/BP_Endpoint.h b/extern/solid/src/broad/BP_Endpoint.h
deleted file mode 100644
index 8de6e67ce65..00000000000
--- a/extern/solid/src/broad/BP_Endpoint.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_ENDPOINT_H
-#define BP_ENDPOINT_H
-
-#include "SOLID_types.h"
-
-class BP_Proxy;
-
-class BP_Link {
-public:
-	BP_Link() {}
-	explicit BP_Link(BP_Proxy *proxy) :
-		m_proxy(proxy)
-	{}
-
-	DT_Index  m_index;
-	DT_Count  m_count;
-	BP_Proxy *m_proxy;
-};
-
-typedef unsigned int Uint32;
-
-class BP_Endpoint {
-public:
-    enum { 
-		MINIMUM = 0x00000000, 
-		MAXIMUM = 0x80000000,	
-		TYPEBIT = 0x00000001
-	};
-
-    BP_Endpoint() {}
-    BP_Endpoint(DT_Scalar pos, Uint32 type, BP_Link *link) 
-	  :	m_link(link)
-	{
-		setPos(pos, type);
-	}
- 
-	DT_Scalar getPos()   const { return m_pos; }
-	DT_Index&   getIndex() const { return m_link->m_index; }
-	DT_Count&   getCount() const { return m_link->m_count; }
-	BP_Proxy *getProxy() const { return m_link->m_proxy; }
-	
-	DT_Index   getEndIndex()   const { return (m_link + 1)->m_index; }
-	
-	Uint32 getType() const 
-	{ 
-		return (m_bits & TYPEBIT) ? (~m_bits & MAXIMUM) : (m_bits & MAXIMUM);
-	}
-
-	void setPos(DT_Scalar pos, Uint32 type) 
-	{
-		m_pos = pos; 
-		if ((m_bits & MAXIMUM) == type) 
-		{
-			m_bits &= ~TYPEBIT;
-		}
-		else 
-		{
-			m_bits |= TYPEBIT;
-		}
-	}
-
-private:
-	union {
-		DT_Scalar    m_pos;
-		Uint32       m_bits;
-	};
-	BP_Link        *m_link;
-};
-
-inline bool operator<(const BP_Endpoint& a, const BP_Endpoint& b) 
-{
-    return a.getPos() < b.getPos(); 
-}
-
-#endif
-
-
-
-
-
-
-
-
-
-
diff --git a/extern/solid/src/broad/BP_EndpointList.cpp b/extern/solid/src/broad/BP_EndpointList.cpp
deleted file mode 100644
index aa094ffeb0a..00000000000
--- a/extern/solid/src/broad/BP_EndpointList.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include 
-#include 
-
-#include "BP_EndpointList.h"
-#include "BP_Scene.h"
-#include "BP_Proxy.h"
-#include "BP_ProxyList.h"
-
-DT_Index BP_EndpointList::stab(const BP_Endpoint& pos, BP_ProxyList& proxies) const 
-{
-	DT_Index result = std::upper_bound(begin(), end(), pos) - begin();
-	
-	if (result != 0) 
-	{
-		DT_Index i = result - 1;
-		DT_Count count = (*this)[i].getCount(); 
-		while (count) 
-		{
-			const BP_Endpoint& endpoint = (*this)[i];
-			if (endpoint.getType() == BP_Endpoint::MINIMUM &&
-				pos < (*this)[endpoint.getEndIndex()]) 
-			{
-				proxies.add(endpoint.getProxy());
-				--count;
-			}
-			assert(i != 0 || count == 0);
-			--i;
-		}											
-	}
-	return result;
-}
-
-DT_Scalar BP_EndpointList::nextLambda(DT_Index& index, 
-									  DT_Scalar source, 
-									  DT_Scalar delta) const
-{
-	if (delta != 0.0f) 
-	{
-		if (delta < 0.0f) 
-		{
-			if (index != 0) 
-			{
-				return ((*this)[--index].getPos() - source) / delta;
-			}
-		}
-		else 
-		{
-			if (index != size()) 
-			{
-				return ((*this)[index++].getPos() - source) / delta;
-			}
-		}
-	}
-	return FLT_MAX;
-}
-
-
-void BP_EndpointList::range(const BP_Endpoint& min, 
-							const BP_Endpoint& max,
-							DT_Index& first, DT_Index& last,
-							BP_ProxyList& proxies) const 
-{
-	first = stab(min, proxies);
-	last  = std::upper_bound(begin(), end(), max) - begin();
-	
-	DT_Index i;
-	for (i = first; i != last; ++i) 
-	{
-		const BP_Endpoint& endpoint = (*this)[i];
-		if (endpoint.getType() == BP_Endpoint::MINIMUM) 
-		{
-			proxies.add(endpoint.getProxy());
-		}
-	}
-}
-
-void BP_EndpointList::addInterval(const BP_Endpoint& min, 
-								  const BP_Endpoint& max,
-								  BP_ProxyList& proxies) 
-{
-	assert(invariant());
-	DT_Index first, last;
-	range(min, max, first, last, proxies);
-	insert(begin() + last, max);
-	insert(begin() + first, min);
-	++last; 
-	
-	(*this)[first].getCount() = first != 0 ? (*this)[first - 1].getCount() : 0;
-	(*this)[last].getCount() = (*this)[last - 1].getCount();
-	
-	
-	DT_Index i;
-	for (i = first; i != last; ++i) 
-	{
-		++(*this)[i].getCount();
-		(*this)[i].getIndex() = i;
-	} 
-	for (; i != size(); ++i) 
-	{
-		(*this)[i].getIndex() = i;
-	} 
-	
-	assert(invariant());
-}
-
-void BP_EndpointList::removeInterval(DT_Index first, DT_Index last,
-									 BP_ProxyList& proxies) 
-{ 
-	assert(invariant());
-	
-	BP_Endpoint min = (*this)[first];
-	BP_Endpoint max = (*this)[last]; 
-	
-	erase(begin() + last);
-	erase(begin() + first);
-	--last;
-	
-	DT_Index i;
-	for (i = first; i != last; ++i) 
-	{
-		--(*this)[i].getCount();
-		(*this)[i].getIndex() = i;
-	} 
-	for (; i != size(); ++i) 
-	{
-		(*this)[i].getIndex() = i;
-	} 
-	
-	range(min, max, first, last, proxies);
-	
-	assert(invariant());
-}
-
-void BP_EndpointList::move(DT_Index index, DT_Scalar pos, Uint32 type,  
-						   BP_Scene& scene, T_Overlap overlap)
-{
-	assert(invariant());
-	
-	BP_Endpoint endpoint = (*this)[index];
-    DT_Scalar delta = pos - endpoint.getPos();
-	
-    if (delta != DT_Scalar(0.0)) 
-	{
-		endpoint.setPos(pos, type);
-		if (delta < DT_Scalar(0.0)) 
-		{
-			while (index != 0 && endpoint < (*this)[index - 1]) 
-			{
-				(*this)[index] = (*this)[index - 1];
-				(*this)[index].getIndex() = index;
-				encounters((*this)[index], endpoint, scene, overlap);
-				--index;
-			}
-		}
-		else 
-		{
-			DT_Index last = size() - 1;
-			while (index != last && (*this)[index + 1] < endpoint) 
-			{
-				(*this)[index] = (*this)[index + 1];
-				(*this)[index].getIndex() = index;
-				encounters(endpoint, (*this)[index], scene, overlap);
-				++index;
-			}
-		}
-		(*this)[index] = endpoint;
-		(*this)[index].getIndex() = index;
-    }
-
-	assert(invariant());
-}
-
-void BP_EndpointList::encounters(const BP_Endpoint& a, const BP_Endpoint& b,
-								 BP_Scene& scene, T_Overlap overlap)
-{
-	assert(a.getProxy() != b.getProxy());
-	
-	if (a.getType() != b.getType()) 
-	{
-		if (a.getType() == BP_Endpoint::MAXIMUM) 
-		{
-			if (overlap(*a.getProxy(), *b.getProxy())) 
-			{
-				scene.callBeginOverlap(a.getProxy()->getObject(), 
-									   b.getProxy()->getObject());
-			}
-			++a.getCount();
-			++b.getCount();
-		}
-		else 
-		{
-			if (overlap(*a.getProxy(), *b.getProxy())) 
-			{
-				scene.callEndOverlap(a.getProxy()->getObject(), 
-									 b.getProxy()->getObject());
-			}
-			--a.getCount();
-			--b.getCount();
-		}
-	}
-	else 
-	{
-		if (a.getType() == BP_Endpoint::MAXIMUM) 
-		{
-			--a.getCount();
-			++b.getCount();
-		}
-		else 
-		{
-			++a.getCount();
-			--b.getCount();
-		}
-	}
-}
diff --git a/extern/solid/src/broad/BP_EndpointList.h b/extern/solid/src/broad/BP_EndpointList.h
deleted file mode 100644
index 6154991ed3d..00000000000
--- a/extern/solid/src/broad/BP_EndpointList.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_ENDPOINTLIST_H
-#define BP_ENDPOINTLIST_H
-
-//#define PARANOID
-
-#include 
-
-#include "BP_Endpoint.h"
-#include "BP_ProxyList.h"
-
-class BP_Scene;
-
-typedef bool (*T_Overlap)(const BP_Proxy& a, const BP_Proxy& b);
-
-class BP_EndpointList : public std::vector {
-public:
-	BP_EndpointList() {}
-	
-	DT_Index stab(const BP_Endpoint& pos, BP_ProxyList& proxies) const;
-	
-	DT_Index stab(DT_Scalar pos, BP_ProxyList& proxies) const
-	{
-		return stab(BP_Endpoint(pos, BP_Endpoint::MINIMUM, 0), proxies);
-	}
-	
-
-   void range(const BP_Endpoint& min, const BP_Endpoint& max, 
-			  DT_Index& first, DT_Index& last, BP_ProxyList& proxies) const;
-	
-	void range(DT_Scalar lb, DT_Scalar ub, DT_Index& first, DT_Index& last, BP_ProxyList& proxies) const 
-	{
-		range(BP_Endpoint(lb, BP_Endpoint::MINIMUM, 0), 
-			  BP_Endpoint(ub, BP_Endpoint::MAXIMUM, 0),
-			  first, last, proxies);
-	}
-	
-	void addInterval(const BP_Endpoint& min, const BP_Endpoint& max, BP_ProxyList& proxies);
-	void removeInterval(DT_Index first, DT_Index last, BP_ProxyList& proxies);
-
-	void move(DT_Index index, DT_Scalar pos, Uint32 type, BP_Scene& scene, T_Overlap overlap);	
-   
-   DT_Scalar nextLambda(DT_Index& index, DT_Scalar source, DT_Scalar target) const;
-	
-
-private:
-	void encounters(const BP_Endpoint& a, const BP_Endpoint& b,
-					    BP_Scene& scene, T_Overlap overlap);
-
-
-#ifdef PARANOID
-	bool invariant() const 
-	{
-		DT_Count count = 0;
-		DT_Index i;
-		for (i = 0; i != size(); ++i) 
-		{
-         const BP_Endpoint& endpoint = (*this)[i];
-
-			if (endpoint.getType() == BP_Endpoint::MINIMUM) 
-			{
-				++count;
-			}
-			else 
-			{
-				--count;
-			}
-			if (endpoint.getCount() != count)
-			{
-				return false;
-			}
-			if (endpoint.getIndex() != i) 
-			{
-				return false;
-			}
-		}
-		return true;
-	}
-#else
-	bool invariant() const { return true; }
-#endif
-
-};
-
-
-
-#endif
diff --git a/extern/solid/src/broad/BP_Proxy.cpp b/extern/solid/src/broad/BP_Proxy.cpp
deleted file mode 100644
index e8007df240d..00000000000
--- a/extern/solid/src/broad/BP_Proxy.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include 
-
-#include "BP_Proxy.h"
-#include "BP_Scene.h"
-
-BP_Proxy::BP_Proxy(void *object, 
-				   BP_Scene& scene) 
-  :	m_object(object),
-	m_scene(scene)
-{
-	int i;
-	for (i = 0; i < 3; ++i) 
-	{
-		new (&m_interval[i]) BP_Interval(this);
-	}
-}
-
-void BP_Proxy::add(const DT_Vector3 min,
-				   const DT_Vector3 max,
-				   BP_ProxyList& proxies) 
-{
-	int i;
-	for (i = 0; i < 3; ++i) 
-	{
-		m_scene.getList(i).addInterval(
-			BP_Endpoint(min[i], BP_Endpoint::MINIMUM, &m_interval[i].m_min), 
-			BP_Endpoint(max[i], BP_Endpoint::MAXIMUM, &m_interval[i].m_max), 
-			proxies);
-	}
-}
-
-void BP_Proxy::remove(BP_ProxyList& proxies) 
-{
-	int i;
-	for (i = 0; i < 3; ++i) 
-	{
-		m_scene.getList(i).removeInterval(
-			m_interval[i].m_min.m_index,
-			m_interval[i].m_max.m_index,
-			proxies);
-	}
-}
-
-DT_Scalar BP_Proxy::getMin(int i) const 
-{ 
-	return m_scene.getList(i)[m_interval[i].m_min.m_index].getPos(); 
-}
-
-DT_Scalar BP_Proxy::getMax(int i) const 
-{ 
-	return m_scene.getList(i)[m_interval[i].m_max.m_index].getPos(); 
-}
-
-bool overlapXY(const BP_Proxy& a, const BP_Proxy& b)
-{
-	return a.getMin(0) <= b.getMax(0) && b.getMin(0) <= a.getMax(0) && 
-		   a.getMin(1) <= b.getMax(1) && b.getMin(1) <= a.getMax(1);
-}
-
-bool overlapXZ(const BP_Proxy& a, const BP_Proxy& b)
-{
-	return a.getMin(0) <= b.getMax(0) && b.getMin(0) <= a.getMax(0) && 
-		   a.getMin(2) <= b.getMax(2) && b.getMin(2) <= a.getMax(2); 
-}
-
-bool overlapYZ(const BP_Proxy& a, const BP_Proxy& b)
-{
-	return a.getMin(1) <= b.getMax(1) && b.getMin(1) <= a.getMax(1) && 
-		   a.getMin(2) <= b.getMax(2) && b.getMin(2) <= a.getMax(2); 
-}
-
-void BP_Proxy::setBBox(const DT_Vector3 min, const DT_Vector3 max)
-{	
-	static T_Overlap overlap[3] = { overlapYZ, overlapXZ, overlapXY };
-
-	int i;
-	for (i = 0; i < 3; ++i) 
-	{
-		if (min[i] > getMax(i)) 
-		{
-			m_scene.getList(i).move(m_interval[i].m_max.m_index, max[i], 
-									BP_Endpoint::MAXIMUM, m_scene, overlap[i]);
-			m_scene.getList(i).move(m_interval[i].m_min.m_index, min[i], 
-									BP_Endpoint::MINIMUM, m_scene, overlap[i]);
-		}
-		else 
-		{
-			m_scene.getList(i).move(m_interval[i].m_min.m_index, min[i], 
-									BP_Endpoint::MINIMUM, m_scene, overlap[i]);
-			m_scene.getList(i).move(m_interval[i].m_max.m_index, max[i], 
-									BP_Endpoint::MAXIMUM, m_scene, overlap[i]);
-		}
-	}
-}
-
-
-
diff --git a/extern/solid/src/broad/BP_Proxy.h b/extern/solid/src/broad/BP_Proxy.h
deleted file mode 100644
index b4500ddca44..00000000000
--- a/extern/solid/src/broad/BP_Proxy.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_PROXY_H
-#define BP_PROXY_H
-
-#include "BP_Endpoint.h"
-#include "BP_ProxyList.h"
-
-class BP_Interval {
-public:
-	BP_Interval() {}
-	BP_Interval(BP_Proxy *proxy) :
-		m_min(proxy),
-		m_max(proxy) 
-	{}
-
-	BP_Link m_min;
-	BP_Link m_max;
-};
-
-class BP_Scene;
-
-class BP_Proxy {
-public:
-    BP_Proxy(void *object, BP_Scene& scene);
-
-	void add(const DT_Vector3 min,
-			 const DT_Vector3 max,
-			 BP_ProxyList& proxies);
-	
-    void remove(BP_ProxyList& proxies);
-	
-	void setBBox(const DT_Vector3 min, const DT_Vector3 max);
-    
-    void *getObject() { return m_object; }
-
-	DT_Scalar getMin(int i) const;
-	DT_Scalar getMax(int i) const;
-
-private:
-	BP_Interval  m_interval[3];
-    void        *m_object;
-	BP_Scene&    m_scene;
-};
-
-inline bool BP_overlap(const BP_Proxy *a, const BP_Proxy *b)
-{
-	return a->getMin(0) <= b->getMax(0) && b->getMin(0) <= a->getMax(0) && 
-		   a->getMin(1) <= b->getMax(1) && b->getMin(1) <= a->getMax(1) &&
-		   a->getMin(2) <= b->getMax(2) && b->getMin(2) <= a->getMax(2);
-}
-
-#endif
-
-
-
-
diff --git a/extern/solid/src/broad/BP_ProxyList.h b/extern/solid/src/broad/BP_ProxyList.h
deleted file mode 100644
index 2f449777d2d..00000000000
--- a/extern/solid/src/broad/BP_ProxyList.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_PROXYLIST_H
-#define BP_PROXYLIST_H
-
-#include 
-
-#include 
-#include 
-#include 
-
-class BP_Proxy;
-
-typedef std::pair BP_ProxyEntry; 
-
-inline bool operator<(const BP_ProxyEntry& a, const BP_ProxyEntry& b) 
-{
-	return a.first < b.first;
-}
-
-class BP_ProxyList : public std::vector {
-public:
-   BP_ProxyList(size_t n = 20) : std::vector(n) {}      
-
-	iterator add(BP_Proxy *proxy) 
-	{
-		BP_ProxyEntry entry = std::make_pair(proxy, (unsigned int)0);
-		iterator it = std::lower_bound(begin(), end(), entry);
-		if (it == end() || (*it).first != proxy) 
-		{
-			it = insert(it, entry);
-		}
-		++(*it).second;
-		return it;
-	}
-
-	void remove(BP_Proxy *proxy) 
-	{
-		BP_ProxyEntry entry = std::make_pair(proxy, (unsigned int)0);
-		iterator it = std::lower_bound(begin(), end(), entry);
-		if (it != end() && (*it).first == proxy && --(*it).second == 0) 
-		{
-			erase(it);	
-		}	
-	}
-};
-
-#endif
diff --git a/extern/solid/src/broad/BP_Scene.cpp b/extern/solid/src/broad/BP_Scene.cpp
deleted file mode 100644
index c0cd83ba311..00000000000
--- a/extern/solid/src/broad/BP_Scene.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "BP_Scene.h"
-#include "BP_Proxy.h"
-
-#include 
-
-BP_Proxy *BP_Scene::createProxy(void *object, 
-								const DT_Vector3 min,
-								const DT_Vector3 max)
-{
-	BP_Proxy *proxy = new BP_Proxy(object, *this);
-
-	proxy->add(min, max, m_proxies);
-	
-	BP_ProxyList::iterator it;
-	for (it = m_proxies.begin(); it != m_proxies.end(); ++it)
-	{
-		if ((*it).second == 3)
-		{
-			callBeginOverlap(proxy->getObject(), (*it).first->getObject());
-		}
-	}
-
-	m_proxies.clear();
-
-	return proxy;
-}
-
-void BP_Scene::destroyProxy(BP_Proxy *proxy)
-{
-	proxy->remove(m_proxies);
-	
-	BP_ProxyList::iterator it;
-	for (it = m_proxies.begin(); it != m_proxies.end(); ++it)
-	{
-		if ((*it).second == 3)
-		{
-			callEndOverlap(proxy->getObject(), (*it).first->getObject());
-		}
-	}
-	
-	m_proxies.clear();
-
-	delete proxy;
-}
-
-void *BP_Scene::rayCast(BP_RayCastCallback objectRayCast,
-						void *client_data,
-						const DT_Vector3 source, 
-						const DT_Vector3 target, 
-						DT_Scalar& lambda) const 
-{
-	void *client_object = 0;
-	
-	DT_Index index[3];
-	index[0] = m_endpointList[0].stab(source[0], m_proxies);
-	index[1] = m_endpointList[1].stab(source[1], m_proxies);
-	index[2] = m_endpointList[2].stab(source[2], m_proxies);
-
-	BP_ProxyList::iterator it;
-	for (it = m_proxies.begin(); it != m_proxies.end(); ++it) 
-	{
-		if ((*it).second == 3 &&
-            (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda))
-		{
-			client_object = (*it).first->getObject();
-		}
-	}
-
-	DT_Vector3 delta;
-	delta[0] = target[0] - source[0];
-	delta[1] = target[1] - source[1];
-	delta[2] = target[2] - source[2];
-	
-	DT_Vector3 lambdas;
-	lambdas[0] = m_endpointList[0].nextLambda(index[0], source[0], delta[0]);
-	lambdas[1] = m_endpointList[1].nextLambda(index[1], source[1], delta[1]);
-	lambdas[2] = m_endpointList[2].nextLambda(index[2], source[2], delta[2]);
-	int closest = lambdas[0] < lambdas[1] ? (lambdas[0] < lambdas[2] ? 0 : 2) : (lambdas[1] < lambdas[2] ? 1 : 2);
-	
-	while (lambdas[closest] < lambda)
-	{
-		if (delta[closest] < 0.0f)
-		{
-			const BP_Endpoint& endpoint = m_endpointList[closest][index[closest]];
-
-			if (endpoint.getType() == BP_Endpoint::MAXIMUM) 
-			{
-				it = m_proxies.add(endpoint.getProxy());
-				if ((*it).second == 3 &&
-					(*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda))
-				{
-					client_object = (*it).first->getObject();
-				}
-			}
-			else
-			{
-				m_proxies.remove(endpoint.getProxy());
-			}
-		}
-		else 
-		{
-			const BP_Endpoint& endpoint = m_endpointList[closest][index[closest] - 1];
-			
-			if (endpoint.getType() == BP_Endpoint::MINIMUM) 
-			{
-				it = m_proxies.add(endpoint.getProxy());
-				if ((*it).second == 3 &&
-					(*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda))
-				{
-					client_object = (*it).first->getObject();
-				}
-			}
-			else
-			{
-				m_proxies.remove(endpoint.getProxy());
-			}
-		}
-
-		lambdas[closest] = m_endpointList[closest].nextLambda(index[closest], source[closest], delta[closest]);
-		closest = lambdas[0] < lambdas[1] ?	(lambdas[0] < lambdas[2] ? 0 : 2) : (lambdas[1] < lambdas[2] ? 1 : 2);
-	}
-
-	m_proxies.clear();
-
-	return client_object;
-}
-
-
diff --git a/extern/solid/src/broad/BP_Scene.h b/extern/solid/src/broad/BP_Scene.h
deleted file mode 100644
index ef55374c43b..00000000000
--- a/extern/solid/src/broad/BP_Scene.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef BP_SCENE_H
-#define BP_SCENE_H
-
-#include 
-
-#include "BP_EndpointList.h"
-#include "BP_ProxyList.h"
-
-class BP_Proxy;
-
-class BP_Scene {
-public:
-    BP_Scene(void *client_data,
-			 BP_Callback beginOverlap,
-			 BP_Callback endOverlap) 
-      :	m_client_data(client_data),
-		m_beginOverlap(beginOverlap),
-		m_endOverlap(endOverlap),
-		m_proxies(20)
-	{}
-
-    ~BP_Scene() {}
-
-    BP_Proxy *createProxy(void *object, 
-						  const DT_Vector3 min,
-						  const DT_Vector3 max);
-
-    void destroyProxy(BP_Proxy *proxy);
-	
-	void *rayCast(BP_RayCastCallback objectRayCast,
-				  void *client_data,
-				  const DT_Vector3 source, 
-				  const DT_Vector3 target, 
-				  DT_Scalar& lambda) const;
-	
-  	void callBeginOverlap(void *object1, void *object2) 
-	{
-		(*m_beginOverlap)(m_client_data, object1, object2);
-	}
-	
-	void callEndOverlap(void *object1, void *object2) 
-	{
-		(*m_endOverlap)(m_client_data, object1, object2);
-	}
-	
-	BP_EndpointList& getList(int i) { return m_endpointList[i]; }
-
-private:
-	void                    *m_client_data;
-	BP_Callback              m_beginOverlap; 
-	BP_Callback              m_endOverlap; 
-    BP_EndpointList          m_endpointList[3];
-	mutable BP_ProxyList     m_proxies;
-};
-
-#endif
diff --git a/extern/solid/src/broad/Makefile b/extern/solid/src/broad/Makefile
deleted file mode 100644
index ce10e5f0bcf..00000000000
--- a/extern/solid/src/broad/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = solid_broad
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../../include -I$(NAN_QHULL)/include
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk 
-
-
diff --git a/extern/solid/src/complex/DT_BBoxTree.cpp b/extern/solid/src/complex/DT_BBoxTree.cpp
deleted file mode 100644
index 4f10f61f2e2..00000000000
--- a/extern/solid/src/complex/DT_BBoxTree.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_BBoxTree.h"
-
-inline DT_CBox getBBox(int first, int last, const DT_CBox *boxes, const DT_Index *indices) 
-{
-	assert(last - first >= 1);
-
-	DT_CBox bbox = boxes[indices[first]];
-	int i;
-	for (i = first; i < last; ++i) 
-	{
-		bbox = bbox.hull(boxes[indices[i]]);
-	}
-
-	return bbox;
-}
-
-DT_BBoxNode::DT_BBoxNode(int first, int last, int& node, DT_BBoxNode *free_nodes, const DT_CBox *boxes, DT_Index *indices, const DT_CBox& bbox)
-{
-	assert(last - first >= 2);
-	
-	int axis = bbox.longestAxis();
-	MT_Scalar abscissa = bbox.getCenter()[axis];
-	int i = first, mid = last;
-	while (i < mid) 
-	{
-		if (boxes[indices[i]].getCenter()[axis] < abscissa)
-		{
-			++i;
-		}
-		else
-		{
-			--mid;
-			std::swap(indices[i], indices[mid]);
-		}
-	}
-
-	if (mid == first || mid == last) 
-	{
-		mid = (first + last) / 2;
-	}
-	
-	m_lbox = getBBox(first, mid, boxes, indices);
-	m_rbox = getBBox(mid, last, boxes, indices);
-	m_flags = 0x0;
-
-	if (mid - first == 1)
-	{
-		m_flags |= LLEAF;
-		m_lchild = indices[first];
-	}
-	else 
-	{	
-		m_lchild = node++;
-		new(&free_nodes[m_lchild]) DT_BBoxNode(first, mid, node, free_nodes, boxes, indices, m_lbox);
-	}
-
-	if (last - mid == 1)
-	{
-		m_flags |= RLEAF;
-		m_rchild = indices[mid];
-	}
-	else 
-	{
-		m_rchild = node++;
-		new(&free_nodes[m_rchild]) DT_BBoxNode(mid, last, node, free_nodes, boxes, indices, m_rbox); 
-	}
-}
diff --git a/extern/solid/src/complex/DT_BBoxTree.h b/extern/solid/src/complex/DT_BBoxTree.h
deleted file mode 100644
index 3d9da6e34ba..00000000000
--- a/extern/solid/src/complex/DT_BBoxTree.h
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_BBOXTREE_H
-#define DT_BBOXTREE_H
-
-#include 
-#include 
-
-#include "DT_Convex.h"
-#include "DT_CBox.h"
-
-
-class DT_BBoxTree {
-public:
-    enum NodeType { INTERNAL = 0, LEAF = 1 };
-    
-    DT_BBoxTree() {}
-    DT_BBoxTree(const DT_CBox& cbox, DT_Index index, NodeType type) 
-      : m_cbox(cbox),
-        m_index(index),
-        m_type(type)
-    {}
-    
-    DT_CBox  m_cbox;
-    DT_Index m_index;
-    NodeType m_type;
-};
-
-
-
-class DT_BBoxNode {
-public:
-    DT_BBoxNode() {}    
-    DT_BBoxNode(int first, int last, int& node, DT_BBoxNode *free_nodes, const DT_CBox *boxes, DT_Index *indices, const DT_CBox& bbox);
-
-    void makeChildren(DT_BBoxTree& ltree, DT_BBoxTree& rtree) const;
-    void makeChildren(const DT_CBox& added, DT_BBoxTree& ltree, DT_BBoxTree& rtree) const;
-
-    DT_CBox hull() const { return m_lbox.hull(m_rbox); }  
-    
-    enum FlagType { LLEAF = 0x80, RLEAF = 0x40 };
-
-    DT_CBox              m_lbox;
-    DT_CBox              m_rbox;
-    DT_Index             m_lchild;
-    DT_Index             m_rchild;
-    unsigned char        m_flags;
-};
-
-inline void DT_BBoxNode::makeChildren(DT_BBoxTree& ltree, DT_BBoxTree& rtree) const
-{
-    new (<ree) DT_BBoxTree(m_lbox, m_lchild, (m_flags & LLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
-    new (&rtree) DT_BBoxTree(m_rbox, m_rchild, (m_flags & RLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
-
-}
-
-inline void DT_BBoxNode::makeChildren(const DT_CBox& added, DT_BBoxTree& ltree, DT_BBoxTree& rtree) const
-{ 
-    new (<ree) DT_BBoxTree(m_lbox + added, m_lchild, (m_flags & LLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
-    new (&rtree) DT_BBoxTree(m_rbox + added, m_rchild, (m_flags & RLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL);
-}
-
-
-template 
-class DT_RootData {
-public:
-    DT_RootData(const DT_BBoxNode *nodes, 
-                const Shape *leaves) 
-      : m_nodes(nodes),
-        m_leaves(leaves)
-    {}
-
-    const DT_BBoxNode   *m_nodes;
-    const Shape         *m_leaves;
-};
-
-template 
-class DT_ObjectData : public DT_RootData {
-public:
-    DT_ObjectData(const DT_BBoxNode *nodes, 
-                  const Shape1 *leaves, 
-                  const MT_Transform& xform, 
-                  Shape2 plus) 
-      : DT_RootData(nodes, leaves),
-        m_xform(xform),
-        m_inv_xform(xform.inverse()),   
-        m_plus(plus),
-        m_added(computeCBox(plus, m_inv_xform))
-    {}
-
-    const MT_Transform&  m_xform;
-    MT_Transform         m_inv_xform;
-    Shape2               m_plus;
-    DT_CBox              m_added;
-};
-
-template 
-class DT_Pack {
-public:
-    DT_Pack(const DT_ObjectData& a, const DT_Convex& b)
-      : m_a(a),
-        m_b(b),
-        m_b_cbox(b.bbox(m_a.m_inv_xform))
-    {}
-    
-    DT_ObjectData  m_a;
-    const DT_Convex&               m_b;
-    DT_CBox                        m_b_cbox;
-};
-
-template 
-class DT_HybridPack : public DT_Pack {
-public:
-    DT_HybridPack(const DT_ObjectData& a, const DT_Convex& b, MT_Scalar margin)
-      : DT_Pack(a, b),
-        m_margin(margin)
-    {
-        this->m_b_cbox += computeCBox(margin, this->m_a.m_inv_xform);
-    }
-    
-    MT_Scalar m_margin;
-};
-
-template 
-class DT_DuoPack {
-public:
-    DT_DuoPack(const DT_ObjectData& a, const DT_ObjectData& b) 
-      : m_a(a),
-        m_b(b)
-    {
-        m_b2a = a.m_inv_xform * b.m_xform;
-        m_a2b = b.m_inv_xform * a.m_xform;
-        m_abs_b2a = m_b2a.getBasis().absolute();
-        m_abs_a2b = m_a2b.getBasis().absolute();    
-    }
-    
-    DT_ObjectData  m_a, m_b;
-    MT_Transform                   m_b2a, m_a2b;
-    MT_Matrix3x3                   m_abs_b2a, m_abs_a2b;
-};
-
-
-template 
-inline void refit(DT_BBoxNode& node, const DT_RootData& rd)
-{
-    node.m_lbox = (node.m_flags & DT_BBoxNode::LLEAF) ? 
-                  computeCBox(rd.m_leaves[node.m_lchild]) : 
-                  rd.m_nodes[node.m_lchild].hull(); 
-    node.m_rbox = (node.m_flags & DT_BBoxNode::RLEAF) ? 
-                  computeCBox(rd.m_leaves[node.m_rchild]) : 
-                  rd.m_nodes[node.m_rchild].hull(); 
-}
-
-
-template 
-bool ray_cast(const DT_BBoxTree& a, const DT_RootData& rd,
-              const MT_Point3& source, const MT_Point3& target, 
-              MT_Scalar& lambda, MT_Vector3& normal) 
-{
-    if (!a.m_cbox.overlapsLineSegment(source, source.lerp(target, lambda))) 
-    {
-        return false;
-    }
-
-    if (a.m_type == DT_BBoxTree::LEAF) 
-    { 
-        return ray_cast(rd, a.m_index, source, target, lambda, normal); 
-    }
-    else 
-    {
-        DT_BBoxTree ltree, rtree;
-        rd.m_nodes[a.m_index].makeChildren(ltree, rtree);
-        
-        bool lresult = ray_cast(ltree, rd, source, target, lambda, normal);
-        bool rresult = ray_cast(rtree, rd, source, target, lambda, normal);
-        return lresult || rresult;
-    }
-}
-
-
-#ifdef STATISTICS
-int num_box_tests = 0;
-#endif
-
-template 
-inline bool intersect(const DT_CBox& a, const DT_CBox& b, const DT_DuoPack& pack)
-{
-#ifdef STATISTICS
-    ++num_box_tests;
-#endif
-
-    
-    MT_Vector3 abs_pos_b2a = (pack.m_b2a(b.getCenter()) - a.getCenter()).absolute();
-    MT_Vector3 abs_pos_a2b = (pack.m_a2b(a.getCenter()) - b.getCenter()).absolute();
-    return  (a.getExtent()[0] + pack.m_abs_b2a[0].dot(b.getExtent()) >=  abs_pos_b2a[0]) && 
-            (a.getExtent()[1] + pack.m_abs_b2a[1].dot(b.getExtent()) >=  abs_pos_b2a[1]) && 
-            (a.getExtent()[2] + pack.m_abs_b2a[2].dot(b.getExtent()) >=  abs_pos_b2a[2]) && 
-            (b.getExtent()[0] + pack.m_abs_a2b[0].dot(a.getExtent()) >=  abs_pos_a2b[0]) && 
-            (b.getExtent()[1] + pack.m_abs_a2b[1].dot(a.getExtent()) >=  abs_pos_a2b[1]) &&
-            (b.getExtent()[2] + pack.m_abs_a2b[2].dot(a.getExtent()) >=  abs_pos_a2b[2]);
-}
-
-
-
-
-template 
-bool intersect(const DT_BBoxTree& a, const DT_Pack& pack, MT_Vector3& v)
-{ 
-    if (!a.m_cbox.overlaps(pack.m_b_cbox)) 
-    {
-        return false;
-    }
-
-    if (a.m_type == DT_BBoxTree::LEAF) 
-    {
-        return intersect(pack, a.m_index, v);
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        return intersect(a_ltree, pack, v) || intersect(a_rtree, pack, v);
-    }
-}
-
-template 
-bool intersect(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack& pack, MT_Vector3& v)
-{ 
-    if (!intersect(a.m_cbox, b.m_cbox, pack)) 
-    {
-        return false;
-    }
-
-    if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) 
-    {
-        return intersect(pack, a.m_index, b.m_index, v);
-    }
-    else if (a.m_type == DT_BBoxTree::LEAF || 
-             (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) 
-    {
-        DT_BBoxTree b_ltree, b_rtree;
-        pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
-
-        return intersect(a, b_ltree, pack, v) || intersect(a, b_rtree, pack, v);
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        return intersect(a_ltree, b, pack, v) || intersect(a_rtree, b, pack, v);
-    }
-}
-
-template 
-bool common_point(const DT_BBoxTree& a, const DT_Pack& pack,  
-                  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{ 
-    if (!a.m_cbox.overlaps(pack.m_b_cbox))
-    {
-        return false;
-    }
-
-    if (a.m_type == DT_BBoxTree::LEAF) 
-    {
-        return common_point(pack, a.m_index, v, pa, pb);
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        return common_point(a_ltree, pack, v, pa, pb) ||
-               common_point(a_rtree, pack, v, pa ,pb);
-    }
-}
-
-template 
-bool common_point(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack& pack,  
-                  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{ 
-    if (!intersect(a.m_cbox, b.m_cbox, pack))
-    {
-        return false;
-    }
-
-    if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) 
-    {
-        return common_point(pack, a.m_index, b.m_index, v, pa, pb);
-    }
-    else if (a.m_type == DT_BBoxTree::LEAF || 
-             (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) 
-    {
-        DT_BBoxTree b_ltree, b_rtree;
-        pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
-        return common_point(a, b_ltree, pack, v, pa, pb) ||
-               common_point(a, b_rtree, pack, v, pa, pb);
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        return common_point(a_ltree, b, pack, v, pa, pb) ||
-               common_point(a_rtree, b, pack, v, pa ,pb);
-    }
-}
-
-
-template 
-bool penetration_depth(const DT_BBoxTree& a, const DT_HybridPack& pack, 
-                       MT_Vector3& v, MT_Point3& pa, MT_Point3& pb, MT_Scalar& max_pen_len) 
-{ 
-    if (!a.m_cbox.overlaps(pack.m_b_cbox))
-    {
-        return false;
-    }
-    
-    if (a.m_type == DT_BBoxTree::LEAF) 
-    {
-        if (penetration_depth(pack, a.m_index, v, pa, pb))
-        {
-            max_pen_len = pa.distance2(pb);
-            return true;
-        }
-        else 
-        {
-            return false;
-        }
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        if (penetration_depth(a_ltree, pack, v, pa, pb, max_pen_len)) 
-        {
-            MT_Vector3 rv;
-            MT_Point3 rpa, rpb;
-            MT_Scalar rmax_pen_len;
-            if (penetration_depth(a_rtree, pack, rv, rpa, rpb, rmax_pen_len) &&
-                (max_pen_len < rmax_pen_len))
-            {
-                max_pen_len = rmax_pen_len;
-                v = rv;
-                pa = rpa;
-                pb = rpb;
-            }
-            return true;
-        }
-        else 
-        {
-            return penetration_depth(a_rtree, pack, v, pa, pb, max_pen_len);
-        }
-    }
-}
-
-template 
-bool penetration_depth(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack& pack, 
-                       MT_Vector3& v, MT_Point3& pa, MT_Point3& pb, MT_Scalar& max_pen_len) 
-{ 
-    if (!intersect(a.m_cbox, b.m_cbox, pack))
-    {
-        return false;
-    }
-  
-    if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) 
-    {
-        if (penetration_depth(pack, a.m_index, b.m_index, v, pa, pb))
-        {
-            max_pen_len = pa.distance2(pb);
-            return true;
-        }
-        else 
-        {
-            return false;
-        }
-    }
-    else if (a.m_type == DT_BBoxTree::LEAF || 
-             (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) 
-    {
-        DT_BBoxTree b_ltree, b_rtree;
-        pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
-        if (penetration_depth(a, b_ltree, pack, v, pa, pb, max_pen_len)) 
-        {
-            MT_Point3 rpa, rpb;
-            MT_Scalar rmax_pen_len;
-            if (penetration_depth(a, b_rtree, pack, v, rpa, rpb, rmax_pen_len) &&
-                (max_pen_len < rmax_pen_len))
-            {
-                max_pen_len = rmax_pen_len;
-                pa = rpa;
-                pb = rpb;
-            }
-            return true;
-        }
-        else
-        {
-            return penetration_depth(a, b_rtree, pack, v, pa, pb, max_pen_len);
-        }
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        if (penetration_depth(a_ltree, b, pack, v, pa, pb, max_pen_len)) 
-        {
-            MT_Point3 rpa, rpb;
-            MT_Scalar rmax_pen_len;
-            if (penetration_depth(a_rtree, b, pack, v, rpa, rpb, rmax_pen_len) &&
-                (max_pen_len < rmax_pen_len))
-            {
-                max_pen_len = rmax_pen_len;
-                pa = rpa;
-                pb = rpb;
-            }
-            return true;
-        }
-        else 
-        {
-            return penetration_depth(a_rtree, b, pack, v, pa, pb, max_pen_len);
-        }
-    }
-}
-
-
-// Returns a lower bound for the distance for quick rejection in closest_points
-inline MT_Scalar distance2(const DT_CBox& a, const MT_Transform& a2w,
-                           const DT_CBox& b, const MT_Transform& b2w)
-{
-    MT_Vector3 v = b2w(b.getCenter()) - a2w(a.getCenter());
-    MT_Scalar dist2 = v.length2();
-    if (dist2 > MT_Scalar(0.0))
-    {
-        MT_Vector3 w = b2w(b.support(-v * b2w.getBasis())) - a2w(a.support(v * a2w.getBasis()));
-        MT_Scalar delta = v.dot(w);
-        return delta > MT_Scalar(0.0) ? delta * delta / dist2 : MT_Scalar(0.0);
-    }
-    return MT_Scalar(0.0);
-}
-
-
-template 
-MT_Scalar closest_points(const DT_BBoxTree& a, const DT_Pack& pack, 
-                         MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) 
-{ 
-    if (a.m_type == DT_BBoxTree::LEAF) 
-    {
-        return closest_points(pack, a.m_index, max_dist2, pa, pb);
-    }
-    else 
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        MT_Scalar ldist2 = distance2(a_ltree.m_cbox, pack.m_a.m_xform, pack.m_b_cbox, pack.m_a.m_xform);
-        MT_Scalar rdist2 = distance2(a_rtree.m_cbox, pack.m_a.m_xform, pack.m_b_cbox, pack.m_a.m_xform);
-        if (ldist2 < rdist2) 
-        {
-            MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a_ltree, pack, max_dist2, pa, pb) : MT_INFINITY;
-            GEN_set_min(max_dist2, dist2);
-            return rdist2 < max_dist2 ? GEN_min(dist2, closest_points(a_rtree, pack, max_dist2, pa, pb)) : dist2;
-        }
-        else
-        {
-            MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a_rtree, pack, max_dist2, pa, pb) : MT_INFINITY;
-            GEN_set_min(max_dist2, dist2);  
-            return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a_ltree, pack, max_dist2, pa, pb)) : dist2;       
-        }
-    }
-}
-
-    
-template 
-MT_Scalar closest_points(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack& pack, 
-                         MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) 
-{   
-    if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) 
-    {
-        return closest_points(pack, a.m_index, b.m_index, max_dist2, pa, pb);
-    }
-    else if (a.m_type == DT_BBoxTree::LEAF || 
-             (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) 
-    {
-        DT_BBoxTree b_ltree, b_rtree;
-        pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree);
-        MT_Scalar ldist2 = distance2(a.m_cbox, pack.m_a.m_xform, b_ltree.m_cbox, pack.m_b.m_xform);
-        MT_Scalar rdist2 = distance2(a.m_cbox, pack.m_a.m_xform, b_rtree.m_cbox, pack.m_b.m_xform);
-        if (ldist2 < rdist2)
-        {
-            MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a, b_ltree, pack, max_dist2, pa, pb): MT_INFINITY;;
-            GEN_set_min(max_dist2, dist2);
-            return rdist2 < max_dist2 ? GEN_min(dist2, closest_points(a, b_rtree, pack, max_dist2, pa, pb)) : dist2;        
-        }
-        else
-        {
-            MT_Scalar dist2 =  rdist2 < max_dist2 ? closest_points(a, b_rtree, pack, max_dist2, pa, pb) : MT_INFINITY;;
-            GEN_set_min(max_dist2, dist2);
-            return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a, b_ltree, pack, max_dist2, pa, pb)) : dist2;
-        }
-    }
-    else
-    {
-        DT_BBoxTree a_ltree, a_rtree;
-        pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree);
-        MT_Scalar ldist2 = distance2(a_ltree.m_cbox, pack.m_a.m_xform, b.m_cbox, pack.m_b.m_xform);
-        MT_Scalar rdist2 = distance2(a_rtree.m_cbox, pack.m_a.m_xform, b.m_cbox, pack.m_b.m_xform);
-        if (ldist2 < rdist2) 
-        {
-            MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a_ltree, b, pack, max_dist2, pa, pb) : MT_INFINITY;;
-            GEN_set_min(max_dist2, dist2);
-            return rdist2 < max_dist2 ? GEN_min(dist2,closest_points(a_rtree, b, pack, max_dist2, pa, pb)) : dist2;
-        }
-        else
-        {
-            MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a_rtree, b, pack, max_dist2, pa, pb) : MT_INFINITY;
-            GEN_set_min(max_dist2, dist2);
-            return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a_ltree, b, pack, max_dist2, pa, pb)) : dist2;
-        }
-    }
-}
-
-#endif
-
diff --git a/extern/solid/src/complex/DT_CBox.h b/extern/solid/src/complex/DT_CBox.h
deleted file mode 100644
index 7fc7c5df4db..00000000000
--- a/extern/solid/src/complex/DT_CBox.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CBOX_H
-#define DT_CBOX_H
-
-#include "MT_BBox.h"
-
-struct DT_CBox {
-    DT_CBox() {}
-    DT_CBox(const MT_Point3& center, const MT_Vector3& extent) 
-      : m_center(center),
-        m_extent(extent)
-    {}
-
-    explicit DT_CBox(const MT_BBox& bbox) { set(bbox); }
-
-    const MT_Point3& getCenter() const { return m_center; }
-    const MT_Vector3& getExtent() const { return m_extent; }
-
-    void set(const MT_BBox& bbox)
-    {
-        m_center = bbox.getCenter();
-        m_extent = bbox.getExtent();
-    }
- 
-    MT_BBox get() const
-    {
-        return MT_BBox(m_center - m_extent, m_center + m_extent);
-    }
-
-    MT_Scalar size() const  
-    {
-        return GEN_max(GEN_max(m_extent[0], m_extent[1]), m_extent[2]);
-    }
-
-
-    DT_CBox& operator+=(const DT_CBox& box)
-    {
-        m_center += box.getCenter();
-        m_extent += box.getExtent();
-        return *this;
-    }
-    
-    int longestAxis() const { return m_extent.closestAxis(); }
-        
-    DT_CBox hull(const DT_CBox& b) const 
-    {
-        return DT_CBox(this->get().hull(b.get()));
-    }
-
-    bool overlaps(const DT_CBox& b) const 
-    {
-        return MT_abs(m_center[0] - b.m_center[0]) <= m_extent[0] + b.m_extent[0] &&
-               MT_abs(m_center[1] - b.m_center[1]) <= m_extent[1] + b.m_extent[1] &&
-               MT_abs(m_center[2] - b.m_center[2]) <= m_extent[2] + b.m_extent[2];
-    }
-    
-    bool overlapsLineSegment(const MT_Point3& p, const MT_Point3& q) const 
-    {
-        MT_Vector3 r = q - p;   
-        MT_Vector3 r_abs = r.absolute();
-        
-        if (!overlaps(DT_CBox(p + r * MT_Scalar(0.5), r_abs * MT_Scalar(0.5))))
-        {
-            return false;
-        }
-        
-        MT_Vector3 s = p - m_center;
-
-        if (MT_abs(r[2] * s[1] - r[1] * s[2]) > r_abs[2] * m_extent[1] + r_abs[1] * m_extent[2])
-        {
-            return false;
-        }
-                    
-        if (MT_abs(r[0] * s[2] - r[2] * s[0]) > r_abs[0] * m_extent[2] + r_abs[2] * m_extent[0])
-        {
-            return false;
-        }
-                    
-        if (MT_abs(r[1] * s[0] - r[0] * s[1]) > r_abs[1] * m_extent[0] + r_abs[0] * m_extent[1])
-        {
-            return false;
-        }
-            
-        return true;
-    }
-    
-    MT_Point3 support(const MT_Vector3& v) const 
-    {
-        return m_center + MT_Vector3(v[0] < MT_Scalar(0.0) ? -m_extent[0] : m_extent[0],
-                                     v[1] < MT_Scalar(0.0) ? -m_extent[1] : m_extent[1],
-                                     v[2] < MT_Scalar(0.0) ? -m_extent[2] : m_extent[2]); 
-    
-    }
-
-private:
-    MT_Point3  m_center;
-    MT_Vector3 m_extent;
-};
-
-inline DT_CBox operator+(const DT_CBox& b1, const DT_CBox& b2) 
-{
-    return DT_CBox(b1.getCenter() + b2.getCenter(), 
-                   b1.getExtent() + b2.getExtent());
-}
-
-inline DT_CBox operator-(const DT_CBox& b1, const DT_CBox& b2) 
-{
-    return DT_CBox(b1.getCenter() - b2.getCenter(), 
-                   b1.getExtent() + b2.getExtent());
-}
-
-#endif
diff --git a/extern/solid/src/complex/DT_Complex.cpp b/extern/solid/src/complex/DT_Complex.cpp
deleted file mode 100644
index 023383a8427..00000000000
--- a/extern/solid/src/complex/DT_Complex.cpp
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include 
-#include 
-
-#include "DT_Complex.h"
-#include "DT_Minkowski.h"
-#include "DT_Sphere.h"
-#include "DT_Transform.h"
-
-DT_Complex::DT_Complex(const DT_VertexBase *base) 
-  : m_base(base),
-    m_count(0),
-    m_leaves(0),
-	m_nodes(0)
-{ 
-	assert(base);
-	base->addComplex(this);
-}
-
-
-DT_Complex::~DT_Complex()
-{
-    DT_Index i;
-    for (i = 0; i != m_count; ++i) 
-    {
-        delete m_leaves[i];
-    }
-    delete [] m_leaves;
-    delete [] m_nodes;
-    
-    m_base->removeComplex(this);
-    if (m_base->isOwner()) 
-    {
-        delete m_base;
-    }
-}
-
-void DT_Complex::finish(DT_Count n, const DT_Convex *p[]) 
-{
-	m_count = n;
-
-   
-    assert(n >= 1);
-
-    m_leaves = new const DT_Convex *[n];
-    assert(m_leaves);
-
-    DT_CBox *boxes = new DT_CBox[n];
-    DT_Index *indices = new DT_Index[n];
-    assert(boxes);
-       
-    DT_Index i;
-    for (i = 0; i != n; ++i) 
-    {
-        m_leaves[i] = p[i];
-        boxes[i].set(p[i]->bbox());
-        indices[i] = i;
-    }
-
-    m_cbox = boxes[0];
-    for (i = 1; i != n; ++i) 
-    {
-        m_cbox = m_cbox.hull(boxes[i]);
-    }
-
-    if (n == 1)
-    {
-        m_nodes = 0;
-        m_type = DT_BBoxTree::LEAF;
-    }
-    else 
-    {
-        m_nodes = new DT_BBoxNode[n - 1];
-        assert(m_nodes);
-    
-        int num_nodes = 0;
-        new(&m_nodes[num_nodes++]) DT_BBoxNode(0, n, num_nodes, m_nodes, boxes, indices, m_cbox);
-
-        assert(num_nodes == n - 1);
-        
-        m_type = DT_BBoxTree::INTERNAL;
-    }
-
-    delete [] boxes;
-}
-
-
-MT_BBox DT_Complex::bbox(const MT_Transform& t, MT_Scalar margin) const 
-{
-    MT_Matrix3x3 abs_b = t.getBasis().absolute();  
-    MT_Point3 center = t(m_cbox.getCenter());
-    MT_Vector3 extent(margin + abs_b[0].dot(m_cbox.getExtent()),
-                      margin + abs_b[1].dot(m_cbox.getExtent()),
-                      margin + abs_b[2].dot(m_cbox.getExtent()));
-    
-    return MT_BBox(center - extent, center + extent);
-}
-
-inline DT_CBox computeCBox(const DT_Convex *p)
-{
-    return DT_CBox(p->bbox()); 
-}
-
-inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform) 
-{
-    const MT_Matrix3x3& basis = xform.getBasis();
-    return DT_CBox(MT_Point3(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)), 
-                   MT_Vector3(basis[0].length() * margin, 
-                              basis[1].length() * margin, 
-                              basis[2].length() * margin));
-} 
-
-void DT_Complex::refit()
-{
-    DT_RootData rd(m_nodes, m_leaves);
-    DT_Index i = m_count - 1;
-    while (i--)
-    {
-        ::refit(m_nodes[i], rd);
-    }
-    m_cbox = m_type == DT_BBoxTree::LEAF ? computeCBox(m_leaves[0]) : m_nodes[0].hull();
-}
-
-inline bool ray_cast(const DT_RootData& rd, DT_Index index, const MT_Point3& source, const MT_Point3& target, 
-                     MT_Scalar& lambda, MT_Vector3& normal)
-{
-    return rd.m_leaves[index]->ray_cast(source, target, lambda, normal);
-}
-
-bool DT_Complex::ray_cast(const MT_Point3& source, const MT_Point3& target,
-                          MT_Scalar& lambda, MT_Vector3& normal) const 
-{
-    DT_RootData rd(m_nodes, m_leaves);
-
-    return ::ray_cast(DT_BBoxTree(m_cbox, 0, m_type), rd, source, target, lambda, normal);
-}
-
-inline bool intersect(const DT_Pack& pack, DT_Index a_index, MT_Vector3& v) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    MT_Scalar a_margin = pack.m_a.m_plus;
-    return ::intersect((a_margin > MT_Scalar(0.0) ? 
-                        static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) :  
-                        static_cast(ta)), 
-                       pack.m_b, v); 
-}
-
-bool intersect(const DT_Complex& a,  const MT_Transform& a2w,  MT_Scalar a_margin, 
-               const DT_Convex& b, MT_Vector3& v) 
-{
-    DT_Pack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin), b);
-
-    return intersect(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v);
-}
-
-inline bool intersect(const DT_DuoPack& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    MT_Scalar a_margin = pack.m_a.m_plus;
-    DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
-    MT_Scalar b_margin = pack.m_b.m_plus;
-    return ::intersect((a_margin > MT_Scalar(0.0) ?
-                        static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) : 
-                        static_cast(ta)), 
-                       (b_margin > MT_Scalar(0.0) ? 
-                        static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : 
-                        static_cast(tb)), 
-                       v);   
-}
-
-bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
-               const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, MT_Vector3& v) 
-{
-    DT_DuoPack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin),
-                                                  DT_ObjectData(b.m_nodes, b.m_leaves, b2w, b_margin));
-
-
-    return intersect(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
-                     DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v);
-}
-
-inline bool common_point(const DT_Pack& pack, DT_Index a_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    MT_Scalar a_margin = pack.m_a.m_plus;
-    return ::common_point((a_margin > MT_Scalar(0.0) ? 
-                           static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) :
-                           static_cast(ta)), 
-                          pack.m_b, v, pa, pb); 
-}
-    
-bool common_point(const DT_Complex& a,  const MT_Transform& a2w,  MT_Scalar a_margin, 
-                  const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-     DT_Pack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin), b);
-
-    return common_point(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v, pb, pa);
-}
-
-inline bool common_point(const DT_DuoPack& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    MT_Scalar a_margin = pack.m_a.m_plus;
-    DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
-    MT_Scalar b_margin = pack.m_b.m_plus;
-    return ::common_point((a_margin > MT_Scalar(0.0) ? 
-                           static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) : 
-                           static_cast(ta)), 
-                          (b_margin > MT_Scalar(0.0) ? 
-                           static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : 
-                           static_cast(tb)), 
-                          v, pa, pb);    
-}
-    
-bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
-                  const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, 
-                  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_DuoPack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin),
-                                                  DT_ObjectData(b.m_nodes, b.m_leaves, b2w, b_margin));
-
-    return common_point(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
-                        DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type),  pack, v, pa, pb);
-}
-
-inline bool penetration_depth(const DT_HybridPack& pack, DT_Index a_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    return ::hybrid_penetration_depth(ta, pack.m_a.m_plus, pack.m_b, pack.m_margin, v, pa, pb); 
-}
-
-bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-                       const DT_Convex& b, MT_Scalar b_margin, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_HybridPack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin), b, b_margin);
-     
-    MT_Scalar  max_pen_len = MT_Scalar(0.0);
-    return penetration_depth(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v, pa, pb, max_pen_len);
-}
-
-inline bool penetration_depth(const DT_DuoPack& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
-    return ::hybrid_penetration_depth(ta, pack.m_a.m_plus, tb, pack.m_a.m_plus, v, pa, pb);  
-}
-
-bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
-                       const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, 
-                       MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_DuoPack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin),
-                                                  DT_ObjectData(b.m_nodes, b.m_leaves, b2w, b_margin));
-
-    MT_Scalar  max_pen_len = MT_Scalar(0.0);
-    return penetration_depth(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
-                             DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v, pa, pb, max_pen_len);
-}
-
-
-
-inline MT_Scalar closest_points(const DT_Pack& pack, DT_Index a_index, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    MT_Scalar a_margin = pack.m_a.m_plus;
-    return ::closest_points((a_margin > MT_Scalar(0.0) ? 
-                             static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) :  
-                             static_cast(ta)), 
-                            pack.m_b, max_dist2, pa, pb); 
-}
-
-MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
-                         const DT_Convex& b, MT_Point3& pa, MT_Point3& pb)
-{
-    DT_Pack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin), b);
-
-    return closest_points(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, MT_INFINITY, pa, pb); 
-}
-
-inline MT_Scalar closest_points(const DT_DuoPack& pack, DT_Index a_index, DT_Index b_index, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]);
-    MT_Scalar a_margin = pack.m_a.m_plus;
-    DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]);
-    MT_Scalar b_margin = pack.m_b.m_plus;
-    return ::closest_points((a_margin > MT_Scalar(0.0) ? 
-                             static_cast(DT_Minkowski(ta, DT_Sphere(a_margin))) : 
-                             static_cast(ta)), 
-                            (b_margin > MT_Scalar(0.0) ? 
-                             static_cast(DT_Minkowski(tb, DT_Sphere(b_margin))) : 
-                             static_cast(tb)), max_dist2, pa, pb);     
-}
-
-MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin,
-                         const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, 
-                         MT_Point3& pa, MT_Point3& pb) 
-{
-    DT_DuoPack pack(DT_ObjectData(a.m_nodes, a.m_leaves, a2w, a_margin),
-                               DT_ObjectData(b.m_nodes, b.m_leaves, b2w, b_margin));
-
-    return closest_points(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type),
-                          DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, MT_INFINITY, pa, pb);
-}
-
-
diff --git a/extern/solid/src/complex/DT_Complex.h b/extern/solid/src/complex/DT_Complex.h
deleted file mode 100644
index ae08a05d4c9..00000000000
--- a/extern/solid/src/complex/DT_Complex.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_COMPLEX_H
-#define DT_COMPLEX_H
-
-#include 
-
-#include "MT_Transform.h"
-#include "DT_VertexBase.h"
-
-#include "DT_Shape.h"
-#include "DT_CBox.h"
-#include "DT_BBoxTree.h"
-
-class DT_Convex;
-
-class DT_Complex : public DT_Shape  {
-public:
-	DT_Complex(const DT_VertexBase *base);
-	virtual ~DT_Complex();
-	
-	void finish(DT_Count n, const DT_Convex *p[]);
-    
-	virtual DT_ShapeType getType() const { return COMPLEX; }
-
-    virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin) const;
-
-	virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, 
-						  MT_Scalar& lambda, MT_Vector3& normal) const; 
-
-	void refit();
-	
-
-    friend bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-		                  const DT_Convex& b, MT_Vector3& v);
-    
-    friend bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-		                  const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                          MT_Vector3& v);
-   
-    friend bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-		                     const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-    
-    friend bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-		                     const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                             MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-    
-    friend bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-								  const DT_Convex& b, MT_Scalar b_margin, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-    
-    friend bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-								  const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
-								  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-    friend MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-		                            const DT_Convex& b, MT_Point3& pa, MT_Point3& pb);
-    
-    friend MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, 
-		                            const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin,
-									MT_Point3& pa, MT_Point3& pb);
-
-	const DT_VertexBase   *m_base;
-	DT_Count               m_count;
-	const DT_Convex      **m_leaves;
-	DT_BBoxNode           *m_nodes;
-	DT_CBox                m_cbox;
-	DT_BBoxTree::NodeType  m_type;
-};
-
-#endif
-
-
-
diff --git a/extern/solid/src/complex/Makefile b/extern/solid/src/complex/Makefile
deleted file mode 100644
index e8df4df51a3..00000000000
--- a/extern/solid/src/complex/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = solid_complex
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../../include -I$(NAN_QHULL)/include
-CPPFLAGS += -I../convex
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk 
-
-
diff --git a/extern/solid/src/convex/DT_Accuracy.cpp b/extern/solid/src/convex/DT_Accuracy.cpp
deleted file mode 100644
index 113275b0dbd..00000000000
--- a/extern/solid/src/convex/DT_Accuracy.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Accuracy.h"
-
-static const MT_Scalar rel_error = MT_Scalar(1.0e-3);
-
-MT_Scalar DT_Accuracy::rel_error2 = rel_error * rel_error;
-MT_Scalar DT_Accuracy::depth_tolerance = MT_Scalar(1.0) + MT_Scalar(2.0) * rel_error; 
-MT_Scalar DT_Accuracy::tol_error = MT_EPSILON;
diff --git a/extern/solid/src/convex/DT_Accuracy.h b/extern/solid/src/convex/DT_Accuracy.h
deleted file mode 100644
index 9759a6fd4c5..00000000000
--- a/extern/solid/src/convex/DT_Accuracy.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ACCURACY_H
-#define DT_ACCURACY_H
-
-#include "MT_Scalar.h"
-
-class DT_Accuracy {
-public:
-	static MT_Scalar rel_error2; // squared relative error in the computed distance
-	static MT_Scalar depth_tolerance; // terminate EPA if upper_bound <= depth_tolerance * dist2
-	static MT_Scalar tol_error; // error tolerance if the distance is almost zero
-	
-	static void setAccuracy(MT_Scalar rel_error) 
-	{ 
-		rel_error2 = rel_error * rel_error;
-		depth_tolerance = MT_Scalar(1.0) + MT_Scalar(2.0) * rel_error;
-	}	
-   
-	static void setTolerance(MT_Scalar epsilon) 
-	{ 
-		tol_error = epsilon;
-	}
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Array.h b/extern/solid/src/convex/DT_Array.h
deleted file mode 100644
index 1694f884e53..00000000000
--- a/extern/solid/src/convex/DT_Array.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_ARRAY_H
-#define DT_ARRAY_H
-
-#if defined (__sgi)
-#include 
-#else
-#include 
-#endif
-
-template 
-class DT_Array {
-public:
-	DT_Array() 
-      :	m_count(0), 
-		m_data(0) 
-	{}
-
-	explicit DT_Array(Size count)
-	  :	m_count(count),
-		m_data(new Data[count]) 
-	{
-		assert(m_data);
-	}
-	
-	DT_Array(Size count, const Data *data) 
-	  :	m_count(count),
-		m_data(new Data[count]) 
-	{
-		assert(m_data);		
-		std::copy(&data[0], &data[count], m_data);
-	}
-	
-	~DT_Array() 
-	{ 
-		delete [] m_data; 
-	}
-	
-	const Data& operator[](int i) const { return m_data[i]; }
-	Data&       operator[](int i)       { return m_data[i]; }
-
-	Size size() const { return m_count; }
-	
-private:
-	DT_Array(const DT_Array&);
-	DT_Array& operator=(const DT_Array&);
-
-	Size  m_count;
-	Data *m_data;
-};
-  
-#endif
-
diff --git a/extern/solid/src/convex/DT_Box.cpp b/extern/solid/src/convex/DT_Box.cpp
deleted file mode 100644
index 0b46f566fe8..00000000000
--- a/extern/solid/src/convex/DT_Box.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Box.h"
-
-MT_Scalar DT_Box::supportH(const MT_Vector3& v) const 
-{
-    return v.absolute().dot(m_extent);
-}
-
-MT_Point3 DT_Box::support(const MT_Vector3& v) const 
-{
-    return MT_Point3(v[0] < MT_Scalar(0.0) ? -m_extent[0] : m_extent[0],
-                     v[1] < MT_Scalar(0.0) ? -m_extent[1] : m_extent[1],
-                     v[2] < MT_Scalar(0.0) ? -m_extent[2] : m_extent[2]); 
-    
-}
-
-
-bool DT_Box::ray_cast(const MT_Point3& source, const MT_Point3& target,
-					  MT_Scalar& param, MT_Vector3& normal) const 
-{
-	T_Outcode source_bits = outcode(source);
-	T_Outcode target_bits = outcode(target);
-
-	if ((source_bits & target_bits) == 0x0)
-		// None of the side planes separate the ray from the box.
-	{
-		MT_Scalar lambda_enter = MT_Scalar(0.0);
-		MT_Scalar lambda_exit  = param;
-		MT_Vector3 r = target - source;
-		T_Outcode normal_bit = 0x0; // Indicates the axis that is returned as normal.
-		T_Outcode bit = 0x01;
-		int i;
-		for (i = 0; i != 3; ++i)
-		{
-			if (source_bits & bit)
-				// Point of intersection is entering
-			{
-				MT_Scalar lambda = (-source[i] - m_extent[i]) / r[i];
-				if (lambda_enter < lambda)
-				{
-					lambda_enter = lambda;
-					normal_bit = bit;
-				}
-			}
-			else if (target_bits & bit) 
-				// Point of intersection is exiting
-			{
-				MT_Scalar lambda = (-source[i] - m_extent[i]) / r[i];
-				GEN_set_min(lambda_exit, lambda);
-			}
-			bit <<=1;
-			if (source_bits & bit)
-				// Point of intersection is entering
-			{
-				MT_Scalar lambda =  (-source[i] + m_extent[i]) / r[i];
-				if (lambda_enter < lambda)
-				{
-					lambda_enter = lambda;
-					normal_bit = bit;
-				}
-			}
-			else if (target_bits & bit) 
-				// Point of intersection is exiting
-			{
-				MT_Scalar lambda =  (-source[i] + m_extent[i]) / r[i];
-				GEN_set_min(lambda_exit, lambda);
-			}
-			bit <<=1;
-		}
-		if (lambda_enter <= lambda_exit)
-			// The ray intersects the box
-		{
-			param = lambda_enter;
-			normal.setValue(normal_bit == 0x01 ? -MT_Scalar(1.0) : 
-							normal_bit == 0x02 ?  MT_Scalar(1.0) : 
-							MT_Scalar(0.0),
-							normal_bit == 0x04 ? -MT_Scalar(1.0) : 
-							normal_bit == 0x08 ?  MT_Scalar(1.0) : 
-							MT_Scalar(0.0),
-							normal_bit == 0x10 ? -MT_Scalar(1.0) : 
-							normal_bit == 0x20 ?  MT_Scalar(1.0) : 
-							MT_Scalar(0.0));
-			return true;
-		}
-	}
-
-	return false;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Box.h b/extern/solid/src/convex/DT_Box.h
deleted file mode 100644
index ace9634b5e3..00000000000
--- a/extern/solid/src/convex/DT_Box.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_BOX_H
-#define DT_BOX_H
-
-#include "DT_Convex.h"
-
-class DT_Box : public DT_Convex {
-public:
-    DT_Box(MT_Scalar x, MT_Scalar y, MT_Scalar z) : 
-        m_extent(x, y, z) 
-	{}
-
-    DT_Box(const MT_Vector3& e) : 
-		m_extent(e) 
-	{}
-
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-	virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target,
-						  MT_Scalar& param, MT_Vector3& normal) const;
-    
-    const MT_Vector3& getExtent() const { return m_extent; }
-	
-protected:
-	typedef unsigned int T_Outcode;
-	
-	T_Outcode outcode(const MT_Point3& p) const
-	{
-		return (p[0] < -m_extent[0] ? 0x01 : 0x0) |    
-			   (p[0] >  m_extent[0] ? 0x02 : 0x0) |
-			   (p[1] < -m_extent[1] ? 0x04 : 0x0) |    
-			   (p[1] >  m_extent[1] ? 0x08 : 0x0) |
-			   (p[2] < -m_extent[2] ? 0x10 : 0x0) |    
-			   (p[2] >  m_extent[2] ? 0x20 : 0x0);
-	}
-    
-    MT_Vector3 m_extent;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Cone.cpp b/extern/solid/src/convex/DT_Cone.cpp
deleted file mode 100644
index 1dd6a7ddbbe..00000000000
--- a/extern/solid/src/convex/DT_Cone.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Cone.h"
-
-MT_Point3 DT_Cone::support(const MT_Vector3& v) const 
-{
-    MT_Scalar v_len = v.length();
-
-    if (v[1] > v_len * sinAngle)
-	{
-		return MT_Point3(MT_Scalar(0.0), halfHeight, MT_Scalar(0.0));
-	}
-    else
-	{
-        MT_Scalar s = MT_sqrt(v[0] * v[0] + v[2] * v[2]);
-        if (s != MT_Scalar(0.0))
-		{
-            MT_Scalar d = bottomRadius / s;  
-            return MT_Point3(v[0] * d, -halfHeight, v[2] * d);
-        }
-        else
-		{
-			return MT_Point3(bottomRadius, -halfHeight, MT_Scalar(0.0));
-		}
-    }
-}
-
diff --git a/extern/solid/src/convex/DT_Cone.h b/extern/solid/src/convex/DT_Cone.h
deleted file mode 100644
index 85e416877dd..00000000000
--- a/extern/solid/src/convex/DT_Cone.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CONE_H
-#define DT_CONE_H
-
-#include "DT_Convex.h"
-
-class DT_Cone : public DT_Convex {
-public:
-	DT_Cone(MT_Scalar r, MT_Scalar h) : 
-        bottomRadius(r), 
-        halfHeight(h * MT_Scalar(0.5)), 
-        sinAngle(r / MT_sqrt(r * r + h * h))
-    {} 
-  
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-  
-protected:
-    MT_Scalar bottomRadius;
-    MT_Scalar halfHeight;
-    MT_Scalar sinAngle;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Convex.cpp b/extern/solid/src/convex/DT_Convex.cpp
deleted file mode 100644
index 3be47f6ed02..00000000000
--- a/extern/solid/src/convex/DT_Convex.cpp
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Convex.h"
-#include "GEN_MinMax.h"
-
-//#define DEBUG
-#define SAFE_EXIT
-
-#include "DT_GJK.h"
-#include "DT_PenDepth.h"
-
-#include 
-#include 
-
-#include "MT_BBox.h"
-#include "DT_Sphere.h"
-#include "DT_Minkowski.h"
-
-#include "DT_Accuracy.h"
-
-#ifdef STATISTICS
-int num_iterations = 0;
-int num_irregularities = 0;
-#endif
-
-MT_BBox DT_Convex::bbox() const 
-{
-	MT_Point3 min(-supportH(MT_Vector3(-1.0f, 0.0f, 0.0f)),
-                  -supportH(MT_Vector3(0.0f, -1.0f, 0.0f)),
-				  -supportH(MT_Vector3(0.0f, 0.0f, -1.0f)));
-	MT_Point3 max( supportH(MT_Vector3(1.0f, 0.0f, 0.0f)),
-                   supportH(MT_Vector3(0.0f, 1.0f, 0.0f)),
-				   supportH(MT_Vector3(0.0f, 0.0f, 1.0f)));
-
-	
-    return MT_BBox(min, max);
-}
-
-MT_BBox DT_Convex::bbox(const MT_Matrix3x3& basis) const 
-{
-    MT_Point3 min(-supportH(-basis[0]),
-                  -supportH(-basis[1]),
-		          -supportH(-basis[2])); 
-    MT_Point3 max( supportH( basis[0]),
-                   supportH( basis[1]),
-                   supportH( basis[2])); 
-    return MT_BBox(min, max);
-}
-
-MT_BBox DT_Convex::bbox(const MT_Transform& t, MT_Scalar margin) const 
-{
-    MT_Point3 min(t.getOrigin()[0] - supportH(-t.getBasis()[0]) - margin,
-                  t.getOrigin()[1] - supportH(-t.getBasis()[1]) - margin,
-		          t.getOrigin()[2] - supportH(-t.getBasis()[2]) - margin); 
-    MT_Point3 max(t.getOrigin()[0] + supportH( t.getBasis()[0]) + margin,
-                  t.getOrigin()[1] + supportH( t.getBasis()[1]) + margin,
-                  t.getOrigin()[2] + supportH( t.getBasis()[2]) + margin); 
-    return MT_BBox(min, max);
-}
-
-bool DT_Convex::ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& lambda, MT_Vector3& normal) const
-{
-	// Still working on this one...
-    return false;
-}
-
-bool intersect(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v)
-{
-	DT_GJK gjk;
-
-#ifdef STATISTICS
-    num_iterations = 0;
-#endif
-	MT_Scalar dist2 = MT_INFINITY;
-
-	do
-	{
-		MT_Point3  p = a.support(-v);	
-		MT_Point3  q = b.support(v);
-		MT_Vector3 w = p - q; 
-		
-        if (v.dot(w) > MT_Scalar(0.0)) 
-		{
-			return false;
-		}
- 
-		gjk.addVertex(w);
-
-#ifdef STATISTICS
-        ++num_iterations;
-#endif
-        if (!gjk.closest(v)) 
-		{
-#ifdef STATISTICS
-            ++num_irregularities;
-#endif
-            return false;
-        }
-
-#ifdef SAFE_EXIT
-		MT_Scalar prev_dist2 = dist2;
-#endif
-
-		dist2 = v.length2();
-
-#ifdef SAFE_EXIT
-		if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) 
-		{
-			return false;
-		}
-#endif
-    } 
-    while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); 
-
-    v.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
-    return true;
-}
-
-
-
-
-bool common_point(const DT_Convex& a, const DT_Convex& b,
-                  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
-	DT_GJK gjk;
-
-#ifdef STATISTICS
-    num_iterations = 0;
-#endif
-
-	MT_Scalar dist2 = MT_INFINITY;
-
-    do
-	{
-		MT_Point3  p = a.support(-v);	
-		MT_Point3  q = b.support(v);
-		MT_Vector3 w = p - q; 
-		
-        if (v.dot(w) > MT_Scalar(0.0)) 
-		{
-			return false;
-		}
- 
-		gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
-        ++num_iterations;
-#endif
-        if (!gjk.closest(v)) 
-		{
-#ifdef STATISTICS
-            ++num_irregularities;
-#endif
-            return false;
-        }		
-		
-#ifdef SAFE_EXIT
-		MT_Scalar prev_dist2 = dist2;
-#endif
-
-		dist2 = v.length2();
-
-#ifdef SAFE_EXIT
-		if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) 
-		{
-			return false;
-		}
-#endif
-    }
-    while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); 
-    
-	gjk.compute_points(pa, pb);
-
-    v.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
-    return true;
-}
-
-
-
-
-
-
-	
-bool penetration_depth(const DT_Convex& a, const DT_Convex& b,
-                       MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
-	DT_GJK gjk;
-
-#ifdef STATISTICS
-    num_iterations = 0;
-#endif
-
-	MT_Scalar dist2 = MT_INFINITY;
-
-    do
-	{
-		MT_Point3  p = a.support(-v);	
-		MT_Point3  q = b.support(v);
-		MT_Vector3 w = p - q; 
-		
-        if (v.dot(w) > MT_Scalar(0.0)) 
-		{
-			return false;
-		}
- 
-		gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
-        ++num_iterations;
-#endif
-        if (!gjk.closest(v)) 
-		{
-#ifdef STATISTICS
-            ++num_irregularities;
-#endif
-            return false;
-        }		
-		
-#ifdef SAFE_EXIT
-		MT_Scalar prev_dist2 = dist2;
-#endif
-
-		dist2 = v.length2();
-
-#ifdef SAFE_EXIT
-		if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) 
-		{
-			return false;
-		}
-#endif
-    }
-    while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); 
-    
-
-	return penDepth(gjk, a, b, v, pa, pb);
-
-}
-
-bool hybrid_penetration_depth(const DT_Convex& a, MT_Scalar a_margin, 
-							  const DT_Convex& b, MT_Scalar b_margin,
-                              MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
-	MT_Scalar margin = a_margin + b_margin;
-	if (margin > MT_Scalar(0.0))
-	{
-		MT_Scalar margin2 = margin * margin;
-
-		DT_GJK gjk;
-
-#ifdef STATISTICS
-		num_iterations = 0;
-#endif
-		MT_Scalar dist2 = MT_INFINITY;
-
-		do
-		{
-			MT_Point3  p = a.support(-v);	
-			MT_Point3  q = b.support(v);
-			
-			MT_Vector3 w = p - q; 
-			
-			MT_Scalar delta = v.dot(w);
-			
-			if (delta > MT_Scalar(0.0) && delta * delta > dist2 * margin2) 
-			{
-				return false;
-			}
-			
-			if (gjk.inSimplex(w) || dist2 - delta <= dist2 * DT_Accuracy::rel_error2)
-			{
-				gjk.compute_points(pa, pb);
-				MT_Scalar s = MT_sqrt(dist2);
-				assert(s > MT_Scalar(0.0));
-				pa -= v * (a_margin / s);
-				pb += v * (b_margin / s);
-				return true;
-			}
-			
-			gjk.addVertex(w, p, q);
-			
-#ifdef STATISTICS
-			++num_iterations;
-#endif
-			if (!gjk.closest(v)) 
-			{
-#ifdef STATISTICS
-				++num_irregularities;
-#endif
-				gjk.compute_points(pa, pb);
-				MT_Scalar s = MT_sqrt(dist2);
-				assert(s > MT_Scalar(0.0));
-				pa -= v * (a_margin / s);
-				pb += v * (b_margin / s);
-				return true;
-			}
-			
-#ifdef SAFE_EXIT
-			MT_Scalar prev_dist2 = dist2;
-#endif
-			
-			dist2 = v.length2();
-			
-#ifdef SAFE_EXIT
-			if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) 
-			{ 
-				gjk.backup_closest(v);
-				dist2 = v.length2();
-				gjk.compute_points(pa, pb);
-				MT_Scalar s = MT_sqrt(dist2);
-				assert(s > MT_Scalar(0.0));
-				pa -= v * (a_margin / s);
-				pb += v * (b_margin / s);
-				return true;
-			}
-#endif
-		}
-		while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); 
-		
-	}
-	// Second GJK phase. compute points on the boundary of the offset object
-	
-	return penetration_depth((a_margin > MT_Scalar(0.0) ? 
-							  static_cast(DT_Minkowski(a, DT_Sphere(a_margin))) : 
-							  static_cast(a)), 
-							 (b_margin > MT_Scalar(0.0) ? 
-							  static_cast(DT_Minkowski(b, DT_Sphere(b_margin))) : 
-							  static_cast(b)), v, pa, pb);
-}
-
-
-MT_Scalar closest_points(const DT_Convex& a, const DT_Convex& b, MT_Scalar max_dist2,
-                         MT_Point3& pa, MT_Point3& pb) 
-{
-	MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-	
-    DT_GJK gjk;
-
-#ifdef STATISTICS
-    num_iterations = 0;
-#endif
-
-	MT_Scalar dist2 = MT_INFINITY;
-
-    do
-	{
-		MT_Point3  p = a.support(-v);	
-		MT_Point3  q = b.support(v);
-		MT_Vector3 w = p - q; 
-
-		MT_Scalar delta = v.dot(w);
-		if (delta > MT_Scalar(0.0) && delta * delta > dist2 * max_dist2) 
-		{
-			return MT_INFINITY;
-		}
-
-		if (gjk.inSimplex(w) || dist2 - delta <= dist2 * DT_Accuracy::rel_error2) 
-		{
-            break;
-		}
-
-		gjk.addVertex(w, p, q);
-
-#ifdef STATISTICS
-        ++num_iterations;
-        if (num_iterations > 1000) 
-		{
-			std::cout << "v: " << v << " w: " << w << std::endl;
-		}
-#endif
-        if (!gjk.closest(v)) 
-		{
-#ifdef STATISTICS
-            ++num_irregularities;
-#endif
-            break;
-        }
-
-#ifdef SAFE_EXIT
-		MT_Scalar prev_dist2 = dist2;
-#endif
-
-		dist2 = v.length2();
-
-#ifdef SAFE_EXIT
-		if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) 
-		{
-         gjk.backup_closest(v);
-         dist2 = v.length2();
-			break;
-		}
-#endif
-    }
-    while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); 
-
-	assert(!gjk.emptySimplex());
-	
-	if (dist2 <= max_dist2)
-	{
-		gjk.compute_points(pa, pb);
-	}
-	
-	return dist2;
-}
diff --git a/extern/solid/src/convex/DT_Convex.h b/extern/solid/src/convex/DT_Convex.h
deleted file mode 100644
index dd620ac8b98..00000000000
--- a/extern/solid/src/convex/DT_Convex.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CONVEX_H
-#define DT_CONVEX_H
-
-#include "DT_Shape.h"
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-
-#include "MT_Matrix3x3.h"
-#include "MT_Transform.h"
-
-class DT_Convex : public DT_Shape {
-public:
-    virtual ~DT_Convex() {}
-	virtual DT_ShapeType getType() const { return CONVEX; } 
-    
-	virtual MT_Scalar supportH(const MT_Vector3& v) const {	return v.dot(support(v)); }
-    virtual MT_Point3 support(const MT_Vector3& v) const = 0;
-	virtual MT_BBox bbox() const;
-    virtual MT_BBox bbox(const MT_Matrix3x3& basis) const;
-    virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin = MT_Scalar(0.0)) const;
-	virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& param, MT_Vector3& normal) const;
-	
-protected:
-	DT_Convex() {}
-};
-
-
-bool intersect(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v);
-
-bool common_point(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-MT_Scalar closest_points(const DT_Convex&, const DT_Convex&, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb);
-
-bool penetration_depth(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-bool hybrid_penetration_depth(const DT_Convex& a, MT_Scalar a_margin, 
-							  const DT_Convex& b, MT_Scalar b_margin,
-                              MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-#endif
diff --git a/extern/solid/src/convex/DT_Cylinder.cpp b/extern/solid/src/convex/DT_Cylinder.cpp
deleted file mode 100644
index cff5ebcefb1..00000000000
--- a/extern/solid/src/convex/DT_Cylinder.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Cylinder.h"
-
-MT_Point3 DT_Cylinder::support(const MT_Vector3& v) const 
-{
-    MT_Scalar s = MT_sqrt(v[0] * v[0] + v[2] * v[2]);
-    if (s != MT_Scalar(0.0))
-	{
-        MT_Scalar d = radius / s;  
-        return MT_Point3(v[0] * d, v[1] < 0.0 ? -halfHeight : halfHeight, v[2] * d);
-    }
-    else
-	{
-        return MT_Point3(radius, v[1] < 0.0 ? -halfHeight : halfHeight, MT_Scalar(0.0));
-    }
-}
-  
diff --git a/extern/solid/src/convex/DT_Cylinder.h b/extern/solid/src/convex/DT_Cylinder.h
deleted file mode 100644
index 2a0c07fd579..00000000000
--- a/extern/solid/src/convex/DT_Cylinder.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_CYLINDER_H
-#define DT_CYLINDER_H
-
-#include "DT_Convex.h"
-
-class DT_Cylinder : public DT_Convex {
-public:
-    DT_Cylinder(MT_Scalar r, MT_Scalar h) : 
-        radius(r), 
-        halfHeight(h * MT_Scalar(0.5)) {}
-    
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-    
-protected:
-    MT_Scalar radius;
-    MT_Scalar halfHeight;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Facet.cpp b/extern/solid/src/convex/DT_Facet.cpp
deleted file mode 100644
index 87ae5c3e0be..00000000000
--- a/extern/solid/src/convex/DT_Facet.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Facet.h"
-
-bool DT_Facet::link(int edge0, DT_Facet *facet, int edge1) 
-{
-    m_adjFacets[edge0] = facet;
-    m_adjEdges[edge0] = edge1;
-    facet->m_adjFacets[edge1] = this;
-    facet->m_adjEdges[edge1] = edge0;
-
-    bool b = m_indices[edge0] == facet->m_indices[incMod3(edge1)] &&
-	m_indices[incMod3(edge0)] == facet->m_indices[edge1];
-    return b;
-}
-
-bool DT_Facet::computeClosest(const MT_Vector3 *verts)
-{
-    const MT_Vector3& p0 = verts[m_indices[0]]; 
-
-    MT_Vector3 v1 = verts[m_indices[1]] - p0;
-    MT_Vector3 v2 = verts[m_indices[2]] - p0;
-    MT_Scalar v1dv1 = v1.length2();
-    MT_Scalar v1dv2 = v1.dot(v2);
-    MT_Scalar v2dv2 = v2.length2();
-    MT_Scalar p0dv1 = p0.dot(v1); 
-    MT_Scalar p0dv2 = p0.dot(v2);
-    
-    m_det = v1dv1 * v2dv2 - v1dv2 * v1dv2; // non-negative
-    m_lambda1 = p0dv2 * v1dv2 - p0dv1 * v2dv2;
-    m_lambda2 = p0dv1 * v1dv2 - p0dv2 * v1dv1; 
-    
-    if (m_det > MT_Scalar(0.0)) {	
-	m_closest = p0 + (m_lambda1 * v1 + m_lambda2 * v2) / m_det;
-	m_dist2 = m_closest.length2();
-	return true;
-    }
-    
-    return false;
-} 
-
-void DT_Facet::silhouette(int index, const MT_Vector3& w, 
-			  DT_EdgeBuffer& edgeBuffer) 
-{
-    if (!m_obsolete) {
-		if (m_closest.dot(w) < m_dist2) {
-			edgeBuffer.push_back(DT_Edge(this, index));
-		}	
-	else {
-	    m_obsolete = true; // Facet is visible 
-	    int next = incMod3(index);
-	    m_adjFacets[next]->silhouette(m_adjEdges[next], w, edgeBuffer);
-	    next = incMod3(next);
-	    m_adjFacets[next]->silhouette(m_adjEdges[next], w, edgeBuffer);
-	}
-    }
-}
-
-
diff --git a/extern/solid/src/convex/DT_Facet.h b/extern/solid/src/convex/DT_Facet.h
deleted file mode 100644
index 873706346b8..00000000000
--- a/extern/solid/src/convex/DT_Facet.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_FACET_H
-#define DT_FACET_H
-
-#include 
-#include 
-
-#include 
-#include 
-
-class DT_Facet;
-
-
-class DT_Edge {
-public:
-    DT_Edge() {}
-    DT_Edge(DT_Facet *facet, int index) : 
-	m_facet(facet), 
-	m_index(index) {}
-
-    DT_Facet *getFacet() const { return m_facet; }
-    int       getIndex() const { return m_index; }
-
-    int getSource() const;
-    int getTarget() const;
-
-private:    
-    DT_Facet *m_facet;
-    int       m_index;
-};
-
-typedef std::vector DT_EdgeBuffer;
-
-
-class DT_Facet {
-public:
-    DT_Facet() {}
-    DT_Facet(int i0, int i1, int i2) 
-	  :	m_obsolete(false) 
-    {
-		m_indices[0] = i0; 
-		m_indices[1] = i1; 
-		m_indices[2] = i2;
-    }
-	
-    int operator[](int i) const { return m_indices[i]; } 
-
-    bool link(int edge0, DT_Facet *facet, int edge1);
-
-    
-    bool isObsolete() const { return m_obsolete; }
-    
-
-    bool computeClosest(const MT_Vector3 *verts);
-    
-    const MT_Vector3& getClosest() const { return m_closest; } 
-    
-    bool isClosestInternal() const
-	{ 
-		return m_lambda1 >= MT_Scalar(0.0) && 
-			m_lambda2 >= MT_Scalar(0.0) && 
-			m_lambda1 + m_lambda2 <= m_det;
-    } 
-
-    MT_Scalar getDist2() const { return m_dist2; }
-	
-    MT_Point3 getClosestPoint(const MT_Point3 *points) const 
-	{
-		const MT_Point3& p0 = points[m_indices[0]];
-		
-		return p0 + (m_lambda1 * (points[m_indices[1]] - p0) + 
-					 m_lambda2 * (points[m_indices[2]] - p0)) / m_det;
-    }
-    
-    void silhouette(const MT_Vector3& w, DT_EdgeBuffer& edgeBuffer) 
-	{
-		edgeBuffer.clear();
-		m_obsolete = true;
-		m_adjFacets[0]->silhouette(m_adjEdges[0], w, edgeBuffer);
-		m_adjFacets[1]->silhouette(m_adjEdges[1], w, edgeBuffer);
-		m_adjFacets[2]->silhouette(m_adjEdges[2], w, edgeBuffer);
-    }
-	
-private:
-    void silhouette(int index, const MT_Vector3& w, DT_EdgeBuffer& edgeBuffer);
-	
-    int         m_indices[3];
-    bool        m_obsolete;
-    DT_Facet   *m_adjFacets[3];
-    int         m_adjEdges[3];
-	
-    MT_Scalar   m_det;
-    MT_Scalar   m_lambda1;
-    MT_Scalar   m_lambda2;
-    MT_Vector3  m_closest;
-    MT_Scalar   m_dist2;
-};
-
-
-inline int incMod3(int i) { return ++i % 3; } 
-
-inline int DT_Edge::getSource() const 
-{
-    return (*m_facet)[m_index];
-}
-
-inline int DT_Edge::getTarget() const 
-{
-    return (*m_facet)[incMod3(m_index)];
-}
-
-#endif
diff --git a/extern/solid/src/convex/DT_GJK.h b/extern/solid/src/convex/DT_GJK.h
deleted file mode 100644
index d8f44acf85e..00000000000
--- a/extern/solid/src/convex/DT_GJK.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_GJK_H
-#define DT_GJK_H
-
-//#define USE_BACKUP_PROCEDURE
-#define JOHNSON_ROBUST
-#define FAST_CLOSEST
-
-#include "MT_Point3.h"
-#include "MT_Vector3.h"
-#include "GEN_MinMax.h"
-#include "DT_Accuracy.h"
-
-
-class DT_GJK {
-private:
-	typedef unsigned int T_Bits;
-	inline static bool subseteq(T_Bits a, T_Bits b) { return (a & b) == a; }
-	inline static bool contains(T_Bits a, T_Bits b) { return (a & b) != 0x0; }
-
-public:
-	DT_GJK() :
-		m_bits(0x0),
-		m_all_bits(0x0)
-	{}
-
-	bool emptySimplex() const { return m_bits == 0x0; }
-	bool fullSimplex() const { return m_bits == 0xf; }
-
-	void reset() 
-	{
-		m_bits = 0x0;
-		m_all_bits = 0x0;	
-	}
-
-	bool inSimplex(const MT_Vector3& w) 
-	{
-		int i;
-		T_Bits bit;
-		for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
-		{
-			if (contains(m_all_bits, bit) && w == m_y[i])
-			{
-				return true;
-			}
-		}
-		return false;
-	}
-
-	void addVertex(const MT_Vector3& w) 
-	{
-		assert(!fullSimplex());
-		m_last = 0;
-        m_last_bit = 0x1;
-        while (contains(m_bits, m_last_bit)) 
-		{ 
-			++m_last; 
-			m_last_bit <<= 1; 
-		}
-		m_y[m_last] = w;
-		m_ylen2[m_last] = w.length2();
-        m_all_bits = m_bits | m_last_bit;
-
-		update_cache();
-		compute_det();
-	}
-
-	void addVertex(const MT_Vector3& w, const MT_Point3& p, const MT_Point3& q)
-	{
-		addVertex(w);
-		m_p[m_last] = p;
-		m_q[m_last] = q;
-	}
-
-	int getSimplex(MT_Point3 *pBuf, MT_Point3 *qBuf, MT_Vector3 *yBuf) const 
-	{
-		int num_verts = 0;
-		int i;
-		T_Bits bit;
-		for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) 
-		{
-			if (contains(m_bits, bit)) 
-			{
-				pBuf[num_verts] = m_p[i];
-				qBuf[num_verts] = m_q[i];
-				yBuf[num_verts] = m_y[i];
-				
-#ifdef DEBUG
-				std::cout << "Point " << i << " = " << m_y[i] << std::endl;
-#endif
-				
-				++num_verts;
-			}
-		}
-		return num_verts;
-    }
-
-	void compute_points(MT_Point3& p1, MT_Point3& p2) 
-	{
-		MT_Scalar sum = MT_Scalar(0.0);
-		p1.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-		p2.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-		int i;
-		T_Bits bit;
-		for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) 
-		{
-			if (contains(m_bits, bit))
-			{
-				sum += m_det[m_bits][i];
-				p1 += m_p[i] * m_det[m_bits][i];
-				p2 += m_q[i] * m_det[m_bits][i];
-			}
-		}
-
-		assert(sum > MT_Scalar(0.0));
-		MT_Scalar s = MT_Scalar(1.0) / sum;
-		p1 *= s;
-		p2 *= s;
-	}
-
-	bool closest(MT_Vector3& v) 
-	{
-#ifdef FAST_CLOSEST
-		T_Bits s;
-		for (s = m_bits; s != 0x0; --s)
-		{
-			if (subseteq(s, m_bits) && valid(s | m_last_bit)) 
-			{
-				m_bits = s | m_last_bit;
-				compute_vector(m_bits, v);
-				return true;
-			}
-		}
-		if (valid(m_last_bit)) 
-		{
-			m_bits = m_last_bit;
-			m_maxlen2 = m_ylen2[m_last];
-			v = m_y[m_last];
-			return true;
-		}
-#else
-		T_Bits s;
-		for (s = m_all_bits; s != 0x0; --s)
-		{
-			if (subseteq(s, m_all_bits) && valid(s)) 
-			{
-				m_bits = s;
-				compute_vector(m_bits, v);
-				return true;
-			}
-		}
-#endif
-		
-		// Original GJK calls the backup procedure at this point.
-#ifdef USE_BACKUP_PROCEDURE
-		backup_closest(MT_Vector3& v); 
-#endif
-		return false;  
-	}
-
-	void backup_closest(MT_Vector3& v)
-	{ 		
-		MT_Scalar min_dist2 = MT_INFINITY;
-		
-      T_Bits s;
-		for (s = m_all_bits; s != 0x0; --s) 
-		{
-			if (subseteq(s, m_all_bits) && proper(s))
-			{	
-				MT_Vector3 u;
-				compute_vector(s, u);
-				MT_Scalar dist2 = u.length2();
-				if (dist2 < min_dist2)
-				{
-					min_dist2 = dist2;
-					m_bits = s;
-					v = u;
-				}
-			}
-		}
-	}
-	
-	MT_Scalar maxVertex() { return m_maxlen2; }
-
-
-private:
-	void update_cache();
-	void compute_det();
-
-	bool valid(T_Bits s) 
-	{
-		int i;
-		T_Bits bit;
-		for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
-		{
-			if (contains(m_all_bits, bit)) 
-			{
-				if (contains(s, bit)) 
-				{
-					if (m_det[s][i] <= MT_Scalar(0.0)) 
-					{
-						return false; 
-					}
-				}
-				else if (m_det[s | bit][i] > MT_Scalar(0.0))
-				{ 
-					return false;
-				}
-			}
-		}
-		return true;
-	}
-
-	bool proper(T_Bits s)
-	{ 
-		int i;
-		T_Bits bit;
-		for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
-		{
-			if (contains(s, bit) && m_det[s][i] <= MT_Scalar(0.0))
-			{
-				return false; 
-			}
-		}
-		return true;
-	}
-
-	void compute_vector(T_Bits s, MT_Vector3& v) 
-	{
-		m_maxlen2 = MT_Scalar(0.0);
-		MT_Scalar sum = MT_Scalar(0.0);
-		v .setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-
-		int i;
-		T_Bits bit;
-		for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) 
-		{
-			if (contains(s, bit))
-			{
-				sum += m_det[s][i];
-				GEN_set_max(m_maxlen2, m_ylen2[i]);
-				v += m_y[i] * m_det[s][i];
-			}
-		}
-		
-		assert(sum > MT_Scalar(0.0));
-
-		v /= sum;
-	}
- 
-private:
-	MT_Scalar	m_det[16][4]; // cached sub-determinants
-    MT_Vector3	m_edge[4][4];
-
-#ifdef JOHNSON_ROBUST
-    MT_Scalar	m_norm[4][4];
-#endif
-
-	MT_Point3	m_p[4];    // support points of object A in local coordinates 
-	MT_Point3	m_q[4];    // support points of object B in local coordinates 
-	MT_Vector3	m_y[4];   // support points of A - B in world coordinates
-	MT_Scalar	m_ylen2[4];   // Squared lengths support points y
-
-	MT_Scalar	m_maxlen2; // Maximum squared length to a vertex of the current 
-	                      // simplex
-	T_Bits		m_bits;      // identifies current simplex
-	T_Bits		m_last;      // identifies last found support point
-	T_Bits		m_last_bit;  // m_last_bit == 0x1 << last
-	T_Bits		m_all_bits;  // m_all_bits == m_bits  | m_last_bit 
-};
-
-
-
-
-inline void DT_GJK::update_cache() 
-{
-	int i;
-	T_Bits bit;
-    for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1)
-	{
-        if (contains(m_bits, bit)) 
-		{
-			m_edge[i][m_last] = m_y[i] - m_y[m_last];
-			m_edge[m_last][i] = -m_edge[i][m_last];
-
-#ifdef JOHNSON_ROBUST
-			m_norm[i][m_last] = m_norm[m_last][i] = m_edge[i][m_last].length2();
-#endif
-
-		}
-	}
-}
-
-#ifdef JOHNSON_ROBUST
-
-inline void DT_GJK::compute_det() 
-{
-    m_det[m_last_bit][m_last] = 1;
-
-	int i;
-	T_Bits si;
-    for (i = 0, si = 0x1; i < 4; ++i, si <<= 1) 
-	{
-        if (contains(m_bits, si)) 
-		{
-            T_Bits s2 = si | m_last_bit;
-            m_det[s2][i] = m_edge[m_last][i].dot(m_y[m_last]); 
-            m_det[s2][m_last] = m_edge[i][m_last].dot(m_y[i]);
-
-			int j;
-			T_Bits sj;
-            for (j = 0, sj = 0x1; j < i; ++j, sj <<= 1) 
-			{
-                if (contains(m_bits, sj)) 
-				{
-					int k;
-                    T_Bits s3 = sj | s2;			
-					
-					k = m_norm[i][j] < m_norm[m_last][j] ? i : m_last;
-                    m_det[s3][j] = m_det[s2][i] * m_edge[k][j].dot(m_y[i]) + 
-                                   m_det[s2][m_last] * m_edge[k][j].dot(m_y[m_last]);
-					k = m_norm[j][i] < m_norm[m_last][i] ? j : m_last;
-                    m_det[s3][i] = m_det[sj|m_last_bit][j] * m_edge[k][i].dot(m_y[j]) +  
-                                   m_det[sj|m_last_bit][m_last] * m_edge[k][i].dot(m_y[m_last]);
-					k = m_norm[i][m_last] < m_norm[j][m_last] ? i : j;
-                    m_det[s3][m_last] = m_det[sj|si][j] * m_edge[k][m_last].dot(m_y[j]) + 
-                                        m_det[sj|si][i] * m_edge[k][m_last].dot(m_y[i]);
-                }
-            }
-        }
-    }
-
-    if (m_all_bits == 0xf) 
-	{
-		int k;
-
-		k = m_norm[1][0] < m_norm[2][0] ? (m_norm[1][0] < m_norm[3][0] ? 1 : 3) : (m_norm[2][0] < m_norm[3][0] ? 2 : 3);
-		
-        m_det[0xf][0] = m_det[0xe][1] * m_edge[k][0].dot(m_y[1]) + 
-                        m_det[0xe][2] * m_edge[k][0].dot(m_y[2]) + 
-                        m_det[0xe][3] * m_edge[k][0].dot(m_y[3]);
-
-		k = m_norm[0][1] < m_norm[2][1] ? (m_norm[0][1] < m_norm[3][1] ? 0 : 3) : (m_norm[2][1] < m_norm[3][1] ? 2 : 3);
-		
-        m_det[0xf][1] = m_det[0xd][0] * m_edge[k][1].dot(m_y[0]) + 
-                        m_det[0xd][2] * m_edge[k][1].dot(m_y[2]) +
-                        m_det[0xd][3] * m_edge[k][1].dot(m_y[3]);
-
-		k = m_norm[0][2] < m_norm[1][2] ? (m_norm[0][2] < m_norm[3][2] ? 0 : 3) : (m_norm[1][2] < m_norm[3][2] ? 1 : 3);
-		
-        m_det[0xf][2] = m_det[0xb][0] * m_edge[k][2].dot(m_y[0]) + 
-                        m_det[0xb][1] * m_edge[k][2].dot(m_y[1]) +  
-                        m_det[0xb][3] * m_edge[k][2].dot(m_y[3]);
-
-		k = m_norm[0][3] < m_norm[1][3] ? (m_norm[0][3] < m_norm[2][3] ? 0 : 2) : (m_norm[1][3] < m_norm[2][3] ? 1 : 2);
-		
-        m_det[0xf][3] = m_det[0x7][0] * m_edge[k][3].dot(m_y[0]) + 
-                        m_det[0x7][1] * m_edge[k][3].dot(m_y[1]) + 
-                        m_det[0x7][2] * m_edge[k][3].dot(m_y[2]);
-    }
-}
-
-#else
-
-inline void DT_GJK::compute_det() 
-{
-    m_det[m_last_bit][m_last] = 1;
-
-	int i;
-	T_Bits si;
-    for (i = 0, si = 0x1; i < 4; ++i, si <<= 1) 
-	{
-        if (contains(m_bits, si)) 
-		{
-            T_Bits s2 = si | m_last_bit;
-            m_det[s2][i] = m_edge[m_last][i].dot(m_y[m_last]); 
-            m_det[s2][m_last] = m_edge[i][m_last].dot(m_y[i]);
-
-			int j;
-			T_Bits sj;
-            for (j = 0, sj = 0x1; j < i; ++j, sj <<= 1)
-			{
-                if (contains(m_bits, sj)) 
-				{
-                    T_Bits s3 = sj | s2;
-                    m_det[s3][j] = m_det[s2][i] * m_edge[i][j].dot(m_y[i]) + 
-                                   m_det[s2][m_last] * m_edge[i][j].dot(m_y[m_last]);
-                    m_det[s3][i] = m_det[sj|m_last_bit][j] * m_edge[j][i].dot(m_y[j]) +  
-                                   m_det[sj|m_last_bit][m_last] * m_edge[j][i].dot(m_y[m_last]);
-                    m_det[s3][m_last] = m_det[sj|si][j] * m_edge[j][m_last].dot(m_y[j]) + 
-                                        m_det[sj|si][i] * m_edge[j][m_last].dot(m_y[i]);
-                }
-            }
-        }
-    }
-
-    if (m_all_bits == 0xf) 
-	{
-        m_det[0xf][0] = m_det[0xe][1] * m_edge[1][0].dot(m_y[1]) + 
-                        m_det[0xe][2] * m_edge[1][0].dot(m_y[2]) + 
-                        m_det[0xe][3] * m_edge[1][0].dot(m_y[3]);
-        m_det[0xf][1] = m_det[0xd][0] * m_edge[0][1].dot(m_y[0]) + 
-                        m_det[0xd][2] * m_edge[0][1].dot(m_y[2]) +
-                        m_det[0xd][3] * m_edge[0][1].dot(m_y[3]);
-        m_det[0xf][2] = m_det[0xb][0] * m_edge[0][2].dot(m_y[0]) + 
-                        m_det[0xb][1] * m_edge[0][2].dot(m_y[1]) +  
-                        m_det[0xb][3] * m_edge[0][2].dot(m_y[3]);
-        m_det[0xf][3] = m_det[0x7][0] * m_edge[0][3].dot(m_y[0]) + 
-                        m_det[0x7][1] * m_edge[0][3].dot(m_y[1]) + 
-                        m_det[0x7][2] * m_edge[0][3].dot(m_y[2]);
-    }
-}
-
-#endif
-
-#endif
diff --git a/extern/solid/src/convex/DT_Hull.h b/extern/solid/src/convex/DT_Hull.h
deleted file mode 100644
index a5bf56ae59d..00000000000
--- a/extern/solid/src/convex/DT_Hull.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_HULL_H
-#define DT_HULL_H
-
-#include "DT_Convex.h"
-
-class DT_Hull : public DT_Convex {
-public:
-	DT_Hull(const DT_Convex& lchild, const DT_Convex& rchild) :
-		m_lchild(lchild), 
-		m_rchild(rchild) 
-	{}
-
-	virtual MT_Scalar supportH(const MT_Vector3& v) const 
-	{
-		return GEN_max(m_lchild.supportH(v), m_rchild.supportH(v));
-	}
-
-	virtual MT_Point3 support(const MT_Vector3& v) const 
-	{
-		MT_Point3 lpnt = m_lchild.support(v);
-		MT_Point3 rpnt = m_rchild.support(v);
-		return v.dot(lpnt) > v.dot(rpnt) ? lpnt : rpnt;
-	}
-
-private:
-	const DT_Convex& m_lchild;
-	const DT_Convex& m_rchild;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_IndexArray.h b/extern/solid/src/convex/DT_IndexArray.h
deleted file mode 100644
index 95551fa8483..00000000000
--- a/extern/solid/src/convex/DT_IndexArray.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_INDEXARRAY_H
-#define DT_INDEXARRAY_H
-
-#include "SOLID_types.h"
-#include "DT_Array.h"
-
-typedef DT_Array DT_IndexArray;
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_LineSegment.cpp b/extern/solid/src/convex/DT_LineSegment.cpp
deleted file mode 100644
index 6c7ccf6b9b7..00000000000
--- a/extern/solid/src/convex/DT_LineSegment.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_LineSegment.h"
-
-MT_Scalar DT_LineSegment::supportH(const MT_Vector3& v) const
-{
-    return GEN_max(v.dot(m_source), v.dot(m_target));
-}
-
-MT_Point3 DT_LineSegment::support(const MT_Vector3& v) const
-{
-    return v.dot(m_source) > v.dot(m_target) ?	m_source : m_target;
-}
-
-
diff --git a/extern/solid/src/convex/DT_LineSegment.h b/extern/solid/src/convex/DT_LineSegment.h
deleted file mode 100644
index 979ff8a18a9..00000000000
--- a/extern/solid/src/convex/DT_LineSegment.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_LINESEGMENT_H
-#define DT_LINESEGMENT_H
-
-#include "DT_Convex.h"
-
-class DT_LineSegment : public DT_Convex {
-public:
-    DT_LineSegment(const MT_Point3& source, const MT_Point3& target) : 
-	   m_source(source), 
-	   m_target(target) {}
-
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-
-	const MT_Point3& getSource() const { return m_source; }
-	const MT_Point3& getTarget() const { return m_target; }
-
-private:
-	MT_Point3 m_source;
-	MT_Point3 m_target;
-};
-
-#endif
-
-
-
-
-
-
diff --git a/extern/solid/src/convex/DT_Minkowski.h b/extern/solid/src/convex/DT_Minkowski.h
deleted file mode 100644
index e90fed6a8e0..00000000000
--- a/extern/solid/src/convex/DT_Minkowski.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_MINKOWSKI_H
-#define DT_MINKOWSKI_H
-
-#include "DT_Convex.h"
-
-class DT_Minkowski : public DT_Convex {
-public:
-	DT_Minkowski(const DT_Convex& lchild, const DT_Convex& rchild) 
-     : m_lchild(lchild), 
-       m_rchild(rchild) 
-   {}
-
-	virtual MT_Scalar supportH(const MT_Vector3& v) const 
-	{
-		return m_lchild.supportH(v) + m_rchild.supportH(v); 
-	}
-
-	virtual MT_Point3 support(const MT_Vector3& v) const 
-	{
-		return m_lchild.support(v) + (MT_Vector3)m_rchild.support(v); 
-	}
-
-private:
-	const DT_Convex& m_lchild;
-	const DT_Convex& m_rchild;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_PenDepth.cpp b/extern/solid/src/convex/DT_PenDepth.cpp
deleted file mode 100644
index e1c5c9a3949..00000000000
--- a/extern/solid/src/convex/DT_PenDepth.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_PenDepth.h"
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-#include "MT_Quaternion.h"
-#include "DT_Convex.h"
-#include "DT_GJK.h"
-#include "DT_Facet.h"
-
-//#define DEBUG
-
-const int       MaxSupportPoints = 1000;
-const int       MaxFacets         = 2000;
-
-static MT_Point3  pBuf[MaxSupportPoints];
-static MT_Point3  qBuf[MaxSupportPoints];
-static MT_Vector3 yBuf[MaxSupportPoints];
-
-static DT_Facet facetBuf[MaxFacets];
-static int  freeFacet = 0;
-static DT_Facet *facetHeap[MaxFacets];
-static int  num_facets;
-
-class DT_FacetComp {
-public:
-    
-    bool operator()(const DT_Facet *face1, const DT_Facet *face2) 
-	{ 
-		return face1->getDist2() > face2->getDist2();
-    }
-    
-} facetComp;
-
-inline DT_Facet *addFacet(int i0, int i1, int i2,
-						  MT_Scalar lower2, MT_Scalar upper2) 
-{
-    assert(i0 != i1 && i0 != i2 && i1 != i2);
-    if (freeFacet < MaxFacets)
-	{
-		DT_Facet *facet = new(&facetBuf[freeFacet++]) DT_Facet(i0, i1, i2);
-#ifdef DEBUG
-		std::cout << "Facet " << i0 << ' ' << i1 << ' ' << i2;
-#endif
-		if (facet->computeClosest(yBuf)) 
-		{
-			if (facet->isClosestInternal() && 
-				lower2 <= facet->getDist2() && facet->getDist2() <= upper2) 
-			{
-				facetHeap[num_facets++] = facet;
-				std::push_heap(&facetHeap[0], &facetHeap[num_facets], facetComp);
-#ifdef DEBUG
-				std::cout << " accepted" << std::endl;
-#endif
-			}
-			else 
-			{
-#ifdef DEBUG
-				std::cout << " rejected, ";
-				if (!facet->isClosestInternal()) 
-				{
-					std::cout << "closest point not internal";
-				}
-				else if (lower2 > facet->getDist2()) 
-				{
-					std::cout << "facet is closer than orignal facet";
-				}
-				else 
-				{
-					std::cout << "facet is further than upper bound";
-				}
-				std::cout << std::endl;
-#endif
-			}
-			
-			return facet;
-		}
-    }
-    
-    return 0;
-}
-
-inline bool originInTetrahedron(const MT_Vector3& p1, const MT_Vector3& p2, 
-								const MT_Vector3& p3, const MT_Vector3& p4)
-{
-    MT_Vector3 normal1 = (p2 - p1).cross(p3 - p1);
-    MT_Vector3 normal2 = (p3 - p2).cross(p4 - p2);
-    MT_Vector3 normal3 = (p4 - p3).cross(p1 - p3);
-    MT_Vector3 normal4 = (p1 - p4).cross(p2 - p4);
-    
-    return 
-		normal1.dot(p1) > MT_Scalar(0.0) != normal1.dot(p4) > MT_Scalar(0.0) &&
-		normal2.dot(p2) > MT_Scalar(0.0) != normal2.dot(p1) > MT_Scalar(0.0) &&
-		normal3.dot(p3) > MT_Scalar(0.0) != normal3.dot(p2) > MT_Scalar(0.0) &&
-		normal4.dot(p4) > MT_Scalar(0.0) != normal4.dot(p3) > MT_Scalar(0.0);
-}
-
-
-bool penDepth(const DT_GJK& gjk, const DT_Convex& a, const DT_Convex& b,
-			  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb)
-{
-	
-    int num_verts = gjk.getSimplex(pBuf, qBuf, yBuf);
-    
-    switch (num_verts) 
-	{
-	case 1:
-	    // Touching contact. Yes, we have a collision,
-	    // but no penetration.
-	    return false;
-	case 2:	
-	{
-	    // We have a line segment inside the Minkowski sum containing the
-	    // origin. Blow it up by adding three additional support points.
-	    
-	    MT_Vector3 dir  = (yBuf[1] - yBuf[0]).normalized();
-	    int        axis = dir.furthestAxis();
-	    
-	    static MT_Scalar sin_60 = MT_sqrt(MT_Scalar(3.0)) * MT_Scalar(0.5);
-	    
-	    MT_Quaternion rot(dir[0] * sin_60, dir[1] * sin_60, dir[2] * sin_60, MT_Scalar(0.5));
-	    MT_Matrix3x3 rot_mat(rot);
-	    
-	    MT_Vector3 aux1 = dir.cross(MT_Vector3(axis == 0, axis == 1, axis == 2));
-	    MT_Vector3 aux2 = rot_mat * aux1;
-	    MT_Vector3 aux3 = rot_mat * aux2;
-	    
-	    pBuf[2] = a.support(aux1);
-	    qBuf[2] = b.support(-aux1);
-	    yBuf[2] = pBuf[2] - qBuf[2];
-	    
-	    pBuf[3] = a.support(aux2);
-	    qBuf[3] = b.support(-aux2);
-	    yBuf[3] = pBuf[3] - qBuf[3];
-	    
-	    pBuf[4] = a.support(aux3);
-	    qBuf[4] = b.support(-aux3);
-	    yBuf[4] = pBuf[4] - qBuf[4];
-	    
-	    if (originInTetrahedron(yBuf[0], yBuf[2], yBuf[3], yBuf[4])) 
-		{
-			pBuf[1] = pBuf[4];
-			qBuf[1] = qBuf[4];
-			yBuf[1] = yBuf[4];
-	    }
-	    else if (originInTetrahedron(yBuf[1], yBuf[2], yBuf[3], yBuf[4])) 
-		{
-			pBuf[0] = pBuf[4];
-			qBuf[0] = qBuf[4];
-			yBuf[0] = yBuf[4];
-	    } 
-	    else 
-		{
-			// Origin not in initial polytope
-			return false;
-	    }
-	    
-	    num_verts = 4;
-	    
-	    break;
-	}
-	case 3: 
-	{
-	    // We have a triangle inside the Minkowski sum containing
-	    // the origin. First blow it up.
-	    
-	    MT_Vector3 v1     = yBuf[1] - yBuf[0];
-	    MT_Vector3 v2     = yBuf[2] - yBuf[0];
-	    MT_Vector3 vv     = v1.cross(v2);
-	    
-	    pBuf[3] = a.support(vv);
-	    qBuf[3] = b.support(-vv);
-	    yBuf[3] = pBuf[3] - qBuf[3];
-	    pBuf[4] = a.support(-vv);
-	    qBuf[4] = b.support(vv);
-	    yBuf[4] = pBuf[4] - qBuf[4];
-	    
-	   
-	    if (originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[4])) 
-		{
-			pBuf[3] = pBuf[4];
-			qBuf[3] = qBuf[4];
-			yBuf[3] = yBuf[4];
-	    }
-	    else if (!originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[3]))
-		{ 
-			// Origin not in initial polytope
-			return false;
-	    }
-	    
-	    num_verts = 4;
-	    
-	    break;
-	}
-    }
-    
-    // We have a tetrahedron inside the Minkowski sum containing
-    // the origin (if GJK did it's job right ;-)
-      
-    
-    if (!originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[3])) 
-	{
-		//	assert(false);
-		return false;
-	}
-    
-	num_facets = 0;
-    freeFacet = 0;
-
-    DT_Facet *f0 = addFacet(0, 1, 2, MT_Scalar(0.0), MT_INFINITY);
-    DT_Facet *f1 = addFacet(0, 3, 1, MT_Scalar(0.0), MT_INFINITY);
-    DT_Facet *f2 = addFacet(0, 2, 3, MT_Scalar(0.0), MT_INFINITY);
-    DT_Facet *f3 = addFacet(1, 3, 2, MT_Scalar(0.0), MT_INFINITY);
-    
-    if (!f0 || f0->getDist2() == MT_Scalar(0.0) ||
-		!f1 || f1->getDist2() == MT_Scalar(0.0) ||
-		!f2 || f2->getDist2() == MT_Scalar(0.0) ||
-		!f3 || f3->getDist2() == MT_Scalar(0.0)) 
-	{
-		return false;
-    }
-    
-    f0->link(0, f1, 2);
-    f0->link(1, f3, 2);
-    f0->link(2, f2, 0);
-    f1->link(0, f2, 2);
-    f1->link(1, f3, 0);
-    f2->link(1, f3, 1);
-    
-    if (num_facets == 0) 
-	{
-		return false;
-    }
-    
-    // at least one facet on the heap.	
-    
-    DT_EdgeBuffer edgeBuffer(20);
-
-    DT_Facet *facet = 0;
-    
-    MT_Scalar upper_bound2 = MT_INFINITY; 	
-    
-    do {
-        facet = facetHeap[0];
-        std::pop_heap(&facetHeap[0], &facetHeap[num_facets], facetComp);
-        --num_facets;
-		
-		if (!facet->isObsolete()) 
-		{
-			assert(facet->getDist2() > MT_Scalar(0.0));
-			
-			if (num_verts == MaxSupportPoints)
-			{
-#ifdef DEBUG
-				std::cout << "Ouch, no convergence!!!" << std::endl;
-#endif 
-				assert(false);	
-				break;
-			}
-			
-			pBuf[num_verts] = a.support(facet->getClosest());
-			qBuf[num_verts] = b.support(-facet->getClosest());
-			yBuf[num_verts] = pBuf[num_verts] - qBuf[num_verts];
-			
-			int index = num_verts++;
-			MT_Scalar far_dist2 = yBuf[index].dot(facet->getClosest());
-			
-			// Make sure the support mapping is OK.
-			assert(far_dist2 > MT_Scalar(0.0));
-			
-			GEN_set_min(upper_bound2, far_dist2 * far_dist2 / facet->getDist2());
-			
-			if (upper_bound2 <= DT_Accuracy::depth_tolerance * facet->getDist2()
-#define CHECK_NEW_SUPPORT
-#ifdef CHECK_NEW_SUPPORT
-				|| yBuf[index] == yBuf[(*facet)[0]] 
-				|| yBuf[index] == yBuf[(*facet)[1]]
-				|| yBuf[index] == yBuf[(*facet)[2]]
-#endif
-				) 
-			{
-				break;
-			}
-			
-			// Compute the silhouette cast by the new vertex
-			// Note that the new vertex is on the positive side
-			// of the current facet, so the current facet is will
-			// not be in the convex hull. Start local search
-			// from this facet.
-			
-			facet->silhouette(yBuf[index], edgeBuffer);
-			
-			if (edgeBuffer.empty()) 
-			{
-				return false;
-			}
-			
-			DT_EdgeBuffer::const_iterator it = edgeBuffer.begin();
-			DT_Facet *firstFacet = 
-				addFacet((*it).getTarget(), (*it).getSource(),
-						 index, facet->getDist2(), upper_bound2);
-			
-			if (!firstFacet) 
-			{
-				break;
-			}
-			
-			firstFacet->link(0, (*it).getFacet(), (*it).getIndex());
-			DT_Facet *lastFacet = firstFacet;
-			
-			++it;
-			for (; it != edgeBuffer.end(); ++it) 
-			{
-				DT_Facet *newFacet = 
-					addFacet((*it).getTarget(), (*it).getSource(),
-							 index, facet->getDist2(), upper_bound2);
-				
-				if (!newFacet) 
-				{
-					break;
-				}
-				
-				if (!newFacet->link(0, (*it).getFacet(), (*it).getIndex())) 
-				{
-					break;
-				}
-				
-				if (!newFacet->link(2, lastFacet, 1)) 
-				{
-					break;
-				}
-				
-				lastFacet = newFacet;				
-			}
-			if (it != edgeBuffer.end()) 
-			{
-				break;
-			}
-			
-			firstFacet->link(2, lastFacet, 1);
-		}
-    }
-    while (num_facets > 0 && facetHeap[0]->getDist2() <= upper_bound2);
-	
-#ifdef DEBUG    
-    std::cout << "#facets left = " << num_facets << std::endl;
-#endif
-    
-    v = facet->getClosest();
-    pa = facet->getClosestPoint(pBuf);    
-    pb = facet->getClosestPoint(qBuf);    
-    return true;
-}
-
diff --git a/extern/solid/src/convex/DT_PenDepth.h b/extern/solid/src/convex/DT_PenDepth.h
deleted file mode 100644
index 97b3c6c0e0e..00000000000
--- a/extern/solid/src/convex/DT_PenDepth.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_PENDEPTH_H
-#define DT_PENDEPTH_H
-
-#include "MT_Vector3.h"
-#include "MT_Point3.h"
-
-class DT_GJK;
-class DT_Convex;
-
-bool penDepth(const DT_GJK& gjk, const DT_Convex& a, const DT_Convex& b, 
-			  MT_Vector3& v, MT_Point3& pa, MT_Point3& pb);
-
-#endif
diff --git a/extern/solid/src/convex/DT_Point.cpp b/extern/solid/src/convex/DT_Point.cpp
deleted file mode 100644
index 770fe7775b7..00000000000
--- a/extern/solid/src/convex/DT_Point.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Point.h"
-
-MT_Scalar DT_Point::supportH(const MT_Vector3& v) const
-{
-    return v.dot(m_point);
-}
-
-MT_Point3 DT_Point::support(const MT_Vector3& v) const
-{
-    return m_point;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Point.h b/extern/solid/src/convex/DT_Point.h
deleted file mode 100644
index b35d158ee53..00000000000
--- a/extern/solid/src/convex/DT_Point.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_POINT_H
-#define DT_POINT_H
-
-#include "DT_Convex.h"
-
-class DT_Point : public DT_Convex {
-public:
-    DT_Point(const MT_Point3& point) : m_point(point) {}
-
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-
-private:
-	MT_Point3 m_point;
-};
-
-#endif
-
-
-
-
-
-
diff --git a/extern/solid/src/convex/DT_Polyhedron.cpp b/extern/solid/src/convex/DT_Polyhedron.cpp
deleted file mode 100644
index f48ac6e4b6d..00000000000
--- a/extern/solid/src/convex/DT_Polyhedron.cpp
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Polyhedron.h"
-
-#ifdef QHULL
-
-extern "C" {
-#include 
-}
-
-#include 
-#include   
-
-typedef std::vector T_VertexBuf;
-typedef std::vector T_IndexBuf;
-typedef std::vector T_MultiIndexBuf;
-
-static char options[] = "qhull Qts i Tv";
-
-#define DK_HIERARCHY
-
-T_IndexBuf *adjacency_graph(DT_Count count, const MT_Point3 *verts, const char *flags)
-{
-	int curlong, totlong, exitcode;
-	
-    facetT *facet;
-    vertexT *vertex;
-    vertexT **vertexp;
-    
-    std::vector > array;
-	T_IndexBuf index;
-    DT_Index i;
-    for (i = 0; i != count; ++i) 
-	{
-		if (flags == 0 || flags[i])
-		{
-            array.push_back(MT::Tuple3(verts[i]));
-			index.push_back(i);
-		}
-    }
-
-    qh_init_A(stdin, stdout, stderr, 0, NULL);
-    if ((exitcode = setjmp(qh errexit))) 
-	{
-		exit(exitcode);
-	}
-    qh_initflags(options);
-    qh_init_B(array[0], array.size(), 3, False);
-    qh_qhull();
-    qh_check_output();
-    
-    T_IndexBuf *indexBuf = new T_IndexBuf[count];
-    FORALLfacets 
-	{
-		setT *vertices = qh_facet3vertex(facet);
-		
-		T_IndexBuf  facetIndices;
-
-		FOREACHvertex_(vertices) 
-		{
-			facetIndices.push_back(index[qh_pointid(vertex->point)]);
-		}
-		int i, j;
-		for (i = 0, j = facetIndices.size()-1; i < (int)facetIndices.size(); j = i++)
-		{
-			indexBuf[facetIndices[j]].push_back(facetIndices[i]);
-		}
-    }
-
-    
-    qh NOerrexit = True;
-    qh_freeqhull(!qh_ALL);
-    qh_memfreeshort(&curlong, &totlong);
-
-	return indexBuf;
-}
-
-T_IndexBuf *simplex_adjacency_graph(DT_Count count, const char *flags)
-{
-	T_IndexBuf *indexBuf = new T_IndexBuf[count];
-
-	DT_Index index[4];
-	
-	DT_Index k = 0;
-	DT_Index i;
-	for (i = 0; i != count; ++i) 
-	{
-		if (flags == 0 || flags[i])
-		{
-			index[k++] = i;
-		}
-	}
-
-	assert(k <= 4);
-
-	for (i = 0; i != k; ++i)
-	{
-		DT_Index j;
-		for (j = 0; j != k; ++j)
-		{
-			if (i != j)
-			{
-				indexBuf[index[i]].push_back(index[j]);
-			}
-		}
-	}
-
-	return indexBuf;
-}
-
-#ifdef DK_HIERARCHY
-
-void prune(DT_Count count, T_MultiIndexBuf *cobound)
-{
-	DT_Index i;
-	for (i = 0; i != count; ++i)
-	{
-		assert(cobound[i].size());
-
-		DT_Index j;
-		for (j = 0; j != cobound[i].size() - 1; ++j)
-		{
-			T_IndexBuf::iterator it = cobound[i][j].begin();
-			while (it != cobound[i][j].end())
-			{
-				T_IndexBuf::iterator jt = 
-					std::find(cobound[i][j+1].begin(), cobound[i][j+1].end(), *it);
-
-				if (jt != cobound[i][j+1].end())
-				{
-					std::swap(*it, cobound[i][j].back());
-					cobound[i][j].pop_back();
-				}
-				else
-				{
-					++it;
-				}
-			}
-		}
-	}	
-}
-
-#endif
-
-DT_Polyhedron::DT_Polyhedron(const DT_VertexBase *base, DT_Count count, const DT_Index *indices)
-{
-	assert(count);
-
-	std::vector vertexBuf;
-	DT_Index i;
-	for (i = 0; i != count; ++i) 
-	{
-		vertexBuf.push_back((*base)[indices[i]]);
-	}
-
-	T_IndexBuf *indexBuf = count > 4 ? adjacency_graph(count, &vertexBuf[0], 0) : simplex_adjacency_graph(count, 0);
-	
-	std::vector pointBuf;
-	
-	for (i = 0; i != count; ++i) 
-	{
-		if (!indexBuf[i].empty()) 
-		{
-			pointBuf.push_back(vertexBuf[i]);
-		}
-	}
-			
-	delete [] indexBuf;
-
-	m_count = pointBuf.size();
-	m_verts = new MT_Point3[m_count];	
-	std::copy(pointBuf.begin(), pointBuf.end(), &m_verts[0]);
-
-	T_MultiIndexBuf *cobound = new T_MultiIndexBuf[m_count];
-    char *flags = new char[m_count];
-	std::fill(&flags[0], &flags[m_count], 1);
-
-	DT_Count num_layers = 0;
-	DT_Count layer_count = m_count;
-	while (layer_count > 4)
-	{
-		T_IndexBuf *indexBuf = adjacency_graph(m_count, m_verts, flags);
-		
-		DT_Index i;
-		for (i = 0; i != m_count; ++i) 
-		{
-			if (flags[i])
-			{
-				assert(!indexBuf[i].empty());
-				cobound[i].push_back(indexBuf[i]);
-			}
-		}
-			
-		++num_layers;
-
-		delete [] indexBuf;
-
-		std::fill(&flags[0], &flags[m_count], 0);
-
-		for (i = 0; i != m_count; ++i)
-		{
-			if (cobound[i].size() == num_layers) 
-			{
-				T_IndexBuf& curr_cobound = cobound[i].back();	
-				if (!flags[i] && curr_cobound.size() <= 8)
-				{	
-					DT_Index j;
-					for (j  = 0; j != curr_cobound.size(); ++j)
-					{
-						flags[curr_cobound[j]] = 1;
-					}
-				}
-			}
-		}
-		
-		layer_count = 0;
-		
-		for (i = 0; i != m_count; ++i)
-		{
-			if (flags[i])
-			{
-				++layer_count;
-			}
-		}	
-	}
-	
-	indexBuf = simplex_adjacency_graph(m_count, flags);
-		
-	for (i = 0; i != m_count; ++i) 
-	{
-		if (flags[i])
-		{
-			assert(!indexBuf[i].empty());
-			cobound[i].push_back(indexBuf[i]);
-		}
-	}
-	
-	++num_layers;
-
-	delete [] indexBuf;
-	delete [] flags;
-		
-
-
-#ifdef DK_HIERARCHY
-	prune(m_count, cobound);
-#endif
-
-	m_cobound = new T_MultiIndexArray[m_count];
-
-	for (i = 0; i != m_count; ++i)
-	{
-		new (&m_cobound[i]) T_MultiIndexArray(cobound[i].size());
-		
-		DT_Index j;
-		for (j = 0; j != cobound[i].size(); ++j)
-		{
-			new (&m_cobound[i][j]) DT_IndexArray(cobound[i][j].size(), &cobound[i][j][0]);
-		}
-	}
-		
-	delete [] cobound;
-
-	m_start_vertex = 0;
-	while (m_cobound[m_start_vertex].size() != num_layers) 
-	{
-		++m_start_vertex;
-		assert(m_start_vertex < m_count);
-	}
-
-	m_curr_vertex = m_start_vertex;
-} 
-
-
-DT_Polyhedron::~DT_Polyhedron() 
-{
-	delete [] m_verts;
-    delete [] m_cobound;
-}
-
-#ifdef DK_HIERARCHY
-
-MT_Scalar DT_Polyhedron::supportH(const MT_Vector3& v) const 
-{
-    m_curr_vertex = m_start_vertex;
-    MT_Scalar d = (*this)[m_curr_vertex].dot(v);
-    MT_Scalar h = d;
-	int curr_layer;
-	for (curr_layer = m_cobound[m_start_vertex].size(); curr_layer != 0; --curr_layer)
-	{
-		const DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][curr_layer-1];
-        DT_Index i;
-		for (i = 0; i != curr_cobound.size(); ++i) 
-		{
-			d = (*this)[curr_cobound[i]].dot(v);
-			if (d > h)
-			{
-				m_curr_vertex = curr_cobound[i];
-				h = d;
-			}
-		}
-	}
-	
-    return h;
-}
-
-MT_Point3 DT_Polyhedron::support(const MT_Vector3& v) const 
-{
-	m_curr_vertex = m_start_vertex;
-    MT_Scalar d = (*this)[m_curr_vertex].dot(v);
-    MT_Scalar h = d;
-	int curr_layer;
-	for (curr_layer = m_cobound[m_start_vertex].size(); curr_layer != 0; --curr_layer)
-	{
-		const DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][curr_layer-1];
-        DT_Index i;
-		for (i = 0; i != curr_cobound.size(); ++i) 
-		{
-			d = (*this)[curr_cobound[i]].dot(v);
-			if (d > h)
-			{
-				m_curr_vertex = curr_cobound[i];
-				h = d;
-			}
-		}
-	}
-	
-    return (*this)[m_curr_vertex];
-}
-
-#else
-
-MT_Scalar DT_Polyhedron::supportH(const MT_Vector3& v) const 
-{
-    int last_vertex = -1;
-    MT_Scalar d = (*this)[m_curr_vertex].dot(v);
-    MT_Scalar h = d;
-	
-	for (;;) 
-	{
-        DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][0];
-        int i = 0, n = curr_cobound.size(); 
-        while (i != n && 
-               (curr_cobound[i] == last_vertex || 
-				(d = (*this)[curr_cobound[i]].dot(v)) - h <= MT_abs(h) * MT_EPSILON)) 
-		{
-            ++i;
-		}
-		
-        if (i == n) 
-		{
-			break;
-		}
-		
-        last_vertex = m_curr_vertex;
-        m_curr_vertex = curr_cobound[i];
-        h = d;
-    }
-    return h;
-}
-
-MT_Point3 DT_Polyhedron::support(const MT_Vector3& v) const 
-{
-	int last_vertex = -1;
-    MT_Scalar d = (*this)[m_curr_vertex].dot(v);
-    MT_Scalar h = d;
-	
-    for (;;)
-	{
-        DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][0];
-        int i = 0, n = curr_cobound.size();
-        while (i != n && 
-               (curr_cobound[i] == last_vertex || 
-				(d = (*this)[curr_cobound[i]].dot(v)) - h <= MT_abs(h) * MT_EPSILON)) 
-		{
-            ++i;
-		}
-		
-        if (i == n)
-		{
-			break;
-		}
-		
-		last_vertex = m_curr_vertex;
-        m_curr_vertex = curr_cobound[i];
-        h = d;
-    }
-    return (*this)[m_curr_vertex];
-}
-
-#endif
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_Polyhedron.h b/extern/solid/src/convex/DT_Polyhedron.h
deleted file mode 100644
index 58c991bd152..00000000000
--- a/extern/solid/src/convex/DT_Polyhedron.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_POLYHEDRON_H
-#define DT_POLYHEDRON_H
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-# if HAVE_QHULL_QHULL_A_H
-#  define QHULL
-# endif
-#endif
-
-
-#ifdef QHULL
-
-#include "DT_Convex.h"
-#include "DT_IndexArray.h"
-#include "DT_VertexBase.h"
-
-class DT_Polyhedron : public DT_Convex {
-	typedef DT_Array T_MultiIndexArray;
-public:
-	DT_Polyhedron() 
-		: m_verts(0),
-		  m_cobound(0)
-	{}
-		
-	DT_Polyhedron(const DT_VertexBase *base, DT_Count count, const DT_Index *indices);
-
-	virtual ~DT_Polyhedron();
-    
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-
-	const MT_Point3& operator[](int i) const { return m_verts[i]; }
-    DT_Count numVerts() const { return m_count; }
-
-private:
-	DT_Count              m_count;
-	MT_Point3			 *m_verts;
-	T_MultiIndexArray    *m_cobound;
-    DT_Index              m_start_vertex;
-	mutable DT_Index      m_curr_vertex;
-};
-
-#else 
-
-#include "DT_Polytope.h"
-
-typedef DT_Polytope DT_Polyhedron;
-
-#endif
-
-#endif
-
diff --git a/extern/solid/src/convex/DT_Polytope.cpp b/extern/solid/src/convex/DT_Polytope.cpp
deleted file mode 100644
index e757c3bfdb4..00000000000
--- a/extern/solid/src/convex/DT_Polytope.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Polytope.h"
-
-MT_BBox DT_Polytope::bbox() const 
-{
-	MT_BBox bbox = (*this)[0];
-	DT_Index i;
-    for (i = 1; i < numVerts(); ++i) 
-	{
-        bbox = bbox.hull((*this)[i]);
-    }
-    return bbox;
-}
-
-MT_Scalar DT_Polytope::supportH(const MT_Vector3& v) const 
-{
-    int c = 0;
-    MT_Scalar h = (*this)[0].dot(v), d;
-	DT_Index i;
-    for (i = 1; i < numVerts(); ++i) 
-	{
-        if ((d = (*this)[i].dot(v)) > h) 
-		{ 
-			c = i; 
-			h = d; 
-		}
-    }
-    return h;
-}
-
-MT_Point3 DT_Polytope::support(const MT_Vector3& v) const 
-{
-    int c = 0;
-    MT_Scalar h = (*this)[0].dot(v), d;
-	DT_Index i;
-    for (i = 1; i < numVerts(); ++i)
-	{
-        if ((d = (*this)[i].dot(v)) > h)
-		{ 
-			c = i;
-			h = d; 
-		}
-    }
-    return (*this)[c];
-}
-
-
diff --git a/extern/solid/src/convex/DT_Polytope.h b/extern/solid/src/convex/DT_Polytope.h
deleted file mode 100644
index c715598defe..00000000000
--- a/extern/solid/src/convex/DT_Polytope.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_POLYTOPE_H
-#define DT_POLYTOPE_H
-
-#include "DT_Convex.h"
-#include "DT_IndexArray.h"
-#include "DT_VertexBase.h"
-
-class DT_Polytope : public DT_Convex {
-public:	
-	DT_Polytope() {}
-    DT_Polytope(const DT_VertexBase *base, DT_Count count, const DT_Index *indices) 
-	  : m_base(base), 
-		m_index(count, indices) 
-	{}
- 
-	virtual MT_BBox bbox() const;
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-
-	MT_Point3 operator[](int i) const { return (*m_base)[m_index[i]]; }
-    DT_Count numVerts() const { return m_index.size(); }
-
-protected:
-    const DT_VertexBase *m_base;
-    DT_IndexArray        m_index;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Shape.h b/extern/solid/src/convex/DT_Shape.h
deleted file mode 100644
index d48942fe515..00000000000
--- a/extern/solid/src/convex/DT_Shape.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_SHAPE_H
-#define DT_SHAPE_H
-
-#include 
-
-#include "MT_BBox.h"
-
-#include "MT_Transform.h"
-
-class DT_Object;
-
-enum DT_ShapeType {
-    COMPLEX,
-    CONVEX
-};
-
-class DT_Shape {
-public:
-    virtual ~DT_Shape() {}
-    virtual DT_ShapeType getType() const = 0;
-	virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin) const = 0;
-	virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& param, MT_Vector3& normal) const = 0;
-
-protected:
-	DT_Shape()  {}
-};
-
-typedef bool (*Intersect)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-						  const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-						  MT_Vector3&);
-
-typedef bool (*Common_point)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-						     const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-			                 MT_Vector3&, MT_Point3&, MT_Point3&);
-
-typedef bool (*Penetration_depth)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-						          const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-                                  MT_Vector3&, MT_Point3&, MT_Point3&);
-
-typedef MT_Scalar (*Closest_points)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin,
-						            const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin,
-									MT_Point3&, MT_Point3&);
-
-#endif
-
-
-
-
-
diff --git a/extern/solid/src/convex/DT_Sphere.cpp b/extern/solid/src/convex/DT_Sphere.cpp
deleted file mode 100644
index 3f2443dcf53..00000000000
--- a/extern/solid/src/convex/DT_Sphere.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#include "DT_Sphere.h"
-#include "GEN_MinMax.h"
-
-MT_Scalar DT_Sphere::supportH(const MT_Vector3& v) const 
-{
-	return m_radius * v.length();
-}
-
-MT_Point3 DT_Sphere::support(const MT_Vector3& v) const 
-{
-   MT_Scalar s = v.length();
-	
-	if (s > MT_Scalar(0.0))
-	{
-		s = m_radius / s;
-		return MT_Point3(v[0] * s, v[1] * s, v[2] * s);
-	}
-	else
-	{
-		return MT_Point3(m_radius, MT_Scalar(0.0), MT_Scalar(0.0));
-	}
-}
-
-bool DT_Sphere::ray_cast(const MT_Point3& source, const MT_Point3& target,
-						 MT_Scalar& param, MT_Vector3& normal) const 
-{
-	MT_Vector3 r = target - source;
-	MT_Scalar  delta = -source.dot(r);  
-	MT_Scalar  r_length2 = r.length2();
-	MT_Scalar  sigma = delta * delta - r_length2 * (source.length2() - m_radius * m_radius);
-
-	if (sigma >= MT_Scalar(0.0))
-		// The line trough source and target intersects the sphere.
-	{
-		MT_Scalar sqrt_sigma = MT_sqrt(sigma);
-		// We need only the sign of lambda2, so the division by the positive 
-		// r_length2 can be left out.
-		MT_Scalar lambda2 = (delta + sqrt_sigma) /* / r_length2 */ ;
-		if (lambda2 >= MT_Scalar(0.0))
-			// The ray points at the sphere
-		{
-			MT_Scalar lambda1 = (delta - sqrt_sigma) / r_length2;
-			if (lambda1 <= param)
-				// The ray hits the sphere, since 
-				// [lambda1, lambda2] overlaps [0, param]. 
-			{
-				if (lambda1 > MT_Scalar(0.0))
-				{
-					param = lambda1;
-					normal = (source + r * lambda1) / m_radius;
-					// NB: division by m_radius to normalize the normal.
-				}
-				else
-				{
-					param = MT_Scalar(0.0);
-					normal.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0));
-				}
-						
-				return true;
-			}
-		}
-	}
-
-	return false;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Sphere.h b/extern/solid/src/convex/DT_Sphere.h
deleted file mode 100644
index 92386a66f3a..00000000000
--- a/extern/solid/src/convex/DT_Sphere.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_SPHERE_H
-#define DT_SPHERE_H
-
-#include "DT_Convex.h"
-
-class DT_Sphere : public DT_Convex {
-public:
-   DT_Sphere(MT_Scalar radius) : m_radius(radius) {}
-	
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-	virtual MT_Point3 support(const MT_Vector3& v) const;
-	
-	virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target,
-						  MT_Scalar& param, MT_Vector3& normal) const;
-
-protected:
-    MT_Scalar m_radius;
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_Transform.h b/extern/solid/src/convex/DT_Transform.h
deleted file mode 100644
index a976d48d22b..00000000000
--- a/extern/solid/src/convex/DT_Transform.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_TRANSFORM_H
-#define DT_TRANSFORM_H
-
-#include "DT_Convex.h"
-
-class DT_Transform : public DT_Convex {
-public:
-	DT_Transform(const MT_Transform& xform, const DT_Convex& child) :
-		m_xform(xform), 
-		m_child(child)
-	{}
-
-	virtual MT_Scalar supportH(const MT_Vector3& v) const
-	{
-		return m_child.supportH(v * m_xform.getBasis()) + 
-			   v.dot(m_xform.getOrigin());
-	}
-
-	virtual MT_Point3 support(const MT_Vector3& v) const
-	{
-		return m_xform(m_child.support(v * m_xform.getBasis()));
-	}
-
-private:
-	const MT_Transform& m_xform;
-	const DT_Convex&    m_child;
-};
-
-
-#endif
diff --git a/extern/solid/src/convex/DT_Triangle.cpp b/extern/solid/src/convex/DT_Triangle.cpp
deleted file mode 100644
index 1917910b39d..00000000000
--- a/extern/solid/src/convex/DT_Triangle.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-//#define BACKFACE_CULLING
-
-#include "DT_Triangle.h"
-
-MT_BBox DT_Triangle::bbox() const 
-{
-	return MT_BBox((*this)[0]).hull((*this)[1]).hull((*this)[2]);
-}
-
-MT_Scalar DT_Triangle::supportH(const MT_Vector3& v) const
-{
-    return GEN_max(GEN_max(v.dot((*this)[0]), v.dot((*this)[1])), v.dot((*this)[2]));
-}
-
-MT_Point3 DT_Triangle::support(const MT_Vector3& v) const
-{
-    MT_Vector3 dots(v.dot((*this)[0]), v.dot((*this)[1]), v.dot((*this)[2]));
-
-	return (*this)[dots.maxAxis()];
-}
-
-bool DT_Triangle::ray_cast(const MT_Point3& source, const MT_Point3& target, 
-						   MT_Scalar& param, MT_Vector3& normal) const 
-{
-	MT_Vector3 d1 = (*this)[1] - (*this)[0];
-	MT_Vector3 d2 = (*this)[2] - (*this)[0];
-	MT_Vector3 n = d1.cross(d2);
-	MT_Vector3 r = target - source;
-	MT_Scalar delta = -r.dot(n);
-
-   MT_Scalar rounding_error = GEN_max(GEN_max(MT_abs(n[0]), MT_abs(n[1])), MT_abs(n[2])) * MT_EPSILON; 
-
-#ifdef BACKFACE_CULLING	
-   if (delta > rounding_error)
-#else
-	if (MT_abs(delta) > rounding_error)
-#endif      
-		// The ray is not parallel to the triangle's plane. 
-		// (Coplanar rays are ignored.)
-	{
-		MT_Vector3 b = source - (*this)[0];
-		MT_Scalar lambda = b.dot(n) / delta;
-
-		if (MT_Scalar(0.0) <= lambda && lambda <= param)
-			// The ray intersects the triangle's plane.
-		{
-			MT_Vector3 u = b.cross(r);
-			MT_Scalar mu1 = d2.dot(u) / delta;
-
-			if (MT_Scalar(0.0) <= mu1 && mu1 <= MT_Scalar(1.0)) 
-			{
-				MT_Scalar mu2 = -d1.dot(u) / delta;
-
-				if (MT_Scalar(0.0) <= mu2 && mu1 + mu2 <= MT_Scalar(1.0)) 
-					// The ray intersects the triangle.
-				{
-					param = lambda;
-					// Return a normal that points at the source.
-#ifdef BACKFACE_CULLING
-               normal = n;
-#else
-					normal = delta > MT_Scalar(0.0) ? n : -n;
-#endif
-					return true;
-				}
-			}
-		}
-	}
-
-	return false;
-}
-
-
diff --git a/extern/solid/src/convex/DT_Triangle.h b/extern/solid/src/convex/DT_Triangle.h
deleted file mode 100644
index 4192b5629ac..00000000000
--- a/extern/solid/src/convex/DT_Triangle.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_TRIANGLE_H
-#define DT_TRIANGLE_H
-
-#include "SOLID_types.h"
-
-#include "DT_Convex.h"
-#include "DT_IndexArray.h"
-#include "DT_VertexBase.h"
-
-class DT_Triangle : public DT_Convex {
-public:
-    DT_Triangle(const DT_VertexBase *base, DT_Index i0, DT_Index i1, DT_Index i2) : 
-        m_base(base)
-	{
-		m_index[0] = i0;
-		m_index[1] = i1;
-		m_index[2] = i2;
-	}
-
-    DT_Triangle(const DT_VertexBase *base, const DT_Index *index) : 
-        m_base(base)
-	{
-		m_index[0] = index[0];
-		m_index[1] = index[1];
-		m_index[2] = index[2];
-	}
-
-	virtual MT_BBox bbox() const;
-    virtual MT_Scalar supportH(const MT_Vector3& v) const;
-    virtual MT_Point3 support(const MT_Vector3& v) const;
-	virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& lambda, MT_Vector3& normal) const;
-
-    MT_Point3 operator[](int i) const { return (*m_base)[m_index[i]]; }
-
-private:
-    const DT_VertexBase *m_base;
-    DT_Index             m_index[3];
-};
-
-#endif
diff --git a/extern/solid/src/convex/DT_VertexBase.h b/extern/solid/src/convex/DT_VertexBase.h
deleted file mode 100644
index 37646fdd935..00000000000
--- a/extern/solid/src/convex/DT_VertexBase.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SOLID - Software Library for Interference Detection
- * 
- * Copyright (C) 2001-2003  Dtecta.  All rights reserved.
- *
- * This library may be distributed under the terms of the Q Public License
- * (QPL) as defined by Trolltech AS of Norway and appearing in the file
- * LICENSE.QPL included in the packaging of this file.
- *
- * This library may be distributed and/or modified under the terms of the
- * GNU General Public License (GPL) version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Commercial use or any other use of this library not covered by either 
- * the QPL or the GPL requires an additional license from Dtecta. 
- * Please contact info@dtecta.com for enquiries about the terms of commercial
- * use of this library.
- */
-
-#ifndef DT_VERTEXBASE_H
-#define DT_VERTEXBASE_H
-
-#include "MT_Point3.h"
-
-#include 
-
-class DT_Complex;
-
-typedef std::vectorDT_ComplexList;
-
-class DT_VertexBase {
-public:
-    explicit DT_VertexBase(const void *base = 0, DT_Size stride = 0, bool owner = false) : 
-        m_base((char *)base),
-		m_stride(stride ? stride : 3 * sizeof(DT_Scalar)),
-		m_owner(owner)
-	{}
-	
-	~DT_VertexBase()
-	{
-		if (m_owner)
-		{
-			delete [] m_base;
-		}
-	}
-    
-    MT_Point3 operator[](DT_Index i) const 
-	{ 
-        return MT_Point3(reinterpret_cast(m_base + i * m_stride));
-    }
-    
-    void setPointer(const void *base, bool owner = false)
-	{
-		m_base = (char *)base; 
-		m_owner = owner;
-	} 
-	
-    const void *getPointer() const { return m_base; }	
-	bool        isOwner() const { return m_owner; }
-    
-	void addComplex(DT_Complex *complex) const { m_complexList.push_back(complex); }
-	void removeComplex(DT_Complex *complex) const
-	{
-		DT_ComplexList::iterator it = std::find(m_complexList.begin(), m_complexList.end(), complex); 
-		if (it != m_complexList.end())
-		{
-			m_complexList.erase(it);
-		}
-	}
-	
-	const DT_ComplexList& getComplexList() const { return m_complexList; }
-	
-private:    
-    char                  *m_base;
-    DT_Size                m_stride;
-	bool                   m_owner;
-	mutable DT_ComplexList m_complexList;
-};
-
-#endif
diff --git a/extern/solid/src/convex/Makefile b/extern/solid/src/convex/Makefile
deleted file mode 100644
index 75fa578a292..00000000000
--- a/extern/solid/src/convex/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = solid_convex
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../../include -I$(NAN_QHULL)/include
-CPPFLAGS += -DQHULL -DUSE_DOUBLES
-
-include nan_compile.mk 
-
-
diff --git a/extern/verse/CMakeLists.txt b/extern/verse/CMakeLists.txt
deleted file mode 100644
index 318a550668e..00000000000
--- a/extern/verse/CMakeLists.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-# $Id$
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-SUBDIRS(dist)
-
diff --git a/extern/verse/Makefile b/extern/verse/Makefile
deleted file mode 100644
index 51dc5543d2a..00000000000
--- a/extern/verse/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2002 by Hans Lambermont
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jiri Hnidek
-#
-# ***** END GPL LICENSE BLOCK *****
-LIBNAME = verse
-SOURCEDIR = extern/$(LIBNAME)
-DIR = $(OCGDIR)/$(SOURCEDIR)
-DIRS = dist
-
-include nan_subdirs.mk
-include nan_compile.mk
-include nan_link.mk
-
-DISTDIR = dist
-CP = ../../intern/tools/cpifdiff.sh
-
-ifeq ($(OS),windows)
-    EXT = .exe
-endif
-
-install: all debug
-	@[ -d $(NAN_VERSE) ] || mkdir -p $(NAN_VERSE)
-	@[ -d $(NAN_VERSE)/include ] || mkdir -p $(NAN_VERSE)/include
-	@[ -d $(NAN_VERSE)/lib ] || mkdir -p $(NAN_VERSE)/lib
-	@[ -d $(OCGDIR)/bin ] || mkdir -p $(OCGDIR)/bin
-	@$(CP) $(DISTDIR)/*.h $(NAN_VERSE)/include
-	@$(CP) $(DIR)/libverse.a $(NAN_VERSE)/lib
-ifeq ($(OS),darwin)
-	ranlib $(NAN_VERSE)/lib/libverse.a
-endif
-	$(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/verse$(EXT) $(DIR)/libverse.a $(LIBS) $(SLIBS) $(LLIBS) $(DADD) $(LOPTS)
-	@$(CP) $(DIR)/verse$(EXT) $(OCGDIR)/bin
diff --git a/extern/verse/dist/BUGS b/extern/verse/dist/BUGS
deleted file mode 100644
index 8c3603a3a45..00000000000
--- a/extern/verse/dist/BUGS
+++ /dev/null
@@ -1,8 +0,0 @@
-
-Known problems with Verse
-
-2004-03-03
-* The source code needs plenty of cleaning up in order to compile more
-  cleanly.
-* License information needs to be added all over the place.
-* Decent documentation is missing.
diff --git a/extern/verse/dist/CMakeLists.txt b/extern/verse/dist/CMakeLists.txt
deleted file mode 100644
index ae130df6410..00000000000
--- a/extern/verse/dist/CMakeLists.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-# $Id$
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-SUBDIRS(mkprot_cmd)
-
-SET(SRC_MKPROT_OUT
-  v_gen_pack_init.c
-  v_gen_pack_a_node.c
-  v_gen_pack_b_node.c
-  v_gen_pack_c_node.c
-  v_gen_pack_g_node.c
-  v_gen_pack_m_node.c
-  v_gen_pack_o_node.c
-  v_gen_pack_s_node.c
-  v_gen_pack_t_node.c
-)
-
-SET(INC .)
-
-SET(SRC
-  v_cmd_buf.c
-  v_connect.c
-  v_connection.c
-  v_encryption.c
-  v_func_storage.c
-  v_man_pack_node.c
-  v_network.c
-  v_network_in_que.c
-  v_network_out_que.c
-  v_pack.c
-  v_pack_method.c
-  v_prime.c
-  v_randgen.c
-  v_util.c
-  v_bignum.c
-  verse_ms.c
-  ${SRC_MKPROT_OUT}
-)
-
-BLENDERLIB(verse "${SRC}" "${INC}")
-ADD_DEPENDENCIES(verse mkprot)
-#verselib = env.BlenderLib(libname='verse', sources=lib_source_files, includes=[], defines=defines, libtype=['core', 'intern'], priority = [5, 5])
-
-SET(SRC_VERSE
-  vs_connection.c
-  vs_main.c
-  vs_node_audio.c
-  vs_node_bitmap.c
-  vs_node_curve.c
-  vs_node_geometry.c
-  vs_node_head.c
-  vs_node_material.c
-  vs_node_object.c
-  vs_node_particle.c
-  vs_node_storage.c
-  vs_node_text.c
-  vs_master.c  
-)
-
-ADD_EXECUTABLE(verse_server ${SRC_VERSE})
-IF(WIN32)
-TARGET_LINK_LIBRARIES(verse_server verse ws2_32)
-ELSE(WIN32)
-TARGET_LINK_LIBRARIES(verse_server verse)
-ENDIF(WIN32)
-ADD_DEPENDENCIES(verse_server mkprot)
-MESSAGE(STATUS "Configuring verse_server")
diff --git a/extern/verse/dist/MAINTAINERS b/extern/verse/dist/MAINTAINERS
deleted file mode 100644
index c467d5309b8..00000000000
--- a/extern/verse/dist/MAINTAINERS
+++ /dev/null
@@ -1,15 +0,0 @@
-
-			Verse Maintainers
-
-This file tries to list credits for the various parts of the
-Verse core distribution, and also identify who maintains what.
-
-We are deeply appreciative of any contributions and thank you
-all for your time and interest in helping make Verse a better
-thing.
-
-* All code was originally written by Eskil Steenberg, and is
-  being maintained by him and Emil Brink. Contact us through
-  the project page at http://www.blender.org/modules/verse/.
-
-* SCons build file by N. Letwory, http://www.jester-depot.net/.
diff --git a/extern/verse/dist/Makefile b/extern/verse/dist/Makefile
deleted file mode 100644
index 69b5590b2bc..00000000000
--- a/extern/verse/dist/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Makefile for Verse core; API and reference server.
-# This pretty much requires GNU Make, I think.
-#
-# This build is slightly complicated that part of the C code that
-# needs to go into the API implementation is generated by building
-# and running other C files (this is the protocol definition).
-#
-
-LIBNAME = verse
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-include nan_compile.mk
-
-# TARGETS = verse
diff --git a/extern/verse/dist/Makefile.win32 b/extern/verse/dist/Makefile.win32
deleted file mode 100644
index 548881c6a16..00000000000
--- a/extern/verse/dist/Makefile.win32
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# Makefile for Verse core; API and reference server.
-# Written by modifying the main GNU Makefile, for nmake.
-#
-# It is more hard-coded, relying on less intelligence in
-# the make tool.
-#
-# This build is slightly complicated that part of the C code that
-# needs to go into the API implementation is generated by building
-# and running other C files (this is the protocol definition).
-#
-
-CC	= cl
-CFLAGS	= 
-LDFLAGS	= -pg
-
-AR	= ar
-ARFLAGS	= rus
-RANLIB	= ranlib
-
-TARGETS = verse.lib verse.exe
-
-# Automatically generated protocol things.
-PROT_DEF  = v_cmd_def_a.c v_cmd_def_b.c v_cmd_def_c.c v_cmd_def_g.c v_cmd_def_m.c v_cmd_def_o.c v_cmd_def_s.c v_cmd_def_t.c
-PROT_TOOL = v_cmd_gen.c $(PROT_DEF)
-PROT_OUT  = v_gen_pack_init.c v_gen_unpack_func.h verse.h \
-	    v_gen_pack_a_node.c v_gen_pack_b_node.c v_gen_pack_c_node.c v_gen_pack_g_node.c v_gen_pack_m_node.c v_gen_pack_o_node.c v_gen_pack_s_node.c v_gen_pack_t_node.c
-
-# The API implementation is the protocol code plus a few bits.
-LIBVERSE_SRC =  v_gen_pack_init.c v_gen_unpack_func.h verse.h v_gen_pack_a_node.c v_gen_pack_b_node.c v_gen_pack_c_node.c v_gen_pack_g_node.c \
-		v_gen_pack_m_node.c v_gen_pack_o_node.c v_gen_pack_s_node.c v_gen_pack_t_node.c \
-		v_bignum.c v_cmd_buf.c v_connect.c \
-		v_connection.c v_connection.h v_encryption.c \
-		v_func_storage.c v_internal_verse.h v_man_pack_node.c \
-		v_network.c v_network.h v_network_in_que.c v_network_out_que.c \
-		v_pack.c v_pack.h v_pack_method.c v_prime.c v_randgen.c v_util.c
-
-LIBVERSE_OBJ = v_gen_pack_init.obj v_gen_pack_a_node.obj v_gen_pack_b_node.obj v_gen_pack_c_node.obj v_gen_pack_g_node.obj \
-		v_gen_pack_m_node.obj v_gen_pack_o_node.obj v_gen_pack_s_node.obj v_gen_pack_t_node.obj \
-		v_bignum.obj v_cmd_buf.obj v_connect.obj \
-		v_connection.obj v_encryption.obj \
-		v_func_storage.obj v_man_pack_node.obj \
-		v_network.obj v_network_in_que.obj v_network_out_que.obj \
-		v_pack.obj v_pack_method.obj v_prime.obj v_randgen.obj v_util.obj
-
-# The server is a simple 1:1 mapping, but in Windows nmake ... That doesn't help much. :/
-VERSE_SRC = vs_connection.c vs_main.c vs_master.c vs_node_audio.c vs_node_bitmap.c vs_node_curve.c vs_node_geometry.c vs_node_head.c vs_node_material.c vs_node_object.c vs_node_particle.c vs_node_storage.c vs_node_text.c
-VERSE_OBJ = vs_connection.obj vs_main.obj vs_master.obj vs_node_audio.obj vs_node_bitmap.obj vs_node_curve.obj vs_node_geometry.obj \
-	vs_node_head.obj vs_node_material.obj vs_node_object.obj vs_node_particle.obj vs_node_storage.obj vs_node_text.obj
-
-# -----------------------------------------------------
-
-ALL:		verse.lib verse.exe
-
-verse.exe:	$(VERSE_OBJ) verse.lib resources\verse.res
-		cl /Fe$@ $** wsock32.lib
-
-verse.lib:	$(LIBVERSE_OBJ)
-		link /lib /nologo /out:$@ $**
-
-# -----------------------------------------------------
-
-# Here are the automatically generated pieces of the puzzle.	
-# Basically, we generate v_gen_pack_X_node.c files by compiling
-# the v_cmd_def_X.c files together with some driver glue and
-# running the result.
-#
-
-# The autogen outputs all depend on the tool.
-$(PROT_OUT):	mkprot.exe
-		mkprot.exe
-
-# Build the protocol maker, from the definitions themselves.
-mkprot.exe:	$(PROT_TOOL) verse_header.h
-		$(CC) /DV_GENERATE_FUNC_MODE /Fe$@ $(PROT_TOOL)
-
-# Clean away all the generated parts of the protocol implementation.
-cleanprot:	clean
-		del mkprot $(PROT_OUT) mkprot.exe
-
-# -----------------------------------------------------
-
-clean:
-	del *.obj $(TARGETS)
-
-# -----------------------------------------------------
-
-# Utter ugliness to create release archives. Needs to improve, but should work for a while.
-dist:
-	RELEASE=$$( \
-	R=`grep V_RELEASE_NUMBER verse.h | tr -s ' \t' | tr -d '"\r' | cut -d'	' -f3` ; \
-	P=`grep V_RELEASE_PATCH verse.h | tr -s ' \t' | tr -d '"\r' | cut -d'	' -f3` ; \
-	L=`grep V_RELEASE_LABEL verse.h | tr -s ' \t' | tr -d '"\r' | cut -d'	' -f3` ; echo r$${R}p$$P$$L ) ; \
-	if [ $$RELEASE ]; then ( \
-	 rm -rf  /tmp/verse; \
-	 mkdir -p /tmp/verse; \
-	 cp -a * /tmp/verse; \
-	 cd /tmp && zip verse-$$RELEASE.zip -r verse -x 'verse/*CVS*' -x 'verse/.*' ; \
-	 ); mv /tmp/verse-$$RELEASE.zip . \
-	;else \
-	  echo "Couldn't auto-set RELEASE from verse.h, something is fishy" \
-	;fi
diff --git a/extern/verse/dist/README.html b/extern/verse/dist/README.html
deleted file mode 100644
index b3b3050bf12..00000000000
--- a/extern/verse/dist/README.html
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
-
-Verse README
-
-
-
-
-

Verse

- -

-This is the Verse protocol and sample server implementations. -

-

-For more information, see the Verse web site. -

-

Building the Verse Core

-

-Note: This section is only of interest to developers, who wish to build the Verse core themselves. -If you have chosen a binary download, you will already have the server and can skip the rest -of this section. -

-

-Running "make" here will build the API library, "libverse.a" (and its -header file, "verse.h"). These two will then be used to build the -reference Verse server binary, called "verse". -

-

-If you are more comfortable with SCons, and of course have it -installed on your system, you can type "scons" instead. -

- -

Starting the Server

-

-The Verse server is a command-line program, without a graphical user interface. -You simply start it, and it will immediately begin listening for incoming -connections on a network socket. Here is how a typical invocation looks: -

-
~> verse
-
-

-If you don't ask it to do otherwise, the Verse server will start listening for UDP packets -on its default port. The port number currently used by Verse is 4950. -

-

-Note: This is not an official registered, port number. -It is possible that it gets assigned to someone else, in case Verse will need to change. -

-

-You can use the following command line options to control the server's operation: -

-
-
-h
-
- Print a help text, that shows all understood options. -
-
-ms
-
- Enables master server communications to the default, built-in address. Use the -h option to learn - what this address is. Please note that master server communication is disabled by default. -
-
-ms:ip=IP
-
- Sets a new address to use for master server communication. This also implies -ms, i.e. the server - will try to register itself with the given master server. For details on the protocol used to do - this, please see the spec. -
-
-ms:de=DESC
-
- Sets the description to use for this server, when registering with the the master server. This is - only used if master server communication is actually enabled. The description is expected to be a - human-readable string, like "A test server, run on a cable modem, and offline during local daytime" - or something. -
-
-ms:ta=TAGS
-
- Sets the tags to use for this server, when registering with the the master server. This is only used - if master server communication is actually enabled. The tags consists of a comma-separated list of - single words. Each word must begin with a letter, and contain only letters, digits, or underscore - characters. For instance: home,r6p1,linux,sweden,open. -
-
-port=N
-
- Use the indicated port number, rather than the default. Note that ports below 1024 are generally - off-limits to ordinary users. Running Verse on such a port is not recommended. -
-
-version
-
- Prints the version string of the server to the terminal, and then exits (successfully). See - below for information how the version string is constructed. -
-
-

-For example, here is how to start the server, register it with the default master server, and run -on port number equal to 16333: -

-
~> ./server -ms -port=16333
-
-

-Here is a more complicated example, that uses an explicit master server address, and also sets both -the description and tags: -

-
~> ./server -ms:ip=master.example.net -ms:de="A test server, for the documentation" -ms:ta=example,docs
-
-

-Options can occur in any order, with later options overriding earlier ones, in case of conflicts. -

- -

Release Labeling

-

-Verse uses a simple two-level numbering scheme to identify releases. -There is a "release number", and a "patch level" on each release. The -intent is that within a release, the API does not change and neither -should the network protocol. Between releases, we might improve the -API which will require application programmers to update their code -to stay in sync. We can do non-API-altering changes within a release -by increasing the patch level, for bug fixing and other things. -

-

-The symbols V_RELEASE_NUMBER and V_RELEASE_PATCH -are integer literals that hold the values for the API you have, and can be -used (and displayed) in application source code as you see fit. There is -also a string, V_RELEASE_LABEL, which is sometimes used. -

-

-To form a complete Verse version number, the above-mentioned symbols are -to be combined like so: -"r<V_RELEASE_NUMBER>p<V_RELEASE_PATCH><V_RELEASE_LABEL>". -So, the following variable values: -

    -
  • V_RELEASE_VERSION = 2 -
  • V_RELEASE_VERSION = 51 -
  • V_RELEASE_LABEL = "foo" -
-Would generate the version string "r2p51foo". -

- - - diff --git a/extern/verse/dist/SConstruct b/extern/verse/dist/SConstruct deleted file mode 100644 index a80a1ac79e9..00000000000 --- a/extern/verse/dist/SConstruct +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env python -# -# I think it is quite straight-forward to add new platforms, -# just look at the old makefile and at the existing platforms. -# -# This SConstruct creates a configuration file which can be -# used for tweaking a build. -# -# For more about SConstruct, see . -# - -import os -import os.path -import sys -import re -import time -import string -from distutils import sysconfig - -Import('env') - -defines = [] -cflags = [] -debug_flags = [] -extra_flags = [] -release_flags = [] -warn_flags = [] -platform_libs = [] -platform_libpath = [] -platform_linkflags = [] - -ourplatform = env['OURPLATFORM'] -if ourplatform == 'win32-vc': - print "Building on win32" - defines += ['_WIN32'] - warn_flags = ['/Wall'] - platform_libs = ['ws2_32'] -elif ourplatform == 'win32-mingw': - defines += ['_WIN32', 'WIN32'] - platform_libs = ['shell32', 'kernel32', 'gdi32', 'user32', 'ws2_32'] -elif ourplatform == 'linux2': - print "Building on linux2" -elif ourplatform == 'openbsd3': - print "Building on openbsd3" - -root_build_dir = env['BF_BUILDDIR'] - -if env['VERSE_BUILD_BINARY'] == 'release': - cflags = extra_flags + release_flags + warn_flags - if ourplatform == 'win32-vc': - defines += ['NDEBUG'] -else: - cflags = extra_flags + debug_flags + warn_flags - if ourplatform == 'win32-vc': - #defines += ['_DEBUG'] specifying this makes msvc want to link to python22_d.lib?? - platform_linkflags += ['/DEBUG','/PDB:verse.pdb'] - - -verse_env = env.Clone() - -cmd_gen_files = (['v_cmd_gen.c', - 'v_cmd_def_a.c', - 'v_cmd_def_b.c', - 'v_cmd_def_c.c', - 'v_cmd_def_g.c', - 'v_cmd_def_m.c', - 'v_cmd_def_o.c', - 'v_cmd_def_s.c', - 'v_cmd_def_t.c' - ]) - -cmd_gen_deps = (['v_gen_pack_init.c']) - -proto_env = env.Clone() -proto_env.Append(CPPDEFINES=['V_GENERATE_FUNC_MODE']) -mkprot_tool = proto_env.Program(target = 'mkprot', source = cmd_gen_files) - -mkprot_re = re.compile('v_cmd_def_([a-z]{1}).c') -def mkprot_emitter(target = None, source = None, env = None): - newtargets = list() - for s in source: - p, f = os.path.split(str(s)) - m = mkprot_re.match(f) - if m: - newtargets.append("v_gen_pack_"+m.group(1)+"_node.c") - newtargets.extend(['verse.h']) - env.Depends(newtargets, mkprot_tool) - return (newtargets, source) - -mkprot_bld = Builder(action = "\"" + mkprot_tool[0].abspath + "\" -src=\""+os.getcwd()+os.sep+"extern"+os.sep+"verse"+os.sep+"dist"+os.sep+os.sep+"\" -dst=\""+os.path.abspath(env['BF_BUILDDIR'])+os.sep+"extern"+os.sep+"verse"+os.sep+"dist"+os.sep+os.sep+"\"", - emitter = mkprot_emitter) - -verse_env['BUILDERS']['Protocol'] = mkprot_bld - -cmd_gen_deps.extend(verse_env.Protocol('do_mkprot', cmd_gen_files)) - -cmd_gen_deps.pop() - -lib_source_files = (['v_cmd_buf.c', - 'v_connect.c', - 'v_connection.c', - 'v_encryption.c', - 'v_func_storage.c', - 'v_man_pack_node.c', - 'v_network.c', - 'v_network_in_que.c', - 'v_network_out_que.c', - 'v_pack.c', - 'v_pack_method.c', - 'v_prime.c', - 'v_randgen.c', - 'v_util.c', - 'v_bignum.c', - 'verse_ms.c' - ]) -lib_source_files.extend(cmd_gen_deps) - -server_source_files = (['vs_connection.c', - 'vs_main.c', - 'vs_master.c', - 'vs_node_audio.c', - 'vs_node_bitmap.c', - 'vs_node_curve.c', - 'vs_node_geometry.c', - 'vs_node_head.c', - 'vs_node_material.c', - 'vs_node_object.c', - 'vs_node_particle.c', - 'vs_node_storage.c', - 'vs_node_text.c' - ]) - -verselib_env = verse_env.Clone() -verselib_env.Append(CPPDEFINES = defines) - -verseserver_env = verse_env.Clone() -verseserver_env.Append(CPPDEFINES = defines) -verseserver_env.Append (LIBPATH = ['.']) -verseserver_env.Append (LIBS= ['verse']) -verseserver_env.Append (LIBS= platform_libs) - -verselib_env.BlenderLib(libname='verse', sources=lib_source_files, includes=["."], defines = defines, libtype=['core', 'intern', 'player'], priority = [5, 5, 100]) -verseserver_env.BlenderProg(builddir="#"+root_build_dir+os.sep, progname='verse', sources=server_source_files, libs=[], -libpath='#'+env['BF_BUILDDIR']+'/lib') - - diff --git a/extern/verse/dist/examples/list-nodes.c b/extern/verse/dist/examples/list-nodes.c deleted file mode 100644 index 6c9cc000d7c..00000000000 --- a/extern/verse/dist/examples/list-nodes.c +++ /dev/null @@ -1,39 +0,0 @@ -/* A minimalist Verse example. Ask server for nodes, print information. */ - -#include -#include - -#include "verse.h" /* Bring in the Verse API. */ - -/* A callback for connection acception: will be called when server accepts this client. */ -static void callback_accept_connect(void *user, uint32 avatar, void *address, void *connection, uint8 *host_id) -{ - uint32 i, mask = 0; - - printf("Connected to a Verse host!\n\nListing nodes:\n"); - - /* Build node subscription mask. */ - for(i = 0; i < V_NT_NUM_TYPES; i++) - mask |= 1 << i; - verse_send_node_index_subscribe(mask); /* Request listing of all nodes. */ -} - -/* A callback for node creation: is called to report information about existing nodes, too. */ -static void callback_node_create(void *user, VNodeID node_id, VNodeType type, VNodeOwner ownership) -{ - printf(" Node #%u has type %u\n", node_id, type); -} - -int main(void) -{ - /* Register callbacks for interesting commands. */ - verse_callback_set(verse_send_connect_accept, callback_accept_connect, NULL); - verse_callback_set(verse_send_node_create, callback_node_create, NULL); - - /* Kick off program by connecting to Verse host on local machine. */ - verse_send_connect("list-nodes", "", "localhost", NULL); - while(TRUE) - verse_callback_update(10000); /* Listen to network, get callbacks. */ - - return EXIT_SUCCESS; /* This is never reached. */ -} diff --git a/extern/verse/dist/mkprot_cmd/CMakeLists.txt b/extern/verse/dist/mkprot_cmd/CMakeLists.txt deleted file mode 100644 index f6e89f912e5..00000000000 --- a/extern/verse/dist/mkprot_cmd/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -SET(SRC - ../v_cmd_gen.c - ../v_cmd_def_a.c - ../v_cmd_def_b.c - ../v_cmd_def_c.c - ../v_cmd_def_g.c - ../v_cmd_def_m.c - ../v_cmd_def_o.c - ../v_cmd_def_s.c - ../v_cmd_def_t.c -) - -ADD_DEFINITIONS(-DV_GENERATE_FUNC_MODE) -ADD_EXECUTABLE(mkprot ${SRC}) - -# Uncoment the following to get verse to generate the files using dependency -# tracking without having the generated files submitted in CVS. -# -#ADD_CUSTOM_COMMAND(TARGET mkprot -# POST_BUILD -# COMMAND mkprot -src=${CMAKE_CURRENT_SOURCE_DIR}/../ -dst=${CMAKE_CURRENT_SOURCE_DIR}/../ -# MAIN_DEPENDENCY ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/mkprot -# WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR} -#) -MESSAGE(STATUS "Configuring mkprot(verse)") - diff --git a/extern/verse/dist/resources/Makefile.win32 b/extern/verse/dist/resources/Makefile.win32 deleted file mode 100644 index 8e7b4a09bbd..00000000000 --- a/extern/verse/dist/resources/Makefile.win32 +++ /dev/null @@ -1,11 +0,0 @@ -# -# This builds a resource file for the Verse server, for the icon. -# - -ALL: verse.res - -verse.res: verse.rc - - -clean: - del *.res diff --git a/extern/verse/dist/resources/verse.ico b/extern/verse/dist/resources/verse.ico deleted file mode 100644 index b30f4c927ef..00000000000 Binary files a/extern/verse/dist/resources/verse.ico and /dev/null differ diff --git a/extern/verse/dist/resources/verse.rc b/extern/verse/dist/resources/verse.rc deleted file mode 100644 index a068a6f3e3e..00000000000 --- a/extern/verse/dist/resources/verse.rc +++ /dev/null @@ -1 +0,0 @@ -1 ICON verse.ico diff --git a/extern/verse/dist/resources/verse.res b/extern/verse/dist/resources/verse.res deleted file mode 100644 index ed4db6ca27f..00000000000 Binary files a/extern/verse/dist/resources/verse.res and /dev/null differ diff --git a/extern/verse/dist/v_bignum.c b/extern/verse/dist/v_bignum.c deleted file mode 100644 index 3f65af03427..00000000000 --- a/extern/verse/dist/v_bignum.c +++ /dev/null @@ -1,860 +0,0 @@ -/* - * Routines for big (thousands of bits) unsigned integers, and - * doing simple maths operations on them. Written by Emil Brink. - * - * Part of the Verse core, see license details elsewhere. - * - * Bignums are represented as vectors of VBigDig (unsigned short), - * where the first element holds the length of the number in such - * digits. So a 32-bit number would be { 2, low, high }; digits are - * in little-endian format. - * - * Verse's uint16 and uint32 types are *not* used, since there is no - * need to limit the bits. If your machine has 32-bit shorts and 64- - * bit ints, this code should cope. - * - * By using unsigned shorts, which are assumed to be half the size of - * an unsigned int, we can easily do intermediary steps in int-sized - * variables, and thus get space for manual carry-management. - * - * This is the second incarnation of this code, the first one used - * a fixed 2,048-bit VBigNum structure passed by value. It had to be - * replaced since it was too weak for the desired functionality. Now, - * there's roughly 1,5 weeks of time gone into this code, which still - * means it's optimized for simplicity rather than speed. - * - * There has been neither time nor interest to meditate over FFTs and - * Karatsubas. Reasonable improvements are of course welcome, although - * this code *should* not be a bottleneck. Famous last words... - * - * In general, these routines do not do a lot of error checking, they - * assume you know what you're doing. Numbers must have >0 digits. - * Shifts should not be overly large (1e3 bits: safe, ~2e9+: avoid). -*/ - -#include -#include -#include -#include - -#include "v_randgen.h" - -#include "v_bignum.h" - -#define MAX_DIG ((1UL << V_BIGBITS) - 1) - -/* ----------------------------------------------------------------------------------------- */ - -/* Some routines need temporary storage to hold a term or two (the multi- - * plier, for instance). Since we don't want to use malloc()/free(), let's - * just have a bunch of digits that it's possible to allocate from in a - * stack-like manner. -*/ -static VBigDig heap[2048 + 32]; -static unsigned int heap_pos; - -/* Allocate a number of digits, returning it un-initialized. */ -static VBigDig * bignum_alloc(unsigned int n) -{ - VBigDig *y; - - if(heap_pos + n > sizeof heap / sizeof *heap) - { - printf("Out of memory in bignum heap -- unbalanced calls?\n"); - return NULL; - } - y = heap + heap_pos; - heap_pos += n + 1; - *y = n; - return y; -} - -/* Free a number previously allocated by bignum_allow() above. MUST match in sequences. */ -static void bignum_free(const VBigDig *x) -{ - heap_pos -= *x + 1; -} - -/* ----------------------------------------------------------------------------------------- */ - -/* Set x from bits. External representation is big-endian byte array. */ -void v_bignum_raw_import(VBigDig *x, const void *bits) -{ - const unsigned char *bytes = bits; - int i; - - for(i = *x++ - 1; i >= 0; i--) - { - x[i] = ((VBigDig) *bytes++) << 8; - x[i] |= *bytes++; - } -} - -/* Set bits to value of x. External representation is big-endian byte array. */ -void v_bignum_raw_export(const VBigDig *x, void *bits) -{ - unsigned char *bytes = bits; - int i; - - for(i = *x++ - 1; i >= 0; i--) - { - *bytes++ = x[i] >> 8; - *bytes++ = (unsigned char) x[i]; - } -} - -/* ----------------------------------------------------------------------------------------- */ - -/* Assigns x = 0. */ -void v_bignum_set_zero(VBigDig *x) -{ - memset(x + 1, 0, *x * sizeof *x); -} - -/* Assigns x = 1. */ -void v_bignum_set_one(VBigDig *x) -{ - int i; - - for(i = *x++ - 1, *x++ = 1; i > 0; i--) - *x++ = 0; -} - -/* Assigns x = y. */ -void v_bignum_set_digit(VBigDig *x, VBigDig y) -{ - v_bignum_set_zero(x); - x[1] = y; -} - -/* Assigns x = , with string in decimal ASCII. Kind of slow. */ -void v_bignum_set_string(VBigDig *x, const char *string) -{ - unsigned int d; - - v_bignum_set_zero(x); - for(; *string && isdigit(*string); string++) - { - v_bignum_mul_digit(x, 10); - d = *string - '0'; - v_bignum_add_digit(x, d); - } -} - -/* Assigns x = , with string in hexadecimal ASCII. */ -void v_bignum_set_string_hex(VBigDig *x, const char *string) -{ - unsigned int d; - - if(string[0] == '0' && (string[1] == 'x' || string[1] == 'X')) - string += 2; - v_bignum_set_zero(x); - for(; *string && isxdigit(*string); string++) - { - v_bignum_bit_shift_left(x, 4); - d = tolower(*string) - '0'; - if(d > 9) - d -= ('a' - '0') - 10; - x[1] |= (d & 0xF); - } -} - -/* Performs x = y, taking care to handle different precisions correctly by truncating. */ -void v_bignum_set_bignum(VBigDig *x, const VBigDig *y) -{ - int xs, ys, i, s; - - xs = x[0]; - ys = y[0]; - if(xs == ys) /* For same sizes, just memcpy() and be done. */ - { - memcpy(x + 1, y + 1, xs * sizeof *x); - return; - } - else if(ys > xs) - s = xs; - else - s = ys; - /* Copy as many digits as will fit, and clear any remaining high digits. */ - for(i = 1; i <= s; i++) - x[i] = y[i]; - for(; i <= xs; i++) - x[i] = 0; -} - -/* Performs x = y[msb:msb-bits], right-adjusting the result. */ -void v_bignum_set_bignum_part(VBigDig *x, const VBigDig *y, unsigned int msb, unsigned int bits) -{ - unsigned int i, bit; - - v_bignum_set_zero(x); - if(y == NULL || msb > (y[0] * (CHAR_BIT * sizeof *x))) - return; - for(i = 0; i < bits; i++) - { - bit = msb - (bits - 1) + i; - if(v_bignum_bit_test(y, bit)) - v_bignum_bit_set(x, i); - } -} - -/* Set x to a random bunch of bits. Should use a real random source. */ -void v_bignum_set_random(VBigDig *x, VRandGen *gen) -{ - unsigned int s = *x++; - - if(gen != NULL) - v_randgen_get(gen, x, s * sizeof *x); - else - { - fprintf(stderr, "** Warning: Calling v_bignum_set_random() without VRandGen is potentially expensive\n"); - if((gen = v_randgen_new()) != NULL) - { - v_randgen_get(gen, x, s * sizeof *x); - v_randgen_destroy(gen); - } - else - fprintf(stderr, __FILE__ ": Couldn't create random number generator\n"); - } -} - -/* Print x in hexadecimal, with 0x prefix but no linefeed. */ -void v_bignum_print_hex(const VBigDig *x) -{ - int i, s = *x; - - printf("0x"); - for(i = 0; i < s; i++) - printf("%04X", x[s - i]); -} - -/* Print x in hexadecimal, with linefeed. */ -void v_bignum_print_hex_lf(const VBigDig *x) -{ - v_bignum_print_hex(x); - printf("\n"); -} - -/* ----------------------------------------------------------------------------------------- */ - -/* x = ~x. */ -void v_bignum_not(VBigDig *x) -{ - unsigned int i, s = *x++; - - for(i = 0; i < s; i++) - x[i] = ~x[i]; -} - -int v_bignum_bit_test(const VBigDig *x, unsigned int bit) -{ - unsigned int slot = bit / (CHAR_BIT * sizeof *x), m = 1 << (bit % (CHAR_BIT * sizeof *x)); - - if(slot < x[0]) - return (x[slot + 1] & m) != 0; - return 0; -} - -/* Compute x |= (1 << bit). */ -void v_bignum_bit_set(VBigDig *x, unsigned int bit) -{ - unsigned int slot, m; - - if(bit >= (*x * (CHAR_BIT * sizeof *x))) - return; - slot = bit / (CHAR_BIT * sizeof *x); - m = 1 << (bit % (CHAR_BIT * sizeof *x)); - x[1 + slot] |= m; -} - -/* Returns index of most signifant '1' bit of x, or -1 if x == 0. */ -int v_bignum_bit_msb(const VBigDig *x) -{ - int i; - unsigned int s = *x++; - - for(i = s - 1; i >= 0; i--) - { - if(x[i] != 0) - { - int bit = (i + 1) * (CHAR_BIT * sizeof *x) - 1; - VBigDig d = x[i], mask; - - for(mask = 1 << (CHAR_BIT * sizeof *x - 1); mask != 0; mask >>= 1, bit--) - { - if(d & mask) - return bit; - } - } - } - return -1; -} - -int v_bignum_bit_size(const VBigDig *x) -{ - return *x * V_BIGBITS; -} - -/* Perform x <<= count. */ -void v_bignum_bit_shift_left(VBigDig *x, unsigned int count) -{ - unsigned int t, carry, s = *x++; - register int i; - - if(count >= CHAR_BIT * sizeof *x) /* Shift whole digits. */ - { - unsigned int places = count / (CHAR_BIT * sizeof *x); - - for(i = s - 1; i >= (int) places; i--) - x[i] = x[i - places]; - for(; i >= 0; i--) /* Clear out the LSBs. */ - x[i] = 0; - count -= places * (CHAR_BIT * sizeof *x); - if(count == 0) - return; - } - /* Shift bits. */ - for(i = carry = 0; i < (int) s; i++) - { - t = (x[i] << count) | carry; - x[i] = t; - carry = t >> (CHAR_BIT * sizeof *x); - } -} - -/* Perform x <<= 1. This is a frequent operation so it can have its own function. */ -void v_bignum_bit_shift_left_1(VBigDig *x) -{ - register unsigned int t, carry, s = *x++, i; - - /* Shift bits. */ - for(i = carry = 0; i < s; i++) - { - t = (x[i] << 1) | carry; - x[i] = t; - carry = t >> (CHAR_BIT * sizeof *x); - } -} - -/* Perform x >>= count. */ -void v_bignum_bit_shift_right(VBigDig *x, unsigned int count) -{ - unsigned int t, carry, s = *x++; - int i; - - /* Shift entire digits first. */ - if(count >= CHAR_BIT * sizeof *x) - { - unsigned int places = count / (CHAR_BIT * sizeof *x); - - if(places > s) - { - memset(x, 0, s * sizeof *x); - return; - } - for(i = 0; i < (int) (s - places); i++) - x[i] = x[i + places]; - for(; i < (int) s; i++) - x[i] = 0; - count -= places * CHAR_BIT * sizeof *x; - if(count == 0) - return; - } - /* Shift any remaining bits. */ - for(i = s - 1, carry = 0; i >= 0; i--) - { - t = x[i] << (CHAR_BIT * sizeof *x); - t >>= count; - t |= carry; - carry = (t & MAX_DIG) << (CHAR_BIT * sizeof *x); - x[i] = t >> (CHAR_BIT * sizeof *x); - } -} - -/* ----------------------------------------------------------------------------------------- */ - -/* Return x == 0. */ -int v_bignum_eq_zero(const VBigDig *x) -{ - unsigned int i, s = *x++; - - for(i = 0; i < s; i++) - if(x[i]) - return 0; - return 1; -} - -/* Return x == 1. */ -int v_bignum_eq_one(const VBigDig *x) -{ - unsigned int i, s = *x++; - - if(x[0] != 1) - return 0; - for(i = 1; i < s; i++) - if(x[i]) - return 0; - return 1; -} - -/* Returns x == y, handling different lengths properly. */ -int v_bignum_eq(const VBigDig *x, const VBigDig *y) -{ - unsigned int i, xs, ys, cs; - - if(x == y) /* Quick test thanks to pointer representation. */ - return 1; - xs = *x++; - ys = *y++; - - if(xs == ys) /* Same size? Then let's be quick about this. */ - return memcmp(x, y, xs * sizeof *x) == 0; - else - { - cs = xs < ys ? xs : ys; /* Common size. */ - if(memcmp(x, y, cs * sizeof *x) == 0) - { - const VBigDig *l; - - if(cs == xs) /* y is longer. */ - l = y, i = ys - 1; - else - l = x, i = xs - 1; - for(; i > cs; i--) - if(l[i]) - return 0; - return 1; - } - } - return 0; -} - -/* Returns x >= y. */ -int v_bignum_gte(const VBigDig *x, const VBigDig *y) -{ - unsigned int xs, ys; - int i, j, k; - - if(x == y) - return 1; - /* Find indexes of highest-most used digit in each of the numbers. */ - xs = *x++; - ys = *y++; - for(i = xs - 1; i >= 0; i--) - if(x[i] != 0) - break; - for(j = ys - 1; j >= 0; j--) - if(y[j] != 0) - break; - /* Both zero? */ - if(i < 0 && j < 0) - return 1; - /* Quick answers exists for different-sized numbers. Find them. */ - if(i < j) - return 0; - if(i > j) - return 1; - /* Compare digit by digit. */ - for(k = i; k >= 0; k--) - { - if(x[k] < y[k]) - return 0; - if(x[k] > y[k]) - return 1; - } - return x[k] >= y[k]; -} - -/* ----------------------------------------------------------------------------------------- */ - -/* Computes x += y. */ -void v_bignum_add_digit(VBigDig *x, VBigDig y) -{ - unsigned int i, s = *x++, t; - - t = x[0] + y; - x[0] = t; - if(t > MAX_DIG) - { - for(i = 1; i < s; i++) - { - if(++x[i]) - break; - } - } -} - -/* Computes x -= y. */ -void v_bignum_sub_digit(VBigDig *x, VBigDig y) -{ - unsigned int i, s = *x++, t; - - t = x[0] - y; - x[0] = t; - if(t > MAX_DIG) - { - for(i = 1; i < s; i++) - { - x[i]--; - if(x[i] < MAX_DIG) - break; - } - } -} - -/* Computes x *= y. */ -void v_bignum_mul_digit(VBigDig *x, VBigDig y) -{ - unsigned int i, s = *x++, carry, t; - - for(i = carry = 0; i < s; i++) - { - t = x[i] * y + carry; - x[i] = t; - carry = t >> (CHAR_BIT * sizeof *x); - } -} - -/* ----------------------------------------------------------------------------------------- */ - -/* Computes x += y. */ -void v_bignum_add(VBigDig *x, const VBigDig *y) -{ - unsigned int i, xs = *x++, ys = *y++, s, carry, t; - - s = xs < ys ? xs : ys; - for(i = carry = 0; i < s; i++) - { - t = x[i] + y[i] + carry; - x[i] = t; - carry = t > MAX_DIG; - } - for(; carry && i < xs; i++) - { - t = x[i] + carry; - x[i] = t; - carry = t > MAX_DIG; - } -} - -/* Computes x -= y. */ -void v_bignum_sub(VBigDig *x, const VBigDig *y) -{ - unsigned int i, xs = *x++, ys = *y++, s, carry, t; - - if(x == y) - { - v_bignum_set_zero(x - 1); - return; - } - s = xs < ys ? xs : ys; - for(i = carry = 0; i < s; i++) - { - t = x[i] - y[i] - carry; - x[i] = t; - carry = t > MAX_DIG; - } - for(; carry && i < xs; i++) - { - t = x[i] - carry; - x[i] = t; - carry = t > MAX_DIG; - } -} - -/* Compute x *= y, using as many digits as is necessary, then truncating the - * result down. This is Algorithm 14.12 from "Handbook of Applied Cryptography". -*/ -void v_bignum_mul(VBigDig *x, const VBigDig *y) -{ - int n = *x, t = *y, i, j; - VBigDigs uv = 0, c, w[2048]; - - memset(w, 0, (n + t + 1) * sizeof *w); - for(i = 0; i < t; i++) - { - c = 0; - for(j = 0; j < n; j++) - { - uv = w[i + j] + x[1 + j] * y[1 + i] + c; - w[i + j] = uv & ((1 << V_BIGBITS) - 1); - c = uv >> V_BIGBITS; - } - w[i + n + 1] = uv >> V_BIGBITS; - } - /* Write low words of w back into x. */ - for(i = 0; i < *x; i++) - x[1 + i] = w[i]; -} - -/* Computes x /= y and remainder = x % y. */ -void v_bignum_div(VBigDig *x, const VBigDig *y, VBigDig *remainder) -{ - VBigDig *q, *work; - int msbx = v_bignum_bit_msb(x), msby = v_bignum_bit_msb(y), next; - - /* Compare magnitudes of inputs, allows quick exits. */ - if(msby > msbx) - { - if(remainder != NULL) - v_bignum_set_bignum(remainder, x); - v_bignum_set_zero(x); - return; - } - if(msby < 0) - { - v_bignum_set_zero(x); - return; - } - q = bignum_alloc(*x); - v_bignum_set_zero(q); - work = bignum_alloc(*x); - v_bignum_set_bignum_part(work, x, msbx, msby + 1); - - for(next = msbx - (msby + 1); next >= -1; next--) - { - v_bignum_bit_shift_left_1(q); - if(v_bignum_gte(work, y)) - { - q[1] |= 1; - v_bignum_sub(work, y); - } - v_bignum_bit_shift_left_1(work); - if(v_bignum_bit_test(x, next)) - work[1] |= 1; - } - v_bignum_bit_shift_right(work, 1); /* Undo the last shift (when next==-1). */ - - if(remainder != NULL) - { -/* printf("div() got remainder "); - v_bignum_print_hex_lf(work); -*/ - v_bignum_set_bignum(remainder, work); - } - bignum_free(work); - v_bignum_set_bignum(x, q); - bignum_free(q); -} - -/* Computes x %= y. */ -void v_bignum_mod(VBigDig *x, const VBigDig *y) -{ - int digs; - VBigDig *tmp; - -/* printf("computing "); - v_bignum_print_hex(x); - printf("L %% "); - v_bignum_print_hex(y); -*/ - digs = *x > *y ? *x : *y; - tmp = bignum_alloc(digs); - v_bignum_div(x, y, tmp); - v_bignum_set_bignum(x, tmp); - bignum_free(tmp); -/* printf("L = "); - v_bignum_print_hex_lf(x); -*/ -} - -/* Initialize Barrett reduction by computing the "mu" helper value. Defined in - * Handbook of Applied Cryptography algorithm 14.42 as floor(b^2k / m). -*/ -const VBigDig * v_bignum_reduce_begin(const VBigDig *m) -{ - VBigDig *mu; - int k; - - for(k = *m; m[k] == 0; k--) - ; -/* printf("k=%d -> digits are 0..%u\n", k, k - 1); - printf("computing mu=floor(65536^%d/", 2 * k); - v_bignum_print_hex(m); - printf(")\n"); -*/ mu = bignum_alloc(2 * k + 1); - /* b ^ 2k is just 65536 << 2k, i.e. set bit 16 * 2k. */ - v_bignum_set_zero(mu); - v_bignum_bit_set(mu, V_BIGBITS * 2 * k); -/* v_bignum_print_hex_lf(mu);*/ - v_bignum_div(mu, m, NULL); - - return mu; -} - -void v_bignum_reduce_end(const VBigDig *mu) -{ - bignum_free(mu); -} - -/* Compute x % m, using mu as the helper quantity mu, precomputed by the - * routine above. -*/ -void v_bignum_reduce(VBigDig *x, const VBigDig *m, const VBigDig *mu) -{ - VBigDig *q, *r1, *r2, *r; - int i, k; - - for(k = *m; m[k] == 0; k--) - ; - /* Step 1, compute the q helper. */ - q = bignum_alloc(*x + *mu - (k - 1)); /* Tighter bound number length (was 2 * *x). */ - v_bignum_set_bignum(q, x); - v_bignum_bit_shift_right(q, V_BIGBITS * (k - 1)); - v_bignum_mul(q, mu); - v_bignum_bit_shift_right(q, V_BIGBITS * (k + 1)); - - /* Step 2, initialize. */ - r1 = bignum_alloc(*x); - r2 = bignum_alloc(*x); - v_bignum_set_bignum(r1, x); - for(i = k + 1; i < *r1; i++) - r1[i + 1] = 0; - v_bignum_set_bignum(r2, q); - v_bignum_mul(r2, m); - for(i = k + 1; i < *r2; i++) - r2[i + 1] = 0; - r = x; - v_bignum_set_bignum(r, r1); - v_bignum_sub(r, r2); - /* Step 3, make sure r is positive. */ - if(v_bignum_bit_test(r, V_BIGBITS * *r - 1)) - { - VBigDig *term; - - term = bignum_alloc(k + 1 * V_BIGBITS); - v_bignum_set_zero(term); - v_bignum_bit_set(term, V_BIGBITS * (k + 1)); - v_bignum_add(r, term); - bignum_free(term); - } - /* Step 4, loop. */ - while(v_bignum_gte(r, m)) - v_bignum_sub(r, m); - - bignum_free(r2); - bignum_free(r1); - bignum_free(q); -} - -/* Compute x * x using the algorithm 14.16 from "Handbook of Applied Cryptography". - * Note that since 'w' needs to be double-precision (i.e., 32-bit), we cannot allocate - * it using bignum_alloc() cleanly. Thus the static limit, which should be enough here. - * NOTE: This very much assumes V_BIGBITS == 16. -*/ -void v_bignum_square_half(VBigDig *x) -{ - VBigDigs w[256], uv, c, ouv; - int t = *x / 2, i, j, high; - - if(t == 0) - return; - for(; x[t] == 0; t--) - ; - memset(w, 0, 2 * t * sizeof *w); /* Clear digits of w. */ -/* printf("print %lu, ", ++count); - v_bignum_print_hex(x); - printf("*"); - v_bignum_print_hex(x); -*/ for(i = 0; i < t; i++) - { -/* printf("computing w[%d]: %lX + %lX * %lX\n", 2 * i, w[2 * i], x[1 + i], x[1 + i]);*/ - uv = w[2 * i] + x[1 + i] * x[1 + i]; -/* printf("setting w[%d]=%X [before]\n", 2 * i, uv & 0xffff);*/ - w[2 * i] = uv & 0xffff; - c = uv >> V_BIGBITS; -/* printf("uv before=%X, c=%X\n", uv, c);*/ - high = 0; - for(j = i + 1; j < t; j++) - { -/* printf("computing uv=%X+2*%X*%X+%X\n", w[i + j], x[1 + j], x[1 + i], c);*/ - uv = ((VBigDigs)x[1 + j]) * ((VBigDigs)x[1 + i]); - high = (uv & 0x80000000) != 0; - uv *= 2; - ouv = uv; /* Addition below might wrap and generate high bit. */ - uv += w[i + j] + c; -/* printf("ouv=0x%lX uv=0x%lX\n", ouv, uv);*/ - high |= uv < ouv; -/* printf("setting w[%d]=%lX [inner] uv=%lX high=%d c=%X\n", i + j, uv & 0xffff, uv, high, c);*/ - w[i + j] = uv & 0xffff; - c = (uv >> V_BIGBITS) | (high << V_BIGBITS); - } -/* printf("setting w[%d] to %X [after]\n", i + t, (uv >> 16) | (high << 16));*/ - w[i + t] = (uv >> V_BIGBITS) | (high << V_BIGBITS); - } -/* printf("w=0x"); - for(i = *x - 1; i >= 0; i--) - printf("%04X.", w[i]); - printf("\n"); -*/ /* Write low words of w back into x, trashing it with the square. */ - for(i = 0; i < 2 * t; i++) - x[1 + i] = w[i]; - for(; i < *x; i++) - x[1 + i] = 0; -/* printf("=="); - v_bignum_print_hex_lf(x); -*/ -} - -/* Computes x = (x^y) % n, where ^ denotes exponentiation. */ -void v_bignum_pow_mod(VBigDig *x, const VBigDig *y, const VBigDig *n) -{ - VBigDig *tmp; - const VBigDig *mu; - int i, k; - -/* printf("computing pow("); - v_bignum_print_hex(x); - printf("L,"); - v_bignum_print_hex(y); - printf("L,"); - v_bignum_print_hex(n); - printf("L)\n"); -*/ - tmp = bignum_alloc(2 * *x); /* Squaring needs twice the bits, or lossage occurs. */ - v_bignum_set_bignum(tmp, x); - k = v_bignum_bit_msb(y); - mu = v_bignum_reduce_begin(n); - for(i = k - 1; i >= 0; i--) - { - v_bignum_square_half(tmp); - v_bignum_reduce(tmp, n, mu); - if(v_bignum_bit_test(y, i)) - { - v_bignum_mul(tmp, x); - v_bignum_reduce(tmp, n, mu); - } - } - v_bignum_set_bignum(x, tmp); - v_bignum_reduce_end(mu); - bignum_free(tmp); -} - -/* ----------------------------------------------------------------------------------------- */ - -#if defined STANDALONE - -int main(void) -{ - VBigDig VBIGNUM(x, 3648), VBIGNUM(y, 128), VBIGNUM(z, 128); - - printf("MAX_DIG=%u\n", MAX_DIG); - - v_bignum_set_string_hex(x, "0x433864FE0F8FAC180FF1BC3A5BFD0C5566F6B11679E27294EDCC43056EB73EE118415E0CD6E6519509476EB21341ED0328BA7B14E0ED80D5E100A4549C5202B57B4CF17A74987631B6BA896C0DBA2095A7EDE5B9C4B4EEFCD1B9EF8474BCB7FBD0F64B549625D444847ED1FCB7F8050EB4F22794F694A0FAC6DFFB781C264B227966840185F9216484F6A7954741CB11FC14DEC2937EAD2CE640FD9A4339706BDB5BC355079C2F2F7994669DFA5B20C50D957A676E67C86835037078323A0BDAD3686B8E638749F327A7AD433C0D18BCD2FC970D125914C7FBEE061290A0F0F3572E207"); - v_bignum_set_bignum(y, x); - v_bignum_set_digit(z, 77); - - printf("x:"); - v_bignum_print_hex_lf(x); - printf("y:"); - v_bignum_print_hex_lf(y); - printf("r:"); - v_bignum_print_hex_lf(z); - v_bignum_pow_mod(x, y, z); - printf(" ="); - v_bignum_print_hex_lf(x); - - return 0; -} - -#endif /* STANDALONE */ diff --git a/extern/verse/dist/v_bignum.h b/extern/verse/dist/v_bignum.h deleted file mode 100644 index 06e58844452..00000000000 --- a/extern/verse/dist/v_bignum.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Verse routines for big integer operations. - * Handy in heavy encryption done during connect. -*/ - -#include - -#include "v_randgen.h" - -/* ----------------------------------------------------------------------------------------- */ - -typedef unsigned short VBigDig; /* Type used to hold one digit of a bignum. */ -typedef unsigned int VBigDigs; /* Should hold precisely two digits. */ - -#define V_BIGBITS (CHAR_BIT * sizeof (VBigDig)) - -/* Use this macro to initialize big number variables, like so: - * VBigDig BIGNUM(foo, 128), BIGNUM(bar, 256); - * Creates automatic variables 'foo' of 128 bits, and 'bar' of 256. - * - * Note that 'bits' must be a multiple of V_BIGBITS, completely - * arbitrary number sizes are not supported by this module. -*/ -#define VBIGNUM(n, bits) n[1 + (bits / V_BIGBITS)] = { bits / V_BIGBITS } - -/* ----------------------------------------------------------------------------------------- */ - -/* Import/export numbers from raw bits. The number x must have been allocated - * with the desired number of bits to read/write. -*/ -extern void v_bignum_raw_import(VBigDig *x, const void *bits); -extern void v_bignum_raw_export(const VBigDig *x, void *bits); - -/* Initializers. */ -extern void v_bignum_set_zero(VBigDig *x); -extern void v_bignum_set_one(VBigDig *x); -extern void v_bignum_set_digit(VBigDig *x, VBigDig y); -extern void v_bignum_set_string(VBigDig *x, const char *string); /* Decimal. */ -extern void v_bignum_set_string_hex(VBigDig *x, const char *string); -extern void v_bignum_set_bignum(VBigDig *x, const VBigDig *y); -/* x = most significant bits of , starting at . Right- - * adjusted in x, so that e.g. y=0xcafebabec001 msb=47 bits=16 gives x=0xcafe. -*/ -extern void v_bignum_set_bignum_part(VBigDig *x, const VBigDig *y, - unsigned int msb, unsigned int bits); -extern void v_bignum_set_random(VBigDig *x, VRandGen *gen); - -/* Handy during debugging. */ -extern void v_bignum_print_hex(const VBigDig *x); -extern void v_bignum_print_hex_lf(const VBigDig *x); - -/* Bit operators. */ -extern void v_bignum_not(VBigDig *x); -extern int v_bignum_bit_test(const VBigDig *x, unsigned int bit); -extern void v_bignum_bit_set(VBigDig *x, unsigned int bit); -extern int v_bignum_bit_msb(const VBigDig *x); -extern int v_bignum_bit_size(const VBigDig *x); -extern void v_bignum_bit_shift_left(VBigDig *x, unsigned int count); -extern void v_bignum_bit_shift_left_1(VBigDig *x); -extern void v_bignum_bit_shift_right(VBigDig *x, unsigned int count); - -/* Comparators. */ -extern int v_bignum_eq_zero(const VBigDig *x); /* x == 0. */ -extern int v_bignum_eq_one(const VBigDig *x); /* x == 1. */ -extern int v_bignum_eq(const VBigDig *x, const VBigDig *y); /* x == y. */ -extern int v_bignum_gte(const VBigDig *x, const VBigDig *y); /* x >= y. */ - -/* Number vs single-digit arithmetic. */ -extern void v_bignum_add_digit(VBigDig *x, VBigDig y); /* x += y. */ -extern void v_bignum_sub_digit(VBigDig *x, VBigDig y); /* x -= y. */ -extern void v_bignum_mul_digit(VBigDig *x, VBigDig y); /* x *= y. */ - -/* Arithmetic. */ -extern void v_bignum_add(VBigDig *x, const VBigDig *y); /* x += y. */ -extern void v_bignum_sub(VBigDig *x, const VBigDig *y); /* x -= y. */ -extern void v_bignum_mul(VBigDig *x, const VBigDig *y); /* x *= y. */ -extern void v_bignum_div(VBigDig *x, const VBigDig *y, VBigDig *remainder); -extern void v_bignum_mod(VBigDig *x, const VBigDig *y); /* x %= y. */ - -/* Barrett reducer for fast x % m computation. Requires precalcing step. */ -extern const VBigDig * v_bignum_reduce_begin(const VBigDig *m); -extern void v_bignum_reduce(VBigDig *x, const VBigDig *m, const VBigDig *mu); -extern void v_bignum_reduce_end(const VBigDig *mu); - -/* Compute x *= x, assuming x only uses half of its actual size. */ -extern void v_bignum_square_half(VBigDig *x); - -/* Compute pow(x, y, n) == (x raised to the y:th power) modulo n. */ -extern void v_bignum_pow_mod(VBigDig *x, const VBigDig *y, const VBigDig *n); diff --git a/extern/verse/dist/v_cmd_buf.c b/extern/verse/dist/v_cmd_buf.c deleted file mode 100644 index b7faf227352..00000000000 --- a/extern/verse/dist/v_cmd_buf.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "verse_header.h" -#include "v_pack.h" -#include "v_cmd_buf.h" - -static const size_t vcmdbuf_chunk_size[] = { 10000, 10000, 10000, 10000, 8000, 5000, 500 }; /* If you think memory is cheap, set this to a high value. */ - -/* Sizes of individual command buffers, indexable by VCMDBufSize values. Switch-killer. */ -static const size_t vcmdbuf_size[] = { - sizeof (VCMDBuffer10), sizeof (VCMDBuffer20), sizeof (VCMDBuffer30), sizeof (VCMDBuffer80), - sizeof (VCMDBuffer160), sizeof (VCMDBuffer320), sizeof (VCMDBuffer1500) -}; - -#define VCMDBUF_INIT_CHUNK_FACTOR 0.5 - -static struct { - VCMDBufHead *buffers[VCMDBS_COUNT]; - unsigned int available[VCMDBS_COUNT]; -} VCMDBufData; - -static boolean v_cmd_buf_initialized = FALSE; - -void cmd_buf_init(void) -{ - unsigned int i, j; - VCMDBufHead *buf, *b; - - for(i = 0; i < VCMDBS_COUNT; i++) - { - VCMDBufData.buffers[i] = NULL; - VCMDBufData.available[i] = (unsigned int) (vcmdbuf_chunk_size[i] * VCMDBUF_INIT_CHUNK_FACTOR); - for(j = 0, buf = NULL; j < VCMDBufData.available[i]; j++, buf = b) - { - b = v_cmd_buf_allocate(i); - b->next = buf; - } - VCMDBufData.buffers[i] = buf; - } - v_cmd_buf_initialized = TRUE; -} - -VCMDBufHead * v_cmd_buf_allocate(VCMDBufSize buf_size) -{ - VCMDBufHead *output = NULL; - - if(VCMDBufData.buffers[buf_size] != NULL) - { - output = VCMDBufData.buffers[buf_size]; - VCMDBufData.buffers[buf_size] = output->next; - VCMDBufData.available[buf_size]--; - } - else - { - if(buf_size < sizeof vcmdbuf_size / sizeof *vcmdbuf_size) - output = malloc(vcmdbuf_size[buf_size]); - else - { - fprintf(stderr, "v_cmd_buf.c: Can't handle buffer size %d\n", buf_size); - return NULL; - } - output->buf_size = buf_size; - } - output->next = NULL; - output->packet = 0; - output->size = 0; - output->address_size = -1; - return output; -} - -void v_cmd_buf_free(VCMDBufHead *head) -{ - if(VCMDBufData.available[head->buf_size] < vcmdbuf_chunk_size[head->buf_size]) - { - head->next = VCMDBufData.buffers[head->buf_size]; - VCMDBufData.buffers[head->buf_size] = head; - VCMDBufData.available[head->buf_size]++; - } - else - free(head); -} - -void v_cmd_buf_set_size(VCMDBufHead *head, unsigned int size) -{ - head->size = size; -} - -void v_cmd_buf_set_address_size(VCMDBufHead *head, unsigned int size) -{ - unsigned int i; - - head->address_size = size; - head->address_sum = 0; - for(i = 1; i < size + 1; i++) - head->address_sum += i * i * (uint32)(((VCMDBuffer1500 *)head)->buf[i - 1]); -} - -void v_cmd_buf_set_unique_address_size(VCMDBufHead *head, unsigned int size) -{ - static unsigned int i = 0; - - head->address_size = size; - head->address_sum = i++; -} - -boolean v_cmd_buf_compare(VCMDBufHead *a, VCMDBufHead *b) -{ - if(a->address_sum != b->address_sum) - return FALSE; - if(a->address_size != b->address_size) - return FALSE; - return memcmp(((VCMDBuffer1500 *)a)->buf, ((VCMDBuffer1500 *)b)->buf, a->address_size) == 0; -} diff --git a/extern/verse/dist/v_cmd_buf.h b/extern/verse/dist/v_cmd_buf.h deleted file mode 100644 index 6eda7640bb1..00000000000 --- a/extern/verse/dist/v_cmd_buf.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -** -*/ - -#include - -#include "verse_header.h" -#include "v_pack.h" - -#define V_NOQ_MAX_PACKET_SIZE 1500 - -typedef enum { - VCMDBS_10 = 0, - VCMDBS_20 = 1, - VCMDBS_30 = 2, - VCMDBS_80 = 3, - VCMDBS_160 = 4, - VCMDBS_320 = 5, - VCMDBS_1500 = 6, - VCMDBS_COUNT = 7 -} VCMDBufSize; - -typedef struct { - void *next; - uint32 packet; - unsigned int address_size; - unsigned int address_sum; - VCMDBufSize buf_size; - unsigned int size; -} VCMDBufHead; - -typedef struct { - VCMDBufHead head; - uint8 buf[10]; -} VCMDBuffer10; - -typedef struct { - VCMDBufHead head; - uint8 buf[20]; -} VCMDBuffer20; - -typedef struct { - VCMDBufHead head; - uint8 buf[30]; -} VCMDBuffer30; - -typedef struct { - VCMDBufHead head; - uint8 buf[80]; -} VCMDBuffer80; - -typedef struct { - VCMDBufHead head; - uint8 buf[160]; -} VCMDBuffer160; - -typedef struct { - VCMDBufHead head; - uint8 buf[320]; -} VCMDBuffer320; - - -typedef struct { - VCMDBufHead head; - uint8 buf[1500]; -} VCMDBuffer1500; - -extern VCMDBufHead *v_cmd_buf_allocate(VCMDBufSize buf_size); -extern void v_cmd_buf_free(VCMDBufHead *head); - -extern void v_cmd_buf_set_size(VCMDBufHead *head, unsigned int size); -extern void v_cmd_buf_set_address_size(VCMDBufHead *head, unsigned int size); -extern void v_cmd_buf_set_unique_address_size(VCMDBufHead *head, unsigned int size); -extern boolean v_cmd_buf_compare(VCMDBufHead *a, VCMDBufHead *b); diff --git a/extern/verse/dist/v_cmd_def_a.c b/extern/verse/dist/v_cmd_def_a.c deleted file mode 100644 index 8557601428b..00000000000 --- a/extern/verse/dist/v_cmd_def_a.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Command definitions for audio node commands. -*/ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_audio_cmd_def(void) -{ - v_cg_new_cmd(V_NT_AUDIO, "a_buffer_create", 160, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_BUFFER_ID, "buffer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_add_param(VCGP_ENUM_NAME, "VNABlockType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_REAL64, "frequency"); - v_cg_alias(FALSE, "a_buffer_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_AUDIO, "a_buffer_subscribe", 161, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_BUFFER_ID, "layer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "a_buffer_unsubscribe", NULL, 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_AUDIO, "a_block_set", 162, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "buffer_id"); - v_cg_add_param(VCGP_UINT32, "block_index"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_ENUM_NAME, "VNABlockType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNABlock"); - v_cg_add_param(VCGP_POINTER, "samples"); - - v_cg_add_param(VCGP_PACK_INLINE, "\tbuffer_pos += vnp_pack_audio_block(&buf[buffer_pos], type, samples);\n"); - - v_cg_add_param(VCGP_UNPACK_INLINE, "\tif(type <= VN_A_BLOCK_REAL64)\n\t{\n" - "\t\tVNABlock\tblock;\n" - "\t\tbuffer_pos += vnp_unpack_audio_block(&buf[buffer_pos], type, &block);\n" - "\t\tif(func_a_block_set != NULL)\n" - "\t\t\tfunc_a_block_set(v_fs_get_user_data(162), node_id, buffer_id, block_index, (VNABlockType) type, &block);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_alias(FALSE, "a_block_clear", "if(type > VN_A_BLOCK_REAL64)", 3, NULL); - v_cg_end_cmd(); - - - v_cg_new_cmd(V_NT_AUDIO, "a_stream_create", 163, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "stream_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_alias(FALSE, "a_stream_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_AUDIO, "a_stream_subscribe", 164, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "stream_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "a_stream_unsubscribe", NULL, 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_AUDIO, "a_stream", 165, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "stream_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "time_s"); - v_cg_add_param(VCGP_UINT32, "time_f"); - v_cg_add_param(VCGP_ENUM_NAME, "VNABlockType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_REAL64, "frequency"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNABlock"); - v_cg_add_param(VCGP_POINTER, "samples"); - - v_cg_add_param(VCGP_PACK_INLINE, "\tbuffer_pos += vnp_pack_audio_block(&buf[buffer_pos], type, samples);\n"); - - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n\t\tVNABlock\tblock;\n\tbuffer_pos += vnp_unpack_audio_block(&buf[buffer_pos], type, &block);\n" - "\t\tif(func_a_stream != NULL)\n" - "\t\t\tfunc_a_stream(v_fs_get_user_data(165), node_id, stream_id, time_s, time_f, (VNABlockType) type, frequency, &block);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - - v_cg_end_cmd(); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_b.c b/extern/verse/dist/v_cmd_def_b.c deleted file mode 100644 index b266b03648c..00000000000 --- a/extern/verse/dist/v_cmd_def_b.c +++ /dev/null @@ -1,44 +0,0 @@ - -#include -#include - -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_bitmap_cmd_def(void) -{ - v_cg_new_cmd(V_NT_BITMAP, "b_dimensions_set", 80, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT16, "width"); - v_cg_add_param(VCGP_UINT16, "height"); - v_cg_add_param(VCGP_UINT16, "depth"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_BITMAP, "b_layer_create", 81, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_add_param(VCGP_ENUM_NAME, "VNBLayerType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_alias(FALSE, "b_layer_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_BITMAP, "b_layer_subscribe", 82, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT8, "level"); - v_cg_alias(FALSE, "b_layer_unsubscribe", "if(level == 255)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_manual_cmd(83, "b_tile_set", "void verse_send_b_tile_set(VNodeID node_id, VLayerID layer_id, " - "uint16 tile_x, uint16 tile_y, uint16 z, VNBLayerType type, const VNBTile *tile)", - NULL, NULL); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_c.c b/extern/verse/dist/v_cmd_def_c.c deleted file mode 100644 index 317b45e1a27..00000000000 --- a/extern/verse/dist/v_cmd_def_c.c +++ /dev/null @@ -1,35 +0,0 @@ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_curve_cmd_def(void) -{ - v_cg_new_cmd(V_NT_CURVE, "c_curve_create", 128, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "curve_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_add_param(VCGP_UINT8, "dimensions"); - v_cg_alias(FALSE, "c_curve_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_CURVE, "c_curve_subscribe", 129, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "curve_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "c_curve_unsubscribe", "if(!alias_bool)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_manual_cmd(130, "c_key_set", "void verse_send_c_key_set(VNodeID node_id, VLayerID curve_id, " - "uint32 key_id, uint8 dimensions, const real64 *pre_value, const uint32 *pre_pos, " - "const real64 *value, real64 pos, const real64 *post_value, const uint32 *post_pos)", - "c_key_destroy", "void verse_send_c_key_destroy(VNodeID node_id, VLayerID curve_id, " - "uint32 key_id)"); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_g.c b/extern/verse/dist/v_cmd_def_g.c deleted file mode 100644 index 5a4ea7202b4..00000000000 --- a/extern/verse/dist/v_cmd_def_g.c +++ /dev/null @@ -1,183 +0,0 @@ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_geometry_cmd_def(void) -{ - unsigned int order[] = { 0, 2 }; - - v_cg_new_cmd(V_NT_GEOMETRY, "g_layer_create", 48, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_add_param(VCGP_ENUM_NAME, "VNGLayerType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_UINT32, "def_uint"); - v_cg_add_param(VCGP_REAL64, "def_real"); - v_cg_alias(FALSE, "g_layer_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_layer_subscribe", 49, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_ENUM_NAME, "VNRealFormat"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_alias(FALSE, "g_layer_unsubscribe", "if(type > VN_FORMAT_REAL64)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_vertex_set_xyz_real32", 50, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "vertex_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL32, "x"); - v_cg_add_param(VCGP_REAL32, "y"); - v_cg_add_param(VCGP_REAL32, "z"); - v_cg_alias(FALSE, "g_vertex_delete_real32", "if(x == V_REAL32_MAX || y == V_REAL32_MAX || z == V_REAL32_MAX)", 2, order); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_vertex_set_xyz_real64", 51, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "vertex_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL64, "x"); - v_cg_add_param(VCGP_REAL64, "y"); - v_cg_add_param(VCGP_REAL64, "z"); - v_cg_alias(FALSE, "g_vertex_delete_real64", "if(x == V_REAL64_MAX || y == V_REAL64_MAX || z == V_REAL64_MAX)", 2, order); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_vertex_set_uint32", 52, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "vertex_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "value"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_vertex_set_real64", 53, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "vertex_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL64, "value"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_vertex_set_real32", 54, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "vertex_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL32, "value"); - v_cg_end_cmd(); -/* - v_cg_new_cmd(V_NT_GEOMETRY, "g_vertex_delete", VCGCT_NORMAL); - v_cg_add_param(VCGP_UINT32, "vertex_id"); - v_cg_end_cmd(); -*/ - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_corner_uint32", 55, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "v0"); - v_cg_add_param(VCGP_UINT32, "v1"); - v_cg_add_param(VCGP_UINT32, "v2"); - v_cg_add_param(VCGP_UINT32, "v3"); - v_cg_alias(FALSE, "g_polygon_delete", "if(layer_id == 1 && v0 == ~0u)", 2, order); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_corner_real64", 56, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL64, "v0"); - v_cg_add_param(VCGP_REAL64, "v1"); - v_cg_add_param(VCGP_REAL64, "v2"); - v_cg_add_param(VCGP_REAL64, "v3"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_corner_real32", 57, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL32, "v0"); - v_cg_add_param(VCGP_REAL32, "v1"); - v_cg_add_param(VCGP_REAL32, "v2"); - v_cg_add_param(VCGP_REAL32, "v3"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_face_uint8", 58, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT8, "value"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_face_uint32", 59, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "value"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_face_real64", 60, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL64, "value"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_polygon_set_face_real32", 61, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_LAYER_ID, "layer_id"); - v_cg_add_param(VCGP_UINT32, "polygon_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL32, "value"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_crease_set_vertex", 62, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "layer"); - v_cg_add_param(VCGP_UINT32, "def_crease"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_crease_set_edge", 63, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "layer"); - v_cg_add_param(VCGP_UINT32, "def_crease"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_GEOMETRY, "g_bone_create", 64, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "bone_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "weight"); - v_cg_add_param(VCGP_NAME, "reference"); - v_cg_add_param(VCGP_UINT16, "parent"); - v_cg_add_param(VCGP_REAL64, "pos_x"); - v_cg_add_param(VCGP_REAL64, "pos_y"); - v_cg_add_param(VCGP_REAL64, "pos_z"); - v_cg_add_param(VCGP_NAME, "position_label"); - v_cg_add_param(VCGP_NAME, "rotation_label"); - v_cg_add_param(VCGP_NAME, "scale_label"); - v_cg_alias(FALSE, "g_bone_destroy", "if(weight[0] == 0)", 2, NULL); - - v_cg_end_cmd(); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_m.c b/extern/verse/dist/v_cmd_def_m.c deleted file mode 100644 index 3f4b9aa7178..00000000000 --- a/extern/verse/dist/v_cmd_def_m.c +++ /dev/null @@ -1,273 +0,0 @@ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_material_cmd_def(void) -{ - v_cg_new_cmd(V_NT_MATERIAL, "m_fragment_create", 68, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_FRAGMENT_ID, "frag_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_ENUM_NAME, "VNMFragmentType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_POINTER_TYPE, "VMatFrag"); - v_cg_add_param(VCGP_POINTER, "fragment"); - - v_cg_add_param(VCGP_PACK_INLINE, "\tswitch(type)\n" - "\t{\n" - "\tcase VN_M_FT_COLOR :\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->color.red);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->color.green);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->color.blue);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_LIGHT :\n" - "\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->light.type);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->light.normal_falloff);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], fragment->light.brdf);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->light.brdf_r, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->light.brdf_g, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->light.brdf_b, 16);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_REFLECTION :\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->reflection.normal_falloff);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_TRANSPARENCY :\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->transparency.normal_falloff);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->transparency.refraction_index);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_GEOMETRY :\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->geometry.layer_r, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->geometry.layer_g, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->geometry.layer_b, 16);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_VOLUME :\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.diffusion);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.col_r);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.col_g);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.col_b);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_VIEW :\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_TEXTURE :\n" - "\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], fragment->texture.bitmap);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->texture.layer_r, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->texture.layer_g, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->texture.layer_b, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->texture.filtered);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->texture.mapping);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_NOISE :\n" - "\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->noise.type);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->noise.mapping);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_BLENDER :\n" - "\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->blender.type);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->blender.data_a);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->blender.data_b);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->blender.control);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_CLAMP :\n" - "\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->clamp.min);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->clamp.red);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->clamp.green);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->clamp.blue);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->clamp.data);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_MATRIX :\n" - "\t\t{\n" - "\t\t\tunsigned int i;\n" - "\t\t\tfor(i = 0; i < 16; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->matrix.matrix[i]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->matrix.data);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_RAMP :\n" - "\t\tif(fragment->ramp.point_count == 0)\n" - "\t\t\treturn;\n" - "\t\t{\n" - "\t\t\tunsigned int i, pos;\n" - "\t\t\tdouble last;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->ramp.type);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->ramp.channel);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->ramp.mapping);\n" - "\t\t\tpos = buffer_pos;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], fragment->ramp.point_count);\n" - "\t\t\tlast = fragment->ramp.ramp[0].pos - 1;\n" - "\t\t\tfor(i = 0; i < fragment->ramp.point_count && fragment->ramp.ramp[i].pos > last && i < 48; i++)\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].pos);\n" - "\t\t\t\tlast = fragment->ramp.ramp[i].pos;\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].red);\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].green);\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].blue);\n" - "\t\t\t}\n\t\t\tif(i != fragment->ramp.point_count)\n" - "\t\t\t\tvnp_raw_pack_uint8(&buf[pos], i);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_ANIMATION :\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->animation.label, 16);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_ALTERNATIVE :\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->alternative.alt_a);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->alternative.alt_b);\n" - "\t\tbreak;\n" - "\tcase VN_M_FT_OUTPUT :\n" - "\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->output.label, 16);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->output.front);\n" - "\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->output.back);\n" - "\t\tbreak;\n" - "\t}\n"); - - v_cg_add_param(VCGP_UNPACK_INLINE, "\tif(type <= VN_M_FT_OUTPUT)\n" - "\t{\n" - "\t\tVMatFrag frag;\n" - "\t\tuint8 temp;\n" - "\t\tswitch(type)\n" - "\t\t{\n" - "\t\tcase VN_M_FT_COLOR :\n" - "\t\t\tif(buffer_pos + 3 * 8 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.color.red);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.color.green);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.color.blue);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_LIGHT :\n" - "\t\t\tif(buffer_pos + 13 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\tfrag.light.type = (VNMLightType)temp;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.light.normal_falloff);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &frag.light.brdf);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.light.brdf_r, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.light.brdf_g, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.light.brdf_b, 16, buffer_length - buffer_pos);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_REFLECTION :\n" - "\t\t\tif(buffer_pos + 8 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.reflection.normal_falloff);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_TRANSPARENCY :\n" - "\t\t\tif(buffer_pos + 16 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.transparency.normal_falloff);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.transparency.refraction_index);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_VOLUME :\n" - "\t\t\tif(buffer_pos + 32 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.diffusion);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.col_r);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.col_g);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.col_b);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_VIEW :\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_GEOMETRY :\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.geometry.layer_r, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.geometry.layer_g, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.geometry.layer_b, 16, buffer_length - buffer_pos);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_TEXTURE :\n" - "\t\t\tif(buffer_pos + 10 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &frag.texture.bitmap);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.texture.layer_r, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.texture.layer_g, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.texture.layer_b, 16, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\tfrag.texture.filtered = (VNMNoiseType)temp;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.texture.mapping);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_NOISE :\n" - "\t\t\tif(buffer_pos + 3 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\tfrag.noise.type = (VNMNoiseType)temp;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.noise.mapping);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_BLENDER :\n" - "\t\t\tif(buffer_pos + 7 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\tfrag.blender.type = (VNMBlendType)temp;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.blender.data_a);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.blender.data_b);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.blender.control);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_CLAMP :\n" - "\t\t\tif(buffer_pos + 27 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\tfrag.clamp.min = (VNMBlendType)temp;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.clamp.red);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.clamp.green);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.clamp.blue);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.clamp.data);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_MATRIX :\n" - "\t\t\tif(buffer_pos + 8 * 16 + 2 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\telse\n" - "\t\t\t{\n" - "\t\t\t\tunsigned int i;\n" - "\t\t\t\tfor(i = 0; i < 16; i++)\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.matrix.matrix[i]);\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.matrix.data);\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_RAMP :\n" - "\t\t\tif(buffer_pos + 5 + 4 * 8 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\telse\n" - "\t\t\t{\n" - "\t\t\t\tunsigned int i, pos;\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\t\tfrag.ramp.type = (VNMRampType)temp;\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp);\n" - "\t\t\t\tfrag.ramp.channel = (VNMRampChannel)temp;\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.ramp.mapping);\n" - "\t\t\t\tpos = buffer_pos;\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &frag.ramp.point_count);\n" - "\t\t\t\tfor(i = 0; i < frag.ramp.point_count && buffer_pos + 8 * 4 <= buffer_length && i < 48; i++)\n" - "\t\t\t\t{\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].pos);\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].red);\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].green);\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].blue);\n" - "\t\t\t\t}if(i != frag.ramp.point_count)\n" - "\t\t\t\t\tfrag.ramp.point_count = i;\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_ANIMATION :\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.animation.label, 16, buffer_length - buffer_pos);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_ALTERNATIVE :\n" - "\t\t\tif(buffer_pos + 4 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.alternative.alt_a);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.alternative.alt_b);\n" - "\t\t\tbreak;\n" - "\t\tcase VN_M_FT_OUTPUT :\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.output.label, 16, buffer_length - buffer_pos);\n" - "\t\t\tif(buffer_pos + 4 > buffer_length)\n" - "\t\t\t\treturn -1;\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.output.front);\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.output.back);\n" - "\t\t\tbreak;\n" - "\t\t}\n" - "\t\tif(func_m_fragment_create != NULL)\n" - "\t\t\tfunc_m_fragment_create(v_fs_get_user_data(68), node_id, frag_id, type, &frag);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_alias(FALSE, "m_fragment_destroy", "if(type > VN_M_FT_OUTPUT)", 2, NULL); - - v_cg_end_cmd(); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_o.c b/extern/verse/dist/v_cmd_def_o.c deleted file mode 100644 index a0135f2a4a7..00000000000 --- a/extern/verse/dist/v_cmd_def_o.c +++ /dev/null @@ -1,517 +0,0 @@ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_object_cmd_def(void) -{ - v_cg_new_cmd(V_NT_OBJECT, "o_transform_pos_real32", 32, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "time_s"); - v_cg_add_param(VCGP_UINT32, "time_f"); - v_cg_add_param(VCGP_POINTER_TYPE,"real32"); - v_cg_add_param(VCGP_POINTER, "pos"); - v_cg_add_param(VCGP_POINTER_TYPE,"real32"); - v_cg_add_param(VCGP_POINTER, "speed"); - v_cg_add_param(VCGP_POINTER_TYPE,"real32"); - v_cg_add_param(VCGP_POINTER, "accelerate"); - v_cg_add_param(VCGP_POINTER_TYPE,"real32"); - v_cg_add_param(VCGP_POINTER, "drag_normal"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tunsigned char mask = 0;\n" - "\t\tunsigned int cmd;\n" - "\t\tcmd = buffer_pos++;\n" - "\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], pos[0]);\n" - "\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], pos[1]);\n" - "\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], pos[2]);\n" - "\t\tif(speed != NULL && (speed[0] > 0.0000001 || speed[0] < -0.0000001 || speed[1] > 0.0000001 || speed[1] < -0.0000001 || speed[2] > 0.0000001 || speed[2] < -0.0000001))\n" - "\t\t{\n" - "\t\t\tmask |= 1;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], speed[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], speed[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], speed[2]);\n" - "\t\t}\n" - "\t\tif(accelerate != NULL && (accelerate[0] > 0.0000001 || accelerate[0] < -0.0000001 || accelerate[1] > 0.0000001 || accelerate[1] < -0.0000001 || accelerate[2] > 0.0000001 || accelerate[2] < -0.0000001))\n" - "\t\t{\n" - "\t\t\tmask |= 2;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], accelerate[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], accelerate[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], accelerate[2]);\n" - "\t\t}\n" - "\t\tif(drag_normal != NULL && (drag > 0.0000001 || drag < -0.0000001) && (drag_normal[0] > 0.0000001 || drag_normal[0] < -0.0000001 || drag_normal[1] > 0.0000001 || drag_normal[1] < -0.0000001 || drag_normal[2] > 0.0000001 || drag_normal[2] < -0.0000001))\n" - "\t\t{\n" - "\t\t\tmask |= 4;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag_normal[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag_normal[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag_normal[2]);\n" - "\t\t}\n" - "\t\tif(drag > 0.0000001 || drag < -0.0000001)\n" - "\t\t{\n" - "\t\t\tmask |= 8;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag);\n" - "\t\t}\n" - "\t\tvnp_raw_pack_uint8(&buf[cmd], mask);\n" - "\t}if(FALSE)\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n" - "\t\tfloat output[4][3];\n" - "\t\tunsigned int i, j;\n" - "\t\tchar mask, pow = 1;\n" - "\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask);\n" - "\t\tfor(j = 0; j < 3; j++)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &output[0][j]);\n" - "\t\tfor(i = 1; i < 4; i++)\n" - "\t\t{\n" - "\t\t\tif((mask & pow) != 0)\n" - "\t\t\t\tfor(j = 0; j < 3; j++)\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &output[i][j]);\n" - "\t\t\telse\n" - "\t\t\t\tfor(j = 0; j < 3; j++)\n" - "\t\t\t\t\toutput[i][j] = 0;\n" - "\t\t\tpow *= 2;\n" - "\t\t}\n" - "\t\tif((mask & pow) != 0)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag);\n" - "\t\telse\n" - "\t\t\tdrag = 0.0f;\n" - "\t\tif(func_o_transform_pos_real32 != NULL)\n" - "\t\t\tfunc_o_transform_pos_real32(v_fs_get_user_data(32), node_id, time_s, time_f, &output[0][0], &output[1][0], &output[2][0], &output[3][0], drag);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_add_param(VCGP_REAL32, "drag"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_transform_rot_real32", 33, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "time_s"); - v_cg_add_param(VCGP_UINT32, "time_f"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNQuat32"); - v_cg_add_param(VCGP_POINTER, "rot"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNQuat32"); - v_cg_add_param(VCGP_POINTER, "speed"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNQuat32"); - v_cg_add_param(VCGP_POINTER, "accelerate"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNQuat32"); - v_cg_add_param(VCGP_POINTER, "drag_normal"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tuint8 mask = 0;\n" - "\t\tunsigned int maskpos;\n" - "\t\tmaskpos = buffer_pos++;\t\t/* Remember location, and reserve a byte for the mask. */\n" - "\t\tbuffer_pos += vnp_pack_quat32(&buf[buffer_pos], rot);\n" - "\t\tif(v_quat32_valid(speed))\n" - "\t\t{\n" - "\t\t\tmask |= 1;\n" - "\t\t\tbuffer_pos += vnp_pack_quat32(&buf[buffer_pos], speed);\n" - "\t\t}\n" - "\t\tif(v_quat32_valid(accelerate))\n" - "\t\t{\n" - "\t\t\tmask |= 2;\n" - "\t\t\tbuffer_pos += vnp_pack_quat32(&buf[buffer_pos], accelerate);\n" - "\t\t}\n" - "\t\tif(v_quat32_valid(drag_normal))\n" - "\t\t{\n" - "\t\t\tmask |= 4;\n" - "\t\t\tbuffer_pos += vnp_pack_quat32(&buf[buffer_pos], drag_normal);\n" - "\t\t}\n" - "\t\tif(drag > 0.0000001 || drag < -0.0000001)\n" - "\t\t{\n" - "\t\t\tmask |= 8;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag);\n" - "\t\t}\n" - "\t\tvnp_raw_pack_uint8(&buf[maskpos], mask);\t/* Write the mask into start of command. */\n" - "\t}\n" - "\tif(FALSE)\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n" - "\t\tVNQuat32 trot, temp[3], *q[3];\n" - "\t\tunsigned int i;\n" - "\t\tuint8 mask, test;\n" - "\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask);\n" - "\t\tbuffer_pos += vnp_unpack_quat32(&buf[buffer_pos], &trot);\n" - "\t\tfor(i = 0, test = 1; i < sizeof temp / sizeof *temp; i++, test <<= 1)\n" - "\t\t{\n" - "\t\t\tif(mask & test)\t\t/* Field present? */\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_unpack_quat32(&buf[buffer_pos], &temp[i]);\n" - "\t\t\t\tq[i] = &temp[i];\n" - "\t\t\t}\n" - "\t\t\telse\n" - "\t\t\t\tq[i] = NULL;\n" - "\t\t}\n" - "\t\tif(mask & test)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag);\n" - "\t\telse\n" - "\t\t\tdrag = 0.0;\n" - "\t\tif(func_o_transform_rot_real32 != NULL)\n" - "\t\t\tfunc_o_transform_rot_real32(v_fs_get_user_data(33), node_id, time_s, time_f, &trot, q[0], q[1], q[2], drag);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_add_param(VCGP_REAL32, "drag"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_transform_scale_real32", 34, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL32, "scale_x"); - v_cg_add_param(VCGP_REAL32, "scale_y"); - v_cg_add_param(VCGP_REAL32, "scale_z"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_transform_pos_real64", 35, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "time_s"); - v_cg_add_param(VCGP_UINT32, "time_f"); - v_cg_add_param(VCGP_POINTER_TYPE,"real64"); - v_cg_add_param(VCGP_POINTER, "pos"); - v_cg_add_param(VCGP_POINTER_TYPE,"real64"); - v_cg_add_param(VCGP_POINTER, "speed"); - v_cg_add_param(VCGP_POINTER_TYPE,"real64"); - v_cg_add_param(VCGP_POINTER, "accelerate"); - v_cg_add_param(VCGP_POINTER_TYPE,"real64"); - v_cg_add_param(VCGP_POINTER, "drag_normal"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tunsigned char mask = 0;\n" - "\t\tunsigned int cmd;\n" - "\t\tcmd = buffer_pos++;\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[0]);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[1]);\n" - "\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[2]);\n" - "\t\tif(speed != NULL && (speed[0] > 0.0000001 || speed[0] < -0.0000001 || speed[1] > 0.0000001 || speed[1] < -0.0000001 || speed[2] > 0.0000001 || speed[2] < -0.0000001))\n" - "\t\t{\n" - "\t\t\tmask |= 1;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[2]);\n" - "\t\t}\n" - "\t\tif(accelerate != NULL && (accelerate[0] > 0.0000001 || accelerate[0] < -0.0000001 || accelerate[1] > 0.0000001 || accelerate[1] < -0.0000001 || accelerate[2] > 0.0000001 || accelerate[2] < -0.0000001))\n" - "\t\t{\n" - "\t\t\tmask |= 2;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accelerate[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accelerate[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accelerate[2]);\n" - "\t\t}\n" - "\t\tif(drag_normal != NULL && (drag > 0.0000001 || drag < -0.0000001) && (drag_normal[0] > 0.0000001 || drag_normal[0] < -0.0000001 || drag_normal[1] > 0.0000001 || drag_normal[1] < -0.0000001 || drag_normal[2] > 0.0000001 || drag_normal[2] < -0.0000001))\n" - "\t\t{\n" - "\t\t\tmask |= 4;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag_normal[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag_normal[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag_normal[2]);\n" - "\t\t}\n" - "\t\tif(drag > 0.0000001 || drag < -0.0000001)\n" - "\t\t{\n" - "\t\t\tmask |= 8;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag);\n" - "\t\t}\n" - "\t\tvnp_raw_pack_uint8(&buf[cmd], mask);\n" - "\t}if(FALSE)\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n" - "\t\tdouble output[4][3];\n" - "\t\tunsigned int i, j;\n" - "\t\tchar mask, pow = 1;\n" - "\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask);\n" - "\t\tfor(j = 0; j < 3; j++)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[0][j]);\n" - "\t\tfor(i = 1; i < 4; i++)\n" - "\t\t{\n" - "\t\t\tif((mask & pow) != 0)\n" - "\t\t\t\tfor(j = 0; j < 3; j++)\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[i][j]);\n" - "\t\t\telse\n" - "\t\t\t\tfor(j = 0; j < 3; j++)\n" - "\t\t\t\t\toutput[i][j] = 0;\n" - "\t\t\tpow *= 2;\n" - "\t\t}\n" - "\t\tif((mask & pow) != 0)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag);\n" - "\t\telse\n" - "\t\t\tdrag = 0.0;\n" - "\t\tif(func_o_transform_pos_real64 != NULL)\n" - "\t\t\tfunc_o_transform_pos_real64(v_fs_get_user_data(35), node_id, time_s, time_f, &output[0][0], &output[1][0], &output[2][0], &output[3][0], drag);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_add_param(VCGP_REAL64, "drag"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_transform_rot_real64", 36, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "time_s"); - v_cg_add_param(VCGP_UINT32, "time_f"); - v_cg_add_param(VCGP_POINTER_TYPE,"VNQuat64"); - v_cg_add_param(VCGP_POINTER, "rot"); - v_cg_add_param(VCGP_POINTER_TYPE,"VNQuat64"); - v_cg_add_param(VCGP_POINTER, "speed"); - v_cg_add_param(VCGP_POINTER_TYPE,"VNQuat64"); - v_cg_add_param(VCGP_POINTER, "accelerate"); - v_cg_add_param(VCGP_POINTER_TYPE,"VNQuat64"); - v_cg_add_param(VCGP_POINTER, "drag_normal"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tuint8 mask = 0;\n" - "\t\tunsigned int maskpos;\n" - "\t\tmaskpos = buffer_pos++;\t\t/* Remember location, and reserve a byte for the mask. */\n" - "\t\tbuffer_pos += vnp_pack_quat64(&buf[buffer_pos], rot);\n" - "\t\tif(v_quat64_valid(speed))\n" - "\t\t{\n" - "\t\t\tmask |= 1;\n" - "\t\t\tbuffer_pos += vnp_pack_quat64(&buf[buffer_pos], speed);\n" - "\t\t}\n" - "\t\tif(v_quat64_valid(accelerate))\n" - "\t\t{\n" - "\t\t\tmask |= 2;\n" - "\t\t\tbuffer_pos += vnp_pack_quat64(&buf[buffer_pos], accelerate);\n" - "\t\t}\n" - "\t\tif(v_quat64_valid(drag_normal))\n" - "\t\t{\n" - "\t\t\tmask |= 4;\n" - "\t\t\tbuffer_pos += vnp_pack_quat64(&buf[buffer_pos], drag_normal);\n" - "\t\t}\n" - "\t\tif(drag > 0.0000001 || drag < -0.0000001)\n" - "\t\t{\n" - "\t\t\tmask |= 8;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag);\n" - "\t\t}\n" - "\t\tvnp_raw_pack_uint8(&buf[maskpos], mask);\t/* Write the mask into start of command. */\n" - "\t}\n" - "\tif(FALSE)\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n" - "\t\tVNQuat64 trot, temp[3], *q[3];\n" - "\t\tunsigned int i;\n" - "\t\tuint8 mask, test;\n" - "\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask);\n" - "\t\tbuffer_pos += vnp_unpack_quat64(&buf[buffer_pos], &trot);\n" - "\t\tfor(i = 0, test = 1; i < sizeof temp / sizeof *temp; i++, test <<= 1)\n" - "\t\t{\n" - "\t\t\tif(mask & test)\t\t/* Field present? */\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_unpack_quat64(&buf[buffer_pos], &temp[i]);\n" - "\t\t\t\tq[i] = &temp[i];\n" - "\t\t\t}\n" - "\t\t\telse\n" - "\t\t\t\tq[i] = NULL;\n" - "\t\t}\n" - "\t\tif(mask & test)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag);\n" - "\t\telse\n" - "\t\t\tdrag = 0.0;\n" - "\t\tif(func_o_transform_rot_real64 != NULL)\n" - "\t\t\tfunc_o_transform_rot_real64(v_fs_get_user_data(36), node_id, time_s, time_f, &trot, q[0], q[1], q[2], drag);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_add_param(VCGP_REAL64, "drag"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_transform_scale_real64", 37, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL64, "scale_x"); - v_cg_add_param(VCGP_REAL64, "scale_y"); - v_cg_add_param(VCGP_REAL64, "scale_z"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_transform_subscribe", 38, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_ENUM_NAME, "VNRealFormat"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_alias(TRUE, "o_transform_unsubscribe", NULL, 4, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_light_set", 39, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_REAL64, "light_r"); - v_cg_add_param(VCGP_REAL64, "light_g"); - v_cg_add_param(VCGP_REAL64, "light_b"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_link_set", 40, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "link_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NODE_ID, "link"); - v_cg_add_param(VCGP_NAME, "label"); - v_cg_add_param(VCGP_UINT32, "target_id"); - v_cg_alias(TRUE, "o_link_destroy", NULL, 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_method_group_create", 41, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_alias(FALSE, "o_method_group_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_method_group_subscribe", 42, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "o_method_group_unsubscribe", NULL, 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_method_create", 43, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_UINT16, "method_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_LONG_NAME, "name"); - v_cg_add_param(VCGP_UINT8, "param_count"); - v_cg_add_param(VCGP_POINTER_TYPE,"VNOParamType"); - v_cg_add_param(VCGP_POINTER, "param_types"); - v_cg_add_param(VCGP_POINTER_TYPE,"char *"); - v_cg_add_param(VCGP_POINTER, "param_names"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tunsigned int i, j, sum = 1;\n" - "\t\tfor(i = 0; i < param_count; i++)\n" - "\t\t{\n" - "\t\t\tsum += 3;\n" - "\t\t\tfor(j = 0; param_names[i][j] != 0; j++);\n" - "\t\t}\n" - "\t\tif(sum + buffer_pos > 1500)\n" - "\t\t\treturn;\n" - "\t\tfor(i = 0; i < param_count; i++)\n" - "\t\t{\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], param_types[i]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], param_names[i], 1500 - buffer_pos);\n" - "\t\t}\n" - "\t}\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\tif(param_count != 255)\n" - "\t{\n" - "\t\tunsigned int i, size, text = 0;\n" - "\t\tVNOParamType types[256];\n" - "\t\tuint8 t;\n" - "\t\tchar name_buf[1500], *names[256];\n" - "\t\tfor(i = 0; i < param_count; i++)\n" - "\t\t{\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &t);\n" - "\t\t\ttypes[i] = t;\n" - "\t\t\tnames[i] = &name_buf[text];\n" - "\t\t\tsize = vnp_raw_unpack_string(&buf[buffer_pos], names[i], 1500 - buffer_pos, buffer_length - buffer_pos);\n" - "\t\t\tbuffer_pos += size;\n" - "\t\t\ttext += size;\n" - "\t\t}\n" - "\t\tif(func_o_method_create != NULL)\n" - "\t\t\tfunc_o_method_create(v_fs_get_user_data(43), node_id, group_id, method_id, name, param_count, types, (const char **) names);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_alias(FALSE, "o_method_destroy", "if(name[0] == 0)", 3, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_method_call", 44, VCGCT_UNIQUE); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_UINT16, "method_id"); - v_cg_add_param(VCGP_NODE_ID, "sender"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNOPackedParams"); - v_cg_add_param(VCGP_POINTER, "params"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tunsigned int i;\n" - "\t\tuint16 size;\n" - "\t\tvnp_raw_unpack_uint16(params, &size);\n" - "\t\tfor(i = 0; i < size; i++)\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((uint8 *)params)[i]);\n" - "\t\tfree((void *) params);\t/* Drop the const. */\n" - "\t}\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n" - "\t\tunsigned int i;\n" - "\t\tuint8 par[1500];\n" - "\t\tuint16 size;\n" - "\t\tvnp_raw_unpack_uint16(&buf[buffer_pos], &size);\n" - "\t\tfor(i = 0; i < size; i++)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &par[i]);\n" - "\t\tif(func_o_method_call != NULL)\n" - "\t\t\tfunc_o_method_call(v_fs_get_user_data(44), node_id, group_id, method_id, sender, par);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_anim_run", 45, VCGCT_UNIQUE); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "link_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT32, "time_s"); - v_cg_add_param(VCGP_UINT32, "time_f"); - v_cg_add_param(VCGP_UINT8, "dimensions"); - v_cg_add_param(VCGP_POINTER_TYPE, "real64"); - v_cg_add_param(VCGP_POINTER, "pos"); - v_cg_add_param(VCGP_POINTER_TYPE, "real64"); - v_cg_add_param(VCGP_POINTER, "speed"); - v_cg_add_param(VCGP_POINTER_TYPE, "real64"); - v_cg_add_param(VCGP_POINTER, "accel"); - v_cg_add_param(VCGP_POINTER_TYPE, "real64"); - v_cg_add_param(VCGP_POINTER, "scale"); - v_cg_add_param(VCGP_POINTER_TYPE, "real64"); - v_cg_add_param(VCGP_POINTER, "scale_speed"); - v_cg_add_param(VCGP_PACK_INLINE, "\t{\n" - "\t\tunsigned char mask = 0;\n" - "\t\tunsigned int cmd, i;\n" - "\t\tcmd = buffer_pos++;\n" - "\t\tif(dimensions > 4)\n" - "\t\t\tdimensions = 4;\n" - "\t\tfor(i = 0; i < dimensions; i++)\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[i]);\n" - "\t\tif(speed != NULL)\n" - "\t\t{\n" - "\t\t\tmask |= 1;\n" - "\t\t\tfor(i = 0; i < dimensions; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[i]);\n" - "\t\t}\n" - "\t\tif(accel != NULL)\n" - "\t\t{\n" - "\t\t\tmask |= 2;\n" - "\t\t\tfor(i = 0; i < dimensions; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accel[i]);\n" - "\t\t}\n" - "\t\tif(scale != NULL)\n" - "\t\t{\n" - "\t\t\tmask |= 3;\n" - "\t\t\tfor(i = 0; i < dimensions; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale[i]);\n" - "\t\t}\n" - "\t\tif(scale_speed != NULL)\n" - "\t\t{\n" - "\t\t\tmask |= 4;\n" - "\t\t\tfor(i = 0; i < dimensions; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale_speed[i]);\n" - "\t\t}\n" - "\t\tvnp_raw_pack_uint8(&buf[cmd], mask);\n" - "\t}\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\t{\n" - "\t\tdouble output[5][4];\n" - "\t\tunsigned int i, j;\n" - "\t\tchar mask, pow = 1;\n" - "\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask);\n" - "\t\tif(dimensions > 4)\n" - "\t\t\tdimensions = 4;\n" - "\t\tfor(j = 0; j < dimensions; j++)\n" - "\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[0][j]);\n" - "\t\tfor(i = 1; i < 5; i++)\n" - "\t\t{\n" - "\t\t\tif((mask & pow) != 0)\n" - "\t\t\t\tfor(j = 0; j < dimensions; j++)\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[i][j]);\n" - "\t\t\telse\n" - "\t\t\t\tfor(j = 0; j < dimensions; j++)\n" - "\t\t\t\t\toutput[i][j] = 0;\n" - "\t\t\tpow *= 2;\n" - "\t\t}\n" - "\t\tif(func_o_anim_run != NULL)\n" - "\t\t\tfunc_o_anim_run(v_fs_get_user_data(45), node_id, link_id, time_s, time_f, dimensions, &output[0][0], &output[1][0], &output[2][0], &output[3][0], &output[4][0]);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_OBJECT, "o_hide", 46, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_UINT8, "hidden"); - v_cg_end_cmd(); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_s.c b/extern/verse/dist/v_cmd_def_s.c deleted file mode 100644 index 1b8b69dcd6d..00000000000 --- a/extern/verse/dist/v_cmd_def_s.c +++ /dev/null @@ -1,211 +0,0 @@ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_system_cmd_def(void) -{ - v_cg_new_manual_cmd(0, "connect", "VSession verse_send_connect(const char *name, const char *pass, const char *address, const uint8 *expected_host_id)", NULL, NULL); - - v_cg_new_manual_cmd(1, "connect_accept", "VSession verse_send_connect_accept(VNodeID avatar, const char *address, uint8 *host_id)", NULL, NULL); - - v_cg_new_manual_cmd(2, "connect_terminate", "void verse_send_connect_terminate(const char *address, const char *bye)", NULL, NULL); - - v_cg_new_manual_cmd(5, "ping", "void verse_send_ping(const char *address, const char *message)", NULL, NULL); - - v_cg_new_cmd(V_NT_SYSTEM, "error_message", 6, VCGCT_UNIQUE); - v_cg_add_param(VCGP_LONG_NAME, "message"); - - v_cg_new_cmd(V_NT_SYSTEM, "packet_ack", 7, VCGCT_INVISIBLE_SYSTEM); - v_cg_add_param(VCGP_UINT32, "packet_id"); - v_cg_add_param(VCGP_PACK_INLINE, "\tv_cmd_buf_set_unique_address_size(head, buffer_pos);\n" - "\tv_cmd_buf_set_size(head, buffer_pos);\n" - "\tv_noq_send_ack_nak_buf(v_con_get_network_queue(), head);\n" - "\treturn;\n"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "packet_nak", 8, VCGCT_INVISIBLE_SYSTEM); - v_cg_add_param(VCGP_UINT32, "packet_id"); - v_cg_add_param(VCGP_PACK_INLINE, "\tv_cmd_buf_set_unique_address_size(head, buffer_pos);\n" - "\tv_cmd_buf_set_size(head, buffer_pos);\n" - "\tv_noq_send_ack_nak_buf(v_con_get_network_queue(), head);\n" - "\treturn;\n"); - v_cg_end_cmd(); - - - v_cg_new_cmd(V_NT_SYSTEM, "node_index_subscribe", 9, VCGCT_NORMAL); - v_cg_add_param(VCGP_UINT32, "mask"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "node_create", 10, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_ENUM_NAME, "VNodeType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_ENUM_NAME, "VNodeOwner"); - v_cg_add_param(VCGP_ENUM, "owner"); - v_cg_alias(FALSE, "node_destroy", "if(owner == (uint8) ~0u || type >= V_NT_NUM_TYPES)", 1, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "node_subscribe", 11, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "node_unsubscribe", NULL, 1, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "tag_group_create", 16, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_alias(FALSE, "tag_group_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "tag_group_subscribe", 17, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "tag_group_unsubscribe", NULL, 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "tag_create", 18, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_UINT16, "group_id"); - v_cg_add_param(VCGP_UINT16, "tag_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_add_param(VCGP_ENUM_NAME, "VNTagType"); - v_cg_add_param(VCGP_ENUM, "type"); - v_cg_add_param(VCGP_POINTER_TYPE, "VNTag"); - v_cg_add_param(VCGP_POINTER, "tag"); - v_cg_add_param(VCGP_PACK_INLINE, "\tif(type > VN_TAG_BLOB)\n" - "\t{\n" - "\t\tv_cmd_buf_free(head);\n" - "\t\treturn;\n" - "\t}\n" - "\tswitch(type)\n" - "\t{\n" - "\t\tcase VN_TAG_BOOLEAN :\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((VNTag *)tag)->vboolean);\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_UINT32 :\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vuint32);\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_REAL64 :\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64);\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_STRING :\n" - "\t\t{\n" - "\t\t\tunsigned int i;\n" - "\t\t\tfor(i = 0; ((VNTag *)tag)->vstring[i] != 0 && i < VN_TAG_MAX_BLOB_SIZE; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((VNTag *)tag)->vstring[i]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_REAL64_VEC3 :\n" - "\t\t{\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64_vec3[0]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64_vec3[1]);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64_vec3[2]);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_LINK :\n" - "\t\t{\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vlink);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_ANIMATION :\n" - "\t\t{\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vanimation.curve);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vanimation.start);\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vanimation.end);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\t\tcase VN_TAG_BLOB :\n" - "\t\t{\n" - "\t\t\tunsigned int i;\n" - "\t\t\tif(((VNTag *)tag)->vblob.size > VN_TAG_MAX_BLOB_SIZE)\n" - "\t\t\t\t((VNTag *)tag)->vblob.size = VN_TAG_MAX_BLOB_SIZE;\n" - "\t\t\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], ((VNTag *)tag)->vblob.size);\n" - "\t\t\tfor(i = 0; i < ((VNTag *)tag)->vblob.size; i++)\n" - "\t\t\t\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((uint8 *)((VNTag *)tag)->vblob.blob)[i]);\n" - "\t\t}\n" - "\t\tbreak;\n" - "\t\tdefault :\n" - "\t\t\t;\n" - "\t}\n"); - v_cg_add_param(VCGP_UNPACK_INLINE, "\tif(type < VN_TAG_TYPE_COUNT)\n" - "\t{\n" - "\t\tVNTag tag;\n" - "\t\tunsigned int i;\n" - "\t\tchar string[VN_TAG_MAX_BLOB_SIZE];\n" - "\t\tswitch(type)\n" - "\t\t{\n" - "\t\t\tcase VN_TAG_BOOLEAN :\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &tag.vboolean);\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_UINT32 :\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vuint32);\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_REAL64 :\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64);\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_STRING :\n" - "\t\t\t{\n" - "\t\t\t\ttag.vstring = string;\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], string, VN_TAG_MAX_BLOB_SIZE, buffer_length - buffer_pos);\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_REAL64_VEC3 :\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64_vec3[0]);\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64_vec3[1]);\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64_vec3[2]);\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_LINK :\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vlink);\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_ANIMATION :\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vanimation.curve);\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vanimation.start);\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vanimation.end);\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\t\tcase VN_TAG_BLOB :\n" - "\t\t\t{\n" - "\t\t\t\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &tag.vblob.size);\n" - "\t\t\t\tif(tag.vblob.size > VN_TAG_MAX_BLOB_SIZE)\n" - "\t\t\t\t\ttag.vblob.size = VN_TAG_MAX_BLOB_SIZE;\n" - "\t\t\t\ttag.vblob.blob = string;\n" - "\t\t\t\tfor(i = 0; i < tag.vblob.size; i++)\n" - "\t\t\t\t\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &string[i]);\n" - "\t\t\t}\n" - "\t\t\tbreak;\n" - "\t\tdefault :\n" - "\t\t\t;\n" - "\t\t}\n" - "\t\tif(func_tag_create != NULL)\n" - "\t\tfunc_tag_create(v_fs_get_user_data(18), node_id, group_id, tag_id, name, type, &tag);\n" - "\t\treturn buffer_pos;\n" - "\t}\n"); - v_cg_alias(FALSE, "tag_destroy", "if(type >= VN_TAG_TYPE_COUNT)", 3, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_SYSTEM, "node_name_set", 19, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_LONG_NAME, "name"); - - v_cg_end_cmd(); -} - -#endif diff --git a/extern/verse/dist/v_cmd_def_t.c b/extern/verse/dist/v_cmd_def_t.c deleted file mode 100644 index 3c568b42d7b..00000000000 --- a/extern/verse/dist/v_cmd_def_t.c +++ /dev/null @@ -1,36 +0,0 @@ - -#include -#include -#include "verse_header.h" -#include "v_cmd_gen.h" -#include "v_cmd_buf.h" - -#if defined(V_GENERATE_FUNC_MODE) - -void v_gen_text_cmd_def(void) -{ - v_cg_new_cmd(V_NT_TEXT, "t_language_set", 96, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_LONG_NAME, "language"); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_TEXT, "t_buffer_create", 97, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_BUFFER_ID, "buffer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_add_param(VCGP_NAME, "name"); - v_cg_alias(FALSE, "t_buffer_destroy", "if(name[0] == 0)", 2, NULL); - v_cg_end_cmd(); - - v_cg_new_cmd(V_NT_TEXT, "t_buffer_subscribe", 98, VCGCT_NORMAL); - v_cg_add_param(VCGP_NODE_ID, "node_id"); - v_cg_add_param(VCGP_BUFFER_ID, "buffer_id"); - v_cg_add_param(VCGP_END_ADDRESS, NULL); - v_cg_alias(TRUE, "t_buffer_unsubscribe", NULL, 2, NULL); - v_cg_end_cmd(); - - v_cg_new_manual_cmd(99, "t_text_set", "void verse_send_t_text_set(VNodeID node_id, VBufferID buffer_id, uint32 pos, uint32 length, const char *text)", NULL, NULL); -} - -#endif diff --git a/extern/verse/dist/v_cmd_gen.c b/extern/verse/dist/v_cmd_gen.c deleted file mode 100644 index 3d18f8cf1af..00000000000 --- a/extern/verse/dist/v_cmd_gen.c +++ /dev/null @@ -1,939 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "verse_header.h" -#include "v_cmd_buf.h" - -#include "v_cmd_gen.h" - -#if defined _WIN32 -#include -#define chdir _chdir -#define snprintf _snprintf -#endif - -#if defined V_GENERATE_FUNC_MODE - -#define MAX_PARAMS_PER_CMD 32 - -static struct { - FILE *nodes[V_NT_NUM_TYPES_NETPACK]; - FILE *init; - FILE *unpack; - FILE *verse_h; - FILE *internal_verse_h; - const char *func_name; - VNodeType type; - VCGCommandType command; - unsigned int param_count; - VCGParam param_type[MAX_PARAMS_PER_CMD]; - const char *param_name[MAX_PARAMS_PER_CMD]; - unsigned int cmd_id; - const char *alias_name; - const char *alias_qualifier; - unsigned int alias_param; - unsigned int *alias_param_array; - char alias_bool_switch; -} VCGData; - -extern void v_gen_system_cmd_def(void); -extern void v_gen_object_cmd_def(void); -extern void v_gen_geometry_cmd_def(void); -extern void v_gen_material_cmd_def(void); -extern void v_gen_bitmap_cmd_def(void); -extern void v_gen_text_cmd_def(void); -extern void v_gen_curve_cmd_def(void); -extern void v_gen_audio_cmd_def(void); - -static int v_cg_init(const char *src_path) -{ - char buf[1024]; - int i; - FILE *f; - - VCGData.nodes[V_NT_OBJECT] = fopen("v_gen_pack_o_node.c", "w"); - VCGData.nodes[V_NT_GEOMETRY] = fopen("v_gen_pack_g_node.c", "w"); - VCGData.nodes[V_NT_MATERIAL] = fopen("v_gen_pack_m_node.c", "w"); - VCGData.nodes[V_NT_BITMAP] = fopen("v_gen_pack_b_node.c", "w"); - VCGData.nodes[V_NT_TEXT] = fopen("v_gen_pack_t_node.c", "w"); - VCGData.nodes[V_NT_CURVE] = fopen("v_gen_pack_c_node.c", "w"); - VCGData.nodes[V_NT_AUDIO] = fopen("v_gen_pack_a_node.c", "w"); - VCGData.nodes[V_NT_SYSTEM] = fopen("v_gen_pack_s_node.c", "w"); - VCGData.init = fopen("v_gen_pack_init.c", "w"); - VCGData.unpack = fopen("v_gen_unpack_func.h", "w"); - VCGData.verse_h = fopen("verse.h", "w"); - VCGData.internal_verse_h = fopen("v_internal_verse.h", "w"); - for(i = 0; i < V_NT_NUM_TYPES_NETPACK + 1; i++) - { - if(i == V_NT_NUM_TYPES_NETPACK) - f = VCGData.init; - else - f = VCGData.nodes[i]; - fprintf(f, - "/*\n" - "** This is automatically generated source code -- do not edit.\n" - "** Changes are affected either by editing the corresponding protocol\n" - "** definition file (v_cmd_def_X.c where X=node type), or by editing\n" - "** the code generator itself, in v_cmd_gen.c.\n" - "*/\n\n"); - fprintf(f, "#include \n"); - fprintf(f, "#include \n\n"); - fprintf(f, "#include \"v_cmd_gen.h\"\n"); - fprintf(f, "#if !defined(V_GENERATE_FUNC_MODE)\n"); - fprintf(f, "#include \"verse.h\"\n"); - fprintf(f, "#include \"v_cmd_buf.h\"\n"); - fprintf(f, "#include \"v_network_out_que.h\"\n"); - fprintf(f, "#include \"v_network.h\"\n"); - fprintf(f, "#include \"v_connection.h\"\n"); - fprintf(f, "#include \"v_util.h\"\n\n"); - } - VCGData.cmd_id = 0; - fprintf(f, "#include \"v_gen_unpack_func.h\"\n\n"); - fprintf(f, - "#include \"verse.h\"\n\n\n" - "extern void verse_send_packet_ack(uint32 packet_id);\n" - "extern void verse_send_packet_nak(uint32 packet_id);\n\n"); - - fprintf(VCGData.init, "void init_pack_and_unpack(void)\n{\n"); - fprintf(VCGData.verse_h, - "/*\n" - "** Verse API Header file (for use with libverse.a).\n" - "** This is automatically generated code; do not edit.\n" - "*/\n\n" - "\n" - "#if !defined VERSE_H\n" - "\n" - "#if defined __cplusplus\t\t/* Declare as C symbols for C++ users. */\n" - "extern \"C\" {\n" - "#endif\n\n" - "#define\tVERSE_H\n\n"); - /* Copy contents of "verse_header.h" into output "verse.h". */ - snprintf(buf, sizeof buf, "%sverse_header.h", src_path); - f = fopen(buf, "r"); - if(f != NULL) - { - while((i = fgetc(f)) != EOF) - fputc(i, VCGData.verse_h); - fclose(f); - } - else - { - fprintf(stderr, "mkprot: Couldn't find \"%s\" input file\n", buf); - return 0; - } - fprintf(VCGData.verse_h, "\n/* Command sending functions begin. ----------------------------------------- */\n\n"); - return 1; -} - -static void v_cg_close(void) -{ - unsigned int i; - for(i = 0; i < V_NT_NUM_TYPES_NETPACK; i++) - { - fprintf(VCGData.nodes[i], "#endif\n\n"); - } - fprintf(VCGData.init, "}\n#endif\n\n"); - fprintf(VCGData.verse_h, - "\n#if defined __cplusplus\n" - "}\n" - "#endif\n"); - fprintf(VCGData.verse_h, "\n#endif\t\t/* VERSE_H */\n"); -} - -void v_cg_new_cmd(VCGCommandType type, const char *name, unsigned int cmd_id, VCGCommandType command) -{ - VCGData.param_count = 0; - VCGData.func_name = name; - VCGData.type = type; - VCGData.cmd_id = cmd_id; - VCGData.command = command; -/* printf("def: %u: %s\n", cmd_id, name);*/ -} - -void v_cg_new_manual_cmd(unsigned int cmd_id, const char *name, const char *def, const char *alias_name, const char *alias_def) -{ - fprintf(VCGData.verse_h, "extern %s;\n", def); - if(alias_def != NULL) - fprintf(VCGData.verse_h, "extern %s;\n", alias_def); - fprintf(VCGData.init, "\tv_fs_add_func(%i, v_unpack_%s, (void *) verse_send_%s, ", cmd_id, name, name); - if(alias_name != NULL) - fprintf(VCGData.init, "(void *) verse_send_%s);\n", alias_name); - else - fprintf(VCGData.init, "NULL);\n"); - fprintf(VCGData.unpack, "extern unsigned int v_unpack_%s(const char *data, size_t length);\n", name); -/* printf("def: %u: %s\n", cmd_id, name);*/ -} - -void v_cg_alias(char bool_switch, const char *name, const char *qualifier, unsigned int param, unsigned int *param_array) -{ - VCGData.alias_name = name; - VCGData.alias_qualifier = qualifier; - VCGData.alias_param = param; - VCGData.alias_param_array = param_array; - VCGData.alias_bool_switch = bool_switch; -} - -void v_cg_add_param(VCGParam type, const char *name) -{ - if(VCGData.param_count == MAX_PARAMS_PER_CMD) - exit(1); - VCGData.param_type[VCGData.param_count] = type; - VCGData.param_name[VCGData.param_count] = name; - VCGData.param_count++; -} - -static void v_cg_gen_func_params(FILE *f, boolean types, boolean alias) -{ - unsigned int i; - unsigned int length, active; - length = VCGData.param_count; - if(alias) - length = VCGData.alias_param; - for(i = 0; i < length; i++) - { - if(alias && VCGData.alias_param_array != NULL) - active = VCGData.alias_param_array[i]; - else - { - for(;(VCGData.param_type[i] == VCGP_PACK_INLINE || VCGData.param_type[i] == VCGP_UNPACK_INLINE || VCGData.param_type[i] == VCGP_POINTER_TYPE || VCGData.param_type[i] == VCGP_ENUM_NAME) && i < VCGData.param_count; i++); - if(i == VCGData.param_count) - break; - active = i; - } - - if(active < VCGData.param_count && VCGData.param_type[active] != VCGP_END_ADDRESS) - { - switch(VCGData.param_type[active]) - { - case VCGP_UINT8 : - fprintf(f, "uint8 %s", VCGData.param_name[active]); - break; - case VCGP_UINT16 : - fprintf(f, "uint16 %s", VCGData.param_name[active]); - break; - case VCGP_UINT32 : - fprintf(f, "uint32 %s", VCGData.param_name[active]); - break; - case VCGP_REAL32 : - fprintf(f, "real32 %s", VCGData.param_name[active]); - break; - case VCGP_REAL64 : - fprintf(f, "real64 %s", VCGData.param_name[active]); - break; - case VCGP_POINTER : - if(active != 0 && VCGData.param_type[active - 1] == VCGP_POINTER_TYPE) - fprintf(f, "const %s *%s", VCGData.param_name[active - 1], VCGData.param_name[active]); - else - fprintf(f, "const void *%s", VCGData.param_name[active]); - break; - case VCGP_NAME : - if(types) - fprintf(f, "char %s[16]", VCGData.param_name[active]); - else - fprintf(f, "const char *%s", VCGData.param_name[active]); - break; - case VCGP_LONG_NAME : - if(types) - fprintf(f, "char %s[512]", VCGData.param_name[active]); - else - fprintf(f, "const char *%s", VCGData.param_name[active]); - break; - case VCGP_NODE_ID : - fprintf(f, "VNodeID %s", VCGData.param_name[active]); - break; - case VCGP_LAYER_ID : - fprintf(f, "VLayerID %s", VCGData.param_name[active]); - break; - case VCGP_BUFFER_ID : - fprintf(f, "VBufferID %s", VCGData.param_name[active]); - break; - case VCGP_FRAGMENT_ID : - fprintf(f, "VNMFragmentID %s", VCGData.param_name[active]); - break; - case VCGP_ENUM : -/* if(types) - fprintf(f, "uint8 %s", VCGData.param_name[active]); - else -*/ fprintf(f, "%s %s", VCGData.param_name[active - 1], VCGData.param_name[active]); - break; - } - if(types) - fprintf(f, ";\n\t"); - else - { - for(;(VCGData.param_type[active + 1] == VCGP_END_ADDRESS || VCGData.param_type[active + 1] == VCGP_PACK_INLINE || VCGData.param_type[active + 1] == VCGP_UNPACK_INLINE || VCGData.param_type[active + 1] == VCGP_POINTER_TYPE) && active < VCGData.param_count; active++); - if(active + 1 < length) - fprintf(f, ", "); - } - } - } -} - -static void v_cg_create_print(FILE *f, boolean send, boolean alias) -{ - unsigned int i, length, active; - const char *name; - if(VCGData.command == VCGCT_INVISIBLE_SYSTEM) - return; - name = VCGData.func_name; - if(alias) - name = VCGData.alias_name; - if(send) - fprintf(f, "\tprintf(\"send: verse_send_%s(", name); - else - fprintf(f, "\tprintf(\"receive: verse_send_%s(", name); - - length = VCGData.param_count; - if(alias) - length = VCGData.alias_param; - for(i = 0; i < length; i++) - { - if(alias && VCGData.alias_param_array != NULL) - active = VCGData.alias_param_array[i]; - else - active = i; - - switch(VCGData.param_type[active]) - { - case VCGP_NODE_ID : - fprintf(f, "%s = %%u ", VCGData.param_name[active]); - break; - case VCGP_UINT8 : - case VCGP_UINT16 : - case VCGP_UINT32 : - case VCGP_LAYER_ID : - case VCGP_BUFFER_ID : - case VCGP_ENUM : - case VCGP_FRAGMENT_ID : - fprintf(f, "%s = %%u ", VCGData.param_name[active]); - break; - case VCGP_REAL32 : - case VCGP_REAL64 : - fprintf(f, "%s = %%f ", VCGData.param_name[active]); - break; - case VCGP_POINTER : - if(send) - fprintf(f, "%s = %%p ", VCGData.param_name[active]); - break; - case VCGP_NAME : - case VCGP_LONG_NAME : - fprintf(f, "%s = %%s ", VCGData.param_name[active]); - break; - } - } - if(send) - fprintf(f, ");\\n\""); - else - fprintf(f, "); callback = %%p\\n\""); - - for(i = 0; i < length; i++) - { - if(alias && VCGData.alias_param_array != NULL) - active = VCGData.alias_param_array[i]; - else - active = i; - switch(VCGData.param_type[active]) - { - case VCGP_NODE_ID : - fprintf(f, ", %s", VCGData.param_name[active]); - break; - case VCGP_POINTER : - if(!send) - break; - case VCGP_UINT8 : - case VCGP_UINT16 : - case VCGP_UINT32 : - case VCGP_LAYER_ID : - case VCGP_BUFFER_ID : - case VCGP_ENUM : - case VCGP_FRAGMENT_ID : - case VCGP_REAL32 : - case VCGP_REAL64 : - case VCGP_NAME : - case VCGP_LONG_NAME : - fprintf(f, ", %s", VCGData.param_name[active]); - break; - } - } - if(send) - fprintf(f, ");\n"); - else if(alias) - fprintf(f, ", v_fs_get_alias_user_func(%u));\n", VCGData.cmd_id); - else - fprintf(f, ", v_fs_get_user_func(%u));\n", VCGData.cmd_id); - -} - -static unsigned int v_cg_compute_command_size(unsigned int start, boolean end) -{ - unsigned int size = 0; - for(; start < VCGData.param_count; start++) - { - switch(VCGData.param_type[start]) - { - case VCGP_UINT8 : - case VCGP_ENUM : - size++; - break; - case VCGP_UINT16 : - case VCGP_LAYER_ID : - case VCGP_BUFFER_ID : - case VCGP_FRAGMENT_ID : - size += 2; - break; - case VCGP_NODE_ID : - case VCGP_UINT32 : - case VCGP_REAL32 : - size += 4; - break; - case VCGP_REAL64 : - size += 8; - break; - case VCGP_NAME : - if(end) - return size; - size += 16; - break; - case VCGP_LONG_NAME : - if(end) - return size; - size += 512; - break; - case VCGP_POINTER : - case VCGP_PACK_INLINE : - case VCGP_UNPACK_INLINE : - if(end) - return size; - size += 1500; - break; - case VCGP_END_ADDRESS : - if(end) - return size; - } - } - return size; -} - -void v_cg_set_command_address(FILE *f, boolean alias) -{ - unsigned int i, j, count = 0, length, size = 1, *param, def[] ={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; - - for(i = 0; i < VCGData.param_count; i++) - if(VCGData.param_type[i] == VCGP_END_ADDRESS) - break; - if(i == VCGData.param_count) - return; - if(alias) - length = VCGData.alias_param; - else - length = VCGData.param_count; - - if(alias && VCGData.alias_param_array != 0) - param = VCGData.alias_param_array; - else - param = def; - - if(i == VCGData.param_count) - return; - fprintf(f, "\tif("); - for(i = j = 0; i < VCGData.param_count; i++) - { - switch(VCGData.param_type[i]) - { - case VCGP_UINT8 : - case VCGP_ENUM : - size++; - break; - case VCGP_UINT16 : - case VCGP_LAYER_ID : - case VCGP_BUFFER_ID : - case VCGP_FRAGMENT_ID : - size += 2; - break; - case VCGP_NODE_ID : - case VCGP_UINT32 : - case VCGP_REAL32 : - size += 4; - break; - } - if(j < length && param[j] == i) - { - switch(VCGData.param_type[param[j]]) - { - case VCGP_UINT8 : - case VCGP_ENUM : - break; - case VCGP_UINT16 : - case VCGP_LAYER_ID : - case VCGP_BUFFER_ID : - case VCGP_FRAGMENT_ID : - if(count++ != 0) - fprintf(f, " || "); - fprintf(f, "%s == (uint16) ~0u", VCGData.param_name[param[j]]); - break; - case VCGP_NODE_ID : - case VCGP_UINT32 : - case VCGP_REAL32 : - if(count++ != 0) - fprintf(f, " || "); - fprintf(f, "%s == (uint32) ~0u", VCGData.param_name[param[j]]); - break; - } - j++; - } - if(VCGData.param_type[i] == VCGP_END_ADDRESS) - { - fprintf(f, ")\n"); - fprintf(f, "\t\tv_cmd_buf_set_unique_address_size(head, %u);\n", size); - fprintf(f, "\telse\n"); - fprintf(f, "\t\tv_cmd_buf_set_address_size(head, %u);\n", size); - return; - } - } - fprintf(f, ")\n"); - fprintf(f, "\t\tv_cmd_buf_set_unique_address_size(head, %u);\n", size); - fprintf(f, "\telse\n"); - fprintf(f, "\t\tv_cmd_buf_set_address_size(head, %u);\n", size); - return; -} - -static const char * v_cg_compute_buffer_size(void) -{ - unsigned int size; - size = v_cg_compute_command_size(0, FALSE) + 1; - if(size <= 10) - return "VCMDBS_10"; - else if(size <= 20) - return "VCMDBS_20"; - else if(size <= 30) - return "VCMDBS_30"; - else if(size <= 80) - return "VCMDBS_80"; - else if(size <= 160) - return "VCMDBS_160"; - else if(size <= 320) - return "VCMDBS_320"; - return "VCMDBS_1500"; -} - -static void v_cg_gen_pack(boolean alias) -{ - unsigned int i, j, size = 0, ad_size = 0; - boolean printed = FALSE; - boolean address = FALSE; - boolean no_param; - - FILE *f; - f = VCGData.nodes[VCGData.type]; - printf("generating function: verse_send_%s\n", VCGData.func_name); - if(alias) - fprintf(f, "void verse_send_%s(", VCGData.alias_name); - else - fprintf(f, "void verse_send_%s(", VCGData.func_name); - v_cg_gen_func_params(f, FALSE, alias); - fprintf(f, ")\n{\n\tuint8 *buf;\n"); - fprintf(f, "\tunsigned int buffer_pos = 0;\n"); - fprintf(f, "\tVCMDBufHead *head;\n"); - fprintf(f, "\thead = v_cmd_buf_allocate(%s);/* Allocating the buffer */\n", v_cg_compute_buffer_size()); - fprintf(f, "\tbuf = ((VCMDBuffer10 *)head)->buf;\n\n"); - - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], %u);\t/* Pack the command. */\n", VCGData.cmd_id); - - fprintf(f, "#if defined V_PRINT_SEND_COMMANDS\n"); - v_cg_create_print(f, TRUE, alias); - fprintf(f, "#endif\n"); - - for(i = 0; i < VCGData.param_count; i++) - { - const char *param = VCGData.param_name[i]; - no_param = FALSE; - if(alias) - { - if(i >= VCGData.alias_param && VCGData.alias_param_array == NULL) - no_param = TRUE; - if(VCGData.alias_param_array != NULL) - { - for(j = 0; j < VCGData.alias_param; j++) - if(VCGData.alias_param_array[j] == i) - break; - if(j == VCGData.alias_param) - no_param = TRUE; - } - } - - if(no_param) - param = "-1"; - - switch(VCGData.param_type[i]) - { - case VCGP_UINT8 : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], %s);\n", param); - break; - case VCGP_UINT16 : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], %s);\n", param); - break; - case VCGP_UINT32 : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], %s);\n", param); - break; - case VCGP_ENUM : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)%s);\n", param); - break; - } - if(VCGData.param_type[i] == VCGP_REAL32) - { - if(no_param) - param = "V_REAL32_MAX"; - fprintf(f, "\tbuffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], %s);\n", param); - } - if(VCGData.param_type[i] == VCGP_REAL64) - { - if(no_param) - param = "V_REAL64_MAX"; - fprintf(f, "\tbuffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], %s);\n", param); - } - if(no_param) - param = "NULL"; - switch(VCGData.param_type[i]) - { - case VCGP_NAME : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], %s, 16);\n", param); - break; - case VCGP_LONG_NAME : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_string(&buf[buffer_pos], %s, 512);\n", param); - break; - } - if(no_param) - { - /* Horrible work-around, that prevents vertex/polygon deletes from misbehaving. */ - if(strncmp(VCGData.alias_name, "g_vertex_delete_real", 20) == 0 && i == 1) - param = "0"; - else if(strncmp(VCGData.alias_name, "g_polygon_delete", 16) == 0 && i == 1) - param = "1"; - else - param = "-1"; - } - switch(VCGData.param_type[i]) - { - case VCGP_NODE_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], %s);\n", param); - break; - case VCGP_LAYER_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], %s);\n", param); - break; - case VCGP_BUFFER_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], %s);\n", param); - break; - case VCGP_FRAGMENT_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], %s);\n", param); - break; - } - if(!alias && VCGData.param_type[i] == VCGP_PACK_INLINE) - fprintf(f, "%s", VCGData.param_name[i]); - } - if(VCGData.alias_name != NULL && VCGData.alias_bool_switch) - { - if(alias) - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE);\n"); - else - fprintf(f, "\tbuffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE);\n"); - } - v_cg_set_command_address(f, alias); - fprintf(f, "\tv_cmd_buf_set_size(head, buffer_pos);\n"); - - fprintf(f, "\tv_noq_send_buf(v_con_get_network_queue(), head);\n"); - fprintf(f, "}\n\n"); -} - -static void v_cg_gen_unpack(void) -{ - FILE *f; - unsigned int i; - boolean printed = FALSE; - - f = VCGData.nodes[VCGData.type]; - printf("generating function: v_unpack_%s\n", VCGData.func_name); - fprintf(f, "unsigned int v_unpack_%s(const char *buf, size_t buffer_length)\n", VCGData.func_name); - fprintf(f, "{\n"); - for(i = 0; i < VCGData.param_count && VCGData.param_type[i] != VCGP_ENUM; i++); - if(i < VCGData.param_count) - fprintf(f, "\tuint8 enum_temp;\n"); - fprintf(f, "\tunsigned int buffer_pos = 0;\n"); - fprintf(f, "\tvoid (* func_%s)(void *user_data, ", VCGData.func_name); - v_cg_gen_func_params(f, FALSE, FALSE); - fprintf(f, ");\n\t"); - v_cg_gen_func_params(f, TRUE, FALSE); - if(VCGData.alias_name != NULL && VCGData.alias_bool_switch) - fprintf(f, "uint8\talias_bool;\n"); - fprintf(f, "\n\tfunc_%s = v_fs_get_user_func(%u);\n", VCGData.func_name, VCGData.cmd_id); - fprintf(f, "\tif(buffer_length < %u)\n\t\treturn -1;\n", v_cg_compute_command_size(0, TRUE)); - for(i = 0; i < VCGData.param_count; i++) - { - switch(VCGData.param_type[i]) - { - case VCGP_UINT8 : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_UINT16 : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_UINT32 : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_REAL32 : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_REAL64 : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_POINTER_TYPE : - break; - case VCGP_POINTER : - break; - case VCGP_NAME : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], %s, 16, buffer_length - buffer_pos);\n", VCGData.param_name[i]); - if(i + 1 < VCGData.param_count) - fprintf(f, "\tif(buffer_length < %u + buffer_pos)\n\t\treturn -1;\n", v_cg_compute_command_size(i + 1, TRUE)); - break; - case VCGP_LONG_NAME : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], %s, 512, buffer_length - buffer_pos);\n", VCGData.param_name[i]); - if(i + 1 < VCGData.param_count) - fprintf(f, "\tif(buffer_length < %u + buffer_pos)\n\t\treturn -1;\n", v_cg_compute_command_size(i + 1, TRUE)); - break; - case VCGP_NODE_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_LAYER_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_BUFFER_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_FRAGMENT_ID : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &%s);\n", VCGData.param_name[i]); - break; - case VCGP_ENUM : - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp);\n"); - fprintf(f, "\t%s = (%s)enum_temp;\n", VCGData.param_name[i], VCGData.param_name[i - 1]); - break; - case VCGP_UNPACK_INLINE : - if(!printed) - { - fprintf(f, "#if defined V_PRINT_RECEIVE_COMMANDS\n"); - if(VCGData.alias_name != NULL) - { - fprintf(f, "\t%s\n\t", VCGData.alias_qualifier); - v_cg_create_print(f, FALSE, TRUE); - fprintf(f, "\telse\n\t"); - } - v_cg_create_print(f, FALSE, FALSE); - fprintf(f, "#endif\n"); - printed = TRUE; - } - fprintf(f, "%s\n", VCGData.param_name[i++]); - break; - } - } - if(VCGData.alias_name != NULL && VCGData.alias_bool_switch) - { - fprintf(f, "\tif(buffer_length < buffer_pos + 1)\n"); - fprintf(f, "\t\treturn -1;\n"); - fprintf(f, "\tbuffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool);\n"); - } - if(!printed) - { - fprintf(f, "#if defined V_PRINT_RECEIVE_COMMANDS\n"); - if(VCGData.alias_name != NULL) - { - if(VCGData.alias_qualifier != NULL) - fprintf(f, "\t%s\n\t", VCGData.alias_qualifier); - else - fprintf(f, "\tif(!alias_bool)\n\t"); - v_cg_create_print(f, FALSE, TRUE); - fprintf(f, "\telse\n\t"); - } - v_cg_create_print(f, FALSE, FALSE); - fprintf(f, "#endif\n"); - printed = TRUE; - } - - if(VCGData.alias_name != NULL) - { - unsigned int active; - - if(VCGData.alias_bool_switch) - fprintf(f, "\tif(!alias_bool)\n"); - else - fprintf(f, "\t%s\n", VCGData.alias_qualifier); - fprintf(f, "\t{\n"); - fprintf(f, "\t\tvoid (* alias_%s)(void *user_data, ", VCGData.alias_name); - v_cg_gen_func_params(f, FALSE, TRUE); - fprintf(f, ");\n"); - fprintf(f, "\t\talias_%s = v_fs_get_alias_user_func(%u);\n", VCGData.alias_name, VCGData.cmd_id); - fprintf(f, "\t\tif(alias_%s != NULL)\n", VCGData.alias_name); - fprintf(f, "\t\t\talias_%s(v_fs_get_alias_user_data(%u)", VCGData.alias_name, VCGData.cmd_id); - for(i = 0; i < VCGData.param_count && i < VCGData.alias_param; i++) - { - if(VCGData.alias_param_array != NULL) - active = VCGData.alias_param_array[i]; - else - active = i; - - if(VCGData.param_type[active] != VCGP_PACK_INLINE && - VCGData.param_type[active] != VCGP_UNPACK_INLINE && - VCGData.param_type[active] != VCGP_END_ADDRESS && - VCGData.param_type[active] != VCGP_POINTER_TYPE) - { - if(VCGData.param_type[active] == VCGP_ENUM_NAME) - { - fprintf(f, ", (%s)%s", VCGData.param_name[active], VCGData.param_name[active + 1]); - i++; - } - else - fprintf(f, ", %s", VCGData.param_name[active]); - } - } - fprintf(f, ");\n\t\treturn buffer_pos;\n\t}\n"); - } - - fprintf(f, "\tif(func_%s != NULL)\n", VCGData.func_name); - fprintf(f, "\t\tfunc_%s(v_fs_get_user_data(%u)", VCGData.func_name, VCGData.cmd_id); - for(i = 0; i < VCGData.param_count; i++) - { - if(VCGData.param_type[i] != VCGP_PACK_INLINE && VCGData.param_type[i] != VCGP_UNPACK_INLINE && VCGData.param_type[i] != VCGP_END_ADDRESS && VCGData.param_type[i] != VCGP_POINTER_TYPE) - { - if(VCGData.param_type[i] == VCGP_ENUM_NAME) - { - fprintf(f, ", (%s) %s", VCGData.param_name[i], VCGData.param_name[i + 1]); - i++; - } - else - fprintf(f, ", %s", VCGData.param_name[i]); - } - } - fprintf(f, ");\n"); - fprintf(f, "\n\treturn buffer_pos;\n"); - fprintf(f, "}\n\n"); -} - -static void v_cg_gen_alias(void) -{ - FILE *f; - unsigned int i; - f = VCGData.nodes[VCGData.type]; - fprintf(f, "void verse_send_%s(", VCGData.alias_name); - v_cg_gen_func_params(f, FALSE, TRUE); - fprintf(f, ")\n{\n"); - fprintf(f, "\tverse_send_%s(", VCGData.func_name); - for(i = 0; i < VCGData.param_count; i++) - if(VCGData.param_type[i] != VCGP_ENUM_NAME && VCGData.param_type[i] != VCGP_PACK_INLINE && VCGData.param_type[i] != VCGP_UNPACK_INLINE && VCGData.param_type[i] != VCGP_END_ADDRESS && VCGData.param_type[i] != VCGP_POINTER_TYPE) - fprintf(f, ", %s", VCGData.param_name[i]); - fprintf(f, "}\n\n"); -} - -static void v_cg_gen_init(void) -{ - FILE *f; - f = VCGData.init; - fprintf(f, "\tv_fs_add_func(%i, v_unpack_%s, verse_send_%s, ", VCGData.cmd_id, VCGData.func_name, VCGData.func_name); - if(VCGData.alias_name != NULL) - fprintf(f, "verse_send_%s);\n", VCGData.alias_name); - else - fprintf(f, "NULL);\n"); -} - -static void v_cg_gen_verse_h(void) -{ - FILE *f; - if(VCGData.command == VCGCT_INVISIBLE_SYSTEM) - f = VCGData.internal_verse_h; - else - f = VCGData.verse_h; - fprintf(f, "extern void verse_send_%s(", VCGData.func_name); - v_cg_gen_func_params(f, FALSE, FALSE); - fprintf(f, ");\n"); - if(VCGData.alias_name != NULL) - { - fprintf(f, "extern void verse_send_%s(", VCGData.alias_name); - v_cg_gen_func_params(f, FALSE, TRUE); - fprintf(f, ");\n"); - } -} - -static void v_cg_gen_unpack_h(void) -{ - fprintf(VCGData.unpack, "extern unsigned int v_unpack_%s(const char *data, size_t length);\n", VCGData.func_name); -} - -void v_cg_end_cmd(void) -{ - v_cg_gen_pack(FALSE); - if(VCGData.alias_name != NULL) - v_cg_gen_pack(TRUE); - v_cg_gen_unpack(); - v_cg_gen_init(); - v_cg_gen_verse_h(); - v_cg_gen_unpack_h(); - VCGData.alias_name = NULL; -} - -int main(int argc, char *argv[]) -{ - const char *src = ""; - int i; - - for(i = 1; argv[i] != NULL; i++) - { - if(strcmp(argv[i], "-h") == 0) - { - printf("Verse protocol generation tool.\nUsage:\n"); - printf(" -h\t\tPrint this usage information, and exit.\n"); - printf(" -src=PATH\tSets source path prefix to PATH. It must be possible to find\n"); - printf("\t\tthe \"verse_header.h\" input file by appending that name to PATH.\n"); - printf("\t\tThus, PATH must end with a proper directory separator character.\n"); - printf(" -dst=PATH\tSets output directory, where all output files are written.\n"); - printf("\t\tIf used, use -src to point to where \"verse_header.h\" is.\n"); - printf("\nThe -src and -dst options were added to simplify building of Verse-Blender.\n"); - return EXIT_SUCCESS; - } - else if(strncmp(argv[i], "-src=", 5) == 0) - src = argv[i] + 5; - else if(strncmp(argv[i], "-dst=", 5) == 0) - { - if(chdir(argv[i] + 5) != 0) - fprintf(stderr, "%s: Couldn't set output directory to \"%s\"\n", argv[0], argv[i] + 5); - } - else - fprintf(stderr, "%s: Ignoring unknown option \"%s\"\n", argv[0], argv[i]); - } - - printf("start\n"); - if(!v_cg_init(src)) - return EXIT_FAILURE; - v_gen_system_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_object_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_geometry_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_material_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_bitmap_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_text_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_curve_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_gen_audio_cmd_def(); - fprintf(VCGData.verse_h, "\n"); - v_cg_close(); - printf("end\n"); - - return EXIT_SUCCESS; -} - -#endif diff --git a/extern/verse/dist/v_cmd_gen.h b/extern/verse/dist/v_cmd_gen.h deleted file mode 100644 index 6cc19a84d19..00000000000 --- a/extern/verse/dist/v_cmd_gen.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -** -*/ - -/* Define this to at least build the code that regenerates the variable parts of the code. */ -/*#define V_GENERATE_FUNC_MODE*/ - -typedef enum { - VCGP_UINT8, - VCGP_UINT16, - VCGP_UINT32, - VCGP_REAL32, - VCGP_REAL64, - VCGP_POINTER_TYPE, - VCGP_POINTER, - VCGP_NAME, - VCGP_LONG_NAME, - VCGP_NODE_ID, - VCGP_LAYER_ID, - VCGP_BUFFER_ID, - VCGP_FRAGMENT_ID, - VCGP_ENUM_NAME, - VCGP_ENUM, - VCGP_PACK_INLINE, - VCGP_UNPACK_INLINE, - VCGP_END_ADDRESS -} VCGParam; - -typedef enum { - VCGCT_NORMAL, - VCGCT_UNIQUE, - VCGCT_ONCE, - VCGCT_INVISIBLE_SYSTEM, /* In the dark we are all invisible. */ - VCGCT_ORDERED -} VCGCommandType; - -extern void v_cg_new_cmd(VCGCommandType type, const char *name, unsigned int cmd_id, VCGCommandType command); -extern void v_cg_add_param(VCGParam type, const char *name); -extern void v_cg_alias(char bool_switch, const char *name, const char *qualifier, - unsigned int param, unsigned int *param_array); -extern void v_cg_end_cmd(void); -extern void v_cg_new_manual_cmd(unsigned int cmd_id, const char *name, const char *params, const char *alias_name, const char *alias_params); diff --git a/extern/verse/dist/v_connect.c b/extern/verse/dist/v_connect.c deleted file mode 100644 index 31be90e2d47..00000000000 --- a/extern/verse/dist/v_connect.c +++ /dev/null @@ -1,490 +0,0 @@ -/* -** -*/ - -#include -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_encryption.h" -#include "v_util.h" - -extern void verse_send_packet_ack(uint32 packet_id); - -static void v_send_hidden_connect_contact(void) /* Stage 0: Clinets inital call to connect to host */ -{ - uint8 buf[V_ENCRYPTION_LOGIN_KEY_HALF_SIZE + 4 + 1 + 1], *key; - unsigned int i, buffer_pos = 0; - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], 0);/* Packing the packet id */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0);/* Packing the command */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0);/* Stage 0 */ - - key = v_con_get_my_key(); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], key[V_ENCRYPTION_LOGIN_PUBLIC_START + i]);/* Packing the command */ - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], key[V_ENCRYPTION_LOGIN_N_START + i]);/* Packing the command */ - - v_n_send_data(v_con_get_network_address(), buf, buffer_pos); -} - -static void v_send_hidden_connect_send_key(void) /* Stage 1: Hosts reply to any atempt to connect */ -{ - uint8 buf[V_ENCRYPTION_LOGIN_KEY_SIZE * 3 + 4 + 1 + 1 + 1 + 4 + 4], *host_id; - unsigned int i, buffer_pos = 0, s, f; - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], 0);/* Packing the packet id */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0);/* Packing the command */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 1);/* Stage 1 */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], V_RELEASE_NUMBER);/* version */ - v_n_get_current_time(&s, &f); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], s);/* time, seconds */ - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], f);/* time, fraction */ - host_id = v_con_get_host_id(); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], host_id[V_ENCRYPTION_LOGIN_PUBLIC_START + i]); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], host_id[V_ENCRYPTION_LOGIN_N_START + i]); - - v_n_send_data(v_con_get_network_address(), buf, buffer_pos); -} - -static void v_send_hidden_connect_login(void) /* Stage 2: clients sends encrypted name and password */ -{ - uint8 buf[1500], *key, name_pass[V_ENCRYPTION_LOGIN_KEY_SIZE], encrypted_key[V_ENCRYPTION_LOGIN_KEY_SIZE]; - const char *name, *pass; - unsigned int buffer_pos = 0, i; - - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], 1);/* Packing the packet id */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0);/* Packing the command */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 2);/* Stage 2 */ - name = v_con_get_name(); - /* Pad data area with randomness. */ - for(i = 0; i < sizeof name_pass; i++) - name_pass[i] = rand() >> 13; - v_strlcpy(name_pass, name, V_ENCRYPTION_LOGIN_KEY_SIZE / 2); - pass = v_con_get_pass(); - v_strlcpy(name_pass + V_ENCRYPTION_LOGIN_KEY_SIZE / 2, pass, V_ENCRYPTION_LOGIN_KEY_SIZE / 2); - /* Make sure last (MSB) byte is clear, to guarantee that data < key for RSA math. */ - name_pass[sizeof name_pass - 1] = 0; - key = v_con_get_other_key(); - v_e_connect_encrypt(encrypted_key, name_pass, &key[V_ENCRYPTION_LOGIN_PUBLIC_START], &key[V_ENCRYPTION_LOGIN_N_START]); - - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], encrypted_key[i]); - v_n_send_data(v_con_get_network_address(), buf, buffer_pos); -} - -static void v_send_hidden_connect_accept(void) /* Host accepts Clients connectionatempt and sends over data encryption key */ -{ - uint8 buf[1500], *client_key, encrypted[V_ENCRYPTION_DATA_KEY_SIZE]; - unsigned int i, buffer_pos = 0; - - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], 1);/* Packing the packet id */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 1);/* Packing the command */ - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], verse_session_get_avatar()); - client_key = v_con_get_other_key(); - v_e_connect_encrypt(encrypted, v_con_get_data_key(), &client_key[V_ENCRYPTION_LOGIN_PUBLIC_START], &client_key[V_ENCRYPTION_LOGIN_N_START]); - for(i = 0; i < V_ENCRYPTION_DATA_KEY_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], encrypted[i]); - v_n_send_data(v_con_get_network_address(), buf, buffer_pos); -} - -static void v_send_hidden_connect_terminate(VNetworkAddress *address, unsigned int packet_id, const char *bye) /* Host accepts Clients connectionatempt and sends over data encryption key */ -{ - uint8 buf[1500]; - unsigned int buffer_pos = 0; - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], packet_id);/* Packing the packet id */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 2);/* Packing the command */ - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], bye, 512); /* pack message */ - v_e_data_encrypt_command(buf, sizeof (uint32), buf + sizeof (uint32), buffer_pos, v_con_get_data_key()); - v_n_send_data(address, buf, buffer_pos); -} - -VSession verse_send_connect(const char *name, const char *pass, const char *address, const uint8 *expected_key) -{ - uint8 *my_key, *key = NULL; - unsigned int i; - VNetworkAddress a; - VSession *session; - if(v_n_set_network_address(&a, address)) - { -#if defined(V_PRINT_SEND_COMMANDS) - char ip_string[32]; -#endif - session = v_con_connect(a.ip, a.port, V_CS_CONTACT); -#if defined(V_PRINT_SEND_COMMANDS) - v_n_get_address_string(&a, ip_string); - printf("send: %p = verse_send_connect(name = %s, pass = %s, address = %s (%s), expected_key = %p)\n", session, name, pass, address, ip_string, expected_key); -#endif - v_con_set_name_pass(name, pass); - if(expected_key != NULL) - { - key = malloc((sizeof *key) * V_ENCRYPTION_LOGIN_KEY_HALF_SIZE); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_HALF_SIZE; i++) - key[i] = expected_key[i]; - *v_con_get_expected_key() = key; - } - my_key = v_con_get_my_key(); - v_e_connect_create_key(&my_key[V_ENCRYPTION_LOGIN_PRIVATE_START], &my_key[V_ENCRYPTION_LOGIN_PUBLIC_START], &my_key[V_ENCRYPTION_LOGIN_N_START]); - v_send_hidden_connect_contact(); - v_con_inqueue_timer_update(); /* Reset timer in connection's in queue, above takes a while. */ - return session; - } - else - { -#if defined(V_PRINT_SEND_COMMANDS) - printf("send: NULL = verse_send_connect(name = %s, pass = %s, address = %s (Unressolved DNS), key = %p);\n", name, pass, address, key); -#endif - return NULL; - } -} - -void v_update_connection_pending(boolean resend) -{ - VSession (* func_connect)(void *user_data, const char *name, const char *pass, const char *address, const uint8 *key) = NULL; - VSession (* func_connect_accept)(void *user_data, VNodeID avatar, char *address, uint8 *host_id); - void (* func_connect_terminate)(void *user_data, char *address, const char *bye); - char address_string[32]; - - switch(v_con_get_connect_stage()) - { - case V_CS_CONTACT : /* client tries to contact host */ - if(resend) - v_send_hidden_connect_contact(); - break; - case V_CS_CONTACTED : /* Host replies with challange */ - if(resend) - v_send_hidden_connect_send_key(); - break; - case V_CS_PENDING_ACCEPT : /* Client sends login */ - if(resend) - v_send_hidden_connect_login(); - break; - case V_CS_PENDING_HOST_CALLBACK : /* Host got login waits for accept connect callback */ - v_con_set_connect_stage(V_CS_PENDING_DECISION); - func_connect = v_fs_get_user_func(0); - v_n_get_address_string(v_con_get_network_address(), address_string); -#if defined(V_PRINT_RECEIVE_COMMANDS) - printf("receive: verse_send_connect(address = %s, name = %s, pass = %s, key = NULL); callback = %p\n", address_string, v_con_get_name(), v_con_get_pass(), func_connect); -#endif - if(func_connect != 0) - func_connect(v_fs_get_user_data(0), v_con_get_name(), v_con_get_pass(), address_string, NULL); - break; - case V_CS_PENDING_CLIENT_CALLBACK_ACCEPT : /* Host got login waits for accept connect callback */ - v_con_set_connect_stage(V_CS_CONNECTED); - func_connect_accept = v_fs_get_user_func(1); - v_n_get_address_string(v_con_get_network_address(), address_string); -#if defined(V_PRINT_RECEIVE_COMMANDS) - printf("receive: func_connect_accept(avatar = %u, address = %s, name = %s, pass = %s, key = NULL); callback = %p\n", - verse_session_get_avatar(), address_string, v_con_get_name(), v_con_get_pass(), func_connect); -#endif - if(func_connect_accept != 0) - func_connect_accept(v_fs_get_user_data(1), verse_session_get_avatar(), address_string, NULL); - break; - case V_CS_PENDING_CLIENT_CALLBACK_TERMINATE : /* Host got login waits for accept connect callback */ - v_con_set_connect_stage(V_CS_CONNECTED); - func_connect_terminate = v_fs_get_user_func(2); - v_n_get_address_string(v_con_get_network_address(), address_string); -#if defined(V_PRINT_RECEIVE_COMMANDS) - printf("receive: func_connect_terminate(address = %s, bye = %s); callback = %p\n", address_string, "no message", func_connect); -#endif - if(func_connect_terminate != 0) - func_connect_terminate(v_fs_get_user_data(2), address_string, "no message"); - break; - default: - ; - } -} - -void v_unpack_connection(const char *buf, unsigned int buffer_length) /* un packing all stages of connect command */ -{ - unsigned int buffer_pos, i, pack_id; - uint32 seconds, fractions, pre; - uint8 /*key[V_ENCRYPTION_LOGIN_KEY_SIZE], */stage, cmd_id, version; - - if(buffer_length < 5) - return; - - buffer_pos = vnp_raw_unpack_uint32(buf, &pack_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &cmd_id); - pre = v_con_get_connect_stage(); - if(cmd_id == 0) - { - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &stage); - printf(" Handling connection, stage %u\n", stage); - if(stage == V_CS_IDLE && V_CS_IDLE == v_con_get_connect_stage()) /* reseved by host */ - { - uint8 *other_key, *my_key; - - verse_send_packet_ack(pack_id); - my_key = v_con_get_my_key(); - v_con_set_data_key(v_e_data_create_key()); - other_key = v_con_get_other_key(); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &other_key[V_ENCRYPTION_LOGIN_PUBLIC_START + i]);/* Packing the command */ - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &other_key[V_ENCRYPTION_LOGIN_N_START + i]);/* Packing the command */ - v_con_set_connect_stage(V_CS_CONTACTED); - v_send_hidden_connect_send_key(); - return; - } - if(stage == V_CS_CONTACT && V_CS_CONTACT == v_con_get_connect_stage()) - { - uint8 *other_key; /* *host_id, *my_key, a[V_ENCRYPTION_LOGIN_KEY_SIZE], b[V_ENCRYPTION_LOGIN_KEY_SIZE];*/ - verse_send_packet_ack(pack_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &version); - if(version != V_RELEASE_NUMBER) - { - /* char error_message[128]; - func_connect_deny = v_fs_get_user_func(2); - #if defined(V_PRINT_RECEIVE_COMMANDS) - printf("receive: verse_send_connect_deny(Host is running version %u you are running version %u); callback = %p\n", (uint32)version, (uint32)V_RELEASE_NUMBER func_connect_deny); - #endif - if(func_connect_deny != NULL) - { - sprintf(error_message, "Host is running version %u you are running version %u", (uint32)version, (uint32)V_RELEASE_NUMBER); - func_connect_deny(v_fs_get_user_data(2), error_message); - }*/ - return; - } - - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &seconds); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &fractions); - v_con_set_time(seconds, fractions); - - other_key = v_con_get_other_key(); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &other_key[V_ENCRYPTION_LOGIN_PUBLIC_START + i]); - for(i = 0; i < V_ENCRYPTION_DATA_KEY_SIZE; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &other_key[V_ENCRYPTION_LOGIN_N_START + i]); - - v_con_set_connect_stage(V_CS_PENDING_ACCEPT); - v_send_hidden_connect_login(); - return; - } -#if 0 - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_HALF_SIZE && encrypted_key[i] == 0; i++); - if(i < 0) - { - other_key = v_con_get_my_key(); - v_e_connect_encrypt(decrypted_key, encrypted_key, &other_key[V_ENCRYPTION_LOGIN_PUBLIC_START + i], &other_key[V_ENCRYPTION_LOGIN_N_START + i]); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_HALF_SIZE && my_key[V_ENCRYPTION_LOGIN_PUBLIC_START + i] == decrypted_key[i]; i++); - if(i < 0) /* Host is not who it appers top be */ - { - func_connect_deny = v_fs_get_user_func(2); -#if defined(V_PRINT_RECEIVE_COMMANDS) - printf("receive: verse_send_connect_deny(Host failed identity check); callback = %p\n", func_connect_deny); -#endif - if(func_connect_deny != NULL) - func_connect_deny(v_fs_get_user_data(2), "Host failed identity check"); - return; - } - } -#endif - if(stage == V_CS_CONTACTED && V_CS_CONTACTED == v_con_get_connect_stage()) /* reseved by host */ - { - char *host_id, unpack[V_ENCRYPTION_LOGIN_KEY_SIZE], data[V_ENCRYPTION_LOGIN_KEY_SIZE]; - VNetworkAddress *address; - verse_send_packet_ack(pack_id); - address = v_con_get_network_address(); - for(i = 0; i < V_ENCRYPTION_LOGIN_KEY_SIZE; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &data[i]); - host_id = v_con_get_host_id(); - v_e_connect_encrypt(unpack, data, &host_id[V_ENCRYPTION_LOGIN_PRIVATE_START], &host_id[V_ENCRYPTION_LOGIN_N_START]); - v_con_set_name_pass(unpack, &unpack[V_ENCRYPTION_LOGIN_KEY_SIZE / 2]); - v_con_set_connect_stage(V_CS_PENDING_HOST_CALLBACK); - return; - } - } - if(cmd_id == 1 && V_CS_PENDING_ACCEPT == v_con_get_connect_stage()) /* reseved by client */ - { - uint8 *my_key, key[V_ENCRYPTION_DATA_KEY_SIZE], decrypted[V_ENCRYPTION_DATA_KEY_SIZE]; - uint32 avatar; - verse_send_packet_ack(pack_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &avatar); - v_con_set_avatar(avatar); - for(i = 0; i < V_ENCRYPTION_DATA_KEY_SIZE; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &key[i]); - my_key = v_con_get_my_key(); - v_e_connect_encrypt(decrypted, key, &my_key[V_ENCRYPTION_LOGIN_PRIVATE_START], &my_key[V_ENCRYPTION_LOGIN_N_START]); - v_con_set_data_key(decrypted); - v_con_set_connect_stage(V_CS_PENDING_CLIENT_CALLBACK_ACCEPT); - v_send_hidden_connect_send_key(); - return; - } - if(cmd_id == 2 && V_CS_PENDING_ACCEPT == v_con_get_connect_stage()) /* reseved by client */ - { - verse_send_packet_ack(pack_id); - /* buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 512, buffer_length - buffer_pos); - */ v_con_set_connect_stage(V_CS_PENDING_CLIENT_CALLBACK_TERMINATE); - return; - } -} - -VSession verse_send_connect_accept(VNodeID avatar, const char *address, uint8 *host_id) -{ - VNetworkAddress a; -#if defined(V_PRINT_SEND_COMMANDS) - printf("send: verse_send_connect_accept(avatar = %u, address = %s, host_id = NULL);\n", avatar, address); -#endif - - if(!v_n_set_network_address(&a, address)) - return NULL; - if(v_co_switch_connection(a.ip, a.port)) - { - if(v_con_get_connect_stage() != V_CS_PENDING_DECISION) - return NULL; - v_con_set_avatar(avatar); - v_con_set_connect_stage(V_CS_CONNECTED); - v_send_hidden_connect_accept(); - return v_con_get_network_queue(); - } - return NULL; -} - -void v_callback_connect_terminate(const char *bye) -{ - void (* func_connect_terminate)(void *user_data, char *address, const char *bye); - char address_string[32]; - - printf("terminate (%s)\n", bye); - func_connect_terminate = v_fs_get_user_func(2); - v_n_get_address_string(v_con_get_network_address(), address_string); -#if defined(V_PRINT_RECEIVE_COMMANDS) - printf("receive: verse_send_connect_terminate(address = %s, bye = %s); callback = %p\n", address_string, bye, func_connect_terminate); -#endif - if(func_connect_terminate != 0) - func_connect_terminate(v_fs_get_user_data(2), address_string, bye); -} - -void verse_send_connect_terminate(const char *address, const char *bye) -{ - VNetworkAddress a; -#if defined(V_PRINT_RECEIVE_COMMANDS) - printf("send: verse_send_connect_terminate(address = %s, bye = %s);\n", address, bye); -#endif - - if(address == NULL) - v_send_hidden_connect_terminate(v_con_get_network_address(), v_noq_get_next_out_packet_id(v_con_get_network_queue()), bye); - else if(!v_n_set_network_address(&a, address)) - return; - else if(v_co_switch_connection(a.ip, a.port)) - v_send_hidden_connect_terminate(v_con_get_network_address(), v_noq_get_next_out_packet_id(v_con_get_network_queue()), bye); - - if(v_con_get_connect_stage() != V_CS_PENDING_DECISION) - verse_session_destroy(v_con_get_network_queue()); -} - -void verse_send_ping(const char *address, const char *message) -{ - VNetworkAddress a; - if(v_n_set_network_address(&a, address)) - { - unsigned int buffer_pos = 0; - uint8 buf[1500]; - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], 0);/* Packing the Packet id */ - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 5);/* Packing the command */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_ping(address = %s text = %s);\n", address, message); -#endif - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], message, 1400); - v_n_send_data(&a, buf, buffer_pos); - } -#if defined V_PRINT_SEND_COMMANDS - else - printf("send: verse_send_ping(address = %s (FAULTY) message = %s);\n", address, message); -#endif -} - -unsigned int v_unpack_ping(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_ping)(void *user_data, const char *address, const char *text); - char address[64]; - char message[1400]; - - func_ping = v_fs_get_user_func(5); - v_n_get_address_string(v_con_get_network_address(), address); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], message, 1400, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_ping(address = %s message = %s ); callback = %p\n", address, message, v_fs_get_user_func(5)); -#endif - if(func_ping != NULL) - func_ping(v_fs_get_user_data(5), address, message); - return buffer_pos; -} - -typedef struct { - uint32 ip; - uint16 port; - char message[1400]; - void *next; -} VPingCommand; - -static VPingCommand *v_ping_commands = NULL; - -boolean v_connect_unpack_ping(const char *buf, size_t buffer_length, uint32 ip, uint16 port) -{ - if(buffer_length > 5) - { - unsigned int buffer_pos = 0; - uint8 cmd_id; - uint32 pack_id; - - buffer_pos = vnp_raw_unpack_uint32(&buf[buffer_pos], &pack_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &cmd_id); - if(cmd_id == 5) - { - if(NULL != v_fs_get_user_func(5)) - { - VPingCommand *pc; - - pc = malloc(sizeof *pc); - pc->ip = ip; - pc->port = port; - vnp_raw_unpack_string(&buf[buffer_pos], pc->message, - sizeof pc->message, buffer_length - buffer_pos); - pc->next = v_ping_commands; - v_ping_commands = pc; - } - return TRUE; - } - } - return FALSE; -} - -void v_ping_update(void) -{ - VPingCommand *cp; - void (* func_ping)(void *user_data, const char *address, const char *text); - VNetworkAddress a; - char address[64]; - func_ping = v_fs_get_user_func(5); - - while(v_ping_commands != NULL) - { - cp = v_ping_commands->next; - a.ip = v_ping_commands->ip; - a.port = v_ping_commands->port; - v_n_get_address_string(&a, address); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_ping(address = %s message = %s ); callback = %p\n", address, v_ping_commands->message, v_fs_get_user_func(5)); -#endif - if(func_ping != NULL) - func_ping(v_fs_get_user_data(5), address, v_ping_commands->message); - free(v_ping_commands); - v_ping_commands = cp; - } -} - -#endif diff --git a/extern/verse/dist/v_connection.c b/extern/verse/dist/v_connection.c deleted file mode 100644 index 3bfafad5660..00000000000 --- a/extern/verse/dist/v_connection.c +++ /dev/null @@ -1,490 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_buf.h" -#include "v_network_in_que.h" -#include "v_network_out_que.h" -#include "v_cmd_gen.h" -#include "v_connection.h" -#include "v_encryption.h" -#include "v_util.h" - -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" - -#define CONNECTION_CHUNK_SIZE 16 -#define V_MAX_CONNECT_PACKET_SIZE 1500 -#define V_CON_MAX_MICROSECOND_BETWEEN_SENDS 100 -#define V_RE_CONNECTON_TIME_OUT 4 -#define V_CONNECTON_TIME_OUT 30 - -typedef struct { - VNetOutQueue *out_queue; - VNetInQueue in_queue; - VNetworkAddress network_address; - boolean connected; - unsigned int avatar; -/* unsigned int packet_id;*/ - int32 timedelta_s; - uint32 timedelta_f; - boolean destroy_flag; - void *ordered_storage; - char name[V_ENCRYPTION_LOGIN_KEY_SIZE / 2]; - char pass[V_ENCRYPTION_LOGIN_KEY_SIZE / 2]; - VConnectStage connect_stage; - unsigned int stage_atempts; - uint8 key_my[V_ENCRYPTION_LOGIN_KEY_FULL_SIZE]; - uint8 key_other[V_ENCRYPTION_LOGIN_KEY_FULL_SIZE]; - uint8 key_data[V_ENCRYPTION_DATA_KEY_SIZE]; - uint8 *expected_key; -} VConnection; - -static struct { - VConnection *con; - unsigned int con_count; - unsigned int current_connection; - VNetworkAddress *connect_address; - void *unified_func_storage; - uint16 connect_port; - unsigned int pending_packets; - uint8 host_id[V_ENCRYPTION_LOGIN_KEY_FULL_SIZE]; -} VConData; - -extern void cmd_buf_init(void); - -void v_con_init(void) /* since verse doesnt have an init function this function is runned over an ove ard starts whit a check it it has run before */ -{ - static boolean v_con_initialized = FALSE; - - if(v_con_initialized) - return; - cmd_buf_init(); - v_con_initialized = TRUE; - VConData.con = malloc(CONNECTION_CHUNK_SIZE * sizeof *VConData.con); - memset(VConData.con, 0, CONNECTION_CHUNK_SIZE * sizeof *VConData.con); /* Clear the memory. */ - VConData.con_count = 0; - VConData.pending_packets = 0; -/* v_e_connect_create_key(&VConData.host_id[V_ENCRYPTION_LOGIN_PRIVATE_START], - &VConData.host_id[V_ENCRYPTION_LOGIN_PUBLIC_START], - &VConData.host_id[V_ENCRYPTION_LOGIN_N_START]);*/ /* default host id if none is set by user */ -} - -void verse_set_port(uint16 port) -{ - v_n_set_port(port); -} - -void verse_host_id_create(uint8 *id) -{ - v_e_connect_create_key(&id[V_ENCRYPTION_LOGIN_PRIVATE_START], - &id[V_ENCRYPTION_LOGIN_PUBLIC_START], &id[V_ENCRYPTION_LOGIN_N_START]); -} - -void verse_host_id_set(uint8 *id) -{ - memcpy(VConData.host_id, id, V_ENCRYPTION_LOGIN_KEY_FULL_SIZE); -} - -extern void *v_fs_create_func_storage(void); -extern void *v_create_ordered_storage(void); -extern void v_destroy_ordered_storage(void *data); - -void *v_con_connect(uint32 ip, uint16 port, VConnectStage stage) /* creates a new connection slot */ -{ - v_con_init(); /* init connections, if not done yet */ - if((VConData.con_count - 1) % CONNECTION_CHUNK_SIZE == 0) /* do we need more slots for connections, then reallocate more space */ - VConData.con = realloc(VConData.con, (sizeof *VConData.con) * (VConData.con_count + CONNECTION_CHUNK_SIZE)); - VConData.con[VConData.con_count].out_queue = v_noq_create_network_queue(); /* create a out queue fo all out going commands */ - v_niq_clear(&VConData.con[VConData.con_count].in_queue); /* clear and init the que of incomming packets.*/ - VConData.con[VConData.con_count].connected = FALSE; /* not yet propperly connected and should not accept commands yet */ - VConData.con[VConData.con_count].network_address.ip = ip; /* ip address of other side */ - VConData.con[VConData.con_count].network_address.port = port; /* port used by other side */ - VConData.con[VConData.con_count].avatar = 0; /* no avatar set yet*/ -/* VConData.con[VConData.con_count].packet_id = 2;*/ - VConData.con[VConData.con_count].destroy_flag = FALSE; /* this is a flag that is set once the connection is about to be destroyed.*/ - VConData.con[VConData.con_count].ordered_storage = v_create_ordered_storage(); - VConData.con[VConData.con_count].name[0] = 0; /* nouser name set yet */ - VConData.con[VConData.con_count].pass[0] = 0; /* no password set yet */ - VConData.con[VConData.con_count].connect_stage = stage; /* this is the stage of the connection, it show if the connection is ready, the init state depends if this is a client or host */ - VConData.con[VConData.con_count].stage_atempts = 0; /* each stage in the connection prosess is atempted multiple times to avoid failiure if packets get lost*/ - VConData.con[VConData.con_count].timedelta_s = 0; /* number of seconds since last incomming packet to the connection*/ - VConData.con[VConData.con_count].timedelta_f = 0; /* number of fractions of a second since last incomming packet to the connection*/ - VConData.con[VConData.con_count].expected_key = NULL; /* expected hist id if this is a client */ - VConData.current_connection = VConData.con_count; /* set the new connection to the current*/ - ++VConData.con_count; /* add one to the number of connections*/ - return VConData.con[VConData.current_connection].out_queue; -} - -void verse_session_destroy(VSession session) /* a session can not be destroyed right away, because this function might be called inside a call back from the session it tryes tpo destroy, therfor it only markes it*/ -{ - unsigned int i; - for(i = 0; i < VConData.con_count && VConData.con[i].out_queue != session; i++); - if(i < VConData.con_count) - { - VConData.con[i].destroy_flag = TRUE; - } -} - -void verse_session_set(VSession session) /* find a session and make it the current*/ -{ - unsigned int i; - for(i = 0; i < VConData.con_count && session != VConData.con[i].out_queue; i++); - if(i < VConData.con_count) - VConData.current_connection = i; -} - -VSession verse_session_get(void) -{ - if(VConData.current_connection < VConData.con_count) - return VConData.con[VConData.current_connection].out_queue; - return NULL; -} - -uint32 v_co_find_connection(uint32 ip, uint16 port) /* if a packet comes form a ip address what connection does it belong to? */ -{ - unsigned int i; - - for(i = 0; i < VConData.con_count; i++) - { - if(ip == VConData.con[i].network_address.ip && - port == VConData.con[i].network_address.port && - VConData.con[i].destroy_flag == 0) - { - return i; - } - } - return -1; -} - -boolean v_co_switch_connection(uint32 ip, uint16 port) /* switches to the current connection to one ip address if it exists */ -{ - unsigned int i; - for(i = 0; i < VConData.con_count; i++) - { - if(ip == VConData.con[i].network_address.ip && port == VConData.con[i].network_address.port) - { - VConData.current_connection = i; - return TRUE; - } - } - return FALSE; -} - -void v_con_inqueue_timer_update(void) -{ - if(VConData.current_connection < VConData.con_count) - { - v_niq_timer_update(&VConData.con[VConData.current_connection].in_queue); - } -} - -/* -extern void v_fs_buf_unpack(const uint8 *data, unsigned int length); -extern void v_fs_buf_store_pack(uint8 *data, unsigned int length); -extern boolean v_fs_buf_unpack_stored(void); -*/ -extern void v_unpack_connection(const char *buf, unsigned int buffer_length); - -extern void verse_send_packet_nak(uint32 packet_id); -extern void v_callback_connect_terminate(const char *bye); -extern boolean v_connect_unpack_ping(const char *buf, size_t buffer_length, uint32 ip, uint16 port); -extern void v_ping_update(void); -void v_fs_unpack_beginning(uint8 *data, unsigned int length); - -/* Main function that receives and distributes all incoming packets. */ -boolean v_con_network_listen(void) -{ - VNetworkAddress address; - uint8 buf[V_MAX_CONNECT_PACKET_SIZE], *store; - int size = 0; - unsigned int connection; - uint32 packet_id; - boolean ret = FALSE; - - v_con_init(); /* Init if needed. */ - connection = VConData.current_connection; /* Store current connection in a local variable so that we can restore it later. */ - size = v_n_receive_data(&address, buf, sizeof buf); /* Ask for incoming data from the network. */ - while(size != -1 && size != 0) /* Did we get any data? */ - { - VConData.current_connection = v_co_find_connection(address.ip, address.port); /* Is there a connection matching the IP and port? */ - vnp_raw_unpack_uint32(buf, &packet_id); /* Unpack the ID of the packet. */ -/* printf("got packet ID %u, %d bytes, connection %u\n", packet_id, size, VConData.current_connection);*/ - if(VConData.current_connection < VConData.con_count && - !(VConData.con[VConData.current_connection].connect_stage == V_CS_CONNECTED && packet_id == 0)) /* If this isn't a packet from an existing connection, disregard it. */ - { - if(VConData.con[VConData.current_connection].connect_stage == V_CS_CONNECTED) /* Is this connection initialized? */ - { - store = v_niq_store(&VConData.con[VConData.current_connection].in_queue, size, packet_id); /* Store the packet. */ - if(store != NULL) - { - VConData.pending_packets++; /* We now have one more packet pending unpack. */ - v_e_data_decrypt_packet(store, buf, size, VConData.con[VConData.current_connection].key_data); /* Decrypt the packet. */ - v_fs_unpack_beginning(store, size); - } - } - else - { - v_unpack_connection(buf, size); /* This is an ongoing connecton-attempt. */ - v_niq_timer_update(&VConData.con[VConData.current_connection].in_queue); - } - } - else if(v_connect_unpack_ping(buf, size, address.ip, address.port)) /* Ping handled. */ - ; - else if(v_fs_func_accept_connections()) /* Do we accept connection-attempts? */ - { - if(VConData.current_connection >= VConData.con_count || - V_RE_CONNECTON_TIME_OUT < v_niq_time_out(&VConData.con[VConData.current_connection].in_queue)) /* Is it a new client, or an old client that we haven't heard form in some time? */ - { - if(VConData.current_connection < VConData.con_count) - { - VConData.con[VConData.current_connection].network_address.ip = 0; - VConData.con[VConData.current_connection].destroy_flag = TRUE; /* Destroy old connection if there is one. */ - } - v_con_connect(address.ip, address.port, V_CS_IDLE); /* Create a new connection. */ - v_unpack_connection(buf, size); /* Unpack the connection-attempt. */ - } - } - else - { - fprintf(stderr, __FILE__ ": Unhandled packet--dropping\n"); - if(VConData.con_count > 0) - { - fprintf(stderr, __FILE__ ": State: connections=%u, current=%u (stage %u), packet_id=%u\n", - VConData.con_count, - VConData.current_connection, - (VConData.current_connection < VConData.con_count) ? VConData.con[VConData.current_connection].connect_stage : 0, - packet_id); - } - } - size = v_n_receive_data(&address, buf, sizeof buf); /* See if there are more incoming packets. */ - ret = TRUE; - } - VConData.current_connection = connection; /* Reset the current connection. */ - - return ret; -} - -extern void v_update_connection_pending(boolean resend); - -boolean v_con_callback_update(void) -{ - static unsigned int seconds; - boolean output = FALSE; - size_t size; - unsigned int connection, s; - VNetInPacked *p; - - v_n_get_current_time(&s, NULL); - connection = VConData.current_connection; - for(VConData.current_connection = 0; VConData.current_connection < VConData.con_count; VConData.current_connection++) - if(VConData.con[VConData.current_connection].connect_stage != V_CS_CONNECTED) - v_update_connection_pending(s != seconds); - seconds = s; - VConData.current_connection = connection; - if(VConData.pending_packets == 0) - return FALSE; - if(VConData.con[VConData.current_connection].connect_stage == V_CS_CONNECTED) - { - while((p = v_niq_get(&VConData.con[VConData.current_connection].in_queue, &size)) != NULL) - { - VConData.pending_packets--; - v_fs_unpack(p->data, size); - v_niq_release(&VConData.con[VConData.current_connection].in_queue, p); - output = TRUE; - } - v_con_network_listen(); - } - return output; -} - -void verse_callback_update(unsigned int microseconds) -{ - unsigned int connection, passed; - - v_ping_update(); /* Deliver any pending pings. */ - connection = VConData.current_connection; - for(VConData.current_connection = 0; VConData.current_connection < VConData.con_count; VConData.current_connection++) - { - if(VConData.con[VConData.current_connection].connect_stage == V_CS_CONNECTED) - v_noq_send_queue(VConData.con[VConData.current_connection].out_queue, &VConData.con[VConData.current_connection].network_address); - if(VConData.con[VConData.current_connection].destroy_flag == TRUE) - { - v_noq_destroy_network_queue(VConData.con[VConData.current_connection].out_queue); - VConData.pending_packets -= v_niq_free(&VConData.con[VConData.current_connection].in_queue); - v_destroy_ordered_storage(VConData.con[VConData.current_connection].ordered_storage); - if(VConData.con[VConData.current_connection].expected_key != NULL) - free(VConData.con[VConData.current_connection].expected_key); - if(VConData.con_count - 1 != VConData.current_connection) - VConData.con[VConData.current_connection] = VConData.con[VConData.con_count - 1]; - VConData.con_count--; - if(connection >= VConData.con_count) - VConData.current_connection = 0; - return; - } - } - VConData.current_connection = connection; - - if(VConData.con_count > 0) - { -/* printf("checking timeout of stage %d connection %u\n", - VConData.con[VConData.current_connection].connect_stage, VConData.current_connection); -*/ if(V_CONNECTON_TIME_OUT < v_niq_time_out(&VConData.con[VConData.current_connection].in_queue)) - { - if(VConData.con[VConData.current_connection].connect_stage != V_CS_CONNECTED) - { - VConData.con[VConData.current_connection].destroy_flag = TRUE; - } - else - v_callback_connect_terminate("connection timed out"); - } - } - - v_con_network_listen(); - if(VConData.con_count > 0) - if(v_con_callback_update()) - return; - for(passed = 0; passed < microseconds && VConData.pending_packets == 0;) - { - boolean update; - if(microseconds - passed > V_CON_MAX_MICROSECOND_BETWEEN_SENDS) /* Still a long way to go? */ - passed += v_n_wait_for_incoming(V_CON_MAX_MICROSECOND_BETWEEN_SENDS); - else - passed += v_n_wait_for_incoming(microseconds - passed); - do - { - update = v_con_network_listen(); - connection = VConData.current_connection; - for(VConData.current_connection = 0; VConData.current_connection < VConData.con_count; VConData.current_connection++) - { - if(VConData.con[VConData.current_connection].connect_stage == V_CS_CONNECTED) - { - if(v_noq_send_queue(VConData.con[VConData.current_connection].out_queue, &VConData.con[VConData.current_connection].network_address)) - update = TRUE; - } - } - VConData.current_connection = connection; - } while(update); - } - if(VConData.con_count > 0) - v_con_callback_update(); -} - -void v_con_set_name_pass(const char *name, const char *pass) -{ - v_strlcpy(VConData.con[VConData.current_connection].name, name, sizeof VConData.con[VConData.current_connection].name); - v_strlcpy(VConData.con[VConData.current_connection].pass, pass, sizeof VConData.con[VConData.current_connection].pass); -} - -const char * v_con_get_name(void) -{ - return VConData.con[VConData.current_connection].name; -} - -const char * v_con_get_pass(void) -{ - return VConData.con[VConData.current_connection].pass; -} - -void v_con_set_connect_stage(VConnectStage stage) -{ - VConData.con[VConData.current_connection].connect_stage = stage; - VConData.con[VConData.current_connection].stage_atempts = 0; -} - -VConnectStage v_con_get_connect_stage(void) -{ - return VConData.con[VConData.current_connection].connect_stage; -} - -uint8 *v_con_get_my_key(void) -{ - return VConData.con[VConData.current_connection].key_my; -} - -uint8 *v_con_get_other_key(void) -{ - return VConData.con[VConData.current_connection].key_other; -} - -uint8 **v_con_get_expected_key(void) -{ - return &VConData.con[VConData.current_connection].expected_key; -} - -uint8 * v_con_get_host_id(void) -{ - return VConData.host_id; -} - -void v_con_set_data_key(const uint8 *key) -{ - memcpy(VConData.con[VConData.current_connection].key_data, key, V_ENCRYPTION_DATA_KEY_SIZE); -} - -const uint8 * v_con_get_data_key(void) -{ - return VConData.con[VConData.current_connection].key_data; -} - -void * v_con_get_network_queue(void) -{ - return VConData.con[VConData.current_connection].out_queue; -} - -VNetworkAddress * v_con_get_network_address(void) -{ - return &VConData.con[VConData.current_connection].network_address; -} - -void * v_con_get_ordered_storage(void) -{ - return VConData.con[VConData.current_connection].ordered_storage; -} - -void v_con_set_avatar(uint32 avatar) -{ - VConData.con[VConData.current_connection].avatar = avatar; -} - -uint32 verse_session_get_avatar(void) -{ - return VConData.con[VConData.current_connection].avatar; -} - -void verse_session_get_time(uint32 *seconds, uint32 *fractions) -{ - uint32 s, f; - v_n_get_current_time(&s, &f); - if((uint32)~0 - f < VConData.con[VConData.current_connection].timedelta_f) - s++; - if(seconds != NULL) - { - if(VConData.con[VConData.current_connection].timedelta_s < 0) - *seconds = s - (uint32)(-VConData.con[VConData.current_connection].timedelta_s); - else - *seconds = s + VConData.con[VConData.current_connection].timedelta_s; - } - if(fractions != NULL) - *fractions = f + VConData.con[VConData.current_connection].timedelta_f; -} - -void v_con_set_time(uint32 seconds, uint32 fractions) -{ - uint32 s, f; - v_n_get_current_time(&s, &f); - - if(f < fractions) - s--; - if (s < seconds) - VConData.con[VConData.current_connection].timedelta_s = -(int)(seconds - s); - else - VConData.con[VConData.current_connection].timedelta_s = (int)(s - seconds); - VConData.con[VConData.current_connection].timedelta_f = f - fractions; -} - -#endif diff --git a/extern/verse/dist/v_connection.h b/extern/verse/dist/v_connection.h deleted file mode 100644 index 1d2ac53d597..00000000000 --- a/extern/verse/dist/v_connection.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -** -*/ - -#include "v_network.h" - -typedef struct{ - char name[16]; - char pass[16]; - uint8 key; - VNodeID avatar; -}VSConnectionID; - -typedef enum{ - V_CS_IDLE = 0, /* Host connection waiting for connection */ - V_CS_CONTACT = 1, /* client tryes to contact host */ - V_CS_CONTACTED = 2, /* Host replyes whit challange */ - V_CS_PENDING_ACCEPT = 3, /* Client sends login */ - V_CS_PENDING_HOST_CALLBACK = 4, /* Host got login waits for accept connect callback */ - V_CS_PENDING_CLIENT_CALLBACK_ACCEPT = 5, /* Host got login waits for accept connect callback */ - V_CS_PENDING_CLIENT_CALLBACK_TERMINATE = 6, /* Host got login waits for connect terminate callback */ - V_CS_PENDING_DECISION = 7, /* Host got has executed Callback waits for accept command */ - V_CS_CONNECTED = 8 /* Connection establiched */ -}VConnectStage; - -/* Connection related functions (v_connection.c) */ - -extern boolean v_con_network_listen(void); - -extern void v_con_set_name_pass(const char *name, const char *pass); -extern const char * v_con_get_name(void); -extern const char * v_con_get_pass(void); - -extern void v_con_set_avatar(uint32 avatar); -extern void v_con_set_time(uint32 seconds, uint32 fractions); - -extern void v_con_set_connect_stage(VConnectStage stage); -extern VConnectStage v_con_get_connect_stage(void); - - -extern uint8 *v_con_get_my_key(void); -extern uint8 *v_con_get_other_key(void); -extern uint8 *v_con_get_host_id(void); -extern uint8 **v_con_get_expected_key(void); - -extern void v_con_set_data_key(const uint8 *key); -extern const uint8 * v_con_get_data_key(void); - - -extern void * v_con_get_network_queue(void); -extern VNetworkAddress *v_con_get_network_address(void); -extern void * v_con_get_network_address_id(unsigned int id); -extern unsigned int * v_con_get_network_expected_packet(void); -extern void * v_con_get_ordered_storage(void); -extern void * v_con_get_func_storage(void); -extern void * v_con_connect(uint32 ip, uint16 port, VConnectStage stage); -extern unsigned int v_con_get_network_address_count(void); - -extern boolean v_co_switch_connection(uint32 ip, uint16 port); - -extern void v_con_inqueue_timer_update(void); - - -/* Func storage related functions (v_func_storage.c)*/ -extern void v_fs_unpack(uint8 *data, unsigned int length); - -extern boolean v_fs_func_accept_connections(void); -extern void v_fs_add_func(unsigned int cmd_id, unsigned int (*unpack_func)(const char *buf, size_t buffer_length), void *pack_func, void *alias_func); - -extern void * v_fs_get_alias_user_func(unsigned int cmd_id); -extern void * v_fs_get_alias_user_data(unsigned int cmd_id); -extern void * v_fs_get_user_func(unsigned int cmd_id); -extern void * v_fs_get_user_data(unsigned int cmd_id); diff --git a/extern/verse/dist/v_encryption.c b/extern/verse/dist/v_encryption.c deleted file mode 100644 index aea0f8e6979..00000000000 --- a/extern/verse/dist/v_encryption.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Verse encryption routines. Implements RSA encryption/decryption plus fast XORx. -*/ - -#if !defined(V_GENERATE_FUNC_MODE) - -#include -#include -#include - -#include "verse.h" -#include "v_pack.h" -#include "v_bignum.h" -#include "v_encryption.h" - -#define BITS V_ENCRYPTION_LOGIN_KEY_BITS /* Save some typing. */ - -extern void v_prime_set_random(VBigDig *x); -extern void v_prime_set_table(VBigDig *x, int i); - -const uint8 * v_e_data_create_key(void) /* possibly the worst key gen ever */ -{ - static unsigned int counter = 0; - static uint8 buffer[V_ENCRYPTION_DATA_KEY_SIZE]; - unsigned int i, temp; - - for(i = 0; i < V_ENCRYPTION_DATA_KEY_SIZE; i++) - { - counter++; - temp = (counter << 13) ^ counter; - temp = (temp * (temp * temp * 15731 + 789221) + 1376312589) & 0x7fffffff; - buffer[i] = temp; - } - /* FIXME: This really isn't very pretty. */ - buffer[0] &= 0x3f; /* Make sure top word is... Low. For RSA compatibility. */ - -/* memset(buffer, 0, sizeof buffer); - fprintf(stderr, "**WARNING: XOR data encryption disabled\n"); -*/ - return buffer; -} - -void v_e_data_encrypt_command(uint8 *packet, size_t packet_size, const uint8 *command, size_t command_size, const uint8 *key) -{ - uint32 pos, i; - - vnp_raw_unpack_uint32(packet, &pos); -/* printf("encrypting packet %u", pos);*/ - pos = key[pos % V_ENCRYPTION_DATA_KEY_SIZE] + packet_size; -/* printf(" -> pos=%u (size %u)", pos, packet_size); - printf(", key begins: ["); - for(i = 0; i < 16; i++) - printf(" %02X", key[(pos + i) % V_ENCRYPTION_DATA_KEY_SIZE]); - printf(" ]\n"); -*/ - for(i = 0; i < command_size; i++) - packet[packet_size + i] = command[i] ^ key[(i + pos) % V_ENCRYPTION_DATA_KEY_SIZE]; -} - -void v_e_data_decrypt_packet(uint8 *to, const uint8 *from, size_t size, const uint8 *key) -{ - uint32 pos, i; - - vnp_raw_unpack_uint32(from, &pos); -/* printf("decrypting packet %u", pos);*/ - pos = key[pos % V_ENCRYPTION_DATA_KEY_SIZE]; -/* printf(" -> pos=%u", pos); - printf(", key begins: ["); - for(i = 0; i < 16; i++) - printf(" %02X", key[(i + pos) % V_ENCRYPTION_DATA_KEY_SIZE]); - printf(" ]\n"); -*/ for(i = 0; i < 4; i++) - to[i] = from[i]; - for(i = 4; i < size; i++) - to[i] = from[i] ^ key[(i + pos) % V_ENCRYPTION_DATA_KEY_SIZE]; -} - -#endif - -/* From Knuth. Computes multiplicative inverse of u, modulo v. */ -void v_e_math_inv(VBigDig *inv, const VBigDig *u, const VBigDig *v) -{ - VBigDig VBIGNUM(u1, 2*BITS), VBIGNUM(u3, 2*BITS), VBIGNUM(v1, 2*BITS), VBIGNUM(v3, 2 *BITS), - VBIGNUM(t1, 2*BITS), VBIGNUM(t3, 2*BITS), VBIGNUM(q, 2*BITS), VBIGNUM(w, 2*BITS); - int iter = 1; - - v_bignum_set_one(u1); - v_bignum_set_bignum(u3, u); - v_bignum_set_zero(v1); - v_bignum_set_bignum(v3, v); - - while(!v_bignum_eq_zero(v3)) - { - v_bignum_set_bignum(q, u3); - v_bignum_div(q, v3, t3); - v_bignum_set_bignum(w, q); - v_bignum_mul(w, v1); - v_bignum_set_bignum(t1, u1); - v_bignum_add(t1, w); - - v_bignum_set_bignum(u1, v1); - v_bignum_set_bignum(v1, t1); - v_bignum_set_bignum(u3, v3); - v_bignum_set_bignum(v3, t3); - iter = -iter; - } - if(iter < 0) - { - v_bignum_set_bignum(inv, v); - v_bignum_sub(inv, u1); - } - else - v_bignum_set_bignum(inv, u1); -} - -void v_e_connect_create_key(uint8 *private_key, uint8 *public_key, uint8 *n) -{ - VBigDig VBIGNUM(p, BITS / 2), VBIGNUM(q, BITS / 2), VBIGNUM(qmo, BITS / 2), VBIGNUM(phi, BITS), - VBIGNUM(pub, BITS), VBIGNUM(priv, BITS), VBIGNUM(mod, BITS); - -#if !defined _WIN32 - /* FIXME: This is a security backdoor. Intent is simply to save time during testing. */ - if(getenv("VERSE_NORSA") != NULL) - { - printf("VERSE: Found the NORSA envvar, using constant keys\n"); - v_prime_set_table(p, 0); - v_prime_set_table(q, 1); - goto compute_phi; - } -#endif -/* printf("find prime p\n");*/ - v_prime_set_random(p); -/* printf("find prime q\n");*/ - v_prime_set_random(q); -compute_phi: -/* printf("done, computing key\n");*/ -/* printf("p="); - v_bignum_print_hex_lf(p); - printf("q="); - v_bignum_print_hex_lf(q); -*/ v_bignum_set_bignum(phi, p); - v_bignum_sub_digit(phi, 1); - v_bignum_set_bignum(qmo, q); - v_bignum_sub_digit(qmo, 1); - v_bignum_mul(phi, qmo); -/* printf("phi="); - v_bignum_print_hex_lf(phi); -*/ v_bignum_set_string_hex(pub, "0x10001"); - v_e_math_inv(priv, pub, phi); -/* printf(" pub="); - v_bignum_print_hex_lf(pub); - printf("priv="); - v_bignum_print_hex_lf(priv); -*/ - v_bignum_set_bignum(mod, p); - v_bignum_mul(mod, q); -/* printf(" mod="); - v_bignum_print_hex_lf(mod); - printf("key-creation finished\n"); -*/ /* Write out the keys. */ - v_bignum_raw_export(pub, public_key); - v_bignum_raw_export(priv, private_key); - v_bignum_raw_export(mod, n); -} - -void v_e_connect_encrypt(uint8 *output, const uint8 *data, const uint8 *key, const uint8 *key_n) -{ - VBigDig VBIGNUM(packet, BITS), VBIGNUM(expo, BITS), VBIGNUM(mod, BITS); - - v_bignum_raw_import(packet, data); - v_bignum_raw_import(expo, key); - v_bignum_raw_import(mod, key_n); - - /* Verify that data is less than the modulo, this is a prerequisite for encryption. */ - if(!v_bignum_gte(mod, packet)) - { - printf("*** WARNING. Data is not less than modulo, as it should be--encryption will break!\n"); - printf(" RSA modulo: "); - v_bignum_print_hex_lf(mod); - printf(" RSA data: "); - v_bignum_print_hex_lf(packet); - } -/* printf("RSA key: "); - v_bignum_print_hex_lf(expo); - printf("RSA mod: "); - v_bignum_print_hex_lf(mod); - printf("RSA in: "); - v_bignum_print_hex_lf(packet); - printf("bits in packet: %d, ", v_bignum_bit_msb(packet) + 1); - printf("bits in modulo: %d\n", v_bignum_bit_msb(mod) + 1); -*/ v_bignum_pow_mod(packet, expo, mod); /* Blam. */ -/* printf("RSA out: "); - v_bignum_print_hex_lf(packet); -*/ v_bignum_raw_export(packet, output); -} - -#if defined CRYPTALONE -void v_encrypt_test(void) -{ - uint8 k_priv[BITS / 8], k_pub[BITS / 8], k_n[BITS / 8], cipher[BITS / 8], plain[BITS / 8], decode[BITS / 8], i; - - printf("testing RSA-crypto\n"); - v_e_connect_create_key(k_pub, k_priv, k_n); -/* exit(0);*/ - printf("key pair generated, encrypting something\n"); - memset(plain, 0, sizeof plain); - strcpy(plain, "This is some text to encrypt, to give it something to chew on."); - printf("plain: %02X (%u)\n", plain[0], strlen(plain)); - v_e_connect_encrypt(cipher, plain, k_pub, k_n); - printf("plain: %02X, cipher: %02X\n", plain[0], cipher[0]); - v_e_connect_encrypt(decode, cipher, k_priv, k_n); - printf("decoded: %02X: '", decode[0]); - for(i = 0; decode[i] != 0; i++) - putchar(decode[i]); - printf("'\n"); -/* printf("\npublic key: "); - v_bignum_print_hex_lf(k_public); - printf("private key: "); - v_bignum_print_hex_lf(k_private); - v_bignum_set_string(msg, "123"); - gettimeofday(&t1, NULL); - v_bignum_pow_mod(msg, k_private, k_n); - gettimeofday(&t2, NULL); - printf("encrypted: "); - v_bignum_print_hex_lf(msg); - printf("encrypted %u bits in %g s\n", BITS, t2.tv_sec - t1.tv_sec + 1.0E-6 * (t2.tv_usec - t1.tv_usec)); - - gettimeofday(&t1, NULL); - v_bignum_pow_mod(msg, k_public, k_n); - gettimeofday(&t2, NULL); - printf("decrypted: "); - v_bignum_print_hex_lf(msg); - printf("decrypted %u bits in %g s\n", BITS, t2.tv_sec - t1.tv_sec + 1.0E-6 * (t2.tv_usec - t1.tv_usec)); - exit(0); -*//* v_e_encrypt(cipher, plain, &k_private, &k_n); - printf("encrypted data: "); - for(i = 0; i < sizeof cipher; i++) - printf("%c", isalnum(cipher[i]) ? cipher[i] : '?'); - printf("\n\n"); - printf("decrypting\n"); - v_e_encrypt(decode, cipher, &k_public, &k_n); - printf("decrypted data: "); - for(i = 0; i < sizeof cipher; i++) - printf("%c", isalnum(decode[i]) ? decode[i] : '?'); - printf("\n\n"); -*/ -} - -int main(void) -{ - v_encrypt_test(); - - return 0; -} -#endif diff --git a/extern/verse/dist/v_encryption.h b/extern/verse/dist/v_encryption.h deleted file mode 100644 index cbfb5ff692f..00000000000 --- a/extern/verse/dist/v_encryption.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Verse encryption routines. There are two distinct flavors of encryption - * in use: one "heavy" for login/connection establishment security, and - * a far lighter symmetrical one that is applied to each data packet after - * the key has been exchanged during connection. -*/ - -#include "verse.h" - -/* Internal key size definitions. *MUST* be kept in sync with V_HOST_ID_SIZE in verse_header.h! */ -#define V_ENCRYPTION_LOGIN_KEY_BITS 512 -#define V_ENCRYPTION_LOGIN_KEY_SIZE (V_ENCRYPTION_LOGIN_KEY_BITS / 8) -#define V_ENCRYPTION_LOGIN_KEY_FULL_SIZE (3 * V_ENCRYPTION_LOGIN_KEY_SIZE) -#define V_ENCRYPTION_LOGIN_KEY_HALF_SIZE (2 * V_ENCRYPTION_LOGIN_KEY_SIZE) - -#define V_ENCRYPTION_LOGIN_PUBLIC_START (0 * V_ENCRYPTION_LOGIN_KEY_SIZE) -#define V_ENCRYPTION_LOGIN_PRIVATE_START (1 * V_ENCRYPTION_LOGIN_KEY_SIZE) -#define V_ENCRYPTION_LOGIN_N_START (2 * V_ENCRYPTION_LOGIN_KEY_SIZE) - -#define V_ENCRYPTION_DATA_KEY_SIZE (V_ENCRYPTION_LOGIN_KEY_BITS / 8) - -/* Connection encryption. Heavy, and symmetrical, so encrypt() does both encryption - * and decryption given the proper key. Current algorithm used is RSA. -*/ -extern void v_e_connect_create_key(uint8 *private_key, uint8 *public_key, uint8 *n); -extern void v_e_connect_encrypt(uint8 *output, const uint8 *data, const uint8 *key, const uint8 *key_n); - -/* Actual data traffic encryption. Also symmetrical, with a single key. Uses XOR. */ -extern const uint8 * v_e_data_create_key(void); -extern void v_e_data_encrypt_command(uint8 *packet, size_t packet_length, - const uint8 *command, size_t command_length, const uint8 *key); -extern void v_e_data_decrypt_packet(uint8 *to, const uint8 *from, size_t size, const uint8 *key); diff --git a/extern/verse/dist/v_func_storage.c b/extern/verse/dist/v_func_storage.c deleted file mode 100644 index 86c7815c2af..00000000000 --- a/extern/verse/dist/v_func_storage.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * -*/ - -#include -#include -#include "verse_header.h" -#include "v_pack.h" -#include "v_cmd_gen.h" -#include "v_connection.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" - -#define V_FS_MAX_CMDS 256 - -extern void init_pack_and_unpack(void); - -static struct { - unsigned int (*unpack_func[V_FS_MAX_CMDS])(const char *data, size_t length); - void *pack_func[V_FS_MAX_CMDS]; - void *user_func[V_FS_MAX_CMDS]; - void *user_data[V_FS_MAX_CMDS]; - void *alias_pack_func[V_FS_MAX_CMDS]; - void *alias_user_func[V_FS_MAX_CMDS]; - void *alias_user_data[V_FS_MAX_CMDS]; - boolean call; -} VCmdData; - -static boolean v_fs_initialized = FALSE; - -extern void verse_send_packet_ack(uint32 packet_id); -extern void callback_send_packet_ack(void *user, uint32 packet_id); -extern void verse_send_packet_nak(uint32 packet_id); -extern void callback_send_packet_nak(void *user, uint32 packet_id); - -void v_fs_init(void) -{ - unsigned int i; - if(v_fs_initialized) - return; - for(i = 0; i < V_FS_MAX_CMDS; i++) - { - VCmdData.unpack_func[i] = NULL; - VCmdData.pack_func[i] = NULL; - VCmdData.user_func[i] = NULL; - VCmdData.user_data[i] = NULL; - VCmdData.alias_pack_func[i] = NULL; - VCmdData.alias_user_func[i] = NULL; - VCmdData.alias_user_data[i] = NULL; - } - #if !defined(V_GENERATE_FUNC_MODE) - init_pack_and_unpack(); - #endif - for(i = 0; i < V_FS_MAX_CMDS && VCmdData.pack_func[i] != verse_send_packet_ack; i++); - VCmdData.user_func[i] = callback_send_packet_ack; - for(i = 0; i < V_FS_MAX_CMDS && VCmdData.pack_func[i] != verse_send_packet_nak; i++); - VCmdData.user_func[i] = callback_send_packet_nak; - - v_fs_initialized = TRUE; -} - - -void v_fs_add_func(unsigned int cmd_id, unsigned int (*unpack_func)(const char *data, size_t length), void *pack_func, void *alias_func) -{ - VCmdData.unpack_func[cmd_id] = unpack_func; - VCmdData.pack_func[cmd_id] = pack_func; - VCmdData.alias_pack_func[cmd_id] = alias_func; -} - -void *v_fs_get_user_func(unsigned int cmd_id) -{ -/* if(VCmdData.call)*/ - return VCmdData.user_func[cmd_id]; - return NULL; -} - -void *v_fs_get_user_data(unsigned int cmd_id) -{ - return VCmdData.user_data[cmd_id]; -} - -void *v_fs_get_alias_user_func(unsigned int cmd_id) -{ -/* if(VCmdData.call)*/ - return VCmdData.alias_user_func[cmd_id]; - return NULL; -} - -void *v_fs_get_alias_user_data(unsigned int cmd_id) -{ - return VCmdData.alias_user_data[cmd_id]; -} - -void verse_callback_set(void *command, void *callback, void *user) -{ - unsigned int i; - if(!v_fs_initialized) - v_fs_init(); - - for(i = 0; i < V_FS_MAX_CMDS; i++) - { - if(VCmdData.pack_func[i] == command) - { - VCmdData.user_data[i] = user; - VCmdData.user_func[i] = callback; - return; - } - if(VCmdData.alias_pack_func[i] == command) - { - VCmdData.alias_user_data[i] = user; - VCmdData.alias_user_func[i] = callback; - return; - } - } -} - -/* Do we accept incoming connections, i.e. are we a host implementation? */ -boolean v_fs_func_accept_connections(void) -{ - return VCmdData.user_func[0] != NULL; -} - -/* Inspect beginning of packet, looking for ACK or NAK commands. */ -void v_fs_unpack_beginning(const uint8 *data, unsigned int length) -{ - uint32 id, i = 4; - uint8 cmd_id; - - i += vnp_raw_unpack_uint8(&data[i], &cmd_id); - while(i < length && (cmd_id == 7 || cmd_id == 8)) - { - i += vnp_raw_unpack_uint32(&data[i], &id); - if(cmd_id == 7) - callback_send_packet_ack(NULL, id); - else - callback_send_packet_nak(NULL, id); - i += vnp_raw_unpack_uint8(&data[i], &cmd_id); - } -} - -void v_fs_unpack(uint8 *data, unsigned int length) -{ - uint32 i, output, pack_id; - uint8 cmd_id, last = 255; - - i = vnp_raw_unpack_uint32(data, &pack_id); /* each packet starts with a 32 bit id */ - vnp_raw_unpack_uint8(&data[i], &cmd_id); - while(i < length && (cmd_id == 7 || cmd_id == 8)) - { - i += 5; - vnp_raw_unpack_uint8(&data[i], &cmd_id); - } - while(i < length) - { - i += vnp_raw_unpack_uint8(&data[i], &cmd_id); - if(VCmdData.unpack_func[cmd_id] != NULL) - { - VCmdData.call = TRUE; - output = VCmdData.unpack_func[cmd_id](&data[i], length - i); - if(output == (unsigned int) -1) /* Can this happen? Should be size_t or int, depending. */ - { - printf("** Aborting decode, command %u unpacker returned failure\n", cmd_id); -/* verse_send_packet_nak(pack_id);*/ - return; - } - last = cmd_id; - i += output; - } - else /* If unknown command byte was found, complain loudly and stop parsing packet. */ - { - size_t j; - - printf("\n** Unknown command ID %u (0x%02X) encountered--aborting packet decode len=%u pos=%u last=%u\n", cmd_id, cmd_id, length, i, last); - printf(" decoded %u bytes: ", --i); - for(j = 0; j < i; j++) - printf("%02X ", data[j]); - printf("\n (packet id=%u)", pack_id); - printf(" remaining %u bytes: ", length - i); - for(j = i; j < length; j++) - printf("%02X ", data[j]); - printf("\n"); -/* *(char *) 0 = 0;*/ - break; - } - } -/* if(expected != NULL) - verse_send_packet_ack(pack_id);*/ -} - -extern unsigned int v_unpack_connection(const char *data, size_t length); - -#endif diff --git a/extern/verse/dist/v_gen_pack_a_node.c b/extern/verse/dist/v_gen_pack_a_node.c deleted file mode 100644 index dc8e53e1a7f..00000000000 --- a/extern/verse/dist/v_gen_pack_a_node.c +++ /dev/null @@ -1,521 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_a_buffer_create(VNodeID node_id, VBufferID buffer_id, const char *name, VNABlockType type, real64 frequency) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 160); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_buffer_create(node_id = %u buffer_id = %u name = %s type = %u frequency = %f );\n", node_id, buffer_id, name, type, frequency); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], frequency); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_a_buffer_destroy(VNodeID node_id, VBufferID buffer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 160); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_buffer_destroy(node_id = %u buffer_id = %u );\n", node_id, buffer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_a_buffer_create(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_a_buffer_create)(void *user_data, VNodeID node_id, VBufferID buffer_id, const char *name, VNABlockType type, real64 frequency); - VNodeID node_id; - VBufferID buffer_id; - char name[16]; - VNABlockType type; - real64 frequency; - - func_a_buffer_create = v_fs_get_user_func(160); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &buffer_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); - if(buffer_length < 9 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNABlockType)enum_temp; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frequency); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_a_buffer_destroy(node_id = %u buffer_id = %u ); callback = %p\n", node_id, buffer_id, v_fs_get_alias_user_func(160)); - else - printf("receive: verse_send_a_buffer_create(node_id = %u buffer_id = %u name = %s type = %u frequency = %f ); callback = %p\n", node_id, buffer_id, name, type, frequency, v_fs_get_user_func(160)); -#endif - if(name[0] == 0) - { - void (* alias_a_buffer_destroy)(void *user_data, VNodeID node_id, VBufferID buffer_id); - alias_a_buffer_destroy = v_fs_get_alias_user_func(160); - if(alias_a_buffer_destroy != NULL) - alias_a_buffer_destroy(v_fs_get_alias_user_data(160), node_id, buffer_id); - return buffer_pos; - } - if(func_a_buffer_create != NULL) - func_a_buffer_create(v_fs_get_user_data(160), node_id, buffer_id, name, (VNABlockType) type, frequency); - - return buffer_pos; -} - -void verse_send_a_buffer_subscribe(VNodeID node_id, VBufferID layer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 161); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_buffer_subscribe(node_id = %u layer_id = %u );\n", node_id, layer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_a_buffer_unsubscribe(VNodeID node_id, VBufferID layer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 161); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_buffer_unsubscribe(node_id = %u layer_id = %u );\n", node_id, layer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_a_buffer_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_a_buffer_subscribe)(void *user_data, VNodeID node_id, VBufferID layer_id); - VNodeID node_id; - VBufferID layer_id; - uint8 alias_bool; - - func_a_buffer_subscribe = v_fs_get_user_func(161); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_a_buffer_unsubscribe(node_id = %u layer_id = %u ); callback = %p\n", node_id, layer_id, v_fs_get_alias_user_func(161)); - else - printf("receive: verse_send_a_buffer_subscribe(node_id = %u layer_id = %u ); callback = %p\n", node_id, layer_id, v_fs_get_user_func(161)); -#endif - if(!alias_bool) - { - void (* alias_a_buffer_unsubscribe)(void *user_data, VNodeID node_id, VBufferID layer_id); - alias_a_buffer_unsubscribe = v_fs_get_alias_user_func(161); - if(alias_a_buffer_unsubscribe != NULL) - alias_a_buffer_unsubscribe(v_fs_get_alias_user_data(161), node_id, layer_id); - return buffer_pos; - } - if(func_a_buffer_subscribe != NULL) - func_a_buffer_subscribe(v_fs_get_user_data(161), node_id, layer_id); - - return buffer_pos; -} - -void verse_send_a_block_set(VNodeID node_id, VLayerID buffer_id, uint32 block_index, VNABlockType type, const VNABlock *samples) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 162); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_block_set(node_id = %u buffer_id = %u block_index = %u type = %u samples = %p );\n", node_id, buffer_id, block_index, type, samples); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], block_index); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_pack_audio_block(&buf[buffer_pos], type, samples); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u || block_index == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_a_block_clear(VNodeID node_id, VLayerID buffer_id, uint32 block_index) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 162); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_block_clear(node_id = %u buffer_id = %u block_index = %u );\n", node_id, buffer_id, block_index); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], block_index); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u || block_index == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_a_block_set(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_a_block_set)(void *user_data, VNodeID node_id, VLayerID buffer_id, uint32 block_index, VNABlockType type, const VNABlock *samples); - VNodeID node_id; - VLayerID buffer_id; - uint32 block_index; - VNABlockType type; - const VNABlock *samples; - - func_a_block_set = v_fs_get_user_func(162); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &buffer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &block_index); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNABlockType)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - if(type > VN_A_BLOCK_REAL64) - printf("receive: verse_send_a_block_clear(node_id = %u buffer_id = %u block_index = %u ); callback = %p\n", node_id, buffer_id, block_index, v_fs_get_alias_user_func(162)); - else - printf("receive: verse_send_a_block_set(node_id = %u buffer_id = %u block_index = %u type = %u ); callback = %p\n", node_id, buffer_id, block_index, type, v_fs_get_user_func(162)); -#endif - if(type <= VN_A_BLOCK_REAL64) - { - VNABlock block; - buffer_pos += vnp_unpack_audio_block(&buf[buffer_pos], type, &block); - if(func_a_block_set != NULL) - func_a_block_set(v_fs_get_user_data(162), node_id, buffer_id, block_index, (VNABlockType) type, &block); - return buffer_pos; - } - - if(type > VN_A_BLOCK_REAL64) - { - void (* alias_a_block_clear)(void *user_data, VNodeID node_id, VLayerID buffer_id, uint32 block_index); - alias_a_block_clear = v_fs_get_alias_user_func(162); - if(alias_a_block_clear != NULL) - alias_a_block_clear(v_fs_get_alias_user_data(162), node_id, buffer_id, block_index); - return buffer_pos; - } - if(func_a_block_set != NULL) - func_a_block_set(v_fs_get_user_data(162), node_id, buffer_id, block_index, (VNABlockType) type, samples); - - return buffer_pos; -} - -void verse_send_a_stream_create(VNodeID node_id, VLayerID stream_id, const char *name) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 163); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_stream_create(node_id = %u stream_id = %u name = %s );\n", node_id, stream_id, name); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], stream_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - if(node_id == (uint32) ~0u || stream_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_a_stream_destroy(VNodeID node_id, VLayerID stream_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 163); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_stream_destroy(node_id = %u stream_id = %u );\n", node_id, stream_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], stream_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - if(node_id == (uint32) ~0u || stream_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_a_stream_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_a_stream_create)(void *user_data, VNodeID node_id, VLayerID stream_id, const char *name); - VNodeID node_id; - VLayerID stream_id; - char name[16]; - - func_a_stream_create = v_fs_get_user_func(163); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &stream_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_a_stream_destroy(node_id = %u stream_id = %u ); callback = %p\n", node_id, stream_id, v_fs_get_alias_user_func(163)); - else - printf("receive: verse_send_a_stream_create(node_id = %u stream_id = %u name = %s ); callback = %p\n", node_id, stream_id, name, v_fs_get_user_func(163)); -#endif - if(name[0] == 0) - { - void (* alias_a_stream_destroy)(void *user_data, VNodeID node_id, VLayerID stream_id); - alias_a_stream_destroy = v_fs_get_alias_user_func(163); - if(alias_a_stream_destroy != NULL) - alias_a_stream_destroy(v_fs_get_alias_user_data(163), node_id, stream_id); - return buffer_pos; - } - if(func_a_stream_create != NULL) - func_a_stream_create(v_fs_get_user_data(163), node_id, stream_id, name); - - return buffer_pos; -} - -void verse_send_a_stream_subscribe(VNodeID node_id, VLayerID stream_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 164); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_stream_subscribe(node_id = %u stream_id = %u );\n", node_id, stream_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], stream_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || stream_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_a_stream_unsubscribe(VNodeID node_id, VLayerID stream_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 164); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_stream_unsubscribe(node_id = %u stream_id = %u );\n", node_id, stream_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], stream_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || stream_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_a_stream_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_a_stream_subscribe)(void *user_data, VNodeID node_id, VLayerID stream_id); - VNodeID node_id; - VLayerID stream_id; - uint8 alias_bool; - - func_a_stream_subscribe = v_fs_get_user_func(164); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &stream_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_a_stream_unsubscribe(node_id = %u stream_id = %u ); callback = %p\n", node_id, stream_id, v_fs_get_alias_user_func(164)); - else - printf("receive: verse_send_a_stream_subscribe(node_id = %u stream_id = %u ); callback = %p\n", node_id, stream_id, v_fs_get_user_func(164)); -#endif - if(!alias_bool) - { - void (* alias_a_stream_unsubscribe)(void *user_data, VNodeID node_id, VLayerID stream_id); - alias_a_stream_unsubscribe = v_fs_get_alias_user_func(164); - if(alias_a_stream_unsubscribe != NULL) - alias_a_stream_unsubscribe(v_fs_get_alias_user_data(164), node_id, stream_id); - return buffer_pos; - } - if(func_a_stream_subscribe != NULL) - func_a_stream_subscribe(v_fs_get_user_data(164), node_id, stream_id); - - return buffer_pos; -} - -void verse_send_a_stream(VNodeID node_id, VLayerID stream_id, uint32 time_s, uint32 time_f, VNABlockType type, real64 frequency, const VNABlock *samples) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 165); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_a_stream(node_id = %u stream_id = %u time_s = %u time_f = %u type = %u frequency = %f samples = %p );\n", node_id, stream_id, time_s, time_f, type, frequency, samples); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], stream_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_s); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_f); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], frequency); - buffer_pos += vnp_pack_audio_block(&buf[buffer_pos], type, samples); - if(node_id == (uint32) ~0u || stream_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_a_stream(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_a_stream)(void *user_data, VNodeID node_id, VLayerID stream_id, uint32 time_s, uint32 time_f, VNABlockType type, real64 frequency, const VNABlock *samples); - VNodeID node_id; - VLayerID stream_id; - uint32 time_s; - uint32 time_f; - VNABlockType type; - real64 frequency; - const VNABlock *samples; - - func_a_stream = v_fs_get_user_func(165); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &stream_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_s); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_f); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNABlockType)enum_temp; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frequency); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_a_stream(node_id = %u stream_id = %u time_s = %u time_f = %u type = %u frequency = %f ); callback = %p\n", node_id, stream_id, time_s, time_f, type, frequency, v_fs_get_user_func(165)); -#endif - { - VNABlock block; - buffer_pos += vnp_unpack_audio_block(&buf[buffer_pos], type, &block); - if(func_a_stream != NULL) - func_a_stream(v_fs_get_user_data(165), node_id, stream_id, time_s, time_f, (VNABlockType) type, frequency, &block); - return buffer_pos; - } - - if(func_a_stream != NULL) - func_a_stream(v_fs_get_user_data(165), node_id, stream_id, time_s, time_f, (VNABlockType) type, frequency, samples); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_b_node.c b/extern/verse/dist/v_gen_pack_b_node.c deleted file mode 100644 index a4792a10fe4..00000000000 --- a/extern/verse/dist/v_gen_pack_b_node.c +++ /dev/null @@ -1,238 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_b_dimensions_set(VNodeID node_id, uint16 width, uint16 height, uint16 depth) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 80); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_b_dimensions_set(node_id = %u width = %u height = %u depth = %u );\n", node_id, width, height, depth); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], width); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], height); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], depth); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_b_dimensions_set(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_b_dimensions_set)(void *user_data, VNodeID node_id, uint16 width, uint16 height, uint16 depth); - VNodeID node_id; - uint16 width; - uint16 height; - uint16 depth; - - func_b_dimensions_set = v_fs_get_user_func(80); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &width); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &height); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &depth); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_b_dimensions_set(node_id = %u width = %u height = %u depth = %u ); callback = %p\n", node_id, width, height, depth, v_fs_get_user_func(80)); -#endif - if(func_b_dimensions_set != NULL) - func_b_dimensions_set(v_fs_get_user_data(80), node_id, width, height, depth); - - return buffer_pos; -} - -void verse_send_b_layer_create(VNodeID node_id, VLayerID layer_id, const char *name, VNBLayerType type) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 81); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_b_layer_create(node_id = %u layer_id = %u name = %s type = %u );\n", node_id, layer_id, name, type); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_b_layer_destroy(VNodeID node_id, VLayerID layer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 81); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_b_layer_destroy(node_id = %u layer_id = %u );\n", node_id, layer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_b_layer_create(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_b_layer_create)(void *user_data, VNodeID node_id, VLayerID layer_id, const char *name, VNBLayerType type); - VNodeID node_id; - VLayerID layer_id; - char name[16]; - VNBLayerType type; - - func_b_layer_create = v_fs_get_user_func(81); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); - if(buffer_length < 1 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNBLayerType)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_b_layer_destroy(node_id = %u layer_id = %u ); callback = %p\n", node_id, layer_id, v_fs_get_alias_user_func(81)); - else - printf("receive: verse_send_b_layer_create(node_id = %u layer_id = %u name = %s type = %u ); callback = %p\n", node_id, layer_id, name, type, v_fs_get_user_func(81)); -#endif - if(name[0] == 0) - { - void (* alias_b_layer_destroy)(void *user_data, VNodeID node_id, VLayerID layer_id); - alias_b_layer_destroy = v_fs_get_alias_user_func(81); - if(alias_b_layer_destroy != NULL) - alias_b_layer_destroy(v_fs_get_alias_user_data(81), node_id, layer_id); - return buffer_pos; - } - if(func_b_layer_create != NULL) - func_b_layer_create(v_fs_get_user_data(81), node_id, layer_id, name, (VNBLayerType) type); - - return buffer_pos; -} - -void verse_send_b_layer_subscribe(VNodeID node_id, VLayerID layer_id, uint8 level) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 82); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_b_layer_subscribe(node_id = %u layer_id = %u level = %u );\n", node_id, layer_id, level); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], level); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_b_layer_unsubscribe(VNodeID node_id, VLayerID layer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 82); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_b_layer_unsubscribe(node_id = %u layer_id = %u );\n", node_id, layer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], -1); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_b_layer_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_b_layer_subscribe)(void *user_data, VNodeID node_id, VLayerID layer_id, uint8 level); - VNodeID node_id; - VLayerID layer_id; - uint8 level; - - func_b_layer_subscribe = v_fs_get_user_func(82); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &level); -#if defined V_PRINT_RECEIVE_COMMANDS - if(level == 255) - printf("receive: verse_send_b_layer_unsubscribe(node_id = %u layer_id = %u ); callback = %p\n", node_id, layer_id, v_fs_get_alias_user_func(82)); - else - printf("receive: verse_send_b_layer_subscribe(node_id = %u layer_id = %u level = %u ); callback = %p\n", node_id, layer_id, level, v_fs_get_user_func(82)); -#endif - if(level == 255) - { - void (* alias_b_layer_unsubscribe)(void *user_data, VNodeID node_id, VLayerID layer_id); - alias_b_layer_unsubscribe = v_fs_get_alias_user_func(82); - if(alias_b_layer_unsubscribe != NULL) - alias_b_layer_unsubscribe(v_fs_get_alias_user_data(82), node_id, layer_id); - return buffer_pos; - } - if(func_b_layer_subscribe != NULL) - func_b_layer_subscribe(v_fs_get_user_data(82), node_id, layer_id, level); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_c_node.c b/extern/verse/dist/v_gen_pack_c_node.c deleted file mode 100644 index b75fa213383..00000000000 --- a/extern/verse/dist/v_gen_pack_c_node.c +++ /dev/null @@ -1,189 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_c_curve_create(VNodeID node_id, VLayerID curve_id, const char *name, uint8 dimensions) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 128); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_c_curve_create(node_id = %u curve_id = %u name = %s dimensions = %u );\n", node_id, curve_id, name, dimensions); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], curve_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], dimensions); - if(node_id == (uint32) ~0u || curve_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_c_curve_destroy(VNodeID node_id, VLayerID curve_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 128); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_c_curve_destroy(node_id = %u curve_id = %u );\n", node_id, curve_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], curve_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], -1); - if(node_id == (uint32) ~0u || curve_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_c_curve_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_c_curve_create)(void *user_data, VNodeID node_id, VLayerID curve_id, const char *name, uint8 dimensions); - VNodeID node_id; - VLayerID curve_id; - char name[16]; - uint8 dimensions; - - func_c_curve_create = v_fs_get_user_func(128); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &curve_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); - if(buffer_length < 1 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &dimensions); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_c_curve_destroy(node_id = %u curve_id = %u ); callback = %p\n", node_id, curve_id, v_fs_get_alias_user_func(128)); - else - printf("receive: verse_send_c_curve_create(node_id = %u curve_id = %u name = %s dimensions = %u ); callback = %p\n", node_id, curve_id, name, dimensions, v_fs_get_user_func(128)); -#endif - if(name[0] == 0) - { - void (* alias_c_curve_destroy)(void *user_data, VNodeID node_id, VLayerID curve_id); - alias_c_curve_destroy = v_fs_get_alias_user_func(128); - if(alias_c_curve_destroy != NULL) - alias_c_curve_destroy(v_fs_get_alias_user_data(128), node_id, curve_id); - return buffer_pos; - } - if(func_c_curve_create != NULL) - func_c_curve_create(v_fs_get_user_data(128), node_id, curve_id, name, dimensions); - - return buffer_pos; -} - -void verse_send_c_curve_subscribe(VNodeID node_id, VLayerID curve_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 129); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_c_curve_subscribe(node_id = %u curve_id = %u );\n", node_id, curve_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], curve_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || curve_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_c_curve_unsubscribe(VNodeID node_id, VLayerID curve_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 129); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_c_curve_unsubscribe(node_id = %u curve_id = %u );\n", node_id, curve_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], curve_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || curve_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_c_curve_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_c_curve_subscribe)(void *user_data, VNodeID node_id, VLayerID curve_id); - VNodeID node_id; - VLayerID curve_id; - uint8 alias_bool; - - func_c_curve_subscribe = v_fs_get_user_func(129); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &curve_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_c_curve_unsubscribe(node_id = %u curve_id = %u ); callback = %p\n", node_id, curve_id, v_fs_get_alias_user_func(129)); - else - printf("receive: verse_send_c_curve_subscribe(node_id = %u curve_id = %u ); callback = %p\n", node_id, curve_id, v_fs_get_user_func(129)); -#endif - if(!alias_bool) - { - void (* alias_c_curve_unsubscribe)(void *user_data, VNodeID node_id, VLayerID curve_id); - alias_c_curve_unsubscribe = v_fs_get_alias_user_func(129); - if(alias_c_curve_unsubscribe != NULL) - alias_c_curve_unsubscribe(v_fs_get_alias_user_data(129), node_id, curve_id); - return buffer_pos; - } - if(func_c_curve_subscribe != NULL) - func_c_curve_subscribe(v_fs_get_user_data(129), node_id, curve_id); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_g_node.c b/extern/verse/dist/v_gen_pack_g_node.c deleted file mode 100644 index 5a70173554d..00000000000 --- a/extern/verse/dist/v_gen_pack_g_node.c +++ /dev/null @@ -1,1154 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_g_layer_create(VNodeID node_id, VLayerID layer_id, const char *name, VNGLayerType type, uint32 def_uint, real64 def_real) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 48); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_layer_create(node_id = %u layer_id = %u name = %s type = %u def_uint = %u def_real = %f );\n", node_id, layer_id, name, type, def_uint, def_real); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], def_uint); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], def_real); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_g_layer_destroy(VNodeID node_id, VLayerID layer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 48); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_layer_destroy(node_id = %u layer_id = %u );\n", node_id, layer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_layer_create(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_g_layer_create)(void *user_data, VNodeID node_id, VLayerID layer_id, const char *name, VNGLayerType type, uint32 def_uint, real64 def_real); - VNodeID node_id; - VLayerID layer_id; - char name[16]; - VNGLayerType type; - uint32 def_uint; - real64 def_real; - - func_g_layer_create = v_fs_get_user_func(48); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); - if(buffer_length < 13 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNGLayerType)enum_temp; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &def_uint); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &def_real); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_g_layer_destroy(node_id = %u layer_id = %u ); callback = %p\n", node_id, layer_id, v_fs_get_alias_user_func(48)); - else - printf("receive: verse_send_g_layer_create(node_id = %u layer_id = %u name = %s type = %u def_uint = %u def_real = %f ); callback = %p\n", node_id, layer_id, name, type, def_uint, def_real, v_fs_get_user_func(48)); -#endif - if(name[0] == 0) - { - void (* alias_g_layer_destroy)(void *user_data, VNodeID node_id, VLayerID layer_id); - alias_g_layer_destroy = v_fs_get_alias_user_func(48); - if(alias_g_layer_destroy != NULL) - alias_g_layer_destroy(v_fs_get_alias_user_data(48), node_id, layer_id); - return buffer_pos; - } - if(func_g_layer_create != NULL) - func_g_layer_create(v_fs_get_user_data(48), node_id, layer_id, name, (VNGLayerType) type, def_uint, def_real); - - return buffer_pos; -} - -void verse_send_g_layer_subscribe(VNodeID node_id, VLayerID layer_id, VNRealFormat type) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 49); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_layer_subscribe(node_id = %u layer_id = %u type = %u );\n", node_id, layer_id, type); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_g_layer_unsubscribe(VNodeID node_id, VLayerID layer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 49); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_layer_unsubscribe(node_id = %u layer_id = %u );\n", node_id, layer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_layer_subscribe(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_g_layer_subscribe)(void *user_data, VNodeID node_id, VLayerID layer_id, VNRealFormat type); - VNodeID node_id; - VLayerID layer_id; - VNRealFormat type; - - func_g_layer_subscribe = v_fs_get_user_func(49); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNRealFormat)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - if(type > VN_FORMAT_REAL64) - printf("receive: verse_send_g_layer_unsubscribe(node_id = %u layer_id = %u ); callback = %p\n", node_id, layer_id, v_fs_get_alias_user_func(49)); - else - printf("receive: verse_send_g_layer_subscribe(node_id = %u layer_id = %u type = %u ); callback = %p\n", node_id, layer_id, type, v_fs_get_user_func(49)); -#endif - if(type > VN_FORMAT_REAL64) - { - void (* alias_g_layer_unsubscribe)(void *user_data, VNodeID node_id, VLayerID layer_id); - alias_g_layer_unsubscribe = v_fs_get_alias_user_func(49); - if(alias_g_layer_unsubscribe != NULL) - alias_g_layer_unsubscribe(v_fs_get_alias_user_data(49), node_id, layer_id); - return buffer_pos; - } - if(func_g_layer_subscribe != NULL) - func_g_layer_subscribe(v_fs_get_user_data(49), node_id, layer_id, (VNRealFormat) type); - - return buffer_pos; -} - -void verse_send_g_vertex_set_xyz_real32(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 x, real32 y, real32 z) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 50); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_set_xyz_real32(node_id = %u layer_id = %u vertex_id = %u x = %f y = %f z = %f );\n", node_id, layer_id, vertex_id, x, y, z); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], x); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], y); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], z); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_g_vertex_delete_real32(VNodeID node_id, uint32 vertex_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 50); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_delete_real32(node_id = %u vertex_id = %u );\n", node_id, vertex_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], 0); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], V_REAL32_MAX); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], V_REAL32_MAX); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], V_REAL32_MAX); - if(node_id == (uint32) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_vertex_set_xyz_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_vertex_set_xyz_real32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 x, real32 y, real32 z); - VNodeID node_id; - VLayerID layer_id; - uint32 vertex_id; - real32 x; - real32 y; - real32 z; - - func_g_vertex_set_xyz_real32 = v_fs_get_user_func(50); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &vertex_id); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &x); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &y); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &z); -#if defined V_PRINT_RECEIVE_COMMANDS - if(x == V_REAL32_MAX || y == V_REAL32_MAX || z == V_REAL32_MAX) - printf("receive: verse_send_g_vertex_delete_real32(node_id = %u vertex_id = %u ); callback = %p\n", node_id, vertex_id, v_fs_get_alias_user_func(50)); - else - printf("receive: verse_send_g_vertex_set_xyz_real32(node_id = %u layer_id = %u vertex_id = %u x = %f y = %f z = %f ); callback = %p\n", node_id, layer_id, vertex_id, x, y, z, v_fs_get_user_func(50)); -#endif - if(x == V_REAL32_MAX || y == V_REAL32_MAX || z == V_REAL32_MAX) - { - void (* alias_g_vertex_delete_real32)(void *user_data, VNodeID node_id, uint32 vertex_id); - alias_g_vertex_delete_real32 = v_fs_get_alias_user_func(50); - if(alias_g_vertex_delete_real32 != NULL) - alias_g_vertex_delete_real32(v_fs_get_alias_user_data(50), node_id, vertex_id); - return buffer_pos; - } - if(func_g_vertex_set_xyz_real32 != NULL) - func_g_vertex_set_xyz_real32(v_fs_get_user_data(50), node_id, layer_id, vertex_id, x, y, z); - - return buffer_pos; -} - -void verse_send_g_vertex_set_xyz_real64(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 x, real64 y, real64 z) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 51); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_set_xyz_real64(node_id = %u layer_id = %u vertex_id = %u x = %f y = %f z = %f );\n", node_id, layer_id, vertex_id, x, y, z); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], x); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], y); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], z); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_g_vertex_delete_real64(VNodeID node_id, uint32 vertex_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 51); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_delete_real64(node_id = %u vertex_id = %u );\n", node_id, vertex_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], 0); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - if(node_id == (uint32) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_vertex_set_xyz_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_vertex_set_xyz_real64)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 x, real64 y, real64 z); - VNodeID node_id; - VLayerID layer_id; - uint32 vertex_id; - real64 x; - real64 y; - real64 z; - - func_g_vertex_set_xyz_real64 = v_fs_get_user_func(51); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &vertex_id); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &x); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &y); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &z); -#if defined V_PRINT_RECEIVE_COMMANDS - if(x == V_REAL64_MAX || y == V_REAL64_MAX || z == V_REAL64_MAX) - printf("receive: verse_send_g_vertex_delete_real64(node_id = %u vertex_id = %u ); callback = %p\n", node_id, vertex_id, v_fs_get_alias_user_func(51)); - else - printf("receive: verse_send_g_vertex_set_xyz_real64(node_id = %u layer_id = %u vertex_id = %u x = %f y = %f z = %f ); callback = %p\n", node_id, layer_id, vertex_id, x, y, z, v_fs_get_user_func(51)); -#endif - if(x == V_REAL64_MAX || y == V_REAL64_MAX || z == V_REAL64_MAX) - { - void (* alias_g_vertex_delete_real64)(void *user_data, VNodeID node_id, uint32 vertex_id); - alias_g_vertex_delete_real64 = v_fs_get_alias_user_func(51); - if(alias_g_vertex_delete_real64 != NULL) - alias_g_vertex_delete_real64(v_fs_get_alias_user_data(51), node_id, vertex_id); - return buffer_pos; - } - if(func_g_vertex_set_xyz_real64 != NULL) - func_g_vertex_set_xyz_real64(v_fs_get_user_data(51), node_id, layer_id, vertex_id, x, y, z); - - return buffer_pos; -} - -void verse_send_g_vertex_set_uint32(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, uint32 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 52); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_set_uint32(node_id = %u layer_id = %u vertex_id = %u value = %u );\n", node_id, layer_id, vertex_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_vertex_set_uint32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_vertex_set_uint32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, uint32 value); - VNodeID node_id; - VLayerID layer_id; - uint32 vertex_id; - uint32 value; - - func_g_vertex_set_uint32 = v_fs_get_user_func(52); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &vertex_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_vertex_set_uint32(node_id = %u layer_id = %u vertex_id = %u value = %u ); callback = %p\n", node_id, layer_id, vertex_id, value, v_fs_get_user_func(52)); -#endif - if(func_g_vertex_set_uint32 != NULL) - func_g_vertex_set_uint32(v_fs_get_user_data(52), node_id, layer_id, vertex_id, value); - - return buffer_pos; -} - -void verse_send_g_vertex_set_real64(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 53); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_set_real64(node_id = %u layer_id = %u vertex_id = %u value = %f );\n", node_id, layer_id, vertex_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_vertex_set_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_vertex_set_real64)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 value); - VNodeID node_id; - VLayerID layer_id; - uint32 vertex_id; - real64 value; - - func_g_vertex_set_real64 = v_fs_get_user_func(53); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &vertex_id); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_vertex_set_real64(node_id = %u layer_id = %u vertex_id = %u value = %f ); callback = %p\n", node_id, layer_id, vertex_id, value, v_fs_get_user_func(53)); -#endif - if(func_g_vertex_set_real64 != NULL) - func_g_vertex_set_real64(v_fs_get_user_data(53), node_id, layer_id, vertex_id, value); - - return buffer_pos; -} - -void verse_send_g_vertex_set_real32(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 54); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_vertex_set_real32(node_id = %u layer_id = %u vertex_id = %u value = %f );\n", node_id, layer_id, vertex_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], vertex_id); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || vertex_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_vertex_set_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_vertex_set_real32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 value); - VNodeID node_id; - VLayerID layer_id; - uint32 vertex_id; - real32 value; - - func_g_vertex_set_real32 = v_fs_get_user_func(54); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &vertex_id); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_vertex_set_real32(node_id = %u layer_id = %u vertex_id = %u value = %f ); callback = %p\n", node_id, layer_id, vertex_id, value, v_fs_get_user_func(54)); -#endif - if(func_g_vertex_set_real32 != NULL) - func_g_vertex_set_real32(v_fs_get_user_data(54), node_id, layer_id, vertex_id, value); - - return buffer_pos; -} - -void verse_send_g_polygon_set_corner_uint32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 55); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_corner_uint32(node_id = %u layer_id = %u polygon_id = %u v0 = %u v1 = %u v2 = %u v3 = %u );\n", node_id, layer_id, polygon_id, v0, v1, v2, v3); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], v0); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], v1); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], v2); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], v3); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_g_polygon_delete(VNodeID node_id, uint32 polygon_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 55); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_delete(node_id = %u polygon_id = %u );\n", node_id, polygon_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], 1); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - if(node_id == (uint32) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_corner_uint32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_corner_uint32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - uint32 v0; - uint32 v1; - uint32 v2; - uint32 v3; - - func_g_polygon_set_corner_uint32 = v_fs_get_user_func(55); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &v0); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &v1); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &v2); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &v3); -#if defined V_PRINT_RECEIVE_COMMANDS - if(layer_id == 1 && v0 == ~0u) - printf("receive: verse_send_g_polygon_delete(node_id = %u polygon_id = %u ); callback = %p\n", node_id, polygon_id, v_fs_get_alias_user_func(55)); - else - printf("receive: verse_send_g_polygon_set_corner_uint32(node_id = %u layer_id = %u polygon_id = %u v0 = %u v1 = %u v2 = %u v3 = %u ); callback = %p\n", node_id, layer_id, polygon_id, v0, v1, v2, v3, v_fs_get_user_func(55)); -#endif - if(layer_id == 1 && v0 == ~0u) - { - void (* alias_g_polygon_delete)(void *user_data, VNodeID node_id, uint32 polygon_id); - alias_g_polygon_delete = v_fs_get_alias_user_func(55); - if(alias_g_polygon_delete != NULL) - alias_g_polygon_delete(v_fs_get_alias_user_data(55), node_id, polygon_id); - return buffer_pos; - } - if(func_g_polygon_set_corner_uint32 != NULL) - func_g_polygon_set_corner_uint32(v_fs_get_user_data(55), node_id, layer_id, polygon_id, v0, v1, v2, v3); - - return buffer_pos; -} - -void verse_send_g_polygon_set_corner_real64(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 v0, real64 v1, real64 v2, real64 v3) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 56); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_corner_real64(node_id = %u layer_id = %u polygon_id = %u v0 = %f v1 = %f v2 = %f v3 = %f );\n", node_id, layer_id, polygon_id, v0, v1, v2, v3); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], v0); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], v1); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], v2); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], v3); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_corner_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_corner_real64)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 v0, real64 v1, real64 v2, real64 v3); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - real64 v0; - real64 v1; - real64 v2; - real64 v3; - - func_g_polygon_set_corner_real64 = v_fs_get_user_func(56); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &v0); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &v1); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &v2); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &v3); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_polygon_set_corner_real64(node_id = %u layer_id = %u polygon_id = %u v0 = %f v1 = %f v2 = %f v3 = %f ); callback = %p\n", node_id, layer_id, polygon_id, v0, v1, v2, v3, v_fs_get_user_func(56)); -#endif - if(func_g_polygon_set_corner_real64 != NULL) - func_g_polygon_set_corner_real64(v_fs_get_user_data(56), node_id, layer_id, polygon_id, v0, v1, v2, v3); - - return buffer_pos; -} - -void verse_send_g_polygon_set_corner_real32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real32 v0, real32 v1, real32 v2, real32 v3) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 57); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_corner_real32(node_id = %u layer_id = %u polygon_id = %u v0 = %f v1 = %f v2 = %f v3 = %f );\n", node_id, layer_id, polygon_id, v0, v1, v2, v3); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], v0); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], v1); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], v2); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], v3); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_corner_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_corner_real32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real32 v0, real32 v1, real32 v2, real32 v3); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - real32 v0; - real32 v1; - real32 v2; - real32 v3; - - func_g_polygon_set_corner_real32 = v_fs_get_user_func(57); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &v0); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &v1); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &v2); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &v3); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_polygon_set_corner_real32(node_id = %u layer_id = %u polygon_id = %u v0 = %f v1 = %f v2 = %f v3 = %f ); callback = %p\n", node_id, layer_id, polygon_id, v0, v1, v2, v3, v_fs_get_user_func(57)); -#endif - if(func_g_polygon_set_corner_real32 != NULL) - func_g_polygon_set_corner_real32(v_fs_get_user_data(57), node_id, layer_id, polygon_id, v0, v1, v2, v3); - - return buffer_pos; -} - -void verse_send_g_polygon_set_face_uint8(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint8 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 58); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_face_uint8(node_id = %u layer_id = %u polygon_id = %u value = %u );\n", node_id, layer_id, polygon_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_face_uint8(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_face_uint8)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint8 value); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - uint8 value; - - func_g_polygon_set_face_uint8 = v_fs_get_user_func(58); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_polygon_set_face_uint8(node_id = %u layer_id = %u polygon_id = %u value = %u ); callback = %p\n", node_id, layer_id, polygon_id, value, v_fs_get_user_func(58)); -#endif - if(func_g_polygon_set_face_uint8 != NULL) - func_g_polygon_set_face_uint8(v_fs_get_user_data(58), node_id, layer_id, polygon_id, value); - - return buffer_pos; -} - -void verse_send_g_polygon_set_face_uint32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 59); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_face_uint32(node_id = %u layer_id = %u polygon_id = %u value = %u );\n", node_id, layer_id, polygon_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_face_uint32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_face_uint32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 value); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - uint32 value; - - func_g_polygon_set_face_uint32 = v_fs_get_user_func(59); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_polygon_set_face_uint32(node_id = %u layer_id = %u polygon_id = %u value = %u ); callback = %p\n", node_id, layer_id, polygon_id, value, v_fs_get_user_func(59)); -#endif - if(func_g_polygon_set_face_uint32 != NULL) - func_g_polygon_set_face_uint32(v_fs_get_user_data(59), node_id, layer_id, polygon_id, value); - - return buffer_pos; -} - -void verse_send_g_polygon_set_face_real64(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 60); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_face_real64(node_id = %u layer_id = %u polygon_id = %u value = %f );\n", node_id, layer_id, polygon_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_face_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_face_real64)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 value); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - real64 value; - - func_g_polygon_set_face_real64 = v_fs_get_user_func(60); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_polygon_set_face_real64(node_id = %u layer_id = %u polygon_id = %u value = %f ); callback = %p\n", node_id, layer_id, polygon_id, value, v_fs_get_user_func(60)); -#endif - if(func_g_polygon_set_face_real64 != NULL) - func_g_polygon_set_face_real64(v_fs_get_user_data(60), node_id, layer_id, polygon_id, value); - - return buffer_pos; -} - -void verse_send_g_polygon_set_face_real32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real32 value) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 61); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_polygon_set_face_real32(node_id = %u layer_id = %u polygon_id = %u value = %f );\n", node_id, layer_id, polygon_id, value); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], polygon_id); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], value); - if(node_id == (uint32) ~0u || layer_id == (uint16) ~0u || polygon_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_polygon_set_face_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_polygon_set_face_real32)(void *user_data, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real32 value); - VNodeID node_id; - VLayerID layer_id; - uint32 polygon_id; - real32 value; - - func_g_polygon_set_face_real32 = v_fs_get_user_func(61); - if(buffer_length < 10) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &polygon_id); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &value); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_polygon_set_face_real32(node_id = %u layer_id = %u polygon_id = %u value = %f ); callback = %p\n", node_id, layer_id, polygon_id, value, v_fs_get_user_func(61)); -#endif - if(func_g_polygon_set_face_real32 != NULL) - func_g_polygon_set_face_real32(v_fs_get_user_data(61), node_id, layer_id, polygon_id, value); - - return buffer_pos; -} - -void verse_send_g_crease_set_vertex(VNodeID node_id, const char *layer, uint32 def_crease) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 62); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_crease_set_vertex(node_id = %u layer = %s def_crease = %u );\n", node_id, layer, def_crease); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], layer, 16); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], def_crease); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_crease_set_vertex(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_crease_set_vertex)(void *user_data, VNodeID node_id, const char *layer, uint32 def_crease); - VNodeID node_id; - char layer[16]; - uint32 def_crease; - - func_g_crease_set_vertex = v_fs_get_user_func(62); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], layer, 16, buffer_length - buffer_pos); - if(buffer_length < 4 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &def_crease); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_crease_set_vertex(node_id = %u layer = %s def_crease = %u ); callback = %p\n", node_id, layer, def_crease, v_fs_get_user_func(62)); -#endif - if(func_g_crease_set_vertex != NULL) - func_g_crease_set_vertex(v_fs_get_user_data(62), node_id, layer, def_crease); - - return buffer_pos; -} - -void verse_send_g_crease_set_edge(VNodeID node_id, const char *layer, uint32 def_crease) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 63); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_crease_set_edge(node_id = %u layer = %s def_crease = %u );\n", node_id, layer, def_crease); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], layer, 16); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], def_crease); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_crease_set_edge(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_crease_set_edge)(void *user_data, VNodeID node_id, const char *layer, uint32 def_crease); - VNodeID node_id; - char layer[16]; - uint32 def_crease; - - func_g_crease_set_edge = v_fs_get_user_func(63); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], layer, 16, buffer_length - buffer_pos); - if(buffer_length < 4 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &def_crease); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_g_crease_set_edge(node_id = %u layer = %s def_crease = %u ); callback = %p\n", node_id, layer, def_crease, v_fs_get_user_func(63)); -#endif - if(func_g_crease_set_edge != NULL) - func_g_crease_set_edge(v_fs_get_user_data(63), node_id, layer, def_crease); - - return buffer_pos; -} - -void verse_send_g_bone_create(VNodeID node_id, uint16 bone_id, const char *weight, const char *reference, uint16 parent, real64 pos_x, real64 pos_y, real64 pos_z, const char *position_label, const char *rotation_label, const char *scale_label) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_160);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 64); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_bone_create(node_id = %u bone_id = %u weight = %s reference = %s parent = %u pos_x = %f pos_y = %f pos_z = %f position_label = %s rotation_label = %s scale_label = %s );\n", node_id, bone_id, weight, reference, parent, pos_x, pos_y, pos_z, position_label, rotation_label, scale_label); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], bone_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], weight, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], reference, 16); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], parent); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos_x); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos_y); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos_z); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], position_label, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], rotation_label, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], scale_label, 16); - if(node_id == (uint32) ~0u || bone_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_g_bone_destroy(VNodeID node_id, uint16 bone_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_160);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 64); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_g_bone_destroy(node_id = %u bone_id = %u );\n", node_id, bone_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], bone_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], V_REAL64_MAX); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - if(node_id == (uint32) ~0u || bone_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_g_bone_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_g_bone_create)(void *user_data, VNodeID node_id, uint16 bone_id, const char *weight, const char *reference, uint16 parent, real64 pos_x, real64 pos_y, real64 pos_z, const char *position_label, const char *rotation_label, const char *scale_label); - VNodeID node_id; - uint16 bone_id; - char weight[16]; - char reference[16]; - uint16 parent; - real64 pos_x; - real64 pos_y; - real64 pos_z; - char position_label[16]; - char rotation_label[16]; - char scale_label[16]; - - func_g_bone_create = v_fs_get_user_func(64); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &bone_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], weight, 16, buffer_length - buffer_pos); - if(buffer_length < 0 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], reference, 16, buffer_length - buffer_pos); - if(buffer_length < 26 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &parent); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &pos_x); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &pos_y); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &pos_z); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], position_label, 16, buffer_length - buffer_pos); - if(buffer_length < 0 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], rotation_label, 16, buffer_length - buffer_pos); - if(buffer_length < 0 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], scale_label, 16, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - if(weight[0] == 0) - printf("receive: verse_send_g_bone_destroy(node_id = %u bone_id = %u ); callback = %p\n", node_id, bone_id, v_fs_get_alias_user_func(64)); - else - printf("receive: verse_send_g_bone_create(node_id = %u bone_id = %u weight = %s reference = %s parent = %u pos_x = %f pos_y = %f pos_z = %f position_label = %s rotation_label = %s scale_label = %s ); callback = %p\n", node_id, bone_id, weight, reference, parent, pos_x, pos_y, pos_z, position_label, rotation_label, scale_label, v_fs_get_user_func(64)); -#endif - if(weight[0] == 0) - { - void (* alias_g_bone_destroy)(void *user_data, VNodeID node_id, uint16 bone_id); - alias_g_bone_destroy = v_fs_get_alias_user_func(64); - if(alias_g_bone_destroy != NULL) - alias_g_bone_destroy(v_fs_get_alias_user_data(64), node_id, bone_id); - return buffer_pos; - } - if(func_g_bone_create != NULL) - func_g_bone_create(v_fs_get_user_data(64), node_id, bone_id, weight, reference, parent, pos_x, pos_y, pos_z, position_label, rotation_label, scale_label); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_init.c b/extern/verse/dist/v_gen_pack_init.c deleted file mode 100644 index e568cb989cb..00000000000 --- a/extern/verse/dist/v_gen_pack_init.c +++ /dev/null @@ -1,95 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -#include "v_gen_unpack_func.h" - -#include "verse.h" - - -extern void verse_send_packet_ack(uint32 packet_id); -extern void verse_send_packet_nak(uint32 packet_id); - -void init_pack_and_unpack(void) -{ - v_fs_add_func(0, v_unpack_connect, (void *) verse_send_connect, NULL); - v_fs_add_func(1, v_unpack_connect_accept, (void *) verse_send_connect_accept, NULL); - v_fs_add_func(2, v_unpack_connect_terminate, (void *) verse_send_connect_terminate, NULL); - v_fs_add_func(5, v_unpack_ping, (void *) verse_send_ping, NULL); - v_fs_add_func(7, v_unpack_packet_ack, verse_send_packet_ack, NULL); - v_fs_add_func(8, v_unpack_packet_nak, verse_send_packet_nak, NULL); - v_fs_add_func(9, v_unpack_node_index_subscribe, verse_send_node_index_subscribe, NULL); - v_fs_add_func(10, v_unpack_node_create, verse_send_node_create, verse_send_node_destroy); - v_fs_add_func(11, v_unpack_node_subscribe, verse_send_node_subscribe, verse_send_node_unsubscribe); - v_fs_add_func(16, v_unpack_tag_group_create, verse_send_tag_group_create, verse_send_tag_group_destroy); - v_fs_add_func(17, v_unpack_tag_group_subscribe, verse_send_tag_group_subscribe, verse_send_tag_group_unsubscribe); - v_fs_add_func(18, v_unpack_tag_create, verse_send_tag_create, verse_send_tag_destroy); - v_fs_add_func(19, v_unpack_node_name_set, verse_send_node_name_set, NULL); - v_fs_add_func(32, v_unpack_o_transform_pos_real32, verse_send_o_transform_pos_real32, NULL); - v_fs_add_func(33, v_unpack_o_transform_rot_real32, verse_send_o_transform_rot_real32, NULL); - v_fs_add_func(34, v_unpack_o_transform_scale_real32, verse_send_o_transform_scale_real32, NULL); - v_fs_add_func(35, v_unpack_o_transform_pos_real64, verse_send_o_transform_pos_real64, NULL); - v_fs_add_func(36, v_unpack_o_transform_rot_real64, verse_send_o_transform_rot_real64, NULL); - v_fs_add_func(37, v_unpack_o_transform_scale_real64, verse_send_o_transform_scale_real64, NULL); - v_fs_add_func(38, v_unpack_o_transform_subscribe, verse_send_o_transform_subscribe, verse_send_o_transform_unsubscribe); - v_fs_add_func(39, v_unpack_o_light_set, verse_send_o_light_set, NULL); - v_fs_add_func(40, v_unpack_o_link_set, verse_send_o_link_set, verse_send_o_link_destroy); - v_fs_add_func(41, v_unpack_o_method_group_create, verse_send_o_method_group_create, verse_send_o_method_group_destroy); - v_fs_add_func(42, v_unpack_o_method_group_subscribe, verse_send_o_method_group_subscribe, verse_send_o_method_group_unsubscribe); - v_fs_add_func(43, v_unpack_o_method_create, verse_send_o_method_create, verse_send_o_method_destroy); - v_fs_add_func(44, v_unpack_o_method_call, verse_send_o_method_call, NULL); - v_fs_add_func(45, v_unpack_o_anim_run, verse_send_o_anim_run, NULL); - v_fs_add_func(46, v_unpack_o_hide, verse_send_o_hide, NULL); - v_fs_add_func(48, v_unpack_g_layer_create, verse_send_g_layer_create, verse_send_g_layer_destroy); - v_fs_add_func(49, v_unpack_g_layer_subscribe, verse_send_g_layer_subscribe, verse_send_g_layer_unsubscribe); - v_fs_add_func(50, v_unpack_g_vertex_set_xyz_real32, verse_send_g_vertex_set_xyz_real32, verse_send_g_vertex_delete_real32); - v_fs_add_func(51, v_unpack_g_vertex_set_xyz_real64, verse_send_g_vertex_set_xyz_real64, verse_send_g_vertex_delete_real64); - v_fs_add_func(52, v_unpack_g_vertex_set_uint32, verse_send_g_vertex_set_uint32, NULL); - v_fs_add_func(53, v_unpack_g_vertex_set_real64, verse_send_g_vertex_set_real64, NULL); - v_fs_add_func(54, v_unpack_g_vertex_set_real32, verse_send_g_vertex_set_real32, NULL); - v_fs_add_func(55, v_unpack_g_polygon_set_corner_uint32, verse_send_g_polygon_set_corner_uint32, verse_send_g_polygon_delete); - v_fs_add_func(56, v_unpack_g_polygon_set_corner_real64, verse_send_g_polygon_set_corner_real64, NULL); - v_fs_add_func(57, v_unpack_g_polygon_set_corner_real32, verse_send_g_polygon_set_corner_real32, NULL); - v_fs_add_func(58, v_unpack_g_polygon_set_face_uint8, verse_send_g_polygon_set_face_uint8, NULL); - v_fs_add_func(59, v_unpack_g_polygon_set_face_uint32, verse_send_g_polygon_set_face_uint32, NULL); - v_fs_add_func(60, v_unpack_g_polygon_set_face_real64, verse_send_g_polygon_set_face_real64, NULL); - v_fs_add_func(61, v_unpack_g_polygon_set_face_real32, verse_send_g_polygon_set_face_real32, NULL); - v_fs_add_func(62, v_unpack_g_crease_set_vertex, verse_send_g_crease_set_vertex, NULL); - v_fs_add_func(63, v_unpack_g_crease_set_edge, verse_send_g_crease_set_edge, NULL); - v_fs_add_func(64, v_unpack_g_bone_create, verse_send_g_bone_create, verse_send_g_bone_destroy); - v_fs_add_func(68, v_unpack_m_fragment_create, verse_send_m_fragment_create, verse_send_m_fragment_destroy); - v_fs_add_func(80, v_unpack_b_dimensions_set, verse_send_b_dimensions_set, NULL); - v_fs_add_func(81, v_unpack_b_layer_create, verse_send_b_layer_create, verse_send_b_layer_destroy); - v_fs_add_func(82, v_unpack_b_layer_subscribe, verse_send_b_layer_subscribe, verse_send_b_layer_unsubscribe); - v_fs_add_func(83, v_unpack_b_tile_set, (void *) verse_send_b_tile_set, NULL); - v_fs_add_func(96, v_unpack_t_language_set, verse_send_t_language_set, NULL); - v_fs_add_func(97, v_unpack_t_buffer_create, verse_send_t_buffer_create, verse_send_t_buffer_destroy); - v_fs_add_func(98, v_unpack_t_buffer_subscribe, verse_send_t_buffer_subscribe, verse_send_t_buffer_unsubscribe); - v_fs_add_func(99, v_unpack_t_text_set, (void *) verse_send_t_text_set, NULL); - v_fs_add_func(128, v_unpack_c_curve_create, verse_send_c_curve_create, verse_send_c_curve_destroy); - v_fs_add_func(129, v_unpack_c_curve_subscribe, verse_send_c_curve_subscribe, verse_send_c_curve_unsubscribe); - v_fs_add_func(130, v_unpack_c_key_set, (void *) verse_send_c_key_set, (void *) verse_send_c_key_destroy); - v_fs_add_func(160, v_unpack_a_buffer_create, verse_send_a_buffer_create, verse_send_a_buffer_destroy); - v_fs_add_func(161, v_unpack_a_buffer_subscribe, verse_send_a_buffer_subscribe, verse_send_a_buffer_unsubscribe); - v_fs_add_func(162, v_unpack_a_block_set, verse_send_a_block_set, verse_send_a_block_clear); - v_fs_add_func(163, v_unpack_a_stream_create, verse_send_a_stream_create, verse_send_a_stream_destroy); - v_fs_add_func(164, v_unpack_a_stream_subscribe, verse_send_a_stream_subscribe, verse_send_a_stream_unsubscribe); - v_fs_add_func(165, v_unpack_a_stream, verse_send_a_stream, NULL); -} -#endif - diff --git a/extern/verse/dist/v_gen_pack_m_node.c b/extern/verse/dist/v_gen_pack_m_node.c deleted file mode 100644 index 376b6c51c39..00000000000 --- a/extern/verse/dist/v_gen_pack_m_node.c +++ /dev/null @@ -1,352 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_m_fragment_create(VNodeID node_id, VNMFragmentID frag_id, VNMFragmentType type, const VMatFrag *fragment) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 68); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_m_fragment_create(node_id = %u frag_id = %u type = %u fragment = %p );\n", node_id, frag_id, type, fragment); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], frag_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - switch(type) - { - case VN_M_FT_COLOR : - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->color.red); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->color.green); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->color.blue); - break; - case VN_M_FT_LIGHT : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->light.type); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->light.normal_falloff); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], fragment->light.brdf); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->light.brdf_r, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->light.brdf_g, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->light.brdf_b, 16); - break; - case VN_M_FT_REFLECTION : - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->reflection.normal_falloff); - break; - case VN_M_FT_TRANSPARENCY : - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->transparency.normal_falloff); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->transparency.refraction_index); - break; - case VN_M_FT_GEOMETRY : - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->geometry.layer_r, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->geometry.layer_g, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->geometry.layer_b, 16); - break; - case VN_M_FT_VOLUME : - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.diffusion); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.col_r); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.col_g); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->volume.col_b); - break; - case VN_M_FT_VIEW : - break; - case VN_M_FT_TEXTURE : - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], fragment->texture.bitmap); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->texture.layer_r, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->texture.layer_g, 16); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->texture.layer_b, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->texture.filtered); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->texture.mapping); - break; - case VN_M_FT_NOISE : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->noise.type); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->noise.mapping); - break; - case VN_M_FT_BLENDER : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->blender.type); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->blender.data_a); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->blender.data_b); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->blender.control); - break; - case VN_M_FT_CLAMP : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->clamp.min); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->clamp.red); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->clamp.green); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->clamp.blue); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->clamp.data); - break; - case VN_M_FT_MATRIX : - { - unsigned int i; - for(i = 0; i < 16; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->matrix.matrix[i]); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->matrix.data); - } - break; - case VN_M_FT_RAMP : - if(fragment->ramp.point_count == 0) - return; - { - unsigned int i, pos; - double last; - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->ramp.type); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)fragment->ramp.channel); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->ramp.mapping); - pos = buffer_pos; - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], fragment->ramp.point_count); - last = fragment->ramp.ramp[0].pos - 1; - for(i = 0; i < fragment->ramp.point_count && fragment->ramp.ramp[i].pos > last && i < 48; i++) - { - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].pos); - last = fragment->ramp.ramp[i].pos; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].red); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].green); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], fragment->ramp.ramp[i].blue); - } - if(i != fragment->ramp.point_count) - vnp_raw_pack_uint8(&buf[pos], i); - } - break; - case VN_M_FT_ANIMATION : - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->animation.label, 16); - break; - case VN_M_FT_ALTERNATIVE : - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->alternative.alt_a); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->alternative.alt_b); - break; - case VN_M_FT_OUTPUT : - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], fragment->output.label, 16); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->output.front); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], fragment->output.back); - break; - } - if(node_id == (uint32) ~0u || frag_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_m_fragment_destroy(VNodeID node_id, VNMFragmentID frag_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 68); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_m_fragment_destroy(node_id = %u frag_id = %u );\n", node_id, frag_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], frag_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - if(node_id == (uint32) ~0u || frag_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_m_fragment_create(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_m_fragment_create)(void *user_data, VNodeID node_id, VNMFragmentID frag_id, VNMFragmentType type, const VMatFrag *fragment); - VNodeID node_id; - VNMFragmentID frag_id; - VNMFragmentType type; - const VMatFrag *fragment; - - func_m_fragment_create = v_fs_get_user_func(68); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNMFragmentType)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - if(type > VN_M_FT_OUTPUT) - printf("receive: verse_send_m_fragment_destroy(node_id = %u frag_id = %u ); callback = %p\n", node_id, frag_id, v_fs_get_alias_user_func(68)); - else - printf("receive: verse_send_m_fragment_create(node_id = %u frag_id = %u type = %u ); callback = %p\n", node_id, frag_id, type, v_fs_get_user_func(68)); -#endif - if(type <= VN_M_FT_OUTPUT) - { - VMatFrag frag; - uint8 temp; - switch(type) - { - case VN_M_FT_COLOR : - if(buffer_pos + 3 * 8 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.color.red); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.color.green); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.color.blue); - break; - case VN_M_FT_LIGHT : - if(buffer_pos + 13 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.light.type = (VNMLightType)temp; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.light.normal_falloff); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &frag.light.brdf); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.light.brdf_r, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.light.brdf_g, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.light.brdf_b, 16, buffer_length - buffer_pos); - break; - case VN_M_FT_REFLECTION : - if(buffer_pos + 8 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.reflection.normal_falloff); - break; - case VN_M_FT_TRANSPARENCY : - if(buffer_pos + 16 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.transparency.normal_falloff); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.transparency.refraction_index); - break; - case VN_M_FT_VOLUME : - if(buffer_pos + 32 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.diffusion); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.col_r); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.col_g); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.volume.col_b); - break; - case VN_M_FT_VIEW : - break; - case VN_M_FT_GEOMETRY : - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.geometry.layer_r, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.geometry.layer_g, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.geometry.layer_b, 16, buffer_length - buffer_pos); - break; - case VN_M_FT_TEXTURE : - if(buffer_pos + 10 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &frag.texture.bitmap); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.texture.layer_r, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.texture.layer_g, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.texture.layer_b, 16, buffer_length - buffer_pos); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.texture.filtered = (VNMNoiseType)temp; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.texture.mapping); - break; - case VN_M_FT_NOISE : - if(buffer_pos + 3 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.noise.type = (VNMNoiseType)temp; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.noise.mapping); - break; - case VN_M_FT_BLENDER : - if(buffer_pos + 7 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.blender.type = (VNMBlendType)temp; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.blender.data_a); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.blender.data_b); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.blender.control); - break; - case VN_M_FT_CLAMP : - if(buffer_pos + 27 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.clamp.min = (VNMBlendType)temp; - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.clamp.red); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.clamp.green); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.clamp.blue); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.clamp.data); - break; - case VN_M_FT_MATRIX : - if(buffer_pos + 8 * 16 + 2 > buffer_length) - return -1; - else - { - unsigned int i; - for(i = 0; i < 16; i++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.matrix.matrix[i]); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.matrix.data); - } - break; - case VN_M_FT_RAMP : - if(buffer_pos + 5 + 4 * 8 > buffer_length) - return -1; - else - { - unsigned int i, pos; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.ramp.type = (VNMRampType)temp; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &temp); - frag.ramp.channel = (VNMRampChannel)temp; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.ramp.mapping); - pos = buffer_pos; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &frag.ramp.point_count); - for(i = 0; i < frag.ramp.point_count && buffer_pos + 8 * 4 <= buffer_length && i < 48; i++) - { - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].pos); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].red); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].green); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &frag.ramp.ramp[i].blue); - }if(i != frag.ramp.point_count) - frag.ramp.point_count = i; - } - break; - case VN_M_FT_ANIMATION : - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.animation.label, 16, buffer_length - buffer_pos); - break; - case VN_M_FT_ALTERNATIVE : - if(buffer_pos + 4 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.alternative.alt_a); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.alternative.alt_b); - break; - case VN_M_FT_OUTPUT : - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], frag.output.label, 16, buffer_length - buffer_pos); - if(buffer_pos + 4 > buffer_length) - return -1; - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.output.front); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &frag.output.back); - break; - } - if(func_m_fragment_create != NULL) - func_m_fragment_create(v_fs_get_user_data(68), node_id, frag_id, type, &frag); - return buffer_pos; - } - - if(type > VN_M_FT_OUTPUT) - { - void (* alias_m_fragment_destroy)(void *user_data, VNodeID node_id, VNMFragmentID frag_id); - alias_m_fragment_destroy = v_fs_get_alias_user_func(68); - if(alias_m_fragment_destroy != NULL) - alias_m_fragment_destroy(v_fs_get_alias_user_data(68), node_id, frag_id); - return buffer_pos; - } - if(func_m_fragment_create != NULL) - func_m_fragment_create(v_fs_get_user_data(68), node_id, frag_id, (VNMFragmentType) type, fragment); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_o_node.c b/extern/verse/dist/v_gen_pack_o_node.c deleted file mode 100644 index 5d60bafe1d0..00000000000 --- a/extern/verse/dist/v_gen_pack_o_node.c +++ /dev/null @@ -1,1297 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_o_transform_pos_real32(VNodeID node_id, uint32 time_s, uint32 time_f, const real32 *pos, const real32 *speed, const real32 *accelerate, const real32 *drag_normal, real32 drag) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 32); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_pos_real32(node_id = %u time_s = %u time_f = %u pos = %p speed = %p accelerate = %p drag_normal = %p drag = %f );\n", node_id, time_s, time_f, pos, speed, accelerate, drag_normal, drag); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_s); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_f); - { - unsigned char mask = 0; - unsigned int cmd; - cmd = buffer_pos++; - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], pos[0]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], pos[1]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], pos[2]); - if(speed != NULL && (speed[0] > 0.0000001 || speed[0] < -0.0000001 || speed[1] > 0.0000001 || speed[1] < -0.0000001 || speed[2] > 0.0000001 || speed[2] < -0.0000001)) - { - mask |= 1; - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], speed[0]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], speed[1]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], speed[2]); - } - if(accelerate != NULL && (accelerate[0] > 0.0000001 || accelerate[0] < -0.0000001 || accelerate[1] > 0.0000001 || accelerate[1] < -0.0000001 || accelerate[2] > 0.0000001 || accelerate[2] < -0.0000001)) - { - mask |= 2; - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], accelerate[0]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], accelerate[1]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], accelerate[2]); - } - if(drag_normal != NULL && (drag > 0.0000001 || drag < -0.0000001) && (drag_normal[0] > 0.0000001 || drag_normal[0] < -0.0000001 || drag_normal[1] > 0.0000001 || drag_normal[1] < -0.0000001 || drag_normal[2] > 0.0000001 || drag_normal[2] < -0.0000001)) - { - mask |= 4; - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag_normal[0]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag_normal[1]); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag_normal[2]); - } - if(drag > 0.0000001 || drag < -0.0000001) - { - mask |= 8; - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag); - } - vnp_raw_pack_uint8(&buf[cmd], mask); - }if(FALSE) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_pos_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_transform_pos_real32)(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const real32 *pos, const real32 *speed, const real32 *accelerate, const real32 *drag_normal, real32 drag); - VNodeID node_id; - uint32 time_s; - uint32 time_f; - const real32 *pos; - const real32 *speed; - const real32 *accelerate; - const real32 *drag_normal; - real32 drag; - - func_o_transform_pos_real32 = v_fs_get_user_func(32); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_s); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_f); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_transform_pos_real32(node_id = %u time_s = %u time_f = %u drag = %f ); callback = %p\n", node_id, time_s, time_f, drag, v_fs_get_user_func(32)); -#endif - { - float output[4][3]; - unsigned int i, j; - char mask, pow = 1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask); - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &output[0][j]); - for(i = 1; i < 4; i++) - { - if((mask & pow) != 0) - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &output[i][j]); - else - for(j = 0; j < 3; j++) - output[i][j] = 0; - pow *= 2; - } - if((mask & pow) != 0) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag); - else - drag = 0.0f; - if(func_o_transform_pos_real32 != NULL) - func_o_transform_pos_real32(v_fs_get_user_data(32), node_id, time_s, time_f, &output[0][0], &output[1][0], &output[2][0], &output[3][0], drag); - return buffer_pos; - } - - if(func_o_transform_pos_real32 != NULL) - func_o_transform_pos_real32(v_fs_get_user_data(32), node_id, time_s, time_f, pos, speed, accelerate, drag_normal, drag); - - return buffer_pos; -} - -void verse_send_o_transform_rot_real32(VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 33); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_rot_real32(node_id = %u time_s = %u time_f = %u rot = %p speed = %p accelerate = %p drag_normal = %p drag = %f );\n", node_id, time_s, time_f, rot, speed, accelerate, drag_normal, drag); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_s); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_f); - { - uint8 mask = 0; - unsigned int maskpos; - maskpos = buffer_pos++; /* Remember location, and reserve a byte for the mask. */ - buffer_pos += vnp_pack_quat32(&buf[buffer_pos], rot); - if(v_quat32_valid(speed)) - { - mask |= 1; - buffer_pos += vnp_pack_quat32(&buf[buffer_pos], speed); - } - if(v_quat32_valid(accelerate)) - { - mask |= 2; - buffer_pos += vnp_pack_quat32(&buf[buffer_pos], accelerate); - } - if(v_quat32_valid(drag_normal)) - { - mask |= 4; - buffer_pos += vnp_pack_quat32(&buf[buffer_pos], drag_normal); - } - if(drag > 0.0000001 || drag < -0.0000001) - { - mask |= 8; - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag); - } - vnp_raw_pack_uint8(&buf[maskpos], mask); /* Write the mask into start of command. */ - } - if(FALSE) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], drag); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_rot_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_transform_rot_real32)(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag); - VNodeID node_id; - uint32 time_s; - uint32 time_f; - const VNQuat32 *rot; - const VNQuat32 *speed; - const VNQuat32 *accelerate; - const VNQuat32 *drag_normal; - real32 drag; - - func_o_transform_rot_real32 = v_fs_get_user_func(33); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_s); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_f); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_transform_rot_real32(node_id = %u time_s = %u time_f = %u drag = %f ); callback = %p\n", node_id, time_s, time_f, drag, v_fs_get_user_func(33)); -#endif - { - VNQuat32 trot, temp[3], *q[3]; - unsigned int i; - uint8 mask, test; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask); - buffer_pos += vnp_unpack_quat32(&buf[buffer_pos], &trot); - for(i = 0, test = 1; i < sizeof temp / sizeof *temp; i++, test <<= 1) - { - if(mask & test) /* Field present? */ - { - buffer_pos += vnp_unpack_quat32(&buf[buffer_pos], &temp[i]); - q[i] = &temp[i]; - } - else - q[i] = NULL; - } - if(mask & test) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag); - else - drag = 0.0; - if(func_o_transform_rot_real32 != NULL) - func_o_transform_rot_real32(v_fs_get_user_data(33), node_id, time_s, time_f, &trot, q[0], q[1], q[2], drag); - return buffer_pos; - } - - if(func_o_transform_rot_real32 != NULL) - func_o_transform_rot_real32(v_fs_get_user_data(33), node_id, time_s, time_f, rot, speed, accelerate, drag_normal, drag); - - return buffer_pos; -} - -void verse_send_o_transform_scale_real32(VNodeID node_id, real32 scale_x, real32 scale_y, real32 scale_z) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_20);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 34); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_scale_real32(node_id = %u scale_x = %f scale_y = %f scale_z = %f );\n", node_id, scale_x, scale_y, scale_z); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], scale_x); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], scale_y); - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], scale_z); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_scale_real32(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_transform_scale_real32)(void *user_data, VNodeID node_id, real32 scale_x, real32 scale_y, real32 scale_z); - VNodeID node_id; - real32 scale_x; - real32 scale_y; - real32 scale_z; - - func_o_transform_scale_real32 = v_fs_get_user_func(34); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &scale_x); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &scale_y); - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &scale_z); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_transform_scale_real32(node_id = %u scale_x = %f scale_y = %f scale_z = %f ); callback = %p\n", node_id, scale_x, scale_y, scale_z, v_fs_get_user_func(34)); -#endif - if(func_o_transform_scale_real32 != NULL) - func_o_transform_scale_real32(v_fs_get_user_data(34), node_id, scale_x, scale_y, scale_z); - - return buffer_pos; -} - -void verse_send_o_transform_pos_real64(VNodeID node_id, uint32 time_s, uint32 time_f, const real64 *pos, const real64 *speed, const real64 *accelerate, const real64 *drag_normal, real64 drag) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 35); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_pos_real64(node_id = %u time_s = %u time_f = %u pos = %p speed = %p accelerate = %p drag_normal = %p drag = %f );\n", node_id, time_s, time_f, pos, speed, accelerate, drag_normal, drag); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_s); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_f); - { - unsigned char mask = 0; - unsigned int cmd; - cmd = buffer_pos++; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[0]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[1]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[2]); - if(speed != NULL && (speed[0] > 0.0000001 || speed[0] < -0.0000001 || speed[1] > 0.0000001 || speed[1] < -0.0000001 || speed[2] > 0.0000001 || speed[2] < -0.0000001)) - { - mask |= 1; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[0]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[1]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[2]); - } - if(accelerate != NULL && (accelerate[0] > 0.0000001 || accelerate[0] < -0.0000001 || accelerate[1] > 0.0000001 || accelerate[1] < -0.0000001 || accelerate[2] > 0.0000001 || accelerate[2] < -0.0000001)) - { - mask |= 2; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accelerate[0]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accelerate[1]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accelerate[2]); - } - if(drag_normal != NULL && (drag > 0.0000001 || drag < -0.0000001) && (drag_normal[0] > 0.0000001 || drag_normal[0] < -0.0000001 || drag_normal[1] > 0.0000001 || drag_normal[1] < -0.0000001 || drag_normal[2] > 0.0000001 || drag_normal[2] < -0.0000001)) - { - mask |= 4; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag_normal[0]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag_normal[1]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag_normal[2]); - } - if(drag > 0.0000001 || drag < -0.0000001) - { - mask |= 8; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag); - } - vnp_raw_pack_uint8(&buf[cmd], mask); - }if(FALSE) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_pos_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_transform_pos_real64)(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const real64 *pos, const real64 *speed, const real64 *accelerate, const real64 *drag_normal, real64 drag); - VNodeID node_id; - uint32 time_s; - uint32 time_f; - const real64 *pos; - const real64 *speed; - const real64 *accelerate; - const real64 *drag_normal; - real64 drag; - - func_o_transform_pos_real64 = v_fs_get_user_func(35); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_s); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_f); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_transform_pos_real64(node_id = %u time_s = %u time_f = %u drag = %f ); callback = %p\n", node_id, time_s, time_f, drag, v_fs_get_user_func(35)); -#endif - { - double output[4][3]; - unsigned int i, j; - char mask, pow = 1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask); - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[0][j]); - for(i = 1; i < 4; i++) - { - if((mask & pow) != 0) - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[i][j]); - else - for(j = 0; j < 3; j++) - output[i][j] = 0; - pow *= 2; - } - if((mask & pow) != 0) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag); - else - drag = 0.0; - if(func_o_transform_pos_real64 != NULL) - func_o_transform_pos_real64(v_fs_get_user_data(35), node_id, time_s, time_f, &output[0][0], &output[1][0], &output[2][0], &output[3][0], drag); - return buffer_pos; - } - - if(func_o_transform_pos_real64 != NULL) - func_o_transform_pos_real64(v_fs_get_user_data(35), node_id, time_s, time_f, pos, speed, accelerate, drag_normal, drag); - - return buffer_pos; -} - -void verse_send_o_transform_rot_real64(VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat64 *rot, const VNQuat64 *speed, const VNQuat64 *accelerate, const VNQuat64 *drag_normal, real64 drag) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 36); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_rot_real64(node_id = %u time_s = %u time_f = %u rot = %p speed = %p accelerate = %p drag_normal = %p drag = %f );\n", node_id, time_s, time_f, rot, speed, accelerate, drag_normal, drag); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_s); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_f); - { - uint8 mask = 0; - unsigned int maskpos; - maskpos = buffer_pos++; /* Remember location, and reserve a byte for the mask. */ - buffer_pos += vnp_pack_quat64(&buf[buffer_pos], rot); - if(v_quat64_valid(speed)) - { - mask |= 1; - buffer_pos += vnp_pack_quat64(&buf[buffer_pos], speed); - } - if(v_quat64_valid(accelerate)) - { - mask |= 2; - buffer_pos += vnp_pack_quat64(&buf[buffer_pos], accelerate); - } - if(v_quat64_valid(drag_normal)) - { - mask |= 4; - buffer_pos += vnp_pack_quat64(&buf[buffer_pos], drag_normal); - } - if(drag > 0.0000001 || drag < -0.0000001) - { - mask |= 8; - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag); - } - vnp_raw_pack_uint8(&buf[maskpos], mask); /* Write the mask into start of command. */ - } - if(FALSE) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], drag); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_rot_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_transform_rot_real64)(void *user_data, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat64 *rot, const VNQuat64 *speed, const VNQuat64 *accelerate, const VNQuat64 *drag_normal, real64 drag); - VNodeID node_id; - uint32 time_s; - uint32 time_f; - const VNQuat64 *rot; - const VNQuat64 *speed; - const VNQuat64 *accelerate; - const VNQuat64 *drag_normal; - real64 drag; - - func_o_transform_rot_real64 = v_fs_get_user_func(36); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_s); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_f); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_transform_rot_real64(node_id = %u time_s = %u time_f = %u drag = %f ); callback = %p\n", node_id, time_s, time_f, drag, v_fs_get_user_func(36)); -#endif - { - VNQuat64 trot, temp[3], *q[3]; - unsigned int i; - uint8 mask, test; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask); - buffer_pos += vnp_unpack_quat64(&buf[buffer_pos], &trot); - for(i = 0, test = 1; i < sizeof temp / sizeof *temp; i++, test <<= 1) - { - if(mask & test) /* Field present? */ - { - buffer_pos += vnp_unpack_quat64(&buf[buffer_pos], &temp[i]); - q[i] = &temp[i]; - } - else - q[i] = NULL; - } - if(mask & test) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag); - else - drag = 0.0; - if(func_o_transform_rot_real64 != NULL) - func_o_transform_rot_real64(v_fs_get_user_data(36), node_id, time_s, time_f, &trot, q[0], q[1], q[2], drag); - return buffer_pos; - } - - if(func_o_transform_rot_real64 != NULL) - func_o_transform_rot_real64(v_fs_get_user_data(36), node_id, time_s, time_f, rot, speed, accelerate, drag_normal, drag); - - return buffer_pos; -} - -void verse_send_o_transform_scale_real64(VNodeID node_id, real64 scale_x, real64 scale_y, real64 scale_z) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 37); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_scale_real64(node_id = %u scale_x = %f scale_y = %f scale_z = %f );\n", node_id, scale_x, scale_y, scale_z); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale_x); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale_y); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale_z); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_scale_real64(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_transform_scale_real64)(void *user_data, VNodeID node_id, real64 scale_x, real64 scale_y, real64 scale_z); - VNodeID node_id; - real64 scale_x; - real64 scale_y; - real64 scale_z; - - func_o_transform_scale_real64 = v_fs_get_user_func(37); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &scale_x); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &scale_y); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &scale_z); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_transform_scale_real64(node_id = %u scale_x = %f scale_y = %f scale_z = %f ); callback = %p\n", node_id, scale_x, scale_y, scale_z, v_fs_get_user_func(37)); -#endif - if(func_o_transform_scale_real64 != NULL) - func_o_transform_scale_real64(v_fs_get_user_data(37), node_id, scale_x, scale_y, scale_z); - - return buffer_pos; -} - -void verse_send_o_transform_subscribe(VNodeID node_id, VNRealFormat type) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 38); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_subscribe(node_id = %u type = %u );\n", node_id, type); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_o_transform_unsubscribe(VNodeID node_id, VNRealFormat type) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 38); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_transform_unsubscribe(node_id = %u type = %u );\n", node_id, type); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_transform_subscribe(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_o_transform_subscribe)(void *user_data, VNodeID node_id, VNRealFormat type); - VNodeID node_id; - VNRealFormat type; - uint8 alias_bool; - - func_o_transform_subscribe = v_fs_get_user_func(38); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNRealFormat)enum_temp; - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_o_transform_unsubscribe(node_id = %u type = %u ); callback = %p\n", node_id, type, v_fs_get_alias_user_func(38)); - else - printf("receive: verse_send_o_transform_subscribe(node_id = %u type = %u ); callback = %p\n", node_id, type, v_fs_get_user_func(38)); -#endif - if(!alias_bool) - { - void (* alias_o_transform_unsubscribe)(void *user_data, VNodeID node_id, VNRealFormat type); - alias_o_transform_unsubscribe = v_fs_get_alias_user_func(38); - if(alias_o_transform_unsubscribe != NULL) - alias_o_transform_unsubscribe(v_fs_get_alias_user_data(38), node_id, (VNRealFormat)type); - return buffer_pos; - } - if(func_o_transform_subscribe != NULL) - func_o_transform_subscribe(v_fs_get_user_data(38), node_id, (VNRealFormat) type); - - return buffer_pos; -} - -void verse_send_o_light_set(VNodeID node_id, real64 light_r, real64 light_g, real64 light_b) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 39); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_light_set(node_id = %u light_r = %f light_g = %f light_b = %f );\n", node_id, light_r, light_g, light_b); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], light_r); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], light_g); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], light_b); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_light_set(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_light_set)(void *user_data, VNodeID node_id, real64 light_r, real64 light_g, real64 light_b); - VNodeID node_id; - real64 light_r; - real64 light_g; - real64 light_b; - - func_o_light_set = v_fs_get_user_func(39); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &light_r); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &light_g); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &light_b); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_light_set(node_id = %u light_r = %f light_g = %f light_b = %f ); callback = %p\n", node_id, light_r, light_g, light_b, v_fs_get_user_func(39)); -#endif - if(func_o_light_set != NULL) - func_o_light_set(v_fs_get_user_data(39), node_id, light_r, light_g, light_b); - - return buffer_pos; -} - -void verse_send_o_link_set(VNodeID node_id, uint16 link_id, VNodeID link, const char *label, uint32 target_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 40); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_link_set(node_id = %u link_id = %u link = %u label = %s target_id = %u );\n", node_id, link_id, link, label, target_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], link_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], link); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], label, 16); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], target_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || link_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_o_link_destroy(VNodeID node_id, uint16 link_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 40); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_link_destroy(node_id = %u link_id = %u );\n", node_id, link_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], link_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], -1); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || link_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_link_set(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_link_set)(void *user_data, VNodeID node_id, uint16 link_id, VNodeID link, const char *label, uint32 target_id); - VNodeID node_id; - uint16 link_id; - VNodeID link; - char label[16]; - uint32 target_id; - uint8 alias_bool; - - func_o_link_set = v_fs_get_user_func(40); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &link_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &link); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], label, 16, buffer_length - buffer_pos); - if(buffer_length < 4 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &target_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_o_link_destroy(node_id = %u link_id = %u ); callback = %p\n", node_id, link_id, v_fs_get_alias_user_func(40)); - else - printf("receive: verse_send_o_link_set(node_id = %u link_id = %u link = %u label = %s target_id = %u ); callback = %p\n", node_id, link_id, link, label, target_id, v_fs_get_user_func(40)); -#endif - if(!alias_bool) - { - void (* alias_o_link_destroy)(void *user_data, VNodeID node_id, uint16 link_id); - alias_o_link_destroy = v_fs_get_alias_user_func(40); - if(alias_o_link_destroy != NULL) - alias_o_link_destroy(v_fs_get_alias_user_data(40), node_id, link_id); - return buffer_pos; - } - if(func_o_link_set != NULL) - func_o_link_set(v_fs_get_user_data(40), node_id, link_id, link, label, target_id); - - return buffer_pos; -} - -void verse_send_o_method_group_create(VNodeID node_id, uint16 group_id, const char *name) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 41); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_group_create(node_id = %u group_id = %u name = %s );\n", node_id, group_id, name); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_o_method_group_destroy(VNodeID node_id, uint16 group_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 41); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_group_destroy(node_id = %u group_id = %u );\n", node_id, group_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_method_group_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_method_group_create)(void *user_data, VNodeID node_id, uint16 group_id, const char *name); - VNodeID node_id; - uint16 group_id; - char name[16]; - - func_o_method_group_create = v_fs_get_user_func(41); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_o_method_group_destroy(node_id = %u group_id = %u ); callback = %p\n", node_id, group_id, v_fs_get_alias_user_func(41)); - else - printf("receive: verse_send_o_method_group_create(node_id = %u group_id = %u name = %s ); callback = %p\n", node_id, group_id, name, v_fs_get_user_func(41)); -#endif - if(name[0] == 0) - { - void (* alias_o_method_group_destroy)(void *user_data, VNodeID node_id, uint16 group_id); - alias_o_method_group_destroy = v_fs_get_alias_user_func(41); - if(alias_o_method_group_destroy != NULL) - alias_o_method_group_destroy(v_fs_get_alias_user_data(41), node_id, group_id); - return buffer_pos; - } - if(func_o_method_group_create != NULL) - func_o_method_group_create(v_fs_get_user_data(41), node_id, group_id, name); - - return buffer_pos; -} - -void verse_send_o_method_group_subscribe(VNodeID node_id, uint16 group_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 42); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_group_subscribe(node_id = %u group_id = %u );\n", node_id, group_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_o_method_group_unsubscribe(VNodeID node_id, uint16 group_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 42); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_group_unsubscribe(node_id = %u group_id = %u );\n", node_id, group_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_method_group_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_method_group_subscribe)(void *user_data, VNodeID node_id, uint16 group_id); - VNodeID node_id; - uint16 group_id; - uint8 alias_bool; - - func_o_method_group_subscribe = v_fs_get_user_func(42); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_o_method_group_unsubscribe(node_id = %u group_id = %u ); callback = %p\n", node_id, group_id, v_fs_get_alias_user_func(42)); - else - printf("receive: verse_send_o_method_group_subscribe(node_id = %u group_id = %u ); callback = %p\n", node_id, group_id, v_fs_get_user_func(42)); -#endif - if(!alias_bool) - { - void (* alias_o_method_group_unsubscribe)(void *user_data, VNodeID node_id, uint16 group_id); - alias_o_method_group_unsubscribe = v_fs_get_alias_user_func(42); - if(alias_o_method_group_unsubscribe != NULL) - alias_o_method_group_unsubscribe(v_fs_get_alias_user_data(42), node_id, group_id); - return buffer_pos; - } - if(func_o_method_group_subscribe != NULL) - func_o_method_group_subscribe(v_fs_get_user_data(42), node_id, group_id); - - return buffer_pos; -} - -void verse_send_o_method_create(VNodeID node_id, uint16 group_id, uint16 method_id, const char *name, uint8 param_count, const VNOParamType *param_types, const char * *param_names) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 43); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_create(node_id = %u group_id = %u method_id = %u name = %s param_count = %u param_types = %p param_names = %p );\n", node_id, group_id, method_id, name, param_count, param_types, param_names); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], method_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 512); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], param_count); - { - unsigned int i, j, sum = 1; - for(i = 0; i < param_count; i++) - { - sum += 3; - for(j = 0; param_names[i][j] != 0; j++); - } - if(sum + buffer_pos > 1500) - return; - for(i = 0; i < param_count; i++) - { - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], param_types[i]); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], param_names[i], 1500 - buffer_pos); - } - } - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u || method_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 9); - else - v_cmd_buf_set_address_size(head, 9); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_o_method_destroy(VNodeID node_id, uint16 group_id, uint16 method_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 43); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_destroy(node_id = %u group_id = %u method_id = %u );\n", node_id, group_id, method_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], method_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 512); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], -1); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u || method_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 9); - else - v_cmd_buf_set_address_size(head, 9); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_method_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_method_create)(void *user_data, VNodeID node_id, uint16 group_id, uint16 method_id, const char *name, uint8 param_count, const VNOParamType *param_types, const char * *param_names); - VNodeID node_id; - uint16 group_id; - uint16 method_id; - char name[512]; - uint8 param_count; - const VNOParamType *param_types; - const char * *param_names; - - func_o_method_create = v_fs_get_user_func(43); - if(buffer_length < 8) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &method_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 512, buffer_length - buffer_pos); - if(buffer_length < 1 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], ¶m_count); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_o_method_destroy(node_id = %u group_id = %u method_id = %u ); callback = %p\n", node_id, group_id, method_id, v_fs_get_alias_user_func(43)); - else - printf("receive: verse_send_o_method_create(node_id = %u group_id = %u method_id = %u name = %s param_count = %u ); callback = %p\n", node_id, group_id, method_id, name, param_count, v_fs_get_user_func(43)); -#endif - if(param_count != 255) - { - unsigned int i, size, text = 0; - VNOParamType types[256]; - uint8 t; - char name_buf[1500], *names[256]; - for(i = 0; i < param_count; i++) - { - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &t); - types[i] = t; - names[i] = &name_buf[text]; - size = vnp_raw_unpack_string(&buf[buffer_pos], names[i], 1500 - buffer_pos, buffer_length - buffer_pos); - buffer_pos += size; - text += size; - } - if(func_o_method_create != NULL) - func_o_method_create(v_fs_get_user_data(43), node_id, group_id, method_id, name, param_count, types, (const char **) names); - return buffer_pos; - } - - if(name[0] == 0) - { - void (* alias_o_method_destroy)(void *user_data, VNodeID node_id, uint16 group_id, uint16 method_id); - alias_o_method_destroy = v_fs_get_alias_user_func(43); - if(alias_o_method_destroy != NULL) - alias_o_method_destroy(v_fs_get_alias_user_data(43), node_id, group_id, method_id); - return buffer_pos; - } - if(func_o_method_create != NULL) - func_o_method_create(v_fs_get_user_data(43), node_id, group_id, method_id, name, param_count, param_types, param_names); - - return buffer_pos; -} - -void verse_send_o_method_call(VNodeID node_id, uint16 group_id, uint16 method_id, VNodeID sender, const VNOPackedParams *params) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 44); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_method_call(node_id = %u group_id = %u method_id = %u sender = %u params = %p );\n", node_id, group_id, method_id, sender, params); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], method_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], sender); - { - unsigned int i; - uint16 size; - vnp_raw_unpack_uint16(params, &size); - for(i = 0; i < size; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((uint8 *)params)[i]); - free((void *) params); /* Drop the const. */ - } - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_method_call(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_method_call)(void *user_data, VNodeID node_id, uint16 group_id, uint16 method_id, VNodeID sender, const VNOPackedParams *params); - VNodeID node_id; - uint16 group_id; - uint16 method_id; - VNodeID sender; - const VNOPackedParams *params; - - func_o_method_call = v_fs_get_user_func(44); - if(buffer_length < 12) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &method_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &sender); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_method_call(node_id = %u group_id = %u method_id = %u sender = %u ); callback = %p\n", node_id, group_id, method_id, sender, v_fs_get_user_func(44)); -#endif - { - unsigned int i; - uint8 par[1500]; - uint16 size; - vnp_raw_unpack_uint16(&buf[buffer_pos], &size); - for(i = 0; i < size; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &par[i]); - if(func_o_method_call != NULL) - func_o_method_call(v_fs_get_user_data(44), node_id, group_id, method_id, sender, par); - return buffer_pos; - } - - if(func_o_method_call != NULL) - func_o_method_call(v_fs_get_user_data(44), node_id, group_id, method_id, sender, params); - - return buffer_pos; -} - -void verse_send_o_anim_run(VNodeID node_id, uint16 link_id, uint32 time_s, uint32 time_f, uint8 dimensions, const real64 *pos, const real64 *speed, const real64 *accel, const real64 *scale, const real64 *scale_speed) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 45); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_anim_run(node_id = %u link_id = %u time_s = %u time_f = %u dimensions = %u pos = %p speed = %p accel = %p scale = %p scale_speed = %p );\n", node_id, link_id, time_s, time_f, dimensions, pos, speed, accel, scale, scale_speed); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], link_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_s); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], time_f); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], dimensions); - { - unsigned char mask = 0; - unsigned int cmd, i; - cmd = buffer_pos++; - if(dimensions > 4) - dimensions = 4; - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos[i]); - if(speed != NULL) - { - mask |= 1; - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], speed[i]); - } - if(accel != NULL) - { - mask |= 2; - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], accel[i]); - } - if(scale != NULL) - { - mask |= 3; - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale[i]); - } - if(scale_speed != NULL) - { - mask |= 4; - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], scale_speed[i]); - } - vnp_raw_pack_uint8(&buf[cmd], mask); - } - if(node_id == (uint32) ~0u || link_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_anim_run(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_anim_run)(void *user_data, VNodeID node_id, uint16 link_id, uint32 time_s, uint32 time_f, uint8 dimensions, const real64 *pos, const real64 *speed, const real64 *accel, const real64 *scale, const real64 *scale_speed); - VNodeID node_id; - uint16 link_id; - uint32 time_s; - uint32 time_f; - uint8 dimensions; - const real64 *pos; - const real64 *speed; - const real64 *accel; - const real64 *scale; - const real64 *scale_speed; - - func_o_anim_run = v_fs_get_user_func(45); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &link_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_s); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &time_f); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &dimensions); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_anim_run(node_id = %u link_id = %u time_s = %u time_f = %u dimensions = %u ); callback = %p\n", node_id, link_id, time_s, time_f, dimensions, v_fs_get_user_func(45)); -#endif - { - double output[5][4]; - unsigned int i, j; - char mask, pow = 1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &mask); - if(dimensions > 4) - dimensions = 4; - for(j = 0; j < dimensions; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[0][j]); - for(i = 1; i < 5; i++) - { - if((mask & pow) != 0) - for(j = 0; j < dimensions; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &output[i][j]); - else - for(j = 0; j < dimensions; j++) - output[i][j] = 0; - pow *= 2; - } - if(func_o_anim_run != NULL) - func_o_anim_run(v_fs_get_user_data(45), node_id, link_id, time_s, time_f, dimensions, &output[0][0], &output[1][0], &output[2][0], &output[3][0], &output[4][0]); - return buffer_pos; - } - - if(func_o_anim_run != NULL) - func_o_anim_run(v_fs_get_user_data(45), node_id, link_id, time_s, time_f, dimensions, pos, speed, accel, scale, scale_speed); - - return buffer_pos; -} - -void verse_send_o_hide(VNodeID node_id, uint8 hidden) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 46); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_o_hide(node_id = %u hidden = %u );\n", node_id, hidden); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], hidden); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_o_hide(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_o_hide)(void *user_data, VNodeID node_id, uint8 hidden); - VNodeID node_id; - uint8 hidden; - - func_o_hide = v_fs_get_user_func(46); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &hidden); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_o_hide(node_id = %u hidden = %u ); callback = %p\n", node_id, hidden, v_fs_get_user_func(46)); -#endif - if(func_o_hide != NULL) - func_o_hide(v_fs_get_user_data(46), node_id, hidden); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_s_node.c b/extern/verse/dist/v_gen_pack_s_node.c deleted file mode 100644 index 6a9f4a05a0b..00000000000 --- a/extern/verse/dist/v_gen_pack_s_node.c +++ /dev/null @@ -1,711 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_packet_ack(uint32 packet_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 7); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], packet_id); - v_cmd_buf_set_unique_address_size(head, buffer_pos); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_ack_nak_buf(v_con_get_network_queue(), head); - return; - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_packet_ack(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_packet_ack)(void *user_data, uint32 packet_id); - uint32 packet_id; - - func_packet_ack = v_fs_get_user_func(7); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &packet_id); -#if defined V_PRINT_RECEIVE_COMMANDS -#endif - if(func_packet_ack != NULL) - func_packet_ack(v_fs_get_user_data(7), packet_id); - - return buffer_pos; -} - -void verse_send_packet_nak(uint32 packet_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 8); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], packet_id); - v_cmd_buf_set_unique_address_size(head, buffer_pos); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_ack_nak_buf(v_con_get_network_queue(), head); - return; - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_packet_nak(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_packet_nak)(void *user_data, uint32 packet_id); - uint32 packet_id; - - func_packet_nak = v_fs_get_user_func(8); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &packet_id); -#if defined V_PRINT_RECEIVE_COMMANDS -#endif - if(func_packet_nak != NULL) - func_packet_nak(v_fs_get_user_data(8), packet_id); - - return buffer_pos; -} - -void verse_send_node_index_subscribe(uint32 mask) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 9); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_node_index_subscribe(mask = %u );\n", mask); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], mask); - if(mask == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_node_index_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_node_index_subscribe)(void *user_data, uint32 mask); - uint32 mask; - - func_node_index_subscribe = v_fs_get_user_func(9); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &mask); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_node_index_subscribe(mask = %u ); callback = %p\n", mask, v_fs_get_user_func(9)); -#endif - if(func_node_index_subscribe != NULL) - func_node_index_subscribe(v_fs_get_user_data(9), mask); - - return buffer_pos; -} - -void verse_send_node_create(VNodeID node_id, VNodeType type, VNodeOwner owner) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 10); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_node_create(node_id = %u type = %u owner = %u );\n", node_id, type, owner); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)owner); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_node_destroy(VNodeID node_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 10); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_node_destroy(node_id = %u );\n", node_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_node_create(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_node_create)(void *user_data, VNodeID node_id, VNodeType type, VNodeOwner owner); - VNodeID node_id; - VNodeType type; - VNodeOwner owner; - - func_node_create = v_fs_get_user_func(10); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNodeType)enum_temp; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - owner = (VNodeOwner)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - if(owner == (uint8) ~0u || type >= V_NT_NUM_TYPES) - printf("receive: verse_send_node_destroy(node_id = %u ); callback = %p\n", node_id, v_fs_get_alias_user_func(10)); - else - printf("receive: verse_send_node_create(node_id = %u type = %u owner = %u ); callback = %p\n", node_id, type, owner, v_fs_get_user_func(10)); -#endif - if(owner == (uint8) ~0u || type >= V_NT_NUM_TYPES) - { - void (* alias_node_destroy)(void *user_data, VNodeID node_id); - alias_node_destroy = v_fs_get_alias_user_func(10); - if(alias_node_destroy != NULL) - alias_node_destroy(v_fs_get_alias_user_data(10), node_id); - return buffer_pos; - } - if(func_node_create != NULL) - func_node_create(v_fs_get_user_data(10), node_id, (VNodeType) type, (VNodeOwner) owner); - - return buffer_pos; -} - -void verse_send_node_subscribe(VNodeID node_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 11); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_node_subscribe(node_id = %u );\n", node_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_node_unsubscribe(VNodeID node_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 11); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_node_unsubscribe(node_id = %u );\n", node_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_node_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_node_subscribe)(void *user_data, VNodeID node_id); - VNodeID node_id; - uint8 alias_bool; - - func_node_subscribe = v_fs_get_user_func(11); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_node_unsubscribe(node_id = %u ); callback = %p\n", node_id, v_fs_get_alias_user_func(11)); - else - printf("receive: verse_send_node_subscribe(node_id = %u ); callback = %p\n", node_id, v_fs_get_user_func(11)); -#endif - if(!alias_bool) - { - void (* alias_node_unsubscribe)(void *user_data, VNodeID node_id); - alias_node_unsubscribe = v_fs_get_alias_user_func(11); - if(alias_node_unsubscribe != NULL) - alias_node_unsubscribe(v_fs_get_alias_user_data(11), node_id); - return buffer_pos; - } - if(func_node_subscribe != NULL) - func_node_subscribe(v_fs_get_user_data(11), node_id); - - return buffer_pos; -} - -void verse_send_tag_group_create(VNodeID node_id, uint16 group_id, const char *name) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 16); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_tag_group_create(node_id = %u group_id = %u name = %s );\n", node_id, group_id, name); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_tag_group_destroy(VNodeID node_id, uint16 group_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 16); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_tag_group_destroy(node_id = %u group_id = %u );\n", node_id, group_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_tag_group_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_tag_group_create)(void *user_data, VNodeID node_id, uint16 group_id, const char *name); - VNodeID node_id; - uint16 group_id; - char name[16]; - - func_tag_group_create = v_fs_get_user_func(16); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_tag_group_destroy(node_id = %u group_id = %u ); callback = %p\n", node_id, group_id, v_fs_get_alias_user_func(16)); - else - printf("receive: verse_send_tag_group_create(node_id = %u group_id = %u name = %s ); callback = %p\n", node_id, group_id, name, v_fs_get_user_func(16)); -#endif - if(name[0] == 0) - { - void (* alias_tag_group_destroy)(void *user_data, VNodeID node_id, uint16 group_id); - alias_tag_group_destroy = v_fs_get_alias_user_func(16); - if(alias_tag_group_destroy != NULL) - alias_tag_group_destroy(v_fs_get_alias_user_data(16), node_id, group_id); - return buffer_pos; - } - if(func_tag_group_create != NULL) - func_tag_group_create(v_fs_get_user_data(16), node_id, group_id, name); - - return buffer_pos; -} - -void verse_send_tag_group_subscribe(VNodeID node_id, uint16 group_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 17); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_tag_group_subscribe(node_id = %u group_id = %u );\n", node_id, group_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_tag_group_unsubscribe(VNodeID node_id, uint16 group_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 17); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_tag_group_unsubscribe(node_id = %u group_id = %u );\n", node_id, group_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_tag_group_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_tag_group_subscribe)(void *user_data, VNodeID node_id, uint16 group_id); - VNodeID node_id; - uint16 group_id; - uint8 alias_bool; - - func_tag_group_subscribe = v_fs_get_user_func(17); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_tag_group_unsubscribe(node_id = %u group_id = %u ); callback = %p\n", node_id, group_id, v_fs_get_alias_user_func(17)); - else - printf("receive: verse_send_tag_group_subscribe(node_id = %u group_id = %u ); callback = %p\n", node_id, group_id, v_fs_get_user_func(17)); -#endif - if(!alias_bool) - { - void (* alias_tag_group_unsubscribe)(void *user_data, VNodeID node_id, uint16 group_id); - alias_tag_group_unsubscribe = v_fs_get_alias_user_func(17); - if(alias_tag_group_unsubscribe != NULL) - alias_tag_group_unsubscribe(v_fs_get_alias_user_data(17), node_id, group_id); - return buffer_pos; - } - if(func_tag_group_subscribe != NULL) - func_tag_group_subscribe(v_fs_get_user_data(17), node_id, group_id); - - return buffer_pos; -} - -void verse_send_tag_create(VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 18); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_tag_create(node_id = %u group_id = %u tag_id = %u name = %s type = %u tag = %p );\n", node_id, group_id, tag_id, name, type, tag); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], tag_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - if(type > VN_TAG_BLOB) - { - v_cmd_buf_free(head); - return; - } - switch(type) - { - case VN_TAG_BOOLEAN : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((VNTag *)tag)->vboolean); - break; - case VN_TAG_UINT32 : - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vuint32); - break; - case VN_TAG_REAL64 : - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64); - break; - case VN_TAG_STRING : - { - unsigned int i; - for(i = 0; ((VNTag *)tag)->vstring[i] != 0 && i < VN_TAG_MAX_BLOB_SIZE; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((VNTag *)tag)->vstring[i]); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0); - } - break; - case VN_TAG_REAL64_VEC3 : - { - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64_vec3[0]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64_vec3[1]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], ((VNTag *)tag)->vreal64_vec3[2]); - } - break; - case VN_TAG_LINK : - { - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vlink); - } - break; - case VN_TAG_ANIMATION : - { - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vanimation.curve); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vanimation.start); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], ((VNTag *)tag)->vanimation.end); - } - break; - case VN_TAG_BLOB : - { - unsigned int i; - if(((VNTag *)tag)->vblob.size > VN_TAG_MAX_BLOB_SIZE) - ((VNTag *)tag)->vblob.size = VN_TAG_MAX_BLOB_SIZE; - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], ((VNTag *)tag)->vblob.size); - for(i = 0; i < ((VNTag *)tag)->vblob.size; i++) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], ((uint8 *)((VNTag *)tag)->vblob.blob)[i]); - } - break; - default : - ; - } - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u || tag_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 9); - else - v_cmd_buf_set_address_size(head, 9); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_tag_destroy(VNodeID node_id, uint16 group_id, uint16 tag_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 18); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_tag_destroy(node_id = %u group_id = %u tag_id = %u );\n", node_id, group_id, tag_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], group_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], tag_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)-1); - if(node_id == (uint32) ~0u || group_id == (uint16) ~0u || tag_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 9); - else - v_cmd_buf_set_address_size(head, 9); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_tag_create(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_tag_create)(void *user_data, VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag); - VNodeID node_id; - uint16 group_id; - uint16 tag_id; - char name[16]; - VNTagType type; - const VNTag *tag; - - func_tag_create = v_fs_get_user_func(18); - if(buffer_length < 8) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &group_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &tag_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); - if(buffer_length < 1 + buffer_pos) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNTagType)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - if(type >= VN_TAG_TYPE_COUNT) - printf("receive: verse_send_tag_destroy(node_id = %u group_id = %u tag_id = %u ); callback = %p\n", node_id, group_id, tag_id, v_fs_get_alias_user_func(18)); - else - printf("receive: verse_send_tag_create(node_id = %u group_id = %u tag_id = %u name = %s type = %u ); callback = %p\n", node_id, group_id, tag_id, name, type, v_fs_get_user_func(18)); -#endif - if(type < VN_TAG_TYPE_COUNT) - { - VNTag tag; - unsigned int i; - char string[VN_TAG_MAX_BLOB_SIZE]; - switch(type) - { - case VN_TAG_BOOLEAN : - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &tag.vboolean); - break; - case VN_TAG_UINT32 : - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vuint32); - break; - case VN_TAG_REAL64 : - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64); - break; - case VN_TAG_STRING : - { - tag.vstring = string; - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], string, VN_TAG_MAX_BLOB_SIZE, buffer_length - buffer_pos); - } - break; - case VN_TAG_REAL64_VEC3 : - { - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64_vec3[0]); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64_vec3[1]); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &tag.vreal64_vec3[2]); - } - break; - case VN_TAG_LINK : - { - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vlink); - } - break; - case VN_TAG_ANIMATION : - { - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vanimation.curve); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vanimation.start); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &tag.vanimation.end); - } - break; - case VN_TAG_BLOB : - { - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &tag.vblob.size); - if(tag.vblob.size > VN_TAG_MAX_BLOB_SIZE) - tag.vblob.size = VN_TAG_MAX_BLOB_SIZE; - tag.vblob.blob = string; - for(i = 0; i < tag.vblob.size; i++) - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &string[i]); - } - break; - default : - ; - } - if(func_tag_create != NULL) - func_tag_create(v_fs_get_user_data(18), node_id, group_id, tag_id, name, type, &tag); - return buffer_pos; - } - - if(type >= VN_TAG_TYPE_COUNT) - { - void (* alias_tag_destroy)(void *user_data, VNodeID node_id, uint16 group_id, uint16 tag_id); - alias_tag_destroy = v_fs_get_alias_user_func(18); - if(alias_tag_destroy != NULL) - alias_tag_destroy(v_fs_get_alias_user_data(18), node_id, group_id, tag_id); - return buffer_pos; - } - if(func_tag_create != NULL) - func_tag_create(v_fs_get_user_data(18), node_id, group_id, tag_id, name, (VNTagType) type, tag); - - return buffer_pos; -} - -void verse_send_node_name_set(VNodeID node_id, const char *name) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 19); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_node_name_set(node_id = %u name = %s );\n", node_id, name); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 512); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_node_name_set(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_node_name_set)(void *user_data, VNodeID node_id, const char *name); - VNodeID node_id; - char name[512]; - - func_node_name_set = v_fs_get_user_func(19); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 512, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_node_name_set(node_id = %u name = %s ); callback = %p\n", node_id, name, v_fs_get_user_func(19)); -#endif - if(func_node_name_set != NULL) - func_node_name_set(v_fs_get_user_data(19), node_id, name); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_pack_t_node.c b/extern/verse/dist/v_gen_pack_t_node.c deleted file mode 100644 index 0cfbf8b7f21..00000000000 --- a/extern/verse/dist/v_gen_pack_t_node.c +++ /dev/null @@ -1,226 +0,0 @@ -/* -** This is automatically generated source code -- do not edit. -** Changes are affected either by editing the corresponding protocol -** definition file (v_cmd_def_X.c where X=node type), or by editing -** the code generator itself, in v_cmd_gen.c. -*/ - -#include -#include - -#include "v_cmd_gen.h" -#if !defined(V_GENERATE_FUNC_MODE) -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_util.h" - -void verse_send_t_language_set(VNodeID node_id, const char *language) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 96); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_t_language_set(node_id = %u language = %s );\n", node_id, language); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], language, 512); - if(node_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 5); - else - v_cmd_buf_set_address_size(head, 5); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_t_language_set(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_t_language_set)(void *user_data, VNodeID node_id, const char *language); - VNodeID node_id; - char language[512]; - - func_t_language_set = v_fs_get_user_func(96); - if(buffer_length < 4) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], language, 512, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_t_language_set(node_id = %u language = %s ); callback = %p\n", node_id, language, v_fs_get_user_func(96)); -#endif - if(func_t_language_set != NULL) - func_t_language_set(v_fs_get_user_data(96), node_id, language); - - return buffer_pos; -} - -void verse_send_t_buffer_create(VNodeID node_id, VBufferID buffer_id, const char *name) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 97); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_t_buffer_create(node_id = %u buffer_id = %u name = %s );\n", node_id, buffer_id, name); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], name, 16); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_t_buffer_destroy(VNodeID node_id, VBufferID buffer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 97); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_t_buffer_destroy(node_id = %u buffer_id = %u );\n", node_id, buffer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], NULL, 16); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_t_buffer_create(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_t_buffer_create)(void *user_data, VNodeID node_id, VBufferID buffer_id, const char *name); - VNodeID node_id; - VBufferID buffer_id; - char name[16]; - - func_t_buffer_create = v_fs_get_user_func(97); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &buffer_id); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], name, 16, buffer_length - buffer_pos); -#if defined V_PRINT_RECEIVE_COMMANDS - if(name[0] == 0) - printf("receive: verse_send_t_buffer_destroy(node_id = %u buffer_id = %u ); callback = %p\n", node_id, buffer_id, v_fs_get_alias_user_func(97)); - else - printf("receive: verse_send_t_buffer_create(node_id = %u buffer_id = %u name = %s ); callback = %p\n", node_id, buffer_id, name, v_fs_get_user_func(97)); -#endif - if(name[0] == 0) - { - void (* alias_t_buffer_destroy)(void *user_data, VNodeID node_id, VBufferID buffer_id); - alias_t_buffer_destroy = v_fs_get_alias_user_func(97); - if(alias_t_buffer_destroy != NULL) - alias_t_buffer_destroy(v_fs_get_alias_user_data(97), node_id, buffer_id); - return buffer_pos; - } - if(func_t_buffer_create != NULL) - func_t_buffer_create(v_fs_get_user_data(97), node_id, buffer_id, name); - - return buffer_pos; -} - -void verse_send_t_buffer_subscribe(VNodeID node_id, VBufferID buffer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 98); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_t_buffer_subscribe(node_id = %u buffer_id = %u );\n", node_id, buffer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], TRUE); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_t_buffer_unsubscribe(VNodeID node_id, VBufferID buffer_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_10);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 98); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_t_buffer_unsubscribe(node_id = %u buffer_id = %u );\n", node_id, buffer_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], FALSE); - if(node_id == (uint32) ~0u || buffer_id == (uint16) ~0u) - v_cmd_buf_set_unique_address_size(head, 7); - else - v_cmd_buf_set_address_size(head, 7); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_t_buffer_subscribe(const char *buf, size_t buffer_length) -{ - unsigned int buffer_pos = 0; - void (* func_t_buffer_subscribe)(void *user_data, VNodeID node_id, VBufferID buffer_id); - VNodeID node_id; - VBufferID buffer_id; - uint8 alias_bool; - - func_t_buffer_subscribe = v_fs_get_user_func(98); - if(buffer_length < 6) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &buffer_id); - if(buffer_length < buffer_pos + 1) - return -1; - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &alias_bool); -#if defined V_PRINT_RECEIVE_COMMANDS - if(!alias_bool) - printf("receive: verse_send_t_buffer_unsubscribe(node_id = %u buffer_id = %u ); callback = %p\n", node_id, buffer_id, v_fs_get_alias_user_func(98)); - else - printf("receive: verse_send_t_buffer_subscribe(node_id = %u buffer_id = %u ); callback = %p\n", node_id, buffer_id, v_fs_get_user_func(98)); -#endif - if(!alias_bool) - { - void (* alias_t_buffer_unsubscribe)(void *user_data, VNodeID node_id, VBufferID buffer_id); - alias_t_buffer_unsubscribe = v_fs_get_alias_user_func(98); - if(alias_t_buffer_unsubscribe != NULL) - alias_t_buffer_unsubscribe(v_fs_get_alias_user_data(98), node_id, buffer_id); - return buffer_pos; - } - if(func_t_buffer_subscribe != NULL) - func_t_buffer_subscribe(v_fs_get_user_data(98), node_id, buffer_id); - - return buffer_pos; -} - -#endif - diff --git a/extern/verse/dist/v_gen_unpack_func.h b/extern/verse/dist/v_gen_unpack_func.h deleted file mode 100644 index 462777608c7..00000000000 --- a/extern/verse/dist/v_gen_unpack_func.h +++ /dev/null @@ -1,63 +0,0 @@ -extern unsigned int v_unpack_connect(const char *data, size_t length); -extern unsigned int v_unpack_connect_accept(const char *data, size_t length); -extern unsigned int v_unpack_connect_terminate(const char *data, size_t length); -extern unsigned int v_unpack_ping(const char *data, size_t length); -extern unsigned int v_unpack_packet_ack(const char *data, size_t length); -extern unsigned int v_unpack_packet_nak(const char *data, size_t length); -extern unsigned int v_unpack_node_index_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_node_create(const char *data, size_t length); -extern unsigned int v_unpack_node_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_tag_group_create(const char *data, size_t length); -extern unsigned int v_unpack_tag_group_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_tag_create(const char *data, size_t length); -extern unsigned int v_unpack_node_name_set(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_pos_real32(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_rot_real32(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_scale_real32(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_pos_real64(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_rot_real64(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_scale_real64(const char *data, size_t length); -extern unsigned int v_unpack_o_transform_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_o_light_set(const char *data, size_t length); -extern unsigned int v_unpack_o_link_set(const char *data, size_t length); -extern unsigned int v_unpack_o_method_group_create(const char *data, size_t length); -extern unsigned int v_unpack_o_method_group_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_o_method_create(const char *data, size_t length); -extern unsigned int v_unpack_o_method_call(const char *data, size_t length); -extern unsigned int v_unpack_o_anim_run(const char *data, size_t length); -extern unsigned int v_unpack_o_hide(const char *data, size_t length); -extern unsigned int v_unpack_g_layer_create(const char *data, size_t length); -extern unsigned int v_unpack_g_layer_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_g_vertex_set_xyz_real32(const char *data, size_t length); -extern unsigned int v_unpack_g_vertex_set_xyz_real64(const char *data, size_t length); -extern unsigned int v_unpack_g_vertex_set_uint32(const char *data, size_t length); -extern unsigned int v_unpack_g_vertex_set_real64(const char *data, size_t length); -extern unsigned int v_unpack_g_vertex_set_real32(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_corner_uint32(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_corner_real64(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_corner_real32(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_face_uint8(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_face_uint32(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_face_real64(const char *data, size_t length); -extern unsigned int v_unpack_g_polygon_set_face_real32(const char *data, size_t length); -extern unsigned int v_unpack_g_crease_set_vertex(const char *data, size_t length); -extern unsigned int v_unpack_g_crease_set_edge(const char *data, size_t length); -extern unsigned int v_unpack_g_bone_create(const char *data, size_t length); -extern unsigned int v_unpack_m_fragment_create(const char *data, size_t length); -extern unsigned int v_unpack_b_dimensions_set(const char *data, size_t length); -extern unsigned int v_unpack_b_layer_create(const char *data, size_t length); -extern unsigned int v_unpack_b_layer_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_b_tile_set(const char *data, size_t length); -extern unsigned int v_unpack_t_language_set(const char *data, size_t length); -extern unsigned int v_unpack_t_buffer_create(const char *data, size_t length); -extern unsigned int v_unpack_t_buffer_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_t_text_set(const char *data, size_t length); -extern unsigned int v_unpack_c_curve_create(const char *data, size_t length); -extern unsigned int v_unpack_c_curve_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_c_key_set(const char *data, size_t length); -extern unsigned int v_unpack_a_buffer_create(const char *data, size_t length); -extern unsigned int v_unpack_a_buffer_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_a_block_set(const char *data, size_t length); -extern unsigned int v_unpack_a_stream_create(const char *data, size_t length); -extern unsigned int v_unpack_a_stream_subscribe(const char *data, size_t length); -extern unsigned int v_unpack_a_stream(const char *data, size_t length); diff --git a/extern/verse/dist/v_internal_verse.h b/extern/verse/dist/v_internal_verse.h deleted file mode 100644 index ce838351437..00000000000 --- a/extern/verse/dist/v_internal_verse.h +++ /dev/null @@ -1,2 +0,0 @@ -extern void verse_send_packet_ack(uint32 packet_id); -extern void verse_send_packet_nak(uint32 packet_id); diff --git a/extern/verse/dist/v_man_pack_node.c b/extern/verse/dist/v_man_pack_node.c deleted file mode 100644 index cc85c4383df..00000000000 --- a/extern/verse/dist/v_man_pack_node.c +++ /dev/null @@ -1,498 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "v_cmd_buf.h" -#include "v_network_out_que.h" -#include "v_network.h" -#include "v_connection.h" -#include "v_encryption.h" - -unsigned int v_unpack_connect(const char *buf, unsigned int buffer_length) -{ - return -1; /* this command is illegal to send */ -} - -unsigned int v_unpack_connect_accept(const char *buf, unsigned int buffer_length) -{ - return -1; /* this command is illegal to send */ -} - -extern void v_callback_connect_terminate(const char *bye); - -unsigned int v_unpack_connect_terminate(const char *buf, unsigned int buffer_length) -{ - unsigned int buffer_pos = 0; - char bye[512]; - - buffer_pos = vnp_raw_unpack_string(buf, bye, sizeof bye, buffer_length); - v_callback_connect_terminate(bye); - - return buffer_pos; -} - -static unsigned int pack_b_tile_set_head(VCMDBufHead *head, VNodeID node_id, VLayerID layer_id, uint16 tile_x, uint16 tile_y, uint16 z, VNBLayerType type, const VNBTile *tile) -{ - unsigned int buffer_pos = 0; - uint8 *buf; - buf = ((VCMDBuffer30 *)head)->buf; - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 83); /* Pack the command. */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_b_tile_set(node_id = %u layer_id = %u tile_x = %u tile_y = %u z = %u type = %u tile = %p );\n", node_id, layer_id, tile_x, tile_y, z, type, tile); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], layer_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], tile_x); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], tile_y); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], z); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], (uint8)type); - return buffer_pos; - v_cmd_buf_set_address_size(head, 13); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_b_tile_set(VNodeID node_id, VLayerID layer_id, uint16 tile_x, uint16 tile_y, uint16 z, VNBLayerType type, const VNBTile *tile) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - - switch(type) - { - case VN_B_LAYER_UINT1 : - head = v_cmd_buf_allocate(VCMDBS_30);/* Allocating the buffer */ - buf = ((VCMDBuffer30 *)head)->buf; - buffer_pos += pack_b_tile_set_head(head, node_id, layer_id, tile_x, tile_y, z, type, tile); - buffer_pos += vnp_raw_pack_uint8_vector(&buf[buffer_pos], tile->vuint1, VN_B_TILE_SIZE * VN_B_TILE_SIZE / 8); - break; - case VN_B_LAYER_UINT8 : - head = v_cmd_buf_allocate(VCMDBS_80);/* Allocating the buffer */ - buf = ((VCMDBuffer80 *)head)->buf; - buffer_pos += pack_b_tile_set_head(head, node_id, layer_id, tile_x, tile_y, z, type, tile); - buffer_pos += vnp_raw_pack_uint8_vector(&buf[buffer_pos], tile->vuint8, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - case VN_B_LAYER_UINT16 : - head = v_cmd_buf_allocate(VCMDBS_160);/* Allocating the buffer */ - buf = ((VCMDBuffer160 *)head)->buf; - buffer_pos += pack_b_tile_set_head(head, node_id, layer_id, tile_x, tile_y, z, type, tile); - buffer_pos += vnp_raw_pack_uint16_vector(&buf[buffer_pos], tile->vuint16, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - case VN_B_LAYER_REAL32 : - head = v_cmd_buf_allocate(VCMDBS_320);/* Allocating the buffer */ - buf = ((VCMDBuffer320 *)head)->buf; - buffer_pos += pack_b_tile_set_head(head, node_id, layer_id, tile_x, tile_y, z, type, tile); - buffer_pos += vnp_raw_pack_real32_vector(&buf[buffer_pos], tile->vreal32, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - case VN_B_LAYER_REAL64 : - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - buffer_pos += pack_b_tile_set_head(head, node_id, layer_id, tile_x, tile_y, z, type, tile); - buffer_pos += vnp_raw_pack_real64_vector(&buf[buffer_pos], tile->vreal64, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - default: - head = NULL; - } - v_cmd_buf_set_address_size(head, 13); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_b_tile_set(const char *buf, size_t buffer_length) -{ - uint8 enum_temp; - unsigned int buffer_pos = 0; - void (* func_b_tile_set)(void *user_data, VNodeID node_id, VLayerID layer_id, uint16 tile_x, uint16 tile_y, uint16 z, VNBLayerType type, const VNBTile *tile); - VNodeID node_id; - VLayerID layer_id; - uint16 tile_x; - uint16 tile_y; - uint16 z; - VNBLayerType type; - const VNBTile *tile; - - func_b_tile_set = v_fs_get_user_func(83); - if(buffer_length < 12) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &layer_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &tile_x); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &tile_y); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &z); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &enum_temp); - type = (VNBLayerType)enum_temp; -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_b_tile_set(node_id = %u layer_id = %u tile_x = %u tile_y = %u z = %u type = %u ); callback = %p\n", node_id, layer_id, tile_x, tile_y, z, type, v_fs_get_user_func(83)); -#endif - { - VNBTile tile; - switch(type) - { - case VN_B_LAYER_UINT1 : - buffer_pos += vnp_raw_unpack_uint8_vector(&buf[buffer_pos], tile.vuint1, VN_B_TILE_SIZE * VN_B_TILE_SIZE / 8); - break; - case VN_B_LAYER_UINT8 : - buffer_pos += vnp_raw_unpack_uint8_vector(&buf[buffer_pos], tile.vuint8, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - case VN_B_LAYER_UINT16 : - buffer_pos += vnp_raw_unpack_uint16_vector(&buf[buffer_pos], tile.vuint16, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - case VN_B_LAYER_REAL32 : - buffer_pos += vnp_raw_unpack_real32_vector(&buf[buffer_pos], tile.vreal32, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - case VN_B_LAYER_REAL64 : - buffer_pos += vnp_raw_unpack_real64_vector(&buf[buffer_pos], tile.vreal64, VN_B_TILE_SIZE * VN_B_TILE_SIZE); - break; - } - if(func_b_tile_set != NULL && type <= VN_B_LAYER_REAL64) - func_b_tile_set(v_fs_get_user_data(83), node_id, layer_id, tile_x, tile_y, z, type, &tile); - return buffer_pos; - } - - if(func_b_tile_set != NULL) - func_b_tile_set(v_fs_get_user_data(83), node_id, layer_id, tile_x, tile_y, z, (VNBLayerType)type, tile); - - return buffer_pos; -} - -typedef struct VTempText VTempText; - -struct VTempText { - VNodeID node_id; - VBufferID buffer_id; - uint32 pos; - uint32 length; - uint16 index; - char *text; - VTempText *next; -}; - -typedef struct { - VTempText *text_temp; - uint16 text_send_id; - uint16 text_receive_id; -} VOrderedStorage; - -VOrderedStorage * v_create_ordered_storage(void) -{ - VOrderedStorage *s; - - s = malloc(sizeof *s); - s->text_temp = NULL; - s->text_send_id = 0; - s->text_receive_id = 0; - return s; -} - -void v_destroy_ordered_storage(VOrderedStorage *s) -{ - VTempText *line, *next; - - for(line = s->text_temp; line != NULL; line = next) - { - next = line->next; - if(line->text != NULL) - free(line->text); - free(line); - } - free(s); -} - -void verse_send_t_text_set(VNodeID node_id, VBufferID buffer_id, uint32 pos, uint32 length, const char *text) -{ - uint8 *buf; - VOrderedStorage *s; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 99);/* Packing the command */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_t_text_set(node_id = %u buffer_id = %u pos = %u length = %u text = %s );\n", node_id, buffer_id, pos, length, text); -#endif - s = v_con_get_ordered_storage(); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], buffer_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], pos); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], length); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], s->text_send_id++); - if(text == NULL) - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0); - else - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], text, VN_T_MAX_TEXT_CMD_SIZE); - v_cmd_buf_set_unique_address_size(head, buffer_pos); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -static void call_text_set(VTempText *line) -{ - const char *t; - void (* func_t_text_set)(void *user_data, VNodeID node_id, VBufferID buffer_id, uint32 pos, uint16 length, const char *text); - - func_t_text_set = v_fs_get_user_func(99); -#if defined V_PRINT_RECEIVE_COMMANDS - printf("receive: verse_send_t_text_set(node_id = %u buffer_id = %u pos = %u length = %u text = %s ); callback = %p\n", line->node_id, line->buffer_id, line->pos, line->length, line->text, v_fs_get_user_func(99)); -#endif - if(line->text == NULL) - t = ""; - else - t = line->text; - if(func_t_text_set != NULL) - func_t_text_set(v_fs_get_user_data(99), line->node_id, line->buffer_id, line->pos, line->length, t); -} - -unsigned int v_unpack_t_text_set(const char *buf, size_t buffer_length) -{ - unsigned int i, buffer_pos = 0; - VOrderedStorage *s; - VTempText l, *line, *past = NULL; - char text[1500]; - - if(buffer_length < 12) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &l.node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &l.buffer_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &l.pos); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &l.length); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &l.index); - buffer_pos += vnp_raw_unpack_string(&buf[buffer_pos], text, sizeof text, buffer_length - buffer_pos); - if(text[0] == 0) - l.text = NULL; - else - l.text = text; - s = v_con_get_ordered_storage(); - if(s->text_receive_id == l.index) - { - call_text_set(&l); - s->text_receive_id++; - line = s->text_temp; - while(line != NULL) - { - if(line->index == s->text_receive_id) - { - call_text_set(line); - if(past == NULL) - s->text_temp = line->next; - else - past->next = line->next; - if(line->text != NULL) - free(line->text); - past = NULL; - free(line); - line = s->text_temp; - s->text_receive_id++; - } - else - { - past = line; - line = line->next; - } - } - } - else - { - line = malloc(sizeof *line); - *line = l; - line->next = s->text_temp; - s->text_temp = line; - i = strlen(text); - if(i > 0) - { - line->text = malloc(i + 1); - strcpy(line->text, text); - } - else - line->text = NULL; - } - return buffer_pos; -} - -void verse_send_c_key_set(VNodeID node_id, VLayerID curve_id, uint32 key_id, uint8 dimensions, - const real64 *pre_value, const uint32 *pre_pos, - const real64 *value, real64 pos, - const real64 *post_value, const uint32 *post_pos) -{ - uint8 *buf; - unsigned int i, buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - if(dimensions == 0 || dimensions > 4) - return; - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 130);/* Packing the command */ -#if defined V_PRINT_SEND_COMMANDS - switch(dimensions) - { - case 1: - printf("send: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = %f pre_pos = %u value = %f pos = %f, pre_value = %f pre_pos = %u ); callback = %p\n", node_id, curve_id, key_id, dimensions, pre_value[0], pre_pos[0], value[0], pos, pre_value[0], pre_pos[0], v_fs_get_user_func(130)); - break; - case 2: - printf("sende: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = {%f, %f} pre_pos = {%u, %u} value = {%f, %f} pos = %f, pre_value = {%f, %f} pre_pos = {%u, %u}); callback = %p\n", - node_id, curve_id, key_id, dimensions, - pre_value[0], pre_value[1], - pre_pos[0], pre_pos[1], - value[0], value[1], pos, - pre_value[0], pre_value[1], - pre_pos[0], pre_pos[1], v_fs_get_user_func(130)); - break; - case 3: - printf("send: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = {%f, %f, %f} pre_pos = {%u, %u, %u} value = {%f, %f, %f} pos = %f, pre_value = {%f, %f, %f} pre_pos = {%u, %u, %u}); callback = %p\n", - node_id, curve_id, key_id, dimensions, - pre_value[0], pre_value[1], pre_value[2], - pre_pos[0], pre_pos[1], pre_pos[2], - value[0], value[1], value[2], pos, - pre_value[0], pre_value[1], pre_value[2], - pre_pos[0], pre_pos[1], pre_pos[2], v_fs_get_user_func(130)); - - break; - case 4: - printf("send: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = {%f, %f, %f, %f} pre_pos = {%u, %u, %u, %u} value = {%f, %f, %f, %f} pos = %f, pre_value = {%f, %f, %f, %f} pre_pos = {%u, %u, %u, %u}); callback = %p\n", - node_id, curve_id, key_id, dimensions, - pre_value[0], pre_value[1], pre_value[2], pre_value[3], - pre_pos[0], pre_pos[1], pre_pos[2], pre_pos[3], - value[0], value[1], value[2], value[3], pos, - pre_value[0], pre_value[1], pre_value[2], pre_value[3], - pre_pos[0], pre_pos[1], pre_pos[2], pre_pos[3], v_fs_get_user_func(130)); - break; - } -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], curve_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], key_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], dimensions); - - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pre_value[i]); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], pre_pos[i]); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], value[i]); - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], pos); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], post_value[i]); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], post_pos[i]); - - if(key_id == (uint32) ~0u) - v_cmd_buf_set_unique_address_size(head, 11); - else - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -void verse_send_c_key_destroy(VNodeID node_id, VLayerID curve_id, uint32 key_id) -{ - uint8 *buf; - unsigned int buffer_pos = 0; - VCMDBufHead *head; - head = v_cmd_buf_allocate(VCMDBS_1500);/* Allocating the buffer */ - buf = ((VCMDBuffer10 *)head)->buf; - - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 130);/* Packing the command */ -#if defined V_PRINT_SEND_COMMANDS - printf("send: verse_send_c_key_destroy(node_id = %u curve_id = %u key_id = %u );\n", node_id, curve_id, key_id); -#endif - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], node_id); - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], curve_id); - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], key_id); - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], 0); - v_cmd_buf_set_address_size(head, 11); - v_cmd_buf_set_size(head, buffer_pos); - v_noq_send_buf(v_con_get_network_queue(), head); -} - -unsigned int v_unpack_c_key_set(const char *buf, size_t buffer_length) -{ - unsigned int i, buffer_pos = 0; - VNodeID node_id; - VLayerID curve_id; - uint32 key_id; - uint8 dimensions; - real64 pre_value[4], value[4], pos, post_value[4]; - uint32 post_pos[4], pre_pos[4]; - - if(buffer_length < 11) - return -1; - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &node_id); - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], &curve_id); - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &key_id); - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], &dimensions); - if(dimensions != 0 && dimensions < 5) - { - void (* func_c_key_set)(void *user_data, VNodeID node_id, VLayerID curve_id, uint32 key_id, uint8 dimensions, real64 *pre_value, uint32 *pre_pos, real64 *value, real64 pos, real64 *post_value, uint32 *post_pos); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &pre_value[i]); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &pre_pos[i]); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &value[i]); - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &pos); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &post_value[i]); - for(i = 0; i < dimensions; i++) - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &post_pos[i]); - #if defined V_PRINT_RECEIVE_COMMANDS - switch(dimensions) - { - case 1: - printf("receive: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = %f pre_pos = %u value = %f pos = %f, pre_value = %f pre_pos = %u ); callback = %p\n", node_id, curve_id, key_id, dimensions, pre_value[0], pre_pos[0], value[0], pos, pre_value[0], pre_pos[0], v_fs_get_user_func(130)); - break; - case 2: - printf("receive: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = {%f, %f} pre_pos = {%u, %u} value = {%f, %f} pos = %f, pre_value = {%f, %f} pre_pos = {%u, %u}); callback = %p\n", - node_id, curve_id, key_id, dimensions, - pre_value[0], pre_value[1], - pre_pos[0], pre_pos[1], - value[0], value[1], pos, - pre_value[0], pre_value[1], - pre_pos[0], pre_pos[1], v_fs_get_user_func(130)); - break; - case 3: - printf("receive: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = {%f, %f, %f} pre_pos = {%u, %u, %u} value = {%f, %f, %f} pos = %f, pre_value = {%f, %f, %f} pre_pos = {%u, %u, %u}); callback = %p\n", - node_id, curve_id, key_id, dimensions, - pre_value[0], pre_value[1], pre_value[2], - pre_pos[0], pre_pos[1], pre_pos[2], - value[0], value[1], value[2], pos, - pre_value[0], pre_value[1], pre_value[2], - pre_pos[0], pre_pos[1], pre_pos[2], v_fs_get_user_func(130)); - - break; - case 4: - printf("receive: verse_send_c_key_set(node_id = %u curve_id = %u key_id = %u dimensions = %u pre_value = {%f, %f, %f, %f} pre_pos = {%u, %u, %u, %u} value = {%f, %f, %f, %f} pos = %f, pre_value = {%f, %f, %f, %f} pre_pos = {%u, %u, %u, %u}); callback = %p\n", - node_id, curve_id, key_id, dimensions, - pre_value[0], pre_value[1], pre_value[2], pre_value[3], - pre_pos[0], pre_pos[1], pre_pos[2], pre_pos[3], - value[0], value[1], value[2], value[3], pos, - pre_value[0], pre_value[1], pre_value[2], pre_value[3], - pre_pos[0], pre_pos[1], pre_pos[2], pre_pos[3], v_fs_get_user_func(130)); - break; - } - #endif - func_c_key_set = v_fs_get_user_func(130); - if(func_c_key_set != NULL) - func_c_key_set(v_fs_get_user_data(130), node_id, curve_id, key_id, dimensions, pre_value, pre_pos, value, pos, post_value, post_pos); - return buffer_pos; - }else - { - void (* alias_c_key_destroy)(void *user_data, VNodeID node_id, VLayerID curve_id, uint32 key_id); - alias_c_key_destroy = v_fs_get_alias_user_func(130); - printf("receive: verse_send_c_key_destroy(node_id = %u curve_id = %u key_id = %u); callback = %p\n", node_id, curve_id, key_id, alias_c_key_destroy); - if(alias_c_key_destroy != NULL) - alias_c_key_destroy(v_fs_get_alias_user_data(130), node_id, curve_id, key_id); - return buffer_pos; - } -} - -#endif diff --git a/extern/verse/dist/v_network.c b/extern/verse/dist/v_network.c deleted file mode 100644 index 408cc20e393..00000000000 --- a/extern/verse/dist/v_network.c +++ /dev/null @@ -1,274 +0,0 @@ -/* -** -*/ - -#if defined _WIN32 -#include -typedef unsigned int uint; -typedef SOCKET VSocket; -#else -typedef int VSocket; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif -#include -#include - -typedef unsigned int uint32; -typedef int int32; -typedef unsigned short uint16; -typedef short int16; -typedef unsigned char uint8; -typedef char int8; -typedef unsigned char boolean; - -#include "v_cmd_gen.h" -#include "v_network.h" - -#if !defined socklen_t -#define socklen_t int -#endif - -#define TRUE 1 -#define FALSE 0 - -typedef struct{ - struct sockaddr_in address; - struct hostent *he; -} VNetworkConnection; - -#define VERSE_STD_CONNECT_TO_PORT 4950 - -static VSocket my_socket = -1; -static uint16 my_port = 0; - -void v_n_set_port(unsigned short port) -{ - my_port = port; -} - -VSocket v_n_socket_create(void) -{ - static boolean initialized = FALSE; - struct sockaddr_in address; - int buffer_size = 1 << 20; - - if(my_socket != -1) - return my_socket; -#if defined _WIN32 - if(!initialized) - { - WSADATA wsaData; - - if(WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) - { - fprintf(stderr, "WSAStartup failed.\n"); - exit(1); - } - - } -#endif - initialized = TRUE; - if((my_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) - return -1; -#if defined _WIN32 - { - unsigned long one = 1UL; - if(ioctlsocket(my_socket, FIONBIO, &one) != 0) - return -1; - } -#else - if(fcntl(my_socket, F_SETFL, O_NONBLOCK) != 0) - { - fprintf(stderr, "v_network: Couldn't make socket non-blocking\n"); - return -1; - } -#endif - address.sin_family = AF_INET; /* host byte order */ - address.sin_port = htons(my_port); /* short, network byte order */ - address.sin_addr.s_addr = INADDR_ANY; - if(bind(my_socket, (struct sockaddr *) &address, sizeof(struct sockaddr)) != 0) - { - fprintf(stderr, "v_network: Failed to bind(), code %d (%s)\n", errno, strerror(errno)); - exit(0); /* FIX ME */ - } - if(setsockopt(my_socket, SOL_SOCKET, SO_SNDBUF, (const char *) &buffer_size, sizeof buffer_size) != 0) - fprintf(stderr, "v_network: Couldn't set send buffer size of socket to %d\n", buffer_size); - if(setsockopt(my_socket, SOL_SOCKET, SO_RCVBUF, (const char *) &buffer_size, sizeof buffer_size) != 0) - fprintf(stderr, "v_network: Couldn't set receive buffer size of socket to %d\n", buffer_size); - return my_socket; -} - -void v_n_socket_destroy(void) -{ -#if defined _WIN32 - closesocket(my_socket); -#else - close(my_socket); -#endif - my_socket = -1; -} - -boolean v_n_set_network_address(VNetworkAddress *address, const char *host_name) -{ - struct hostent *he; - char *colon = NULL, *buf = NULL; - boolean ok = FALSE; - - v_n_socket_create(); - address->port = VERSE_STD_CONNECT_TO_PORT; - /* If a port number is included, as indicated by a colon, we need to work a bit more. */ - if((colon = strchr(host_name, ':')) != NULL) - { - size_t hl = strlen(host_name); - - if((buf = malloc(hl + 1)) != NULL) - { - unsigned int tp; - - strcpy(buf, host_name); - colon = buf + (colon - host_name); - *colon = '\0'; - host_name = buf; - if(sscanf(colon + 1, "%u", &tp) == 1) - { - address->port = (unsigned short) tp; - if(address->port != tp) /* Protect against overflow. */ - host_name = NULL; - } - else - host_name = NULL; /* Protect against parse error. */ - } - else - return FALSE; - } - if(host_name != NULL && (he = gethostbyname(host_name)) != NULL) - { - memcpy(&address->ip, he->h_addr_list[0], he->h_length); - address->ip = ntohl(address->ip); - ok = TRUE; - } - if(buf != NULL) - free(buf); - - return ok; -} - -int v_n_send_data(VNetworkAddress *address, const char *data, size_t length) -{ - struct sockaddr_in address_in; - VSocket sock; - int ret; - - if((sock = v_n_socket_create()) == -1 || length == 0) - return 0; - address_in.sin_family = AF_INET; /* host byte order */ - address_in.sin_port = htons(address->port); /* short, network byte order */ - address_in.sin_addr.s_addr = htonl(address->ip); - memset(&address_in.sin_zero, 0, sizeof address_in.sin_zero); - ret = sendto(sock, data, length, 0, (struct sockaddr *) &address_in, sizeof(struct sockaddr_in)); - if(ret < 0) - fprintf(stderr, "Socket sendto() of %u bytes failed, code %d (%s)\n", (unsigned int) length, errno, strerror(errno)); - return ret; -} - -#if !defined V_GENERATE_FUNC_MODE - -extern void *v_con_get_network_address_id(unsigned int id); -extern unsigned int v_con_get_network_address_count(); - -unsigned int v_n_wait_for_incoming(unsigned int microseconds) -{ - struct timeval tv; - fd_set fd_select; - unsigned int s1, f1, s2, f2; - - if(microseconds == 0) - return 0; - v_n_socket_create(); - tv.tv_sec = microseconds / 1000000; - tv.tv_usec = microseconds % 1000000; - FD_ZERO(&fd_select); - FD_SET(my_socket, &fd_select); - v_n_get_current_time(&s1, &f1); - select(1, &fd_select, NULL, NULL, &tv); - v_n_get_current_time(&s2, &f2); - return (unsigned int) (1000000 * (s2 - s1) + (1000000.0 / 0xffffffffu) * (long) (f2 - f1)); /* Must cast to (long) for f1 > f2 case! */ -} - -#endif - -int v_n_receive_data(VNetworkAddress *address, char *data, size_t length) -{ - struct sockaddr_in address_in; - socklen_t from_length = sizeof address_in; - size_t len; - - if(v_n_socket_create() == -1) - return 0; - memset(&address_in, 0, sizeof address_in); - address_in.sin_family = AF_INET; - address_in.sin_port = htons(my_port); - address_in.sin_addr.s_addr = INADDR_ANY; - len = recvfrom(v_n_socket_create(), data, length, 0, (struct sockaddr *) &address_in, &from_length); - if(len > 0) - { - address->ip = ntohl(address_in.sin_addr.s_addr); - address->port = ntohs(address_in.sin_port); - } - return len; -} - -#if defined _WIN32 - -void v_n_get_current_time(uint32 *seconds, uint32 *fractions) -{ - static LARGE_INTEGER frequency; - static boolean init = FALSE; - LARGE_INTEGER counter; - - if(!init) - { - init = TRUE; - QueryPerformanceFrequency(&frequency); - } - - QueryPerformanceCounter(&counter); - if(seconds != NULL) - *seconds = (uint32) (counter.QuadPart / frequency.QuadPart); - if(fractions != NULL) - *fractions = (uint32) ((0xffffffffUL * (counter.QuadPart % frequency.QuadPart)) / frequency.QuadPart); -} - -#else - -void v_n_get_current_time(uint32 *seconds, uint32 *fractions) -{ - struct timeval tv; - - gettimeofday(&tv, NULL); - if(seconds != NULL) - *seconds = tv.tv_sec; - if(fractions != NULL) - *fractions = tv.tv_usec * 1E-6 * (double) (uint32)~0; -} - -#endif - -void v_n_get_address_string(const VNetworkAddress *address, char *string) -{ - sprintf(string, "%u.%u.%u.%u:%u", address->ip >> 24, (address->ip >> 16) & 0xff, - (address->ip >> 8) & 0xff, address->ip & 0xff, address->port); -} diff --git a/extern/verse/dist/v_network.h b/extern/verse/dist/v_network.h deleted file mode 100644 index 52233cbe2bb..00000000000 --- a/extern/verse/dist/v_network.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -** -*/ - -#if !defined V_NETWORK_H -#define V_NETWORK_H - -#define VERSE_STD_CONNECT_PORT 4950 - -typedef struct{ - unsigned int ip; - unsigned short port; -}VNetworkAddress; - -extern void v_n_set_port(unsigned short port); -extern unsigned int v_n_wait_for_incoming(unsigned int microseconds); -extern boolean v_n_set_network_address(VNetworkAddress *address, const char *host_name); -extern int v_n_send_data(VNetworkAddress *address, const char *data, size_t length); -extern int v_n_receive_data(VNetworkAddress *address, char *data, size_t length); -extern void v_n_get_address_string(const VNetworkAddress *address, char *string); - -extern void v_n_get_current_time(unsigned int *seconds, unsigned int *fractions); - -#endif /* V_NETWORK_H */ diff --git a/extern/verse/dist/v_network_in_que.c b/extern/verse/dist/v_network_in_que.c deleted file mode 100644 index d99a4ad11ec..00000000000 --- a/extern/verse/dist/v_network_in_que.c +++ /dev/null @@ -1,140 +0,0 @@ - -#include -#include -#include - -#include "verse_header.h" - -#include "v_cmd_buf.h" -#include "v_cmd_gen.h" -#include "v_connection.h" -#include "v_internal_verse.h" -#include "v_network.h" -#include "v_pack.h" - - -#if !defined(V_GENERATE_FUNC_MODE) - -#include "v_network_in_que.h" - -static VNetInPacked *v_niq_temp = NULL; - -void v_niq_clear(VNetInQueue *queue) -{ - queue->oldest = NULL; - queue->newest = NULL; - queue->packet_id = 2; - v_niq_timer_update(queue); -} - -/* Set queue's last-used timestamp to "now". */ -void v_niq_timer_update(VNetInQueue *queue) -{ - v_n_get_current_time(&queue->seconds, &queue->fractions); - queue->acc_seconds = queue->acc_fractions = 0; -} - -uint32 v_niq_time_out(VNetInQueue *queue) -{ - uint32 fractions, f; - - /* Magic code to disregard if the clock moves forward more than one second at a time. - * This should help keep Verse alive on e.g. a notebook that is suspended. - */ - v_n_get_current_time(NULL, &fractions); - if(fractions < queue->fractions) - f = 0xffffffffu - queue->fractions + fractions; - else - f = fractions - queue->fractions; -/* printf("now=%u last=%u -> f=%u\n", fractions, queue->fractions, f);*/ - if(queue->acc_fractions + f < queue->acc_fractions) - queue->acc_seconds += 1; - queue->acc_fractions += f; - queue->fractions = fractions; - -/* printf("queue at %p has seconds=%u, now=%u -> diff=%u\n", queue, queue->seconds, seconds, seconds - queue->seconds);*/ - return queue->acc_seconds; -} - -VNetInPacked * v_niq_get(VNetInQueue *queue, size_t *length) -{ - VNetInPacked *p; - - if(queue->oldest == NULL) - { - *length = 0; - return NULL; - } - /* pop oldest package */ - p = queue->oldest; - queue->oldest = p->newer; - if(queue->oldest == NULL) - queue->newest = NULL; - else - ((VNetInPacked *)queue->oldest)->older = NULL; - *length = p->size; - - return p; -} - -unsigned int v_niq_free(VNetInQueue *queue) -{ - unsigned int i; - size_t length; - - for(i = 0; v_niq_get(queue, &length) != NULL; i++) - ; - return i; -} - -void v_niq_release(VNetInQueue *queue, VNetInPacked *p) -{ - /* push on v_niq_temp for re-use */ - p->older = v_niq_temp; - v_niq_temp = p; -} - -char *v_niq_store(VNetInQueue *queue, size_t length, unsigned int packet_id) -{ - VNetInPacked *p; - - v_niq_timer_update(queue); - - if(packet_id < queue->packet_id) - return NULL; - - while(queue->packet_id != packet_id) - { - verse_send_packet_nak(queue->packet_id++); - if(queue->packet_id == 0) - queue->packet_id++; - } - queue->packet_id++; - if(queue->packet_id == 0) - queue->packet_id++; - verse_send_packet_ack(packet_id); - - if(v_niq_temp == NULL) - p = malloc(sizeof *p); - else - { - /* pop off v_niq_temp */ - p = v_niq_temp; - v_niq_temp = p->older; - } - /* push as newest */ - p->older = queue->newest; - p->newer = NULL; - - if(queue->newest == NULL) - queue->oldest = p; - else - ((VNetInPacked *)queue->newest)->newer = p; - queue->newest = p; - - p->size = length; - - return p->data; -} - -#endif diff --git a/extern/verse/dist/v_network_in_que.h b/extern/verse/dist/v_network_in_que.h deleted file mode 100644 index 9241fe18fe8..00000000000 --- a/extern/verse/dist/v_network_in_que.h +++ /dev/null @@ -1,24 +0,0 @@ - -typedef struct{ - void *oldest; - void *newest; - uint32 packet_id; - uint32 seconds, fractions; /* Current time. */ - uint32 acc_seconds, acc_fractions; /* Accumulated time. */ -}VNetInQueue; - -typedef struct{ - void *newer; - void *older; - char data[1500]; - size_t size; -}VNetInPacked; - -extern void v_niq_clear(VNetInQueue *queue); -extern void v_niq_timer_update(VNetInQueue *queue); - -extern VNetInPacked * v_niq_get(VNetInQueue *queue, size_t *length); -extern void v_niq_release(VNetInQueue *queue, VNetInPacked *p); -extern char * v_niq_store(VNetInQueue *queue, size_t length, unsigned int packet_id); -unsigned int v_niq_free(VNetInQueue *queue); -extern uint32 v_niq_time_out(VNetInQueue *queue); diff --git a/extern/verse/dist/v_network_out_que.c b/extern/verse/dist/v_network_out_que.c deleted file mode 100644 index 10126a59779..00000000000 --- a/extern/verse/dist/v_network_out_que.c +++ /dev/null @@ -1,396 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "verse_header.h" - -#include "v_cmd_buf.h" -#include "v_cmd_gen.h" -#include "v_connection.h" -#include "v_network.h" -#include "v_pack.h" -#include "v_encryption.h" -#include "v_network_out_que.h" -#include "v_util.h" - -#if !defined(V_GENERATE_FUNC_MODE) - -#define STD_QUE_SIZE 64 - -#define V_NOQ_OPTIMIZATION_SLOTS 2048 - -#define V_NOQ_WINDOW_SIZE 100000 -#define V_NOQ_MAX_SORTED_COMMANDS 5000 - -typedef struct{ - void *next; - char *data; - size_t size; -} NetPacked; - -struct VNetOutQueue{ - uint8 packet_buffer[V_NOQ_MAX_PACKET_SIZE]; - size_t packet_buffer_use; - NetPacked *packed; - NetPacked *last; - VCMDBufHead *unsent[V_NOQ_OPTIMIZATION_SLOTS]; - VCMDBufHead *history[V_NOQ_OPTIMIZATION_SLOTS]; - VCMDBufHead *ack_nak; - VCMDBufHead *unsorted; - VCMDBufHead *unsorted_end; - uint32 unsorted_count; /* debug only */ - uint32 unsent_comands; - size_t unsent_size; - size_t sent_size; - unsigned int packet_id; - unsigned int slot; - uint32 seconds; - uint32 fractions; -}; - -size_t verse_session_get_size(void) -{ - const VNetOutQueue *queue; - - queue = v_con_get_network_queue(); - return queue->unsent_size + queue->sent_size; -} - -VNetOutQueue * v_noq_create_network_queue(void) -{ - VNetOutQueue *queue; - unsigned int i; - - queue = malloc(sizeof *queue); - for(i = 0; i < V_NOQ_OPTIMIZATION_SLOTS; i++) - { - queue->unsent[i] = NULL; - queue->history[i] = NULL; - } - queue->unsent_comands = 0; - queue->unsent_size = 0; - queue->sent_size = 0; - queue->packet_id = 2; - queue->slot = 0; - queue->packed = NULL; - queue->last = NULL; - queue->ack_nak = NULL; - queue->unsorted = NULL; - queue->unsorted_end = NULL; - queue->unsorted_count = 0; - queue->packet_buffer_use = 0; - v_n_get_current_time(&queue->seconds, &queue->fractions); - return queue; -} - -unsigned int v_noq_get_next_out_packet_id(VNetOutQueue *queue) -{ - queue->packet_id++; - if(queue->packet_id == 0) - queue->packet_id++; - return queue->packet_id; -} - -void v_noq_destroy_network_queue(VNetOutQueue *queue) -{ - VCMDBufHead *buf, *b; - unsigned int i; - for(i = 0; i < V_NOQ_OPTIMIZATION_SLOTS; i++) - { - for(buf = queue->history[i]; buf != NULL; buf = b) - { - b = buf->next; - v_cmd_buf_free(buf); - } - for(buf = queue->unsent[i]; buf != NULL; buf = b) - { - b = buf->next; - v_cmd_buf_free(buf); - } - } - for(buf = queue->unsorted; buf != NULL; buf = b) - { - b = buf->next; - v_cmd_buf_free(buf); - } - free(queue); -} - - -void v_noq_sort_and_collapse_buf(VNetOutQueue *queue, VCMDBufHead *buf) -{ - VCMDBufHead *b, *last = NULL; - unsigned int slot; - - slot = buf->address_sum % V_NOQ_OPTIMIZATION_SLOTS; - queue->unsent_size += buf->size; - queue->unsent_comands++; - if(queue->unsent[slot] != NULL) - { - for(b = queue->unsent[slot]; !v_cmd_buf_compare(buf, b) && b->next != NULL; b = b->next) - last = b; - if(v_cmd_buf_compare(buf, b)) /* found a command to replace */ - { - queue->unsent_size -= b->size; - queue->unsent_comands--; - if(last != NULL) /* if its not the first */ - last->next = buf; - else - queue->unsent[slot] = buf; - buf->next = b->next; - v_cmd_buf_free(b); - }else /* inserting the command last in queue */ - { - buf->next = NULL; - b->next = buf; - } - }else /* inserting the first command */ - { - queue->unsent[slot] = buf; - buf->next = NULL; - } - if(queue->history[slot] != NULL) /* if there is a history clear it from any commnds with same address */ - { - last = NULL; - for(b = queue->history[slot]; b != NULL && !v_cmd_buf_compare(buf, b); b = b->next) - last = b; - if(b != NULL) /* found a command to replace */ - { - if(last == NULL) - queue->history[slot] = b->next; - else - last->next = b->next; - queue->sent_size -= b->size; - v_cmd_buf_free(b); - } - } -} - -void v_noq_send_buf(VNetOutQueue *queue, VCMDBufHead *buf) -{ - static int count = 0; -/* if(queue->unsent_comands > V_NOQ_MAX_SORTED_COMMANDS) - { - -*/ if(queue->unsorted == NULL) - { - queue->unsorted_end = buf; - queue->unsorted = buf; - }else - { - queue->unsorted_end->next = buf; - queue->unsorted_end = buf; - } - queue->unsorted_count++; -/* }else - v_noq_sort_and_colapse_buf(queue, buf); -*/ count = (count + 1) % 30; - if(count == 0) - { - v_con_network_listen(); - v_noq_send_queue(queue, v_con_get_network_address()); - } -} - -void v_noq_sort_unsorted(VNetOutQueue *queue) -{ - VCMDBufHead *buf; - - while(queue->unsent_comands < V_NOQ_MAX_SORTED_COMMANDS && queue->unsorted != NULL) - { - buf = queue->unsorted; - if(queue->unsorted == queue->unsorted_end) - { - queue->unsorted_end = NULL; - queue->unsorted = NULL; - }else - { - queue->unsorted = buf->next; - buf->next = NULL; - } - queue->unsorted_count--; - v_noq_sort_and_collapse_buf(queue, buf); - } -} - -boolean v_noq_send_queue(VNetOutQueue *queue, void *address) -{ - static unsigned int my_counter = 0; - VCMDBufHead *buf; - unsigned int size; - uint8 *data; - uint32 seconds, fractions; - double delta; - - data = queue->packet_buffer; - v_n_get_current_time(&seconds, &fractions); - delta = seconds - queue->seconds + (fractions - queue->fractions) / (double) 0xffffffff; - - if(queue->unsorted != NULL) - v_noq_sort_unsorted(queue); - - if(queue->unsent_size == 0 && delta < 1.0 && (queue->ack_nak == NULL || queue->ack_nak->next == NULL)) - return FALSE; - - if(delta > 3.0 && queue->unsent_size == 0 && queue->ack_nak == NULL && queue->packet_buffer_use != 0) - { -/* printf("A) re-sending last delta=%g\n", delta);*/ - v_n_send_data(address, data, queue->packet_buffer_use); - queue->seconds = seconds; - queue->fractions = fractions; - return TRUE; - } - - size = 4; - buf = queue->ack_nak; - while(buf != NULL && size + buf->size < V_NOQ_MAX_PACKET_SIZE) - { - vnp_raw_pack_uint32(data, queue->packet_id); - queue->ack_nak = buf->next; - buf->next = queue->history[queue->slot]; - queue->history[queue->slot] = buf; - buf->packet = queue->packet_id; - v_e_data_encrypt_command(data, size, ((VCMDBuffer1500 *)buf)->buf, buf->size, v_con_get_data_key()); - size += buf->size; - queue->sent_size += buf->size; - buf = queue->ack_nak; - } - if(queue->unsent_size == 0 || queue->sent_size >= V_NOQ_WINDOW_SIZE) - { - if(size > 5) - { -/* printf("ACK: sending actual size=%u id=%u\n", size, queue->packet_id);*/ - v_n_send_data(address, data, size); - queue->packet_buffer_use = size; - queue->seconds = seconds; - queue->fractions = fractions; - queue->packet_id++; - return TRUE; - } -/* printf("returning FALSE from send_queue()\n");*/ - return FALSE; - } -/* if(queue->sent_size < V_NOQ_WINDOW_SIZE && queue->unsent_size != 0)*/ - { - vnp_raw_pack_uint32(data, queue->packet_id); - while(queue->unsent_size != 0) - { - queue->slot = ((1 + queue->slot) % V_NOQ_OPTIMIZATION_SLOTS); - buf = queue->unsent[queue->slot]; - if(buf != NULL) - { - if(buf->size + size > V_NOQ_MAX_PACKET_SIZE) - break; - queue->unsent[queue->slot] = buf->next; - buf->next = queue->history[queue->slot]; - queue->history[queue->slot] = buf; - buf->packet = queue->packet_id; - - v_e_data_encrypt_command(data, size, ((VCMDBuffer1500 *)buf)->buf, buf->size, v_con_get_data_key()); - size += buf->size; - queue->unsent_comands--; - queue->unsent_size -= buf->size; - queue->sent_size += buf->size; - my_counter++; - } - } - v_n_send_data(address, data, size); - queue->packet_buffer_use = size; - queue->packet_id++; -/* size = vnp_raw_pack_uint32(data, queue->packet_id);*/ - queue->seconds = seconds; - queue->fractions = fractions; - } - return TRUE; -} - -void v_noq_send_ack_nak_buf(VNetOutQueue *queue, VCMDBufHead *buf) -{ - buf->next = queue->ack_nak; - queue->ack_nak = buf; -} - -void callback_send_packet_ack(void *user, uint32 packet_id) -{ - VNetOutQueue *queue; - VCMDBufHead *buf, *last; - unsigned int slot; - - queue = v_con_get_network_queue(); - for(slot = 0; slot < V_NOQ_OPTIMIZATION_SLOTS; slot++) - { - last = NULL; - for(buf = queue->history[slot]; buf != NULL && buf->packet != packet_id; buf = buf->next) - last = buf; - - if(buf != NULL) - { - if(last == NULL) - { - while(queue->history[slot] != NULL && queue->history[slot]->packet == packet_id) - { - queue->sent_size -= queue->history[slot]->size; - buf = queue->history[slot]->next; - v_cmd_buf_free(queue->history[slot]); - queue->history[slot] = buf; - } - }else - { - for(; buf != NULL && buf->packet == packet_id; buf = last->next) - { - queue->sent_size -= buf->size; - last->next = buf->next; - v_cmd_buf_free(buf); - } - } - } - } -} - -void callback_send_packet_nak(void *user, uint32 packet_id) -{ - VNetOutQueue *queue; - VCMDBufHead *buf, *last; - unsigned int slot; - - queue = v_con_get_network_queue(); - for(slot = 0; slot < V_NOQ_OPTIMIZATION_SLOTS; slot++) - { - last = NULL; - for(buf = queue->history[slot]; buf != NULL && buf->packet != packet_id; buf = buf->next) - last = buf; - if(buf != NULL) - { - if(last == NULL) - { - for(; queue->history[slot] != NULL && queue->history[slot]->packet == packet_id; queue->history[slot] = buf) - { - queue->unsent_comands++; - queue->unsent_size += queue->history[slot]->size; - queue->sent_size -= queue->history[slot]->size; - buf = queue->history[slot]->next; - queue->history[slot]->next = queue->unsent[slot]; - queue->unsent[slot] = queue->history[slot]; - } - }else - { - for(; last->next != NULL && ((VCMDBufHead *)last->next)->packet == packet_id;) - { - queue->unsent_comands++; - queue->unsent_size += ((VCMDBufHead *)last->next)->size; - queue->sent_size -= ((VCMDBufHead *)last->next)->size; - buf = last->next; - last->next = buf->next; - buf->next = queue->unsent[slot]; - queue->unsent[slot] = buf; - } - } - } - } -} - -#endif diff --git a/extern/verse/dist/v_network_out_que.h b/extern/verse/dist/v_network_out_que.h deleted file mode 100644 index 6746475e84f..00000000000 --- a/extern/verse/dist/v_network_out_que.h +++ /dev/null @@ -1,17 +0,0 @@ -/* -** -*/ - -typedef struct VNetOutQueue VNetOutQueue; - -extern VNetOutQueue * v_noq_create_network_queue(void); -extern void v_noq_destroy_network_queue(VNetOutQueue *queue); -extern void v_noq_send_buf(VNetOutQueue *queue, VCMDBufHead *buf); -extern void v_noq_send_ack_nak_buf(VNetOutQueue *queue, VCMDBufHead *buf); - -extern void v_noq_send_ack(VNetOutQueue *queue, unsigned int id); -extern void v_noq_send_nak(VNetOutQueue *queue, unsigned int id); - -extern boolean v_noq_send_queue(VNetOutQueue *queue, void *address); - -extern unsigned int v_noq_get_next_out_packet_id(VNetOutQueue *queue); diff --git a/extern/verse/dist/v_pack.c b/extern/verse/dist/v_pack.c deleted file mode 100644 index f521360b11f..00000000000 --- a/extern/verse/dist/v_pack.c +++ /dev/null @@ -1,386 +0,0 @@ -/* -** v_pack.c -** -** These functions are used to pack and unpack various quantities to/from network -** packet buffers. They do not care about alignment, operating at byte level internally. -** The external byte-ordering used is big-endian (aka "network byte order") for all -** quantities larger than a single byte. -*/ - -#include -#include -#include - -#include "v_pack.h" - -size_t vnp_raw_pack_uint8(void *buffer, uint8 data) -{ - *(uint8 *) buffer = data; - - return sizeof data; -} - -size_t vnp_raw_unpack_uint8(const void *buffer, uint8 *data) -{ - *data = *(uint8 *) buffer; - - return sizeof *data; -} - -size_t vnp_raw_pack_uint8_vector(void *buffer, const uint8 *data, unsigned int length) -{ - memcpy(buffer, data, length); - return length; -} - -size_t vnp_raw_unpack_uint8_vector(const void *buffer, uint8 *data, unsigned int length) -{ - memcpy(data, buffer, length); - return length; -} - -size_t vnp_raw_pack_uint16(void *buffer, uint16 data) -{ - *(uint8 *) buffer = (data & 0xFF00) >> 8; - *((uint8 *) buffer + 1) = data & 0xFF; - return sizeof data; -} - -size_t vnp_raw_unpack_uint16(const void *buffer, uint16 *data) -{ - register const uint8 *b = buffer; - register uint16 tmp; - - tmp = ((uint16) *b++) << 8; - tmp |= (uint16) *b; - *data = tmp; - return sizeof *data; -} - -size_t vnp_raw_pack_uint16_vector(void *buffer, const uint16 *data, unsigned int length) -{ - register uint8 *b = buffer; - unsigned int i; - for(i = 0; i < length; i++) - { - *b++ = (*data & 0xFF00) >> 8; - *b++ = *data & 0xFF; - data++; - } - return length * 2; -} - -size_t vnp_raw_unpack_uint16_vector(const void *buffer, uint16 *data, unsigned int length) -{ - register const uint8 *b = buffer; - uint16 *end; - - for(end = data + length; end != data; data++) - { - *data = ((uint16) *b++) << 8; - *data |= (uint16) *b++; - } - return length * 2; -} - -size_t vnp_raw_pack_uint24(void *buffer, uint32 data) -{ - register uint8 *p = buffer; - - data >>= 8; - *(p++) = (data >> 24) & 0xFF; - *(p++) = (data >> 16) & 0xFF; - *(p++) = (data >> 8) & 0xFF; - - return 3; -} - -size_t vnp_raw_unpack_uint24(const void *buffer, uint32 *data) -{ - register const uint8 *p = buffer; - register uint32 tmp = 0; - - tmp |= ((uint32) *p++) << 24; - tmp |= ((uint32) *p++) << 16; - tmp |= ((uint32) *p++) << 8; - tmp |= tmp >> 24; - - return 3; -} - -size_t vnp_raw_pack_uint24_vector(void *buffer, const uint32 *data, unsigned int length) -{ - register uint8 *b = buffer; - unsigned int i; - - for(i = 0; i < length; i++) - { - *b++ = (*data >> 24) & 0xFF; - *b++ = (*data >> 16) & 0xFF; - *b++ = (*data >> 8) & 0xFF; - data++; - } - return length * 3; -} - -size_t vnp_raw_unpack_uint24_vector(const void *buffer, uint32 *data, unsigned int length) -{ - register const uint8 *b = buffer; - register uint32 tmp; - uint32 *end; - for(end = data + length; end != data; data++) - { - tmp = ((uint32) *b++) << 24; - tmp |= ((uint32) *b++) << 16; - tmp |= ((uint32) *b++) << 8; - tmp |= tmp >> 24; - *data = tmp; - } - return length * 3; -} - -size_t vnp_raw_pack_uint32(void *buffer, uint32 data) -{ - register uint8 *b = buffer; - - *b++ = (data >> 24) & 0xFF; - *b++ = (data >> 16) & 0xFF; - *b++ = (data >> 8) & 0xFF; - *b++ = data & 0xFF; - - return sizeof data; -} - -size_t vnp_raw_unpack_uint32(const void *buffer, uint32 *data) -{ - register const uint8 *b = buffer; - - *data = ((uint32) *b++) << 24; - *data |= ((uint32) *b++) << 16; - *data |= ((uint32) *b++) << 8; - *data |= *b; - return sizeof *data; -} - -size_t vnp_raw_pack_uint32_vector(void *buffer, const uint32 *data, unsigned int length) -{ - register uint8 *b = buffer; - unsigned int i; - - for(i = 0; i < length; i++) - { - *b++ = (*data >> 24) & 0xFF; - *b++ = (*data >> 16) & 0xFF; - *b++ = (*data >> 8) & 0xFF; - *b++ = *data & 0xFF; - data++; - } - return length * 4; -} - -size_t vnp_raw_unpack_uint32_vector(const void *buffer, uint32 *data, unsigned int length) -{ - register const uint8 *b = buffer; - uint32 *end; - for(end = data + length; end != data; data++) - { - *data = ((uint32) *b++) << 24; - *data |= ((uint32) *b++) << 16; - *data |= ((uint32) *b++) << 8; - *data |= ((uint32) *b++); - } - return length * 4; -} - -size_t vnp_raw_pack_real32(void *buffer, real32 data) -{ - union { uint32 uint; real32 real; } punt; - punt.real = data; - return vnp_raw_pack_uint32(buffer, punt.uint); -} - -size_t vnp_raw_unpack_real32(const void *buffer, real32 *data) -{ - return vnp_raw_unpack_uint32(buffer, (uint32 *) data); -} - -size_t vnp_raw_pack_real32_vector(void *buffer, const real32 *data, unsigned int length) -{ - uint32 i; - for(i = 0; i < length; i++) - vnp_raw_pack_real32(&((uint8 *)buffer)[i * 4], data[i]); - return length * 4; -} - -size_t vnp_raw_unpack_real32_vector(const void *buffer, real32 *data, unsigned int length) -{ - uint32 i; - for(i = 0; i < length; i++) - vnp_raw_unpack_real32(&((uint8 *)buffer)[i * 4], &data[i]); - return length * 4; -} - -size_t vnp_raw_pack_real64(void *buffer, real64 data) -{ - union { uint32 uint[2]; real64 real; } punt; - uint32 size; - - punt.real = data; - size = vnp_raw_pack_uint32(buffer, punt.uint[0]); - buffer = (uint8 *) buffer + size; - size += vnp_raw_pack_uint32(buffer, punt.uint[1]); - return size; -} - -size_t vnp_raw_unpack_real64(const void *buffer, real64 *data) -{ - union { uint32 uint[2]; real64 real; } punt; - uint32 size; - - size = vnp_raw_unpack_uint32(buffer, &punt.uint[0]); - size += vnp_raw_unpack_uint32(((uint8 *)buffer) + size, &punt.uint[1]); - *data = punt.real; - return size; -} - -size_t vnp_raw_pack_real64_vector(void *buffer, const real64 *data, unsigned int length) -{ - uint32 i; - for(i = 0; i < length; i++) - vnp_raw_pack_real64(&((uint8 *)buffer)[i * 8], data[i]); - return length * 8; -} - -size_t vnp_raw_unpack_real64_vector(const void *buffer, real64 *data, unsigned int length) -{ - uint32 i; - for(i = 0; i < length; i++) - vnp_raw_unpack_real64(&((uint8 *)buffer)[i * 8], &data[i]); - return length * 8; -} - -size_t vnp_raw_pack_string(void *buffer, const char *string, size_t max_size) -{ - unsigned int i = 0; - char *p = buffer; - if(string != 0) - for(; i < max_size && string[i] != 0; i++) - p[i] = string[i]; - p[i] = 0; - return ++i; -} - -size_t vnp_raw_unpack_string(const void *buffer, char *string, size_t max_size, size_t max_size2) -{ - unsigned int i; - const char *p = buffer; - - max_size--; - max_size2--; - for(i = 0; i < max_size && i < max_size2 && p[i] != 0; i++) - string[i] = p[i]; - string[i] = 0; - return ++i; -} - -/* --------------------------------------------------------------------------------------------------- */ - -size_t vnp_pack_quat32(void *buffer, const VNQuat32 *data) -{ - uint8 *out = buffer; - - if(data == NULL) - return 0; - out += vnp_raw_pack_real32(out, data->x); - out += vnp_raw_pack_real32(out, data->y); - out += vnp_raw_pack_real32(out, data->z); - out += vnp_raw_pack_real32(out, data->w); - - return out - (uint8 *) buffer; -} - -size_t vnp_unpack_quat32(const void *buffer, VNQuat32 *data) -{ - const uint8 *in = buffer; - - if(data == NULL) - return 0; - in += vnp_raw_unpack_real32(in, &data->x); - in += vnp_raw_unpack_real32(in, &data->y); - in += vnp_raw_unpack_real32(in, &data->z); - in += vnp_raw_unpack_real32(in, &data->w); - - return in - (uint8 *) buffer; -} - -size_t vnp_pack_quat64(void *buffer, const VNQuat64 *data) -{ - uint8 *out = buffer; - - if(data == NULL) - return 0; - out += vnp_raw_pack_real64(out, data->x); - out += vnp_raw_pack_real64(out, data->y); - out += vnp_raw_pack_real64(out, data->z); - out += vnp_raw_pack_real64(out, data->w); - - return out - (uint8 *) buffer; -} - -size_t vnp_unpack_quat64(const void *buffer, VNQuat64 *data) -{ - const uint8 *in = buffer; - - if(data == NULL) - return 0; - in += vnp_raw_unpack_real64(in, &data->x); - in += vnp_raw_unpack_real64(in, &data->y); - in += vnp_raw_unpack_real64(in, &data->z); - in += vnp_raw_unpack_real64(in, &data->w); - - return in - (uint8 *) buffer; -} - -size_t vnp_pack_audio_block(void *buffer, VNABlockType type, const VNABlock *block) -{ - if(block == NULL) - return 0; - switch(type) - { - case VN_A_BLOCK_INT8: - return vnp_raw_pack_uint8_vector(buffer, block->vint8, sizeof block->vint8 / sizeof *block->vint8); - case VN_A_BLOCK_INT16: - return vnp_raw_pack_uint16_vector(buffer, block->vint16, sizeof block->vint16 / sizeof *block->vint16); - case VN_A_BLOCK_INT24: - return vnp_raw_pack_uint24_vector(buffer, block->vint24, sizeof block->vint24 / sizeof *block->vint24); - case VN_A_BLOCK_INT32: - return vnp_raw_pack_uint32_vector(buffer, block->vint32, sizeof block->vint32 / sizeof *block->vint32); - case VN_A_BLOCK_REAL32: - return vnp_raw_pack_real32_vector(buffer, block->vreal32, sizeof block->vreal32 / sizeof *block->vreal32); - case VN_A_BLOCK_REAL64: - return vnp_raw_pack_real64_vector(buffer, block->vreal64, sizeof block->vreal64 / sizeof *block->vreal64); - } - return 0; -} - -size_t vnp_unpack_audio_block(const void *buffer, VNABlockType type, VNABlock *block) -{ - if(block == NULL) - return 0; - switch(type) - { - case VN_A_BLOCK_INT8: - return vnp_raw_unpack_uint8_vector(buffer, block->vint8, sizeof block->vint8 / sizeof *block->vint8); - case VN_A_BLOCK_INT16: - return vnp_raw_unpack_uint16_vector(buffer, block->vint16, sizeof block->vint16 / sizeof *block->vint16); - case VN_A_BLOCK_INT24: - return vnp_raw_unpack_uint24_vector(buffer, block->vint24, sizeof block->vint24 / sizeof *block->vint24); - case VN_A_BLOCK_INT32: - return vnp_raw_unpack_uint32_vector(buffer, block->vint32, sizeof block->vint32 / sizeof *block->vint32); - case VN_A_BLOCK_REAL32: - return vnp_raw_unpack_real32_vector(buffer, block->vreal32, sizeof block->vreal32 / sizeof *block->vreal32); - case VN_A_BLOCK_REAL64: - return vnp_raw_unpack_real64_vector(buffer, block->vreal64, sizeof block->vreal64 / sizeof *block->vreal64); - } - return 0; -} diff --git a/extern/verse/dist/v_pack.h b/extern/verse/dist/v_pack.h deleted file mode 100644 index 60cb7225642..00000000000 --- a/extern/verse/dist/v_pack.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -** v_pack.h -** -** These functions are used to pack and unpack various quantities to/from network -** packet buffers. They do not care about alignment, operating at byte level internally. -** The external byte-ordering used is big-endian (aka "network byte order") for all -** quantities larger than a single byte. -*/ - -#include "verse_header.h" - -extern size_t vnp_raw_pack_uint8(void *buffer, uint8 data); -extern size_t vnp_raw_unpack_uint8(const void *buffer, uint8 *data); - -extern size_t vnp_raw_pack_uint16(void *buffer, uint16 data); -extern size_t vnp_raw_unpack_uint16(const void *buffer, uint16 *data); - -extern size_t vnp_raw_pack_uint24(void *buffer, uint32 data); -extern size_t vnp_raw_unpack_uint24(const void *buffer, uint32 *data); - -extern size_t vnp_raw_pack_uint32(void *buffer, uint32 data); -extern size_t vnp_raw_unpack_uint32(const void *buffer, uint32 *data); - -extern size_t vnp_raw_pack_real32(void *buffer, real32 data); -extern size_t vnp_raw_unpack_real32(const void *buffer, real32 *data); - -extern size_t vnp_raw_pack_real64(void *buffer, real64 data); -extern size_t vnp_raw_unpack_real64(const void *buffer, real64 *data); - -extern size_t vnp_raw_pack_string(void *buffer, const char *string, size_t max_size); -extern size_t vnp_raw_unpack_string(const void *buffer, char *string, size_t max_size, size_t max_size2); - -extern size_t vnp_raw_pack_uint8_vector(void *buffer, const uint8 *data, unsigned int length); -extern size_t vnp_raw_unpack_uint8_vector(const void *buffer, uint8 *data, unsigned int length); - -extern size_t vnp_raw_pack_uint16_vector(void *buffer, const uint16 *data, unsigned int length); -extern size_t vnp_raw_unpack_uint16_vector(const void *buffer, uint16 *data, unsigned int length); - -extern size_t vnp_raw_pack_uint24_vector(void *buffer, const uint32 *data, unsigned int length); -extern size_t vnp_raw_unpack_uint24_vector(const void *buffer, uint32 *data, unsigned int length); - -extern size_t vnp_raw_pack_uint32_vector(void *buffer, const uint32 *data, unsigned int length); -extern size_t vnp_raw_unpack_uint32_vector(const void *buffer, uint32 *data, unsigned int length); - -extern size_t vnp_raw_pack_real32_vector(void *buffer, const real32 *data, unsigned int length); -extern size_t vnp_raw_unpack_real32_vector(const void *buffer, real32 *data, unsigned int length); - -extern size_t vnp_raw_pack_real64_vector(void *buffer, const real64 *data, unsigned int length); -extern size_t vnp_raw_unpack_real64_vector(const void *buffer, real64 *data, unsigned int length); - -/* --------------------------------------------------------------------------------------------------- */ - -extern size_t vnp_pack_quat32(void *buffer, const VNQuat32 *data); -extern size_t vnp_unpack_quat32(const void *buffer, VNQuat32 *data); -extern size_t vnp_pack_quat64(void *buffer, const VNQuat64 *data); -extern size_t vnp_unpack_quat64(const void *buffer, VNQuat64 *data); - -extern size_t vnp_pack_audio_block(void *buffer, VNABlockType type, const VNABlock *block); -extern size_t vnp_unpack_audio_block(const void *buffer, VNABlockType type, VNABlock *block); diff --git a/extern/verse/dist/v_pack_method.c b/extern/verse/dist/v_pack_method.c deleted file mode 100644 index c79ae92ba31..00000000000 --- a/extern/verse/dist/v_pack_method.c +++ /dev/null @@ -1,219 +0,0 @@ -/* -** -*/ - -#include - -#include "v_cmd_gen.h" - -#if !defined(V_GENERATE_FUNC_MODE) - -#include "verse.h" -#include "v_pack.h" - -VNOPackedParams * verse_method_call_pack(unsigned int param_count, const VNOParamType *param_type, const VNOParam *params) -{ - unsigned int i, j, buffer_pos; - uint8 *buf; - - buf = malloc(1500 + 8 * 16); - buffer_pos = vnp_raw_pack_uint16(buf, 0); - for(i = 0; i < param_count; i++) - { - switch(param_type[i]) - { - case VN_O_METHOD_PTYPE_INT8 : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], params[i].vint8); - break; - case VN_O_METHOD_PTYPE_INT16 : - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], params[i].vint16); - break; - case VN_O_METHOD_PTYPE_INT32 : - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], params[i].vint32); - break; - case VN_O_METHOD_PTYPE_UINT8 : - buffer_pos += vnp_raw_pack_uint8(&buf[buffer_pos], params[i].vuint8); - break; - case VN_O_METHOD_PTYPE_UINT16 : - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], params[i].vuint16); - break; - case VN_O_METHOD_PTYPE_UINT32 : - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], params[i].vuint32); - break; - case VN_O_METHOD_PTYPE_REAL32 : - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32); - break; - case VN_O_METHOD_PTYPE_REAL64 : - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64); - break; - case VN_O_METHOD_PTYPE_STRING : - buffer_pos += vnp_raw_pack_string(&buf[buffer_pos], params[i].vstring, (1500 + 8 * 16) - buffer_pos); - break; - case VN_O_METHOD_PTYPE_NODE : - buffer_pos += vnp_raw_pack_uint32(&buf[buffer_pos], params[i].vnode); - break; - case VN_O_METHOD_PTYPE_LAYER : - buffer_pos += vnp_raw_pack_uint16(&buf[buffer_pos], params[i].vlayer); - break; - case VN_O_METHOD_PTYPE_REAL32_VEC2 : - for(j = 0; j < 2; j++) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_VEC3 : - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_VEC4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_VEC2 : - for(j = 0; j < 2; j++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_VEC3 : - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_VEC4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_MAT4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_MAT9 : - for(j = 0; j < 9; j++) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_MAT16 : - for(j = 0; j < 16; j++) - buffer_pos += vnp_raw_pack_real32(&buf[buffer_pos], params[i].vreal32_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_MAT4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_MAT9 : - for(j = 0; j < 9; j++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_MAT16 : - for(j = 0; j < 16; j++) - buffer_pos += vnp_raw_pack_real64(&buf[buffer_pos], params[i].vreal64_mat[j]); - break; - } - if(buffer_pos > 1500) - { - free(buf); - return NULL; - } - } - vnp_raw_pack_uint16(buf, buffer_pos); - return buf; -} - -boolean verse_method_call_unpack(const VNOPackedParams *data, unsigned int param_count, const VNOParamType *param_type, VNOParam *params) -{ - unsigned int i, j, buffer_pos = 0, len; - uint16 size; - const uint8 *buf; - static char string[2048]; - char *stringput = string; - - buf = data; - buffer_pos += vnp_raw_unpack_uint16(buf, &size); - for(i = 0; i < param_count; i++) - { - switch(param_type[i]) - { - case VN_O_METHOD_PTYPE_INT8 : - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], ¶ms[i].vint8); - break; - case VN_O_METHOD_PTYPE_INT16 : - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], ¶ms[i].vint16); - break; - case VN_O_METHOD_PTYPE_INT32 : - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], ¶ms[i].vint32); - break; - case VN_O_METHOD_PTYPE_UINT8 : - buffer_pos += vnp_raw_unpack_uint8(&buf[buffer_pos], ¶ms[i].vuint8); - break; - case VN_O_METHOD_PTYPE_UINT16 : - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], ¶ms[i].vuint16); - break; - case VN_O_METHOD_PTYPE_UINT32 : - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], ¶ms[i].vuint32); - break; - case VN_O_METHOD_PTYPE_REAL32 : - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32); - break; - case VN_O_METHOD_PTYPE_REAL64 : - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64); - break; - case VN_O_METHOD_PTYPE_STRING : - params[i].vstring = stringput; - len = vnp_raw_unpack_string(&buf[buffer_pos], stringput, (1500 + 8 * 16) - buffer_pos, -1); - stringput += len; - buffer_pos += len; - break; - case VN_O_METHOD_PTYPE_NODE : - buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], ¶ms[i].vnode); - break; - case VN_O_METHOD_PTYPE_LAYER : - buffer_pos += vnp_raw_unpack_uint16(&buf[buffer_pos], ¶ms[i].vlayer); - break; - case VN_O_METHOD_PTYPE_REAL32_VEC2 : - for(j = 0; j < 2; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_VEC3 : - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_VEC4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_VEC2 : - for(j = 0; j < 2; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_VEC3 : - for(j = 0; j < 3; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_VEC4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64_vec[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_MAT4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_MAT9 : - for(j = 0; j < 9; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL32_MAT16 : - for(j = 0; j < 16; j++) - buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], ¶ms[i].vreal32_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_MAT4 : - for(j = 0; j < 4; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_MAT9 : - for(j = 0; j < 9; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64_mat[j]); - break; - case VN_O_METHOD_PTYPE_REAL64_MAT16 : - for(j = 0; j < 16; j++) - buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], ¶ms[i].vreal64_mat[j]); - break; - } - } - return TRUE; -} -#endif diff --git a/extern/verse/dist/v_prime.c b/extern/verse/dist/v_prime.c deleted file mode 100644 index cebdf4fb03d..00000000000 --- a/extern/verse/dist/v_prime.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Program to generate primes of the form p = 2 * q + 1, - * where p and q are both primes. - * - * Originally written by Pontus Nyman , - * ported to Verse's bignums and rewritten from scratch by - * Emil Brink. - */ - -#include -#include -#include - -#include "v_bignum.h" -#include "v_encryption.h" -#include "verse_header.h" - -#define BITS V_ENCRYPTION_LOGIN_KEY_BITS /* Save some typing. */ - -#define CYCLES 10 /* Number of times to apply Miller-Rabin test. */ - -/* Test divisibility of against table of small known primes. Returns 1 if n looks prime, 0 if it IS not. */ -static int quick_filter(const VBigDig *n) -{ - VBigDig VBIGNUM(m, 16), VBIGNUM(tmp, BITS / 2); - const unsigned int prime[] = { 3, 5, 7, 11, 13, 17, 19, 23, 39, 31, 37, 41, 43, 47, 53 }; - unsigned int i; - - for(i = 0; i < sizeof prime / sizeof *prime; i++) - { - v_bignum_set_bignum(tmp, n); - v_bignum_set_digit(m, prime[i]); - v_bignum_mod(tmp, m); - if(v_bignum_eq_zero(tmp)) - return 0; - } - return 1; -} - -/* The Miller-Rabin primality test. Returns 1 if the candidate looks prime, 0 if - * it IS NOT prime. Assumes that n is BITS / 2 bits, so that its square fits in BITS. -*/ -static int miller_rabin(const VBigDig *n, VRandGen *gen) -{ - int i, k; - VBigDig VBIGNUM(a, BITS / 2), VBIGNUM(d, BITS), VBIGNUM(nmo, BITS / 2), VBIGNUM(x, BITS); - const VBigDig *mu; - - mu = v_bignum_reduce_begin(n); - - /* Pick a "witness", a number in the [1, n) range. */ - v_bignum_set_random(a, gen); - v_bignum_reduce(a, n, mu); - - v_bignum_set_one(d); - v_bignum_set_bignum(nmo, n); - v_bignum_sub_digit(nmo, 1); /* nmo = n - 1 (say it). */ - k = v_bignum_bit_msb(nmo); - for(i = k; i >= 0; i--) - { - v_bignum_set_bignum(x, d); - v_bignum_square_half(d); - v_bignum_reduce(d, n, mu); - if(v_bignum_eq_one(d) && !v_bignum_eq_one(x) && !v_bignum_eq(x, nmo)) - { - v_bignum_reduce_end(mu); - return 0; /* Composite found. */ - } - if(v_bignum_bit_test(nmo, i)) - { - v_bignum_mul(d, a); - v_bignum_reduce(d, n, mu); - } - } - v_bignum_reduce_end(mu); - return v_bignum_eq_one(d); /* It might be prime. */ -} - -/* Test q for primality, returning 1 if it seems prime, 0 if it certainly IS not. */ -int v_prime_test(const VBigDig *q, VRandGen *gen) -{ - int i; - - if(!quick_filter(q)) - return 0; - - for(i = 0; i < CYCLES; i++) - { - if(!miller_rabin(q, gen)) - return 0; - } - return 1; -} - -void v_prime_set_random(VBigDig *x) -{ - int bits = v_bignum_bit_size(x); - VRandGen *gen; - - gen = v_randgen_new(); - do - { - /* Create candidate, making sure it's both odd and non-zero. */ - v_bignum_set_random(x, gen); - /* Set topmost two bits, makes sure products are big. */ - v_bignum_bit_set(x, bits - 1); - v_bignum_bit_set(x, bits - 2); - /* Set lowermost bit, makes sure it is odd (better prime candidate that way). */ - v_bignum_bit_set(x, 0); - } while(!v_prime_test(x, gen)); -/* printf("Prime found after %d iterations: ", count); - v_bignum_print_hex_lf(x); -*/ - v_randgen_destroy(gen); -} - -/* Big (small?) primes from . */ -void v_prime_set_table(VBigDig *x, unsigned int i) -{ - if(i == 0) - v_bignum_set_string_hex(x, "0xCBC2C5536E3D6283FDAF36B1D0F91C3EAAB1D12892B961B866907930F6471851"); - else if(i == 1) - v_bignum_set_string_hex(x, "0xC14F93E7A1543BD57C1DFBE98C29F9E4C13077FD27A0FEC05CCBC913CD213F19"); - else - v_bignum_set_string(x, "65537"); /* It ain't big, but it's prime. */ -} - -#if PRIMEALONE -#include - -#define REPS 300 - -static double elapsed(const struct timeval *t1, const struct timeval *t2) -{ - return t2->tv_sec - t1->tv_sec + 1E-6 * (t2->tv_usec - t1->tv_usec); -} - -int main(void) -{ - struct timeval now, then; - VBigDig VBIGNUM(x, BITS / 2); - int i; - - srand(clock()); - -/* gettimeofday(&then, NULL); - for(i = 0; i < REPS; i++) - { - v_prime_set_random_incr(x); - } - gettimeofday(&now, NULL); - printf("incr: %g\n", elapsed(&then, &now)); -*/ - gettimeofday(&then, NULL); - for(i = 0; i < REPS; i++) - { - v_prime_set_random(x); - } - gettimeofday(&now, NULL); - printf("rand: %g\n", elapsed(&then, &now)); - - return EXIT_SUCCESS; -} - -#endif diff --git a/extern/verse/dist/v_randgen.c b/extern/verse/dist/v_randgen.c deleted file mode 100644 index c65b48be60b..00000000000 --- a/extern/verse/dist/v_randgen.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Random number generator module. Defines a simple API to allocate, use and - * destroy a generator of randomness. Relies on platform-specific APIs. -*/ - -#include -#include - -#include "v_randgen.h" - -#if defined _WIN32 - -/* This is a fall-back to the old style of simply using rand(). It should - * be replaced by something using the proper Win32 cryptography APIs. - * The CryptAcquireContext() and CryptGenRandom() calls sound interesting. - * - * FIXME: Replace ASAP. -*/ - -VRandGen * v_randgen_new(void) -{ - return (VRandGen *) 1; /* Anything that isn't NULL. */ -} - -void v_randgen_get(VRandGen *gen, void *bytes, size_t num) -{ - if(gen != NULL && bytes != NULL) - { - unsigned char *put = bytes, *get; - size_t i; - int x; - - while(num > 0) - { - x = rand(); - get = (unsigned char *) &x; - for(i = 0; i < sizeof x && num > 0; i++, num--) - *put++ = *get++; - } - } -} - -void v_randgen_destroy(VRandGen *gen) -{ - /* Nothing to do here. */ -} - -#else - -/* On non-Win32 platforms (which is Linux and Darwin, at the moment), we - * read random data from a file, which is assumed to be one of the kernel's - * virtual files. -*/ - -#include -#include -#include -#include - -struct VRandGen { - int fd; -}; - -#define SOURCE "/dev/urandom" /* Name of file to read random bits from. */ - -VRandGen * v_randgen_new(void) -{ - VRandGen *gen; - - if((gen = malloc(sizeof *gen)) != NULL) - { - gen->fd = open(SOURCE, O_RDONLY); - if(gen->fd < 0) - { - fprintf(stderr, __FILE__ ": Couldn't open " SOURCE " for reading\n"); - free(gen); - gen = NULL; - } - } - return gen; -} - -void v_randgen_get(VRandGen *gen, void *bytes, size_t num) -{ - if(gen != NULL && bytes != NULL) - { - if(read(gen->fd, bytes, num) != (int) num) - fprintf(stderr, __FILE__ ": Failed to read %u bytes of random data from " SOURCE "\n", (unsigned int) num); - } -} - -void v_randgen_destroy(VRandGen *gen) -{ - if(gen != NULL) - { - close(gen->fd); - free(gen); - } -} - -#endif diff --git a/extern/verse/dist/v_randgen.h b/extern/verse/dist/v_randgen.h deleted file mode 100644 index ee14ce6c36f..00000000000 --- a/extern/verse/dist/v_randgen.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Random number generator API. A way to improve over rand(). -*/ - -#if !defined V_RANDGEN_H -#define V_RANDGEN_H - -typedef struct VRandGen VRandGen; - -extern VRandGen * v_randgen_new(void); -extern void v_randgen_get(VRandGen *gen, void *bytes, size_t num); -extern void v_randgen_destroy(VRandGen *gen); - -#endif /* V_RANDGEN_H */ diff --git a/extern/verse/dist/v_util.c b/extern/verse/dist/v_util.c deleted file mode 100644 index a36f4c77791..00000000000 --- a/extern/verse/dist/v_util.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Utility functions. -*/ - -#include - -#include "verse_header.h" -#include "v_network.h" -#include "v_util.h" - -/* Safe string copy. Copies from to , not using more than - * bytes of destination space. Always 0-terminates the destination. Returns - * the beginning of the destination string. -*/ -char * v_strlcpy(char *dst, const char *src, size_t size) -{ - char *base = dst; - - if(size == 0) - return NULL; - for(size--; size > 0 && *src != '\0'; size--) - *dst++ = *src++; - *dst = '\0'; - - return base; -} - -void v_timer_start(VUtilTimer *timer) -{ - v_n_get_current_time(&timer->seconds, &timer->fractions); -} - -void v_timer_advance(VUtilTimer *timer, double seconds) -{ - if(timer == NULL) - return; - timer->seconds += (uint32) seconds; - timer->fractions += (uint32) ((seconds - (int) seconds) * (double) 0xffffffff); -} - -double v_timer_elapsed(const VUtilTimer *timer) -{ - uint32 cur_seconds, cur_fractions; - - v_n_get_current_time(&cur_seconds, &cur_fractions); - return (double)(cur_seconds - timer->seconds) + ((double)cur_fractions - (double)timer->fractions) / (double) 0xffffffff; -} - -void v_timer_print(const VUtilTimer *timer) -{ - uint32 cur_seconds, cur_fractions; - - v_n_get_current_time(&cur_seconds, &cur_fractions); - printf("%f", (double)(cur_seconds - timer->seconds) + ((double)cur_fractions - (double)timer->fractions) / (double) 0xffffffff); -} - -/* Compare |x| against built-in semi-magical constant, and return 1 if it's larger, 0 if not. */ -static int quat_valid(real64 x) -{ - const real64 EPSILON = 0.0000001; - return x > 0.0 ? x > EPSILON : x < -EPSILON; -} - -int v_quat32_valid(const VNQuat32 *q) -{ - if(q == NULL) - return 0; - return quat_valid(q->x) && quat_valid(q->y) && quat_valid(q->z) && quat_valid(q->w); -} - -int v_quat64_valid(const VNQuat64 *q) -{ - if(q == NULL) - return 0; - return quat_valid(q->x) && quat_valid(q->y) && quat_valid(q->z) && quat_valid(q->w); -} - -VNQuat32 * v_quat32_from_quat64(VNQuat32 *dst, const VNQuat64 *src) -{ - if(dst == NULL || src == NULL) - return NULL; - dst->x = (real32) src->x; - dst->y = (real32) src->y; - dst->z = (real32) src->z; - dst->w = (real32) src->w; - return dst; -} - -VNQuat64 * v_quat64_from_quat32(VNQuat64 *dst, const VNQuat32 *src) -{ - if(dst == NULL || src == NULL) - return NULL; - dst->x = src->x; - dst->y = src->y; - dst->z = src->z; - dst->w = src->w; - return dst; -} diff --git a/extern/verse/dist/v_util.h b/extern/verse/dist/v_util.h deleted file mode 100644 index d252d958549..00000000000 --- a/extern/verse/dist/v_util.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Miscellaneous utility routines for generic use throughout the code. -*/ - -/* Safe, buffer size limited, string copy. */ -extern char * v_strlcpy(char *dst, const char *src, size_t size); - -typedef struct { - uint32 seconds; - uint32 fractions; -} VUtilTimer; - -extern void v_timer_start(VUtilTimer *timer); -extern void v_timer_advance(VUtilTimer *timer, double seconds); -extern double v_timer_elapsed(const VUtilTimer *timer); -extern void v_timer_print(const VUtilTimer *timer); - -extern int v_quat32_valid(const VNQuat32 *q); -extern int v_quat64_valid(const VNQuat64 *q); -extern VNQuat32*v_quat32_from_quat64(VNQuat32 *dst, const VNQuat64 *src); -extern VNQuat64*v_quat64_from_quat32(VNQuat64 *dst, const VNQuat32 *src); diff --git a/extern/verse/dist/verse.h b/extern/verse/dist/verse.h deleted file mode 100644 index 53ce674725a..00000000000 --- a/extern/verse/dist/verse.h +++ /dev/null @@ -1,530 +0,0 @@ -/* -** Verse API Header file (for use with libverse.a). -** This is automatically generated code; do not edit. -*/ - - -#if !defined VERSE_H - -#if defined __cplusplus /* Declare as C symbols for C++ users. */ -extern "C" { -#endif - -#define VERSE_H - -#if !defined VERSE_TYPES -#define VERSE_TYPES - -#include - -/* Release information. */ -#define V_RELEASE_NUMBER 6 -#define V_RELEASE_PATCH 1 -#define V_RELEASE_LABEL "" - -typedef unsigned char boolean; -typedef signed char int8; -typedef unsigned char uint8; -typedef short int16; -typedef unsigned short uint16; -typedef int int32; -typedef unsigned int uint32; -typedef float real32; -typedef double real64; - -#define V_REAL64_MAX 1.7976931348623158e+308 -#define V_REAL32_MAX 3.402823466e+38f - -#if !defined TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#define V_HOST_ID_SIZE (3 * (512 / 8)) /* The size of host IDs (keys), in 8-bit bytes. */ - -typedef enum { - V_NT_OBJECT = 0, - V_NT_GEOMETRY, - V_NT_MATERIAL, - V_NT_BITMAP, - V_NT_TEXT, - V_NT_CURVE, - V_NT_AUDIO, - V_NT_NUM_TYPES, - V_NT_SYSTEM = V_NT_NUM_TYPES, - V_NT_NUM_TYPES_NETPACK -} VNodeType; - -typedef uint32 VNodeID; -typedef uint16 VLayerID; /* Commonly used to identify layers, nodes that have them. */ -typedef uint16 VBufferID; /* Commonly used to identify buffers, nodes that have them. */ -typedef uint16 VNMFragmentID; - -typedef void * VSession; - -#define V_MAX_NAME_LENGTH_SHORT 16 -#define V_MAX_NAME_LENGTH_LONG 48 -#define V_MAX_NAME_PASS_LENGTH 128 - -typedef enum { - VN_OWNER_OTHER = 0, - VN_OWNER_MINE -} VNodeOwner; - -typedef enum { - VN_O_METHOD_PTYPE_INT8 = 0, - VN_O_METHOD_PTYPE_INT16, - VN_O_METHOD_PTYPE_INT32, - - VN_O_METHOD_PTYPE_UINT8, - VN_O_METHOD_PTYPE_UINT16, - VN_O_METHOD_PTYPE_UINT32, - - VN_O_METHOD_PTYPE_REAL32, - VN_O_METHOD_PTYPE_REAL64, - - VN_O_METHOD_PTYPE_REAL32_VEC2, - VN_O_METHOD_PTYPE_REAL32_VEC3, - VN_O_METHOD_PTYPE_REAL32_VEC4, - - VN_O_METHOD_PTYPE_REAL64_VEC2, - VN_O_METHOD_PTYPE_REAL64_VEC3, - VN_O_METHOD_PTYPE_REAL64_VEC4, - - VN_O_METHOD_PTYPE_REAL32_MAT4, - VN_O_METHOD_PTYPE_REAL32_MAT9, - VN_O_METHOD_PTYPE_REAL32_MAT16, - - VN_O_METHOD_PTYPE_REAL64_MAT4, - VN_O_METHOD_PTYPE_REAL64_MAT9, - VN_O_METHOD_PTYPE_REAL64_MAT16, - - VN_O_METHOD_PTYPE_STRING, - - VN_O_METHOD_PTYPE_NODE, - VN_O_METHOD_PTYPE_LAYER -} VNOParamType; - -typedef union { - int8 vint8; - int16 vint16; - int32 vint32; - uint8 vuint8; - uint16 vuint16; - uint32 vuint32; - real32 vreal32; - real64 vreal64; - real32 vreal32_vec[4]; - real32 vreal32_mat[16]; - real64 vreal64_vec[4]; - real64 vreal64_mat[16]; - char *vstring; - VNodeID vnode; - VLayerID vlayer; -} VNOParam; - -#define VN_TAG_MAX_BLOB_SIZE 500 - -typedef enum { - VN_TAG_BOOLEAN = 0, - VN_TAG_UINT32, - VN_TAG_REAL64, - VN_TAG_STRING, - VN_TAG_REAL64_VEC3, - VN_TAG_LINK, - VN_TAG_ANIMATION, - VN_TAG_BLOB, - VN_TAG_TYPE_COUNT -} VNTagType; - -typedef enum { - VN_TAG_GROUP_SIZE = 16, - VN_TAG_NAME_SIZE = 16, - VN_TAG_FULL_NAME_SIZE = 64, - VN_TAG_STRING_SIZE = 128 -} VNTagConstants; - -typedef union { - boolean vboolean; - uint32 vuint32; - real64 vreal64; - char *vstring; - real64 vreal64_vec3[3]; - VNodeID vlink; - struct { - VNodeID curve; - uint32 start; - uint32 end; - } vanimation; - struct { - uint16 size; - void *blob; - } vblob; -} VNTag; - -typedef enum { - VN_S_CONNECT_NAME_SIZE = 32, - VN_S_CONNECT_KEY_SIZE = 4, - VN_S_CONNECT_DATA_SIZE = 32, - VS_S_CONNECT_HOSTID_PRIVATE_SIZE = 3 * 2048 / 8, - VS_S_CONNECT_HOSTID_PUBLIC_SIZE = 2 * 2048 / 8 -} VNSConnectConstants; - -typedef enum { - VN_FORMAT_REAL32, - VN_FORMAT_REAL64 -} VNRealFormat; - -typedef struct { - real32 x, y, z, w; -} VNQuat32; - -typedef struct { - real64 x, y, z, w; -} VNQuat64; - -typedef enum { - VN_O_METHOD_GROUP_NAME_SIZE = 16, - VN_O_METHOD_NAME_SIZE = 16, - VN_O_METHOD_SIG_SIZE = 256 -} VNOMethodConstants; - -typedef void VNOPackedParams; /* Opaque type. */ - -typedef enum { - VN_G_LAYER_VERTEX_XYZ = 0, - VN_G_LAYER_VERTEX_UINT32, - VN_G_LAYER_VERTEX_REAL, - VN_G_LAYER_POLYGON_CORNER_UINT32 = 128, - VN_G_LAYER_POLYGON_CORNER_REAL, - VN_G_LAYER_POLYGON_FACE_UINT8, - VN_G_LAYER_POLYGON_FACE_UINT32, - VN_G_LAYER_POLYGON_FACE_REAL -} VNGLayerType; - -typedef enum { - VN_M_LIGHT_DIRECT = 0, - VN_M_LIGHT_AMBIENT, - VN_M_LIGHT_DIRECT_AND_AMBIENT, - VN_M_LIGHT_BACK_DIRECT, - VN_M_LIGHT_BACK_AMBIENT, - VN_M_LIGHT_BACK_DIRECT_AND_AMBIENT -} VNMLightType; - -typedef enum { - VN_M_NOISE_PERLIN_ZERO_TO_ONE = 0, - VN_M_NOISE_PERLIN_MINUS_ONE_TO_ONE, - VN_M_NOISE_POINT_ZERO_TO_ONE, - VN_M_NOISE_POINT_MINUS_ONE_TO_ONE -} VNMNoiseType; - -typedef enum { - VN_M_RAMP_SQUARE = 0, - VN_M_RAMP_LINEAR, - VN_M_RAMP_SMOOTH -} VNMRampType; - -typedef enum { - VN_M_RAMP_RED = 0, - VN_M_RAMP_GREEN, - VN_M_RAMP_BLUE -} VNMRampChannel; - -typedef struct { - real64 pos; - real64 red; - real64 green; - real64 blue; -} VNMRampPoint; - -typedef enum { - VN_M_BLEND_FADE = 0, - VN_M_BLEND_ADD, - VN_M_BLEND_SUBTRACT, - VN_M_BLEND_MULTIPLY, - VN_M_BLEND_DIVIDE, -} VNMBlendType; - -typedef enum { - VN_M_FT_COLOR = 0, - VN_M_FT_LIGHT, - VN_M_FT_REFLECTION, - VN_M_FT_TRANSPARENCY, - VN_M_FT_VOLUME, - VN_M_FT_VIEW, - VN_M_FT_GEOMETRY, - VN_M_FT_TEXTURE, - VN_M_FT_NOISE, - VN_M_FT_BLENDER, - VN_M_FT_CLAMP, - VN_M_FT_MATRIX, - VN_M_FT_RAMP, - VN_M_FT_ANIMATION, - VN_M_FT_ALTERNATIVE, - VN_M_FT_OUTPUT -} VNMFragmentType; - -typedef union { - struct { - real64 red; - real64 green; - real64 blue; - } color; - struct { - uint8 type; - real64 normal_falloff; - VNodeID brdf; - char brdf_r[16]; - char brdf_g[16]; - char brdf_b[16]; - } light; - struct { - real64 normal_falloff; - } reflection; - struct { - real64 normal_falloff; - real64 refraction_index; - } transparency; - struct { - real64 diffusion; - real64 col_r; - real64 col_g; - real64 col_b; - } volume; - struct { - char layer_r[16]; - char layer_g[16]; - char layer_b[16]; - } geometry; - struct{ - VNodeID bitmap; - char layer_r[16]; - char layer_g[16]; - char layer_b[16]; - boolean filtered; - VNMFragmentID mapping; - } texture; - struct { - uint8 type; - VNMFragmentID mapping; - } noise; - struct { - uint8 type; - VNMFragmentID data_a; - VNMFragmentID data_b; - VNMFragmentID control; - } blender; - struct { - boolean min; - real64 red; - real64 green; - real64 blue; - VNMFragmentID data; - } clamp; - struct { - real64 matrix[16]; - VNMFragmentID data; - } matrix; - struct { - uint8 type; - uint8 channel; - VNMFragmentID mapping; - uint8 point_count; - VNMRampPoint ramp[48]; - } ramp; - struct { - char label[16]; - } animation; - struct { - VNMFragmentID alt_a; - VNMFragmentID alt_b; - } alternative; - struct { - char label[16]; - VNMFragmentID front; - VNMFragmentID back; - } output; -} VMatFrag; - -typedef enum { - VN_B_LAYER_UINT1 = 0, - VN_B_LAYER_UINT8, - VN_B_LAYER_UINT16, - VN_B_LAYER_REAL32, - VN_B_LAYER_REAL64 -} VNBLayerType; - -#define VN_B_TILE_SIZE 8 - -typedef union{ - uint8 vuint1[8]; - uint8 vuint8[64]; - uint16 vuint16[64]; - real32 vreal32[64]; - real64 vreal64[64]; -} VNBTile; - -typedef enum { - VN_T_CONTENT_LANGUAGE_SIZE = 32, - VN_T_CONTENT_INFO_SIZE = 256, - VN_T_BUFFER_NAME_SIZE = 16, - VN_T_MAX_TEXT_CMD_SIZE = 1450 -} VNTConstants; - -/* This is how many *samples* are included in a block of the given type. Not bytes. */ -typedef enum { - VN_A_BLOCK_SIZE_INT8 = 1024, - VN_A_BLOCK_SIZE_INT16 = 512, - VN_A_BLOCK_SIZE_INT24 = 384, - VN_A_BLOCK_SIZE_INT32 = 256, - VN_A_BLOCK_SIZE_REAL32 = 256, - VN_A_BLOCK_SIZE_REAL64 = 128 -} VNAConstants; - -typedef enum { - VN_A_BLOCK_INT8, - VN_A_BLOCK_INT16, - VN_A_BLOCK_INT24, - VN_A_BLOCK_INT32, - VN_A_BLOCK_REAL32, - VN_A_BLOCK_REAL64 -} VNABlockType; - -/* Audio commands take pointers to blocks of these. They are not packed as unions. */ -typedef union { - int8 vint8[VN_A_BLOCK_SIZE_INT8]; - int16 vint16[VN_A_BLOCK_SIZE_INT16]; - int32 vint24[VN_A_BLOCK_SIZE_INT24]; - int32 vint32[VN_A_BLOCK_SIZE_INT32]; - real32 vreal32[VN_A_BLOCK_SIZE_REAL32]; - real64 vreal64[VN_A_BLOCK_SIZE_REAL64]; -} VNABlock; - -extern void verse_set_port(uint16 port); -extern void verse_host_id_create(uint8 *id); -extern void verse_host_id_set(uint8 *id); -extern void verse_callback_set(void *send_func, void *callback, void *user_data); -extern void verse_callback_update(uint32 microseconds); -extern void verse_session_set(VSession session); -extern VSession verse_session_get(void); -extern void verse_session_destroy(VSession session); -extern size_t verse_session_get_size(void); -extern VNodeID verse_session_get_avatar(void); -extern void verse_session_get_time(uint32 *seconds, uint32 *fractions); - -extern VNOPackedParams * verse_method_call_pack(uint32 param_count, const VNOParamType *param_type, const VNOParam *params); -extern boolean verse_method_call_unpack(const VNOPackedParams *data, uint32 param_count, const VNOParamType *param_type, VNOParam *params); - -/* -#define V_PRINT_SEND_COMMANDS -#define V_PRINT_RECEIVE_COMMANDS -*/ - -#endif /* VERSE_TYPES */ - -/* Command sending functions begin. ----------------------------------------- */ - -extern VSession verse_send_connect(const char *name, const char *pass, const char *address, const uint8 *expected_host_id); -extern VSession verse_send_connect_accept(VNodeID avatar, const char *address, uint8 *host_id); -extern void verse_send_connect_terminate(const char *address, const char *bye); -extern void verse_send_ping(const char *address, const char *message); -extern void verse_send_node_index_subscribe(uint32 mask); -extern void verse_send_node_create(VNodeID node_id, VNodeType type, VNodeOwner owner); -extern void verse_send_node_destroy(VNodeID node_id); -extern void verse_send_node_subscribe(VNodeID node_id); -extern void verse_send_node_unsubscribe(VNodeID node_id); -extern void verse_send_tag_group_create(VNodeID node_id, uint16 group_id, const char *name); -extern void verse_send_tag_group_destroy(VNodeID node_id, uint16 group_id); -extern void verse_send_tag_group_subscribe(VNodeID node_id, uint16 group_id); -extern void verse_send_tag_group_unsubscribe(VNodeID node_id, uint16 group_id); -extern void verse_send_tag_create(VNodeID node_id, uint16 group_id, uint16 tag_id, const char *name, VNTagType type, const VNTag *tag); -extern void verse_send_tag_destroy(VNodeID node_id, uint16 group_id, uint16 tag_id); -extern void verse_send_node_name_set(VNodeID node_id, const char *name); - -extern void verse_send_o_transform_pos_real32(VNodeID node_id, uint32 time_s, uint32 time_f, const real32 *pos, const real32 *speed, const real32 *accelerate, const real32 *drag_normal, real32 drag); -extern void verse_send_o_transform_rot_real32(VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag); -extern void verse_send_o_transform_scale_real32(VNodeID node_id, real32 scale_x, real32 scale_y, real32 scale_z); -extern void verse_send_o_transform_pos_real64(VNodeID node_id, uint32 time_s, uint32 time_f, const real64 *pos, const real64 *speed, const real64 *accelerate, const real64 *drag_normal, real64 drag); -extern void verse_send_o_transform_rot_real64(VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat64 *rot, const VNQuat64 *speed, const VNQuat64 *accelerate, const VNQuat64 *drag_normal, real64 drag); -extern void verse_send_o_transform_scale_real64(VNodeID node_id, real64 scale_x, real64 scale_y, real64 scale_z); -extern void verse_send_o_transform_subscribe(VNodeID node_id, VNRealFormat type); -extern void verse_send_o_transform_unsubscribe(VNodeID node_id, VNRealFormat type); -extern void verse_send_o_light_set(VNodeID node_id, real64 light_r, real64 light_g, real64 light_b); -extern void verse_send_o_link_set(VNodeID node_id, uint16 link_id, VNodeID link, const char *label, uint32 target_id); -extern void verse_send_o_link_destroy(VNodeID node_id, uint16 link_id); -extern void verse_send_o_method_group_create(VNodeID node_id, uint16 group_id, const char *name); -extern void verse_send_o_method_group_destroy(VNodeID node_id, uint16 group_id); -extern void verse_send_o_method_group_subscribe(VNodeID node_id, uint16 group_id); -extern void verse_send_o_method_group_unsubscribe(VNodeID node_id, uint16 group_id); -extern void verse_send_o_method_create(VNodeID node_id, uint16 group_id, uint16 method_id, const char *name, uint8 param_count, const VNOParamType *param_types, const char * *param_names); -extern void verse_send_o_method_destroy(VNodeID node_id, uint16 group_id, uint16 method_id); -extern void verse_send_o_method_call(VNodeID node_id, uint16 group_id, uint16 method_id, VNodeID sender, const VNOPackedParams *params); -extern void verse_send_o_anim_run(VNodeID node_id, uint16 link_id, uint32 time_s, uint32 time_f, uint8 dimensions, const real64 *pos, const real64 *speed, const real64 *accel, const real64 *scale, const real64 *scale_speed); -extern void verse_send_o_hide(VNodeID node_id, uint8 hidden); - -extern void verse_send_g_layer_create(VNodeID node_id, VLayerID layer_id, const char *name, VNGLayerType type, uint32 def_uint, real64 def_real); -extern void verse_send_g_layer_destroy(VNodeID node_id, VLayerID layer_id); -extern void verse_send_g_layer_subscribe(VNodeID node_id, VLayerID layer_id, VNRealFormat type); -extern void verse_send_g_layer_unsubscribe(VNodeID node_id, VLayerID layer_id); -extern void verse_send_g_vertex_set_xyz_real32(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 x, real32 y, real32 z); -extern void verse_send_g_vertex_delete_real32(VNodeID node_id, uint32 vertex_id); -extern void verse_send_g_vertex_set_xyz_real64(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 x, real64 y, real64 z); -extern void verse_send_g_vertex_delete_real64(VNodeID node_id, uint32 vertex_id); -extern void verse_send_g_vertex_set_uint32(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, uint32 value); -extern void verse_send_g_vertex_set_real64(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 value); -extern void verse_send_g_vertex_set_real32(VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real32 value); -extern void verse_send_g_polygon_set_corner_uint32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3); -extern void verse_send_g_polygon_delete(VNodeID node_id, uint32 polygon_id); -extern void verse_send_g_polygon_set_corner_real64(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 v0, real64 v1, real64 v2, real64 v3); -extern void verse_send_g_polygon_set_corner_real32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real32 v0, real32 v1, real32 v2, real32 v3); -extern void verse_send_g_polygon_set_face_uint8(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint8 value); -extern void verse_send_g_polygon_set_face_uint32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 value); -extern void verse_send_g_polygon_set_face_real64(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 value); -extern void verse_send_g_polygon_set_face_real32(VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real32 value); -extern void verse_send_g_crease_set_vertex(VNodeID node_id, const char *layer, uint32 def_crease); -extern void verse_send_g_crease_set_edge(VNodeID node_id, const char *layer, uint32 def_crease); -extern void verse_send_g_bone_create(VNodeID node_id, uint16 bone_id, const char *weight, const char *reference, uint16 parent, real64 pos_x, real64 pos_y, real64 pos_z, const char *position_label, const char *rotation_label, const char *scale_label); -extern void verse_send_g_bone_destroy(VNodeID node_id, uint16 bone_id); - -extern void verse_send_m_fragment_create(VNodeID node_id, VNMFragmentID frag_id, VNMFragmentType type, const VMatFrag *fragment); -extern void verse_send_m_fragment_destroy(VNodeID node_id, VNMFragmentID frag_id); - -extern void verse_send_b_dimensions_set(VNodeID node_id, uint16 width, uint16 height, uint16 depth); -extern void verse_send_b_layer_create(VNodeID node_id, VLayerID layer_id, const char *name, VNBLayerType type); -extern void verse_send_b_layer_destroy(VNodeID node_id, VLayerID layer_id); -extern void verse_send_b_layer_subscribe(VNodeID node_id, VLayerID layer_id, uint8 level); -extern void verse_send_b_layer_unsubscribe(VNodeID node_id, VLayerID layer_id); -extern void verse_send_b_tile_set(VNodeID node_id, VLayerID layer_id, uint16 tile_x, uint16 tile_y, uint16 z, VNBLayerType type, const VNBTile *tile); - -extern void verse_send_t_language_set(VNodeID node_id, const char *language); -extern void verse_send_t_buffer_create(VNodeID node_id, VBufferID buffer_id, const char *name); -extern void verse_send_t_buffer_destroy(VNodeID node_id, VBufferID buffer_id); -extern void verse_send_t_buffer_subscribe(VNodeID node_id, VBufferID buffer_id); -extern void verse_send_t_buffer_unsubscribe(VNodeID node_id, VBufferID buffer_id); -extern void verse_send_t_text_set(VNodeID node_id, VBufferID buffer_id, uint32 pos, uint32 length, const char *text); - -extern void verse_send_c_curve_create(VNodeID node_id, VLayerID curve_id, const char *name, uint8 dimensions); -extern void verse_send_c_curve_destroy(VNodeID node_id, VLayerID curve_id); -extern void verse_send_c_curve_subscribe(VNodeID node_id, VLayerID curve_id); -extern void verse_send_c_curve_unsubscribe(VNodeID node_id, VLayerID curve_id); -extern void verse_send_c_key_set(VNodeID node_id, VLayerID curve_id, uint32 key_id, uint8 dimensions, const real64 *pre_value, const uint32 *pre_pos, const real64 *value, real64 pos, const real64 *post_value, const uint32 *post_pos); -extern void verse_send_c_key_destroy(VNodeID node_id, VLayerID curve_id, uint32 key_id); - -extern void verse_send_a_buffer_create(VNodeID node_id, VBufferID buffer_id, const char *name, VNABlockType type, real64 frequency); -extern void verse_send_a_buffer_destroy(VNodeID node_id, VBufferID buffer_id); -extern void verse_send_a_buffer_subscribe(VNodeID node_id, VBufferID layer_id); -extern void verse_send_a_buffer_unsubscribe(VNodeID node_id, VBufferID layer_id); -extern void verse_send_a_block_set(VNodeID node_id, VLayerID buffer_id, uint32 block_index, VNABlockType type, const VNABlock *samples); -extern void verse_send_a_block_clear(VNodeID node_id, VLayerID buffer_id, uint32 block_index); -extern void verse_send_a_stream_create(VNodeID node_id, VLayerID stream_id, const char *name); -extern void verse_send_a_stream_destroy(VNodeID node_id, VLayerID stream_id); -extern void verse_send_a_stream_subscribe(VNodeID node_id, VLayerID stream_id); -extern void verse_send_a_stream_unsubscribe(VNodeID node_id, VLayerID stream_id); -extern void verse_send_a_stream(VNodeID node_id, VLayerID stream_id, uint32 time_s, uint32 time_f, VNABlockType type, real64 frequency, const VNABlock *samples); - - -#if defined __cplusplus -} -#endif - -#endif /* VERSE_H */ diff --git a/extern/verse/dist/verse_header.h b/extern/verse/dist/verse_header.h deleted file mode 100644 index 3f3403265fd..00000000000 --- a/extern/verse/dist/verse_header.h +++ /dev/null @@ -1,409 +0,0 @@ -#if !defined VERSE_TYPES -#define VERSE_TYPES - -#include - -/* Release information. */ -#define V_RELEASE_NUMBER 6 -#define V_RELEASE_PATCH 1 -#define V_RELEASE_LABEL "" - -typedef unsigned char boolean; -typedef signed char int8; -typedef unsigned char uint8; -typedef short int16; -typedef unsigned short uint16; -typedef int int32; -typedef unsigned int uint32; -typedef float real32; -typedef double real64; - -#define V_REAL64_MAX 1.7976931348623158e+308 -#define V_REAL32_MAX 3.402823466e+38f - -#if !defined TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#define V_HOST_ID_SIZE (3 * (512 / 8)) /* The size of host IDs (keys), in 8-bit bytes. */ - -typedef enum { - V_NT_OBJECT = 0, - V_NT_GEOMETRY, - V_NT_MATERIAL, - V_NT_BITMAP, - V_NT_TEXT, - V_NT_CURVE, - V_NT_AUDIO, - V_NT_NUM_TYPES, - V_NT_SYSTEM = V_NT_NUM_TYPES, - V_NT_NUM_TYPES_NETPACK -} VNodeType; - -typedef uint32 VNodeID; -typedef uint16 VLayerID; /* Commonly used to identify layers, nodes that have them. */ -typedef uint16 VBufferID; /* Commonly used to identify buffers, nodes that have them. */ -typedef uint16 VNMFragmentID; - -typedef void * VSession; - -#define V_MAX_NAME_LENGTH_SHORT 16 -#define V_MAX_NAME_LENGTH_LONG 48 -#define V_MAX_NAME_PASS_LENGTH 128 - -typedef enum { - VN_OWNER_OTHER = 0, - VN_OWNER_MINE -} VNodeOwner; - -typedef enum { - VN_O_METHOD_PTYPE_INT8 = 0, - VN_O_METHOD_PTYPE_INT16, - VN_O_METHOD_PTYPE_INT32, - - VN_O_METHOD_PTYPE_UINT8, - VN_O_METHOD_PTYPE_UINT16, - VN_O_METHOD_PTYPE_UINT32, - - VN_O_METHOD_PTYPE_REAL32, - VN_O_METHOD_PTYPE_REAL64, - - VN_O_METHOD_PTYPE_REAL32_VEC2, - VN_O_METHOD_PTYPE_REAL32_VEC3, - VN_O_METHOD_PTYPE_REAL32_VEC4, - - VN_O_METHOD_PTYPE_REAL64_VEC2, - VN_O_METHOD_PTYPE_REAL64_VEC3, - VN_O_METHOD_PTYPE_REAL64_VEC4, - - VN_O_METHOD_PTYPE_REAL32_MAT4, - VN_O_METHOD_PTYPE_REAL32_MAT9, - VN_O_METHOD_PTYPE_REAL32_MAT16, - - VN_O_METHOD_PTYPE_REAL64_MAT4, - VN_O_METHOD_PTYPE_REAL64_MAT9, - VN_O_METHOD_PTYPE_REAL64_MAT16, - - VN_O_METHOD_PTYPE_STRING, - - VN_O_METHOD_PTYPE_NODE, - VN_O_METHOD_PTYPE_LAYER -} VNOParamType; - -typedef union { - int8 vint8; - int16 vint16; - int32 vint32; - uint8 vuint8; - uint16 vuint16; - uint32 vuint32; - real32 vreal32; - real64 vreal64; - real32 vreal32_vec[4]; - real32 vreal32_mat[16]; - real64 vreal64_vec[4]; - real64 vreal64_mat[16]; - char *vstring; - VNodeID vnode; - VLayerID vlayer; -} VNOParam; - -#define VN_TAG_MAX_BLOB_SIZE 500 - -typedef enum { - VN_TAG_BOOLEAN = 0, - VN_TAG_UINT32, - VN_TAG_REAL64, - VN_TAG_STRING, - VN_TAG_REAL64_VEC3, - VN_TAG_LINK, - VN_TAG_ANIMATION, - VN_TAG_BLOB, - VN_TAG_TYPE_COUNT -} VNTagType; - -typedef enum { - VN_TAG_GROUP_SIZE = 16, - VN_TAG_NAME_SIZE = 16, - VN_TAG_FULL_NAME_SIZE = 64, - VN_TAG_STRING_SIZE = 128 -} VNTagConstants; - -typedef union { - boolean vboolean; - uint32 vuint32; - real64 vreal64; - char *vstring; - real64 vreal64_vec3[3]; - VNodeID vlink; - struct { - VNodeID curve; - uint32 start; - uint32 end; - } vanimation; - struct { - uint16 size; - void *blob; - } vblob; -} VNTag; - -typedef enum { - VN_S_CONNECT_NAME_SIZE = 32, - VN_S_CONNECT_KEY_SIZE = 4, - VN_S_CONNECT_DATA_SIZE = 32, - VS_S_CONNECT_HOSTID_PRIVATE_SIZE = 3 * 2048 / 8, - VS_S_CONNECT_HOSTID_PUBLIC_SIZE = 2 * 2048 / 8 -} VNSConnectConstants; - -typedef enum { - VN_FORMAT_REAL32, - VN_FORMAT_REAL64 -} VNRealFormat; - -typedef struct { - real32 x, y, z, w; -} VNQuat32; - -typedef struct { - real64 x, y, z, w; -} VNQuat64; - -typedef enum { - VN_O_METHOD_GROUP_NAME_SIZE = 16, - VN_O_METHOD_NAME_SIZE = 16, - VN_O_METHOD_SIG_SIZE = 256 -} VNOMethodConstants; - -typedef void VNOPackedParams; /* Opaque type. */ - -typedef enum { - VN_G_LAYER_VERTEX_XYZ = 0, - VN_G_LAYER_VERTEX_UINT32, - VN_G_LAYER_VERTEX_REAL, - VN_G_LAYER_POLYGON_CORNER_UINT32 = 128, - VN_G_LAYER_POLYGON_CORNER_REAL, - VN_G_LAYER_POLYGON_FACE_UINT8, - VN_G_LAYER_POLYGON_FACE_UINT32, - VN_G_LAYER_POLYGON_FACE_REAL -} VNGLayerType; - -typedef enum { - VN_M_LIGHT_DIRECT = 0, - VN_M_LIGHT_AMBIENT, - VN_M_LIGHT_DIRECT_AND_AMBIENT, - VN_M_LIGHT_BACK_DIRECT, - VN_M_LIGHT_BACK_AMBIENT, - VN_M_LIGHT_BACK_DIRECT_AND_AMBIENT -} VNMLightType; - -typedef enum { - VN_M_NOISE_PERLIN_ZERO_TO_ONE = 0, - VN_M_NOISE_PERLIN_MINUS_ONE_TO_ONE, - VN_M_NOISE_POINT_ZERO_TO_ONE, - VN_M_NOISE_POINT_MINUS_ONE_TO_ONE -} VNMNoiseType; - -typedef enum { - VN_M_RAMP_SQUARE = 0, - VN_M_RAMP_LINEAR, - VN_M_RAMP_SMOOTH -} VNMRampType; - -typedef enum { - VN_M_RAMP_RED = 0, - VN_M_RAMP_GREEN, - VN_M_RAMP_BLUE -} VNMRampChannel; - -typedef struct { - real64 pos; - real64 red; - real64 green; - real64 blue; -} VNMRampPoint; - -typedef enum { - VN_M_BLEND_FADE = 0, - VN_M_BLEND_ADD, - VN_M_BLEND_SUBTRACT, - VN_M_BLEND_MULTIPLY, - VN_M_BLEND_DIVIDE, -} VNMBlendType; - -typedef enum { - VN_M_FT_COLOR = 0, - VN_M_FT_LIGHT, - VN_M_FT_REFLECTION, - VN_M_FT_TRANSPARENCY, - VN_M_FT_VOLUME, - VN_M_FT_VIEW, - VN_M_FT_GEOMETRY, - VN_M_FT_TEXTURE, - VN_M_FT_NOISE, - VN_M_FT_BLENDER, - VN_M_FT_CLAMP, - VN_M_FT_MATRIX, - VN_M_FT_RAMP, - VN_M_FT_ANIMATION, - VN_M_FT_ALTERNATIVE, - VN_M_FT_OUTPUT -} VNMFragmentType; - -typedef union { - struct { - real64 red; - real64 green; - real64 blue; - } color; - struct { - uint8 type; - real64 normal_falloff; - VNodeID brdf; - char brdf_r[16]; - char brdf_g[16]; - char brdf_b[16]; - } light; - struct { - real64 normal_falloff; - } reflection; - struct { - real64 normal_falloff; - real64 refraction_index; - } transparency; - struct { - real64 diffusion; - real64 col_r; - real64 col_g; - real64 col_b; - } volume; - struct { - char layer_r[16]; - char layer_g[16]; - char layer_b[16]; - } geometry; - struct{ - VNodeID bitmap; - char layer_r[16]; - char layer_g[16]; - char layer_b[16]; - boolean filtered; - VNMFragmentID mapping; - } texture; - struct { - uint8 type; - VNMFragmentID mapping; - } noise; - struct { - uint8 type; - VNMFragmentID data_a; - VNMFragmentID data_b; - VNMFragmentID control; - } blender; - struct { - boolean min; - real64 red; - real64 green; - real64 blue; - VNMFragmentID data; - } clamp; - struct { - real64 matrix[16]; - VNMFragmentID data; - } matrix; - struct { - uint8 type; - uint8 channel; - VNMFragmentID mapping; - uint8 point_count; - VNMRampPoint ramp[48]; - } ramp; - struct { - char label[16]; - } animation; - struct { - VNMFragmentID alt_a; - VNMFragmentID alt_b; - } alternative; - struct { - char label[16]; - VNMFragmentID front; - VNMFragmentID back; - } output; -} VMatFrag; - -typedef enum { - VN_B_LAYER_UINT1 = 0, - VN_B_LAYER_UINT8, - VN_B_LAYER_UINT16, - VN_B_LAYER_REAL32, - VN_B_LAYER_REAL64 -} VNBLayerType; - -#define VN_B_TILE_SIZE 8 - -typedef union{ - uint8 vuint1[8]; - uint8 vuint8[64]; - uint16 vuint16[64]; - real32 vreal32[64]; - real64 vreal64[64]; -} VNBTile; - -typedef enum { - VN_T_CONTENT_LANGUAGE_SIZE = 32, - VN_T_CONTENT_INFO_SIZE = 256, - VN_T_BUFFER_NAME_SIZE = 16, - VN_T_MAX_TEXT_CMD_SIZE = 1450 -} VNTConstants; - -/* This is how many *samples* are included in a block of the given type. Not bytes. */ -typedef enum { - VN_A_BLOCK_SIZE_INT8 = 1024, - VN_A_BLOCK_SIZE_INT16 = 512, - VN_A_BLOCK_SIZE_INT24 = 384, - VN_A_BLOCK_SIZE_INT32 = 256, - VN_A_BLOCK_SIZE_REAL32 = 256, - VN_A_BLOCK_SIZE_REAL64 = 128 -} VNAConstants; - -typedef enum { - VN_A_BLOCK_INT8, - VN_A_BLOCK_INT16, - VN_A_BLOCK_INT24, - VN_A_BLOCK_INT32, - VN_A_BLOCK_REAL32, - VN_A_BLOCK_REAL64 -} VNABlockType; - -/* Audio commands take pointers to blocks of these. They are not packed as unions. */ -typedef union { - int8 vint8[VN_A_BLOCK_SIZE_INT8]; - int16 vint16[VN_A_BLOCK_SIZE_INT16]; - int32 vint24[VN_A_BLOCK_SIZE_INT24]; - int32 vint32[VN_A_BLOCK_SIZE_INT32]; - real32 vreal32[VN_A_BLOCK_SIZE_REAL32]; - real64 vreal64[VN_A_BLOCK_SIZE_REAL64]; -} VNABlock; - -extern void verse_set_port(uint16 port); -extern void verse_host_id_create(uint8 *id); -extern void verse_host_id_set(uint8 *id); -extern void verse_callback_set(void *send_func, void *callback, void *user_data); -extern void verse_callback_update(uint32 microseconds); -extern void verse_session_set(VSession session); -extern VSession verse_session_get(void); -extern void verse_session_destroy(VSession session); -extern size_t verse_session_get_size(void); -extern VNodeID verse_session_get_avatar(void); -extern void verse_session_get_time(uint32 *seconds, uint32 *fractions); - -extern VNOPackedParams * verse_method_call_pack(uint32 param_count, const VNOParamType *param_type, const VNOParam *params); -extern boolean verse_method_call_unpack(const VNOPackedParams *data, uint32 param_count, const VNOParamType *param_type, VNOParam *params); - -/* -#define V_PRINT_SEND_COMMANDS -#define V_PRINT_RECEIVE_COMMANDS -*/ - -#endif /* VERSE_TYPES */ diff --git a/extern/verse/dist/verse_ms.c b/extern/verse/dist/verse_ms.c deleted file mode 100644 index 84f3fdb837b..00000000000 --- a/extern/verse/dist/verse_ms.c +++ /dev/null @@ -1,286 +0,0 @@ -/* - * A helper library to send and parse master server pings. See the relevant - * header for details. - * - * This code was written in 2006 by Emil Brink. It is released as public domain. -*/ - -#include -#include -#include -#include - -#include "verse.h" -#include "verse_ms.h" - -/* Build and send a MS:GET packet. */ -void verse_ms_get_send(const char *address, int fields, const char *tags) -{ - char req[128]; - - strcpy(req, "MS:GET IP="); - if(fields & VERSE_MS_FIELD_DESCRIPTION) - strcat(req, "DE"); - if(tags != NULL) - { - strcat(req, " TA="); - strcat(req, tags); - } - verse_send_ping(address, req); -} - -/* Skip assign, i.e. "NAME=" string, at . Stores name into , and then updates - * it. Returns NULL on parse error, in which case the pointer is not advanced. -*/ -static const char * skip_assign(char **put, const char *msg) -{ - if(isalpha(*msg)) - { - char *p = put != NULL ? *put : NULL; - - if(p != NULL) - *p++ = *msg; - msg++; - while(*msg && (isalnum(*msg) || *msg == '_')) - { - if(p != NULL) - *p++ = *msg; - msg++; - } - if(*msg == '=') - { - if(p != NULL) - *p++ = '\0'; - if(put != NULL) - *put = p; - return msg + 1; - } - } - return NULL; -} - -/** Skip value at , optionally storing de-quoted version through , - * which is advanced. Returns NULL on parse error, without updating . -*/ -static const char * skip_value(char **put, const char *msg) -{ - char *p = (put != NULL) ? *put : NULL; - - if(*msg == '"') - { - msg++; - while(*msg != '\0' && *msg != '"') - { - if(*msg == '\\') - { - if(msg[1] != '\0') - msg++; - else - return NULL; - } - if(p != NULL) - *p++ = *msg; - msg++; - } - if(*msg == '"') - { - if(p != NULL) - *p++ = '\0'; - if(put != NULL) - *put = p; - msg++; - if(*msg == '\0' || isspace(*msg)) - return msg; - } - return NULL; - } - while(*msg && !isspace(*msg)) - { - if(*msg == '"') - return NULL; - if(p != NULL) - *p++ = *msg; - msg++; - } - if(p != NULL) - *p++ = '\0'; - if(put != NULL) - *put = p; - return msg; -} - -static const char * put_field(VMSField *field, char **put, const char *src) -{ - const char *ptr; - char *base = *put; - - if((ptr = skip_assign(put, src)) != NULL && ptr - src > 1) - { - field->name = base; - src = ptr; - base = *put; - if((ptr = skip_value(put, src)) != NULL) - { - field->value = base; - return ptr; - } - } - return NULL; -} - -static int cmp_fields(const void *a, const void *b) -{ - return strcmp(((const VMSField *) a)->name, ((const VMSField *) b)->name); -} - -VMSServer ** verse_ms_list_parse(const char *msg) -{ - const char *word[384]; /* Takes quite a lot of stack space. */ - const char *ptr; - char *put; - size_t num_word = 0, i, j, num_ip = 0, num_field, space = 0; - VMSServer **desc, *next; - VMSField *field; - - if(strncmp(msg, "MS:LIST", 7) == 0) - msg += 7; - if(*msg != ' ') - return NULL; - - /* Step one: split the string into words, at whitespace. Split is aware - * of quoting rules for value assignment, this is crucial. This split is - * non-invasive, meaning each "word" will be a suffix. - */ - while(*msg) - { - while(isspace(*msg)) - msg++; - ptr = skip_assign(NULL, msg); - if(ptr != NULL) - { - space += ptr - msg; - word[num_word++] = msg; - msg = ptr; - ptr = skip_value(NULL, msg); - if(ptr == NULL) - { - fprintf(stderr, "Parse error\n"); - return NULL; - } - space += ptr - msg + 1; - msg = ptr; - } - else if(*msg != '\0') - { - fprintf(stderr, "Parse error\n"); - return NULL; - } - } - /* Now, count how many words begin with "IP=". */ - for(i = 0; i < num_word; i++) - { - if(strncmp(word[i], "IP=", 3) == 0) - num_ip++; - } -/* printf("found %u IPs, %u bytes\n", num_ip, space); - printf("%u IP and %u words -> %u fields total\n", num_ip, num_word, num_word - num_ip); -*/ num_field = num_word - num_ip; - /* Allocate the descriptions. */ -/* printf("allocating %u bytes\n", (num_ip + 1) * (sizeof *desc) + num_ip * sizeof **desc + num_field * sizeof (VMSField) + space); - printf(" %u for pointers, %u for structs, %u for fields, %u string\n", - (num_ip + 1) * (sizeof *desc), num_ip * sizeof **desc, num_field * sizeof (VMSField), space); -*/ desc = malloc((num_ip + 1) * (sizeof *desc) + num_ip * sizeof **desc + num_field * sizeof (VMSField) + space); - next = (VMSServer *) (desc + (num_ip + 1)); -/* printf("desc store at %u\n", (char *) next - (char *) desc);*/ - field = (VMSField *) (next + num_ip); -/* printf("field store at %u\n", (char *) field - (char *) desc);*/ - put = (char *) (field + num_field); -/* printf("string store at %u\n", put - (char *) desc);*/ - for(i = j = 0; i < num_word;) - { - if(strncmp(word[i], "IP=", 3) == 0) - { - desc[j] = next; - next->ip = put; - ptr = skip_value(&put, word[i] + 3); - next->num_fields = 0; - next->field = field; - for(i++; i < num_word && strncmp(word[i], "IP=", 3) != 0; i++, next->num_fields++, field++) - put_field(&next->field[next->num_fields], &put, word[i]); - if(next->num_fields > 0) /* Sort the fields, for binary search later. */ - qsort(next->field, next->num_fields, sizeof *next->field, cmp_fields); - j++; - next++; - } - else - i++; - } - desc[j] = NULL; - return desc; -} - -/* A binary search, exploiting that the fields are sorted. */ -static const VMSField * field_find(const VMSServer *ms, const char *name) -{ - int lo, hi, mid, rel; - - if(ms == NULL || name == NULL) - return NULL; - lo = 0; - hi = ms->num_fields; - while(lo <= hi) - { - mid = (lo + hi) / 2; - rel = strcmp(name, ms->field[mid].name); - if(rel == 0) - return &ms->field[mid]; - if(rel < 0) - hi = mid - 1; - else - lo = mid + 1; - } - return NULL; -} - -int verse_ms_field_exists(const VMSServer *ms, const char *name) -{ - if(ms == NULL || name == NULL) - return 0; - return field_find(ms, name) != NULL; -} - -const char * verse_ms_field_value(const VMSServer *ms, const char *name) -{ - const VMSField *f; - - if((f = field_find(ms, name)) != NULL) - return f->value; - return NULL; -} - -#if defined VERSE_MS_STANDALONE - -int main(void) -{ - VMSServer **servers = verse_ms_list_parse("MS:LIST IP=127.0.0.1:4951 DE=\"A test server, mainly for Eskil\" COOL=yes BACKUP=daily LANG=sv_SE " - "IP=130.237.221.74 DE=\"Test server on a puny laptop\" COOL=yes DORKY=no OPEN=absolutely " - "IP=127.0.0.1:5151 DE=\"This is a back slash: '\\\\', cool huh?\" " - "IP=127.0.0.1:6676 DE=\"a quote looks like this: \\\"\" IP=127.0.0.1:1122 "); - - if(servers != NULL) - { - int i, j; - - printf("Server info:\n"); - for(i = 0; servers[i] != NULL; i++) - { - printf("%u: IP=%s\n", i, servers[i]->ip); - for(j = 0; j < servers[i]->num_fields; j++) - printf(" %s='%s'\n", servers[i]->field[j].name, servers[i]->field[j].value); - } - free(servers); - } - return EXIT_SUCCESS; -} - -#endif /* VERSE_MS_STANDALONE */ diff --git a/extern/verse/dist/verse_ms.h b/extern/verse/dist/verse_ms.h deleted file mode 100644 index 5a27d3fd446..00000000000 --- a/extern/verse/dist/verse_ms.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This is Verse Master Server, a small help library to aid application developers - * make their applications interact with a Verse master server. - * - * There are two steps to the process: - * - * 1) Send a MS:GET request to a master server. This is done by the verse_ms_get_send() - * function, which calls verse_send_ping() internally. - * - * 2) Parse any returned MS:LIST packets. This is a two-step process. The application - * still owns the ping callback, and will need to check for received pings that - * start with MS:LIST, and call the verse_ms_list_parse() function to parse those. - * - * A successfully parsed MS:LIST packet will result in an array of VMSServer pointers - * being returned. Each VMSServer instance describes one server. Use the provided - * functions to query each server structure. - * - * The application should call free() on the returned vector, whenever it is done with - * the data (perhaps after copying it into application-defined data structures). - * - * For a lot more detail about the Verse master server protocol, please see - * the spec at . - * - * This code was written in 2006 by Emil Brink. It is released as public domain. - * -*/ - -#define VERSE_MS_VERSION "1.0" - -#if defined __cplusplus -extern "C" { -#endif - -typedef struct { - const char *name; /* Field name. Upper-case. */ - const char *value; /* Field value. Fully parsed, might contain spaces. */ -} VMSField; - -typedef struct { - const char *ip; /* IP address of server, in dotted decimal:port. */ - unsigned int num_fields; /* Number of fields of extra info. */ - VMSField *field; /* Vector of fields, or NULL if none. */ -} VMSServer; - -/* Formats and sends a MS:GET ping packet to the master server. The argument - * should be a combination of VERSE_MS_FIELD_ mask values. If is set, it should - * be a comma-separated set of include/exclude tags, like "a,b,-c,d,-e". -*/ -#define VERSE_MS_FIELD_DESCRIPTION (1 << 0) -extern void verse_ms_get_send(const char *address, int fields, const char *tags); - -/* Parses a master server response. This will be a string of the form "MS:LIST IP=blah ...", - * which is split into one struct per IP, and any additional fields parsed (unquoted etc). - * Returns an array of VMSServer pointers, which is NULL-terminated. Returns NULL if there - * was a parse error somewhere in the string, no partial success is possible. -*/ -extern VMSServer ** verse_ms_list_parse(const char *list); - -/* This is the only standard field name, currently. */ -#define VERSE_MS_FIELD_DESCRIPTION_NAME "DE" /* Human-readable server description. */ - -/* Checks wether the given server has a field with the given name. */ -extern int verse_ms_field_exists(const VMSServer *ms, const char *name); - -/* Returns the value for the named field in the given server, if present. - * If not, NULL is returned. -*/ -extern const char * verse_ms_field_value(const VMSServer *ms, const char *name); - -#if defined __cplusplus -} -#endif diff --git a/extern/verse/dist/vs_connection.c b/extern/verse/dist/vs_connection.c deleted file mode 100644 index 06614a5dc66..00000000000 --- a/extern/verse/dist/vs_connection.c +++ /dev/null @@ -1,179 +0,0 @@ -#include - -#include "v_cmd_gen.h" - -#if !defined(V_GENERATE_FUNC_MODE) - -#include "verse.h" -#include "v_util.h" - -#define VS_CONNECTION_CHUNK_SIZE 64 - -typedef struct{ - VSession *session; - unsigned int session_count; -} VSSubscriptionList; - -typedef struct{ - VSession session; - uint32 node_id; - char name[128]; - char pass[128]; -} VSConnection; - -static struct { - VSConnection *connection; - unsigned int connection_length; - VSSubscriptionList **list; - unsigned int list_length; - unsigned int current_session; -} VSConnectionStorage; - -void vs_init_connection_storage(void) -{ - VSConnectionStorage.connection = NULL; - VSConnectionStorage.connection_length = 0; - VSConnectionStorage.list = NULL; - VSConnectionStorage.list_length = 0; - VSConnectionStorage.current_session = 0; -} - -void vs_add_new_connection(VSession session, const char *name, const char *pass, VNodeID node_id) -{ - VSConnection *conn; - - if(VSConnectionStorage.connection_length % VS_CONNECTION_CHUNK_SIZE == 0) - VSConnectionStorage.connection = realloc(VSConnectionStorage.connection, (sizeof *VSConnectionStorage.connection) * (VSConnectionStorage.connection_length + VS_CONNECTION_CHUNK_SIZE)); - conn = &VSConnectionStorage.connection[VSConnectionStorage.connection_length]; - - conn->session = session; - conn->node_id = node_id; - v_strlcpy(conn->name, name, sizeof conn->name); - v_strlcpy(conn->pass, pass, sizeof conn->pass); - - VSConnectionStorage.connection_length++; -} - -uint32 vs_get_avatar(void) -{ - return VSConnectionStorage.connection[VSConnectionStorage.current_session].node_id; -} - -VSession vs_get_session(void) -{ - return VSConnectionStorage.connection[VSConnectionStorage.current_session].session; -} - -const char * vs_get_user_name(void) -{ - return VSConnectionStorage.connection[VSConnectionStorage.current_session].name; -} - -const char * vs_get_user_pass(void) -{ - return VSConnectionStorage.connection[VSConnectionStorage.current_session].pass; -} - - -void vs_remove_connection(void) -{ - unsigned int i, j; - VSession *session; - VSSubscriptionList *list; - - session = VSConnectionStorage.connection[VSConnectionStorage.current_session].session; - for(i = 0; i < VSConnectionStorage.list_length; i++) - { - list = VSConnectionStorage.list[i]; - for(j = 0; j < list->session_count && list->session[j] != session; j++); - if(j < list->session_count) - list->session[j] = list->session[--list->session_count]; - } - j = --VSConnectionStorage.connection_length; - - if(VSConnectionStorage.current_session < j) - { - VSConnectionStorage.connection[VSConnectionStorage.current_session].session = VSConnectionStorage.connection[j].session; - VSConnectionStorage.connection[VSConnectionStorage.current_session].node_id = VSConnectionStorage.connection[j].node_id; - } - else - VSConnectionStorage.current_session = 0; -} - -void vs_set_next_session(void) -{ - if(++VSConnectionStorage.current_session >= VSConnectionStorage.connection_length) - VSConnectionStorage.current_session = 0; - if(VSConnectionStorage.connection_length != 0) - verse_session_set(VSConnectionStorage.connection[VSConnectionStorage.current_session].session); -} - -VSSubscriptionList *vs_create_subscription_list(void) -{ - VSSubscriptionList *list; - list = malloc(sizeof *list); - if(VSConnectionStorage.list_length % VS_CONNECTION_CHUNK_SIZE == 0) - VSConnectionStorage.list = realloc(VSConnectionStorage.list, (sizeof *VSConnectionStorage.list) * (VSConnectionStorage.list_length + VS_CONNECTION_CHUNK_SIZE)); - VSConnectionStorage.list[VSConnectionStorage.list_length] = list; - list->session = NULL; - list->session_count = 0; - VSConnectionStorage.list_length++; - return list; -} - -void vs_destroy_subscription_list(VSSubscriptionList *list) -{ - unsigned int i; - - if(list == NULL) - return; - if(list->session != NULL) - free(list->session); - for(i = 0; i < VSConnectionStorage.list_length && VSConnectionStorage.list[i] != list; i++) - ; - if(i < VSConnectionStorage.list_length) - VSConnectionStorage.list[i] = VSConnectionStorage.list[--VSConnectionStorage.list_length]; - free(list); -} - -/* Returns 1 if subscriber was added, 0 if not (typically meaning it was already on the list). */ -int vs_add_new_subscriptor(VSSubscriptionList *list) -{ - unsigned int i; - if(list->session_count % VS_CONNECTION_CHUNK_SIZE == 0) - list->session = realloc(list->session, (sizeof *list->session) * (list->session_count + VS_CONNECTION_CHUNK_SIZE)); - for(i = 0; i < list->session_count; i++) - if(list->session[i] == VSConnectionStorage.connection[VSConnectionStorage.current_session].session) - return 0; - list->session[list->session_count] = VSConnectionStorage.connection[VSConnectionStorage.current_session].session; - list->session_count++; - return 1; -} - - -void vs_remove_subscriptor(VSSubscriptionList *list) -{ - unsigned int i; - VSession *session; - session = VSConnectionStorage.connection[VSConnectionStorage.current_session].session; - for(i = 0; i < list->session_count && list->session[i] != session; i++); - if(i < list->session_count) - list->session[i] = list->session[--list->session_count]; -} - -size_t vs_get_subscript_count(const VSSubscriptionList *list) -{ - return list != NULL ? list->session_count : 0; -} - -void vs_set_subscript_session(VSSubscriptionList *list, unsigned int session) -{ - verse_session_set(list->session[session]); -} - -void vs_reset_subscript_session(void) -{ - verse_session_set(VSConnectionStorage.connection[VSConnectionStorage.current_session].session); -} - -#endif diff --git a/extern/verse/dist/vs_main.c b/extern/verse/dist/vs_main.c deleted file mode 100644 index 3b388eecc56..00000000000 --- a/extern/verse/dist/vs_main.c +++ /dev/null @@ -1,180 +0,0 @@ -/* -** A simple Verse server. -*/ - -#include -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "v_network.h" -#include "v_util.h" -#include "vs_server.h" - -extern VNodeID vs_node_create(VNodeID owner_id, unsigned int type); -extern void callback_send_node_destroy(void *user_data, VNodeID node_id); -extern void vs_reset_owner(VNodeID owner_id); - -static void callback_send_connect(void *user, const char *name, const char *pass, const char *address, const uint8 *host_id) -{ - VNodeID avatar; - VSession *session; - - printf("Connecting '%s'\n", name); - if(TRUE) - { - avatar = vs_node_create(~0, V_NT_OBJECT); - session = verse_send_connect_accept(avatar, address, NULL); - vs_add_new_connection(session, name, pass, avatar); -/* vs_avatar_init(avatar, name);*/ - } - else - { - verse_send_connect_terminate(address, "I'm sorry but you are not welcome here."); - } -} - -static void callback_send_connect_terminate(void *user, char *address, char *bye) -{ - printf("callback_send_connect_terminate\n"); - vs_reset_owner(vs_get_avatar()); - callback_send_node_destroy(NULL, vs_get_avatar()); - verse_session_destroy(vs_get_session()); - vs_remove_connection(); -} - -static void vs_load_host_id(const char *file_name) -{ - FILE *f; - uint8 id[V_HOST_ID_SIZE]; - size_t got; - - /* Attempt to read key from given filename. Fails silently. */ - if((f = fopen(file_name, "rb")) != NULL) - { - if((got = fread(id, 1, sizeof id, f)) > 0) - { - printf("Loaded %u-bit host ID key successfully\n", 8 * (got / 3)); - verse_host_id_set(id); - } - fclose(f); - if(got) - return; - } - /* If file didn't open, or reading failed, generate a new key and write it out. */ - verse_host_id_create(id); - verse_host_id_set(id); - if((f = fopen(file_name, "wb")) != NULL) - { - if(fwrite(id, sizeof id, 1, f) != 1) - fprintf(stderr, "Warning: Couldn't write host ID to \"%s\"\n", file_name); - fclose(f); - } - else - fprintf(stderr, "Warning: Couldn't open \"%s\" for host ID writing\n", file_name); -} - -static void cb_sigint_handler(int sig) -{ - if(sig == SIGINT) - { - printf("Verse server terminating\n"); - exit(EXIT_SUCCESS); - } -} - -static void callback_send_ping(void *user, const char *address, const char *message) -{ - if(strncmp(message, "DESCRIBE", 8) == 0 && message[8] == ' ') - vs_master_handle_describe(address, message + 9); -} - -static void usage(void) -{ - printf("Verse server usage:\n"); - printf(" -h\t\t\tShow this usage information.\n"); - printf(" -ms\t\t\tRegisters the server with a master server at the address\n"); - printf(" \t\t\tgiven with the -ms:ip= option. Off by default.\n"); - printf(" -ms:ip=IP[:PORT]\tSet master server to register with. Implies -ms.\n"); - printf(" \t\t\tThe default address is <%s>.\n", vs_master_get_address()); - printf(" -ms:de=DESC\t\tSet description, sent to master server.\n"); - printf(" -ms:ta=TAGS\t\tSet tags, sent to master server.\n"); - printf(" -port=PORT\t\tSet port to use for incoming connections.\n"); - printf(" -version\t\tPrint version information and exit.\n"); -} - -int main(int argc, char **argv) -{ - uint32 i, seconds, fractions, port = VERSE_STD_CONNECT_PORT; - - signal(SIGINT, cb_sigint_handler); - - vs_master_set_address("master.uni-verse.org"); /* The default master address. */ - vs_master_set_enabled(FALSE); /* Make sure master server support is disabled. */ - for(i = 1; i < (uint32) argc; i++) - { - if(strcmp(argv[i], "-h") == 0) - { - usage(); - return EXIT_SUCCESS; - } - else if(strcmp(argv[i], "-ms") == 0) - vs_master_set_enabled(TRUE); - else if(strncmp(argv[i], "-ms:ip=", 7) == 0) - { - vs_master_set_address(argv[i] + 7); - vs_master_set_enabled(TRUE); - } - else if(strncmp(argv[i], "-ms:de=", 7) == 0) - vs_master_set_desc(argv[i] + 7); - else if(strncmp(argv[i], "-ms:ta=", 7) == 0) - vs_master_set_tags(argv[i] + 7); - else if(strncmp(argv[i], "-port=", 6) == 0) - port = strtoul(argv[i] + 6, NULL, 0); - else if(strcmp(argv[i], "-version") == 0) - { - printf("r%up%u%s\n", V_RELEASE_NUMBER, V_RELEASE_PATCH, V_RELEASE_LABEL); - return EXIT_SUCCESS; - } - else - fprintf(stderr, "Ignoring unknown argument \"%s\", try -h for help\n", argv[i]); - } - - printf("Verse Server r%up%u%s by Eskil Steenberg \n", V_RELEASE_NUMBER, V_RELEASE_PATCH, V_RELEASE_LABEL); - verse_set_port(port); /* The Verse standard port. */ - printf(" Listening on port %d\n", port); - - /* Seed the random number generator. Still rather too weak for crypto, I guess. */ - v_n_get_current_time(&seconds, &fractions); - srand(seconds ^ fractions); - - vs_load_host_id("host_id.rsa"); - vs_init_node_storage(); - vs_o_callback_init(); - vs_g_callback_init(); - vs_m_callback_init(); - vs_b_callback_init(); - vs_t_callback_init(); - vs_c_callback_init(); - vs_a_callback_init(); - vs_h_callback_init(); - init_callback_node_storage(); - verse_callback_set(verse_send_ping, callback_send_ping, NULL); - verse_callback_set(verse_send_connect, callback_send_connect, NULL); - verse_callback_set(verse_send_connect_terminate, callback_send_connect_terminate, NULL); - - while(TRUE) - { - vs_set_next_session(); - verse_callback_update(1000000); - vs_master_update(); - } - return EXIT_SUCCESS; -} - -#endif /* V_GENERATE_FUNC_MODE */ diff --git a/extern/verse/dist/vs_master.c b/extern/verse/dist/vs_master.c deleted file mode 100644 index 4fa020d58b6..00000000000 --- a/extern/verse/dist/vs_master.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Master server communication code. -*/ - -#include -#include - -#include "verse.h" -#include "v_util.h" -#include "vs_server.h" - -#define MASTER_SERVER_PERIOD (60.0) /* Period between ANNOUNCE to master server, in seconds. */ - -static struct { - boolean enabled; - boolean started; - const char *master; - char desc[64]; - const char *tags; - VUtilTimer timer; -} server_info; - -#define LEFT(d) (sizeof server_info.desc - (d - server_info.desc) - 1) - -void vs_master_set_enabled(boolean enabled) -{ - server_info.enabled = enabled; -} - -const char * vs_master_get_address(void) -{ - return server_info.master; -} - -void vs_master_set_address(const char *address) -{ - server_info.master = address; -} - -void vs_master_set_desc(const char *desc) -{ - const char *src = desc; - char *dst = server_info.desc; - - for(; *src != '\0' && LEFT(dst) > 0;) - { - if(*src == '"') - { - if(LEFT(dst) < 2) - break; - *dst++ = '\\'; - } - else if(*src == '\\') - { - if(LEFT(dst) < 2) - break; - *dst++ = '\\'; - } - *dst++ = *src++; - } - *dst = '\0'; -} - -void vs_master_set_tags(const char *tags) -{ - server_info.tags = tags; /* This needs more protection, instead of relying on the master server. */ -} - -void vs_master_update(void) -{ - if(!server_info.enabled || server_info.master == NULL) - return; - - if(!server_info.started) - { - v_timer_start(&server_info.timer); - v_timer_advance(&server_info.timer, MASTER_SERVER_PERIOD); - server_info.started = TRUE; - return; - } - if(v_timer_elapsed(&server_info.timer) < MASTER_SERVER_PERIOD) - return; - verse_send_ping(server_info.master, "MS:ANNOUNCE"); - v_timer_start(&server_info.timer); -/* printf("MS:ANNOUNCE sent to %s\n", server_info.master);*/ -} - -/* Check if a description request, of the form "A,B,C,...,D" includes the given keyword. This needs to - * do more than just a simple strstr(), since the keyword may be a prefix. Shades of OpenGL extensions. -*/ -static int desc_has_keyword(const char *desc, const char *keyword) -{ - const char *ptr; - - if(desc == NULL || *desc == '\0') /* Quick-check for empty description. */ - return 0; - - if((ptr = strstr(desc, keyword)) != NULL) - { - size_t kl = strlen(keyword); - - return ptr[kl] == ',' || ptr[kl] == '\0'; - } - return 0; -} - -static int keyword_fits(size_t used, size_t max, const char *key, const char *value) -{ - size_t vsize = 0; - - if(key != NULL && value != NULL) - vsize += 1 + strlen(key) + 1 + 1 + strlen(value) + 1; - - return max - 1 - used >= vsize; -} - -static char * append_desc(char *buf, const char *key, const char *value) -{ - return buf + sprintf(buf, " %s=\"%s\"", key, value); -} - -void vs_master_handle_describe(const char *address, const char *message) -{ - char desc[1380] = "DESCRIPTION", *put = desc + 11; - - if(desc_has_keyword(message, "DE") && server_info.desc != NULL && keyword_fits(put - desc, sizeof desc, "DE", server_info.desc)) - put = append_desc(put, "DE", server_info.desc); - if(desc_has_keyword(message, "TA") && server_info.tags != NULL && keyword_fits(put - desc, sizeof desc, "TA", server_info.tags)) - put = append_desc(put, "TA", server_info.tags); - verse_send_ping(address, desc); -} diff --git a/extern/verse/dist/vs_node_audio.c b/extern/verse/dist/vs_node_audio.c deleted file mode 100644 index e69d3d9b3ec..00000000000 --- a/extern/verse/dist/vs_node_audio.c +++ /dev/null @@ -1,420 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -typedef struct { - void **data; - unsigned int length; - char name[16]; - VNABlockType type; - real64 frequency; - VSSubscriptionList *subscribers; -} VSNLayer; - -typedef struct { - char name[16]; - VSSubscriptionList *subscribers; -} VSNStream; - -typedef struct{ - VSNodeHead head; - VSNLayer *buffers; - unsigned int buffer_count; - VSNStream *streams; - unsigned int stream_count; -} VSNodeAudio; - -VSNodeAudio * vs_a_create_node(unsigned int owner) -{ - VSNodeAudio *node; - char name[48]; - unsigned int i; - - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_AUDIO); - sprintf(name, "Audio_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - node->buffer_count = 16; - node->buffers = malloc((sizeof *node->buffers) * node->buffer_count); - for(i = 0; i < node->buffer_count; i++) - node->buffers[i].name[0] = 0; - node->stream_count = 16; - node->streams = malloc((sizeof *node->streams) * node->stream_count); - for(i = 0; i < node->stream_count; i++) - node->streams[i].name[0] = 0; - - return node; -} - -void vs_a_destroy_node(VSNodeAudio *node) -{ - unsigned int i, j; - destroy_node_head(&node->head); - - for(i = 0; i < node->buffer_count; i++) - { - if(node->buffers[i].name[0] != 0) - { - for(j = 0; j < node->buffers[i].length; j++) - if(node->buffers[i].data[j] != NULL) - free(node->buffers[i].data[j]); - free(node->buffers[i].data); - } - } - free(node->buffers); - free(node->streams); - free(node); -} - -void vs_a_subscribe(VSNodeAudio *node) -{ - unsigned int i; - if(node == NULL) - return; - for(i = 0; i < node->buffer_count; i++) - if(node->buffers[i].name[0] != 0) - verse_send_a_buffer_create(node->head.id, i, node->buffers[i].name, node->buffers[i].type, - node->buffers[i].frequency); - for(i = 0; i < node->stream_count; i++) - if(node->streams[i].name[0] != 0) - verse_send_a_stream_create(node->head.id, i, node->streams[i].name); -} - -void vs_a_unsubscribe(VSNodeAudio *node) -{ - unsigned int i; - for(i = 0; i < node->buffer_count; i++) - if(node->buffers[i].name[0] != 0) - vs_remove_subscriptor(node->buffers[i].subscribers); - for(i = 0; i < node->stream_count; i++) - if(node->streams[i].name[0] != 0) - vs_remove_subscriptor(node->streams[i].subscribers); -} - -static void callback_send_a_stream_create(void *user, VNodeID node_id, VLayerID stream_id, const char *name) -{ - VSNodeAudio *node; - unsigned int i, j, count; - - node = (VSNodeAudio *) vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - - for(i = 0; i < node->stream_count; i++) - { - if(stream_id != i) - { - for(j = 0; name[j] == node->streams[i].name[j] && name[j] != 0; j++); - if(name[j] == node->streams[i].name[j]) - return; - } - } - if(stream_id >= node->stream_count || node->streams[stream_id].name[0] == 0) - { - for(stream_id = 0; stream_id < node->stream_count && node->streams[stream_id].name[0] != 0; stream_id++); - if(stream_id == node->stream_count) - { - stream_id = node->stream_count; - node->stream_count += 16; - node->streams = realloc(node->streams, (sizeof *node->streams) * node->stream_count); - for(i = stream_id; i < node->stream_count; i++) - node->streams[i].name[0] = 0; - } - node->streams[stream_id].subscribers = vs_create_subscription_list(); - } - for(i = 0; name[i] != 0 && i < 15; i++) - node->streams[stream_id].name[i] = name[i]; - node->streams[stream_id].name[i] = 0; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_a_stream_create(node_id, stream_id, name); - } - vs_reset_subscript_session(); -} - -static void callback_send_a_stream_destroy(void *user, VNodeID node_id, VLayerID stream_id) -{ - VSNodeAudio *node; - unsigned int i, count; - - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL || stream_id >= node->stream_count || node->streams[stream_id].name[0] == 0) - return; - vs_remove_subscriptor(node->streams[stream_id].subscribers); - node->streams[stream_id].name[0] = 0; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_a_stream_destroy(node_id, stream_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_a_buffer_create(void *user, VNodeID node_id, VBufferID buffer_id, const char *name, - VNABlockType type, real64 frequency) -{ - VSNodeAudio *node; - unsigned int i, j, count; - - if(frequency < 0.0) - return; - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - - for(i = 0; i < node->buffer_count; i++) - { - if(buffer_id != i) - { - for(j = 0; name[j] == node->buffers[i].name[j] && name[j] != 0; j++); - if(name[j] == node->buffers[i].name[j]) - return; - } - } - - if(buffer_id < node->buffer_count && node->buffers[buffer_id].name[0] != 0 && type != node->buffers[buffer_id].type) - { - free(node->buffers[buffer_id].data); - vs_destroy_subscription_list(node->buffers[buffer_id].subscribers); - node->buffers[buffer_id].name[0] = 0; - } - - if(buffer_id >= node->buffer_count || node->buffers[buffer_id].name[0] == 0) - { - for(buffer_id = 0; buffer_id < node->buffer_count && node->buffers[buffer_id].name[0] != 0; buffer_id++); - if(buffer_id == node->buffer_count) - { - buffer_id = node->buffer_count; - node->buffer_count += 16; - node->buffers = realloc(node->buffers, (sizeof *node->buffers) * node->buffer_count); - for(i = buffer_id; i < node->buffer_count; i++) - node->buffers[i].name[0] = 0; - } - node->buffers[buffer_id].subscribers = vs_create_subscription_list(); - node->buffers[buffer_id].type = type; - node->buffers[buffer_id].frequency = frequency; - node->buffers[buffer_id].length = 64; - node->buffers[buffer_id].data = malloc(sizeof(*node->buffers[buffer_id].data) * node->buffers[buffer_id].length); - for(i = 0; i < node->buffers[buffer_id].length; i++) - node->buffers[buffer_id].data[i] = NULL; - } - for(i = 0; name[i] != 0 && i < 15; i++) - node->buffers[buffer_id].name[i] = name[i]; - node->buffers[buffer_id].name[i] = 0; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_a_buffer_create(node_id, buffer_id, name, type, frequency); - } - vs_reset_subscript_session(); -} - -static void callback_send_a_buffer_destroy(void *user, VNodeID node_id, VBufferID buffer_id) -{ - VSNodeAudio *node; - unsigned int i, count; - - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL || buffer_id >= node->buffer_count || node->buffers[buffer_id].name[0] == 0) - return; - vs_remove_subscriptor(node->buffers[buffer_id].subscribers); - node->buffers[buffer_id].name[0] = 0; - free(node->buffers[buffer_id].data); - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_a_buffer_destroy(node_id, buffer_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_a_buffer_subscribe(void *user, VNodeID node_id, VLayerID buffer_id) -{ - VSNodeAudio *node; - unsigned int i; - - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->buffer_count <= buffer_id) - return; - if(node->buffers[buffer_id].name[0] == 0) - return; - vs_add_new_subscriptor(node->buffers[buffer_id].subscribers); - for(i = 0; i < node->buffers[buffer_id].length; i++) - { - if(node->buffers[buffer_id].data[i] != NULL) - verse_send_a_block_set(node_id, buffer_id, i, node->buffers[buffer_id].type, node->buffers[buffer_id].data[i]); - } -} - -static void callback_send_a_buffer_unsubscribe(void *user, VNodeID node_id, VLayerID buffer_id) -{ - VSNodeAudio *node; - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->buffer_count <= buffer_id) - return; - if(node->buffers[buffer_id].name[0] == 0) - return; - vs_remove_subscriptor(node->buffers[buffer_id].subscribers); -} - -static void callback_send_a_block_set(void *user, VNodeID node_id, VLayerID buffer_id, uint32 block_index, - VNABlockType type, const VNABlock *data) -{ - static const size_t blocksize[] = { - VN_A_BLOCK_SIZE_INT8 * sizeof (int8), - VN_A_BLOCK_SIZE_INT16 * sizeof (int16), - VN_A_BLOCK_SIZE_INT24 * 3 * sizeof (int8), - VN_A_BLOCK_SIZE_INT32 * sizeof (int32), - VN_A_BLOCK_SIZE_REAL32 * sizeof (real32), - VN_A_BLOCK_SIZE_REAL64 * sizeof (real64) - }; - VSNodeAudio *node; - unsigned int i, count; - - if(type > VN_A_BLOCK_REAL64) /* Protect blocksize array. */ - return; - - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->buffers[buffer_id].name[0] == 0) - return; - if(type != node->buffers[buffer_id].type) /* Disregard attempts to set data of wrong type. */ - return; - if(block_index > node->buffers[buffer_id].length) - { - node->buffers[buffer_id].data = realloc(node->buffers[buffer_id].data, - (sizeof *node->buffers[buffer_id].data) * (block_index + 64)); - for(i = node->buffers[buffer_id].length; i < block_index + 64; i++) - node->buffers[buffer_id].data[i] = NULL; - node->buffers[buffer_id].length = block_index + 64; - } - - if(node->buffers[buffer_id].data[block_index] == NULL) - node->buffers[buffer_id].data[block_index] = malloc(blocksize[type]); - if(node->buffers[buffer_id].data[block_index] != NULL) - { - memcpy(node->buffers[buffer_id].data[block_index], data, blocksize[type]); - count = vs_get_subscript_count(node->buffers[buffer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->buffers[buffer_id].subscribers, i); - verse_send_a_block_set(node_id, buffer_id, block_index, type, data); - } - vs_reset_subscript_session(); - } -} - -static void callback_send_a_block_clear(void *user, VNodeID node_id, VLayerID buffer_id, uint32 id) -{ - VSNodeAudio *node; - unsigned int i, count; - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->buffer_count <= buffer_id) - return; - if(node->buffers[buffer_id].name[0] == 0) - return; - if(id >= node->buffers[buffer_id].length) - return; - if(node->buffers[buffer_id].data[id] == NULL) - return; - free(node->buffers[buffer_id].data[id]); - node->buffers[buffer_id].data[id] = NULL; - count = vs_get_subscript_count(node->buffers[buffer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->buffers[buffer_id].subscribers, i); - verse_send_a_block_clear(node_id, buffer_id, id); - } - vs_reset_subscript_session(); -} - -static void callback_send_a_stream_subscribe(void *user, VNodeID node_id, VLayerID stream_id) -{ - VSNodeAudio *node; - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->stream_count <= stream_id) - return; - if(node->streams[stream_id].name[0] == 0) - return; - vs_add_new_subscriptor(node->streams[stream_id].subscribers); -} - -static void callback_send_a_stream_unsubscribe(void *user, VNodeID node_id, VLayerID stream_id) -{ - VSNodeAudio *node; - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->stream_count <= stream_id) - return; - if(node->streams[stream_id].name[0] == 0) - return; - vs_remove_subscriptor(node->streams[stream_id].subscribers); -} - -static void callback_send_a_stream(void *user, VNodeID node_id, VLayerID stream_id, uint32 time_s, uint32 time_f, - VNABlockType type, real64 frequency, const VNABlock *data) -{ - VSNodeAudio *node; - unsigned int i, count; - - if(frequency < 0) - return; - node = (VSNodeAudio *)vs_get_node(node_id, V_NT_AUDIO); - if(node == NULL) - return; - if(node->stream_count <= stream_id) - return; - if(node->streams[stream_id].name[0] == 0) - return; - count = vs_get_subscript_count(node->streams[stream_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->streams[stream_id].subscribers, i); - verse_send_a_stream(node_id, stream_id, time_s, time_f, type, frequency, data); - } - vs_reset_subscript_session(); -} - -void vs_a_callback_init(void) -{ - verse_callback_set(verse_send_a_buffer_create, callback_send_a_buffer_create, NULL); - verse_callback_set(verse_send_a_buffer_destroy, callback_send_a_buffer_destroy, NULL); - verse_callback_set(verse_send_a_buffer_subscribe, callback_send_a_buffer_subscribe, NULL); - verse_callback_set(verse_send_a_buffer_unsubscribe, callback_send_a_buffer_unsubscribe, NULL); - verse_callback_set(verse_send_a_block_set, callback_send_a_block_set, NULL); - verse_callback_set(verse_send_a_block_clear, callback_send_a_block_clear, NULL); - verse_callback_set(verse_send_a_stream_create, callback_send_a_stream_create, NULL); - verse_callback_set(verse_send_a_stream_destroy, callback_send_a_stream_destroy, NULL); - verse_callback_set(verse_send_a_stream_subscribe, callback_send_a_stream_subscribe, NULL); - verse_callback_set(verse_send_a_stream_unsubscribe, callback_send_a_stream_unsubscribe, NULL); - verse_callback_set(verse_send_a_stream, callback_send_a_stream, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_bitmap.c b/extern/verse/dist/vs_node_bitmap.c deleted file mode 100644 index 566287a86d4..00000000000 --- a/extern/verse/dist/vs_node_bitmap.c +++ /dev/null @@ -1,560 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -typedef struct { - VNBLayerType type; - char name[16]; - void *layer; - VSSubscriptionList *subscribers; -} VSNBLayers; - -typedef struct { - VSNodeHead head; - uint16 size[3]; - uint32 partial_tile_col, partial_tile_row; /* These rows/columns are partial. ~0 for none. */ - VSNBLayers *layers; - unsigned int layer_count; -} VSNodeBitmap; - -static unsigned long tile_counter = 0; - -VSNodeBitmap * vs_b_create_node(unsigned int owner) -{ - VSNodeBitmap *node; - char name[48]; - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_BITMAP); - sprintf(name, "Bitmap_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - - node->size[0] = 0; - node->size[1] = 0; - node->size[2] = 0; - node->partial_tile_col = ~0; - node->partial_tile_row = ~0; - node->layers = NULL; - node->layer_count = 0; - - return node; -} - -void vs_b_destroy_node(VSNodeBitmap *node) -{ - unsigned int i; - destroy_node_head(&node->head); - if(node->layers != NULL) - { - for(i = 0; i < node->layer_count; i++) - if(node->layers[i].layer != NULL) - free(node->layers[i].layer); - free(node->layers); - } - free(node); -} - -void vs_b_subscribe(VSNodeBitmap *node) -{ - unsigned int i; - verse_send_b_dimensions_set(node->head.id, node->size[0], node->size[1], node->size[2]); - for(i = 0; i < node->layer_count; i++) - if(node->layers[i].name[0] != 0) - verse_send_b_layer_create(node->head.id, (uint16)i, node->layers[i].name, (uint8)node->layers[i].type); -} - - -void vs_b_unsubscribe(VSNodeBitmap *node) -{ - unsigned int i; - for(i = 0; i < node->layer_count; i++) - if(node->layers[i].name[0] != 0) - vs_remove_subscriptor(node->layers[i].subscribers); -} - -static void callback_send_b_dimensions_set(void *user, VNodeID node_id, uint16 width, uint16 height, uint16 depth) -{ - VSNodeBitmap *node; - unsigned int i, j, k, count, tiles[2], read, write, end = 0; - - if((node = (VSNodeBitmap *)vs_get_node(node_id, V_NT_BITMAP)) == NULL) - return; - tiles[0] = (width + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE; - tiles[1] = (height + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE; - node->size[0] = (node->size[0] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE; - node->size[1] = (node->size[1] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE; - if(node->size[0] > tiles[0]) - node->size[0] = tiles[0]; - if(node->size[1] > tiles[1]) - node->size[1] = tiles[1]; - if(node->size[2] > depth) - node->size[2] = depth; - - for(i = 0; i < node->layer_count; i++) - { - if(node->layers[i].name[0] != 0) - { - switch(node->layers[i].type) - { - case VN_B_LAYER_UINT1 : - { - uint16 *array, *old; - write = 0; - old = node->layers[i].layer; - array = node->layers[i].layer = malloc((sizeof *array) * tiles[0] * tiles[1] * depth); - for(j = 0; j < node->size[2]; j++) - { - for(k = 0; k < node->size[1]; k++) - { - read = (j * node->size[1] * node->size[0] + k * node->size[0]); - - end = (j * tiles[1] * tiles[0] + k * tiles[0] + node->size[0]); - while(write < end) - array[write++] = old[read++]; - - end = (j * tiles[1] * tiles[0] + (k + 1) * tiles[0]); - while(write < end) - array[write++] = 0; - } - end = ((j + 1) * tiles[1] * tiles[0]); - while(write < end) - array[write++] = 0; - } - k = depth * tiles[1] * tiles[0]; - while(write < end) - array[write++] = 0; - } - break; - case VN_B_LAYER_UINT8 : - { - uint8 *array, *old; - write = 0; - old = node->layers[i].layer; - array = node->layers[i].layer = malloc((sizeof *array) * tiles[0] * tiles[1] * depth * VN_B_TILE_SIZE * VN_B_TILE_SIZE); - for(j = 0; j < node->size[2]; j++) - { - for(k = 0; k < node->size[1]; k++) - { - read = (j * node->size[1] * node->size[0] + k * node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - - end = (j * tiles[1] * tiles[0] + k * tiles[0] + node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = old[read++]; - - end = (j * tiles[1] * tiles[0] + (k + 1) * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = ((j + 1) * tiles[1] * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = depth * tiles[1] * tiles[0] * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - break; - case VN_B_LAYER_UINT16 : - { - uint16 *array, *old; - write = 0; - old = node->layers[i].layer; - array = node->layers[i].layer = malloc((sizeof *array) * tiles[0] * tiles[1] * depth * VN_B_TILE_SIZE * VN_B_TILE_SIZE); - for(j = 0; j < node->size[2]; j++) - { - for(k = 0; k < node->size[1]; k++) - { - read = (j * node->size[1] * node->size[0] + k * node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - - end = (j * tiles[1] * tiles[0] + k * tiles[0] + node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = old[read++]; - - end = (j * tiles[1] * tiles[0] + (k + 1) * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = ((j + 1) * tiles[1] * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = depth * tiles[1] * tiles[0] * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - break; - case VN_B_LAYER_REAL32 : - { - real32 *array, *old; - write = 0; - old = node->layers[i].layer; - array = node->layers[i].layer = malloc((sizeof *array) * tiles[0] * tiles[1] * depth * VN_B_TILE_SIZE * VN_B_TILE_SIZE); - for(j = 0; j < node->size[2]; j++) - { - for(k = 0; k < node->size[1]; k++) - { - read = (j * node->size[1] * node->size[0] + k * node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - - end = (j * tiles[1] * tiles[0] + k * tiles[0] + node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = old[read++]; - - end = (j * tiles[1] * tiles[0] + (k + 1) * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = ((j + 1) * tiles[1] * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = depth * tiles[1] * tiles[0] * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - break; - case VN_B_LAYER_REAL64 : - { - real64 *array, *old; - write = 0; - old = node->layers[i].layer; - array = node->layers[i].layer = malloc((sizeof *array) * tiles[0] * tiles[1] * depth * VN_B_TILE_SIZE * VN_B_TILE_SIZE); - for(j = 0; j < node->size[2]; j++) - { - for(k = 0; k < node->size[1]; k++) - { - read = (j * node->size[1] * node->size[0] + k * node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - - end = (j * tiles[1] * tiles[0] + k * tiles[0] + node->size[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = old[read++]; - - end = (j * tiles[1] * tiles[0] + (k + 1) * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = ((j + 1) * tiles[1] * tiles[0]) * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - end = depth * tiles[1] * tiles[0] * VN_B_TILE_SIZE * VN_B_TILE_SIZE; - while(write < end) - array[write++] = 0; - } - break; - } - } - } - - node->size[0] = width; - node->size[1] = height; - node->size[2] = depth; - node->partial_tile_col = (width % VN_B_TILE_SIZE) != 0 ? (width + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE - 1 : ~0; - node->partial_tile_row = (height % VN_B_TILE_SIZE) != 0 ? (height + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE - 1 : ~0; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_b_dimensions_set(node_id, width, height, depth); - } - vs_reset_subscript_session(); -} - -static void callback_send_b_layer_create(void *user, VNodeID node_id, VLayerID layer_id, char *name, uint8 type) -{ - VSNodeBitmap *node; - unsigned int i, count; - - if((node = (VSNodeBitmap *)vs_get_node(node_id, V_NT_BITMAP)) == NULL) - return; - if(node->layer_count <= layer_id || node->layers[layer_id].name[0] == 0) - { - for(layer_id = 0; layer_id < node->layer_count && node->layers[layer_id].name[0] != 0; layer_id++) - ; - if(layer_id == node->layer_count) - { - node->layers = realloc(node->layers, (sizeof *node->layers) * (node->layer_count + 16)); - for(i = node->layer_count; i < node->layer_count + 16; i++) - { - node->layers[i].layer = NULL; - node->layers[i].type = 0; - node->layers[i].name[0] = 0; - node->layers[i].subscribers = NULL; - } - node->layer_count += 16; - } - node->layers[layer_id].subscribers = vs_create_subscription_list(); - node->layers[layer_id].type = type + 1; - } - - if(node->layers[layer_id].type != type || node->layers[layer_id].name[0] == 0) - { - count = ((node->size[0] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE) * ((node->size[1] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE); - count *= VN_B_TILE_SIZE * VN_B_TILE_SIZE * node->size[2]; - if(node->layers[layer_id].layer != NULL) - free(node->layers[layer_id].layer); - if(count != 0) - { - switch(type) - { - case VN_B_LAYER_UINT1 : - node->layers[layer_id].layer = malloc(sizeof(uint8) * count / 8); - memset(node->layers[layer_id].layer, 0, count * sizeof(uint8) / 8); - break; - case VN_B_LAYER_UINT8 : - node->layers[layer_id].layer = malloc(sizeof(uint8) * count); - memset(node->layers[layer_id].layer, 0, count * sizeof(uint8)); - break; - case VN_B_LAYER_UINT16 : - node->layers[layer_id].layer = malloc(sizeof(uint16) * count); - memset(node->layers[layer_id].layer, 0, count * sizeof(uint16)); - break; - case VN_B_LAYER_REAL32 : - node->layers[layer_id].layer = malloc(sizeof(real32) * count); - memset(node->layers[layer_id].layer, 0, count * sizeof(real32)); - break; - case VN_B_LAYER_REAL64 : - node->layers[layer_id].layer = malloc(sizeof(real64) * count); - memset(node->layers[layer_id].layer, 0, count * sizeof(real64)); - break; - } - }else - node->layers[layer_id].layer = NULL; - } - node->layers[layer_id].type = type; - for(i = 0; i < 15 && name[i] != 0; i++) - node->layers[layer_id].name[i] = name[i]; - node->layers[layer_id].name[i] = 0; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_b_layer_create(node_id, layer_id, name, type); - } - vs_reset_subscript_session(); -} - -static void callback_send_b_layer_destroy(void *user, VNodeID node_id, VLayerID layer_id) -{ - VSNodeBitmap *node; - unsigned int i, count; - if((node = (VSNodeBitmap *)vs_get_node(node_id, V_NT_BITMAP)) == NULL) - return; - if(layer_id >= node->layer_count || node->layers[layer_id].layer == NULL) - return; - if(node->layers[layer_id].layer != NULL) - free(node->layers[layer_id].layer); - node->layers[layer_id].layer = NULL; - node->layers[layer_id].type = 0; - node->layers[layer_id].name[0] = 0; - vs_destroy_subscription_list(node->layers[layer_id].subscribers); - node->layers[layer_id].subscribers = NULL; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_b_layer_destroy(node_id, layer_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_b_layer_subscribe(void *user, VNodeID node_id, VLayerID layer_id, uint8 level) -{ - VSNodeBitmap *node; - const void *data; - unsigned int i, j, k, tile[3]; - - if((node = (VSNodeBitmap *)vs_get_node(node_id, V_NT_BITMAP)) == NULL) - return; - if(layer_id >= node->layer_count || node->layers[layer_id].layer == NULL) - return; - if(vs_add_new_subscriptor(node->layers[layer_id].subscribers) == 0) - return; - tile[0] = ((node->size[0] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE); - tile[1] = ((node->size[1] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE); - tile[2] = node->size[2]; - data = node->layers[layer_id].layer; - switch(node->layers[layer_id].type) - { - case VN_B_LAYER_UINT1: - for(i = 0; i < tile[0]; i++) - for(j = 0; j < tile[1]; j++) - for(k = 0; k < tile[2]; k++) - verse_send_b_tile_set(node_id, layer_id, i, j, k, VN_B_LAYER_UINT1, (VNBTile *) &((uint8*)data)[(tile[0] * tile[1] * k + j * tile[0] + i) * VN_B_TILE_SIZE * VN_B_TILE_SIZE / 8]); - break; - case VN_B_LAYER_UINT8 : - for(i = 0; i < tile[0]; i++) - for(j = 0; j < tile[1]; j++) - for(k = 0; k < tile[2]; k++) - verse_send_b_tile_set(node_id, layer_id, i, j, k, VN_B_LAYER_UINT8, (VNBTile *) &((uint8*)data)[(tile[0] * tile[1] * k + j * tile[0] + i) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]); - break; - case VN_B_LAYER_UINT16 : - for(i = 0; i < tile[0]; i++) - for(j = 0; j < tile[1]; j++) - for(k = 0; k < tile[2]; k++) - verse_send_b_tile_set(node_id, layer_id, i, j, k, VN_B_LAYER_UINT16, (VNBTile *) &((uint16*)data)[(tile[0] * tile[1] * k + j * tile[0] + i) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]); - break; - case VN_B_LAYER_REAL32 : - for(i = 0; i < tile[0]; i++) - for(j = 0; j < tile[1]; j++) - for(k = 0; k < tile[2]; k++) - verse_send_b_tile_set(node_id, layer_id, i, j, k, VN_B_LAYER_REAL32, (VNBTile *) &((real32*)data)[(tile[0] * tile[1] * k + j * tile[0] + i) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]); - break; - case VN_B_LAYER_REAL64 : - for(i = 0; i < tile[0]; i++) - for(j = 0; j < tile[1]; j++) - for(k = 0; k < tile[2]; k++) - verse_send_b_tile_set(node_id, layer_id, i, j, k, VN_B_LAYER_REAL64, (VNBTile *) &((real64*)data)[(tile[0] * tile[1] * k + j * tile[0] + i) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]); - break; - } -} - -static void callback_send_b_layer_unsubscribe(void *user, VNodeID node_id, VLayerID layer_id) -{ - VSNodeBitmap *node; - if((node = (VSNodeBitmap *)vs_get_node(node_id, V_NT_BITMAP)) == NULL) - return; - if(layer_id >= node->layer_count || node->layers[layer_id].layer == NULL) - return; - vs_remove_subscriptor(node->layers[layer_id].subscribers); -} - -/* Clear any pixels that lie outside the image, so we don't violoate specs when - * sending (stored version of) the tile out to subscribers. -*/ -static void clear_outside(const VSNodeBitmap *node, uint16 tile_x, uint16 tile_y, uint8 type, VNBTile *tile) -{ - int x, y, bx, by, p; - - by = tile_y * VN_B_TILE_SIZE; - for(y = p = 0; y < VN_B_TILE_SIZE; y++, by++) - { - bx = tile_x * VN_B_TILE_SIZE; - for(x = 0; x < VN_B_TILE_SIZE; x++, bx++, p++) - { - /* Simply test current pixel against bitmap size. Not quick, but simple. */ - if(bx >= node->size[0] || by >= node->size[1]) - { - switch(type) - { - case VN_B_LAYER_UINT1: - tile->vuint1[y] &= ~(128 >> x); - break; - case VN_B_LAYER_UINT8: - tile->vuint8[p] = 0; - break; - case VN_B_LAYER_UINT16: - tile->vuint16[p] = 0; - break; - case VN_B_LAYER_REAL32: - tile->vreal32[p] = 0.0f; - break; - case VN_B_LAYER_REAL64: - tile->vreal64[p] = 0.0; - break; - } - } - } - } -} - -static void callback_send_b_tile_set(void *user, VNodeID node_id, VLayerID layer_id, - uint16 tile_x, uint16 tile_y, uint16 tile_z, uint8 type, VNBTile *data) -{ - VSNodeBitmap *node; - unsigned int i, count, tile[3]; - - if((node = (VSNodeBitmap *)vs_get_node(node_id, V_NT_BITMAP)) == NULL) - { - printf("got tile for unknown bitmpa node %u, aborting\n", node_id); - return; - } - if(layer_id >= node->layer_count || node->layers[layer_id].layer == NULL || node->layers[layer_id].type != type) - { - printf("node %u got tile for bad layer %u (have %u) %p\n", node_id, layer_id, node->layer_count, layer_id < node->layer_count ? node->layers[layer_id].layer : NULL); - return; - } - if(tile_x >= ((node->size[0] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE) || tile_y >= ((node->size[1] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE) || tile_z >= node->size[2]) - { - printf("got tile that is outside image, at (%u,%u,%u)\n", tile_x, tile_y, tile_z); - return; - } - - tile_counter++; - - tile[0] = ((node->size[0] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE); - tile[1] = ((node->size[1] + VN_B_TILE_SIZE - 1) / VN_B_TILE_SIZE); - tile[2] = node->size[2]; - - /* If tile is in a partial column or row, clear the "outside" pixels. */ - if((uint32) tile_x == node->partial_tile_col || (uint32) tile_y == node->partial_tile_row) - clear_outside(node, tile_x, tile_y, type, data); - - switch(node->layers[layer_id].type) - { - case VN_B_LAYER_UINT1 : - { - uint8 *p; - p = &((uint8 *)node->layers[layer_id].layer)[(tile[0] * tile[1] * tile_z + tile_y * tile[0] + tile_x) * VN_B_TILE_SIZE * VN_B_TILE_SIZE/8]; - memcpy(p, data->vuint1, VN_B_TILE_SIZE * sizeof(uint8)); - } - break; - case VN_B_LAYER_UINT8 : - { - uint8 *p; - p = &((uint8 *)node->layers[layer_id].layer)[(tile[0] * tile[1] * tile_z + tile_y * tile[0] + tile_x) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]; - memcpy(p, data->vuint8, VN_B_TILE_SIZE * VN_B_TILE_SIZE * sizeof(uint8)); - } - break; - case VN_B_LAYER_UINT16 : - { - uint16 *p; - p = &((uint16 *)node->layers[layer_id].layer)[(tile[0] * tile[1] * tile_z + tile_y * tile[0] + tile_x) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]; - memcpy(p, data->vuint16, VN_B_TILE_SIZE * VN_B_TILE_SIZE * sizeof(uint16)); - } - break; - case VN_B_LAYER_REAL32 : - { - real32 *p; - p = &((real32 *)node->layers[layer_id].layer)[(tile[0] * tile[1] * tile_z + tile_y * tile[0] + tile_x) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]; - memcpy(p, data->vreal32, VN_B_TILE_SIZE * VN_B_TILE_SIZE * sizeof(real32)); - } - break; - case VN_B_LAYER_REAL64 : - { - real64 *p; - p = &((real64 *)node->layers[layer_id].layer)[(tile[0] * tile[1] * tile_z + tile_y * tile[0] + tile_x) * VN_B_TILE_SIZE * VN_B_TILE_SIZE]; - memcpy(p, data->vreal64, VN_B_TILE_SIZE * VN_B_TILE_SIZE * sizeof(real64)); - } - break; - } - count = vs_get_subscript_count(node->layers[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layers[layer_id].subscribers, i); - verse_send_b_tile_set(node_id, layer_id, tile_x, tile_y, tile_z, type, data); - } - vs_reset_subscript_session(); -} - -void vs_b_callback_init(void) -{ - verse_callback_set(verse_send_b_dimensions_set, callback_send_b_dimensions_set, NULL); - verse_callback_set(verse_send_b_layer_create, callback_send_b_layer_create, NULL); - verse_callback_set(verse_send_b_layer_destroy, callback_send_b_layer_destroy, NULL); - verse_callback_set(verse_send_b_layer_subscribe, callback_send_b_layer_subscribe, NULL); - verse_callback_set(verse_send_b_layer_unsubscribe, callback_send_b_layer_unsubscribe, NULL); - verse_callback_set(verse_send_b_tile_set, callback_send_b_tile_set, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_curve.c b/extern/verse/dist/vs_node_curve.c deleted file mode 100644 index 3787526202d..00000000000 --- a/extern/verse/dist/vs_node_curve.c +++ /dev/null @@ -1,258 +0,0 @@ -/* -** -*/ - -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -typedef struct { - real64 pre_value[4]; - uint32 pre_pos[4]; - real64 value[4]; - real64 pos; - real64 post_value[4]; - uint32 post_pos[4]; -} VSNKey; - -typedef struct { - VSNKey *keys; - unsigned int length; - char name[16]; - uint8 dimensions; - VSSubscriptionList *subscribers; -} VSNCurve; - -typedef struct{ - VSNodeHead head; - VSNCurve *curves; - unsigned int curve_count; -} VSNodeCurve; - -VSNodeCurve * vs_c_create_node(unsigned int owner) -{ - VSNodeCurve *node; - char name[48]; - unsigned int i; - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_CURVE); - sprintf(name, "Curve_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - node->curves = malloc((sizeof *node->curves) * 16); - node->curve_count = 16; - for(i = 0; i < 16; i++) - node->curves[i].name[0] = 0; - return node; -} - -void vs_c_destroy_node(VSNodeCurve *node) -{ - destroy_node_head(&node->head); - free(node); -} - -void vs_c_subscribe(VSNodeCurve *node) -{ - unsigned int i; - if(node == NULL) - return; - for(i = 0; i < node->curve_count; i++) - if(node->curves[i].name[0] != 0) - verse_send_c_curve_create(node->head.id, i, node->curves[i].name, node->curves[i].dimensions); - -} - -void vs_c_unsubscribe(VSNodeCurve *node) -{ - unsigned int i; - for(i = 0; i < node->curve_count; i++) - if(node->curves[i].name[0] != 0) - vs_remove_subscriptor(node->curves[i].subscribers); -} - -static void callback_send_c_curve_create(void *user, VNodeID node_id, VLayerID curve_id, const char *name, uint8 dimensions) -{ - VSNodeCurve *node; - unsigned int i, j, count; - node = (VSNodeCurve *)vs_get_node(node_id, V_NT_CURVE); - if(node == NULL) - return; - - for(i = 0; i < node->curve_count; i++) - { - if(curve_id != i) - { - for(j = 0; name[j] == node->curves[i].name[j] && name[j] != 0; j++); - if(name[j] == node->curves[i].name[j]) - return; - } - } - if(curve_id >= node->curve_count || node->curves[curve_id].name[0] == 0) - { - for(curve_id = 0; curve_id < node->curve_count && node->curves[curve_id].name[0] != 0; curve_id++); - if(curve_id == node->curve_count) - { - curve_id = node->curve_count; - node->curve_count += 16; - node->curves = realloc(node->curves, (sizeof *node->curves) * node->curve_count); - for(i = curve_id; i < node->curve_count; i++) - node->curves[i].name[0] = 0; - } - node->curves[curve_id].subscribers = vs_create_subscription_list(); - node->curves[curve_id].length = 64; - node->curves[curve_id].keys = malloc((sizeof *node->curves[curve_id].keys) * 64); - for(i = 0; i < 64; i++) - node->curves[curve_id].keys[i].pos = V_REAL64_MAX; - - }else if(node->curves[curve_id].dimensions != dimensions) - { - for(i = 0; i < node->curves[curve_id].length; i++) - { - if(node->curves[curve_id].keys[i].pos != V_REAL64_MAX) - { - for(j = node->curves[curve_id].dimensions; j < dimensions; j++) - { - node->curves[curve_id].keys[i].pre_value[j] = node->curves[curve_id].keys[i].pre_value[0]; - node->curves[curve_id].keys[i].pre_pos[j] = node->curves[curve_id].keys[i].pre_pos[0]; - node->curves[curve_id].keys[i].value[j] = node->curves[curve_id].keys[i].value[0]; - node->curves[curve_id].keys[i].post_value[j] = node->curves[curve_id].keys[i].post_value[0]; - node->curves[curve_id].keys[i].post_pos[j] = node->curves[curve_id].keys[i].post_pos[0]; - } - } - } - vs_destroy_subscription_list(node->curves[curve_id].subscribers); - node->curves[curve_id].subscribers = vs_create_subscription_list(); - } - for(i = 0; name[i] != 0 && i < 15; i++) - node->curves[curve_id].name[i] = name[i]; - node->curves[curve_id].name[i] = 0; - node->curves[curve_id].dimensions = dimensions; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_c_curve_create(node_id, curve_id, name, dimensions); - } - vs_reset_subscript_session(); -} - -static void callback_send_c_curve_destroy(void *user, VNodeID node_id, VLayerID curve_id) -{ - VSNodeCurve *node; - unsigned int i, count; - node = (VSNodeCurve *)vs_get_node(node_id, V_NT_CURVE); - if(node == NULL || node->curve_count >= curve_id || node->curves[curve_id].name[0] == 0) - return; - vs_remove_subscriptor(node->curves[curve_id].subscribers); - node->curves[curve_id].name[0] = 0; - free(node->curves[curve_id].keys); - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_c_curve_destroy(node_id, curve_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_c_key_set(void *user, VNodeID node_id, VLayerID curve_id, uint32 key_id, uint8 dimensions, real64 *pre_value, uint32 *pre_pos, real64 *value, real64 pos, real64 *post_value, uint32 *post_pos) -{ - VSNodeCurve *node; - unsigned int i, count; - node = (VSNodeCurve *)vs_get_node(node_id, V_NT_CURVE); - if(node == NULL) - return; - if(node->curve_count <= curve_id) - return; - if(node->curves[curve_id].name[0] == 0) - return; - if(node == NULL || node->curve_count <= curve_id || node->curves[curve_id].name[0] == 0 || node->curves[curve_id].dimensions != dimensions) - return; - if(node->curves[curve_id].length <= key_id || node->curves[curve_id].keys[key_id].pos == V_REAL64_MAX) - { - for(key_id = 0; key_id < node->curves[curve_id].length && node->curves[curve_id].keys[key_id].pos != V_REAL64_MAX; key_id++); - if(key_id == node->curves[curve_id].length) - for(i = 0; i < 64; i++) - node->curves[curve_id].keys[node->curves[curve_id].length++].pos = V_REAL64_MAX; - } - for(i = 0; i < dimensions; i++) - node->curves[curve_id].keys[key_id].pre_value[i] = pre_value[i]; - for(i = 0; i < dimensions; i++) - node->curves[curve_id].keys[key_id].pre_pos[i] = pre_pos[i]; - for(i = 0; i < dimensions; i++) - node->curves[curve_id].keys[key_id].value[i] = value[i]; - node->curves[curve_id].keys[key_id].pos = pos; - for(i = 0; i < dimensions; i++) - node->curves[curve_id].keys[key_id].post_value[i] = post_value[i]; - for(i = 0; i < dimensions; i++) - node->curves[curve_id].keys[key_id].post_pos[i] = post_pos[i]; - count = vs_get_subscript_count(node->curves[curve_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->curves[curve_id].subscribers, i); - verse_send_c_key_set(node_id, curve_id, key_id, dimensions, pre_value, pre_pos, value, pos, post_value, post_pos); - } - vs_reset_subscript_session(); -} - -static void callback_send_c_key_destroy(void *user, VNodeID node_id, VLayerID curve_id, uint32 key_id) -{ - VSNodeCurve *node; - unsigned int i, count; - node = (VSNodeCurve *)vs_get_node(node_id, V_NT_CURVE); - if(node == NULL || node->curve_count <= curve_id || node->curves[curve_id].name[0] == 0) - return; - if(node->curves[curve_id].length <= key_id || node->curves[curve_id].keys[key_id].pos == V_REAL64_MAX) - return; - node->curves[curve_id].keys[key_id].pos = V_REAL64_MAX; - count = vs_get_subscript_count(node->curves[curve_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->curves[curve_id].subscribers, i); - verse_send_c_key_destroy(node_id, curve_id, key_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_c_curve_subscribe(void *user, VNodeID node_id, VLayerID curve_id) -{ - VSNodeCurve *node; - unsigned int i; - node = (VSNodeCurve *)vs_get_node(node_id, V_NT_CURVE); - if(node == NULL || node->curve_count <= curve_id || node->curves[curve_id].name[0] == 0) - return; - - vs_add_new_subscriptor(node->curves[curve_id].subscribers); - - for(i = 0; i < node->curves[curve_id].length; i++) - if(node->curves[curve_id].keys[i].pos != V_REAL64_MAX) - verse_send_c_key_set(node_id, curve_id, i, node->curves[curve_id].dimensions, node->curves[curve_id].keys[i].pre_value, node->curves[curve_id].keys[i].pre_pos, node->curves[curve_id].keys[i].value, node->curves[curve_id].keys[i].pos, node->curves[curve_id].keys[i].post_value, node->curves[curve_id].keys[i].post_pos); -} - -static void callback_send_c_curve_unsubscribe(void *user, VNodeID node_id, VLayerID curve_id) -{ - VSNodeCurve *node; - - node = (VSNodeCurve *)vs_get_node(node_id, V_NT_CURVE); - if(node == NULL || curve_id >= node->curve_count || node->curves[curve_id].name[0] == 0) - return; - vs_remove_subscriptor(node->curves[curve_id].subscribers); -} - -void vs_c_callback_init(void) -{ - verse_callback_set(verse_send_c_curve_create, callback_send_c_curve_create, NULL); - verse_callback_set(verse_send_c_curve_destroy, callback_send_c_curve_destroy, NULL); - verse_callback_set(verse_send_c_curve_subscribe, callback_send_c_curve_subscribe, NULL); - verse_callback_set(verse_send_c_curve_unsubscribe, callback_send_c_curve_unsubscribe, NULL); - verse_callback_set(verse_send_c_key_set, callback_send_c_key_set, NULL); - verse_callback_set(verse_send_c_key_destroy, callback_send_c_key_destroy, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_geometry.c b/extern/verse/dist/vs_node_geometry.c deleted file mode 100644 index 4b1f88c8ac2..00000000000 --- a/extern/verse/dist/vs_node_geometry.c +++ /dev/null @@ -1,1047 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "v_util.h" -#include "vs_server.h" - -#define VS_G_LAYER_CHUNK 32 - -typedef struct { - VNGLayerType type; - char name[16]; - void *layer; - VSSubscriptionList *subscribers; - VSSubscriptionList *subscribersd; - union{ - uint32 integer; - real64 real; - } def; -} VSNGLayer; - -typedef struct { - char weight[16]; - char reference[16]; - uint16 parent; - real64 pos_x; - real64 pos_y; - real64 pos_z; - char position_label[16]; - char rotation_label[16]; - char scale_label[16]; -} VSNGBone; - -typedef struct { - VSNodeHead head; - VSNGLayer *layer; - uint16 layer_count; - uint32 vertex_size; - uint32 poly_size; - uint32 vertex_hole; - uint32 polygon_hole; - uint32 crease_vertex; - char crease_vertex_layer[16]; - uint32 crease_edge; - char crease_edge_layer[16]; - VSNGBone *bones; - uint32 bone_count; -} VSNodeGeometry; - -VSNodeGeometry * vs_g_create_node(unsigned int owner) -{ - VSNodeGeometry *node; - unsigned int i; - char name[48]; - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_GEOMETRY); - sprintf(name, "Geometry_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - - node->bones = malloc((sizeof *node->bones) * 16); - node->bone_count = 16; - for(i = 0; i < node->bone_count; i++) - node->bones[i].weight[0] = '\0'; - - node->layer = malloc((sizeof *node->layer) * 16); - node->layer_count = 16; - node->vertex_size = VS_G_LAYER_CHUNK; - node->poly_size = VS_G_LAYER_CHUNK; - - strcpy(node->layer[0].name, "vertex"); - node->layer[0].type = VN_G_LAYER_VERTEX_XYZ; - node->layer[0].layer = malloc(sizeof(real64) * VS_G_LAYER_CHUNK * 3); - for(i = 0; i < VS_G_LAYER_CHUNK * 3; i++) - ((real64 *)node->layer[0].layer)[i] = V_REAL64_MAX; - node->layer[0].subscribers = NULL;/*vs_create_subscription_list();*/ - node->layer[0].subscribersd = NULL;/*vs_create_subscription_list();*/ - node->layer[0].def.real = 0; - - strcpy(node->layer[1].name, "polygon"); - node->layer[1].type = VN_G_LAYER_POLYGON_CORNER_UINT32; - node->layer[1].layer = malloc(sizeof(uint32) * VS_G_LAYER_CHUNK * 4); - for(i = 0; i < VS_G_LAYER_CHUNK * 4; i++) - ((uint32 *)node->layer[1].layer)[i] = -1; - node->layer[1].subscribers = NULL;/*vs_create_subscription_list();*/ - node->layer[1].subscribersd = NULL; - node->layer[1].def.integer = 0; - node->layer[1].def.real = 0.0; - - for(i = 2; i < 16; i++) - { - node->layer[i].type = -1; - node->layer[i].name[0] = 0; - node->layer[i].layer = NULL; - node->layer[i].subscribers = NULL; - node->layer[i].subscribersd = NULL; - node->layer[i].def.real = 0; - } - node->crease_vertex = 0; - node->crease_vertex_layer[0] = 0; - node->crease_edge = 0; - node->crease_edge_layer[0] = 0; - node->vertex_hole = 0; - node->polygon_hole = 0; - return node; -} - -void vs_g_destroy_node(VSNodeGeometry *node) -{ - destroy_node_head(&node->head); - free(node); -} - -void vs_g_subscribe(VSNodeGeometry *node) -{ - unsigned int i; - for(i = 0; i < node->layer_count; i++) - { - if(node->layer[i].layer != NULL) - { - verse_send_g_layer_create(node->head.id, (uint16)i, node->layer[i].name, node->layer[i].type, - node->layer[i].def.integer, node->layer[i].def.real); - } - } - verse_send_g_crease_set_vertex(node->head.id, node->crease_vertex_layer, node->crease_vertex); - verse_send_g_crease_set_edge(node->head.id, node->crease_edge_layer, node->crease_edge); - for(i = 0; i < node->bone_count; i++) - { - if(node->bones[i].weight[0] != 0) - verse_send_g_bone_create(node->head.id, (uint16)i, node->bones[i].weight, node->bones[i].reference, node->bones[i].parent, - node->bones[i].pos_x, node->bones[i].pos_y, node->bones[i].pos_z, node->bones[i].position_label, - node->bones[i].rotation_label, node->bones[i].scale_label); - } -} - - -void vs_g_unsubscribe(VSNodeGeometry *node) -{ - unsigned int i; - for(i = 0; i < node->layer_count; i++) { - if(node->layer[i].layer != NULL) { - if(node->layer[i].subscribers) - vs_remove_subscriptor(node->layer[i].subscribers); - if(node->layer[i].subscribersd) - vs_remove_subscriptor(node->layer[i].subscribersd); - } - } -} - -static void callback_send_g_layer_create(void *user, VNodeID node_id, VLayerID layer_id, char *name, uint8 type, uint32 def_uint, real64 def_real) -{ - VSNodeGeometry *node; - unsigned int i, j, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - - if(node == NULL) - return; - if((type < VN_G_LAYER_POLYGON_CORNER_UINT32 && type > VN_G_LAYER_VERTEX_REAL) || - (type > VN_G_LAYER_POLYGON_FACE_REAL)) - return; - - if(layer_id < 2) - layer_id = -1; - for(i = 0; i < node->layer_count; i++) - { - if(node->layer[i].layer != NULL && i != layer_id) - { - for(j = 0; name[j] == node->layer[i].name[j] && name[j] != 0; j++); - if(name[j] == node->layer[i].name[j]) - return; - } - } - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL) - { - for(layer_id = 0; layer_id < node->layer_count && node->layer[layer_id].layer != NULL; layer_id++); - if(layer_id == node->layer_count) - { - layer_id = node->layer_count; - node->layer_count += 16; - node->layer = realloc(node->layer, (sizeof *node->layer) * node->layer_count); - for(i = layer_id; i < node->layer_count; i++) - { - node->layer[i].type = -1; - node->layer[i].name[0] = 0; - node->layer[i].layer = 0; - node->layer[i].subscribers = NULL; - node->layer[i].subscribersd = NULL; - } - } - } - for(i = 0; i < 16; i++) - node->layer[layer_id].name[i] = name[i]; - - if(node->layer[layer_id].type != type) - { - if(node->layer[layer_id].subscribers) { - vs_destroy_subscription_list(node->layer[layer_id].subscribers); - node->layer[layer_id].subscribers = NULL; - } - if(node->layer[layer_id].subscribersd) { - vs_destroy_subscription_list(node->layer[layer_id].subscribersd); - node->layer[layer_id].subscribersd = NULL; - } - node->layer[layer_id].type = type; - free(node->layer[layer_id].layer); - switch(type) - { - case VN_G_LAYER_VERTEX_XYZ : - node->layer[layer_id].layer = malloc(sizeof(real64) * node->vertex_size * 3); - for(i = 0; i < node->vertex_size * 3; i++) - ((real64 *)node->layer[layer_id].layer)[i] = ((real64 *)node->layer[0].layer)[i]; - break; - case VN_G_LAYER_VERTEX_UINT32 : - node->layer[layer_id].layer = malloc(sizeof(uint32) * node->vertex_size); - for(i = 0; i < node->vertex_size; i++) - ((uint32 *)node->layer[layer_id].layer)[i] = def_uint; - node->layer[layer_id].def.integer = def_uint; - break; - case VN_G_LAYER_VERTEX_REAL : - node->layer[layer_id].layer = malloc(sizeof(real64) * node->vertex_size); - for(i = 0; i < node->vertex_size; i++) - ((real64 *)node->layer[layer_id].layer)[i] = def_real; - node->layer[layer_id].def.real = def_real; - break; - case VN_G_LAYER_POLYGON_CORNER_UINT32 : - node->layer[layer_id].layer = malloc(sizeof(uint32) * node->poly_size * 4); - for(i = 0; i < node->poly_size * 4; i++) - ((uint32 *)node->layer[layer_id].layer)[i] = def_uint; - node->layer[layer_id].def.integer = def_uint; - break; - case VN_G_LAYER_POLYGON_CORNER_REAL : - node->layer[layer_id].layer = malloc(sizeof(real64) * node->poly_size * 4); - for(i = 0; i < node->poly_size * 4; i++) - ((real64 *)node->layer[layer_id].layer)[i] = def_real; - node->layer[layer_id].def.real = def_real; - break; - case VN_G_LAYER_POLYGON_FACE_UINT8 : - node->layer[layer_id].layer = malloc(sizeof(uint8) * node->poly_size); - for(i = 0; i < node->poly_size; i++) - ((uint8 *)node->layer[layer_id].layer)[i] = def_uint; - node->layer[layer_id].def.integer = def_uint; - break; - case VN_G_LAYER_POLYGON_FACE_UINT32 : - node->layer[layer_id].layer = malloc(sizeof(uint32) * node->poly_size); - for(i = 0; i < node->poly_size; i++) - ((uint32 *)node->layer[layer_id].layer)[i] = def_uint; - node->layer[layer_id].def.integer = def_uint; - break; - case VN_G_LAYER_POLYGON_FACE_REAL : - node->layer[layer_id].layer = malloc(sizeof(real64) * node->poly_size); - for(i = 0; i < node->poly_size; i++) - ((real64 *)node->layer[layer_id].layer)[i] = def_real; - node->layer[layer_id].def.real = def_real; - break; - } - } - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_g_layer_create(node_id, layer_id, name, type, def_uint, def_real); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_layer_destroy(void *user, VNodeID node_id, VLayerID layer_id) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || layer_id < 2) - return; - free(node->layer[layer_id].layer); - node->layer[layer_id].layer = NULL; - node->layer[layer_id].name[0] = 0; - node->layer[layer_id].type = -1; - if(node->layer[layer_id].subscribers) { - vs_destroy_subscription_list(node->layer[layer_id].subscribers); - node->layer[layer_id].subscribers = NULL; - } - if(node->layer[layer_id].subscribersd) { - vs_destroy_subscription_list(node->layer[layer_id].subscribersd); - node->layer[layer_id].subscribersd = NULL; - } - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_g_layer_destroy(node_id, layer_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_layer_subscribe(void *user, VNodeID node_id, VLayerID layer_id, uint8 type) -{ - VSNodeGeometry *node; - VSNGLayer *layer; - VSSubscriptionList **list = NULL; - unsigned int i; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL) - return; - /* Pick subscription list to add subscriber to. */ - layer = &node->layer[layer_id]; - if(type == VN_FORMAT_REAL64 && (layer->type == VN_G_LAYER_VERTEX_XYZ || layer->type == VN_G_LAYER_VERTEX_REAL || - layer->type == VN_G_LAYER_POLYGON_CORNER_REAL || layer->type == VN_G_LAYER_POLYGON_FACE_REAL)) - { - list = &node->layer[layer_id].subscribersd; - } - else - list = &node->layer[layer_id].subscribers; - - /* Add new subscriptor to whichever list was chosen by precision-test above. Create list if necessary. */ - if(list == NULL) - return; - if(*list == NULL) - *list = vs_create_subscription_list(); - vs_add_new_subscriptor(*list); - - switch(layer->type) - { - case VN_G_LAYER_VERTEX_XYZ : - if(type == VN_FORMAT_REAL64) - { - for(i = 0; i < node->vertex_size; i++) - if(((real64 *)node->layer[0].layer)[i * 3] != V_REAL64_MAX) - verse_send_g_vertex_set_xyz_real64(node_id, layer_id, i, ((real64 *)layer->layer)[i * 3], ((real64 *)layer->layer)[i * 3 + 1], ((real64 *)layer->layer)[i * 3 + 2]); - }else - { - for(i = 0; i < node->vertex_size; i++) - if(((real64 *)node->layer[0].layer)[i * 3] != V_REAL64_MAX) - verse_send_g_vertex_set_xyz_real32(node_id, layer_id, i, (float)((real64 *)layer->layer)[i * 3], (float)((real64 *)layer->layer)[i * 3 + 1], (float)((real64 *)layer->layer)[i * 3 + 2]); - } - break; - case VN_G_LAYER_VERTEX_UINT32 : - for(i = 0; i < node->vertex_size; i++) - if(((real64 *)node->layer[0].layer)[i * 3] != V_REAL64_MAX && ((uint32 *)layer->layer)[i] != layer->def.integer) - verse_send_g_vertex_set_uint32(node_id, layer_id, i, ((uint32 *)layer->layer)[i]); - break; - case VN_G_LAYER_VERTEX_REAL : - if(type == VN_FORMAT_REAL64) - { - for(i = 0; i < node->vertex_size; i++) - if(((real64 *)node->layer[0].layer)[i * 3] != V_REAL64_MAX && ((real64 *)layer->layer)[i] != layer->def.real) - verse_send_g_vertex_set_real64(node_id, layer_id, i, ((real64 *)layer->layer)[i]); - }else - { - for(i = 0; i < node->vertex_size; i++) - if(((real64 *)node->layer[0].layer)[i * 3] != V_REAL64_MAX && ((real64 *)layer->layer)[i] != layer->def.real) - verse_send_g_vertex_set_real32(node_id, layer_id, i, (float)((real64 *)layer->layer)[i]); - } - break; - case VN_G_LAYER_POLYGON_CORNER_UINT32 : - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && !(((uint32 *)layer->layer)[i * 4] == layer->def.integer && ((uint32 *)layer->layer)[i * 4 + 1] == layer->def.integer && ((uint32 *)layer->layer)[i * 4 + 2] == layer->def.integer && ((uint32 *)layer->layer)[i * 4 + 3] == layer->def.integer)) - verse_send_g_polygon_set_corner_uint32(node_id, layer_id, i, ((uint32 *)layer->layer)[i * 4], ((uint32 *)layer->layer)[i * 4 + 1], ((uint32 *)layer->layer)[i * 4 + 2], ((uint32 *)layer->layer)[i * 4 + 3]); - break; - case VN_G_LAYER_POLYGON_CORNER_REAL : - if(type == VN_FORMAT_REAL64) - { - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && !(((real64 *)layer->layer)[i * 4] == layer->def.real && ((real64 *)layer->layer)[i * 4 + 1] == layer->def.real && ((real64 *)layer->layer)[i * 4 + 2] == layer->def.real && ((real64 *)layer->layer)[i * 4 + 3] == layer->def.real)) - verse_send_g_polygon_set_corner_real64(node_id, layer_id, i, ((real64 *)layer->layer)[i * 4], ((real64 *)layer->layer)[i * 4 + 1], ((real64 *)layer->layer)[i * 4 + 2], ((real64 *)layer->layer)[i * 4 + 3]); - }else - { - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && !(((real64 *)layer->layer)[i * 4] == layer->def.real && ((real64 *)layer->layer)[i * 4 + 1] == layer->def.real && ((real64 *)layer->layer)[i * 4 + 2] == layer->def.real && ((real64 *)layer->layer)[i * 4 + 3] == layer->def.real)) - verse_send_g_polygon_set_corner_real32(node_id, layer_id, i, (float)((real64 *)layer->layer)[i * 4], (float)((real64 *)layer->layer)[i * 4 + 1], (float)((real64 *)layer->layer)[i * 4 + 2], (float)((real64 *)layer->layer)[i * 4 + 3]); - } - break; - case VN_G_LAYER_POLYGON_FACE_UINT8 : - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && ((uint8 *)layer->layer)[i] != layer->def.integer) - verse_send_g_polygon_set_face_uint8(node_id, layer_id, i, ((uint8 *)layer->layer)[i]); - break; - case VN_G_LAYER_POLYGON_FACE_UINT32 : - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && ((uint32 *)layer->layer)[i] != layer->def.integer) - verse_send_g_polygon_set_face_uint32(node_id, layer_id, i, ((uint32 *)layer->layer)[i]); - break; - case VN_G_LAYER_POLYGON_FACE_REAL : - if(type == VN_FORMAT_REAL64) - { - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && ((real64 *)layer->layer)[i] != layer->def.real) - verse_send_g_polygon_set_face_real64(node_id, layer_id, i, ((real64 *)layer->layer)[i]); - }else - { - for(i = 0; i < node->poly_size; i++) - if(((uint32 *)node->layer[1].layer)[i * 4] != (uint32) ~0u && ((real64 *)layer->layer)[i] != layer->def.real) - verse_send_g_polygon_set_face_real32(node_id, layer_id, i, (float)((real64 *)layer->layer)[i]); - } - break; - } -} - -static void callback_send_g_layer_unsubscribe(void *user, VNodeID node_id, VLayerID layer_id) -{ - VSNodeGeometry *node; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL) - return; - if(node->layer[layer_id].subscribers) - vs_remove_subscriptor(node->layer[layer_id].subscribers); - if(node->layer[layer_id].subscribersd) - vs_remove_subscriptor(node->layer[layer_id].subscribersd); -} - - -static unsigned int vs_g_extend_arrays(VSNodeGeometry *node, boolean vertex, boolean base_layer, unsigned int id) -{ - unsigned int i, j; - - if(base_layer && id == ~0u) - { - if(vertex) - { - while(node->vertex_hole < node->vertex_size && ((real64 *)node->layer[0].layer)[node->vertex_hole * 3] != V_REAL64_MAX) - node->vertex_hole++; - id = node->vertex_hole; - }else - { - while(node->polygon_hole < node->poly_size && ((uint32 *)node->layer[1].layer)[node->polygon_hole * 4] != ~0u) - node->polygon_hole++; - id = node->polygon_hole; - } - } - - if(vertex) - { - if(node->vertex_size + 4096 < id) - return -1; - if(node->vertex_size > id) - return id; - }else - { - if(node->poly_size + 4096 < id) - return -1; - if(node->poly_size > id) - return id; - } - - for(i = 0; i < node->layer_count; i++) - { - if((vertex && node->layer[i].type < VN_G_LAYER_POLYGON_CORNER_UINT32) || (!vertex && node->layer[i].type >= VN_G_LAYER_POLYGON_CORNER_UINT32)) - { - switch(node->layer[i].type) - { - case VN_G_LAYER_VERTEX_XYZ : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(real64) * (id + VS_G_LAYER_CHUNK) * 3); - for(j = node->vertex_size * 3; j < (id + VS_G_LAYER_CHUNK) * 3; j++) - ((real64 *)node->layer[i].layer)[j] = V_REAL64_MAX; - break; - case VN_G_LAYER_VERTEX_UINT32 : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(uint32) * (id + VS_G_LAYER_CHUNK)); - for(j = node->vertex_size; j < (id + VS_G_LAYER_CHUNK); j++) - ((uint32 *)node->layer[i].layer)[j] = node->layer[i].def.integer; - break; - case VN_G_LAYER_VERTEX_REAL : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(real64) * (id + VS_G_LAYER_CHUNK)); - for(j = node->vertex_size; j < (id + VS_G_LAYER_CHUNK); j++) - ((real64 *)node->layer[i].layer)[j] = node->layer[i].def.real; - break; - case VN_G_LAYER_POLYGON_CORNER_UINT32 : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(uint32) * (id + VS_G_LAYER_CHUNK) * 4); - for(j = node->poly_size * 4; j < (id + VS_G_LAYER_CHUNK) * 4; j++) - ((uint32 *)node->layer[i].layer)[j] = node->layer[i].def.integer; - break; - case VN_G_LAYER_POLYGON_CORNER_REAL : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(real64) * (id + VS_G_LAYER_CHUNK) * 4); - for(j = node->poly_size * 4; j < (id + VS_G_LAYER_CHUNK) * 4; j++) - ((real64 *)node->layer[i].layer)[j] = node->layer[i].def.real; - break; - case VN_G_LAYER_POLYGON_FACE_UINT8 : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(uint8) * (id + VS_G_LAYER_CHUNK)); - for(j = node->poly_size; j < (id + VS_G_LAYER_CHUNK); j++) - ((uint8 *)node->layer[i].layer)[j] = node->layer[i].def.integer; - break; - case VN_G_LAYER_POLYGON_FACE_UINT32 : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(uint32) * (id + VS_G_LAYER_CHUNK)); - for(j = node->poly_size; j < (id + VS_G_LAYER_CHUNK); j++) - ((uint32 *)node->layer[i].layer)[j] = node->layer[i].def.integer; - break; - case VN_G_LAYER_POLYGON_FACE_REAL : - node->layer[i].layer = realloc(node->layer[i].layer, sizeof(real64) * (id + VS_G_LAYER_CHUNK)); - for(j = node->poly_size; j < (id + VS_G_LAYER_CHUNK); j++) - ((real64 *)node->layer[i].layer)[j] = node->layer[i].def.real; - break; - } - } - } - if(vertex) - node->vertex_size = id + VS_G_LAYER_CHUNK; - else - node->poly_size = id + VS_G_LAYER_CHUNK; - return id; -} - - -static void callback_send_g_vertex_set_xyz_real32(void *user, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, float x, float y, float z) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_VERTEX_XYZ) - return; - if((vertex_id = vs_g_extend_arrays(node, TRUE, layer_id == 0, vertex_id)) == ~0u) - return; - if(((real64 *)node->layer[0].layer)[vertex_id * 3] == V_REAL64_MAX) - { - for(i = 0; i < node->layer_count; i++) - { - if(node->layer[i].name[0] != 0 && node->layer[i].type == VN_G_LAYER_VERTEX_XYZ && node->layer[i].layer != NULL) - { - ((real64 *)node->layer[i].layer)[vertex_id * 3] = x; - ((real64 *)node->layer[i].layer)[vertex_id * 3 + 1] = y; - ((real64 *)node->layer[i].layer)[vertex_id * 3 + 2] = z; - } - } - layer_id = 0; - }else - { - ((real64 *)node->layer[layer_id].layer)[vertex_id * 3] = x; - ((real64 *)node->layer[layer_id].layer)[vertex_id * 3 + 1] = y; - ((real64 *)node->layer[layer_id].layer)[vertex_id * 3 + 2] = z; - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_vertex_set_xyz_real64(node_id, layer_id, vertex_id, (real64)x, (real64)y, (real64)z); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_vertex_set_xyz_real32(node_id, layer_id, vertex_id, x, y, z); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_vertex_set_xyz_real64(void *user, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 x, real64 y, real64 z) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_VERTEX_XYZ) - return; - if((vertex_id = vs_g_extend_arrays(node, TRUE, layer_id == 0, vertex_id)) == ~0u) - return; - if(((real64 *)node->layer[0].layer)[vertex_id * 3] == V_REAL64_MAX) - { - for(i = 0; i < node->layer_count; i++) - { - if(node->layer[i].name[0] != 0 && node->layer[i].type == VN_G_LAYER_VERTEX_XYZ && node->layer[i].layer != NULL) - { - ((real64 *)node->layer[i].layer)[vertex_id * 3] = x; - ((real64 *)node->layer[i].layer)[vertex_id * 3 + 1] = y; - ((real64 *)node->layer[i].layer)[vertex_id * 3 + 2] = z; - } - } - layer_id = 0; - }else - { - ((real64 *)node->layer[layer_id].layer)[vertex_id * 3] = x; - ((real64 *)node->layer[layer_id].layer)[vertex_id * 3 + 1] = y; - ((real64 *)node->layer[layer_id].layer)[vertex_id * 3 + 2] = z; - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_vertex_set_xyz_real64(node_id, layer_id, vertex_id, x, y, z); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_vertex_set_xyz_real32(node_id, layer_id, vertex_id, (float)x, (float)y, (float)z); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_vertex_delete_real(void *user, VNodeID node_id, uint32 vertex_id) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(vertex_id >= node->vertex_size) - return; - if(vertex_id < node->vertex_hole) - node->vertex_hole = vertex_id; - for(i = 0; i < node->layer_count; i++) - if(node->layer[i].name[0] != 0 && node->layer[i].type == VN_G_LAYER_VERTEX_XYZ && node->layer[i].layer != NULL) - ((real64 *)node->layer[i].layer)[vertex_id * 3] = V_REAL64_MAX; - count = vs_get_subscript_count(node->layer[0].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[0].subscribers, i); - verse_send_g_vertex_delete_real32(node_id, vertex_id); - } - count = vs_get_subscript_count(node->layer[0].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[0].subscribersd, i); - verse_send_g_vertex_delete_real64(node_id, vertex_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_vertex_set_uint32(void *user, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, uint32 value) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_VERTEX_UINT32) - return; - if((vertex_id = vs_g_extend_arrays(node, TRUE, FALSE, vertex_id)) == ~0u) - return; - ((uint32 *)node->layer[layer_id].layer)[vertex_id] = value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_vertex_set_uint32(node_id, layer_id, vertex_id, value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_vertex_set_real64(void *user, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, real64 value) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_VERTEX_REAL) - return; - if((vertex_id = vs_g_extend_arrays(node, TRUE, FALSE, vertex_id)) == ~0u) - return; - ((real64 *)node->layer[layer_id].layer)[vertex_id] = value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_vertex_set_real32(node_id, layer_id, vertex_id, (float)value); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_vertex_set_real64(node_id, layer_id, vertex_id, value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_vertex_set_real32(void *user, VNodeID node_id, VLayerID layer_id, uint32 vertex_id, float value) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_VERTEX_REAL) - return; - if((vertex_id = vs_g_extend_arrays(node, TRUE, FALSE, vertex_id)) == ~0u) - return; - ((real64 *)node->layer[layer_id].layer)[vertex_id] = (real64)value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_vertex_set_real32(node_id, layer_id, vertex_id, value); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_vertex_set_real64(node_id, layer_id, vertex_id, (real64)value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_corner_uint32(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 v0, uint32 v1, uint32 v2, uint32 v3) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_CORNER_UINT32) - return; - if(layer_id == 1 && (v0 == v1 || v1 == v2 || v2 == v3 || v3 == v0 || v0 == v2 || v1 == v3)) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, layer_id == 1, polygon_id)) == ~0u) - return; - ((uint32 *)node->layer[layer_id].layer)[polygon_id * 4] = v0; - ((uint32 *)node->layer[layer_id].layer)[polygon_id * 4 + 1] = v1; - ((uint32 *)node->layer[layer_id].layer)[polygon_id * 4 + 2] = v2; - ((uint32 *)node->layer[layer_id].layer)[polygon_id * 4 + 3] = v3; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_corner_uint32(node_id, layer_id, polygon_id, v0, v1, v2, v3); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_corner_real64(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 v0, real64 v1, real64 v2, real64 v3) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_CORNER_REAL) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, FALSE, polygon_id)) == ~0u) - return; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4] = v0; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4 + 1] = v1; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4 + 2] = v2; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4 + 3] = v3; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_corner_real32(node_id, layer_id, polygon_id, (float)v0, (float)v1, (float)v2, (float)v3); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_polygon_set_corner_real64(node_id, layer_id, polygon_id, v0, v1, v2, v3); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_corner_real32(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, float v0, float v1, float v2, float v3) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_CORNER_REAL) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, FALSE, polygon_id)) == ~0u) - return; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4] = v0; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4 + 1] = v1; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4 + 2] = v2; - ((real64 *)node->layer[layer_id].layer)[polygon_id * 4 + 3] = v3; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_corner_real32(node_id, layer_id, polygon_id, v0, v1, v2, v3); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_polygon_set_corner_real64(node_id, layer_id, polygon_id, (real64)v0, (real64)v1, (real64)v2, (real64)v3); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_face_uint8(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint8 value) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_FACE_UINT8) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, FALSE, polygon_id)) == ~0u) - return; - ((uint8 *)node->layer[layer_id].layer)[polygon_id] = value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_face_uint8(node_id, layer_id, polygon_id, value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_face_uint32(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, uint32 value) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_FACE_UINT32) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, FALSE, polygon_id)) == ~0u) - return; - ((uint32 *)node->layer[layer_id].layer)[polygon_id] = value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_face_uint32(node_id, layer_id, polygon_id, value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_face_real64(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, real64 value) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_FACE_REAL) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, FALSE, polygon_id)) == ~0u) - return; - ((real64 *)node->layer[layer_id].layer)[polygon_id] = value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_face_real32(node_id, layer_id, polygon_id, (float)value); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_polygon_set_face_real64(node_id, layer_id, polygon_id, value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_set_face_real32(void *user, VNodeID node_id, VLayerID layer_id, uint32 polygon_id, float value) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(layer_id >= node->layer_count || node->layer[layer_id].layer == NULL || node->layer[layer_id].type != VN_G_LAYER_POLYGON_FACE_REAL) - return; - if((polygon_id = vs_g_extend_arrays(node, FALSE, FALSE, polygon_id)) == ~0u) - return; - ((real64 *)node->layer[layer_id].layer)[polygon_id] = (real64)value; - count = vs_get_subscript_count(node->layer[layer_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribers, i); - verse_send_g_polygon_set_face_real32(node_id, layer_id, polygon_id, value); - } - count = vs_get_subscript_count(node->layer[layer_id].subscribersd); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[layer_id].subscribersd, i); - verse_send_g_polygon_set_face_real64(node_id, layer_id, polygon_id, (real64)value); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_polygon_delete(void *user, VNodeID node_id, uint32 polygon_id) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - - if(polygon_id >= node->poly_size || ((uint32 *)node->layer[1].layer)[polygon_id * 4] == ~0u) - return; - if(polygon_id < node->polygon_hole) - node->polygon_hole = polygon_id; - - ((uint32 *)node->layer[1].layer)[polygon_id * 4] = ~0u; - count = vs_get_subscript_count(node->layer[1].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->layer[1].subscribers, i); - verse_send_g_polygon_delete(node_id, polygon_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_crease_set_vertex(void *user, VNodeID node_id, const char *layer, uint32 def_crease) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - node->crease_vertex = def_crease; - v_strlcpy(node->crease_vertex_layer, layer, sizeof node->crease_vertex_layer); - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_g_crease_set_vertex(node_id, layer, def_crease); - } - vs_reset_subscript_session(); -} - -static void callback_send_g_crease_set_edge(void *user, VNodeID node_id, const char *layer, uint32 def_crease) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - node->crease_edge = def_crease; - v_strlcpy(node->crease_edge_layer, layer, sizeof node->crease_edge_layer); - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_g_crease_set_edge(node_id, layer, def_crease); - } - vs_reset_subscript_session(); -} - -void callback_send_g_bone_create(void *user, VNodeID node_id, uint16 bone_id, const char *weight, - const char *reference, uint16 parent, - real64 pos_x, real64 pos_y, real64 pos_z, - const char *position_label, const char *rotation_label, const char *scale_label) -{ - VSNodeGeometry *node; - unsigned int i, count; - - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(bone_id >= node->bone_count || node->bones[bone_id].weight[0] == '\0') - { - /* Find free bone to re-use, if any. */ - for(bone_id = 0; bone_id < node->bone_count && node->bones[bone_id].weight[0] != '\0'; bone_id++) - ; - if(bone_id == node->bone_count) - { - bone_id = node->bone_count; - node->bone_count += 16; - node->bones = realloc(node->bones, (sizeof *node->bones) * node->bone_count); - for(i = bone_id; i < node->bone_count; i++) - node->bones[i].weight[0] = '\0'; - } - } - v_strlcpy(node->bones[bone_id].weight, weight, sizeof node->bones[bone_id].weight); - v_strlcpy(node->bones[bone_id].reference, reference, sizeof node->bones[bone_id].reference); - node->bones[bone_id].parent = parent; - node->bones[bone_id].pos_x = pos_x; - node->bones[bone_id].pos_y = pos_y; - node->bones[bone_id].pos_z = pos_z; - v_strlcpy(node->bones[bone_id].position_label, position_label, sizeof node->bones[bone_id].position_label); - v_strlcpy(node->bones[bone_id].rotation_label, rotation_label, sizeof node->bones[bone_id].rotation_label); - v_strlcpy(node->bones[bone_id].scale_label, scale_label, sizeof node->bones[bone_id].scale_label); - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_g_bone_create(node_id, bone_id, weight, reference, parent, pos_x, pos_y, pos_z, position_label, rotation_label, scale_label); - } - vs_reset_subscript_session(); -} - -void callback_send_g_bone_destroy(void *user, VNodeID node_id, uint32 bone_id) -{ - VSNodeGeometry *node; - unsigned int i, count; - node = (VSNodeGeometry *)vs_get_node(node_id, V_NT_GEOMETRY); - if(node == NULL) - return; - if(bone_id >= node->bone_count || node->bones[bone_id].weight[0] == 0) - return; - node->bones[bone_id].weight[0] = 0; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_g_bone_destroy(node_id, bone_id); - } - vs_reset_subscript_session(); -} - -void vs_g_callback_init(void) -{ - verse_callback_set(verse_send_g_layer_create, callback_send_g_layer_create, NULL); - verse_callback_set(verse_send_g_layer_destroy, callback_send_g_layer_destroy, NULL); - verse_callback_set(verse_send_g_layer_subscribe, callback_send_g_layer_subscribe, NULL); - verse_callback_set(verse_send_g_layer_unsubscribe, callback_send_g_layer_unsubscribe, NULL); - verse_callback_set(verse_send_g_vertex_set_xyz_real32, callback_send_g_vertex_set_xyz_real32, NULL); - verse_callback_set(verse_send_g_vertex_set_xyz_real64, callback_send_g_vertex_set_xyz_real64, NULL); - verse_callback_set(verse_send_g_vertex_set_uint32, callback_send_g_vertex_set_uint32, NULL); - verse_callback_set(verse_send_g_vertex_set_real32, callback_send_g_vertex_set_real32, NULL); - verse_callback_set(verse_send_g_vertex_set_real64, callback_send_g_vertex_set_real64, NULL); - verse_callback_set(verse_send_g_vertex_delete_real32, callback_send_g_vertex_delete_real, NULL); - verse_callback_set(verse_send_g_vertex_delete_real64, callback_send_g_vertex_delete_real, NULL); - verse_callback_set(verse_send_g_polygon_set_corner_uint32, callback_send_g_polygon_set_corner_uint32, NULL); - verse_callback_set(verse_send_g_polygon_set_corner_real32, callback_send_g_polygon_set_corner_real32, NULL); - verse_callback_set(verse_send_g_polygon_set_corner_real64, callback_send_g_polygon_set_corner_real64, NULL); - verse_callback_set(verse_send_g_polygon_set_face_uint8, callback_send_g_polygon_set_face_uint8, NULL); - verse_callback_set(verse_send_g_polygon_set_face_uint32, callback_send_g_polygon_set_face_uint32, NULL); - verse_callback_set(verse_send_g_polygon_set_face_real32, callback_send_g_polygon_set_face_real32, NULL); - verse_callback_set(verse_send_g_polygon_set_face_real64, callback_send_g_polygon_set_face_real64, NULL); - verse_callback_set(verse_send_g_polygon_delete, callback_send_g_polygon_delete, NULL); - verse_callback_set(verse_send_g_crease_set_vertex, callback_send_g_crease_set_vertex, NULL); - verse_callback_set(verse_send_g_crease_set_edge, callback_send_g_crease_set_edge, NULL); - verse_callback_set(verse_send_g_bone_create, callback_send_g_bone_create, NULL); - verse_callback_set(verse_send_g_bone_destroy, callback_send_g_bone_destroy, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_head.c b/extern/verse/dist/vs_node_head.c deleted file mode 100644 index 9e926411542..00000000000 --- a/extern/verse/dist/vs_node_head.c +++ /dev/null @@ -1,414 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined(V_GENERATE_FUNC_MODE) - -#include "verse.h" -#include "v_util.h" -#include "vs_server.h" - -typedef struct { - VNTag tag; - VNTagType type; - char tag_name[16]; -} VSTag; - -typedef struct { - VSTag *tags; - unsigned int tag_count; - char group_name[16]; - VSSubscriptionList *subscribers; -} VSTagGroup; - -void create_node_head(VSNodeHead *node, const char *name, unsigned int owner) -{ - size_t len; - - len = strlen(name) + 1; - node->name = malloc(len); - v_strlcpy(node->name, name, len); - node->owner = owner; - node->tag_groups = NULL; - node->group_count = 0; - node->subscribers = vs_create_subscription_list(); -} - -void destroy_node_head(VSNodeHead *node) -{ - unsigned int i, j; - if(node->name != NULL) - free(node->name); - if(node->tag_groups != NULL) - { - for(i = 0; i < node->group_count; i++) - { - for(j = 0; j < ((VSTagGroup *)node->tag_groups)[i].tag_count; j++) - { - if(((VSTagGroup *)node->tag_groups)[i].tags[j].type == VN_TAG_STRING) - free(((VSTagGroup *)node->tag_groups)[i].tags[j].tag.vstring); - if(((VSTagGroup *)node->tag_groups)[i].tags[j].type == VN_TAG_BLOB) - free(((VSTagGroup *)node->tag_groups)[i].tags[j].tag.vblob.blob); - } - if(((VSTagGroup *)node->tag_groups)[i].tags != NULL) - free(((VSTagGroup *)node->tag_groups)[i].tags); - } - if(node->tag_groups != NULL) - free(node->tag_groups); - } -} - - void callback_send_tag_group_create(void *user, VNodeID node_id, uint16 group_id, const char *name) -{ - VSNodeHead *node; - unsigned int count, i, j, element; - - if((node = vs_get_node_head(node_id)) == 0) - return; - if(name[0] == 0) - return; - - for(i = 0; i < node->group_count; i++) /* see if a tag group with this name alredy exists*/ - { - if(((VSTagGroup *)node->tag_groups)[i].group_name[0] != 0) - { - for(j = 0; name[j] == ((VSTagGroup *)node->tag_groups)[i].group_name[j] && name[j] != 0; j++); - if(name[j] == ((VSTagGroup *)node->tag_groups)[i].group_name[j]) - return; - } - } - if(group_id < node->group_count && ((VSTagGroup *)node->tag_groups)[group_id].group_name[0] != 0) /* rename existing group */ - { - element = group_id; - }else /* create new game group */ - { - for(element = 0; element < node->group_count && ((VSTagGroup *)node->tag_groups)[element].group_name[0] != 0; element++); - if(element == node->group_count) - { - node->tag_groups = realloc(node->tag_groups, sizeof(VSTagGroup) * (node->group_count + 16)); - for(i = node->group_count; i < node->group_count + 16U; i++) - { - ((VSTagGroup *)node->tag_groups)[i].group_name[0] = 0; - ((VSTagGroup *)node->tag_groups)[i].tags = NULL; - ((VSTagGroup *)node->tag_groups)[i].tag_count = 0; - ((VSTagGroup *)node->tag_groups)[i].subscribers = NULL; - } - node->group_count += 16; - } - ((VSTagGroup *)node->tag_groups)[element].subscribers = vs_create_subscription_list(); - } - v_strlcpy(((VSTagGroup *)node->tag_groups)[element].group_name, name, - sizeof ((VSTagGroup *)node->tag_groups)[element].group_name); - - count = vs_get_subscript_count(node->subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->subscribers, i); - verse_send_tag_group_create(node_id, element, name); - } - vs_reset_subscript_session(); -} - -static void callback_send_tag_group_destroy(void *user, VNodeID node_id, uint16 group_id) -{ - VSNodeHead *node; - unsigned int count, i; - if((node = vs_get_node_head(node_id)) == 0) - return; - - if(node->group_count <= group_id || ((VSTagGroup *)node->tag_groups)[group_id].group_name[0] == 0) - return; - - vs_destroy_subscription_list(((VSTagGroup *)node->tag_groups)[group_id].subscribers); - for(i = 0; i < ((VSTagGroup *)node->tag_groups)[group_id].tag_count; i++) - { - if(((VSTagGroup *)node->tag_groups)[group_id].tags[i].type == VN_TAG_STRING) - free(((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag.vstring); - if(((VSTagGroup *)node->tag_groups)[group_id].tags[i].type == VN_TAG_BLOB) - free(((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag.vblob.blob); - } - if(((VSTagGroup *)node->tag_groups)[group_id].tags != NULL) - free(((VSTagGroup *)node->tag_groups)[group_id].tags); - ((VSTagGroup *)node->tag_groups)[group_id].group_name[0] = 0; - ((VSTagGroup *)node->tag_groups)[group_id].tags = NULL; - ((VSTagGroup *)node->tag_groups)[group_id].tag_count = 0; - - count = vs_get_subscript_count(node->subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->subscribers, i); - verse_send_tag_group_destroy(node_id, group_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_tag_group_subscribe(void *user, VNodeID node_id, uint16 group_id) -{ - VSNodeHead *node; - unsigned int i; - if((node = vs_get_node_head(node_id)) == 0) - return; - - if(group_id < node->group_count && ((VSTagGroup *)node->tag_groups)[group_id].group_name[0] != 0) - { - vs_add_new_subscriptor(((VSTagGroup *)node->tag_groups)[group_id].subscribers); - for(i = 0; i < ((VSTagGroup *)node->tag_groups)[group_id].tag_count; i++) - { - if(((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag_name[0] != 0) - { - verse_send_tag_create(node_id, group_id, (uint16)i, ((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag_name, ((VSTagGroup *)node->tag_groups)[group_id].tags[i].type, &((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag); - } - } - } -} - -static void callback_send_tag_group_unsubscribe(void *user, VNodeID node_id, uint16 group_id) -{ - VSNodeHead *node; - if((node = vs_get_node_head(node_id)) == 0) - return; - if(group_id < node->group_count && ((VSTagGroup *)node->tag_groups)[group_id].group_name[0] != 0) - vs_remove_subscriptor(((VSTagGroup *)node->tag_groups)[group_id].subscribers); -} - -static void callback_send_tag_create(void *user, VNodeID node_id, uint16 group_id, uint16 tag_id, char *name, uint8 type, void *tag) -{ - VSNodeHead *node; - VSTag *t = NULL; - unsigned int i, count; - - if((node = vs_get_node_head(node_id)) == 0) - return; - if(group_id >= node->group_count || ((VSTagGroup *)node->tag_groups)[group_id].group_name[0] == 0) - return; - -/* for(i = 0; i < ((VSTagGroup *)node->tag_groups)[group_id].tag_count; i++) - { - if(((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag_name != NULL && i != tag_id) - { - for(j = 0; name[j] == ((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag_name[j] && name[j] != 0; j++); - if(name[j] == ((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag_name[j]) - return; - } - }*/ - if(tag_id < ((VSTagGroup *)node->tag_groups)[group_id].tag_count && ((VSTagGroup *)node->tag_groups)[group_id].tags[tag_id].tag_name[0] != 0) - ; - else - { - for(tag_id = 0; tag_id < ((VSTagGroup *)node->tag_groups)[group_id].tag_count && ((VSTagGroup *)node->tag_groups)[group_id].tags[tag_id].tag_name[0] != 0; tag_id++) - ; - if(tag_id == ((VSTagGroup *)node->tag_groups)[group_id].tag_count) - { - ((VSTagGroup *)node->tag_groups)[group_id].tags = realloc(((VSTagGroup *)node->tag_groups)[group_id].tags, sizeof(VSTag) * (((VSTagGroup *)node->tag_groups)[group_id].tag_count + 16)); - for(i = tag_id; i < ((VSTagGroup *)node->tag_groups)[group_id].tag_count + 16; i++) - ((VSTagGroup *)node->tag_groups)[group_id].tags[i].tag_name[0] = 0; - ((VSTagGroup *)node->tag_groups)[group_id].tag_count += 16; - } - } - t = &((VSTagGroup *)node->tag_groups)[group_id].tags[tag_id]; - if(t->tag_name[0] != '\0') /* Old tag being re-set? */ - { - if(t->type == VN_TAG_STRING) - free(t->tag.vstring); - else if(t->type == VN_TAG_BLOB) - free(t->tag.vblob.blob); - } - t->type = type; - v_strlcpy(t->tag_name, name, sizeof t->tag_name); - switch(type) - { - case VN_TAG_BOOLEAN : - t->tag.vboolean = ((VNTag *)tag)->vboolean; - break; - case VN_TAG_UINT32 : - t->tag.vuint32 = ((VNTag *)tag)->vuint32; - break; - case VN_TAG_REAL64 : - t->tag.vreal64 = ((VNTag *)tag)->vreal64; - break; - case VN_TAG_STRING : - i = strlen(((VNTag *) tag)->vstring); - t->tag.vstring = malloc(i + 1); - strcpy(t->tag.vstring, ((VNTag *) tag)->vstring); - break; - case VN_TAG_REAL64_VEC3 : - t->tag.vreal64_vec3[0] = ((VNTag *)tag)->vreal64_vec3[0]; - t->tag.vreal64_vec3[1] = ((VNTag *)tag)->vreal64_vec3[1]; - t->tag.vreal64_vec3[2] = ((VNTag *)tag)->vreal64_vec3[2]; - break; - case VN_TAG_LINK : - t->tag.vlink = ((VNTag *)tag)->vlink; - break; - case VN_TAG_ANIMATION : - t->tag.vanimation.curve = ((VNTag *)tag)->vanimation.curve; - t->tag.vanimation.start = ((VNTag *)tag)->vanimation.start; - t->tag.vanimation.end = ((VNTag *)tag)->vanimation.end; - break; - case VN_TAG_BLOB : - t->tag.vblob.blob = malloc(((VNTag *)tag)->vblob.size); - t->tag.vblob.size = ((VNTag *)tag)->vblob.size; - memcpy(t->tag.vblob.blob, ((VNTag *)tag)->vblob.blob, ((VNTag *)tag)->vblob.size); - break; - } - - count = vs_get_subscript_count(((VSTagGroup *) node->tag_groups)[group_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(((VSTagGroup *) node->tag_groups)[group_id].subscribers, i); - verse_send_tag_create(node_id, group_id, tag_id, name, type, tag); - } - vs_reset_subscript_session(); -} - -static void callback_send_tag_destroy(void *user, VNodeID node_id, uint16 group_id, uint16 tag_id) -{ - VSNodeHead *node; - unsigned int count, i; - if((node = vs_get_node_head(node_id)) == 0) - return; - - count = vs_get_subscript_count(((VSTagGroup *) node->tag_groups)[group_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(((VSTagGroup *) node->tag_groups)[group_id].subscribers, i); - verse_send_tag_destroy(node_id, group_id, tag_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_node_name_set(void *user, VNodeID node_id, char *name) -{ - VSNodeHead *node; - unsigned int count, i; - size_t len; - - if((node = vs_get_node_head(node_id)) == 0) - return; - len = strlen(name); - if(len == 0) - return; - free(node->name); - len++; - node->name = malloc(len); - v_strlcpy(node->name, name, len); - count = vs_get_subscript_count(node->subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->subscribers, i); - verse_send_node_name_set(node_id, name); - } - vs_reset_subscript_session(); -} - -extern void vs_o_subscribe(VSNodeHead *node); -extern void vs_g_subscribe(VSNodeHead *node); -extern void vs_m_subscribe(VSNodeHead *node); -extern void vs_b_subscribe(VSNodeHead *node); -extern void vs_t_subscribe(VSNodeHead *node); -extern void vs_c_subscribe(VSNodeHead *node); -extern void vs_a_subscribe(VSNodeHead *node); - -static void callback_send_node_subscribe(void *user, VNodeID node_id) -{ - unsigned int i; - VSNodeHead *node; - - if((node = vs_get_node_head(node_id)) == NULL) - return; - switch(node->type) - { - case V_NT_OBJECT : - vs_o_subscribe(node); - break; - case V_NT_GEOMETRY : - vs_g_subscribe(node); - break; - case V_NT_MATERIAL : - vs_m_subscribe(node); - break; - case V_NT_BITMAP : - vs_b_subscribe(node); - break; - case V_NT_TEXT: - vs_t_subscribe(node); - break; - case V_NT_CURVE: - vs_c_subscribe(node); - break; - case V_NT_AUDIO: - vs_a_subscribe(node); - break; - default: - fprintf(stderr, "Not subscribing to node type %d\n", node->type); - } - verse_send_node_name_set(node->id, node->name); - for(i = 0; i < node->group_count; i++) - if(((VSTagGroup *)node->tag_groups)[i].group_name[0] != 0) - verse_send_tag_group_create(node->id, (uint16)i, ((VSTagGroup *)node->tag_groups)[i].group_name); - vs_add_new_subscriptor(node->subscribers); -} - -extern void vs_o_unsubscribe(VSNodeHead *node); -extern void vs_g_unsubscribe(VSNodeHead *node); -extern void vs_m_unsubscribe(VSNodeHead *node); -extern void vs_b_unsubscribe(VSNodeHead *node); -extern void vs_t_unsubscribe(VSNodeHead *node); -extern void vs_c_unsubscribe(VSNodeHead *node); -extern void vs_a_unsubscribe(VSNodeHead *node); - -static void callback_send_node_unsubscribe(void *user, VNodeID node_id) -{ - VSNodeHead *node; - - if((node = vs_get_node_head(node_id)) == NULL) - return; - vs_remove_subscriptor(node->subscribers); - - switch(node->type) - { - case V_NT_OBJECT : - vs_o_unsubscribe(node); - break; - case V_NT_GEOMETRY : - vs_g_unsubscribe(node); - break; - case V_NT_MATERIAL : - vs_m_unsubscribe(node); - break; - case V_NT_BITMAP : - vs_b_unsubscribe(node); - break; - case V_NT_TEXT: - vs_t_unsubscribe(node); - break; - case V_NT_CURVE: - vs_c_unsubscribe(node); - break; - case V_NT_AUDIO: - vs_a_unsubscribe(node); - break; - default: - fprintf(stderr, "Not unsubscribing from node type %d\n", node->type); - } -} - -void vs_h_callback_init(void) -{ - verse_callback_set(verse_send_tag_group_create, callback_send_tag_group_create, NULL); - verse_callback_set(verse_send_tag_group_destroy, callback_send_tag_group_destroy, NULL); - verse_callback_set(verse_send_tag_group_subscribe, callback_send_tag_group_subscribe, NULL); - verse_callback_set(verse_send_tag_group_unsubscribe, callback_send_tag_group_unsubscribe, NULL); - verse_callback_set(verse_send_tag_create, callback_send_tag_create, NULL); - verse_callback_set(verse_send_tag_destroy, callback_send_tag_destroy, NULL); - verse_callback_set(verse_send_node_name_set, callback_send_node_name_set, NULL); - verse_callback_set(verse_send_node_subscribe, callback_send_node_subscribe, NULL); - verse_callback_set(verse_send_node_unsubscribe, callback_send_node_unsubscribe, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_material.c b/extern/verse/dist/vs_node_material.c deleted file mode 100644 index b22c070e348..00000000000 --- a/extern/verse/dist/vs_node_material.c +++ /dev/null @@ -1,116 +0,0 @@ -/* -** -*/ - -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -typedef struct { - VNMFragmentType type; - VMatFrag frag; -} VSMatFrag; - -typedef struct{ - VSNodeHead head; - VSMatFrag *frag; - unsigned int frag_count; -} VSNodeMaterial; - -VSNodeMaterial * vs_m_create_node(unsigned int owner) -{ - VSNodeMaterial *node; - char name[48]; - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_MATERIAL); - sprintf(name, "Material_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - node->frag = NULL; - node->frag_count = 0; - return node; -} - -void vs_m_destroy_node(VSNodeMaterial *node) -{ - destroy_node_head(&node->head); - free(node->frag); - free(node); -} - -void vs_m_subscribe(VSNodeMaterial *node) -{ - uint16 i; - for(i = 0; i < node->frag_count; i++) - if(node->frag[i].type <= VN_M_FT_OUTPUT) - verse_send_m_fragment_create(node->head.id, (uint16)i, (uint8)node->frag[i].type, &node->frag[i].frag); -} - -void vs_m_unsubscribe(VSNodeMaterial *node) -{ -} - -static void callback_send_m_fragment_create(void *user, VNodeID node_id, VNMFragmentID frag_id, uint8 type, VMatFrag *fragment) -{ - unsigned int count; - uint16 i; - VSNodeMaterial *node; - node = (VSNodeMaterial *)vs_get_node(node_id, V_NT_MATERIAL); - if(node == NULL) - return; - if(node->frag_count + 32 < frag_id) - frag_id = (uint16)-1; - if(frag_id == (uint16) ~0u) - for(frag_id = 0; frag_id < node->frag_count && node->frag[frag_id].type < VN_M_FT_OUTPUT + 1; frag_id++) - ; - if(frag_id >= node->frag_count) - { - node->frag = realloc(node->frag, (sizeof *node->frag) * (node->frag_count + 32)); - for(i = node->frag_count; i < (node->frag_count + 32); i++) - node->frag[i].type = 255; - node->frag_count += 32; - } - node->frag[frag_id].type = type; - node->frag[frag_id].frag = *fragment; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_m_fragment_create(node_id, frag_id, type, fragment); - } - vs_reset_subscript_session(); -} - -static void callback_send_m_fragment_destroy(void *user, VNodeID node_id, VNMFragmentID frag_id) -{ - unsigned int count, i; - VSNodeMaterial *node; - node = (VSNodeMaterial *)vs_get_node(node_id, V_NT_MATERIAL); - printf("callback_send_m_fragment_destroy %p\n", node); - if(node == NULL) - return; - if(node->frag_count <= frag_id || node->frag[frag_id].type > VN_M_FT_OUTPUT) - return; - node->frag[frag_id].type = 255; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_m_fragment_destroy(node_id, frag_id); - } - vs_reset_subscript_session(); -} - -void vs_m_callback_init(void) -{ - verse_callback_set(verse_send_m_fragment_create, callback_send_m_fragment_create, NULL); - verse_callback_set(verse_send_m_fragment_destroy, callback_send_m_fragment_destroy, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_object.c b/extern/verse/dist/vs_node_object.c deleted file mode 100644 index d269a8ddb99..00000000000 --- a/extern/verse/dist/vs_node_object.c +++ /dev/null @@ -1,837 +0,0 @@ -/* -** -*/ - -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "v_util.h" -#include "vs_server.h" - -extern void verse_send_o_link_set(VNodeID node_id, uint16 link_id, VNodeID link, const char *name, uint32 target_id); -extern void verse_send_o_link_destroy(VNodeID node_id, uint16 link_id); - -typedef struct { - VNodeID link; - char name[16]; - uint32 target_id; - /* Animation parameters. */ - uint32 time_s; - uint32 time_f; - uint32 dimensions; - real64 pos[4]; - real64 speed[4]; - real64 accel[4]; - real64 scale[4]; - real64 scale_speed[4]; -} VSLink; - -typedef struct { - char name[16]; - uint8 param_count; - VNOParamType *param_types; - char *param_names; -} VSMethod; - -typedef struct { - char name[VN_O_METHOD_GROUP_NAME_SIZE]; - VSMethod *methods; - unsigned int method_count; - VSSubscriptionList *subscribers; -} VSMethodGroup; - -typedef struct { - real64 position[3]; - VNQuat64 rotation; - real64 scale[3]; -/* VSSubscriptionList *subscribers;*/ -} VSTransform; - -typedef struct { - VSNodeHead head; - VSTransform transform; - VSSubscriptionList *trans_sub64; - VSSubscriptionList *trans_sub32; - real64 light[3]; - VSMethodGroup *groups; - uint16 group_count; - VSLink *links; - uint16 link_count; - boolean hidden; -} VSNodeObject; - -VSNodeObject * vs_o_create_node(unsigned int owner) -{ - VSNodeObject *node; - unsigned int i, j; - char name[48]; - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_OBJECT); - sprintf(name, "Object_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - node->trans_sub64 = vs_create_subscription_list(); - node->trans_sub32 = vs_create_subscription_list(); - node->transform.position[0] = node->transform.position[1] = node->transform.position[2] = 0; - node->transform.rotation.x = node->transform.rotation.y = node->transform.rotation.z = 0.0; - node->transform.rotation.w = 1.0; - node->transform.scale[0] = node->transform.scale[1] = node->transform.scale[2] = 1.0; - node->light[0] = node->light[1] = node->light[2] = V_REAL64_MAX; - node->groups = malloc((sizeof *node->groups) * 16); - node->group_count = 16; - for(i = 0; i < 16; i++) - { - node->groups[i].name[0] = 0; - node->groups[i].methods = NULL; - node->groups[i].method_count = 0; - node->groups[i].subscribers = NULL; - } - - node->link_count = 16; - node->links = malloc((sizeof *node->links) * node->link_count); - for(i = 0; i < node->link_count; i++) - { - node->links[i].link = -1; - node->links[i].name[0] = 0; - node->links[i].target_id = -1; - node->links[i].dimensions = 0; - for(j = 0; j < 4; j++) - { - node->links[i].pos[j] = 0.0; - node->links[i].speed[j] = 0.0; - node->links[i].accel[j] = 0.0; - node->links[i].scale[j] = 0.0; - node->links[i].scale_speed[j] = 0.0; - } - } - node->hidden = FALSE; - return node; -} - -void vs_o_destroy_node(VSNodeObject *node) -{ - unsigned int i, j; - destroy_node_head(&node->head); - for(i = 0; i < node->group_count; i++) - { - if(node->groups[i].name[0] != 0) - { - for(j = 0; j < node->groups[i].method_count; j++) - { - if(node->groups[i].methods[j].name[0] != 0 && node->groups[i].methods[j].param_count != 0) - { - free(node->groups[i].methods[j].param_types); - free(node->groups[i].methods[j].param_names); - } - } - if(node->groups[i].methods != NULL) - free(node->groups[i].methods); - } - } - free(node->groups); - free(node); -} - -void vs_o_subscribe(VSNodeObject *node) -{ - unsigned int i; - for(i = 0; i < node->link_count; i++) - { - const VSLink *lnk = node->links + i; - - if(lnk->name[0] != 0) - { - verse_send_o_link_set(node->head.id, i, lnk->link, lnk->name, lnk->target_id); - if(lnk->dimensions != 0) - { - verse_send_o_anim_run(node->head.id, i, lnk->time_s, lnk->time_f, lnk->dimensions, - lnk->pos, lnk->speed, lnk->accel, - lnk->scale, lnk->scale_speed); - } - } - } - if(node->light[0] != V_REAL64_MAX || node->light[1] != V_REAL64_MAX || node->light[2] != V_REAL64_MAX) - verse_send_o_light_set(node->head.id, node->light[0], node->light[1], node->light[2]); - for(i = 0; i < node->group_count; i++) - { - if(node->groups[i].name[0] != 0) - verse_send_o_method_group_create(node->head.id, i, node->groups[i].name); - } - if(node->hidden) - verse_send_o_hide(node->head.id, TRUE); -} - -void vs_o_unsubscribe(VSNodeObject *node) -{ - unsigned int i; - for(i = 0; i < node->group_count; i++) - if(node->groups[i].name[0] != 0) - vs_remove_subscriptor(node->groups[i].subscribers); - vs_remove_subscriptor(node->trans_sub64); - vs_remove_subscriptor(node->trans_sub32); -} - -static void callback_send_o_transform_pos_real32(void *user, VNodeID node_id, uint32 time_s, uint32 time_f, real32 *pos, real32 *speed, real32 *accelerate, real32 *drag_normal, real32 drag) -{ - VSNodeObject *node; - unsigned int i, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->transform.position[0] = pos[0]; - node->transform.position[1] = pos[1]; - node->transform.position[2] = pos[2]; - - if((count = vs_get_subscript_count(node->trans_sub64)) > 0) /* Anyone listening at 64 bits? */ - { - real64 spd[3], acc[3], drn[3], *pspd = NULL, *pacc = NULL, *pdrn = NULL; - - pspd = (speed != NULL) ? spd : NULL; - pacc = (accelerate != NULL) ? acc : NULL; - pdrn = (drag_normal != NULL) ? drn : NULL; - /* Convert non-position values to 64-bit. */ - for(i = 0; i < 3; i++) - { - if(speed != NULL) - spd[i] = speed[i]; - if(accelerate != NULL) - acc[i] = accelerate[i]; - if(drag_normal != NULL) - drn[i] = drag_normal[i]; - } - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub64, i); - verse_send_o_transform_pos_real64(node_id, time_s, time_f, node->transform.position, pspd, pacc, pdrn, drag); - } - } - count = vs_get_subscript_count(node->trans_sub32); - for(i = 0; i < count; i++) - { - - vs_set_subscript_session(node->trans_sub32, i); - verse_send_o_transform_pos_real32(node_id, time_s, time_f, pos, speed, accelerate, drag_normal, drag); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_transform_rot_real32(void *user, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat32 *rot, - const VNQuat32 *speed, const VNQuat32 *accelerate, const VNQuat32 *drag_normal, real32 drag) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->transform.rotation.x = rot->x; - node->transform.rotation.y = rot->y; - node->transform.rotation.z = rot->z; - node->transform.rotation.w = rot->w; - if((count = vs_get_subscript_count(node->trans_sub64)) > 0) - { - VNQuat64 spd, acc, drn, *p[3]; - - /* Convert 32-bit quaternions to 64-bit. Converter handles NULLs, has nice return semantics. */ - p[0] = v_quat64_from_quat32(&spd, speed); - p[1] = v_quat64_from_quat32(&acc, accelerate); - p[2] = v_quat64_from_quat32(&drn, drag_normal); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub64, i); - verse_send_o_transform_rot_real64(node_id, time_s, time_f, &node->transform.rotation, p[0], p[1], p[2], drag); - } - } - count = vs_get_subscript_count(node->trans_sub32); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub32, i); - verse_send_o_transform_rot_real32(node_id, time_s, time_f, rot, speed, accelerate, drag_normal, drag); - } - vs_reset_subscript_session(); -} - - -static void callback_send_o_transform_scale_real32(void *user, VNodeID node_id, real32 scale_x, real32 scale_y, real32 scale_z) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->transform.scale[0] = scale_x; - node->transform.scale[1] = scale_y; - node->transform.scale[2] = scale_z; - count = vs_get_subscript_count(node->trans_sub64); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub64, i); - verse_send_o_transform_scale_real64(node_id, scale_x, scale_y, scale_z); - } - count = vs_get_subscript_count(node->trans_sub32); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub32, i); - verse_send_o_transform_scale_real32(node_id, scale_x, scale_y, scale_z); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_transform_pos_real64(void *user, VNodeID node_id, uint32 time_s, uint32 time_f, const real64 *pos, - const real64 *speed, const real64 *accelerate, const real64 *drag_normal, real64 drag) -{ - VSNodeObject *node; - unsigned int i, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->transform.position[0] = pos[0]; - node->transform.position[1] = pos[1]; - node->transform.position[2] = pos[2]; - count = vs_get_subscript_count(node->trans_sub64); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub64, i); - verse_send_o_transform_pos_real64(node_id, time_s, time_f, node->transform.position, speed, accelerate, drag_normal, drag); - } - if((count = vs_get_subscript_count(node->trans_sub32)) > 0) /* Anyone listening at 32 bits? */ - { - real32 ps[3], spd[3], acc[3], drn[3], *p[] = { NULL, NULL, NULL }; - - ps[0] = pos[0]; - ps[1] = pos[1]; - ps[2] = pos[2]; - if(speed != NULL) - { - p[0] = spd; - spd[0] = speed[0]; - spd[1] = speed[1]; - spd[2] = speed[2]; - } - else - p[0] = NULL; - if(accelerate != NULL) - { - p[1] = acc; - acc[0] = accelerate[0]; - acc[1] = accelerate[1]; - acc[2] = accelerate[2]; - } - else - p[1] = NULL; - if(drag_normal != NULL) - { - p[1] = drn; - drn[0] = drag_normal[0]; - drn[1] = drag_normal[1]; - drn[2] = drag_normal[2]; - } - else - p[2] = NULL; - - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub32, i); - verse_send_o_transform_pos_real32(node_id, time_s, time_f, ps, p[0], p[1], p[2], (real32) drag); - } - } - vs_reset_subscript_session(); -} - -static void callback_send_o_transform_rot_real64(void *user, VNodeID node_id, uint32 time_s, uint32 time_f, const VNQuat64 *rot, - const VNQuat64 *speed, const VNQuat64 *accelerate, const VNQuat64 *drag_normal, real64 drag) -{ - VSNodeObject *node; - unsigned int i, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->transform.rotation = *rot; - count = vs_get_subscript_count(node->trans_sub64); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub64, i); - verse_send_o_transform_rot_real64(node_id, time_s, time_f, &node->transform.rotation, speed, accelerate, drag_normal, drag); - } - if((count = vs_get_subscript_count(node->trans_sub32)) > 0) /* Anyone listening at 32 bits? */ - { - VNQuat32 rt, spd, acc, drn, *p[3]; - - v_quat32_from_quat64(&rt, rot); - p[0] = v_quat32_from_quat64(&spd, speed); - p[1] = v_quat32_from_quat64(&acc, accelerate); - p[2] = v_quat32_from_quat64(&drn, drag_normal); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub32, i); - verse_send_o_transform_rot_real32(node_id, time_s, time_f, &rt, p[0], p[1], p[2], (real32) drag); - } - } - vs_reset_subscript_session(); -} - -static void callback_send_o_transform_scale_real64(void *user, VNodeID node_id, real64 scale_x, real64 scale_y, real64 scale_z) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->transform.scale[0] = scale_x; - node->transform.scale[1] = scale_y; - node->transform.scale[2] = scale_z; - count = vs_get_subscript_count(node->trans_sub64); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub64, i); - verse_send_o_transform_scale_real64(node_id, scale_x, scale_y, scale_z); - } - count = vs_get_subscript_count(node->trans_sub32); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->trans_sub32, i); - verse_send_o_transform_scale_real32(node_id, (real32) scale_x, (real32) scale_y, (real32) scale_z); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_transform_subscribe(void *user, VNodeID node_id, VNRealFormat type) -{ - VSNodeObject *node; - uint32 time_s, time_f; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - verse_session_get_time(&time_s, &time_f); - if(type == VN_FORMAT_REAL32) - { - real32 tpos[3]; - VNQuat32 rot; - - vs_add_new_subscriptor(node->trans_sub32); - tpos[0] = node->transform.position[0]; - tpos[1] = node->transform.position[1]; - tpos[2] = node->transform.position[2]; - verse_send_o_transform_pos_real32(node_id, time_s, time_f, tpos, NULL, NULL, NULL, 0.0f); - v_quat32_from_quat64(&rot, &node->transform.rotation); - verse_send_o_transform_rot_real32(node_id, time_s, time_f, &rot, NULL, NULL, NULL, 0.0f); - verse_send_o_transform_scale_real32(node_id, (real32) node->transform.scale[0], (real32) node->transform.scale[1], (real32) node->transform.scale[2]); - } - else - { - vs_add_new_subscriptor(node->trans_sub64); - verse_send_o_transform_pos_real64(node_id, time_s, time_f, node->transform.position, NULL, NULL, NULL, 0); - verse_send_o_transform_rot_real64(node_id, time_s, time_f, &node->transform.rotation, NULL, NULL, NULL, 0); - verse_send_o_transform_scale_real64(node_id, node->transform.scale[0], node->transform.scale[1], node->transform.scale[2]); - } -} - -static void callback_send_o_transform_unsubscribe(void *user, VNodeID node_id, VNRealFormat type) -{ - VSNodeObject *node; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - if(type == VN_FORMAT_REAL32) - vs_remove_subscriptor(node->trans_sub32); - else - vs_remove_subscriptor(node->trans_sub64); -} - -static void callback_send_o_light_set(void *user, VNodeID node_id, real64 light_r, real64 light_g, real64 light_b) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - node->light[0] = light_r; - node->light[1] = light_g; - node->light[2] = light_b; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_light_set(node_id, light_r, light_g, light_b); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_link_set(void *user, VNodeID node_id, uint16 link_id, VNodeID link, const char *name, uint32 target_id) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - - if(node == NULL) - return; - - if(name[0] == 0) - return; - if(vs_get_node_head(link) == 0) - link = 0; - - if(link_id >= node->link_count || node->links[link_id].name[0] == 0) - { - for(link_id = 0; link_id < node->link_count && node->links[link_id].name[0] != 0; link_id++); - - if(link_id == node->link_count) - { - i = node->link_count; - node->link_count += 16; - node->links = realloc(node->links, (sizeof *node->links) * node->link_count); - for(; i < node->link_count; i++) - { - node->links[i].name[0] = 0; - node->links[i].dimensions = 0; - } - } - } - - node->links[link_id].link = link; - for(i = 0; i < 15 && name[i] != 0; i++) - node->links[link_id].name[i] = name[i]; - node->links[link_id].name[i] = 0; - node->links[link_id].target_id = target_id; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_link_set(node_id, link_id, link, name, target_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_link_destroy(void *user, VNodeID node_id, uint16 link_id) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - - if(link_id >= node->link_count || node->links[link_id].name[0] == 0) - return; - - node->links[link_id].name[0] = 0; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_link_destroy(node_id, link_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_method_group_create(void *user, VNodeID node_id, uint16 group_id, char *name) -{ - VSNodeObject *node; - unsigned int i, j, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - - for(i = 0; i < node->group_count; i++) - { - for(j = 0; node->groups[i].name[j] == name[j] && node->groups[i].name[j] != 0; j++); - if(node->groups[i].name[j] == name[j]) - return; - } - if(group_id >= node->group_count || node->groups[group_id].name[0] == 0) - { - for(group_id = 0; group_id < node->group_count && node->groups[group_id].name[0] != 0; group_id++) - if(group_id == node->group_count) - { - node->groups = realloc(node->groups, sizeof(*node->groups) * (node->group_count + 16)); - for(i = node->group_count; i < node->group_count + 16u; i++) - { - node->groups[i].name[0] = 0; - node->groups[i].methods = NULL; - node->groups[i].method_count = 0; - } - node->group_count += 16; - } - node->groups[group_id].subscribers = vs_create_subscription_list(); - } - for(i = 0; i < 15 && name[i] != 0; i++) - node->groups[group_id].name[i] = name[i]; - node->groups[group_id].name[i] = 0; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_method_group_create(node_id, group_id, name); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_method_group_destroy(void *user, VNodeID node_id, uint16 group_id) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - - if(group_id >= node->group_count || node->groups[group_id].name[0] == 0) - return; - node->groups[group_id].name[0] = 0; - for(i = 0; i < node->groups[group_id].method_count; i++) - { - if(node->groups[group_id].methods[i].name[0] != 0 && node->groups[group_id].methods[i].param_count > 0) - { - free(node->groups[group_id].methods[i].param_names); - free(node->groups[group_id].methods[i].param_types); - } - } - free(node->groups[group_id].methods); - node->groups[group_id].methods = NULL; - node->groups[group_id].method_count = 0; - vs_destroy_subscription_list(node->groups[group_id].subscribers); - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_method_group_destroy(node_id, group_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_method_group_subscribe(void *user, VNodeID node_id, uint16 group_id) -{ - VSNodeObject *node; - unsigned int i, j; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - if(group_id < node->group_count && node->groups[group_id].name[0] != 0) - vs_add_new_subscriptor(node->groups[group_id].subscribers); - for(i = 0; i < node->groups[group_id].method_count; i++) - { - if(node->groups[group_id].methods[i].name[0] != 0) - { - char *names[255]; - for(j = 0; j < node->groups[group_id].methods[i].param_count; j++) - names[j] = &node->groups[group_id].methods[i].param_names[j * 16]; - verse_send_o_method_create(node_id, group_id, i, node->groups[group_id].methods[i].name, node->groups[group_id].methods[i].param_count, node->groups[group_id].methods[i].param_types, (const char **) names); - } - } -} - -static void callback_send_o_method_group_unsubscribe(void *user, VNodeID node_id, uint16 group_id) -{ - VSNodeObject *node; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - if(group_id < node->group_count && node->groups[group_id].name[0] != 0) - vs_remove_subscriptor(node->groups[group_id].subscribers); -} - -static void callback_send_o_method_create(void *user, VNodeID node_id, uint16 group_id, uint16 method_id, char *name, uint8 param_count, VNOParamType *param_types, char * *param_names) -{ - VSNodeObject *node; - unsigned int i, j, count; - VSMethodGroup *group; - - node = (VSNodeObject *) vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - if(group_id >= node->group_count || node->groups[group_id].name[0] == 0) - return; - group = &node->groups[group_id]; - for(i = 0; i < group->method_count; i++) - { - if(i != method_id) - { - for(j = 0; group->methods[i].name[j] == name[j] && group->methods[i].name[j] != 0; j++); - if(group->methods[i].name[j] == name[j]) - return; - } - } - if(method_id < group->method_count && group->methods[method_id].name[0] != 0) - { - for(i = 0; i < 16; i++) - group->methods[method_id].name[i] = name[i]; - if(group->methods[method_id].param_count != 0) - { - free(group->methods[method_id].param_names); - free(group->methods[method_id].param_types); - } - }else - { - for(method_id = 0; method_id < group->method_count && group->methods[method_id].name[0] != 0; method_id++); - if(method_id == group->method_count) - { - group->methods = realloc(group->methods, sizeof(*group->methods) * (group->method_count + 16)); - for(i = group->method_count; i < group->method_count + 16; i++) - group->methods[i].name[0] = 0; - group->method_count += 16; - } - } - for(i = 0; i < VN_O_METHOD_NAME_SIZE && name[i] != 0; i++) - group->methods[method_id].name[i] = name[i]; - group->methods[method_id].name[i] = '\0'; - group->methods[method_id].param_count = param_count; - if(param_count > 0) - { - group->methods[method_id].param_types = malloc((sizeof *group->methods[method_id].param_types) * param_count); - group->methods[method_id].param_names = malloc((sizeof *group->methods[method_id].param_names) * param_count * 16); - } - for(i = 0; i < param_count; i++) - { - group->methods[method_id].param_types[i] = param_types[i]; - for(j = 0; j < 15 && param_names[i][j] != 0; j++) - group->methods[method_id].param_names[i * 16 + j] = param_names[i][j]; - group->methods[method_id].param_names[i * 16 + j] = 0; - } - count = vs_get_subscript_count(node->groups[group_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->groups[group_id].subscribers, i); - verse_send_o_method_create(node_id, group_id, method_id, name, param_count, param_types, (const char **) param_names); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_method_destroy(void *user, VNodeID node_id, uint16 group_id, uint16 method_id) -{ - VSNodeObject *node; - unsigned int i, count; - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - if(group_id >= node->group_count || node->groups[group_id].name[0] == 0 || method_id >= node->groups[group_id].method_count || node->groups[group_id].methods[method_id].name[0] == 0) - return; - - node->groups[group_id].methods[method_id].name[0] = 0; - if(node->groups[group_id].methods[method_id].param_count != 0) - { - free(node->groups[group_id].methods[method_id].param_names); - free(node->groups[group_id].methods[method_id].param_types); - } - count = vs_get_subscript_count(node->groups[group_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->groups[group_id].subscribers, i); - verse_send_o_method_destroy(node_id, group_id, method_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_method_call(void *user, VNodeID node_id, uint16 group_id, uint16 method_id, VNodeID sender, void *params) -{ - VNOParam unpacked_params[255]; - void *data; - VSNodeObject *node; - unsigned int i, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || vs_get_node(node_id, V_NT_OBJECT) == NULL) - return; - - if(group_id >= node->group_count || node->groups[group_id].name[0] == 0 || method_id >= node->groups[group_id].method_count || node->groups[group_id].methods[method_id].name[0] == 0) - return; - if(!verse_method_call_unpack(params, node->groups[group_id].methods[method_id].param_count, node->groups[group_id].methods[method_id].param_types, unpacked_params)) - return; - sender = vs_get_avatar(); - count = vs_get_subscript_count(node->groups[group_id].subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->groups[group_id].subscribers, i); - data = verse_method_call_pack(node->groups[group_id].methods[method_id].param_count, node->groups[group_id].methods[method_id].param_types, unpacked_params); - if(data != NULL) - verse_send_o_method_call(node_id, group_id, method_id, sender, data); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_anim_run(void *user, VNodeID node_id, uint16 link_id, uint32 time_s, uint32 time_f, uint8 dimensions, real64 *pos, - real64 *speed, real64 *accel, real64 *scale, real64 *scale_speed) -{ - VSNodeObject *node; - unsigned int i, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL) - return; - if(link_id >= node->link_count || node->links[link_id].name[0] == 0) - return; - if(NULL == vs_get_node(node->links[link_id].link, V_NT_CURVE)) - return; - node->links[link_id].time_s = time_s; - node->links[link_id].time_f = time_f; - node->links[link_id].dimensions = dimensions; - for(i = 0; i < dimensions && i < 4; i++) - { - node->links[link_id].pos[i] = pos[i]; - node->links[link_id].speed[i] = speed[i]; - node->links[link_id].accel[i] = accel[i]; - node->links[link_id].scale[i] = scale[i]; - node->links[link_id].scale_speed[i] = scale_speed[i]; - } - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_anim_run(node_id, link_id, time_s, time_f, dimensions, pos, speed, accel, scale, scale_speed); - } - vs_reset_subscript_session(); -} - -static void callback_send_o_hide(void *user, VNodeID node_id, uint8 hidden) -{ - VSNodeObject *node; - unsigned int i, count; - - node = (VSNodeObject *)vs_get_node(node_id, V_NT_OBJECT); - if(node == NULL || hidden == node->hidden) - return; - node->hidden = hidden; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_o_hide(node_id, hidden); - } - vs_reset_subscript_session(); -} - -void vs_o_callback_init(void) -{ - - verse_callback_set(verse_send_o_transform_pos_real32, callback_send_o_transform_pos_real32, NULL); - verse_callback_set(verse_send_o_transform_rot_real32, callback_send_o_transform_rot_real32, NULL); - verse_callback_set(verse_send_o_transform_scale_real32, callback_send_o_transform_scale_real32, NULL); - verse_callback_set(verse_send_o_transform_pos_real64, callback_send_o_transform_pos_real64, NULL); - verse_callback_set(verse_send_o_transform_rot_real64, callback_send_o_transform_rot_real64, NULL); - verse_callback_set(verse_send_o_transform_scale_real64, callback_send_o_transform_scale_real64, NULL); - verse_callback_set(verse_send_o_transform_subscribe, callback_send_o_transform_subscribe, NULL); - verse_callback_set(verse_send_o_transform_unsubscribe, callback_send_o_transform_unsubscribe, NULL); - verse_callback_set(verse_send_o_link_set, callback_send_o_link_set, NULL); - verse_callback_set(verse_send_o_light_set, callback_send_o_light_set, NULL); - verse_callback_set(verse_send_o_link_set, callback_send_o_link_set, NULL); - verse_callback_set(verse_send_o_link_destroy, callback_send_o_link_destroy, NULL); - verse_callback_set(verse_send_o_method_group_create, callback_send_o_method_group_create, NULL); - verse_callback_set(verse_send_o_method_group_destroy, callback_send_o_method_group_destroy, NULL); - verse_callback_set(verse_send_o_method_group_subscribe, callback_send_o_method_group_subscribe, NULL); - verse_callback_set(verse_send_o_method_group_unsubscribe, callback_send_o_method_group_unsubscribe, NULL); - verse_callback_set(verse_send_o_method_create, callback_send_o_method_create, NULL); - verse_callback_set(verse_send_o_method_destroy, callback_send_o_method_destroy, NULL); - verse_callback_set(verse_send_o_method_call, callback_send_o_method_call, NULL); - verse_callback_set(verse_send_o_anim_run, callback_send_o_anim_run, NULL); - verse_callback_set(verse_send_o_hide, callback_send_o_hide, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_particle.c b/extern/verse/dist/vs_node_particle.c deleted file mode 100644 index 8c7b1ce3c82..00000000000 --- a/extern/verse/dist/vs_node_particle.c +++ /dev/null @@ -1,52 +0,0 @@ -/* -** -*/ - -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -/* -typedef struct { - VSNodeHead head; -} VSNodeObject; - -VSNodeObject *vs_o_create_node(unsigned int owner) -{ - VSNodeObject *node; - node = malloc(sizeof *node); - create_node_head(&node->head, name, owner); - vs_add_new_node(&node->head, V_NT_OBJECT); - return node; -} - -void vs_o_destroy_node(VSNodeObject *node) -{ - destroy_node_head(&node->head); - free(node); -} - -void vs_o_subscribe(VSNodeObject *node) -{ -} - -static void callback_send_o_unsubscribe(void *user, VNodeID node_id) -{ - VSNodeObject *node; - node = (VSNodeObject *)vs_get_node(node_id); - if(node == NULL) - return; - vs_remove_subscriptor(node->head.subscribers); -} - -void vs_o_callback_init(void) -{ -} -*/ -#endif diff --git a/extern/verse/dist/vs_node_storage.c b/extern/verse/dist/vs_node_storage.c deleted file mode 100644 index 480ceb1f900..00000000000 --- a/extern/verse/dist/vs_node_storage.c +++ /dev/null @@ -1,245 +0,0 @@ -/* -** -*/ - -#include -#include -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -#define VS_NODE_STORAGE_CHUNK_SIZE 16 - -static struct { - VSNodeHead **nodes; - unsigned int node_length; - unsigned int node_allocated; - VSSubscriptionList *list[V_NT_NUM_TYPES]; -} VSNodeStorage; - -extern void callback_send_tag_group_create(void *user, VNodeID node_id, uint16 group_id, const char *name); - -void vs_init_node_storage(void) -{ - unsigned int i; - VSNodeStorage.nodes = malloc((sizeof *VSNodeStorage.nodes) * VS_NODE_STORAGE_CHUNK_SIZE); - VSNodeStorage.nodes[0] = NULL; - VSNodeStorage.node_length = 0; - VSNodeStorage.node_allocated = VS_NODE_STORAGE_CHUNK_SIZE; - for(i = 0; i < V_NT_NUM_TYPES; i++) - VSNodeStorage.list[i] = vs_create_subscription_list(); -} - -unsigned int vs_add_new_node(VSNodeHead *node, VNodeType type) -{ - unsigned int i, j; - for(i = 0; i < VSNodeStorage.node_length && VSNodeStorage.nodes[i] != NULL; i++); - if(i >= VSNodeStorage.node_allocated) - { - j = VSNodeStorage.node_allocated; - VSNodeStorage.node_allocated += VS_NODE_STORAGE_CHUNK_SIZE; - VSNodeStorage.nodes = realloc(VSNodeStorage.nodes, (sizeof *VSNodeStorage.nodes) * VSNodeStorage.node_allocated); - while(j < VSNodeStorage.node_allocated) - VSNodeStorage.nodes[j++] = NULL; - } - VSNodeStorage.nodes[i] = node; - if(i >= VSNodeStorage.node_length) - VSNodeStorage.node_length = i + 1; - node->id = i; - node->type = type; - - return node->id; -} - -VSNodeHead *vs_get_node(unsigned int node_id, VNodeType type) -{ - if(VSNodeStorage.node_length > node_id) - { - VSNodeHead *node = VSNodeStorage.nodes[node_id]; - - if(node != NULL && node->type == type) - return node; - } - return NULL; -} - -VSNodeHead *vs_get_node_head(unsigned int node_id) -{ - if(VSNodeStorage.node_length > node_id) - return VSNodeStorage.nodes[node_id]; - return NULL; -} - -extern VSNodeHead *vs_o_create_node(unsigned int owner); -extern VSNodeHead *vs_g_create_node(unsigned int owner); -extern VSNodeHead *vs_m_create_node(unsigned int owner); -extern VSNodeHead *vs_b_create_node(unsigned int owner); -extern VSNodeHead *vs_t_create_node(unsigned int owner); -extern VSNodeHead *vs_c_create_node(unsigned int owner); -extern VSNodeHead *vs_p_create_node(unsigned int owner); -extern VSNodeHead *vs_a_create_node(unsigned int owner); - -extern void vs_o_destroy_node(VSNodeHead *node); -extern void vs_g_destroy_node(VSNodeHead *node); -extern void vs_m_destroy_node(VSNodeHead *node); -extern void vs_b_destroy_node(VSNodeHead *node); -extern void vs_t_destroy_node(VSNodeHead *node); -extern void vs_c_destroy_node(VSNodeHead *node); -extern void vs_p_destroy_node(VSNodeHead *node); -extern void vs_a_destroy_node(VSNodeHead *node); - - -VNodeID vs_node_create(VNodeID owner_id, unsigned int type) -{ - unsigned int count, i; - VSNodeHead *node; - VNodeID node_id; - - printf("vs_node_create(%u, %u)\n", owner_id, type); - switch(type) - { - case V_NT_OBJECT : - node = vs_o_create_node(owner_id); - break; - case V_NT_GEOMETRY : - node = vs_g_create_node(owner_id); - break; - case V_NT_MATERIAL : - node = vs_m_create_node(owner_id); - break; - case V_NT_BITMAP : - node = vs_b_create_node(owner_id); - break; - case V_NT_TEXT : - node = vs_t_create_node(owner_id); - break; - case V_NT_CURVE : - node = vs_c_create_node(owner_id); - break; - case V_NT_AUDIO : - node = vs_a_create_node(owner_id); - break; - default: - fprintf(stderr, "Can't create node of unknown type %u\n", type); - return 0U; - } - node_id = node->id; - - count = vs_get_subscript_count(VSNodeStorage.list[type]); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(VSNodeStorage.list[type], i); - if(owner_id != verse_session_get_avatar()) - verse_send_node_create(node_id, type, VN_OWNER_OTHER); - else - verse_send_node_create(node_id, type, VN_OWNER_MINE); - } - if(count != 0) - vs_reset_subscript_session(); - return node_id; -} - -/* Initialize an object node into being an avatar. */ -void vs_avatar_init(VNodeID id, const char *name) -{ - callback_send_tag_group_create(NULL, id, (short) ~0u, "avatar"); - /* FIXME: Populate the group, too. */ -} - -void vs_reset_owner(VNodeID owner_id) -{ - unsigned int i; - - for(i = 0; i < VSNodeStorage.node_length; i++) - if(VSNodeStorage.nodes[i] != NULL) - if(VSNodeStorage.nodes[i]->owner == owner_id) - VSNodeStorage.nodes[i]->owner = ~0; -} - -static void callback_send_node_create(void *user_data, VNodeID node_id, uint8 type, VNodeOwner owner_id) -{ - vs_node_create(vs_get_avatar(), type); -} - -void callback_send_node_destroy(void *user_data, VNodeID node_id) -{ - unsigned int count, i; - VSNodeHead *node; - VNodeType type; - node = vs_get_node_head(node_id); - if(node == NULL) - return; - VSNodeStorage.nodes[node_id] = NULL; - type = node->type; - switch(type) - { - case V_NT_OBJECT : - vs_o_destroy_node(node); - break; - case V_NT_GEOMETRY : - vs_g_destroy_node(node); - break; - case V_NT_MATERIAL : - vs_m_destroy_node(node); - break; - case V_NT_BITMAP : - vs_b_destroy_node(node); - break; - case V_NT_TEXT : - vs_t_destroy_node(node); - break; - case V_NT_CURVE : - vs_c_destroy_node(node); - break; - case V_NT_AUDIO : - vs_c_destroy_node(node); - break; - default: - fprintf(stderr, __FILE__ " Can't handle node_destroy for type %d--not implemented", type); - return; - } - count = vs_get_subscript_count(VSNodeStorage.list[type]); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(VSNodeStorage.list[type], i); - verse_send_node_destroy(node_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_node_index_subscribe(void *user_data, uint32 mask) -{ - unsigned int i, j, pow = 1; - - for(i = 0; i < V_NT_NUM_TYPES; i++, pow <<= 1) - { - if((mask & pow) != 0) - { - for(j = 0; j < VSNodeStorage.node_length; j++) - { - if(VSNodeStorage.nodes[j] != NULL && VSNodeStorage.nodes[j]->type == (VNodeType)i) - { - if(VSNodeStorage.nodes[j]->owner == verse_session_get_avatar()) - verse_send_node_create(VSNodeStorage.nodes[j]->id, i, VN_OWNER_MINE); - else - verse_send_node_create(VSNodeStorage.nodes[j]->id, i, VN_OWNER_OTHER); - } - } - vs_add_new_subscriptor(VSNodeStorage.list[i]); - } - else - vs_remove_subscriptor(VSNodeStorage.list[i]); - } -} - -void init_callback_node_storage(void) -{ - verse_callback_set(verse_send_node_index_subscribe, callback_send_node_index_subscribe, NULL); - verse_callback_set(verse_send_node_create, callback_send_node_create, NULL); - verse_callback_set(verse_send_node_destroy, callback_send_node_destroy, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_node_text.c b/extern/verse/dist/vs_node_text.c deleted file mode 100644 index ae7c3c737c3..00000000000 --- a/extern/verse/dist/vs_node_text.c +++ /dev/null @@ -1,274 +0,0 @@ -/* -** -*/ - -#include -#include -#include - -#include "v_cmd_gen.h" - -#if !defined V_GENERATE_FUNC_MODE - -#include "verse.h" -#include "vs_server.h" - -#define VS_TEXT_CHUNK_SIZE 4096 - -typedef struct { - char name[16]; - char *text; - size_t length; - size_t allocated; - VSSubscriptionList *subscribers; -} VSTextBuffer; - -typedef struct { - VSNodeHead head; - char language[512]; - VSTextBuffer *buffer; - unsigned int buffer_count; -} VSNodeText; - -VSNodeText * vs_t_create_node(unsigned int owner) -{ - VSNodeText *node; - char name[48]; - unsigned int i; - node = malloc(sizeof *node); - vs_add_new_node(&node->head, V_NT_TEXT); - sprintf(name, "Text_Node_%u", node->head.id); - create_node_head(&node->head, name, owner); - node->language[0] = 0; - node->buffer_count = 16; - node->buffer = malloc((sizeof *node->buffer) * node->buffer_count); - for(i = 0; i < node->buffer_count; i++) - node->buffer[i].name[0] = 0; - - return node; -} - -void vs_t_destroy_node(VSNodeText *node) -{ - unsigned int i; - destroy_node_head(&node->head); - for(i = 0; i < node->buffer_count; i++) - { - if(node->buffer[i].name[0] != 0) - { - free(node->buffer[i].text); - vs_destroy_subscription_list(node->buffer[i].subscribers); - } - } - free(node->buffer); - free(node); -} - -void vs_t_subscribe(VSNodeText *node) -{ - unsigned int i; - verse_send_t_language_set(node->head.id, node->language); - for(i = 0; i < node->buffer_count; i++) - if(node->buffer[i].name[0] != 0) - verse_send_t_buffer_create(node->head.id, i, node->buffer[i].name); -} - -void vs_t_unsubscribe(VSNodeText *node) -{ - unsigned int i; - for(i = 0; i < node->buffer_count; i++) - if(node->buffer[i].name[0] != 0) - vs_remove_subscriptor(node->buffer[i].subscribers); -} - -static void callback_send_t_language_set(void *user, VNodeID node_id, char *language) -{ - VSNodeText *node; - unsigned int i, count; - node = (VSNodeText *)vs_get_node(node_id, V_NT_TEXT); - if(node == NULL) - return; - for(i = 0; i < 511 && language[i]; i++) - node->language[i] = language[i]; - node->language[i] = 0; - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_t_language_set(node_id, language); - } - vs_reset_subscript_session(); - -} - -static void callback_send_t_buffer_create(void *user, VNodeID node_id, VBufferID buffer_id, const char *name) -{ - VSNodeText *node; - unsigned int i, count; - node = (VSNodeText *)vs_get_node(node_id, V_NT_TEXT); - if(node == NULL) - return; - - if(buffer_id >= node->buffer_count || node->buffer[buffer_id].name[0] != 0) - { - for(buffer_id = 0; buffer_id < node->buffer_count && node->buffer[buffer_id].name[0] != 0; buffer_id++) - ; - if(buffer_id == node->buffer_count) - { - node->buffer = realloc(node->buffer, (sizeof *node->buffer) * node->buffer_count); - for(i = node->buffer_count; i < node->buffer_count + 16; i++) - node->buffer[i].name[0] = 0; - node->buffer_count = i; - } - } - - if(node->buffer[buffer_id].name[0] == 0) - { - node->buffer[buffer_id].allocated = VS_TEXT_CHUNK_SIZE; - node->buffer[buffer_id].text = malloc(node->buffer[buffer_id].allocated); - node->buffer[buffer_id].length = 0; - node->buffer[buffer_id].subscribers = vs_create_subscription_list(); - } - for(i = 0; i < 15 && name[i] != 0; i++) - node->buffer[buffer_id].name[i] = name[i]; - node->buffer[buffer_id].name[i] = 0; - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_t_buffer_create(node_id, buffer_id, name); - } - vs_reset_subscript_session(); -} - -void callback_send_t_buffer_destroy(void *user, VNodeID node_id, VBufferID buffer_id) -{ - VSNodeText *node; - unsigned int i, count; - node = (VSNodeText *)vs_get_node(node_id, V_NT_TEXT); - if(node == NULL) - return; - - if(buffer_id >= node->buffer_count || node->buffer[buffer_id].name[0] == 0) - return; - - node->buffer[buffer_id].name[0] = 0; - free(node->buffer[buffer_id].text); - vs_destroy_subscription_list(node->buffer[buffer_id].subscribers); - - count = vs_get_subscript_count(node->head.subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(node->head.subscribers, i); - verse_send_t_buffer_destroy(node_id, buffer_id); - } - vs_reset_subscript_session(); -} - -static void callback_send_t_buffer_subscribe(void *user, VNodeID node_id, VBufferID buffer_id) -{ - VSNodeText *node; - unsigned int i; - - node = (VSNodeText *)vs_get_node(node_id, V_NT_TEXT); - if(node == NULL) - return; - if(buffer_id >= node->buffer_count || node->buffer[buffer_id].name[0] == 0) - return; - if(vs_add_new_subscriptor(node->buffer[buffer_id].subscribers) == 0) - return; - for(i = 0; i < node->buffer[buffer_id].length; i += VN_T_MAX_TEXT_CMD_SIZE) - { - if(i + VN_T_MAX_TEXT_CMD_SIZE > node->buffer[buffer_id].length) - verse_send_t_text_set(node_id, buffer_id, i, node->buffer[buffer_id].length - i, &node->buffer[buffer_id].text[i]); - else - verse_send_t_text_set(node_id, buffer_id, i, VN_T_MAX_TEXT_CMD_SIZE, &node->buffer[buffer_id].text[i]); - } -} - -static void callback_send_t_buffer_unsubscribe(void *user, VNodeID node_id, VBufferID buffer_id) -{ - VSNodeText *node; - node = (VSNodeText *)vs_get_node(node_id, V_NT_TEXT); - if(node == NULL) - return; - if(buffer_id >= node->buffer_count || node->buffer[buffer_id].name[0] == 0) - return; - vs_remove_subscriptor(node->buffer[buffer_id].subscribers); -} - -static void callback_send_t_text_set(void *user, VNodeID node_id, VBufferID buffer_id, uint32 pos, uint32 length, const char *text) -{ - VSNodeText *node; - VSTextBuffer *tb; - unsigned int i, count, text_length; - char *buf; - - node = (VSNodeText *) vs_get_node(node_id, V_NT_TEXT); - if(node == NULL) - return; - if(buffer_id >= node->buffer_count || node->buffer[buffer_id].name[0] == 0) - return; - tb = &node->buffer[buffer_id]; - - text_length = strlen(text); - - /* Clamp position and length of deleted region. */ - if(pos > tb->length) - pos = tb->length; - if(pos + length > tb->length) - length = tb->length - pos; - - buf = tb->text; - - if(tb->length + text_length - length > tb->allocated) - { - buf = realloc(buf, tb->length + text_length - length + VS_TEXT_CHUNK_SIZE); - tb->allocated = tb->length + text_length - length + VS_TEXT_CHUNK_SIZE; - } - - if(text_length < length) /* Insert smaller than delete? */ - { - memmove(buf + pos + text_length, buf + pos + length, tb->length - (pos + length)); - memcpy(buf + pos, text, text_length); - } - else /* Insert is larger than delete. */ - { - memmove(buf + pos + text_length, buf + pos + length, tb->length - pos); - memcpy(buf + pos, text, text_length); - } - - tb->length += (int) text_length - length; - buf[tb->length] = '\0'; - - /* Buffer very much larger than content? Then shrink it. */ - if(tb->allocated > VS_TEXT_CHUNK_SIZE * 8 && tb->allocated * 2 > tb->length) - { - buf = realloc(buf, tb->length + VS_TEXT_CHUNK_SIZE); - tb->allocated = tb->length + VS_TEXT_CHUNK_SIZE; - } - - tb->text = buf; - - count = vs_get_subscript_count(tb->subscribers); - for(i = 0; i < count; i++) - { - vs_set_subscript_session(tb->subscribers, i); - verse_send_t_text_set(node_id, buffer_id, pos, length, text); - } - vs_reset_subscript_session(); -} - - -void vs_t_callback_init(void) -{ - verse_callback_set(verse_send_t_language_set, callback_send_t_language_set, NULL); - verse_callback_set(verse_send_t_buffer_create, callback_send_t_buffer_create, NULL); - verse_callback_set(verse_send_t_buffer_destroy, callback_send_t_buffer_destroy, NULL); - verse_callback_set(verse_send_t_buffer_subscribe, callback_send_t_buffer_subscribe, NULL); - verse_callback_set(verse_send_t_buffer_unsubscribe, callback_send_t_buffer_unsubscribe, NULL); - verse_callback_set(verse_send_t_text_set, callback_send_t_text_set, NULL); -} - -#endif diff --git a/extern/verse/dist/vs_server.h b/extern/verse/dist/vs_server.h deleted file mode 100644 index 76e1b482eb9..00000000000 --- a/extern/verse/dist/vs_server.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -** -*/ - -#include - -extern void vs_init_connection_storage(void); -extern void vs_add_new_connection(VSession session, const char *name, const char *pass, VNodeID node_id); -extern void vs_remove_connection(void); -extern void vs_set_next_session(void); - -typedef void VSSubscriptionList; - -extern VSSubscriptionList * vs_create_subscription_list(void); -extern void vs_destroy_subscription_list(VSSubscriptionList *list); -extern int vs_add_new_subscriptor(VSSubscriptionList *list); -extern void vs_remove_subscriptor(VSSubscriptionList *list); -extern unsigned int vs_get_subscript_count(const VSSubscriptionList *list); -extern void vs_set_subscript_session(VSSubscriptionList *list, unsigned int session); -extern void vs_reset_subscript_session(void); -extern uint32 vs_get_avatar(void); -extern VSession vs_get_session(void); -extern const char * vs_get_user_name(void); -extern const char * vs_get_user_pass(void); - - -typedef struct { - VNodeID id; - VNodeType type; - VNodeID owner; - char *name; - void *tag_groups; - uint16 group_count; - VSSubscriptionList *subscribers; -} VSNodeHead; - -extern void vs_init_node_storage(void); -extern uint32 vs_add_new_node(VSNodeHead *node, VNodeType type); -extern VSNodeHead * vs_get_node(unsigned int node_id, VNodeType type); -extern VSNodeHead * vs_get_node_head(unsigned int node_id); - -extern void create_node_head(VSNodeHead *node, const char *name, unsigned int owner); -extern void destroy_node_head(VSNodeHead *node); -extern void vs_send_node_head(VSNodeHead *node); - -extern void vs_h_callback_init(void); /* "Head", not an actual node type. */ -extern void vs_o_callback_init(void); -extern void vs_g_callback_init(void); -extern void vs_m_callback_init(void); -extern void vs_b_callback_init(void); -extern void vs_t_callback_init(void); -extern void vs_c_callback_init(void); -extern void vs_a_callback_init(void); -extern void init_callback_node_storage(void); - -extern void vs_master_set_enabled(boolean enabled); -extern void vs_master_set_address(const char *address); -extern const char * vs_master_get_address(void); -extern void vs_master_set_desc(const char *desc); -extern void vs_master_set_tags(const char *tags); -extern void vs_master_update(void); -extern void vs_master_handle_describe(const char *address, const char *message); diff --git a/extern/verse/make/msvc_7_0/libverse.vcproj b/extern/verse/make/msvc_7_0/libverse.vcproj deleted file mode 100644 index 1c9bfbfce33..00000000000 --- a/extern/verse/make/msvc_7_0/libverse.vcproj +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extern/verse/make/msvc_7_0/verse.vcproj b/extern/verse/make/msvc_7_0/verse.vcproj deleted file mode 100644 index 563e33e7be9..00000000000 --- a/extern/verse/make/msvc_7_0/verse.vcproj +++ /dev/null @@ -1,481 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index 81ef8c121d1..9efd1a6ee7c 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -24,10 +24,21 @@ # # ***** END GPL LICENSE BLOCK ***** -SUBDIRS(SoundSystem string ghost guardedalloc bmfont moto container memutil decimation iksolver boolop opennl) +ADD_SUBDIRECTORY(audaspace) +ADD_SUBDIRECTORY(string) +ADD_SUBDIRECTORY(ghost) +ADD_SUBDIRECTORY(guardedalloc) +ADD_SUBDIRECTORY(moto) +ADD_SUBDIRECTORY(container) +ADD_SUBDIRECTORY(memutil) +ADD_SUBDIRECTORY(decimation) +ADD_SUBDIRECTORY(iksolver) +ADD_SUBDIRECTORY(boolop) +ADD_SUBDIRECTORY(opennl) +ADD_SUBDIRECTORY(smoke) IF(WITH_ELBEEM) - SUBDIRS(elbeem) + ADD_SUBDIRECTORY(elbeem) ENDIF(WITH_ELBEEM) -SUBDIRS(bsp) +ADD_SUBDIRECTORY(bsp) diff --git a/intern/Makefile b/intern/Makefile index 357e28309e3..4bf18f987a4 100644 --- a/intern/Makefile +++ b/intern/Makefile @@ -31,8 +31,8 @@ SOURCEDIR = intern # include nan_subdirs.mk -ALLDIRS = string ghost guardedalloc bmfont moto container memutil -ALLDIRS += decimation iksolver bsp SoundSystem opennl elbeem boolop +ALLDIRS = string ghost guardedalloc moto container memutil +ALLDIRS += decimation iksolver bsp opennl elbeem boolop smoke audaspace all:: @for i in $(ALLDIRS); do \ diff --git a/intern/SConscript b/intern/SConscript index 82c7739bf42..af5d0671c27 100644 --- a/intern/SConscript +++ b/intern/SConscript @@ -1,18 +1,18 @@ #!/usr/bin/python Import ('env') -SConscript(['SoundSystem/SConscript', +SConscript(['audaspace/SConscript', 'string/SConscript', 'ghost/SConscript', 'guardedalloc/SConscript', - 'bmfont/SConscript', 'moto/SConscript', 'container/SConscript', 'memutil/SConscript/', 'decimation/SConscript', 'iksolver/SConscript', 'boolop/SConscript', - 'opennl/SConscript']) + 'opennl/SConscript', + 'smoke/SConscript']) # NEW_CSG was intended for intern/csg, but # getting it to compile is difficult diff --git a/intern/SoundSystem/CMakeLists.txt b/intern/SoundSystem/CMakeLists.txt deleted file mode 100644 index 9a370af2268..00000000000 --- a/intern/SoundSystem/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -SET(INC . intern ../moto/include ../string dummy openal sdl) - -IF(WITH_OPENAL) - FILE(GLOB SRC dummy/*.cpp intern/*.cpp openal/*.cpp sdl/*.cpp) - INCLUDE_DIRECTORIES(${OPENAL_INC} ${SDL_INC}) - STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INC}) - IF(FRAMEWORK) - ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX) - ENDIF(FRAMEWORK) -ELSE(WITH_OPENAL) - FILE(GLOB SRC dummy/*.cpp intern/*.cpp) - ADD_DEFINITIONS(-DNO_SOUND) -ENDIF(WITH_OPENAL) - -BLENDERLIB(bf_soundsystem "${SRC}" "${INC}") -#, libtype=['core','player'], priority = [20,140] ) diff --git a/intern/SoundSystem/Makefile b/intern/SoundSystem/Makefile deleted file mode 100644 index d00339f351c..00000000000 --- a/intern/SoundSystem/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -include nan_definitions.mk - -LIBNAME = SoundSystem -SOURCEDIR = intern/SoundSystem -DIR = $(OCGDIR)/$(SOURCEDIR) -DIRS = intern -DIRS += dummy - -ifneq ($(NAN_NO_OPENAL),true) - ifeq ($(OS),windows) - DIRS += fmod - DIRS += openal sdl - endif - ifeq ($(OS),darwin) - DIRS += openal - endif - ifeq ($(OS),$(findstring $(OS), "linux freebsd solaris")) - DIRS += openal sdl - endif -else - export CPPFLAGS += -DNO_SOUND -endif - -include nan_subdirs.mk - -install: all debug - @[ -d $(NAN_SOUNDSYSTEM) ] || mkdir $(NAN_SOUNDSYSTEM) - @[ -d $(NAN_SOUNDSYSTEM)/include ] || mkdir $(NAN_SOUNDSYSTEM)/include - @[ -d $(NAN_SOUNDSYSTEM)/lib ] || mkdir $(NAN_SOUNDSYSTEM)/lib - @[ -d $(NAN_SOUNDSYSTEM)/lib/debug ] || mkdir $(NAN_SOUNDSYSTEM)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libSoundSystem.a $(NAN_SOUNDSYSTEM)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libSoundSystem.a $(NAN_SOUNDSYSTEM)/lib/debug/ -ifeq ($(OS),darwin) - ranlib $(NAN_SOUNDSYSTEM)/lib/libSoundSystem.a - ranlib $(NAN_SOUNDSYSTEM)/lib/debug/libSoundSystem.a -endif - @../tools/cpifdiff.sh *.h $(NAN_SOUNDSYSTEM)/include/ - - diff --git a/intern/SoundSystem/SConscript b/intern/SoundSystem/SConscript deleted file mode 100644 index be19c4b7915..00000000000 --- a/intern/SoundSystem/SConscript +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python - -Import ('env') - -sources = env.Glob('dummy/*.cpp') + env.Glob('intern/*.cpp') - -incs = '. intern ../moto/include ../string dummy openal sdl' -defs = '' -if env['WITH_BF_OPENAL']: - sources += env.Glob('openal/*.cpp') + env.Glob('sdl/*.cpp') - incs += ' ' + env['BF_OPENAL_INC'] - incs += ' ' + env['BF_SDL_INC'] - defs = 'USE_OPENAL' -else: - defs = 'NO_SOUND' - -if not env['WITH_BF_SDL']: - defs += ' DISABLE_SDL' - -env.BlenderLib ('bf_soundsystem', sources, Split(incs), Split(defs), libtype=['core','player'], priority = [20,140] ) diff --git a/intern/SoundSystem/SND_C-api.h b/intern/SoundSystem/SND_C-api.h deleted file mode 100644 index f8e439a9c26..00000000000 --- a/intern/SoundSystem/SND_C-api.h +++ /dev/null @@ -1,354 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_BLENDER_H -#define SND_BLENDER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "SoundDefines.h" - -#define SND_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name - -SND_DECLARE_HANDLE(SND_AudioDeviceInterfaceHandle); -SND_DECLARE_HANDLE(SND_SceneHandle); -SND_DECLARE_HANDLE(SND_ObjectHandle); -SND_DECLARE_HANDLE(SND_ListenerHandle); - -/** - * set the specified type - */ -extern void SND_SetDeviceType(int device_type); - -/** - * get an audiodevice - */ -extern SND_AudioDeviceInterfaceHandle SND_GetAudioDevice(void); - -/** - * and let go of it - */ -extern void SND_ReleaseDevice(void); - -/** - * check if playback is desired - */ -extern int SND_IsPlaybackWanted(SND_SceneHandle scene); - -/** - * add memlocation to cache - */ -extern int SND_AddSample(SND_SceneHandle scene, - const char* filename, - void* memlocation, - int size); - -/** - * remove all samples - */ -extern void SND_RemoveAllSamples(SND_SceneHandle scene); - -/** - * forces the object to check its buffer, and fix it if it's wrong - */ -extern int SND_CheckBuffer(SND_SceneHandle scene, SND_ObjectHandle object); - -/** - * Creates a scene, initializes it and returns a handle to that scene. - * - * @param audiodevice: handle to the audiodevice. - */ -extern SND_SceneHandle SND_CreateScene(SND_AudioDeviceInterfaceHandle audiodevice); - -/** - * Stops all sounds, suspends the scene (so all resources will be freed) and deletes the scene. - * - * @param scene: handle to the soundscene. - */ -extern void SND_DeleteScene(SND_SceneHandle scene); - -/** - * Adds a soundobject to the scene, gets the buffer the sample is loaded into. - * - * @param scene: handle to the soundscene. - * @param object: handle to soundobject. - */ -extern void SND_AddSound(SND_SceneHandle scene, SND_ObjectHandle object); - -/** - * Removes a soundobject from the scene. - * - * @param scene: handle to the soundscene. - * @param object: handle to soundobject. - */ -extern void SND_RemoveSound(SND_SceneHandle scene, SND_ObjectHandle object); - -/** - * Removes all soundobjects from the scene. - * - * @param scene: handle to the soundscene. - */ -extern void SND_RemoveAllSounds(SND_SceneHandle scene); - -/** - * Stopss all soundobjects in the scene. - * - * @param scene: handle to the soundscene. - */ -extern void SND_StopAllSounds(SND_SceneHandle scene); - -/** - * Updates the listener, checks the status of all soundobjects, builds a list of all active - * objects, updates the active objects. - * - * @param audiodevice: handle to the audiodevice. - * @param scene: handle to the soundscene. - */ -extern void SND_Proceed(SND_AudioDeviceInterfaceHandle audiodevice, SND_SceneHandle scene); - -/** - * Returns a handle to the listener. - * - * @param scene: handle to the soundscene. - */ -extern SND_ListenerHandle SND_GetListener(SND_SceneHandle scene); - -/** - * Sets the gain of the listener. - * - * @param scene: handle to the soundscene. - * @param gain: factor the gain gets multiplied with. - */ -extern void SND_SetListenerGain(SND_SceneHandle scene, double gain); - -/** - * Sets a scaling to exaggerate or deemphasize the Doppler (pitch) shift resulting from the - * calculation. - * @attention $f' = dopplerfactor * f * frac{dopplervelocity - listener_velocity}{dopplervelocity + object_velocity}$ - * @attention f: frequency in sample (soundobject) - * @attention f': effective Doppler shifted frequency - * - * @param object: handle to soundobject. - * @param dopplerfactor: the dopplerfactor. - */ -extern void SND_SetDopplerFactor(SND_SceneHandle scene, double dopplerfactor); - -/** - * Sets the value of the propagation speed relative to which the source velocities are interpreted. - * @attention $f' = dopplerfactor * f * frac{dopplervelocity - listener_velocity}{dopplervelocity + object_velocity}$ - * @attention f: frequency in sample (soundobject) - * @attention f': effective Doppler shifted frequency - * - * @param object: handle to soundobject. - * @param dopplervelocity: the dopplervelocity. - */ -extern void SND_SetDopplerVelocity(SND_SceneHandle scene, double dopplervelocity); - -/** - * Creates a new soundobject and returns a handle to it. - */ -extern SND_ObjectHandle SND_CreateSound(void); - -/** - * Deletes a soundobject. - * - * @param object: handle to soundobject. - */ -extern void SND_DeleteSound(SND_ObjectHandle object); - -/** - * Sets a soundobject to SND_MUST_PLAY, so with the next proceed it will be updated and played. - * - * @param object: handle to soundobject. - */ -extern void SND_StartSound(SND_SceneHandle scene, SND_ObjectHandle object); - -/** - * Sets a soundobject to SND_MUST_STOP, so with the next proceed it will be stopped. - * - * @param object: handle to soundobject. - */ -extern void SND_StopSound(SND_SceneHandle scene, SND_ObjectHandle object); - -/** - * Sets a soundobject to SND_MUST_PAUSE, so with the next proceed it will be paused. - * - * @param object: handle to soundobject. - */ -extern void SND_PauseSound(SND_SceneHandle scene, SND_ObjectHandle object); - -/** - * Sets the name of the sample to reference the soundobject to it. - * - * @param object: handle to soundobject. - * @param samplename: the name of the sample - */ -extern void SND_SetSampleName(SND_ObjectHandle object, char* samplename); - -/** - * Sets the gain of a soundobject. - * - * @param object: handle to soundobject. - * @param gain: factor the gain gets multiplied with. - */ -extern void SND_SetGain(SND_ObjectHandle object, double gain); - -/** - * Sets the minimum gain of a soundobject. - * - * @param object: handle to soundobject. - * @param minimumgain: lower threshold for the gain. - */ -extern void SND_SetMinimumGain(SND_ObjectHandle object, double minimumgain); - -/** - * Sets the maximum gain of a soundobject. - * - * @param object: handle to soundobject. - * @param maximumgain: upper threshold for the gain. - */ -extern void SND_SetMaximumGain(SND_ObjectHandle object, double maximumgain); - -/** - * Sets the rollofffactor. The rollofffactor is a per-Source parameter the application - * can use to increase or decrease the range of a source by decreasing or increasing the - * attenuation, respectively. The default value is 1. The implementation is free to optimize - * for a rollofffactor value of 0, which indicates that the application does not wish any - * distance attenuation on the respective Source. - * - * @param object: handle to soundobject. - * @param rollofffactor: the rollofffactor. - */ -extern void SND_SetRollOffFactor(SND_ObjectHandle object, double rollofffactor); - -/** - * Sets the referencedistance at which the listener will experience gain. - * @attention G_dB = gain - 20 * log10(1 + rollofffactor * (dist - referencedistance)/referencedistance); - * - * @param object: handle to soundobject. - * @param distance: the reference distance. - */ -extern void SND_SetReferenceDistance(SND_ObjectHandle object, double referencedistance); - -/** - * Sets the pitch of a soundobject. - * - * @param object: handle to soundobject. - * @param pitch: pitchingfactor: 2.0 for doubling the frequency, 0.5 for half the frequency. - */ -extern void SND_SetPitch(SND_ObjectHandle object, double pitch); - -/** - * Sets the position a soundobject. - * - * @param object: handle to soundobject. - * @param position: position[3]. - */ -extern void SND_SetPosition(SND_ObjectHandle object, double* position); - -/** - * Sets the velocity of a soundobject. - * - * @param object: handle to soundobject. - * @param velocity: velocity[3]. - */ -extern void SND_SetVelocity(SND_ObjectHandle object, double* velocity); - -/** - * Sets the orientation of a soundobject. - * - * @param object: handle to soundobject. - * @param orientation: orientation[9]. - */ -extern void SND_SetOrientation(SND_ObjectHandle object, double* orientation); - -/** - * Sets the loopmode of a soundobject. - * - * @param object: handle to soundobject. - * @param loopmode type of the loop (SND_LOOP_OFF, SND_LOOP_NORMAL, SND_LOOP_BIDIRECTIONAL); - */ -extern void SND_SetLoopMode(SND_ObjectHandle object, int loopmode); - -/** - * Sets the looppoints of a soundobject. - * - * @param object: handle to soundobject. - * @param loopstart startpoint of the loop - * @param loopend endpoint of the loop - */ -extern void SND_SetLoopPoints(SND_ObjectHandle object, unsigned int loopstart, unsigned int loopend); - -/** - * Gets the gain of a soundobject. - * - * @param object: handle to soundobject. - */ -extern float SND_GetGain(SND_ObjectHandle object); - -/** - * Gets the pitch of a soundobject. - * - * @param object: handle to soundobject. - */ -extern float SND_GetPitch(SND_ObjectHandle object); - -/** - * Gets the looping of a soundobject. - * 0: SND_LOOP_OFF - * 1: SND_LOOP_NORMAL - * 2: SND_LOOP_BIDIRECTIONAL - * - * @param object: handle to soundobject. - */ -extern int SND_GetLoopMode(SND_ObjectHandle object); - -/** - * Gets the playstate of a soundobject. - * SND_UNKNOWN = -1 - * SND_INITIAL - * SND_MUST_PLAY - * SND_PLAYING - * SND_MUST_STOP - * SND_STOPPED - * SND_MUST_PAUSE - * SND_PAUSED - * SND_MUST_BE_DELETED - * - * @param object: handle to soundobject. - */ -extern int SND_GetPlaystate(SND_ObjectHandle object); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/intern/SoundSystem/SND_CDObject.h b/intern/SoundSystem/SND_CDObject.h deleted file mode 100644 index c79f62d9862..00000000000 --- a/intern/SoundSystem/SND_CDObject.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * SND_CDObject.h - * - * Implementation for CD playback - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_CDOBJECT_H -#define __SND_CDOBJECT_H - -#include "SND_Object.h" - -class SND_CDObject : public SND_Object -{ -private: - - /** - * Private to enforce singleton - */ - SND_CDObject(); - SND_CDObject(const SND_CDObject&); - - static SND_CDObject* m_instance; - MT_Scalar m_gain; /* the gain of the object */ - int m_playmode; /* the way CD is played back (all, random, track, trackloop) */ - int m_track; /* the track for 'track' and 'trackloop' */ - int m_playstate; /* flag for current state of object */ - bool m_modified; - bool m_used; /* flag for checking if we used the cd, if not don't - call the stop cd at the end */ - -public: - static bool CreateSystem(); - static bool DisposeSystem(); - static SND_CDObject* Instance(); - - ~SND_CDObject(); - - void SetGain(MT_Scalar gain); - void SetPlaymode(int playmode); - void SetTrack(int track); - void SetPlaystate(int playstate); - void SetModified(bool modified); - void SetUsed(); - bool GetUsed(); - - bool IsModified() const; - - int GetTrack() const; - MT_Scalar GetGain() const; - int GetPlaymode() const; - int GetPlaystate() const; - -}; - -#endif //__SND_CDOBJECT_H - diff --git a/intern/SoundSystem/SND_DependKludge.h b/intern/SoundSystem/SND_DependKludge.h deleted file mode 100644 index 1a95f977abe..00000000000 --- a/intern/SoundSystem/SND_DependKludge.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SND_DependKludge.h - * - * who needs what? - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef HAVE_CONFIG_H - -#ifndef NO_SOUND - -#if defined (_WIN32) && !defined(FREE_WINDOWS) -# define USE_OPENAL -#elif defined (__linux__) || (__FreeBSD__) || defined(__APPLE__) || defined(__sun) -# define USE_OPENAL -#else -# ifdef USE_OPENAL -# undef USE_OPENAL -# endif -# ifdef USE_FMOD -# undef USE_FMOD -# endif -#endif - -#endif /* NO_SOUND */ - -#endif /* HAVE_CONFIG_H */ diff --git a/intern/SoundSystem/SND_DeviceManager.h b/intern/SoundSystem/SND_DeviceManager.h deleted file mode 100644 index 708db030519..00000000000 --- a/intern/SoundSystem/SND_DeviceManager.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SND_DeviceManager.h - * - * singleton for creating, switching and deleting audiodevices - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_DEVICEMANAGER_H -#define __SND_DEVICEMANAGER_H - -#include "SND_IAudioDevice.h" - -class SND_DeviceManager -{ -public : - - /** - * a subscription is needed before instances are given away - * applications must call subscribe first, get an instance, and - * when they are finished with sound, unsubscribe - */ - static void Subscribe(); - static void Unsubscribe(); - - static SND_IAudioDevice* Instance(); - static void SetDeviceType(int device_type); - -private : - - /** - * Private to enforce singleton - */ - SND_DeviceManager(); - SND_DeviceManager(const SND_DeviceManager&); - ~SND_DeviceManager(); - - static SND_IAudioDevice* m_instance; - - /** - * The type of device to be created on a call - * to Instance(). - */ - static int m_device_type; - - /** - * Remember the number of subscriptions. - * if 0, delete the device - */ - static int m_subscriptions; -}; - -#endif //__SND_DEVICEMANAGER_H - diff --git a/intern/SoundSystem/SND_IAudioDevice.h b/intern/SoundSystem/SND_IAudioDevice.h deleted file mode 100644 index d6b3936e6ef..00000000000 --- a/intern/SoundSystem/SND_IAudioDevice.h +++ /dev/null @@ -1,343 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_IAUDIODEVICE -#define SND_IAUDIODEVICE - -#include "SND_SoundObject.h" -#include "SND_CDObject.h" -#include "SND_WaveCache.h" -#include "SND_WaveSlot.h" -#include "MT_Matrix3x3.h" - -class SND_IAudioDevice -{ -public: - - /** - * constructor - */ - SND_IAudioDevice() {}; - - /** - * destructor - */ - virtual ~SND_IAudioDevice() {}; - - /** - * check to see if initialization was successfull - * - * @return indication of succes - */ - virtual bool IsInitialized()=0; - - /** - * get the wavecache (which does sample (un)loading) - * - * @return pointer to the wavecache - */ - virtual SND_WaveCache* GetWaveCache() const =0; - - /** - * loads a sample into the device - * - * @param samplename the name of the sample - * @param memlocation pointer where the sample is stored - * @param size size of the sample in memory - * - * @return pointer to the slot with sample data - */ - virtual SND_WaveSlot* LoadSample(const STR_String& samplename, - void* memlocation, - int size)=0; - - /** - * remove a sample from the wavecache - * - * @param filename pointer to filename - */ -// virtual void RemoveSample(const char* filename)=0; - - /** - * remove all samples from the wavecache - */ - virtual void RemoveAllSamples()=0; - - /** - * get a new id from the device - * - * @param pObject pointer to soundobject - * - * @return indication of success - */ - virtual bool GetNewId(SND_SoundObject* pObject)=0; - - /** - * clear an id - * - * @param pObject pointer to soundobject - */ - virtual void ClearId(SND_SoundObject* pObject)=0; - - /** - * initialize the listener - */ - virtual void InitListener()=0; - - /** - * set the value of the propagation speed relative to which the - * source velocities are interpreted. - * f' = DOPPLER_FACTOR * f * (DOPPLER_VELOCITY - Vl) / (DOPPLER_VELOCITY + Vo) - * f: frequency in sample (soundobject) - * f': effective Doppler shifted frequency - * Vl: velocity listener - * Vo: velocity soundobject - * - * @param dopplervelocity scaling factor for doppler effect - */ - virtual void SetDopplerVelocity(MT_Scalar dopplervelocity) const =0; - - /** - * set a scaling to exaggerate or deemphasize the Doppler (pitch) - * shift resulting from the calculation. - * f' = DOPPLER_FACTOR * f * (DOPPLER_VELOCITY - Listener_velocity )/(DOPPLER_VELOCITY + object_velocity ) - * - * @param dopplerfactor scaling factor for doppler effect - */ - virtual void SetDopplerFactor(MT_Scalar dopplerfactor) const =0; - - /** - * set the roll-off factor - * - * @param rollofffactor a global volume scaling factor - */ - virtual void SetListenerRollOffFactor(MT_Scalar rollofffactor) const =0; - - /** - * make the context the current one - */ - virtual void MakeCurrent() const =0; - - /** - * update the device - */ - virtual void NextFrame() const =0; - - /** - * set the volume of the listener. - * - * @param gain the mastergain - */ - virtual void SetListenerGain(float gain) const =0; - - /** - * connect the buffer with the source - * - * @param id the id of the object - * @param buffer the buffer the sample is stored in - */ - virtual void SetObjectBuffer(int id, unsigned int buffer)=0; - - /** - * pause playback of the cd - * @param id the id of the object - * - * @return the state the object is in - */ - virtual int GetPlayState(int id) =0; - - /** - * play a sound belonging to an object. - * - * @param id the id of the object - */ - virtual void PlayObject(int id) =0; - - /** - * stop a sound belonging to an object. - * - * @param id the id of the object - */ - virtual void StopObject(int id) const =0; - - /** - * stop all sounds. - */ - virtual void StopAllObjects()=0; - - /** - * pause the sound belonging to an object. - * - * @param id the id of the object - */ - virtual void PauseObject(int id) const =0; - - /** - * set the sound to looping or non-looping. - * - * @param id the id of the object - * @param loopmode type of looping (no loop, normal, bidirectional) - */ - virtual void SetObjectLoop(int id, unsigned int loopmode) const =0; - - /** - * set the looppoints of a sound - * - * @param id the id of the object - * @param loopstart the startpoint of the loop (in samples) - * @param loopend the endpoint of the loop (in samples) - */ - virtual void SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const =0; - - /** - * set the pitch of the sound. - * - * @param id the id of the object - * @param pitch the pitch - */ - virtual void SetObjectPitch(int id, MT_Scalar pitch) const =0; - - /** - * set the gain of the sound. - * - * @param id the id of the object - * @param gain the gain - */ - virtual void SetObjectGain(int id, MT_Scalar gain) const =0; - - /** - * ROLLOFF_FACTOR is per-Source parameter the application can use to increase or decrease - * the range of a source by decreasing or increasing the attenuation, respectively. The - * default value is 1. The implementation is free to optimize for a ROLLOFF_FACTOR value - * of 0, which indicates that the application does not wish any distance attenuation on - * the respective Source. - * - * @param id the id of the object - * @param rolloff a per-source volume scaling factor - */ - virtual void SetObjectRollOffFactor(int id, MT_Scalar rolloff) const =0; - - /** - * min_gain indicates the minimal gain which is always guaranteed for this sound - * - * @param id the id of the object - * @param mingain the minimum gain of the object - */ - virtual void SetObjectMinGain(int id, MT_Scalar mingain) const =0; - - /** - * max_gain indicates the maximal gain which is always guaranteed for this sound - * - * @param id the id of the object - * @param maxgain the maximum gain of the object - */ - virtual void SetObjectMaxGain(int id, MT_Scalar maxgain) const =0; - /** - * set the distance at which the Listener will experience gain. - * G_dB = GAIN - 20*log10(1 + ROLLOFF_FACTOR*(dist-REFERENCE_DISTANCE)/REFERENCE_DISTANCE ); - * - * @param id the id of the object - * @param referencedistance the distance at which the listener will start hearing - */ - virtual void SetObjectReferenceDistance(int id, MT_Scalar referencedistance) const =0; - - /** - * set the position, velocity and orientation of a sound. - * - * @param id the id of the object - * @param position the position of the object - * @param velocity the velocity of the object - * @param orientation the orientation of the object - * @param lisposition the position of the listener - * @param rollofffactor the rollofffactor of the object - */ - virtual void SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const =0; - - /** - * make a sound 2D - * - * @param id the id of the object - */ - virtual void ObjectIs2D(int id) const =0; - - /** - * tell the device we want cd suppport - */ - virtual void UseCD() const =0; - - /** - * start playback of the cd - * - * @param track the tracknumber to start playback from - */ - virtual void PlayCD(int track) const =0; - - /** - * pause playback of the cd (true == pause, false == resume) - */ - virtual void PauseCD(bool pause) const =0; - - /** - * stop playback of the cd - */ - virtual void StopCD() const =0; - - /** - * set the playbackmode of the cd - * SND_CD_ALL play all tracks - * SND_CD_TRACK play one track - * SND_CD_TRACKLOOP play one track looped - * SND_CD_RANDOM play all tracks in random order - * - * @param playmode playmode - */ - virtual void SetCDPlaymode(int playmode) const =0; - - /** - * set the volume playback of the cd - * - * @param gain the gain - */ - virtual void SetCDGain(MT_Scalar gain) const =0; - - virtual void StartUsingDSP() =0; - virtual float* GetSpectrum() =0; - virtual void StopUsingDSP() =0; - -protected: - - virtual void RevokeSoundObject(SND_SoundObject* pObject)=0; -}; - -#endif //SND_IAUDIODEVICE - diff --git a/intern/SoundSystem/SND_Object.h b/intern/SoundSystem/SND_Object.h deleted file mode 100644 index f23827974e3..00000000000 --- a/intern/SoundSystem/SND_Object.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * SND_Object.h - * - * Abstract sound object - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_OBJECT_H -#define __SND_OBJECT_H - -#include "GEN_List.h" -#include "MT_Matrix3x3.h" -#include "SoundDefines.h" - -/** - * SND_Object is an interface class for soundobjects, listeners and other - * kinds of sound related thingies. - */ - -class SND_Object : public GEN_Link -{ -public: - SND_Object() {}; - virtual ~SND_Object() {}; -}; - -#endif //__SND_OBJECT_H - diff --git a/intern/SoundSystem/SND_Scene.h b/intern/SoundSystem/SND_Scene.h deleted file mode 100644 index bb3ff932bce..00000000000 --- a/intern/SoundSystem/SND_Scene.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * SND_Scene.h - * - * The scene for sounds. - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#ifndef __SND_SCENE_H -#define __SND_SCENE_H - -#include "SoundDefines.h" -#include "SND_SoundObject.h" -#include "SND_CDObject.h" -#include "SND_SoundListener.h" -#include "SND_WaveSlot.h" - -#include "MT_Vector3.h" -#include "MT_Matrix3x3.h" -#include "STR_String.h" - -#include - - -class SND_Scene -{ - std::set m_soundobjects; - - GEN_List m_activeobjects; - class SND_IAudioDevice* m_audiodevice; - class SND_WaveCache* m_wavecache; - class SND_SoundListener m_listener; - bool m_audio; // to check if audio works - bool m_audioplayback; // to check if audioplayback is wanted - - void UpdateListener(); - void BuildActiveList(MT_Scalar curtime); - void UpdateActiveObects(); - void UpdateCD(); - -public: - SND_Scene(SND_IAudioDevice* adi); - ~SND_Scene(); - - bool IsPlaybackWanted(); - - void AddActiveObject(SND_SoundObject* pObject, MT_Scalar curtime); - void RemoveActiveObject(SND_SoundObject* pObject); - void DeleteObjectWhenFinished(SND_SoundObject* pObject); - - void Proceed(); - - int LoadSample(const STR_String& samplename, - void* memlocation, - int size); - void RemoveAllSamples(); - bool CheckBuffer(SND_SoundObject* pObject); - bool IsSampleLoaded(STR_String& samplename); - - void AddObject(SND_SoundObject* pObject); - bool SetCDObject(SND_CDObject* cdobject); - void DeleteObject(SND_SoundObject* pObject); - void RemoveAllObjects(); - void StopAllObjects(); - int GetObjectStatus(SND_SoundObject* pObject) const; - - void SetListenerTransform(const MT_Vector3& pos, - const MT_Vector3& vel, - const MT_Matrix3x3& mat); - - SND_SoundListener* GetListener(); -}; - -#endif //__SND_SCENE_H - diff --git a/intern/SoundSystem/SND_SoundListener.h b/intern/SoundSystem/SND_SoundListener.h deleted file mode 100644 index 2f6a6e8cddd..00000000000 --- a/intern/SoundSystem/SND_SoundListener.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * SND_SoundListener.h - * - * A SoundListener is for sound what a camera is for vision. - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_SOUNDLISTENER_H -#define __SND_SOUNDLISTENER_H - -#include "SND_Object.h" - -class SND_SoundListener : public SND_Object -{ -public: - SND_SoundListener(); - virtual ~SND_SoundListener(); - - void SetStateFlag(unsigned int stateflags); - void SetGain(MT_Scalar gain); - void SetPosition(const MT_Vector3& pos); - void SetVelocity(const MT_Vector3& vel); - void SetOrientation(const MT_Matrix3x3& ori); - void SetDopplerFactor(MT_Scalar dopplerfactor); - void SetDopplerVelocity(MT_Scalar dopplervelocity); - void SetScale(MT_Scalar scale); - - void SetModified(bool modified); - bool IsModified() const; - - unsigned int GetStateFlags() const; - MT_Scalar GetGain() const; - MT_Vector3 GetPosition() const; - MT_Vector3 GetVelocity() const; - MT_Matrix3x3 GetOrientation(); - - MT_Scalar GetDopplerFactor() const; - MT_Scalar GetDopplerVelocity() const; - MT_Scalar GetScale() const; - -private: - void* m_listener; - bool m_modified; - - MT_Scalar m_gain; /* overall gain */ - MT_Vector3 m_position; /* position; left/right, up/down, in/out */ - MT_Vector3 m_velocity; /* velocity of the listener */ - MT_Matrix3x3 m_orientation; /* orientation of the listener */ - - MT_Scalar m_dopplerfactor; /* scaling factor for the Doppler (pitch) shift */ - MT_Scalar m_dopplervelocity; /* factor for the reference velocity (for Dopplereffect) */ - MT_Scalar m_scale; -}; - -#endif //__SND_SOUNDLISTENER_H - diff --git a/intern/SoundSystem/SND_SoundObject.h b/intern/SoundSystem/SND_SoundObject.h deleted file mode 100644 index 7bd43fb4e66..00000000000 --- a/intern/SoundSystem/SND_SoundObject.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * SND_SoundObject.h - * - * Implementation of the abstract sound object - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_SOUNDOBJECT_H -#define __SND_SOUNDOBJECT_H - -#include "SND_Object.h" -#include "STR_String.h" - -/** - * SND_SoundObject is a class for api independent sounddata storage conected to an actuator - */ - -class SND_SoundObject : public SND_Object -{ -private: - STR_String m_samplename; /* name of the sample */ - STR_String m_objectname; /* name of the object */ - unsigned int m_buffer; - - bool m_active; /* is the object active or not? */ - int m_id; - MT_Scalar m_lifespan; /* the lifespan of the sound seconds */ - MT_Scalar m_timestamp; - - MT_Scalar m_length; /* length of the sample in seconds */ - - MT_Scalar m_gain; /* the gain of the object */ - MT_Scalar m_rollofffactor; /* the scaling factor to increase or decrease the range - of a source by decreasing or increasing the - attenuation, respectively */ - MT_Scalar m_referencedistance;/* the distance at which the listener will experience - gain */ - MT_Scalar m_mingain; /* indicates the minimal gain which is always guaranteed - for this source */ - MT_Scalar m_maxgain; /* indicates the maximal gain which is always guaranteed - for this source */ - - MT_Scalar m_pitch; /* the pitch of the object */ - MT_Vector3 m_position; /* position; left/right, up/down, in/out */ - MT_Vector3 m_velocity; /* velocity of the object */ - MT_Matrix3x3 m_orientation; /* orientation of the object */ - unsigned int m_loopmode; /* loop normal or bidirectional? */ - unsigned int m_loopstart; /* start of looppoint in samples! */ - unsigned int m_loopend; /* end of looppoint in samples! */ - bool m_is3d; /* is the object 3D or 2D? */ - int m_playstate; /* flag for current state of object */ - bool m_modified; - unsigned int m_running; - bool m_highpriority; /* may the sound be ditched when we run out of voices? */ - -public: - - SND_SoundObject(); - ~SND_SoundObject(); - - void SetBuffer(unsigned int buffer); - void SetActive(bool active); - - void StartSound(); - void StopSound(); - void PauseSound(); - void DeleteWhenFinished(); - - void SetObjectName(STR_String objectname); - void SetSampleName(STR_String samplename); - void SetLength(MT_Scalar length); - - void SetPitch(MT_Scalar pitch); - void SetGain(MT_Scalar gain); - void SetMinGain(MT_Scalar mingain); - void SetMaxGain(MT_Scalar maxgain); - void SetRollOffFactor(MT_Scalar rollofffactor); - void SetReferenceDistance(MT_Scalar distance); - void SetPosition(const MT_Vector3& pos); - void SetVelocity(const MT_Vector3& vel); - void SetOrientation(const MT_Matrix3x3& orient); - void SetLoopMode(unsigned int loopmode); - void SetLoopStart(unsigned int loopstart); - void SetLoopEnd(unsigned int loopend); - void Set3D(bool threedee); - void SetPlaystate(int playstate); - void SetHighPriority(bool priority); - - void SetId(int id); - void SetLifeSpan(); - void SetTimeStamp(MT_Scalar timestamp); - - void SetModified(bool modified); - - bool IsLifeSpanOver(MT_Scalar curtime) const; - bool IsActive() const; - bool IsModified() const; - bool IsHighPriority() const; - - void InitRunning(); - bool IsRunning() const; - void AddRunning(); - - int GetId() const; - MT_Scalar GetLifeSpan() const; - MT_Scalar GetTimestamp() const; - - unsigned int GetBuffer(); - const STR_String& GetSampleName(); - const STR_String& GetObjectName(); - - MT_Scalar GetLength() const; - MT_Scalar GetGain() const; - MT_Scalar GetPitch() const; - - MT_Scalar GetMinGain() const; - MT_Scalar GetMaxGain() const; - MT_Scalar GetRollOffFactor() const; - MT_Scalar GetReferenceDistance() const; - - MT_Vector3 GetPosition() const; - MT_Vector3 GetVelocity() const; - MT_Matrix3x3 GetOrientation() const; - unsigned int GetLoopMode() const; - unsigned int GetLoopStart() const; - unsigned int GetLoopEnd() const; - bool Is3D() const; - int GetPlaystate() const; - -}; - -#endif //__SND_SOUNDOBJECT_H - diff --git a/intern/SoundSystem/SND_Utils.h b/intern/SoundSystem/SND_Utils.h deleted file mode 100644 index 26cf1bda11c..00000000000 --- a/intern/SoundSystem/SND_Utils.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_UTILS_H -#define SND_UTILS_H - -#include "SND_WaveSlot.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -typedef struct -{ - unsigned char riff[4]; - signed int size; - unsigned char type[4]; -} WavFileHeader; - -typedef struct -{ - unsigned short format; - unsigned short numberofchannels; - unsigned int samplerate; - unsigned int bytespersec; - unsigned short blockalignment; - unsigned short bitrate; -} WavFmtHeader; - -typedef struct -{ - unsigned short size; - unsigned short samplesperblock; -} WavFmtExHeader; - -typedef struct -{ - unsigned int Manufacturer; - unsigned int Product; - unsigned int SamplePeriod; - unsigned int Note; - unsigned int FineTune; - unsigned int SMPTEFormat; - unsigned int SMPTEOffest; - unsigned int loops; - unsigned int SamplerData; - struct - { - unsigned int Identifier; - unsigned int Type; - unsigned int Start; - unsigned int End; - unsigned int Fraction; - unsigned int Count; - } Loop[1]; -} WavSampleHeader; - -typedef struct -{ - unsigned char id[4]; - unsigned int size; -} WavChunkHeader; - -/** - * loads a sample and returns a pointer - */ -extern void* SND_LoadSample(char *filename); - -extern bool SND_IsSampleValid(const STR_String& name, void* memlocation); -extern unsigned int SND_GetSampleFormat(void* sample); -extern unsigned int SND_GetNumberOfChannels(void* sample); -extern unsigned int SND_GetSampleRate(void* sample); -extern unsigned int SND_GetBitRate(void* sample); -extern unsigned int SND_GetNumberOfSamples(void* sample, int sample_length); -extern unsigned int SND_GetHeaderSize(void* sample, int sample_length); -extern unsigned int SND_GetExtraChunk(void* sample); - -extern void SND_GetSampleInfo(signed char* sample, SND_WaveSlot* waveslot); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/intern/SoundSystem/SND_WaveCache.h b/intern/SoundSystem/SND_WaveCache.h deleted file mode 100644 index 2c457797768..00000000000 --- a/intern/SoundSystem/SND_WaveCache.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SND_WaveCache.h - * - * abstract wavecache, a way to organize samples - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#ifndef __SND_WAVECACHE_H -#define __SND_WAVECACHE_H - -#include "SND_WaveSlot.h" -#include "SoundDefines.h" -#include "SND_SoundObject.h" -#include - -class SND_WaveCache -{ -public: - SND_WaveCache(); - virtual ~SND_WaveCache(); - - SND_WaveSlot* GetWaveSlot(const STR_String& samplename); - - void RemoveAllSamples(); - void RemoveSample(const STR_String& samplename, int buffer); - -private: - std::map m_samplecache; - - SND_WaveSlot* m_bufferList[NUM_BUFFERS]; - - void FreeSamples(); -}; - -#endif //__SND_WAVECACHE_H - diff --git a/intern/SoundSystem/SND_WaveSlot.h b/intern/SoundSystem/SND_WaveSlot.h deleted file mode 100644 index 75cddfa36d8..00000000000 --- a/intern/SoundSystem/SND_WaveSlot.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * SND_WaveSlot.cpp - * - * class for storing sample related information - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_WAVESLOT_H -#define __SND_WAVESLOT_H - -#include "STR_String.h" - -class SND_WaveSlot -{ - STR_String m_samplename; - bool m_loaded; - void* m_data; - unsigned int m_buffer; - unsigned int m_sampleformat; - unsigned int m_numberofchannels; - unsigned int m_samplerate; - unsigned int m_bitrate; - unsigned int m_numberofsamples; - unsigned int m_filesize; - -public: - - SND_WaveSlot(): m_loaded(false), - m_data(NULL), - m_buffer(0), - m_sampleformat(0), - m_numberofchannels(0), - m_samplerate(0), - m_bitrate(0), - m_numberofsamples(0), - m_filesize(0) - {}; - ~SND_WaveSlot(); - - void SetSampleName(STR_String samplename); - void SetLoaded(bool loaded); - void SetData(void* data); - void SetBuffer(unsigned int buffer); - void SetSampleFormat(unsigned int sampleformat); - void SetNumberOfChannels(unsigned int numberofchannels); - void SetSampleRate(unsigned int samplerate); - void SetBitRate(unsigned int bitrate); - void SetNumberOfSamples(unsigned int numberofsamples); - void SetFileSize(unsigned int filesize); - - - const STR_String& GetSampleName(); - bool IsLoaded() const; - void* GetData(); - unsigned int GetBuffer() const; - unsigned int GetSampleFormat() const; - unsigned int GetNumberOfChannels() const; - unsigned int GetSampleRate() const; - unsigned int GetBitRate() const; - unsigned int GetNumberOfSamples() const; - unsigned int GetFileSize() const; - -}; - -#endif //__SND_WAVESLOT_H - diff --git a/intern/SoundSystem/SND_test/Makefile b/intern/SoundSystem/SND_test/Makefile deleted file mode 100644 index 279eeace0d8..00000000000 --- a/intern/SoundSystem/SND_test/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = soundsystem -DIR = $(OCGDIR)/intern/SoundSystem -ALLTARGETS = $(OBJS) $(DIR)/$(DEBUG_DIR)SoundSystem - -include nan_compile.mk - -CPPFLAGS += $(NAN_LEVEL_1_WARNINGS) - -CPPFLAGS += -I$(NAN_MOTO)/include -CPPFLAGS += -I.. -I../SND_BlenderWaveCache -I../SND_OpenAL - -TESTLIB = $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a -TESTLIB += $(OCGDIR)/gameengine/BlenderWaveCache/$(DEBUG_DIR)libBlenderWaveCache.a -TESTLIB += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libsoundsystem.a -TESTLIB += $(NAN_OPENAL)/lib/libopenal.a - -$(DIR)/$(DEBUG_DIR)SoundSystem: $(OBJS) $(TESTLIB) - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(TESTLIB) -lm -pthread -ldl -lstdc++ diff --git a/intern/SoundSystem/SND_test/SND_test.c b/intern/SoundSystem/SND_test/SND_test.c deleted file mode 100644 index 0d19dc2e131..00000000000 --- a/intern/SoundSystem/SND_test/SND_test.c +++ /dev/null @@ -1,154 +0,0 @@ -/* SND_test.c nov 2000 -* -* testfile for the SND module -* -* janco verduin -* -* $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** -*/ - -#include "SND_C-api.h" -#include "BlenderWaveCacheCApi.h" -#include "OpenALC-Api.h" -#include -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#if defined(WIN32) -#include -#else -#include -#endif -#include - -static int buf[3]; - -float oPos[3]={3.0, 0.0,-1.0}; -float oVel[3]={0.0, 0.0, 1.0}; -float oOri[6]={0.0, 0.0, 1.0, 0.0, 1.0, 0.0}; - -void* ReadFile(char *filename) -{ - int file, filelen; - void *data = NULL; - -#if defined(WIN32) - file = open(filename, O_BINARY|O_RDONLY); -#else - file = open(filename, 0|O_RDONLY); -#endif - - if (file == -1) { - printf("can't open file.\n"); - printf("press q for quit.\n"); - - } - else { - filelen = lseek(file, 0, SEEK_END); - lseek(file, 0, SEEK_SET); - - if (filelen != 0){ - data = malloc(filelen); - if (read(file, data, filelen) != filelen) { - free(data); - data = NULL; - } - } - close(file); - - } - return (data); -} - -int main(int argc, char* argv[]) -{ - int ch; - char* samplename = NULL; - void* sampleinmemory = NULL; - SND_CacheHandle wavecache = NULL; - SND_SceneHandle scene = NULL; - SND_ObjectHandle object = NULL; - - wavecache = SND_GetWaveCache(); - scene = SND_CreateOpenALScene(wavecache); - - samplename = "2.wav"; - sampleinmemory = ReadFile(samplename); - - if (sampleinmemory) { - - object = SND_CreateObject(); - SND_AddMemoryLocation(samplename, sampleinmemory); - SND_SetSampleName(object, samplename); - SND_AddObject(scene, object); - printf("go your gang...\n"); - printf("1: play\n"); - printf("2: stop\n"); - printf("q: quit\n"); - } - do - { - ch = getchar(); - ch = toupper(ch); - switch (ch) - { - case '1': - { - SND_SetPitch(object, 1.0); - SND_SetGain(object, 1.0); - SND_StartSound(object); - break; - } - case '2': - { - SND_StopSound(object); - break; - } - default: - break; - } - - SND_Proceed(scene); - - } while (ch != 'Q'); - - if (object) { - - SND_RemoveObject(scene, object); - SND_DeleteObject(object); - } - - SND_DeleteScene(scene); - SND_DeleteCache(); - - return 0; - -} diff --git a/intern/SoundSystem/SoundDefines.h b/intern/SoundSystem/SoundDefines.h deleted file mode 100644 index 450fde187b5..00000000000 --- a/intern/SoundSystem/SoundDefines.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * SoundDefines.h - * - * this is where all kinds of defines are stored - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SOUNDDEFINES_H -#define __SOUNDDEFINES_H - -/* the types of devices */ -enum -{ - snd_e_dummydevice = 0, - snd_e_fmoddevice, - snd_e_openaldevice -}; - -/* general stuff */ -#define NUM_BUFFERS 128 -#define NUM_SOURCES 24 /* 24 is the limit for openal on windows, was 16 in 2.47 and previous */ - -/* openal related stuff */ -#define AL_LOOPING 0x1007 - -/* fmod related stuff */ -#ifdef WIN32 -#define MIXRATE 22050 -#else -#define MIXRATE 44100 -#endif -#define NUM_FMOD_MIN_HW_CHANNELS 16 -#define NUM_FMOD_MAX_HW_CHANNELS 16 - -/* activelist defines */ -enum -{ - SND_REMOVE_ACTIVE_OBJECT = 0, - SND_ADD_ACTIVE_OBJECT, - SND_DO_NOTHING -}; - -/* playstate flags */ -enum -{ - SND_UNKNOWN = -1, - SND_INITIAL, - SND_MUST_PLAY, - SND_PLAYING, - SND_MUST_STOP, - SND_STOPPED, - SND_MUST_PAUSE, - SND_PAUSED, - SND_MUST_RESUME, - SND_MUST_STOP_WHEN_FINISHED, - SND_MUST_BE_DELETED -}; - -/* loopmodes */ -enum -{ - SND_LOOP_OFF = 0, - SND_LOOP_NORMAL, - SND_LOOP_BIDIRECTIONAL -}; - - -/* cd playstate flags */ -enum -{ - SND_CD_ALL = 0, - SND_CD_TRACK, - SND_CD_TRACKLOOP -}; - -/* sample types */ -enum -{ - SND_WAVE_FORMAT_UNKNOWN = 0, - SND_WAVE_FORMAT_PCM, - SND_WAVE_FORMAT_ADPCM, - SND_WAVE_FORMAT_ALAW = 6, - SND_WAVE_FORMAT_MULAW, - SND_WAVE_FORMAT_DIALOGIC_OKI_ADPCM = 17, - SND_WAVE_FORMAT_CONTROL_RES_VQLPC = 34, - SND_WAVE_FORMAT_GSM_610 = 49, - SND_WAVE_FORMAT_MPEG3 = 85 -}; - -#endif //__SOUNDDEFINES_H - diff --git a/intern/SoundSystem/dummy/Makefile b/intern/SoundSystem/dummy/Makefile deleted file mode 100644 index 829135dde98..00000000000 --- a/intern/SoundSystem/dummy/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = DummySoundSystem -DIR = $(OCGDIR)/intern/$(LIBNAME) - -include nan_compile.mk - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_MOTO)/include -CPPFLAGS += -I../intern -CPPFLAGS += -I.. -CPPFLAGS += -I. diff --git a/intern/SoundSystem/dummy/SND_DummyDevice.cpp b/intern/SoundSystem/dummy/SND_DummyDevice.cpp deleted file mode 100644 index 3e5874f02ca..00000000000 --- a/intern/SoundSystem/dummy/SND_DummyDevice.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * SND_FmodDevice derived from SND_IAudioDevice - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#include "SND_DummyDevice.h" - -SND_DummyDevice::SND_DummyDevice() -{ -} - -SND_DummyDevice::~SND_DummyDevice() -{ -#ifdef ONTKEVER - printf("SND_DummyDevice destructor"); -#endif -} - - diff --git a/intern/SoundSystem/dummy/SND_DummyDevice.h b/intern/SoundSystem/dummy/SND_DummyDevice.h deleted file mode 100644 index 988f731d1bf..00000000000 --- a/intern/SoundSystem/dummy/SND_DummyDevice.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_DUMMYDEVICE -#define SND_DUMMYDEVICE - -#include "SND_AudioDevice.h" - -class SND_DummyDevice : public SND_AudioDevice -{ -public: - SND_DummyDevice(); - ~SND_DummyDevice(); - - bool Init() { return false; } - - SND_WaveSlot* LoadSample(const STR_String& samplename, - void* memlocation, - int size) { return NULL; } - - void InitListener() {}; - void SetListenerGain(float gain) const {}; - void SetDopplerVelocity(MT_Scalar dopplervelocity) const {}; - void SetDopplerFactor(MT_Scalar dopplerfactor) const {}; - void SetListenerRollOffFactor(MT_Scalar rollofffactor) const {}; - - void MakeCurrent() const {}; - - void NextFrame() const {}; - - void SetObjectBuffer(int id, unsigned int buffer) {}; - - int GetPlayState(int id) { return SND_UNKNOWN; } - void PlayObject(int id) {}; - void StopObject(int id) const {}; - void StopAllObjects() {}; - void PauseObject(int id) const {}; - - void SetObjectLoop(int id, unsigned int loopmode) const {}; - void SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const {}; - void SetObjectPitch(int id, MT_Scalar pitch) const {}; - void SetObjectGain(int id, MT_Scalar gain) const {}; - void SetObjectMinGain(int id, MT_Scalar mingain) const {}; - void SetObjectMaxGain(int id, MT_Scalar maxgain) const {}; - void SetObjectRollOffFactor(int id, MT_Scalar rolloff) const {}; - void SetObjectReferenceDistance(int id, MT_Scalar distance) const {}; - - void SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const {}; - void ObjectIs2D(int id) const {}; - - void PlayCD(int track) const {}; - void PauseCD(bool pause) const {}; - void StopCD() const {}; - void SetCDPlaymode(int playmode) const {}; - void SetCDGain(MT_Scalar gain) const {}; - - void StartUsingDSP() {}; - float* GetSpectrum() { return NULL; } - void StopUsingDSP() {}; -}; - -#endif //SND_DUMMYDEVICE - diff --git a/intern/SoundSystem/fmod/Makefile b/intern/SoundSystem/fmod/Makefile deleted file mode 100644 index 47bc0348fe2..00000000000 --- a/intern/SoundSystem/fmod/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = FmodSoundSystem -DIR = $(OCGDIR)/intern/$(LIBNAME) - -include nan_compile.mk - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I$(NAN_FMOD)/include -CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_MOTO)/include -CPPFLAGS += -I../intern -CPPFLAGS += -I.. -CPPFLAGS += -I. diff --git a/intern/SoundSystem/fmod/SND_FmodDevice.cpp b/intern/SoundSystem/fmod/SND_FmodDevice.cpp deleted file mode 100644 index 3ba0802a5b0..00000000000 --- a/intern/SoundSystem/fmod/SND_FmodDevice.cpp +++ /dev/null @@ -1,574 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * SND_FmodDevice derived from SND_IAudioDevice - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#include "SND_FmodDevice.h" -#include "SoundDefines.h" -#include "SND_Utils.h" - -SND_FmodDevice::SND_FmodDevice() -{ - /* Removed the functionality for checking if noaudio was provided on */ - /* the commandline. */ - m_dspunit = NULL; - - m_audio = true; - - // let's check if we can get fmod to initialize... - if (m_audio) - { - signed char MinHardwareChannels = FSOUND_SetMinHardwareChannels(NUM_FMOD_MIN_HW_CHANNELS); - signed char MaxHardwareChannels = FSOUND_SetMaxHardwareChannels(NUM_FMOD_MAX_HW_CHANNELS); - - if (FSOUND_Init(MIXRATE, NUM_SOURCES, 0)) - { - m_max_channels = FSOUND_GetMaxChannels(); - m_num_hardware_channels = FSOUND_GetNumHardwareChannels(); - m_num_software_channels = NUM_SOURCES; - - // let's get us a wavecache - m_wavecache = new SND_WaveCache(); - - int i; - for (i = 0; i < NUM_BUFFERS; i++) - m_buffers[i] = NULL; - - for (i = 0; i < NUM_SOURCES; i++) - { - m_sources[i] = NULL; - m_frequencies[i] = 0; - m_channels[i] = 0; - } - } - else - { - m_audio = false; - } - } - -#ifdef ONTKEVER - int numdrivers = FSOUND_GetNumDrivers(); - int output = FSOUND_GetOutput(); - int oputputrate = FSOUND_GetOutputRate(); - int mixer = FSOUND_GetMixer(); - - printf("maxchannels is: %d\n", m_max_channels); - printf("num hw channels is: %d\n", m_num_hardware_channels); - printf("num sw channels is: %d\n", m_num_software_channels); - printf("numdrivers is: %d\n", numdrivers); - printf("output is: %d\n", output); - printf("oputputrate is: %d\n", oputputrate); - printf("mixer is: %d\n", mixer); -#endif -} - - - -SND_FmodDevice::~SND_FmodDevice() -{ - // let's see if we used the cd. if not, just leave it alone - SND_CDObject* pCD = SND_CDObject::Instance(); - - if (pCD) - { - this->StopCD(); - SND_CDObject::DisposeSystem(); - } - - StopUsingDSP(); - - FSOUND_Close(); -} - - - -void SND_FmodDevice::UseCD() const -{ - // only fmod has CD support, so only create it here - SND_CDObject::CreateSystem(); -} - - - -void SND_FmodDevice::MakeCurrent() const -{ - // empty -} - - - -SND_WaveSlot* SND_FmodDevice::LoadSample(const STR_String& name, - void* memlocation, - int size) -{ - SND_WaveSlot* waveslot = NULL; - STR_String samplename = name; - - if (m_audio) - { - /* first check if the sample is supported */ - if (SND_IsSampleValid(name, memlocation)) - { - /* create the waveslot */ - waveslot = m_wavecache->GetWaveSlot(samplename); - - if (waveslot) - { - int buffer = waveslot->GetBuffer(); - - /* load the sample from memory? */ - if (size && memlocation) - { - m_buffers[buffer] = FSOUND_Sample_Load(buffer, (char*)memlocation, FSOUND_LOADMEMORY, size); - - /* if the loading succeeded, fill the waveslot with info */ - if (m_buffers[buffer]) - { - int sampleformat = SND_GetSampleFormat(memlocation); - int numberofchannels = SND_GetNumberOfChannels(memlocation); - int samplerate = SND_GetSampleRate(memlocation); - int bitrate = SND_GetBitRate(memlocation); - int numberofsamples = SND_GetNumberOfSamples(memlocation, size); - - waveslot->SetFileSize(size); - waveslot->SetData(memlocation); - waveslot->SetSampleFormat(sampleformat); - waveslot->SetNumberOfChannels(numberofchannels); - waveslot->SetSampleRate(samplerate); - waveslot->SetBitRate(bitrate); - waveslot->SetNumberOfSamples(numberofsamples); - } - } - /* or from file? */ - else - { - m_buffers[buffer] = FSOUND_Sample_Load(buffer, samplename.Ptr(), FSOUND_LOOP_NORMAL, NULL); - } - -#ifdef ONTKEVER - int error = FSOUND_GetError(); - printf("sample load: errornumber is: %d\n", error); -#endif - - /* if the loading succeeded, mark the waveslot */ - if (m_buffers[buffer]) - { - waveslot->SetLoaded(true); - } - /* or when it failed, free the waveslot */ - else - { - m_wavecache->RemoveSample(waveslot->GetSampleName(), waveslot->GetBuffer()); - waveslot = NULL; - } - } - } - } - - return waveslot; -} - - - - -// listener's and general stuff ////////////////////////////////////////////////////// - - - -/* sets the global dopplervelocity */ -void SND_FmodDevice::SetDopplerVelocity(MT_Scalar dopplervelocity) const -{ - /* not supported by fmod */ - FSOUND_3D_Listener_SetDopplerFactor(dopplervelocity); -} - - - -/* sets the global dopplerfactor */ -void SND_FmodDevice::SetDopplerFactor(MT_Scalar dopplerfactor) const -{ - FSOUND_3D_Listener_SetDopplerFactor(dopplerfactor); -} - - - -/* sets the global rolloff factor */ -void SND_FmodDevice::SetListenerRollOffFactor(MT_Scalar rollofffactor) const -{ - // not implemented in openal -} - - - -void SND_FmodDevice::NextFrame() const -{ - FSOUND_3D_Update(); -} - - - -// set the gain for the listener -void SND_FmodDevice::SetListenerGain(float gain) const -{ - int fmod_gain = (int)(gain * 255); - FSOUND_SetSFXMasterVolume(fmod_gain); -} - - - -void SND_FmodDevice::InitListener() -{ - // initialize the listener with these values that won't change - // (as long as we can have only one listener) - // now we can superimpose all listeners on each other (for they - // have the same settings) - float lispos[3] = {0,0,0}; - float lisvel[3] = {0,0,0}; - - FSOUND_3D_Listener_SetAttributes(lispos, lisvel, 0, -1, 0, 0, 0, 1); -} - - - -// source playstate stuff //////////////////////////////////////////////////////////// - - - -// check if the sound's still playing -int SND_FmodDevice::GetPlayState(int id) -{ - int result = SND_STOPPED; - - // klopt niet, fixen - signed char isplaying = FSOUND_IsPlaying(id); - - if (isplaying) - { - result = SND_PLAYING; - } - -/* hi reevan, just swap // of these 2 lines */ -// return result; - return 0; -} - - - -/* sets the buffer */ -void SND_FmodDevice::SetObjectBuffer(int id, unsigned int buffer) -{ - m_sources[id] = m_buffers[buffer]; -} - - - -// make the source play -void SND_FmodDevice::PlayObject(int id) -{ - m_channels[id] = FSOUND_PlaySound(FSOUND_FREE, m_sources[id]); - m_frequencies[id] = FSOUND_GetFrequency(m_channels[id]); -// printf("fmod: play \n"); -} - - - -// make the source stop -void SND_FmodDevice::StopObject(int id) const -{ - FSOUND_StopSound(m_channels[id]); -// printf("fmod: stop \n"); -} - - - -// stop all sources -void SND_FmodDevice::StopAllObjects() -{ - FSOUND_StopSound(FSOUND_ALL); -} - - - -// pause the source -void SND_FmodDevice::PauseObject(int id) const -{ - FSOUND_StopSound(m_channels[id]); -} - - - -// source properties stuff //////////////////////////////////////////////////////////// - - - -// give openal the object's pitch -void SND_FmodDevice::SetObjectPitch(int id, MT_Scalar pitch) const -{ - pitch = pitch * m_frequencies[id]; - char result = FSOUND_SetFrequency(m_channels[id], (int)pitch); -} - - - -// give openal the object's gain -void SND_FmodDevice::SetObjectGain(int id, MT_Scalar gain) const -{ - int vol = (int)(gain * 255); - FSOUND_SetVolume(m_channels[id], vol); -} - - - -// give openal the object's looping -void SND_FmodDevice::SetObjectLoop(int id, unsigned int loopmode) const -{ -// printf("loopmode: %d\n", loopmode); - switch (loopmode) - { - case SND_LOOP_OFF: - { -#ifndef __APPLE__ - char result = FSOUND_Sample_SetLoopMode(m_sources[id], FSOUND_LOOP_OFF); -#else - char result = FSOUND_SetLoopMode(m_sources[id], FSOUND_LOOP_OFF); -#endif -// char result = FSOUND_SetLoopMode(m_channels[id], FSOUND_LOOP_OFF); - break; - } - case SND_LOOP_NORMAL: - { -#ifndef __APPLE__ - char result = FSOUND_Sample_SetLoopMode(m_sources[id], FSOUND_LOOP_NORMAL); -#else - char result = FSOUND_SetLoopMode(m_sources[id], FSOUND_LOOP_NORMAL); -#endif -// char result = FSOUND_SetLoopMode(m_channels[id], FSOUND_LOOP_NORMAL); - break; - } - case SND_LOOP_BIDIRECTIONAL: - { -#ifndef __APPLE__ - char result = FSOUND_Sample_SetLoopMode(m_sources[id], FSOUND_LOOP_BIDI); -#else - char result = FSOUND_SetLoopMode(m_sources[id], FSOUND_LOOP_BIDI); -#endif -// char result = FSOUND_SetLoopMode(m_channels[id], FSOUND_LOOP_NORMAL); - break; - } - default: - break; - } -} - - - -void SND_FmodDevice::SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const -{ - FSOUND_Sample_SetLoopPoints(m_sources[id], loopstart, loopend); -} - - - -void SND_FmodDevice::SetObjectMinGain(int id, MT_Scalar mingain) const -{ - /* not supported by fmod */ -} - - - -void SND_FmodDevice::SetObjectMaxGain(int id, MT_Scalar maxgain) const -{ - /* not supported by fmod */ -} - - - -void SND_FmodDevice::SetObjectRollOffFactor(int id, MT_Scalar rollofffactor) const -{ - /* not supported by fmod */ -} - - - -void SND_FmodDevice::SetObjectReferenceDistance(int id, MT_Scalar referencedistance) const -{ - /* not supported by fmod */ -} - - - -// give openal the object's position -void SND_FmodDevice::ObjectIs2D(int id) const -{ - float obpos[3] = {0,0,0}; - float obvel[3] = {0,0,0}; - - FSOUND_3D_SetAttributes(m_channels[id], obpos, obvel); -} - - - -void SND_FmodDevice::SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const -{ - float obpos[3]; - float obvel[3]; - - obpos[0] = (float)position[0] * (float)rollofffactor; //x (l/r) - obpos[1] = (float)position[1] * (float)rollofffactor; - obpos[2] = (float)position[2] * (float)rollofffactor; - - velocity.getValue(obvel); - FSOUND_3D_SetAttributes(m_channels[id], obpos, obvel); -} - - - -// cd support stuff //////////////////////////////////////////////////////////// - - -void SND_FmodDevice::PlayCD(int track) const -{ -#ifndef __APPLE__ - signed char result = FSOUND_CD_Play(track); -#else - signed char result = FSOUND_CD_Play(0, track); -#endif - -#ifdef ONTKEVER - printf("SND_FmodDevice::PlayCD(): track=%d, result=%d\n", track, (int)result); -#endif -} - - - -void SND_FmodDevice::PauseCD(bool pause) const -{ -#ifndef __APPLE__ - signed char result = FSOUND_CD_SetPaused(pause); -#else - signed char result = FSOUND_CD_SetPaused(0, pause); -#endif - -#ifdef ONTKEVER - printf("SND_FmodDevice::PauseCD(): pause=%d, result=%d\n", pause, (int)result); -#endif -} - - - -void SND_FmodDevice::StopCD() const -{ - SND_CDObject* pCD = SND_CDObject::Instance(); - - if (pCD) - { - if (pCD->GetUsed()) - { -#ifndef __APPLE__ - signed char result = FSOUND_CD_Stop(); -#else - signed char result = FSOUND_CD_Stop(0); -#endif - -#ifdef ONTKEVER - printf("SND_FmodDevice::StopCD(): result=%d\n", (int)result); -#endif - } - } -} - - - -void SND_FmodDevice::SetCDPlaymode(int playmode) const -{ -#ifndef __APPLE__ - FSOUND_CD_SetPlayMode(playmode); -#else - FSOUND_CD_SetPlayMode(0, playmode); -#endif - -#ifdef ONTKEVER - printf("SND_FmodDevice::SetCDPlaymode(): playmode=%d,\n", playmode); -#endif -} - - - -void SND_FmodDevice::SetCDGain(MT_Scalar gain) const -{ - int volume = gain * 255; -#ifndef __APPLE__ - signed char result = FSOUND_CD_SetVolume(volume); -#else - signed char result = FSOUND_CD_SetVolume(0, volume); -#endif - -#ifdef ONTKEVER - printf("SND_FmodDevice::SetCDGain(): gain=%f, volume=%d, result=%d\n", gain, volume, (int)result); -#endif -} - - - -void SND_FmodDevice::StartUsingDSP() -{ - m_dspunit = FSOUND_DSP_GetFFTUnit(); - - FSOUND_DSP_SetActive(m_dspunit, true); -} - - - -float* SND_FmodDevice::GetSpectrum() -{ - m_spectrum = FSOUND_DSP_GetSpectrum(); - - return m_spectrum; -} - - - -void SND_FmodDevice::StopUsingDSP() -{ - if (m_dspunit) - FSOUND_DSP_SetActive(m_dspunit, false); -} diff --git a/intern/SoundSystem/fmod/SND_FmodDevice.h b/intern/SoundSystem/fmod/SND_FmodDevice.h deleted file mode 100644 index 294ee4e3a72..00000000000 --- a/intern/SoundSystem/fmod/SND_FmodDevice.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_FMODDEVICE -#define SND_FMODDEVICE - -#include "fmod.h" -#include "SND_AudioDevice.h" -#include "SoundDefines.h" - -class SND_FmodDevice : public SND_AudioDevice -{ -public: - SND_FmodDevice(); - ~SND_FmodDevice(); - - SND_WaveSlot* LoadSample(const STR_String& samplename, - void* memlocation, - int size); - - void InitListener(); - void SetListenerGain(float gain) const; - void SetDopplerVelocity(MT_Scalar dopplervelocity) const; - void SetDopplerFactor(MT_Scalar dopplerfactor) const; - void SetListenerRollOffFactor(MT_Scalar rollofffactor) const; - - void MakeCurrent() const; - void NextFrame() const; - void UseCD() const; - - void SetObjectBuffer(int id, unsigned int buffer); - int GetPlayState(int id); - void PlayObject(int id); - void StopObject(int id) const; - void StopAllObjects(); - void PauseObject(int id) const; - - void SetObjectLoop(int id, unsigned int loopmode) const; - void SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const; - void SetObjectPitch(int id, MT_Scalar pitch) const; - void SetObjectGain(int id, MT_Scalar gain) const; - void SetObjectMinGain(int id, MT_Scalar mingain) const; - void SetObjectMaxGain(int id, MT_Scalar maxgain) const; - void SetObjectRollOffFactor(int id, MT_Scalar rolloff) const; - void SetObjectReferenceDistance(int id, MT_Scalar distance) const; - - void SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const; - void ObjectIs2D(int id) const; - - void PlayCD(int track) const; - void PauseCD(bool pause) const; - void StopCD() const; - void SetCDPlaymode(int playmode) const; - void SetCDGain(MT_Scalar gain) const; - - void StartUsingDSP(); - float* GetSpectrum(); - void StopUsingDSP(); - -private: - FSOUND_SAMPLE* m_buffers[NUM_BUFFERS]; - FSOUND_SAMPLE* m_sources[NUM_SOURCES]; - FSOUND_DSPUNIT* m_dspunit; - int m_frequencies[NUM_SOURCES]; - int m_max_channels; - int m_num_hardware_channels; - int m_num_software_channels; - int m_channels[NUM_SOURCES]; - float* m_spectrum; -}; - -#endif //SND_FMODDEVICE - diff --git a/intern/SoundSystem/intern/Makefile b/intern/SoundSystem/intern/Makefile deleted file mode 100644 index c52be01f69f..00000000000 --- a/intern/SoundSystem/intern/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = SoundSystem -DIR = $(OCGDIR)/intern/SoundSystem - -include nan_compile.mk - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I$(NAN_FMOD)/include -CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_MOTO)/include -CPPFLAGS += -I../../../source/blender/include -CPPFLAGS += -I../dummy -CPPFLAGS += -I../fmod -CPPFLAGS += -I../openal -CPPFLAGS += -I.. -CPPFLAGS += -I. diff --git a/intern/SoundSystem/intern/SND_AudioDevice.cpp b/intern/SoundSystem/intern/SND_AudioDevice.cpp deleted file mode 100644 index 4a5c0e2c498..00000000000 --- a/intern/SoundSystem/intern/SND_AudioDevice.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_AudioDevice.h" -#include "SND_SoundObject.h" - -#ifdef WIN32 -// This warning tells us about truncation of __long__ stl-generated names. -// It can occasionally cause DevStudio to have internal compiler warnings. -#pragma warning( disable : 4786 ) -#endif - - -SND_AudioDevice::SND_AudioDevice() -{ - m_wavecache = NULL; - m_audio = false; - - for (int i = 0; i < NUM_SOURCES; i++) - { - m_idObjectArray[i] = new SND_IdObject(); - m_idObjectArray[i]->SetId(i); - m_idObjectArray[i]->SetSoundObject(NULL); - m_idObjectList.addTail(m_idObjectArray[i]); - } -} - - - -SND_AudioDevice::~SND_AudioDevice() -{ - for (int i = 0; i < NUM_SOURCES; i++) - { - delete m_idObjectArray[i]; - m_idObjectArray[i] = NULL; - } - - if (m_wavecache) - { - delete m_wavecache; - m_wavecache = NULL; - } -} - - - -bool SND_AudioDevice::IsInitialized() -{ - return m_audio; -} - - - -SND_WaveCache* SND_AudioDevice::GetWaveCache() const -{ - return m_wavecache; -} - - - -/* seeks an unused id and returns it */ -bool SND_AudioDevice::GetNewId(SND_SoundObject* pObject) -{ -#ifdef ONTKEVER - printf("SND_AudioDevice::GetNewId\n"); -#endif - - bool result = false; - - // first, get the oldest (the first) idobject - SND_IdObject* pIdObject = (SND_IdObject*)m_idObjectList.getHead(); - - if (pIdObject->isTail()) - { - } - else - { - // find the first id object which doesn't have a high priority soundobject - bool ThisSoundMustStay = false; - bool OutOfIds = false; - - do - { - // if no soundobject present, it's seat may be taken - if (pIdObject->GetSoundObject()) - { - // and also if it ain't highprio - if (pIdObject->GetSoundObject()->IsHighPriority()) - { - ThisSoundMustStay = true; - pIdObject = (SND_IdObject*)pIdObject->getNext(); - - // if the last one is a priority sound too, then there are no id's left - // and we won't add any new sounds - if (pIdObject->isTail()) - OutOfIds = true; - } - else - { - ThisSoundMustStay = false; - } - } - else - { - ThisSoundMustStay = false; - } - - } while (ThisSoundMustStay && !OutOfIds); - - if (!OutOfIds) - { - SND_SoundObject* oldobject = pIdObject->GetSoundObject(); - - // revoke the old object if present - if (oldobject) - { -#ifdef ONTKEVER - printf("oldobject: %x\n", oldobject); -#endif - RevokeSoundObject(oldobject); - } - - // set the new soundobject into the idobject - pIdObject->SetSoundObject(pObject); - - // set the id into the soundobject - int id = pIdObject->GetId(); - pObject->SetId(id); - - // connect the new id to the buffer the sample is stored in - SetObjectBuffer(id, pObject->GetBuffer()); - - // remove the idobject from the list and add it in the back again - pIdObject->remove(); - m_idObjectList.addTail(pIdObject); - - result = true; - } - } - - return result; -} - - - -void SND_AudioDevice::ClearId(SND_SoundObject* pObject) -{ -#ifdef ONTKEVER - printf("SND_AudioDevice::ClearId\n"); -#endif - - if (pObject) - { - int id = pObject->GetId(); - - if (id != -1) - { - // lets get the idobject belonging to the soundobject - SND_IdObject* pIdObject = m_idObjectArray[id]; - SND_SoundObject* oldobject = pIdObject->GetSoundObject(); - - if (oldobject) - { - RevokeSoundObject(oldobject); - - // clear the idobject from the soundobject - pIdObject->SetSoundObject(NULL); - } - - // remove the idobject and place it in front - pIdObject->remove(); - m_idObjectList.addHead(pIdObject); - } - } -} - - - -void SND_AudioDevice::RevokeSoundObject(SND_SoundObject* pObject) -{ -#ifdef ONTKEVER - printf("SND_AudioDevice::RevokeSoundObject\n"); -#endif - - // stop the soundobject - int id = pObject->GetId(); - - if (id >= 0 && id < NUM_SOURCES) - { - StopObject(id); - - // remove the object from the 'activelist' - pObject->SetActive(false); - -#ifdef ONTKEVER - printf("pObject->remove();\n"); -#endif - } - - // make sure its id is invalid - pObject->SetId(-1); -} - -/* -void SND_AudioDevice::RemoveSample(const char* filename) -{ - if (m_wavecache) - m_wavecache->RemoveSample(filename); -} -*/ - -void SND_AudioDevice::RemoveAllSamples() -{ - if (m_wavecache) - m_wavecache->RemoveAllSamples(); -} - diff --git a/intern/SoundSystem/intern/SND_AudioDevice.h b/intern/SoundSystem/intern/SND_AudioDevice.h deleted file mode 100644 index 54e8feea90e..00000000000 --- a/intern/SoundSystem/intern/SND_AudioDevice.h +++ /dev/null @@ -1,115 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_AUDIODEVICE -#define SND_AUDIODEVICE - -#include "SND_IAudioDevice.h" -#include "SoundDefines.h" -#include "SND_IdObject.h" - -class SND_AudioDevice : public SND_IAudioDevice -{ -public: - SND_AudioDevice(); - virtual ~SND_AudioDevice(); - - virtual bool IsInitialized(); - - SND_WaveCache* GetWaveCache() const; - - bool GetNewId(SND_SoundObject* pObject); - void ClearId(SND_SoundObject* pObject); - - void UseCD() const {}; - - /* to be implemented in derived class - - virtual SND_WaveSlot* LoadSample(const STR_String& samplename, - void* memlocation, - int size) =0; - */ -// void RemoveSample(const char* filename); - void RemoveAllSamples(); - - /* to be implemented in derived class - - virtual void InitListener()=0; - virtual void SetListenerGain(float gain) const =0; - virtual void SetDopplerVelocity(MT_Scalar dopplervelocity) const =0; - virtual void SetDopplerFactor(MT_Scalar dopplerfactor) const =0; - virtual void SetListenerRollOffFactor(MT_Scalar rollofffactor) const =0; - - virtual void MakeCurrent() const =0; - - virtual void UpdateDevice() const =0; - - virtual void SetObjectBuffer(int id, unsigned int buffer)=0; - virtual int GetPlayState(int id)=0; - virtual void PlayObject(int id)=0; - virtual void StopObject(int id) const =0; - virtual void StopAllObjects()=0; - virtual void PauseObject(int id) const =0; - - virtual void SetObjectLoop(int id, bool loop) const =0; - virtual void SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const =0; - virtual void SetObjectPitch(int id, MT_Scalar pitch) const =0; - virtual void SetObjectGain(int id, MT_Scalar gain) const =0; - virtual void SetObjectRollOffFactor(int id, MT_Scalar rolloff) const =0; - virtual void SetObjectMinGain(int id, MT_Scalar mingain) const =0; - virtual void SetObjectMaxGain(int id, MT_Scalar maxgain) const =0; - virtual void SetObjectReferenceDistance(int id, MT_Scalar referencedistance) const =0; - - virtual void SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const =0; - virtual void ObjectIs2D(int id) const =0; - - virtual void PlayCD(int track) const =0; - virtual void PauseCD(bool pause) const =0; - virtual void StopCD() const =0; - virtual void SetCDPlaymode(int playmode) const =0; - virtual void SetCDGain(MT_Scalar gain) const =0; - virtual float* GetSpectrum() =0; - */ - -protected: - bool m_audio; - GEN_List m_idObjectList; - SND_IdObject* m_idObjectArray[NUM_SOURCES]; - SND_WaveCache* m_wavecache; - -private: - void RevokeSoundObject(SND_SoundObject* pObject); -}; - -#endif //SND_AUDIODEVICE - diff --git a/intern/SoundSystem/intern/SND_C-api.cpp b/intern/SoundSystem/intern/SND_C-api.cpp deleted file mode 100644 index 09846269dcc..00000000000 --- a/intern/SoundSystem/intern/SND_C-api.cpp +++ /dev/null @@ -1,392 +0,0 @@ -/* - * SND_C-Api.cpp - * - * C Api for soundmodule - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "SND_C-api.h" -#include "SND_DeviceManager.h" -#include "SND_Scene.h" - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - - - -void SND_SetDeviceType(int device_type) -{ - SND_DeviceManager::SetDeviceType(device_type); -} - - - -SND_AudioDeviceInterfaceHandle SND_GetAudioDevice() -{ - SND_IAudioDevice* audiodevice = NULL; - - SND_DeviceManager::Subscribe(); - audiodevice = SND_DeviceManager::Instance(); - - if (!audiodevice->IsInitialized()) - { - SND_DeviceManager::SetDeviceType(snd_e_dummydevice); - audiodevice = SND_DeviceManager::Instance(); - } - - return (SND_AudioDeviceInterfaceHandle)audiodevice; -} - - - -void SND_ReleaseDevice() -{ - SND_DeviceManager::Unsubscribe(); -} - - - -int SND_IsPlaybackWanted(SND_SceneHandle scene) -{ - assert(scene); - bool result = ((SND_Scene*)scene)->IsPlaybackWanted(); - - return (int)result; -} - - - -// create a scene -SND_SceneHandle SND_CreateScene(SND_AudioDeviceInterfaceHandle audiodevice) -{ - // initialize sound scene and object - SND_Scene* scene = new SND_Scene((SND_IAudioDevice*)audiodevice); - - return (SND_SceneHandle)scene; -} - - - -void SND_DeleteScene(SND_SceneHandle scene) -{ - assert(scene); - delete (SND_Scene*)scene; -} - - - -int SND_AddSample(SND_SceneHandle scene, - const char* filename, - void* memlocation, - int size) -{ - assert(scene); - assert(memlocation); - int buffer = ((SND_Scene*)scene)->LoadSample(filename, memlocation, size); - - return buffer; -} - - - -void SND_RemoveAllSamples(SND_SceneHandle scene) -{ - assert(scene); - ((SND_Scene*)scene)->RemoveAllSamples(); -} - - - -int SND_CheckBuffer(SND_SceneHandle scene, SND_ObjectHandle object) -{ - assert(scene); - assert(object); - int result = (int)((SND_Scene*)scene)->CheckBuffer((SND_SoundObject*)object); - - return result; -} - - - -void SND_AddSound(SND_SceneHandle scene, SND_ObjectHandle object) -{ - assert(scene); - assert(object); - ((SND_Scene*)scene)->AddObject((SND_SoundObject *)object); -} - - - -void SND_RemoveSound(SND_SceneHandle scene, SND_ObjectHandle object) -{ - assert(scene); - assert(object); - ((SND_Scene*)scene)->DeleteObject((SND_SoundObject *)object); -} - - - -void SND_RemoveAllSounds(SND_SceneHandle scene) -{ - assert(scene); - ((SND_Scene*)scene)->RemoveAllObjects(); -} - - - -void SND_StopAllSounds(SND_SceneHandle scene) -{ - assert(scene); - ((SND_Scene*)scene)->StopAllObjects(); -} - - - -void SND_Proceed(SND_AudioDeviceInterfaceHandle audiodevice, SND_SceneHandle scene) -{ - assert(scene); - ((SND_Scene*)scene)->Proceed(); - ((SND_IAudioDevice*)audiodevice)->NextFrame(); -} - - - -SND_ListenerHandle SND_GetListener(SND_SceneHandle scene) -{ - assert(scene); - return (SND_ListenerHandle)((SND_Scene*)scene)->GetListener(); -} - - - -void SND_SetListenerGain(SND_SceneHandle scene, double gain) -{ - assert(scene); - SND_SoundListener* listener = ((SND_Scene*)scene)->GetListener(); - listener->SetGain((MT_Scalar)gain); -} - - - -void SND_SetDopplerFactor(SND_SceneHandle scene, double dopplerfactor) -{ - assert(scene); - SND_SoundListener* listener = ((SND_Scene*)scene)->GetListener(); - listener->SetDopplerFactor(dopplerfactor); -} - - - -void SND_SetDopplerVelocity(SND_SceneHandle scene, double dopplervelocity) -{ - assert(scene); - SND_SoundListener* listener = ((SND_Scene*)scene)->GetListener(); - listener->SetDopplerVelocity(dopplervelocity); -} - - - -// Object instantiation -SND_ObjectHandle SND_CreateSound() -{ - return (SND_ObjectHandle)new SND_SoundObject(); -} - - - -void SND_DeleteSound(SND_ObjectHandle object) -{ - assert(object); - delete (SND_SoundObject*)object; -} - - - -// Object control -void SND_StartSound(SND_SceneHandle scene, SND_ObjectHandle object) -{ - assert(scene); - assert(object); - ((SND_Scene*)scene)->AddActiveObject((SND_SoundObject*)object, 0); -} - - - -void SND_StopSound(SND_SceneHandle scene, SND_ObjectHandle object) -{ - assert(scene); - assert(object); - ((SND_Scene*)scene)->RemoveActiveObject((SND_SoundObject*)object); -} - - - -void SND_PauseSound(SND_SceneHandle scene, SND_ObjectHandle object) -{ - assert(scene); - assert(object); - ((SND_Scene*)scene)->RemoveActiveObject((SND_SoundObject*)object); -} - - - -void SND_SetSampleName(SND_ObjectHandle object, char* samplename) -{ - assert(object); - STR_String name = samplename; - ((SND_SoundObject*)object)->SetSampleName(name); -} - - - -void SND_SetGain(SND_ObjectHandle object, double gain) -{ - assert(object); - ((SND_SoundObject*)object)->SetGain(gain); -} - - - -void SND_SetMinimumGain(SND_ObjectHandle object, double minimumgain) -{ - assert(object); - ((SND_SoundObject*)object)->SetMinGain(minimumgain); -} - - - -void SND_SetMaximumGain(SND_ObjectHandle object, double maximumgain) -{ - assert(object); - ((SND_SoundObject*)object)->SetMaxGain(maximumgain); -} - - - -void SND_SetRollOffFactor(SND_ObjectHandle object, double rollofffactor) -{ - assert(object); - ((SND_SoundObject*)object)->SetRollOffFactor(rollofffactor); -} - - - -void SND_SetReferenceDistance(SND_ObjectHandle object, double referencedistance) -{ - assert(object); - ((SND_SoundObject*)object)->SetReferenceDistance(referencedistance); -} - - - -void SND_SetPitch(SND_ObjectHandle object, double pitch) -{ - assert(object); - ((SND_SoundObject*)object)->SetPitch(pitch); -} - - - -void SND_SetPosition(SND_ObjectHandle object, double* position) -{ - assert(object); - ((SND_SoundObject*)object)->SetPosition(position); -} - - - -void SND_SetVelocity(SND_ObjectHandle object, double* velocity) -{ - assert(object); - ((SND_SoundObject*)object)->SetVelocity(velocity); -} - - - -void SND_SetOrientation(SND_ObjectHandle object, double* orientation) -{ - assert(object); - ((SND_SoundObject*)object)->SetOrientation(orientation); -} - - - -void SND_SetLoopMode(SND_ObjectHandle object, int loopmode) -{ - assert(object); - ((SND_SoundObject*)object)->SetLoopMode(loopmode); -} - - - -void SND_SetLoopPoints(SND_ObjectHandle object, unsigned int loopstart, unsigned int loopend) -{ - assert(object); - ((SND_SoundObject*)object)->SetLoopStart(loopstart); - ((SND_SoundObject*)object)->SetLoopEnd(loopend); -} - - - -float SND_GetGain(SND_ObjectHandle object) -{ - assert(object); - MT_Scalar gain = ((SND_SoundObject*)object)->GetGain(); - return (float) gain; -} - - - -float SND_GetPitch(SND_ObjectHandle object) -{ - assert(object); - MT_Scalar pitch = ((SND_SoundObject*)object)->GetPitch(); - return (float) pitch; -} - - - -int SND_GetLoopMode(SND_ObjectHandle object) -{ - assert(object); - return ((SND_SoundObject*)object)->GetLoopMode(); -} - - - -int SND_GetPlaystate(SND_ObjectHandle object) -{ - assert(object); - return ((SND_SoundObject*)object)->GetPlaystate(); -} diff --git a/intern/SoundSystem/intern/SND_CDObject.cpp b/intern/SoundSystem/intern/SND_CDObject.cpp deleted file mode 100644 index 089e0d554e4..00000000000 --- a/intern/SoundSystem/intern/SND_CDObject.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - * SND_CDObject.cpp - * - * Implementation for CD playback - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_CDObject.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -SND_CDObject* SND_CDObject::m_instance = NULL; - -bool SND_CDObject::CreateSystem() -{ - bool result = false; - - if (!m_instance) - { - m_instance = new SND_CDObject(); - result = true; - } - - return result; -} - - - -bool SND_CDObject::DisposeSystem() -{ - bool result = false; - - if (m_instance) - { - delete m_instance; - m_instance = NULL; - result = true; - } - - return result; -} - - - -SND_CDObject* SND_CDObject::Instance() -{ - return m_instance; -} - - - -SND_CDObject::SND_CDObject() -{ - m_gain = 1; - m_playmode = SND_CD_ALL; - m_track = 1; - m_playstate = SND_STOPPED; - m_used = false; - - // don't set the cd standard on modified: - // if not used, we don't wanna touch it (performance) - m_modified = false; -} - - - -SND_CDObject::~SND_CDObject() -{ -} - - - -void SND_CDObject::SetGain(MT_Scalar gain) -{ - m_gain = gain; - m_modified = true; -} - - - -void SND_CDObject::SetPlaymode(int playmode) -{ - m_playmode = playmode; -} - - - -void SND_CDObject::SetPlaystate(int playstate) -{ - m_playstate = playstate; -} - - - -void SND_CDObject::SetTrack(int track) -{ - m_track = track; -} - - - -int SND_CDObject::GetTrack() const -{ - return m_track; -} - - - -MT_Scalar SND_CDObject::GetGain() const -{ - return m_gain; -} - - -int SND_CDObject::GetPlaystate() const -{ - return m_playstate; -} - - - -bool SND_CDObject::IsModified() const -{ - return m_modified; -} - - - -void SND_CDObject::SetModified(bool modified) -{ - m_modified = modified; -} - - - -int SND_CDObject::GetPlaymode() const -{ - return m_playmode; -} - - - -void SND_CDObject::SetUsed() -{ - m_used = true; -} - - - -bool SND_CDObject::GetUsed() -{ - return m_used; -} - diff --git a/intern/SoundSystem/intern/SND_DeviceManager.cpp b/intern/SoundSystem/intern/SND_DeviceManager.cpp deleted file mode 100644 index 215c0f5b6fa..00000000000 --- a/intern/SoundSystem/intern/SND_DeviceManager.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * SND_DeviceManager.h - * - * singleton for creating, switching and deleting audiodevices - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "SND_DeviceManager.h" -#include "SND_DependKludge.h" -#include "SND_DummyDevice.h" -#ifdef USE_FMOD -#include "SND_FmodDevice.h" -#endif -#ifdef USE_OPENAL -#include "SND_OpenALDevice.h" -#endif - -SND_IAudioDevice* SND_DeviceManager::m_instance = NULL; -int SND_DeviceManager::m_subscriptions = 0; - -#ifdef USE_OPENAL -int SND_DeviceManager::m_device_type = snd_e_openaldevice; -#else -# ifdef USE_FMOD -int SND_DeviceManager::m_device_type = snd_e_fmoddevice; -# else -int SND_DeviceManager::m_device_type = snd_e_dummydevice; -# endif -#endif - -void SND_DeviceManager::Subscribe() -{ - ++m_subscriptions; -} - - - -void SND_DeviceManager::Unsubscribe() -{ - --m_subscriptions; - - // only release memory if there is a m_instance but no subscriptions left - if (m_subscriptions == 0 && m_instance) - { - delete m_instance; - m_instance = NULL; - } - - if (m_subscriptions < 0) - m_subscriptions = 0; -} - - - -SND_IAudioDevice* SND_DeviceManager::Instance() -{ - // only give away an instance if there are subscriptions - if (m_subscriptions) - { - // if there's no instance yet, set and create a new one - if (m_instance == NULL) - { - SetDeviceType(m_device_type); - } - - return m_instance; - } - else - { - return NULL; - } -} - - - -void SND_DeviceManager::SetDeviceType(int device_type) -{ - // if we want to change devicetype, first delete the old one - if (m_instance) - { - delete m_instance; - m_instance = NULL; - } - - // let's create the chosen device - switch (device_type) - { -#ifdef USE_FMOD - case snd_e_fmoddevice: - { - m_instance = new SND_FmodDevice(); - m_device_type = device_type; - break; - } -#endif -#ifdef USE_OPENAL - case snd_e_openaldevice: - { - m_instance = new SND_OpenALDevice(); - m_device_type = device_type; - break; - } -#endif - default: - { - m_instance = new SND_DummyDevice(); - m_device_type = device_type; - break; - } - } -} diff --git a/intern/SoundSystem/intern/SND_IdObject.cpp b/intern/SoundSystem/intern/SND_IdObject.cpp deleted file mode 100644 index b261442db0a..00000000000 --- a/intern/SoundSystem/intern/SND_IdObject.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * SND_IdObject.cpp - * - * Object for storing runtime data, like id's, soundobjects etc - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_IdObject.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -SND_IdObject::SND_IdObject() -{ -} - - - -SND_IdObject::~SND_IdObject() -{ -} - - - -SND_SoundObject* SND_IdObject::GetSoundObject() -{ - return m_soundObject; -} - - - -void SND_IdObject::SetSoundObject(SND_SoundObject* pObject) -{ - m_soundObject = pObject; -} - - - -int SND_IdObject::GetId() -{ - return m_id; -} - - - -void SND_IdObject::SetId(int id) -{ - m_id = id; -} diff --git a/intern/SoundSystem/intern/SND_IdObject.h b/intern/SoundSystem/intern/SND_IdObject.h deleted file mode 100644 index 86611b026f0..00000000000 --- a/intern/SoundSystem/intern/SND_IdObject.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * SND_IdObject.h - * - * Object for storing runtime data, like id's, soundobjects etc - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __SND_IDOBJECT_H -#define __SND_IDOBJECT_H - -#include "SND_SoundObject.h" -#include "GEN_List.h" -#include "SoundDefines.h" - -class SND_IdObject : public GEN_Link -{ - SND_SoundObject* m_soundObject; - int m_id; - -public: - SND_IdObject(); - virtual ~SND_IdObject(); - - SND_SoundObject* GetSoundObject(); - void SetSoundObject(SND_SoundObject* pObject); - - int GetId(); - void SetId(int id); -}; - -#endif //__SND_OBJECT_H - diff --git a/intern/SoundSystem/intern/SND_Scene.cpp b/intern/SoundSystem/intern/SND_Scene.cpp deleted file mode 100644 index 9d050a81161..00000000000 --- a/intern/SoundSystem/intern/SND_Scene.cpp +++ /dev/null @@ -1,567 +0,0 @@ -/* -* SND_Scene.cpp -* -* The scene for sounds. -* -* $Id$ -* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#pragma warning (disable:4786) // Get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#include "SND_Scene.h" -#include "SND_DependKludge.h" -#include "SND_IAudioDevice.h" - -#include -#include - -//static unsigned int tijd = 0; - -SND_Scene::SND_Scene(SND_IAudioDevice* audiodevice) - : m_audiodevice(audiodevice) -{ - if (m_audiodevice) - m_wavecache = m_audiodevice->GetWaveCache(); - - if (!m_wavecache || !audiodevice) - { - m_audio = false; - } - else - { - //if so, go ahead! - m_audio = true; -#ifdef ONTKEVER - printf("SND_Scene::SND_Scene() m_audio == true\n"); -#endif - m_audiodevice->InitListener(); - } - - IsPlaybackWanted(); -} - - - -SND_Scene::~SND_Scene() -{ - StopAllObjects(); -} - - - -// check if audioplayback is wanted -bool SND_Scene::IsPlaybackWanted() -{ - /* Removed the functionality for checking if noaudio was provided on */ - /* the commandline. */ - if (m_audiodevice && m_wavecache) - { - m_audioplayback = true; - } - else - { - StopAllObjects(); - m_audioplayback = false; - } - - return m_audioplayback; -} - - - -int SND_Scene::LoadSample(const STR_String& samplename, - void* memlocation, - int size) -{ - int result = -1; - - if (m_audiodevice) - { - SND_WaveSlot* waveslot = m_audiodevice->LoadSample(samplename, memlocation, size); - - if (waveslot) - result = waveslot->GetBuffer(); - } - - return result; -} - - - -void SND_Scene::RemoveAllSamples() -{ - if (m_audio && m_audiodevice) - m_audiodevice->RemoveAllSamples(); -} - - - -bool SND_Scene::CheckBuffer(SND_SoundObject* pObject) -{ - bool result = false; - - if (pObject && m_wavecache) - { - SND_WaveSlot* waveslot = m_wavecache->GetWaveSlot(pObject->GetSampleName()); - - if (waveslot) - { - pObject->SetBuffer(waveslot->GetBuffer()); - - result = true; - } - } - - return result; -} - - - -bool SND_Scene::IsSampleLoaded(STR_String& samplename) -{ - bool result = false; - - if (samplename && m_wavecache) - { - SND_WaveSlot* waveslot = m_wavecache->GetWaveSlot(samplename); - - if (waveslot && waveslot->IsLoaded()) - result = true; - } - - return result; -} - - - -void SND_Scene::AddObject(SND_SoundObject* pObject) -{ - if (m_audio) - { - STR_String samplename = pObject->GetSampleName(); - SND_WaveSlot* slot = NULL; - - // don't add the object if no valid sample is referenced - if (samplename != "") - { - // check if the sample is already loaded - slot = m_wavecache->GetWaveSlot(samplename); - } - - if (slot) - { - pObject->SetBuffer(slot->GetBuffer()); - - // needed for expected lifespan of the sample, but ain't necesary anymore i think - MT_Scalar samplelength = slot->GetNumberOfSamples(); - MT_Scalar samplerate = slot->GetSampleRate(); - MT_Scalar soundlength = samplelength/samplerate; - pObject->SetLength(soundlength); - - // add the object to the list - m_soundobjects.insert((SND_SoundObject*)pObject); - } - } -} - - - -void SND_Scene::SetListenerTransform(const MT_Vector3& pos, - const MT_Vector3& vel, - const MT_Matrix3x3& ori) -{ - if (m_audio) - { - GetListener()->SetPosition(pos); - GetListener()->SetVelocity(vel); - GetListener()->SetOrientation(ori); - } -} - - - -void SND_Scene::UpdateListener() -{ - // process the listener if modified - if (m_listener.IsModified()) - { - m_audiodevice->SetListenerGain(m_listener.GetGain()); - - // fmod doesn't support dopplervelocity, so just use the dopplerfactor instead -#ifdef USE_FMOD - m_audiodevice->SetDopplerFactor(m_listener.GetDopplerVelocity()); -#else - m_audiodevice->SetDopplerVelocity(m_listener.GetDopplerVelocity()); - m_audiodevice->SetDopplerFactor(m_listener.GetDopplerFactor()); -#endif - m_listener.SetModified(false); - } -} - - - -void SND_Scene::AddActiveObject(SND_SoundObject* pObject, MT_Scalar curtime) -{ - if (m_audio) - { - if (pObject) - { -#ifdef ONTKEVER - printf("SND_Scene::AddActiveObject\n"); -#endif - - // first check if the object is already on the list - if (pObject->IsActive()) - { - pObject->SetTimeStamp(curtime); - pObject->StartSound(); - } - else - { - pObject->SetTimeStamp(curtime); - - // compute the expected lifespan - pObject->SetLifeSpan(); - - // lets give the new active-to-be object an id - if (m_audiodevice->GetNewId(pObject)) - { - // and add the object - m_activeobjects.addTail(pObject); - pObject->StartSound(); - pObject->SetActive(true); - } - } - } - } -} - - - -void SND_Scene::RemoveActiveObject(SND_SoundObject* pObject) -{ - if (m_audio) - { - if (pObject) - { -#ifdef ONTKEVER - printf("SND_Scene::RemoveActiveObject\n"); -#endif - // if inactive, remove it from the list - if (pObject->IsActive()) - { - // first make sure it is stopped - m_audiodevice->ClearId(pObject); - } - } - } -} - - - -void SND_Scene::UpdateActiveObects() -{ -// ++tijd; - - SND_SoundObject* pObject; - // update only the objects that need to be updated - for (pObject = (SND_SoundObject*)m_activeobjects.getHead(); - !pObject->isTail(); - pObject = (SND_SoundObject*)pObject->getNext()) - { - int id = pObject->GetId(); - - if (id >= 0) - { -#ifdef USE_FMOD - // fmod wants these set before playing the sample - if (pObject->IsModified()) - { - m_audiodevice->SetObjectLoop(id, pObject->GetLoopMode()); - m_audiodevice->SetObjectLoopPoints(id, pObject->GetLoopStart(), pObject->GetLoopEnd()); - } - - // ok, properties Set. now see if it must play - if (pObject->GetPlaystate() == SND_MUST_PLAY) - { - m_audiodevice->PlayObject(id); - pObject->SetPlaystate(SND_PLAYING); - pObject->InitRunning(); -// printf("start play: %d\n", tijd); - } -#endif - if (pObject->Is3D()) - { - // Get the global positions and velocity vectors - // of the listener and soundobject - MT_Vector3 op = pObject->GetPosition(); - MT_Vector3 lp = m_listener.GetPosition(); - MT_Vector3 position = op - lp; - - // Calculate relative velocity in global coordinates - // of the sound with respect to the listener. - MT_Vector3 ov = pObject->GetVelocity(); - MT_Vector3 lv = m_listener.GetVelocity(); - MT_Vector3 velocity = ov - lv; - - // Now map the object position and velocity into - // the local coordinates of the listener. - MT_Matrix3x3 lo = m_listener.GetOrientation(); - - MT_Vector3 local_sound_pos = position * lo; - MT_Vector3 local_sound_vel = velocity * lo; - - m_audiodevice->SetObjectTransform( - id, - local_sound_pos, - local_sound_vel, - pObject->GetOrientation(), // make relative to listener! - lp, - pObject->GetRollOffFactor()); - } - else - { - m_audiodevice->ObjectIs2D(id); - } - - // update the situation - if (pObject->IsModified()) - { - m_audiodevice->SetObjectPitch(id, pObject->GetPitch()); - m_audiodevice->SetObjectGain(id, pObject->GetGain()); - m_audiodevice->SetObjectMinGain(id, pObject->GetMinGain()); - m_audiodevice->SetObjectMaxGain(id, pObject->GetMaxGain()); - m_audiodevice->SetObjectReferenceDistance(id, pObject->GetReferenceDistance()); - m_audiodevice->SetObjectRollOffFactor(id, pObject->GetRollOffFactor()); - m_audiodevice->SetObjectLoop(id, pObject->GetLoopMode()); - m_audiodevice->SetObjectLoopPoints(id, pObject->GetLoopStart(), pObject->GetLoopEnd()); - pObject->SetModified(false); - } - - pObject->AddRunning(); - -#ifdef ONTKEVER - STR_String naam = pObject->GetObjectName(); - STR_String sample = pObject->GetSampleName(); - - int id = pObject->GetId(); - int buffer = pObject->GetBuffer(); - - float gain = pObject->GetGain(); - float pitch = pObject->GetPitch(); - float timestamp = pObject->GetTimestamp(); - - printf("naam: %s, sample: %s \n", naam.Ptr(), sample.Ptr()); - printf("id: %d, buffer: %d \n", id, buffer); - printf("gain: %f, pitch: %f, ts: %f \n\n", gain, pitch, timestamp); -#endif -#ifdef USE_OPENAL - // ok, properties Set. now see if it must play - switch (pObject->GetPlaystate()){ - case SND_MUST_PLAY: - m_audiodevice->PlayObject(id); - pObject->SetPlaystate(SND_PLAYING); - break; - case SND_MUST_STOP: - RemoveActiveObject(pObject); - break; - case SND_MUST_PAUSE: - m_audiodevice->PauseObject(id); - pObject->SetPlaystate(SND_PAUSED); - break; - } -#endif - - // check to see if the sound is still playing - // if not: release its id - int playstate = m_audiodevice->GetPlayState(id); -#ifdef ONTKEVER - if (playstate != 2) - printf("%d - ",playstate); -#endif - - if ((playstate == SND_STOPPED) && !pObject->GetLoopMode()) - { - RemoveActiveObject(pObject); - } - } - } -} - - - -void SND_Scene::UpdateCD() -{ - if (m_audiodevice) - { - SND_CDObject* pCD = SND_CDObject::Instance(); - - if (pCD) - { - int playstate = pCD->GetPlaystate(); - - switch (playstate) - { - case SND_MUST_PLAY: - { - // initialize the cd only when you need it - m_audiodevice->SetCDGain(pCD->GetGain()); - m_audiodevice->SetCDPlaymode(pCD->GetPlaymode()); - m_audiodevice->PlayCD(pCD->GetTrack()); - pCD->SetPlaystate(SND_PLAYING); - pCD->SetUsed(); - break; - } - case SND_MUST_PAUSE: - { - m_audiodevice->PauseCD(true); - pCD->SetPlaystate(SND_PAUSED); - break; - } - case SND_MUST_RESUME: - { - m_audiodevice->PauseCD(false); - pCD->SetPlaystate(SND_PLAYING); - break; - } - case SND_MUST_STOP: - { - m_audiodevice->StopCD(); - pCD->SetPlaystate(SND_STOPPED); - break; - } - default: - { - } - } - - // this one is only for realtime modifying settings - if (pCD->IsModified()) - { - m_audiodevice->SetCDGain(pCD->GetGain()); - pCD->SetModified(false); - } - } - } -} - - - -void SND_Scene::Proceed() -{ - if (m_audio && m_audioplayback) - { - m_audiodevice->MakeCurrent(); - - UpdateListener(); - UpdateActiveObects(); - UpdateCD(); - -// m_audiodevice->UpdateDevice(); - } -} - - -void SND_Scene::DeleteObject(SND_SoundObject* pObject) -{ -#ifdef ONTKEVER - printf("SND_Scene::DeleteObject\n"); -#endif - - if (pObject) - { - if (m_audiodevice) - m_audiodevice->ClearId(pObject); - - // must remove object from m_activeList - std::set::iterator set_it; - set_it = m_soundobjects.find(pObject); - - if (set_it != m_soundobjects.end()) - m_soundobjects.erase(set_it); - - // release the memory - delete pObject; - pObject = NULL; - } -} - - - -void SND_Scene::RemoveAllObjects() -{ -#ifdef ONTKEVER - printf("SND_Scene::RemoveAllObjects\n"); -#endif - - StopAllObjects(); - - std::set::iterator it = m_soundobjects.begin(); - - while (it != m_soundobjects.end()) - { - delete (*it); - it++; - } - - m_soundobjects.clear(); -} - - - -void SND_Scene::StopAllObjects() -{ - if (m_audio) - { -#ifdef ONTKEVER - printf("SND_Scene::StopAllObjects\n"); -#endif - - SND_SoundObject* pObject; - - for (pObject = (SND_SoundObject*)m_activeobjects.getHead(); - !pObject->isTail(); - pObject = (SND_SoundObject*)pObject->getNext()) - { - m_audiodevice->ClearId(pObject); - } - } -} - - - -SND_SoundListener* SND_Scene::GetListener() -{ - return &m_listener; -} diff --git a/intern/SoundSystem/intern/SND_SoundListener.cpp b/intern/SoundSystem/intern/SND_SoundListener.cpp deleted file mode 100644 index 26163e87765..00000000000 --- a/intern/SoundSystem/intern/SND_SoundListener.cpp +++ /dev/null @@ -1,185 +0,0 @@ -/* - * SND_SoundListener.cpp - * - * A SoundListener is for sound what a camera is for vision. - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_SoundListener.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -SND_SoundListener::SND_SoundListener() -{ - m_modified = true; - m_gain = 1.0; - m_dopplerfactor = 1.0; - m_dopplervelocity = 1.0; - m_scale = 1.0; - m_position[0] = 0.0; - m_position[1] = 0.0; - m_position[2] = 0.0; - m_velocity[0] = 0.0; - m_velocity[1] = 0.0; - m_velocity[2] = 0.0; - m_orientation[0][0] = 1.0; - m_orientation[0][1] = 0.0; - m_orientation[0][2] = 0.0; - m_orientation[1][0] = 0.0; - m_orientation[1][1] = 1.0; - m_orientation[1][2] = 0.0; - m_orientation[2][0] = 0.0; - m_orientation[2][1] = 0.0; - m_orientation[2][2] = 1.0; -} - - -SND_SoundListener::~SND_SoundListener() -{ - ; /* intentionally empty */ - -} - - - -void SND_SoundListener::SetGain(MT_Scalar gain) -{ - m_gain = gain; - m_modified = true; -} - - - -void SND_SoundListener::SetPosition (const MT_Vector3& pos) -{ - m_position = pos; -} - - - -void SND_SoundListener::SetVelocity(const MT_Vector3& vel) -{ - m_velocity = vel; -} - - - -void SND_SoundListener::SetOrientation(const MT_Matrix3x3& ori) -{ - m_orientation = ori; -} - - - -void SND_SoundListener::SetDopplerFactor(MT_Scalar dopplerfactor) -{ - m_dopplerfactor = dopplerfactor; - m_modified = true; -} - - - -void SND_SoundListener::SetDopplerVelocity(MT_Scalar dopplervelocity) -{ - m_dopplervelocity = dopplervelocity; - m_modified = true; -} - - - -void SND_SoundListener::SetScale(MT_Scalar scale) -{ - m_scale = scale; - m_modified = true; -} - - - -MT_Scalar SND_SoundListener::GetGain() const -{ - return m_gain; -} - - - -MT_Vector3 SND_SoundListener::GetPosition() const -{ - return m_position; -} - - - -MT_Vector3 SND_SoundListener::GetVelocity() const -{ - return m_velocity; -} - - - -MT_Matrix3x3 SND_SoundListener::GetOrientation() -{ - return m_orientation; -} - - - -MT_Scalar SND_SoundListener::GetDopplerFactor() const -{ - return m_dopplerfactor; -} - - - -MT_Scalar SND_SoundListener::GetDopplerVelocity() const -{ - return m_dopplervelocity; -} - - - -MT_Scalar SND_SoundListener::GetScale() const -{ - return m_scale; -} - - - -bool SND_SoundListener::IsModified() const -{ - return m_modified; -} - - - -void SND_SoundListener::SetModified(bool modified) -{ - m_modified = modified; -} diff --git a/intern/SoundSystem/intern/SND_SoundObject.cpp b/intern/SoundSystem/intern/SND_SoundObject.cpp deleted file mode 100644 index 7a244b5090d..00000000000 --- a/intern/SoundSystem/intern/SND_SoundObject.cpp +++ /dev/null @@ -1,508 +0,0 @@ -/* - * SND_SoundObject.cpp - * - * Implementation of the abstract sound object - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_SoundObject.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -SND_SoundObject::SND_SoundObject()// : m_modified(true) -{ - m_samplename = ""; - m_length = 0; - m_buffer = 0; - - m_gain = 0.0; - m_pitch = 1.0; - - m_mingain = 0.0; - m_maxgain = 1.0; - m_rollofffactor = 1.0; - m_referencedistance = 1.0; - - m_position[0] = 0.0; - m_position[1] = 0.0; - m_position[2] = 0.0; - m_velocity[0] = 0.0; - m_velocity[1] = 0.0; - m_velocity[2] = 0.0; - m_orientation[0][0] = 1.0; - m_orientation[0][1] = 0.0; - m_orientation[0][2] = 0.0; - m_orientation[1][0] = 0.0; - m_orientation[1][1] = 1.0; - m_orientation[1][2] = 0.0; - m_orientation[2][0] = 0.0; - m_orientation[2][1] = 0.0; - m_orientation[2][2] = 1.0; - - m_loopstart = 0; - m_loopend = 0; - m_loopmode = SND_LOOP_NORMAL; - m_is3d = true; - m_playstate = SND_INITIAL; - m_active = false; - m_id = -1; - m_lifespan = 0; - m_timestamp = 0; - m_modified = true; - m_running = 0; - m_highpriority = false; -} - - - -SND_SoundObject::~SND_SoundObject() -{ -} - - - -void SND_SoundObject::StartSound() -{ - if (m_id >= 0) - m_playstate = SND_MUST_PLAY; -} - - - -void SND_SoundObject::StopSound() -{ - if (m_id >= 0) - m_playstate = SND_MUST_STOP; -} - - - -void SND_SoundObject::PauseSound() -{ - if (m_id >= 0) - m_playstate = SND_MUST_PAUSE; -} - - - -void SND_SoundObject::DeleteWhenFinished() -{ - m_playstate = SND_MUST_BE_DELETED; -} - - - -void SND_SoundObject::SetGain(MT_Scalar gain) -{ - m_gain = gain; - m_modified = true; -} - - - -void SND_SoundObject::SetMinGain(MT_Scalar mingain) -{ - m_mingain = mingain; - m_modified = true; -} - - - -void SND_SoundObject::SetMaxGain(MT_Scalar maxgain) -{ - m_maxgain = maxgain; - m_modified = true; -} - - - -void SND_SoundObject::SetRollOffFactor(MT_Scalar rollofffactor) -{ - m_rollofffactor = rollofffactor; - m_modified = true; -} - - - -void SND_SoundObject::SetReferenceDistance(MT_Scalar referencedistance) -{ - m_referencedistance = referencedistance; - m_modified = true; -} - - - -void SND_SoundObject::SetPitch(MT_Scalar pitch) -{ - m_pitch = pitch; - m_modified = true; -} - - - -void SND_SoundObject::SetLoopMode(unsigned int loopmode) -{ - m_loopmode = loopmode; - m_modified = true; -} - - - -void SND_SoundObject::SetLoopStart(unsigned int loopstart) -{ - m_loopstart = loopstart; - m_modified = true; -} - - - -void SND_SoundObject::SetLoopEnd(unsigned int loopend) -{ - m_loopend = loopend; - m_modified = true; -} - - - -void SND_SoundObject::Set3D(bool threedee) -{ - m_is3d = threedee; -} - - - -void SND_SoundObject::SetLifeSpan() -{ - m_lifespan = m_length / m_pitch; -} - - - -bool SND_SoundObject::IsLifeSpanOver(MT_Scalar curtime) const -{ - bool result = false; - - if ((curtime - m_timestamp) > m_lifespan) - result = true; - - return result; -} - - - -void SND_SoundObject::SetActive(bool active) -{ - m_active = active; - - if (!active) - { - m_playstate = SND_STOPPED; - (this)->remove(); - } -} - - - -void SND_SoundObject::SetBuffer(unsigned int buffer) -{ - m_buffer = buffer; -} - - - -void SND_SoundObject::SetObjectName(STR_String objectname) -{ - m_objectname = objectname; -} - - - -void SND_SoundObject::SetSampleName(STR_String samplename) -{ - m_samplename = samplename; -} - - - -void SND_SoundObject::SetLength(MT_Scalar length) -{ - m_length = length; -} - - - -void SND_SoundObject::SetPosition(const MT_Vector3& pos) -{ - m_position = pos; -} - - - -void SND_SoundObject::SetVelocity(const MT_Vector3& vel) -{ - m_velocity = vel; -} - - - -void SND_SoundObject::SetOrientation(const MT_Matrix3x3& orient) -{ - m_orientation = orient; -} - - - -void SND_SoundObject::SetPlaystate(int playstate) -{ - m_playstate = playstate; -} - - - -void SND_SoundObject::SetId(int id) -{ - m_id = id; -} - - - -void SND_SoundObject::SetTimeStamp(MT_Scalar timestamp) -{ - m_timestamp = timestamp; -} - - - -void SND_SoundObject::SetHighPriority(bool priority) -{ - m_highpriority = priority; -} - - - -bool SND_SoundObject::IsHighPriority() const -{ - return m_highpriority; -} - - - -bool SND_SoundObject::IsActive()const -{ - return m_active; -} - - - -int SND_SoundObject::GetId()const -{ - return m_id; -} - - - -MT_Scalar SND_SoundObject::GetLifeSpan()const -{ - return m_lifespan; -} - - - -MT_Scalar SND_SoundObject::GetTimestamp()const -{ - return m_timestamp; -} - - - -unsigned int SND_SoundObject::GetBuffer() -{ - return m_buffer; -} - - - -const STR_String& SND_SoundObject::GetSampleName() -{ - return m_samplename; -} - - - -const STR_String& SND_SoundObject::GetObjectName() -{ - return m_objectname; -} - - - -MT_Scalar SND_SoundObject::GetLength() const -{ - return m_length; -} - - - -MT_Scalar SND_SoundObject::GetGain() const -{ - return m_gain; -} - - - -MT_Scalar SND_SoundObject::GetPitch() const -{ - return m_pitch; -} - - - -MT_Scalar SND_SoundObject::GetMinGain() const -{ - return m_mingain; -} - - - -MT_Scalar SND_SoundObject::GetMaxGain() const -{ - return m_maxgain; -} - - - -MT_Scalar SND_SoundObject::GetRollOffFactor() const -{ - return m_rollofffactor; -} - - - -MT_Scalar SND_SoundObject::GetReferenceDistance() const -{ - return m_referencedistance; -} - - - -MT_Vector3 SND_SoundObject::GetPosition() const -{ - return m_position; -} - - - -MT_Vector3 SND_SoundObject::GetVelocity() const -{ - return m_velocity; -} - - - -MT_Matrix3x3 SND_SoundObject::GetOrientation() const -{ - return m_orientation; -} - - - -unsigned int SND_SoundObject::GetLoopMode() const -{ - return m_loopmode; -} - - - -unsigned int SND_SoundObject::GetLoopStart() const -{ - return m_loopstart; -} - - - -unsigned int SND_SoundObject::GetLoopEnd() const -{ - return m_loopend; -} - - - -bool SND_SoundObject::Is3D() const -{ - return m_is3d; -} - - - -int SND_SoundObject::GetPlaystate() const -{ - return m_playstate; -} - - - -bool SND_SoundObject::IsModified() const -{ - return m_modified; -} - - - -void SND_SoundObject::SetModified(bool modified) -{ - m_modified = modified; -} - - - -void SND_SoundObject::InitRunning() -{ - m_running = 0; -} - - - -bool SND_SoundObject::IsRunning() const -{ - bool result = false; - - if (m_running > 100) - result = true; - - return result; -} - - - -void SND_SoundObject::AddRunning() -{ - ++m_running; -} diff --git a/intern/SoundSystem/intern/SND_Utils.cpp b/intern/SoundSystem/intern/SND_Utils.cpp deleted file mode 100644 index 78115807970..00000000000 --- a/intern/SoundSystem/intern/SND_Utils.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/* - * SND_Utils.cpp - * - * Util functions for soundthingies - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_Utils.h" -#include "SoundDefines.h" -#include "SND_DependKludge.h" -#include -#include -#include -#include -#include - -#if defined(WIN32) -#include -#else -#include -#endif - -#define BUFFERSIZE 32 - - -/***************************************************************************** - * Begin of temporary Endian stuff. - * I think there should be a central place to handle endian conversion but for - * the time being it suffices. Note that the defines come from the Blender - * source. - *****************************************************************************/ -typedef enum -{ - SND_endianBig = 0, - SND_endianLittle -} SND_TEndian; - -#if defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) -const SND_TEndian SND_fEndian = SND_endianBig; -#else -const SND_TEndian SND_fEndian = SND_endianLittle; -#endif - -/* This one swaps the bytes in a short */ -#define SWITCH_SHORT(a) { \ - char s_i, *p_i; \ - p_i= (char *)&(a); \ - s_i=p_i[0]; \ - p_i[0] = p_i[1]; \ - p_i[1] = s_i; } - -/* This one rotates the bytes in an int */ -#define SWITCH_INT(a) { \ - char s_i, *p_i; \ - p_i= (char *)&(a); \ - s_i=p_i[0]; p_i[0]=p_i[3]; p_i[3]=s_i; \ - s_i=p_i[1]; p_i[1]=p_i[2]; p_i[2]=s_i; } -/***************************************************************************** - * End of temporary Endian stuff. - *****************************************************************************/ - - -/* loads a file */ -void* SND_LoadSample(char *filename) -{ - int file, filelen, buffersize = BUFFERSIZE; - void* data = NULL; - -#if defined(WIN32) - file = open(filename, O_BINARY|O_RDONLY); -#else - file = open(filename, 0|O_RDONLY); -#endif - - if (file == -1) - { - //printf("can't open file.\n"); - //printf("press q for quit.\n"); - } - else - { - filelen = lseek(file, 0, SEEK_END); - lseek(file, 0, SEEK_SET); - - if (filelen != 0) - { - data = malloc(buffersize); - - if (read(file, data, buffersize) != buffersize) - { - free(data); - data = NULL; - } - } - close(file); - - } - return (data); -} - - - -bool SND_IsSampleValid(const STR_String& name, void* memlocation) -{ - bool result = false; - bool loadedsample = false; - char buffer[BUFFERSIZE]; - - if (!memlocation) - { - STR_String samplename = name; - memlocation = SND_LoadSample(samplename.Ptr()); - - if (memlocation) - loadedsample = true; - } - - if (memlocation) - { - memcpy(&buffer, memlocation, BUFFERSIZE); - - if(!(memcmp(buffer, "RIFF", 4) && memcmp(&(buffer[8]), "WAVEfmt ", 8))) - { - /* This was endian unsafe. See top of the file for the define. */ - short shortbuf = *((short *) &buffer[20]); - if (SND_fEndian == SND_endianBig) SWITCH_SHORT(shortbuf); - - if (shortbuf == SND_WAVE_FORMAT_PCM) - result = true; - - /* only fmod supports compressed wav */ -#ifdef USE_FMOD - switch (shortbuf) - { - case SND_WAVE_FORMAT_ADPCM: - case SND_WAVE_FORMAT_ALAW: - case SND_WAVE_FORMAT_MULAW: - case SND_WAVE_FORMAT_DIALOGIC_OKI_ADPCM: - case SND_WAVE_FORMAT_CONTROL_RES_VQLPC: - case SND_WAVE_FORMAT_GSM_610: - case SND_WAVE_FORMAT_MPEG3: - result = true; - break; - default: - { - break; - } - } -#endif - } -#ifdef USE_FMOD - /* only valid publishers may use ogg vorbis */ - else if (!memcmp(buffer, "OggS", 4)) - { - result = true; - } - /* only valid publishers may use mp3 */ - else if (((!memcmp(buffer, "ID3", 3)) || (!memcmp(buffer, "ÿû", 2)))) - { - result = true; - } -#endif - } - if (loadedsample) - { - free(memlocation); - memlocation = NULL; - } - - return result; -} - - - -/* checks if the passed pointer is a valid sample */ -static bool CheckSample(void* sample) -{ - bool valid = false; - char buffer[32]; - - memcpy(buffer, sample, 16); - - if(!(memcmp(buffer, "RIFF", 4) && memcmp(&(buffer[8]), "WAVEfmt ", 8))) - { - valid = true; - } - - return valid; -} - - - -/* gets the type of the sample (0 == unknown, 1 == PCM etc */ -unsigned int SND_GetSampleFormat(void* sample) -{ - short sampletype = 0; - - if (CheckSample(sample)) - { - memcpy(&sampletype, ((char*)sample) + 20, 2); - } - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) SWITCH_SHORT(sampletype); - - return (unsigned int)sampletype; -} - - - -/* gets the number of channels in a sample */ -unsigned int SND_GetNumberOfChannels(void* sample) -{ - short numberofchannels = 0; - - if (CheckSample(sample)) - { - memcpy(&numberofchannels, ((char*)sample) + 22, 2); - } - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) SWITCH_SHORT(numberofchannels); - - return (unsigned int)numberofchannels; -} - - - -/* gets the samplerate of a sample */ -unsigned int SND_GetSampleRate(void* sample) -{ - unsigned int samplerate = 0; - - if (CheckSample(sample)) - { - memcpy(&samplerate, ((char*)sample) + 24, 4); - } - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) SWITCH_INT(samplerate); - - return samplerate; -} - - - -/* gets the bitrate of a sample */ -unsigned int SND_GetBitRate(void* sample) -{ - short bitrate = 0; - - if (CheckSample(sample)) - { - memcpy(&bitrate, ((char*)sample) + 34, 2); - } - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) SWITCH_SHORT(bitrate); - - return (unsigned int)bitrate; -} - - - -/* gets the length of the actual sample data (without the header) */ -unsigned int SND_GetNumberOfSamples(void* sample, int sample_length) -{ - unsigned int chunklength, length = 0, offset; - unsigned short block_align; - if (CheckSample(sample)) - { - memcpy(&chunklength, ((char*)sample) + 16, 4); - memcpy(&block_align, ((char*)sample) + 32, 2); /* always 2 or 4 it seems */ - - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) - { - SWITCH_INT(chunklength); - SWITCH_SHORT(block_align); - } - - offset = 16 + chunklength + 4; - - /* This seems very unsafe, what if data is never found (f.i. corrupt file)... */ - // lets find "data" - while (memcmp(((char*)sample) + offset, "data", 4)) - { - offset += block_align; - - if (offset+block_align > sample_length) /* save us from crashing */ - return 0; - } - offset += 4; - memcpy(&length, ((char*)sample) + offset, 4); - - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) SWITCH_INT(length); - } - - return length; -} - - - -/* gets the size of the entire header (file - sampledata) */ -unsigned int SND_GetHeaderSize(void* sample, int sample_length) -{ - unsigned int chunklength, headersize = 0, offset = 16; - unsigned short block_align; - if (CheckSample(sample)) - { - memcpy(&chunklength, ((char*)sample) + offset, 4); - memcpy(&block_align, ((char*)sample) + 32, 2); /* always 2 or 4 it seems */ - - /* This was endian unsafe. See top of the file for the define. */ - if (SND_fEndian == SND_endianBig) - { - SWITCH_INT(chunklength); - SWITCH_SHORT(block_align); - } - offset = offset + chunklength + 4; - - // lets find "data" - while (memcmp(((char*)sample) + offset, "data", 4)) - { - offset += block_align; - - if (offset+block_align > sample_length) /* save us from crashing */ - return 0; - } - headersize = offset + 8; - } - - return headersize; -} - - -unsigned int SND_GetExtraChunk(void* sample) -{ - unsigned int extrachunk = 0, chunklength, offset = 16; - char data[4]; - - if (CheckSample(sample)) - { - memcpy(&chunklength, ((char*)sample) + offset, 4); - offset = offset + chunklength + 4; - memcpy(data, ((char*)sample) + offset, 4); - - // lets find "cue" - while (memcmp(data, "cue", 3)) - { - offset += 4; - memcpy(data, ((char*)sample) + offset, 4); - } - } - - return extrachunk; -} - - - -void SND_GetSampleInfo(signed char* sample, SND_WaveSlot* waveslot) -{ - WavFileHeader fileheader; - WavFmtHeader fmtheader; - WavFmtExHeader fmtexheader; - WavSampleHeader sampleheader; - WavChunkHeader chunkheader; - - if (CheckSample(sample)) - { - memcpy(&fileheader, sample, sizeof(WavFileHeader)); - fileheader.size = SND_GetHeaderSize(sample, waveslot->GetFileSize()); - if (fileheader.size) { /* this may fail for corrupt files */ - sample += sizeof(WavFileHeader); - fileheader.size = ((fileheader.size+1) & ~1) - 4; - - while ((fileheader.size > 0) && (memcpy(&chunkheader, sample, sizeof(WavChunkHeader)))) - { - sample += sizeof(WavChunkHeader); - if (!memcmp(chunkheader.id, "fmt ", 4)) - { - memcpy(&fmtheader, sample, sizeof(WavFmtHeader)); - waveslot->SetSampleFormat(fmtheader.format); - - if (fmtheader.format == 0x0001) - { - waveslot->SetNumberOfChannels(fmtheader.numberofchannels); - waveslot->SetBitRate(fmtheader.bitrate); - waveslot->SetSampleRate(fmtheader.samplerate); - sample += chunkheader.size; - } - else - { - memcpy(&fmtexheader, sample, sizeof(WavFmtExHeader)); - sample += chunkheader.size; - } - } - else if (!memcmp(chunkheader.id, "data", 4)) - { - if (fmtheader.format == 0x0001) - { - waveslot->SetNumberOfSamples(chunkheader.size); - sample += chunkheader.size; - } - else if (fmtheader.format == 0x0011) - { - //IMA ADPCM - } - else if (fmtheader.format == 0x0055) - { - //MP3 WAVE - } - } - else if (!memcmp(chunkheader.id, "smpl", 4)) - { - memcpy(&sampleheader, sample, sizeof(WavSampleHeader)); - //loop = sampleheader.loops; - sample += chunkheader.size; - } - else - sample += chunkheader.size; - - sample += chunkheader.size & 1; - fileheader.size -= (((chunkheader.size + 1) & ~1) + 8); - } - } - } -} diff --git a/intern/SoundSystem/intern/SND_WaveCache.cpp b/intern/SoundSystem/intern/SND_WaveCache.cpp deleted file mode 100644 index a678bd554bb..00000000000 --- a/intern/SoundSystem/intern/SND_WaveCache.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * SND_WaveCache.cpp - * - * abstract wavecache, a way to organize samples - * - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#pragma warning (disable:4786) // Get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#include "SND_WaveCache.h" -#include - -#ifdef __APPLE__ -# include -#else -# ifdef __FreeBSD__ -# include -# else -# include -# endif -#endif - -SND_WaveCache::SND_WaveCache() -{ - // do the buffer administration - for (int i = 0; i < NUM_BUFFERS; i++) - m_bufferList[i] = NULL; -} - - - -SND_WaveCache::~SND_WaveCache() -{ - // clean up the mess - FreeSamples(); - RemoveAllSamples(); -} - - - -SND_WaveSlot* SND_WaveCache::GetWaveSlot(const STR_String& samplename) -{ - SND_WaveSlot* waveslot = NULL; - - std::map::iterator find_result = m_samplecache.find(samplename); - - // let's see if we have already loaded this sample - if (find_result != m_samplecache.end()) - { - waveslot = (*find_result).second; - } - else - { - // so the sample wasn't loaded, so do it here - for (int bufnum = 0; bufnum < NUM_BUFFERS; bufnum++) - { - // find an empty buffer - if (m_bufferList[bufnum] == NULL) - { - waveslot = new SND_WaveSlot(); - waveslot->SetSampleName(samplename); - waveslot->SetBuffer(bufnum); - m_bufferList[bufnum] = waveslot; - break; - } - } - m_samplecache.insert(std::pair(samplename, waveslot)); - } - - return waveslot; -} - - - -void SND_WaveCache::RemoveAllSamples() -{ - // remove all samples - m_samplecache.clear(); - - // reset the list of buffers - for (int i = 0; i < NUM_BUFFERS; i++) - m_bufferList[i] = NULL; -} - - - -void SND_WaveCache::RemoveSample(const STR_String& samplename, int buffer) -{ - m_samplecache.erase(samplename); - m_bufferList[buffer] = NULL; -} - - - -void SND_WaveCache::FreeSamples() -{ - // iterate through the bufferlist and delete the waveslot if present - for (int i = 0; i < NUM_BUFFERS; i++) - { - if (m_bufferList[i]) - { - delete m_bufferList[i]; - m_bufferList[i] = NULL; - } - } -} diff --git a/intern/SoundSystem/intern/SND_WaveSlot.cpp b/intern/SoundSystem/intern/SND_WaveSlot.cpp deleted file mode 100644 index 43b2bb55892..00000000000 --- a/intern/SoundSystem/intern/SND_WaveSlot.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include "SND_WaveSlot.h" - -#ifdef HAVE_CONFIG_H -#include -#endif - -SND_WaveSlot::~SND_WaveSlot() -{ -#ifdef ONTKEVER - printf("neeeeeee...\n"); -#endif -} - - - -void SND_WaveSlot::SetSampleName(STR_String samplename) -{ - m_samplename = samplename; -} - - - -void SND_WaveSlot::SetLoaded(bool loaded) -{ - m_loaded = loaded; -} - - - -void SND_WaveSlot::SetData(void* data) -{ - m_data = data; -} - - - -void SND_WaveSlot::SetBuffer(unsigned int buffer) -{ - m_buffer = buffer; -} - - - -void SND_WaveSlot::SetSampleFormat(unsigned int sampleformat) -{ - m_sampleformat = sampleformat; -} - - - -void SND_WaveSlot::SetNumberOfChannels(unsigned int numberofchannels) -{ - m_numberofchannels = numberofchannels; -} - - - -void SND_WaveSlot::SetSampleRate(unsigned int samplerate) -{ - m_samplerate = samplerate; -} - - - -void SND_WaveSlot::SetBitRate(unsigned int bitrate) -{ - m_bitrate = bitrate; -} - - - -void SND_WaveSlot::SetNumberOfSamples(unsigned int numberofsamples) -{ - m_numberofsamples = numberofsamples; -} - - - -void SND_WaveSlot::SetFileSize(unsigned int filesize) -{ - m_filesize = filesize; -} - - - -const STR_String& SND_WaveSlot::GetSampleName() -{ - return m_samplename; -} - - - -bool SND_WaveSlot::IsLoaded() const -{ - return m_loaded; -} - - - -void* SND_WaveSlot::GetData() -{ - return m_data; -} - - - -unsigned int SND_WaveSlot::GetBuffer() const -{ - return m_buffer; -} - - - -unsigned int SND_WaveSlot::GetSampleFormat() const -{ - return m_sampleformat; -} - - - -unsigned int SND_WaveSlot::GetNumberOfChannels() const -{ - return m_numberofchannels; -} - - - -unsigned int SND_WaveSlot::GetSampleRate() const -{ - return m_samplerate; -} - - - -unsigned int SND_WaveSlot::GetBitRate() const -{ - return m_bitrate; -} - - - -unsigned int SND_WaveSlot::GetNumberOfSamples() const -{ - return m_numberofsamples; -} - - - -unsigned int SND_WaveSlot::GetFileSize() const -{ - return m_filesize; -} diff --git a/intern/SoundSystem/make/msvc_6_0/SoundSystem.dsp b/intern/SoundSystem/make/msvc_6_0/SoundSystem.dsp deleted file mode 100644 index c7ce7aa7a70..00000000000 --- a/intern/SoundSystem/make/msvc_6_0/SoundSystem.dsp +++ /dev/null @@ -1,206 +0,0 @@ -# Microsoft Developer Studio Project File - Name="SoundSystem" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SoundSystem - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SoundSystem.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SoundSystem.mak" CFG="SoundSystem - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SoundSystem - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SoundSystem - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SoundSystem - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\soundsystem" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\soundsystem" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../../../../lib/windows/string/include" /I "../../../../../lib/windows/moto/include" /I "../../dummy" /I "../../openal" /I "..\..\..\string" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\soundsystem\libSoundSystem.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\SoundSystem\include\*.h ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\soundsystem\*.lib ..\..\..\..\..\lib\windows\SoundSystem\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "SoundSystem - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SoundSystem___Win32_Debug" -# PROP BASE Intermediate_Dir "SoundSystem___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\soundsystem\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\soundsystem\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../" /I "../../../../../lib/windows/string/include" /I "../../../../../lib/windows/moto/include" /I "../../dummy" /I "../../openal" /I "..\..\..\string" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\soundsystem\debug\libSoundSystem.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\SoundSystem\include\*.h ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\soundsystem\debug\*.lib ..\..\..\..\..\lib\windows\SoundSystem\lib\debug\*.a ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "SoundSystem - Win32 Release" -# Name "SoundSystem - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\SND_AudioDevice.cpp -# End Source File -# Begin Source File - -SOURCE="..\..\intern\SND_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_CDObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_DeviceManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_IdObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_Scene.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_SoundListener.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_SoundObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_Utils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_WaveCache.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_WaveSlot.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\intern\SND_AudioDevice.h -# End Source File -# Begin Source File - -SOURCE="..\..\SND_C-api.h" -# End Source File -# Begin Source File - -SOURCE=..\..\SND_CDObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_DependKludge.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_DeviceManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_IAudioDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\SND_IdObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_Object.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_Scene.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_SoundListener.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_SoundObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_Utils.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_WaveCache.h -# End Source File -# Begin Source File - -SOURCE=..\..\SND_WaveSlot.h -# End Source File -# Begin Source File - -SOURCE=..\..\SoundDefines.h -# End Source File -# End Group -# End Target -# End Project diff --git a/intern/SoundSystem/make/msvc_6_0/dummy/DummySoundSystem.dsp b/intern/SoundSystem/make/msvc_6_0/dummy/DummySoundSystem.dsp deleted file mode 100644 index 4a27fdfa6e3..00000000000 --- a/intern/SoundSystem/make/msvc_6_0/dummy/DummySoundSystem.dsp +++ /dev/null @@ -1,103 +0,0 @@ -# Microsoft Developer Studio Project File - Name="DummySoundSystem" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=DummySoundSystem - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "DummySoundSystem.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "DummySoundSystem.mak" CFG="DummySoundSystem - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "DummySoundSystem - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "DummySoundSystem - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "DummySoundSystem - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\dummy" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\dummy" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\intern" /I "..\..\..\..\SoundSystem" /I "..\..\..\..\moto\include" /I "..\..\..\..\string" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\intern\soundsystem\dummy\libDummySoundSystem.lib" - -!ELSEIF "$(CFG)" == "DummySoundSystem - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\dummy\debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\dummy\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\intern" /I "..\..\..\..\SoundSystem" /I "..\..\..\..\moto\include" /I "..\..\..\..\string" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\intern\soundsystem\dummy\debug\libDummySoundSystem.lib" - -!ENDIF - -# Begin Target - -# Name "DummySoundSystem - Win32 Release" -# Name "DummySoundSystem - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\dummy\SND_DummyDevice.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\dummy\SND_DummyDevice.h -# End Source File -# End Group -# End Target -# End Project diff --git a/intern/SoundSystem/make/msvc_6_0/openal/OpenALSoundSystem.dsp b/intern/SoundSystem/make/msvc_6_0/openal/OpenALSoundSystem.dsp deleted file mode 100644 index 67a6bd0bb5a..00000000000 --- a/intern/SoundSystem/make/msvc_6_0/openal/OpenALSoundSystem.dsp +++ /dev/null @@ -1,106 +0,0 @@ -# Microsoft Developer Studio Project File - Name="OpenALSoundSystem" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=OpenALSoundSystem - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "OpenALSoundSystem.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "OpenALSoundSystem.mak" CFG="OpenALSoundSystem - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "OpenALSoundSystem - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "OpenALSoundSystem - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "OpenALSoundSystem - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\openal" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\openal" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\intern" /I "..\..\..\..\SoundSystem" /I "..\..\..\..\SoundSystem\sdl" /I "..\..\..\..\moto\include" /I "..\..\..\..\string" /I "..\..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\..\lib\windows\sdl\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\intern\soundsystem\openal\libOpenALSoundSystem.lib" - -!ELSEIF "$(CFG)" == "OpenALSoundSystem - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "OpenALSoundSystem___Win32_Debug" -# PROP BASE Intermediate_Dir "OpenALSoundSystem___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\openal\debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\intern\soundsystem\openal\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\intern" /I "..\..\..\..\SoundSystem" /I "..\..\..\..\SoundSystem\sdl" /I "..\..\..\..\moto\include" /I "..\..\..\..\string" /I "..\..\..\..\..\..\lib\windows\sdl\include" /I "..\..\..\..\..\..\lib\windows\openal\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\intern\soundsystem\openal\debug\libOpenALSoundSystem.lib" - -!ENDIF - -# Begin Target - -# Name "OpenALSoundSystem - Win32 Release" -# Name "OpenALSoundSystem - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\openal\SND_OpenALDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\sdl\SND_SDLCDDevice.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\openal\SND_OpenALDevice.h -# End Source File -# End Group -# End Target -# End Project diff --git a/intern/SoundSystem/make/msvc_7_0/SoundSystem.vcproj b/intern/SoundSystem/make/msvc_7_0/SoundSystem.vcproj deleted file mode 100644 index f0952c582b7..00000000000 --- a/intern/SoundSystem/make/msvc_7_0/SoundSystem.vcproj +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/intern/SoundSystem/make/msvc_7_0/dummy/DummySoundSystem.vcproj b/intern/SoundSystem/make/msvc_7_0/dummy/DummySoundSystem.vcproj deleted file mode 100644 index 103b589e732..00000000000 --- a/intern/SoundSystem/make/msvc_7_0/dummy/DummySoundSystem.vcproj +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/intern/SoundSystem/make/msvc_7_0/openal/OpenALSoundSystem.vcproj b/intern/SoundSystem/make/msvc_7_0/openal/OpenALSoundSystem.vcproj deleted file mode 100644 index 8ce971ac1aa..00000000000 --- a/intern/SoundSystem/make/msvc_7_0/openal/OpenALSoundSystem.vcproj +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/intern/SoundSystem/openal/Makefile b/intern/SoundSystem/openal/Makefile deleted file mode 100644 index b28ab628d4c..00000000000 --- a/intern/SoundSystem/openal/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = OpenALSoundSystem -DIR = $(OCGDIR)/intern/$(LIBNAME) - -include nan_compile.mk - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I$(NAN_OPENAL)/include -CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_MOTO)/include -CPPFLAGS += -I../intern -CPPFLAGS += -I.. -CPPFLAGS += -I. -CPPFLAGS += -I../sdl diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp deleted file mode 100644 index c660e9aecba..00000000000 --- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp +++ /dev/null @@ -1,800 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * SND_OpenALDevice derived from SND_IAudioDevice - */ - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#include "SND_OpenALDevice.h" -#ifndef __APPLE__ -#include "SND_SDLCDDevice.h" -#endif -#include "SoundDefines.h" - -#include "SND_Utils.h" - -#ifdef APPLE_FRAMEWORK_FIX -#include -#include -#include -#else -#include -#include -#include -#endif - -#include -#include -#if defined(WIN32) -#include -#else -#include -#endif -#include - -#include - -/* untill openal gets unified we need this hack for non-windows systems */ -#if !defined(WIN32) && !defined(ALC_MAJOR_VERSION) - -#include - -ALvoid alutLoadWAVMemory(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop); -ALvoid alutUnloadWAV(ALenum format,ALvoid *data,ALsizei size,ALsizei freq); - -typedef struct /* WAV File-header */ -{ - ALubyte Id[4]; - ALsizei Size; - ALubyte Type[4]; -} WAVFileHdr_Struct; - -typedef struct /* WAV Fmt-header */ -{ - ALushort Format; - ALushort Channels; - ALuint SamplesPerSec; - ALuint BytesPerSec; - ALushort BlockAlign; - ALushort BitsPerSample; -} WAVFmtHdr_Struct; - -typedef struct /* WAV FmtEx-header */ -{ - ALushort Size; - ALushort SamplesPerBlock; -} WAVFmtExHdr_Struct; - -typedef struct /* WAV Smpl-header */ -{ - ALuint Manufacturer; - ALuint Product; - ALuint SamplePeriod; - ALuint Note; - ALuint FineTune; - ALuint SMPTEFormat; - ALuint SMPTEOffest; - ALuint Loops; - ALuint SamplerData; - struct - { - ALuint Identifier; - ALuint Type; - ALuint Start; - ALuint End; - ALuint Fraction; - ALuint Count; - } Loop[1]; -} WAVSmplHdr_Struct; - -typedef struct /* WAV Chunk-header */ -{ - ALubyte Id[4]; - ALuint Size; -} WAVChunkHdr_Struct; - -ALvoid alutLoadWAVMemory(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei *size,ALsizei *freq,ALboolean *loop) -{ - WAVChunkHdr_Struct ChunkHdr; - WAVFmtExHdr_Struct FmtExHdr; - WAVFileHdr_Struct FileHdr; - WAVSmplHdr_Struct SmplHdr; - WAVFmtHdr_Struct FmtHdr; - ALbyte *Stream; - - *format=AL_FORMAT_MONO16; - *data=NULL; - *size=0; - *freq=22050; - *loop=AL_FALSE; - if (memory) - { - Stream=memory; - if (Stream) - { - memcpy(&FileHdr,Stream,sizeof(WAVFileHdr_Struct)); - Stream+=sizeof(WAVFileHdr_Struct); - FileHdr.Size=((FileHdr.Size+1)&~1)-4; - while ((FileHdr.Size!=0)&&(memcpy(&ChunkHdr,Stream,sizeof(WAVChunkHdr_Struct)))) - { - Stream+=sizeof(WAVChunkHdr_Struct); - if (!memcmp(ChunkHdr.Id,"fmt ",4)) - { - memcpy(&FmtHdr,Stream,sizeof(WAVFmtHdr_Struct)); - if (FmtHdr.Format==0x0001) - { - *format=(FmtHdr.Channels==1? - (FmtHdr.BitsPerSample==8?AL_FORMAT_MONO8:AL_FORMAT_MONO16): - (FmtHdr.BitsPerSample==8?AL_FORMAT_STEREO8:AL_FORMAT_STEREO16)); - *freq=FmtHdr.SamplesPerSec; - Stream+=ChunkHdr.Size; - } - else - { - memcpy(&FmtExHdr,Stream,sizeof(WAVFmtExHdr_Struct)); - Stream+=ChunkHdr.Size; - } - } - else if (!memcmp(ChunkHdr.Id,"data",4)) - { - if (FmtHdr.Format==0x0001) - { - *size=ChunkHdr.Size; - *data=malloc(ChunkHdr.Size+31); - if (*data) memcpy(*data,Stream,ChunkHdr.Size); - memset(((char *)*data)+ChunkHdr.Size,0,31); - Stream+=ChunkHdr.Size; - } - else if (FmtHdr.Format==0x0011) - { - //IMA ADPCM - } - else if (FmtHdr.Format==0x0055) - { - //MP3 WAVE - } - } - else if (!memcmp(ChunkHdr.Id,"smpl",4)) - { - memcpy(&SmplHdr,Stream,sizeof(WAVSmplHdr_Struct)); - *loop = (SmplHdr.Loops ? AL_TRUE : AL_FALSE); - Stream+=ChunkHdr.Size; - } - else Stream+=ChunkHdr.Size; - Stream+=ChunkHdr.Size&1; - FileHdr.Size-=(((ChunkHdr.Size+1)&~1)+8); - } - } - } -} - -ALvoid alutUnloadWAV(ALenum format,ALvoid *data,ALsizei size,ALsizei freq) -{ - if (data) - free(data); -} - -#endif /* WIN32 */ - -#ifdef __APPLE__ -#define OUDE_OPENAL 1 -#endif - - -SND_OpenALDevice::SND_OpenALDevice() - : SND_AudioDevice(), - m_context(NULL), - m_device(NULL) -{ - /* Removed the functionality for checking if noaudio was provided on */ - /* the commandline. */ - m_audio = true; - m_context = NULL; - m_buffersinitialized = false; - m_sourcesinitialized = false; - - // let's check if we can get openal to initialize... - if (m_audio) - { -#ifdef OUDE_OPENAL - m_audio = true; // openal_2.12 - alutInit(NULL, NULL); // openal_2.12 -#else - m_audio = false; - - ALCdevice *dev = alcOpenDevice(NULL); - if (dev) { - m_context = alcCreateContext(dev, NULL); - - if (m_context) { -#ifdef AL_VERSION_1_1 - alcMakeContextCurrent((ALCcontext*)m_context); -#else - alcMakeContextCurrent(m_context); -#endif - m_audio = true; - m_device = dev; -#ifdef __linux__ - /* - * SIGHUP Hack: - * - * On Linux, alcDestroyContext generates a SIGHUP (Hangup) when killing the OpenAL - * mixer thread, which kills Blender. - * - * So we set the signal to ignore.... - * - * TODO: check if this applies to other platforms. - * - */ - signal(SIGHUP, SIG_IGN); -#endif - } - } - -#endif - } - - // then try to generate some buffers - if (m_audio) - { - // let openal generate its buffers - alGenBuffers(NUM_BUFFERS, m_buffers); - m_buffersinitialized = true; - - for (int i = 0; i < NUM_BUFFERS; i++) - { - if (!alIsBuffer(m_buffers[i])) - { - //printf("\n\n WARNING: OpenAL returned with an error. Continuing without audio.\n\n"); - m_audio = false; - break; - } - } - } - - // next: the sources - if (m_audio) - { -#ifdef OUDE_OPENAL - ALenum alc_error = ALC_NO_ERROR; // openal_2.12 -#elif defined(_WIN32) - // alcGetError has no arguments on windows - ALenum alc_error = alcGetError(); // openal_2.14+ -#else - ALenum alc_error = alcGetError(NULL); // openal_2.14+ -#endif - - // let openal generate its sources - if (alc_error == ALC_NO_ERROR) - { - int i; - - for (i=0;iStopCD(); - SND_CDObject::DisposeSystem(); - } -#ifndef __APPLE__ - if (m_cdrom) - delete m_cdrom; -#endif -#ifdef OUDE_OPENAL - if (m_audio) - alutExit(); -#else - if (m_device) - alcCloseDevice((ALCdevice*) m_device); -#endif -} - - - -SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name, - void* memlocation, - int size) -{ - SND_WaveSlot* waveslot = NULL; - STR_String samplename = name; - - if (m_audio) - { - /* create the waveslot */ - waveslot = m_wavecache->GetWaveSlot(samplename); - - /* do we support this sample? */ - if (SND_IsSampleValid(name, memlocation)) - { - if (waveslot) - { - int buffer = waveslot->GetBuffer(); - void* data = NULL; -#ifndef __APPLE__ - char loop = 'a'; -#endif - int sampleformat, bitrate, numberofchannels; - ALenum al_error = alGetError(); - -#ifdef OUDE_OPENAL - ALsizei samplerate, numberofsamples; // openal_2.12 -#else - int samplerate, numberofsamples; // openal_2.14+ -#endif - - /* Give them some safe defaults just incase */ - bitrate = numberofchannels = 0; - - /* load the sample from memory? */ - if (size && memlocation) - { - waveslot->SetFileSize(size); - - /* what was (our) buffer? */ - int buffer = waveslot->GetBuffer(); - - /* get some info out of the sample */ - SND_GetSampleInfo((signed char*)memlocation, waveslot); - numberofchannels = SND_GetNumberOfChannels(memlocation); - bitrate = SND_GetBitRate(memlocation); - - /* load the sample into openal */ -#if defined(OUDE_OPENAL) || defined (__APPLE__) - alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12 -#else -#ifdef AL_VERSION_1_1 - alutLoadWAVMemory((ALbyte*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ -#else - alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ - -#endif -#endif - /* put it in the buffer */ - alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate); - } - /* or from file? */ - else - { -#ifdef __APPLE__ - alutLoadWAVFile((ALbyte *)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate); -#else - alutLoadWAVFile((ALbyte *)samplename.Ptr(), &sampleformat, &data, &numberofsamples, &samplerate, &loop); -#endif - /* put it in the buffer */ - alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate); - } - - /* fill the waveslot with info */ - al_error = alGetError(); - if (al_error == AL_NO_ERROR && m_buffers[buffer]) - { - waveslot->SetData(data); - waveslot->SetSampleFormat(sampleformat); - waveslot->SetNumberOfChannels(numberofchannels); - waveslot->SetSampleRate(samplerate); - waveslot->SetBitRate(bitrate); - waveslot->SetNumberOfSamples(numberofsamples); - - /* if the loading succeeded, mark the waveslot */ - waveslot->SetLoaded(true); - } - else - { - /* or when it failed, free the waveslot */ - m_wavecache->RemoveSample(waveslot->GetSampleName(), waveslot->GetBuffer()); - waveslot = NULL; - } - - /* and free the original stuff (copy was made in openal) */ - alutUnloadWAV(sampleformat, data, numberofsamples, samplerate); - } - } - else - { - /* sample not supported, remove waveslot */ - m_wavecache->RemoveSample(waveslot->GetSampleName(), waveslot->GetBuffer()); - waveslot = NULL; - } - } - return waveslot; -} - - - -// listener's and general stuff ////////////////////////////////////////////////////// - - - -/* sets the global dopplervelocity */ -void SND_OpenALDevice::SetDopplerVelocity(MT_Scalar dopplervelocity) const -{ - alDopplerVelocity ((float)dopplervelocity); -} - - - -/* sets the global dopplerfactor */ -void SND_OpenALDevice::SetDopplerFactor(MT_Scalar dopplerfactor) const -{ - alDopplerFactor ((float)dopplerfactor); -} - - - -/* sets the global rolloff factor */ -void SND_OpenALDevice::SetListenerRollOffFactor(MT_Scalar rollofffactor) const -{ - // not implemented in openal -} - - - -void SND_OpenALDevice::NextFrame() const -{ - // CD -#ifndef __APPLE__ - m_cdrom->NextFrame(); -#endif - // not needed by openal -} - - - -// set the gain for the listener -void SND_OpenALDevice::SetListenerGain(float gain) const -{ - alListenerf (AL_GAIN, gain); -} - - - -void SND_OpenALDevice::InitListener() -{ - // initialize the listener with these values that won't change - // (as long as we can have only one listener) - // now we can superimpose all listeners on each other (for they - // have the same settings) - float lispos[3] = {0,0,0}; - float lisvel[3] = {0,0,0}; -#ifdef WIN32 - float lisori[6] = {0,1,0,0,0,1}; -#else - float lisori[6] = {0,0,1,0,-1,0}; -#endif - - alListenerfv(AL_POSITION, lispos); - alListenerfv(AL_VELOCITY, lisvel); - alListenerfv(AL_ORIENTATION, lisori); -} - - - -// source playstate stuff //////////////////////////////////////////////////////////// - - - -/* sets the buffer */ -void SND_OpenALDevice::SetObjectBuffer(int id, unsigned int buffer) -{ - alSourcei (m_sources[id], AL_BUFFER, m_buffers[buffer]); -} - - - -// check if the sound's still playing -int SND_OpenALDevice::GetPlayState(int id) -{ - int alstate = 0; - int result = 0; - -#ifdef __APPLE__ - alGetSourcei(m_sources[id], AL_SOURCE_STATE, &alstate); -#else - alGetSourceiv(m_sources[id], AL_SOURCE_STATE, &alstate); -#endif - - switch(alstate) - { - case AL_INITIAL: - { - result = SND_INITIAL; - break; - } - case AL_PLAYING: - { - result = SND_PLAYING; - break; - } - case AL_PAUSED: - { - result = SND_PAUSED; - break; - } - case AL_STOPPED: - { - result = SND_STOPPED; - break; - } - default: - result = SND_UNKNOWN; - } - - return result; -} - - - -// make the source play -void SND_OpenALDevice::PlayObject(int id) -{ - alSourcePlay(m_sources[id]); -} - - - -// make the source stop -void SND_OpenALDevice::StopObject(int id) const -{ - float obpos[3] = {0,0,0}; - float obvel[3] = {0,0,0}; - - alSourcefv(m_sources[id], AL_POSITION, obpos); - alSourcefv(m_sources[id], AL_VELOCITY, obvel); - - alSourcef(m_sources[id], AL_GAIN, 1.0); - alSourcef(m_sources[id], AL_PITCH, 1.0); - alSourcei(m_sources[id], AL_LOOPING, AL_FALSE); - alSourceStop(m_sources[id]); -} - - - -// stop all sources -void SND_OpenALDevice::StopAllObjects() -{ - alSourceStopv(NUM_SOURCES, m_sources); -} - - - -// pause the source -void SND_OpenALDevice::PauseObject(int id) const -{ - alSourcePause(m_sources[id]); -} - - - -// source properties stuff //////////////////////////////////////////////////////////// - - - -// give openal the object's pitch -void SND_OpenALDevice::SetObjectPitch(int id, MT_Scalar pitch) const -{ - alSourcef (m_sources[id], AL_PITCH, (float)pitch); -} - - - -// give openal the object's gain -void SND_OpenALDevice::SetObjectGain(int id, MT_Scalar gain) const -{ - alSourcef (m_sources[id], AL_GAIN, (float)gain); -} - - - -// give openal the object's looping -void SND_OpenALDevice::SetObjectLoop(int id, unsigned int loopmode) const -{ - if (loopmode == SND_LOOP_OFF) - { - //printf("%d - ", id); - alSourcei (m_sources[id], AL_LOOPING, AL_FALSE); - } - else - alSourcei (m_sources[id], AL_LOOPING, AL_TRUE); -} - -void SND_OpenALDevice::SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const -{ - - -} - - -void SND_OpenALDevice::SetObjectMinGain(int id, MT_Scalar mingain) const -{ - alSourcef (m_sources[id], AL_MIN_GAIN, (float)mingain); -} - - - -void SND_OpenALDevice::SetObjectMaxGain(int id, MT_Scalar maxgain) const -{ - alSourcef (m_sources[id], AL_MAX_GAIN, (float)maxgain); -} - - - -void SND_OpenALDevice::SetObjectRollOffFactor(int id, MT_Scalar rollofffactor) const -{ - alSourcef (m_sources[id], AL_ROLLOFF_FACTOR, (float)rollofffactor); -} - - - -void SND_OpenALDevice::SetObjectReferenceDistance(int id, MT_Scalar referencedistance) const -{ - alSourcef (m_sources[id], AL_REFERENCE_DISTANCE, (float)referencedistance); -} - - - -// give openal the object's position -void SND_OpenALDevice::ObjectIs2D(int id) const -{ - float obpos[3] = {0,0,0}; - float obvel[3] = {0,0,0}; - - alSourcefv(m_sources[id], AL_POSITION, obpos); - alSourcefv(m_sources[id], AL_VELOCITY, obvel); -} - - - -void SND_OpenALDevice::SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const -{ - float obpos[3]; - float obvel[3]; - - obpos[0] = (float)position[0] * (float)rollofffactor; //x (l/r) - obpos[1] = (float)position[1] * (float)rollofffactor; - obpos[2] = (float)position[2] * (float)rollofffactor; - - alSourcefv(m_sources[id], AL_POSITION, obpos); - - velocity.getValue(obvel); - alSourcefv(m_sources[id], AL_VELOCITY, obvel); -} - -void SND_OpenALDevice::PlayCD(int track) const -{ -#ifndef __APPLE__ - m_cdrom->PlayCD(track); -#endif -} - - -void SND_OpenALDevice::PauseCD(bool pause) const -{ -#ifndef __APPLE__ - m_cdrom->PauseCD(pause); -#endif -} - -void SND_OpenALDevice::StopCD() const -{ -#ifndef __APPLE__ - SND_CDObject* pCD = SND_CDObject::Instance(); - - if (pCD && pCD->GetUsed()) - { - m_cdrom->StopCD(); - } -#endif -} - -void SND_OpenALDevice::SetCDPlaymode(int playmode) const -{ -#ifndef __APPLE__ - m_cdrom->SetCDPlaymode(playmode); -#endif -} - -void SND_OpenALDevice::SetCDGain(MT_Scalar gain) const -{ -#ifndef __APPLE__ - m_cdrom->SetCDGain(gain); -#endif -} diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.h b/intern/SoundSystem/openal/SND_OpenALDevice.h deleted file mode 100644 index b8c64762a56..00000000000 --- a/intern/SoundSystem/openal/SND_OpenALDevice.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_OPENALDEVICE -#define SND_OPENALDEVICE - -#include "SND_AudioDevice.h" -#include "SoundDefines.h" - -typedef struct SDL_CD; - -class SND_OpenALDevice : public SND_AudioDevice -{ -public: - SND_OpenALDevice(); - virtual ~SND_OpenALDevice(); - - SND_WaveSlot* LoadSample(const STR_String& samplename, - void* memlocation, - int size); - - void InitListener(); - void SetListenerGain(float gain) const; - void SetDopplerVelocity(MT_Scalar dopplervelocity) const; - void SetDopplerFactor(MT_Scalar dopplerfactor) const; - void SetListenerRollOffFactor(MT_Scalar rollofffactor) const; - - void MakeCurrent() const; - - void NextFrame() const; - void UseCD() const; - - void SetObjectBuffer(int id, unsigned int buffer); - - int GetPlayState(int id); - void PlayObject(int id); - void StopObject(int id) const; - void StopAllObjects(); - void PauseObject(int id) const; - - void SetObjectLoop(int id, unsigned int loopmode) const; - void SetObjectLoopPoints(int id, unsigned int loopstart, unsigned int loopend) const; - void SetObjectPitch(int id, MT_Scalar pitch) const; - void SetObjectGain(int id, MT_Scalar gain) const; - void SetObjectMinGain(int id, MT_Scalar mingain) const; - void SetObjectMaxGain(int id, MT_Scalar maxgain) const; - void SetObjectRollOffFactor(int id, MT_Scalar rolloff) const; - void SetObjectReferenceDistance(int id, MT_Scalar distance) const; - - void SetObjectTransform(int id, - const MT_Vector3& position, - const MT_Vector3& velocity, - const MT_Matrix3x3& orientation, - const MT_Vector3& lisposition, - const MT_Scalar& rollofffactor) const; - void ObjectIs2D(int id) const; - - void PlayCD(int track) const; - void PauseCD(bool pause) const; - void StopCD() const; - void SetCDPlaymode(int playmode) const; - void SetCDGain(MT_Scalar gain) const; - - void StartUsingDSP() {}; - float* GetSpectrum() { return NULL; } - void StopUsingDSP() {}; - -private: - void* m_context; - void* m_device; - - unsigned int m_buffers[NUM_BUFFERS]; - unsigned int m_sources[NUM_SOURCES]; - bool m_buffersinitialized; - bool m_sourcesinitialized; -#ifndef __APPLE__ - class SND_SDLCDDevice* m_cdrom; -#endif -}; - -#endif //SND_OPENALDEVICE - diff --git a/intern/SoundSystem/openal/pthread_cancel.cpp b/intern/SoundSystem/openal/pthread_cancel.cpp deleted file mode 100644 index bb36d1dd136..00000000000 --- a/intern/SoundSystem/openal/pthread_cancel.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * FreeBSD 3.4 does not yet have pthread_cancel (3.5 and above do) - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef __FreeBSD__ - -#include - -#if (__FreeBSD_version < 350000) -#include - -#define FD_READ 0x1 -#define _FD_LOCK(_fd,_type,_ts) _thread_fd_lock(_fd, _type, _ts) -#define _FD_UNLOCK(_fd,_type) _thread_fd_unlock(_fd, _type) - -int pthread_cancel(pthread_t pthread) { - pthread_exit(NULL); - return 0; -} - -long fpathconf(int fd, int name) -{ - long ret; - - if ((ret = _FD_LOCK(fd, FD_READ, NULL)) == 0) { - ret = _thread_sys_fpathconf(fd, name); - _FD_UNLOCK(fd, FD_READ); - } - return ret; -} - -#endif - -int pthread_atfork(void *a, void *b, void *c) { - return 0; -} - -#endif diff --git a/intern/SoundSystem/sdl/Makefile b/intern/SoundSystem/sdl/Makefile deleted file mode 100644 index 669d7110797..00000000000 --- a/intern/SoundSystem/sdl/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = SDLSoundSystem -DIR = $(OCGDIR)/intern/$(LIBNAME) - -include nan_compile.mk - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += $(NAN_SDLCFLAGS) -CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_MOTO)/include -CPPFLAGS += -I../intern -CPPFLAGS += -I.. -CPPFLAGS += -I. diff --git a/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp b/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp deleted file mode 100644 index b1bac964c61..00000000000 --- a/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - * SND_SDLCDDevice - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - -#include "MT_Scalar.h" - -#include "SND_SDLCDDevice.h" -#include "SoundDefines.h" - -#ifndef DISABLE_SDL -#include -#endif - -SND_SDLCDDevice::SND_SDLCDDevice() : - m_cdrom(NULL), - m_cdplaying(false), - m_cdtrack(0), - m_cdplaymode(SND_CD_TRACK), - m_frame(0) -{ - init(); -} - -void SND_SDLCDDevice::init() -{ -#ifdef DISABLE_SDL - fprintf(stderr, "Blender compiled without SDL, no CDROM support\n"); - return; -#else - if (SDL_InitSubSystem(SDL_INIT_CDROM)) - { - fprintf(stderr, "Error initializing CDROM\n"); - return; - } - - /* Check for CD drives */ - if(!SDL_CDNumDrives()) - { - /* None found */ - fprintf(stderr, "No CDROM devices available\n"); - return; - } - - /* Open the default drive */ - m_cdrom = SDL_CDOpen(0); - - /* Did if open? Check if cdrom is NULL */ - if(!m_cdrom) - { - fprintf(stderr, "Couldn't open drive: %s\n", SDL_GetError()); - return; - } -#endif -} - -SND_SDLCDDevice::~SND_SDLCDDevice() -{ -#ifndef DISABLE_SDL - StopCD(); - SDL_CDClose(m_cdrom); -#endif -} - -void SND_SDLCDDevice::NextFrame() -{ -#ifndef DISABLE_SDL - m_frame++; - m_frame &= 127; - - if (!m_frame && m_cdrom && m_cdplaying && SDL_CDStatus(m_cdrom) == CD_STOPPED) - { - switch (m_cdplaymode) - { - case SND_CD_ALL: - if (m_cdtrack < m_cdrom->numtracks) - PlayCD(m_cdtrack + 1); - else - m_cdplaying = false; - break; - default: - case SND_CD_TRACK: - m_cdplaying = false; - break; - case SND_CD_TRACKLOOP: - PlayCD(m_cdtrack); - break; - } - - } -#endif -} - -void SND_SDLCDDevice::PlayCD(int track) -{ -#ifndef DISABLE_SDL - if ( m_cdrom && CD_INDRIVE(SDL_CDStatus(m_cdrom)) ) { - SDL_CDPlayTracks(m_cdrom, track-1, 0, track, 0); - m_cdplaying = true; - m_cdtrack = track; - } -#endif -} - - -void SND_SDLCDDevice::PauseCD(bool pause) -{ -#ifndef DISABLE_SDL - if (!m_cdrom) - return; - - if (pause) - SDL_CDPause(m_cdrom); - else - SDL_CDResume(m_cdrom); -#endif -} - -void SND_SDLCDDevice::StopCD() -{ -#ifndef DISABLE_SDL - if (m_cdrom) - SDL_CDStop(m_cdrom); - m_cdplaying = false; -#endif -} - -void SND_SDLCDDevice::SetCDPlaymode(int playmode) -{ - m_cdplaymode = playmode; -} - -void SND_SDLCDDevice::SetCDGain(MT_Scalar gain) -{ - -} diff --git a/intern/SoundSystem/sdl/SND_SDLCDDevice.h b/intern/SoundSystem/sdl/SND_SDLCDDevice.h deleted file mode 100644 index 15cb1975d74..00000000000 --- a/intern/SoundSystem/sdl/SND_SDLCDDevice.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef SND_SDLCDDEVICE -#define SND_SDLCDDEVICE - -typedef struct SDL_CD; - -class SND_SDLCDDevice -{ -public: - SND_SDLCDDevice(); - ~SND_SDLCDDevice(); - - void NextFrame(); - - void PlayCD(int track); - void PauseCD(bool pause); - void StopCD(); - void SetCDPlaymode(int playmode); - void SetCDGain(MT_Scalar gain); - -private: - void init(); - /* CD Audio */ - SDL_CD* m_cdrom; - bool m_cdplaying; - int m_cdtrack; - unsigned char m_cdplaymode; - unsigned char m_frame; -}; - -#endif diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt new file mode 100644 index 00000000000..587ef30979b --- /dev/null +++ b/intern/audaspace/CMakeLists.txt @@ -0,0 +1,64 @@ +# $Id$ +# ***** BEGIN LGPL LICENSE BLOCK ***** +# +# Copyright 2009 Jörg Hermann Müller +# +# This file is part of AudaSpace. +# +# AudaSpace is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# AudaSpace is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with AudaSpace. If not, see . +# +# ***** END LGPL LICENSE BLOCK ***** + +SET(INC . intern FX SRC ${PTHREADS_INC} ${LIBSAMPLERATE_INC}) + +FILE(GLOB SRC intern/*.cpp intern/*.h FX/*.cpp SRC/*.cpp) + +IF(WITH_FFMPEG) + SET(INC ${INC} ffmpeg ${FFMPEG_INC}) + FILE(GLOB FFMPEGSRC ffmpeg/*.cpp) + ADD_DEFINITIONS(-DWITH_FFMPEG) +ENDIF(WITH_FFMPEG) + +IF(WITH_SDL) + SET(INC ${INC} SDL ${SDL_INCLUDE_DIR}) + FILE(GLOB SDLSRC SDL/*.cpp) + ADD_DEFINITIONS(-DWITH_SDL) +ENDIF(WITH_SDL) + +IF(WITH_OPENAL) + SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR}) + FILE(GLOB OPENALSRC OpenAL/*.cpp) + ADD_DEFINITIONS(-DWITH_OPENAL) + + STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR}) + IF(FRAMEWORK) + ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX) + ENDIF(FRAMEWORK) +ENDIF(WITH_OPENAL) + +IF(WITH_JACK) + SET(INC ${INC} jack ${JACK_INC}) + FILE(GLOB JACKSRC jack/*.cpp) + ADD_DEFINITIONS(-DWITH_JACK) +ENDIF(WITH_JACK) + +IF(WITH_SNDFILE) + SET(INC ${INC} sndfile ${SNDFILE_INC}) + FILE(GLOB SNDFILESRC sndfile/*.cpp) + ADD_DEFINITIONS(-DWITH_SNDFILE) +ENDIF(WITH_SNDFILE) + +SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC}) + +BLENDERLIB(bf_audaspace "${SRC}" "${INC}") diff --git a/intern/audaspace/COPYING b/intern/audaspace/COPYING new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/intern/audaspace/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/intern/audaspace/COPYING.LESSER b/intern/audaspace/COPYING.LESSER new file mode 100644 index 00000000000..cca7fc278f5 --- /dev/null +++ b/intern/audaspace/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/intern/audaspace/FX/AUD_DelayFactory.cpp b/intern/audaspace/FX/AUD_DelayFactory.cpp new file mode 100644 index 00000000000..25ce4faed4c --- /dev/null +++ b/intern/audaspace/FX/AUD_DelayFactory.cpp @@ -0,0 +1,58 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_DelayFactory.h" +#include "AUD_DelayReader.h" +#include "AUD_Space.h" + +AUD_DelayFactory::AUD_DelayFactory(AUD_IFactory* factory, float delay) : + AUD_EffectFactory(factory), + m_delay(delay) {} + +AUD_DelayFactory::AUD_DelayFactory(float delay) : + AUD_EffectFactory(0), + m_delay(delay) {} + +float AUD_DelayFactory::getDelay() +{ + return m_delay; +} + +void AUD_DelayFactory::setDelay(float delay) +{ + m_delay = delay; +} + +AUD_IReader* AUD_DelayFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_DelayReader(reader, m_delay); AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_DelayFactory.h b/intern/audaspace/FX/AUD_DelayFactory.h new file mode 100644 index 00000000000..5ad4b9ab996 --- /dev/null +++ b/intern/audaspace/FX/AUD_DelayFactory.h @@ -0,0 +1,70 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_DELAYFACTORY +#define AUD_DELAYFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory plays another factory delayed. + */ +class AUD_DelayFactory : public AUD_EffectFactory +{ +private: + /** + * The delay in samples. + */ + float m_delay; + +public: + /** + * Creates a new delay factory. + * \param factory The input factory. + * \param delay The desired delay in seconds. + */ + AUD_DelayFactory(AUD_IFactory* factory = 0, float delay = 0); + + /** + * Creates a new delay factory. + * \param delay The desired delay in seconds. + */ + AUD_DelayFactory(float delay); + + /** + * Returns the delay in seconds. + */ + float getDelay(); + + /** + * Sets the delay. + * \param delay The new delay value in seconds. + */ + void setDelay(float delay); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_DELAYFACTORY diff --git a/intern/audaspace/FX/AUD_DelayReader.cpp b/intern/audaspace/FX/AUD_DelayReader.cpp new file mode 100644 index 00000000000..38d3b893b5c --- /dev/null +++ b/intern/audaspace/FX/AUD_DelayReader.cpp @@ -0,0 +1,111 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_DelayReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_DelayReader::AUD_DelayReader(AUD_IReader* reader, float delay) : + AUD_EffectReader(reader) +{ + m_delay = (int)(delay * reader->getSpecs().rate); + m_remdelay = m_delay; + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_DelayReader::~AUD_DelayReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +void AUD_DelayReader::seek(int position) +{ + if(position < 0) + return; + + if(position < m_delay) + { + m_remdelay = m_delay - position; + m_reader->seek(0); + } + else + { + m_remdelay = 0; + m_reader->seek(position - m_delay); + } +} + +int AUD_DelayReader::getLength() +{ + int len = m_reader->getLength(); + if(len < 0) + return len; + return len+m_delay; +} + +int AUD_DelayReader::getPosition() +{ + if(m_remdelay > 0) + return m_delay-m_remdelay; + return m_reader->getPosition() + m_delay; +} + +void AUD_DelayReader::read(int & length, sample_t* & buffer) +{ + if(m_remdelay > 0) + { + int samplesize = AUD_SAMPLE_SIZE(m_reader->getSpecs()); + + if(m_buffer->getSize() < length*samplesize) + m_buffer->resize(length*samplesize); + + if(length > m_remdelay) + { + if(getSpecs().format == AUD_FORMAT_U8) + memset(m_buffer->getBuffer(), 0x80, m_remdelay*samplesize); + else + memset(m_buffer->getBuffer(), 0, m_remdelay*samplesize); + int len = length - m_remdelay; + m_reader->read(len, buffer); + memcpy(m_buffer->getBuffer()+m_remdelay*samplesize, + buffer, len*samplesize); + if(len < length-m_remdelay) + length = m_remdelay + len; + m_remdelay = 0; + } + else + { + if(getSpecs().format == AUD_FORMAT_U8) + memset(m_buffer->getBuffer(), 0x80, length*samplesize); + else + memset(m_buffer->getBuffer(), 0, length*samplesize); + m_remdelay -= length; + } + buffer = m_buffer->getBuffer(); + } + else + m_reader->read(length, buffer); +} diff --git a/intern/audaspace/FX/AUD_DelayReader.h b/intern/audaspace/FX/AUD_DelayReader.h new file mode 100644 index 00000000000..4662b455dfc --- /dev/null +++ b/intern/audaspace/FX/AUD_DelayReader.h @@ -0,0 +1,73 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_DELAYREADER +#define AUD_DELAYREADER + +#include "AUD_EffectReader.h" +class AUD_Buffer; + +/** + * This class reads another reader and changes it's delay. + */ +class AUD_DelayReader : public AUD_EffectReader +{ +private: + /** + * The playback buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The delay level. + */ + int m_delay; + + /** + * The remaining delay for playback. + */ + int m_remdelay; + +public: + /** + * Creates a new delay reader. + * \param reader The reader to read from. + * \param delay The delay in seconds. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_DelayReader(AUD_IReader* reader, float delay); + + /** + * Destroys the reader. + */ + virtual ~AUD_DelayReader(); + + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_DELAYREADER diff --git a/intern/audaspace/FX/AUD_DoubleReader.cpp b/intern/audaspace/FX/AUD_DoubleReader.cpp new file mode 100644 index 00000000000..8d3afbf2f1d --- /dev/null +++ b/intern/audaspace/FX/AUD_DoubleReader.cpp @@ -0,0 +1,158 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_DoubleReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_DoubleReader::AUD_DoubleReader(AUD_IReader* reader1, + AUD_IReader* reader2) : + m_reader1(reader1), m_reader2(reader2) +{ + try + { + if(!reader1) + AUD_THROW(AUD_ERROR_READER); + + if(!reader2) + AUD_THROW(AUD_ERROR_READER); + + AUD_Specs s1, s2; + s1 = reader1->getSpecs(); + s2 = reader2->getSpecs(); + if(memcmp(&s1, &s2, sizeof(AUD_Specs)) != 0) + AUD_THROW(AUD_ERROR_READER); + } + + catch(AUD_Exception) + { + if(reader1) + { + delete reader1; AUD_DELETE("reader") + } + if(reader2) + { + delete reader2; AUD_DELETE("reader") + } + + throw; + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") + m_finished1 = false; +} + +AUD_DoubleReader::~AUD_DoubleReader() +{ + delete m_reader1; AUD_DELETE("reader") + delete m_reader2; AUD_DELETE("reader") + delete m_buffer; AUD_DELETE("buffer") +} + +bool AUD_DoubleReader::isSeekable() +{ + return false; +} + +void AUD_DoubleReader::seek(int position) +{ + int length1 = m_reader1->getLength(); + + if(position < 0) + position = 0; + + if(position < length1) + { + m_reader1->seek(position); + m_reader2->seek(0); + m_finished1 = false; + } + else + { + m_reader2->seek(position-length1); + m_finished1 = true; + } +} + +int AUD_DoubleReader::getLength() +{ + int len1 = m_reader1->getLength(); + int len2 = m_reader2->getLength(); + if(len1 < 0 || len2 < 0) + return -1; + return len1 + len2; +} + +int AUD_DoubleReader::getPosition() +{ + return m_reader1->getPosition() + m_reader2->getPosition(); +} + +AUD_Specs AUD_DoubleReader::getSpecs() +{ + return m_reader1->getSpecs(); +} + +AUD_ReaderType AUD_DoubleReader::getType() +{ + if(m_reader1->getType() == AUD_TYPE_BUFFER && + m_reader2->getType() == AUD_TYPE_BUFFER) + return AUD_TYPE_BUFFER; + return AUD_TYPE_STREAM; +} + +bool AUD_DoubleReader::notify(AUD_Message &message) +{ + return m_reader1->notify(message) | m_reader2->notify(message); +} + +void AUD_DoubleReader::read(int & length, sample_t* & buffer) +{ + if(!m_finished1) + { + int len = length; + m_reader1->read(len, buffer); + if(len < length) + { + int samplesize = AUD_SAMPLE_SIZE(m_reader1->getSpecs()); + if(m_buffer->getSize() < length * samplesize) + m_buffer->resize(length * samplesize); + memcpy(m_buffer->getBuffer(), buffer, len*samplesize); + len = length - len; + length -= len; + m_reader2->read(len, buffer); + memcpy(m_buffer->getBuffer() + length*samplesize, + buffer, len*samplesize); + length += len; + buffer = m_buffer->getBuffer(); + m_finished1 = true; + } + } + else + { + m_reader2->read(length, buffer); + } +} diff --git a/intern/audaspace/FX/AUD_DoubleReader.h b/intern/audaspace/FX/AUD_DoubleReader.h new file mode 100644 index 00000000000..d82b81ec0ba --- /dev/null +++ b/intern/audaspace/FX/AUD_DoubleReader.h @@ -0,0 +1,83 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_DOUBLEREADER +#define AUD_DOUBLEREADER + +#include "AUD_IReader.h" +class AUD_Buffer; + +/** + * This reader plays two readers with the same specs sequently. + */ +class AUD_DoubleReader : public AUD_IReader +{ +private: + /** + * The first reader. + */ + AUD_IReader* m_reader1; + + /** + * The second reader. + */ + AUD_IReader* m_reader2; + + /** + * Whether we've reached the end of the first reader. + */ + bool m_finished1; + + /** + * The playback buffer for the intersecting part. + */ + AUD_Buffer* m_buffer; + +public: + /** + * Creates a new ping pong reader. + * \param reader1 The first reader to read from. + * \param reader2 The second reader to read from. + * \exception AUD_Exception Thrown if one of the reader specified is NULL + * or the specs from the readers differ. + */ + AUD_DoubleReader(AUD_IReader* reader1, AUD_IReader* reader2); + + /** + * Destroys the reader. + */ + virtual ~AUD_DoubleReader(); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_DOUBLEREADER diff --git a/intern/audaspace/FX/AUD_EffectFactory.cpp b/intern/audaspace/FX/AUD_EffectFactory.cpp new file mode 100644 index 00000000000..882499416b7 --- /dev/null +++ b/intern/audaspace/FX/AUD_EffectFactory.cpp @@ -0,0 +1,50 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_EffectFactory.h" +#include "AUD_IReader.h" + +AUD_IReader* AUD_EffectFactory::getReader() +{ + if(m_factory != 0) + return m_factory->createReader(); + + return 0; +} + +AUD_EffectFactory::AUD_EffectFactory(AUD_IFactory* factory) +{ + m_factory = factory; +} + +void AUD_EffectFactory::setFactory(AUD_IFactory* factory) +{ + m_factory = factory; +} + +AUD_IFactory* AUD_EffectFactory::getFactory() +{ + return m_factory; +} diff --git a/intern/audaspace/FX/AUD_EffectFactory.h b/intern/audaspace/FX/AUD_EffectFactory.h new file mode 100644 index 00000000000..67259b9e6c3 --- /dev/null +++ b/intern/audaspace/FX/AUD_EffectFactory.h @@ -0,0 +1,76 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_EFFECTFACTORY +#define AUD_EFFECTFACTORY + +#include "AUD_IFactory.h" + +/** + * This factory is a base class for all effect factories that take one other + * factory as input. + */ +class AUD_EffectFactory : public AUD_IFactory +{ +protected: + /** + * If there is no reader it is created out of this factory. + */ + AUD_IFactory* m_factory; + + /** + * Returns the reader created out of the factory. + * This method can be used for the createReader function of the implementing + * classes. + * \return The reader created out of the factory or NULL if there is none. + */ + AUD_IReader* getReader(); + +public: + /** + * Creates a new factory. + * \param factory The input factory. + */ + AUD_EffectFactory(AUD_IFactory* factory); + + /** + * Destroys the factory. + */ + virtual ~AUD_EffectFactory() {} + + /** + * Sets the input factory. + * \param factory The input factory. + */ + void setFactory(AUD_IFactory* factory); + + /** + * Returns the saved factory. + * \return The factory or NULL if there has no factory been saved. + */ + AUD_IFactory* getFactory(); +}; + +#endif //AUD_EFFECTFACTORY diff --git a/intern/audaspace/FX/AUD_EffectReader.cpp b/intern/audaspace/FX/AUD_EffectReader.cpp new file mode 100644 index 00000000000..47026b88440 --- /dev/null +++ b/intern/audaspace/FX/AUD_EffectReader.cpp @@ -0,0 +1,78 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_EffectReader.h" + +AUD_EffectReader::AUD_EffectReader(AUD_IReader* reader) +{ + if(!reader) + AUD_THROW(AUD_ERROR_READER); + m_reader = reader; +} + +AUD_EffectReader::~AUD_EffectReader() +{ + delete m_reader; AUD_DELETE("reader") +} + +bool AUD_EffectReader::isSeekable() +{ + return m_reader->isSeekable(); +} + +void AUD_EffectReader::seek(int position) +{ + m_reader->seek(position); +} + +int AUD_EffectReader::getLength() +{ + return m_reader->getLength(); +} + +int AUD_EffectReader::getPosition() +{ + return m_reader->getPosition(); +} + +AUD_Specs AUD_EffectReader::getSpecs() +{ + return m_reader->getSpecs(); +} + +AUD_ReaderType AUD_EffectReader::getType() +{ + return m_reader->getType(); +} + +bool AUD_EffectReader::notify(AUD_Message &message) +{ + return m_reader->notify(message); +} + +void AUD_EffectReader::read(int & length, sample_t* & buffer) +{ + m_reader->read(length, buffer); +} diff --git a/intern/audaspace/FX/AUD_EffectReader.h b/intern/audaspace/FX/AUD_EffectReader.h new file mode 100644 index 00000000000..f64bf34077d --- /dev/null +++ b/intern/audaspace/FX/AUD_EffectReader.h @@ -0,0 +1,66 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_EFFECTREADER +#define AUD_EFFECTREADER + +#include "AUD_IReader.h" + +/** + * This reader is a base class for all effect readers that take one other reader + * as input. + */ +class AUD_EffectReader : public AUD_IReader +{ +protected: + /** + * The reader to read from. + */ + AUD_IReader* m_reader; + +public: + /** + * Creates a new effect reader. + * \param reader The reader to read from. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_EffectReader(AUD_IReader* reader); + + /** + * Destroys the reader. + */ + virtual ~AUD_EffectReader(); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_EFFECTREADER diff --git a/intern/audaspace/FX/AUD_FaderFactory.cpp b/intern/audaspace/FX/AUD_FaderFactory.cpp new file mode 100644 index 00000000000..4357e11bd43 --- /dev/null +++ b/intern/audaspace/FX/AUD_FaderFactory.cpp @@ -0,0 +1,84 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FaderFactory.h" +#include "AUD_FaderReader.h" + +AUD_FaderFactory::AUD_FaderFactory(AUD_IFactory* factory, AUD_FadeType type, + float start, float length) : + AUD_EffectFactory(factory), + m_type(type), + m_start(start), + m_length(length) {} + +AUD_FaderFactory::AUD_FaderFactory(AUD_FadeType type, + float start, float length) : + AUD_EffectFactory(0), + m_type(type), + m_start(start), + m_length(length) {} + +AUD_FadeType AUD_FaderFactory::getType() +{ + return m_type; +} + +void AUD_FaderFactory::setType(AUD_FadeType type) +{ + m_type = type; +} + +float AUD_FaderFactory::getStart() +{ + return m_start; +} + +void AUD_FaderFactory::setStart(float start) +{ + m_start = start; +} + +float AUD_FaderFactory::getLength() +{ + return m_length; +} + +void AUD_FaderFactory::setLength(float length) +{ + m_length = length; +} + +AUD_IReader* AUD_FaderFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_FaderReader(reader, m_type, m_start, m_length); + AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_FaderFactory.h b/intern/audaspace/FX/AUD_FaderFactory.h new file mode 100644 index 00000000000..4999ccac8f1 --- /dev/null +++ b/intern/audaspace/FX/AUD_FaderFactory.h @@ -0,0 +1,111 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_FADERFACTORY +#define AUD_FADERFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory fades another factory. + * If the fading type is AUD_FADE_IN, everything before the fading start will be + * silenced, for AUD_FADE_OUT that's true for everything after fading ends. + */ +class AUD_FaderFactory : public AUD_EffectFactory +{ +private: + /** + * The fading type. + */ + AUD_FadeType m_type; + + /** + * The fading start. + */ + float m_start; + + /** + * The fading length. + */ + float m_length; + +public: + /** + * Creates a new fader factory. + * \param factory The input factory. + * \param type The fading type. + * \param start The time where fading should start in seconds. + * \param length How long fading should last in seconds. + */ + AUD_FaderFactory(AUD_IFactory* factory = 0, + AUD_FadeType type = AUD_FADE_IN, + float start = 0.0f, float length = 1.0f); + + /** + * Creates a new fader factory. + * \param type The fading type. + * \param start The time where fading should start in seconds. + * \param length How long fading should last in seconds. + */ + AUD_FaderFactory(AUD_FadeType type = AUD_FADE_IN, + float start = 0.0f, float length = 1.0f); + + /** + * Returns the fading type. + */ + AUD_FadeType getType(); + + /** + * Sets the fading type. + * \param type The new fading type: AUD_FADE_IN or AUD_FADE_OUT. + */ + void setType(AUD_FadeType type); + + /** + * Returns the fading start. + */ + float getStart(); + + /** + * Sets the fading start. + * \param start The new fading start. + */ + void setStart(float start); + + /** + * Returns the fading length. + */ + float getLength(); + + /** + * Sets the fading length. + * \param start The new fading length. + */ + void setLength(float length); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_FADERFACTORY diff --git a/intern/audaspace/FX/AUD_FaderReader.cpp b/intern/audaspace/FX/AUD_FaderReader.cpp new file mode 100644 index 00000000000..d5096e7fae1 --- /dev/null +++ b/intern/audaspace/FX/AUD_FaderReader.cpp @@ -0,0 +1,133 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FaderReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_FaderReader::AUD_FaderReader(AUD_IReader* reader, AUD_FadeType type, + float start,float length) : + AUD_EffectReader(reader), + m_type(type), + m_start(start), + m_length(length) +{ + int bigendian = 1; + bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian + + switch(m_reader->getSpecs().format) + { + case AUD_FORMAT_S16: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_S32: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_FLOAT32: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_FLOAT64: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_U8: + m_adjust = AUD_volume_adjust_u8; + break; + case AUD_FORMAT_S24: + m_adjust = bigendian ? AUD_volume_adjust_s24_be : + AUD_volume_adjust_s24_le; + break; + default: + delete m_reader; + AUD_THROW(AUD_ERROR_READER); + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_FaderReader::~AUD_FaderReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +bool AUD_FaderReader::notify(AUD_Message &message) +{ + return m_reader->notify(message); +} + +void AUD_FaderReader::read(int & length, sample_t* & buffer) +{ + int position = m_reader->getPosition(); + AUD_Specs specs = m_reader->getSpecs(); + int samplesize = AUD_SAMPLE_SIZE(specs); + + m_reader->read(length, buffer); + + if(m_buffer->getSize() < length * samplesize) + m_buffer->resize(length * samplesize); + + if((position + length) / (float)specs.rate <= m_start) + { + if(m_type != AUD_FADE_OUT) + { + buffer = m_buffer->getBuffer(); + memset(buffer, + specs.format == AUD_FORMAT_U8 ? 0x80 : 0, + length * samplesize); + } + } + else if(position / (float)specs.rate >= m_start+m_length) + { + if(m_type == AUD_FADE_OUT) + { + buffer = m_buffer->getBuffer(); + memset(buffer, + specs.format == AUD_FORMAT_U8 ? 0x80 : 0, + length * samplesize); + } + } + else + { + sample_t* buf = m_buffer->getBuffer(); + float volume; + + for(int i = 0; i < length; i++) + { + volume = (((position+i)/(float)specs.rate)-m_start) / m_length; + if(volume > 1.0f) + volume = 1.0f; + else if(volume < 0.0f) + volume = 0.0f; + + if(m_type == AUD_FADE_OUT) + volume = 1.0f - volume; + + m_adjust(buf + i * samplesize, buffer + i * samplesize, + specs.channels, volume); + } + + buffer = buf; + } +} diff --git a/intern/audaspace/FX/AUD_FaderReader.h b/intern/audaspace/FX/AUD_FaderReader.h new file mode 100644 index 00000000000..773643b2f5d --- /dev/null +++ b/intern/audaspace/FX/AUD_FaderReader.h @@ -0,0 +1,86 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_FADERREADER +#define AUD_FADERREADER + +#include "AUD_EffectReader.h" +#include "AUD_ConverterFunctions.h" +class AUD_Buffer; + +/** + * This class fades another reader. + * If the fading type is AUD_FADE_IN, everything before the fading start will be + * silenced, for AUD_FADE_OUT that's true for everything after fading ends. + */ +class AUD_FaderReader : public AUD_EffectReader +{ +private: + /** + * The playback buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The fading type. + */ + AUD_FadeType m_type; + + /** + * The fading start. + */ + float m_start; + + /** + * The fading length. + */ + float m_length; + + /** + * Volume adjustment function. + */ + AUD_volume_adjust_f m_adjust; + +public: + /** + * Creates a new fader reader. + * \param type The fading type. + * \param start The time where fading should start in seconds. + * \param length How long fading should last in seconds. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_FaderReader(AUD_IReader* reader, AUD_FadeType type, + float start,float length); + + /** + * Destroys the reader. + */ + virtual ~AUD_FaderReader(); + + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_FADERREADER diff --git a/intern/audaspace/FX/AUD_LimiterFactory.cpp b/intern/audaspace/FX/AUD_LimiterFactory.cpp new file mode 100644 index 00000000000..6f19575240a --- /dev/null +++ b/intern/audaspace/FX/AUD_LimiterFactory.cpp @@ -0,0 +1,67 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_LimiterFactory.h" +#include "AUD_LimiterReader.h" +#include "AUD_Space.h" + +AUD_LimiterFactory::AUD_LimiterFactory(AUD_IFactory* factory, + float start, float end) : + AUD_EffectFactory(factory), + m_start(start), + m_end(end) {} + +float AUD_LimiterFactory::getStart() +{ + return m_start; +} + +void AUD_LimiterFactory::setStart(float start) +{ + m_start = start; +} + +float AUD_LimiterFactory::getEnd() +{ + return m_end; +} + +void AUD_LimiterFactory::setEnd(float end) +{ + m_end = end; +} + +AUD_IReader* AUD_LimiterFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_LimiterReader(reader, m_start, m_end); + AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_LimiterFactory.h b/intern/audaspace/FX/AUD_LimiterFactory.h new file mode 100644 index 00000000000..588fea6eb4b --- /dev/null +++ b/intern/audaspace/FX/AUD_LimiterFactory.h @@ -0,0 +1,84 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_LIMITERFACTORY +#define AUD_LIMITERFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory limits another factory in start and end time. + */ +class AUD_LimiterFactory : public AUD_EffectFactory +{ +private: + /** + * The start time. + */ + float m_start; + + /** + * The end time. + */ + float m_end; + +public: + /** + * Creates a new limiter factory. + * \param factory The input factory. + * \param start The desired start time. + * \param end The desired end time, a negative value signals that it should + * play to the end. + */ + AUD_LimiterFactory(AUD_IFactory* factory = 0, + float start = 0, float end = -1); + + /** + * Returns the start time. + */ + float getStart(); + + /** + * Sets the start time. + * \param start The new start time. + */ + void setStart(float start); + + /** + * Returns the end time. + */ + float getEnd(); + + /** + * Sets the end time. + * \param end The new end time, a negative value signals that it should play + * to the end. + */ + void setEnd(float end); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_LIMITERFACTORY diff --git a/intern/audaspace/FX/AUD_LimiterReader.cpp b/intern/audaspace/FX/AUD_LimiterReader.cpp new file mode 100644 index 00000000000..05882369001 --- /dev/null +++ b/intern/audaspace/FX/AUD_LimiterReader.cpp @@ -0,0 +1,95 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_LimiterReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_LimiterReader::AUD_LimiterReader(AUD_IReader* reader, + float start, float end) : + AUD_EffectReader(reader) +{ + m_end = (int)(end * reader->getSpecs().rate); + + if(start <= 0) + m_start = 0; + else + { + m_start = (int)(start * reader->getSpecs().rate); + if(m_reader->isSeekable()) + m_reader->seek(m_start); + else + { + // skip first m_start samples by reading them + int length; + sample_t* buffer; + for(int i = m_start; + i >= AUD_DEFAULT_BUFFER_SIZE; + i -= AUD_DEFAULT_BUFFER_SIZE) + { + length = AUD_DEFAULT_BUFFER_SIZE; + m_reader->read(length, buffer); + length = i; + } + m_reader->read(length, buffer); + } + } +} + +void AUD_LimiterReader::seek(int position) +{ + m_reader->seek(position + m_start); +} + +int AUD_LimiterReader::getLength() +{ + int len = m_reader->getLength(); + if(m_reader->getType() != AUD_TYPE_BUFFER || len < 0 || + (len > m_end && m_end >= 0)) + len = m_end; + return len - m_start; +} + +int AUD_LimiterReader::getPosition() +{ + return m_reader->getPosition() - m_start; +} + +void AUD_LimiterReader::read(int & length, sample_t* & buffer) +{ + if(m_end >= 0) + { + int position = m_reader->getPosition(); + if(position+length > m_end) + length = m_end - position; + if(length < 0) + { + length = 0; + return; + } + } + m_reader->read(length, buffer); +} diff --git a/intern/audaspace/FX/AUD_LimiterReader.h b/intern/audaspace/FX/AUD_LimiterReader.h new file mode 100644 index 00000000000..9921f5ee1b0 --- /dev/null +++ b/intern/audaspace/FX/AUD_LimiterReader.h @@ -0,0 +1,64 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_LIMITERREADER +#define AUD_LIMITERREADER + +#include "AUD_EffectReader.h" + +/** + * This reader limits another reader in start and end sample. + */ +class AUD_LimiterReader : public AUD_EffectReader +{ +private: + /** + * The start sample: inclusive. + */ + int m_start; + + /** + * The end sample: exlusive. + */ + int m_end; + +public: + /** + * Creates a new limiter reader. + * \param reader The reader to read from. + * \param start The desired start sample (inclusive). + * \param end The desired end sample (exklusive), a negative value signals + * that it should play to the end. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_LimiterReader(AUD_IReader* reader, float start = 0, float end = -1); + + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_LIMITERREADER diff --git a/intern/audaspace/FX/AUD_LoopFactory.cpp b/intern/audaspace/FX/AUD_LoopFactory.cpp new file mode 100644 index 00000000000..90186f623ff --- /dev/null +++ b/intern/audaspace/FX/AUD_LoopFactory.cpp @@ -0,0 +1,57 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_LoopFactory.h" +#include "AUD_LoopReader.h" + +AUD_LoopFactory::AUD_LoopFactory(AUD_IFactory* factory, int loop) : + AUD_EffectFactory(factory), + m_loop(loop) {} + +AUD_LoopFactory::AUD_LoopFactory(int loop) : + AUD_EffectFactory(0), + m_loop(loop) {} + +int AUD_LoopFactory::getLoop() +{ + return m_loop; +} + +void AUD_LoopFactory::setLoop(int loop) +{ + m_loop = loop; +} + +AUD_IReader* AUD_LoopFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_LoopReader(reader, m_loop); AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_LoopFactory.h b/intern/audaspace/FX/AUD_LoopFactory.h new file mode 100644 index 00000000000..461d8c9ab69 --- /dev/null +++ b/intern/audaspace/FX/AUD_LoopFactory.h @@ -0,0 +1,74 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_LOOPFACTORY +#define AUD_LOOPFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory loops another factory. + * \note The reader has to be seekable. + */ +class AUD_LoopFactory : public AUD_EffectFactory +{ +private: + /** + * The loop count. + */ + float m_loop; + +public: + /** + * Creates a new loop factory. + * \param factory The input factory. + * \param loop The desired loop count, negative values result in endless + * looping. + */ + AUD_LoopFactory(AUD_IFactory* factory = 0, int loop = -1); + + /** + * Creates a new loop factory. + * \param loop The desired loop count, negative values result in endless + * looping. + */ + AUD_LoopFactory(int loop); + + /** + * Returns the loop count. + */ + int getLoop(); + + /** + * Sets the loop count. + * \param loop The desired loop count, negative values result in endless + * looping. + */ + void setLoop(int loop); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_LOOPFACTORY diff --git a/intern/audaspace/FX/AUD_LoopReader.cpp b/intern/audaspace/FX/AUD_LoopReader.cpp new file mode 100644 index 00000000000..9e270321013 --- /dev/null +++ b/intern/audaspace/FX/AUD_LoopReader.cpp @@ -0,0 +1,107 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_LoopReader.h" +#include "AUD_Buffer.h" + +#include +#include + +AUD_LoopReader::AUD_LoopReader(AUD_IReader* reader, int loop) : + AUD_EffectReader(reader), m_loop(loop) +{ + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_LoopReader::~AUD_LoopReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +AUD_ReaderType AUD_LoopReader::getType() +{ + if(m_loop < 0) + return AUD_TYPE_STREAM; + return m_reader->getType(); +} + +bool AUD_LoopReader::notify(AUD_Message &message) +{ + if(message.type == AUD_MSG_LOOP) + { + m_loop = message.loopcount; + + m_reader->notify(message); + + return true; + } + return m_reader->notify(message); +} + +void AUD_LoopReader::read(int & length, sample_t* & buffer) +{ + int samplesize = AUD_SAMPLE_SIZE(m_reader->getSpecs()); + + int len = length; + + m_reader->read(len, buffer); + + if(len < length && m_loop != 0) + { + int pos = 0; + + if(m_buffer->getSize() < length*samplesize) + m_buffer->resize(length*samplesize); + + memcpy(m_buffer->getBuffer() + pos * samplesize, + buffer, len * samplesize); + + pos += len; + + while(pos < length && m_loop != 0) + { + if(m_loop > 0) + m_loop--; + + m_reader->seek(0); + + len = length - pos; + m_reader->read(len, buffer); + // prevent endless loop + if(!len) + break; + + memcpy(m_buffer->getBuffer() + pos * samplesize, + buffer, len * samplesize); + + pos += len; + } + + length = pos; + buffer = m_buffer->getBuffer(); + } + else + length = len; +} diff --git a/intern/audaspace/FX/AUD_LoopReader.h b/intern/audaspace/FX/AUD_LoopReader.h new file mode 100644 index 00000000000..621ee3493ab --- /dev/null +++ b/intern/audaspace/FX/AUD_LoopReader.h @@ -0,0 +1,69 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_LOOPREADER +#define AUD_LOOPREADER + +#include "AUD_EffectReader.h" +class AUD_Buffer; + +/** + * This class reads another reader and loops it. + * \note The other reader must be seekable. + */ +class AUD_LoopReader : public AUD_EffectReader +{ +private: + /** + * The playback buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The left loop count. + */ + int m_loop; + +public: + /** + * Creates a new loop reader. + * \param reader The reader to read from. + * \param loop The desired loop count, negative values result in endless + * looping. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_LoopReader(AUD_IReader* reader, int loop); + + /** + * Destroys the reader. + */ + virtual ~AUD_LoopReader(); + + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_LOOPREADER diff --git a/intern/audaspace/FX/AUD_PingPongFactory.cpp b/intern/audaspace/FX/AUD_PingPongFactory.cpp new file mode 100644 index 00000000000..8b72afe05e7 --- /dev/null +++ b/intern/audaspace/FX/AUD_PingPongFactory.cpp @@ -0,0 +1,67 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_PingPongFactory.h" +#include "AUD_DoubleReader.h" +#include "AUD_ReverseFactory.h" + +AUD_PingPongFactory::AUD_PingPongFactory(AUD_IFactory* factory) : + AUD_EffectFactory(factory) {} + +AUD_IReader* AUD_PingPongFactory::createReader() +{ + if(m_factory == 0) + return 0; + + AUD_IReader* reader = m_factory->createReader(); + + if(reader != 0) + { + AUD_IReader* reader2; + AUD_ReverseFactory factory(m_factory); + + try + { + reader2 = factory.createReader(); + } + catch(AUD_Exception) + { + reader2 = 0; + } + + if(reader2 != 0) + { + reader = new AUD_DoubleReader(reader, reader2); + AUD_NEW("reader") + } + else + { + delete reader; AUD_DELETE("reader") + reader = 0; + } + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_PingPongFactory.h b/intern/audaspace/FX/AUD_PingPongFactory.h new file mode 100644 index 00000000000..b8854da550a --- /dev/null +++ b/intern/audaspace/FX/AUD_PingPongFactory.h @@ -0,0 +1,51 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_PINGPONGFACTORY +#define AUD_PINGPONGFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory plays another factory first normal, then reversed. + * \note Readers from the underlying factory must be from the buffer type. + */ +class AUD_PingPongFactory : public AUD_EffectFactory +{ +public: + /** + * Creates a new ping pong factory. + * \param factory The input factory. + */ + AUD_PingPongFactory(AUD_IFactory* factory = 0); + + /** + * Destroys the factory. + */ + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_PINGPONGFACTORY diff --git a/intern/audaspace/FX/AUD_PitchFactory.cpp b/intern/audaspace/FX/AUD_PitchFactory.cpp new file mode 100644 index 00000000000..5f814283c12 --- /dev/null +++ b/intern/audaspace/FX/AUD_PitchFactory.cpp @@ -0,0 +1,48 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_PitchFactory.h" +#include "AUD_PitchReader.h" +#include "AUD_Space.h" + +AUD_PitchFactory::AUD_PitchFactory(AUD_IFactory* factory, float pitch) : + AUD_EffectFactory(factory), + m_pitch(pitch) {} + +AUD_PitchFactory::AUD_PitchFactory(float pitch) : + AUD_EffectFactory(0), + m_pitch(pitch) {} + +AUD_IReader* AUD_PitchFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_PitchReader(reader, m_pitch); AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_PitchFactory.h b/intern/audaspace/FX/AUD_PitchFactory.h new file mode 100644 index 00000000000..3209aa46983 --- /dev/null +++ b/intern/audaspace/FX/AUD_PitchFactory.h @@ -0,0 +1,70 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_PITCHFACTORY +#define AUD_PITCHFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory changes the pitch of another factory. + */ +class AUD_PitchFactory : public AUD_EffectFactory +{ +private: + /** + * The pitch. + */ + float m_pitch; + +public: + /** + * Creates a new pitch factory. + * \param factory The input factory. + * \param pitch The desired pitch. + */ + AUD_PitchFactory(AUD_IFactory* factory = 0, float pitch = 1.0); + + /** + * Creates a new pitch factory. + * \param pitch The desired pitch. + */ + AUD_PitchFactory(float pitch); + + /** + * Returns the pitch. + */ + float getPitch(); + + /** + * Sets the pitch. + * \param pitch The new pitch value. Should be between 0.0 and 1.0. + */ + void setPitch(float pitch); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_PITCHFACTORY diff --git a/intern/audaspace/FX/AUD_PitchReader.cpp b/intern/audaspace/FX/AUD_PitchReader.cpp new file mode 100644 index 00000000000..c53264e1350 --- /dev/null +++ b/intern/audaspace/FX/AUD_PitchReader.cpp @@ -0,0 +1,39 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_PitchReader.h" + +AUD_PitchReader::AUD_PitchReader(AUD_IReader* reader, float pitch) : + AUD_EffectReader(reader) +{ + m_pitch = pitch; +} + +AUD_Specs AUD_PitchReader::getSpecs() +{ + AUD_Specs specs = m_reader->getSpecs(); + specs.rate = (AUD_SampleRate)((int)(specs.rate * m_pitch)); + return specs; +} diff --git a/intern/audaspace/FX/AUD_PitchReader.h b/intern/audaspace/FX/AUD_PitchReader.h new file mode 100644 index 00000000000..440e9cc843c --- /dev/null +++ b/intern/audaspace/FX/AUD_PitchReader.h @@ -0,0 +1,54 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_PITCHREADER +#define AUD_PITCHREADER + +#include "AUD_EffectReader.h" + +/** + * This class reads another reader and changes it's pitch. + */ +class AUD_PitchReader : public AUD_EffectReader +{ +private: + /** + * The pitch level. + */ + float m_pitch; + +public: + /** + * Creates a new pitch reader. + * \param reader The reader to read from. + * \param pitch The size of the buffer. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_PitchReader(AUD_IReader* reader, float pitch); + + virtual AUD_Specs getSpecs(); +}; + +#endif //AUD_PITCHREADER diff --git a/intern/audaspace/FX/AUD_ReverseFactory.cpp b/intern/audaspace/FX/AUD_ReverseFactory.cpp new file mode 100644 index 00000000000..1242641c350 --- /dev/null +++ b/intern/audaspace/FX/AUD_ReverseFactory.cpp @@ -0,0 +1,43 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ReverseFactory.h" +#include "AUD_ReverseReader.h" +#include "AUD_Space.h" + +AUD_ReverseFactory::AUD_ReverseFactory(AUD_IFactory* factory) : + AUD_EffectFactory(factory) {} + +AUD_IReader* AUD_ReverseFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_ReverseReader(reader); AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_ReverseFactory.h b/intern/audaspace/FX/AUD_ReverseFactory.h new file mode 100644 index 00000000000..4b664c47281 --- /dev/null +++ b/intern/audaspace/FX/AUD_ReverseFactory.h @@ -0,0 +1,50 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_REVERSEFACTORY +#define AUD_REVERSEFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory reads another factory reverted. + * \note Readers from the underlying factory must be from the buffer type. + */ +class AUD_ReverseFactory : public AUD_EffectFactory +{ +public: + /** + * Creates a new reverse factory. + * \param factory The input factory. + */ + AUD_ReverseFactory(AUD_IFactory* factory = 0); + + /** + * Destroys the factory. + */ + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_REVERSEFACTORY diff --git a/intern/audaspace/FX/AUD_ReverseReader.cpp b/intern/audaspace/FX/AUD_ReverseReader.cpp new file mode 100644 index 00000000000..043480b91b9 --- /dev/null +++ b/intern/audaspace/FX/AUD_ReverseReader.cpp @@ -0,0 +1,111 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ReverseReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_ReverseReader::AUD_ReverseReader(AUD_IReader* reader) : + AUD_EffectReader(reader) +{ + if(reader->getType() != AUD_TYPE_BUFFER) + AUD_THROW(AUD_ERROR_READER); + + m_length = reader->getLength(); + if(m_length < 0) + AUD_THROW(AUD_ERROR_READER); + + m_position = 0; + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_ReverseReader::~AUD_ReverseReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +void AUD_ReverseReader::seek(int position) +{ + m_position = position; +} + +int AUD_ReverseReader::getLength() +{ + return m_length; +} + +int AUD_ReverseReader::getPosition() +{ + return m_position; +} + +void AUD_ReverseReader::read(int & length, sample_t* & buffer) +{ + // first correct the length + if(m_position+length > m_length) + length = m_length-m_position; + + if(length <= 0) + { + length = 0; + return; + } + + int samplesize = AUD_SAMPLE_SIZE(getSpecs()); + + // resize buffer if needed + if(m_buffer->getSize() < length * samplesize) + m_buffer->resize(length * samplesize); + + buffer = m_buffer->getBuffer(); + + sample_t* buf; + int len = length; + + // read from reader + m_reader->seek(m_length-m_position-len); + m_reader->read(len, buf); + + // set null if reader didn't give enough data + if(len < length) + { + if(getSpecs().format == AUD_FORMAT_U8) + memset(buffer, 0x80, (length-len)*samplesize); + else + memset(buffer, 0, (length-len)*samplesize); + buffer += length-len; + } + + // copy the samples reverted + for(int i = 0; i < len; i++) + memcpy(buffer + i * samplesize, + buf + (len - 1 - i) * samplesize, + samplesize); + + m_position += length; + + buffer = m_buffer->getBuffer(); +} diff --git a/intern/audaspace/FX/AUD_ReverseReader.h b/intern/audaspace/FX/AUD_ReverseReader.h new file mode 100644 index 00000000000..045d2ac5a8e --- /dev/null +++ b/intern/audaspace/FX/AUD_ReverseReader.h @@ -0,0 +1,74 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_REVERSEREADER +#define AUD_REVERSEREADER + +#include "AUD_EffectReader.h" +class AUD_Buffer; + +/** + * This class reads another reader from back to front. + * \note The underlying reader must be a buffer. + */ +class AUD_ReverseReader : public AUD_EffectReader +{ +private: + /** + * The current position. + */ + int m_position; + + /** + * The sample count. + */ + int m_length; + + /** + * The playback buffer. + */ + AUD_Buffer* m_buffer; + +public: + /** + * Creates a new reverse reader. + * \param reader The reader to read from. + * \exception AUD_Exception Thrown if the reader specified is NULL or not + * a buffer. + */ + AUD_ReverseReader(AUD_IReader* reader); + + /** + * Destroys the reader. + */ + virtual ~AUD_ReverseReader(); + + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_REVERSEREADER diff --git a/intern/audaspace/FX/AUD_VolumeFactory.cpp b/intern/audaspace/FX/AUD_VolumeFactory.cpp new file mode 100644 index 00000000000..fbde608aa12 --- /dev/null +++ b/intern/audaspace/FX/AUD_VolumeFactory.cpp @@ -0,0 +1,57 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_VolumeFactory.h" +#include "AUD_VolumeReader.h" + +AUD_VolumeFactory::AUD_VolumeFactory(AUD_IFactory* factory, float volume) : + AUD_EffectFactory(factory), + m_volume(volume) {} + +AUD_VolumeFactory::AUD_VolumeFactory(float volume) : + AUD_EffectFactory(0), + m_volume(volume) {} + +float AUD_VolumeFactory::getVolume() +{ + return m_volume; +} + +void AUD_VolumeFactory::setVolume(float volume) +{ + m_volume = volume; +} + +AUD_IReader* AUD_VolumeFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + reader = new AUD_VolumeReader(reader, m_volume); AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/FX/AUD_VolumeFactory.h b/intern/audaspace/FX/AUD_VolumeFactory.h new file mode 100644 index 00000000000..d2812536d83 --- /dev/null +++ b/intern/audaspace/FX/AUD_VolumeFactory.h @@ -0,0 +1,72 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_VOLUMEFACTORY +#define AUD_VOLUMEFACTORY + +#include "AUD_EffectFactory.h" + +/** + * This factory changes the volume of another factory. + * The set volume should be a value between 0.0 and 1.0, higher values at your + * own risk! + */ +class AUD_VolumeFactory : public AUD_EffectFactory +{ +private: + /** + * The volume. + */ + float m_volume; + +public: + /** + * Creates a new volume factory. + * \param factory The input factory. + * \param volume The desired volume. + */ + AUD_VolumeFactory(AUD_IFactory* factory = 0, float volume = 1.0); + + /** + * Creates a new volume factory. + * \param volume The desired volume. + */ + AUD_VolumeFactory(float volume); + + /** + * Returns the volume. + */ + float getVolume(); + + /** + * Sets the volume. + * \param volume The new volume value. Should be between 0.0 and 1.0. + */ + void setVolume(float volume); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_VOLUMEFACTORY diff --git a/intern/audaspace/FX/AUD_VolumeReader.cpp b/intern/audaspace/FX/AUD_VolumeReader.cpp new file mode 100644 index 00000000000..fc3f20152a6 --- /dev/null +++ b/intern/audaspace/FX/AUD_VolumeReader.cpp @@ -0,0 +1,97 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_VolumeReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_VolumeReader::AUD_VolumeReader(AUD_IReader* reader, float volume) : + AUD_EffectReader(reader), + m_volume(volume) +{ + int bigendian = 1; + bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian + + switch(m_reader->getSpecs().format) + { + case AUD_FORMAT_S16: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_S32: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_FLOAT32: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_FLOAT64: + m_adjust = AUD_volume_adjust; + break; + case AUD_FORMAT_U8: + m_adjust = AUD_volume_adjust_u8; + break; + case AUD_FORMAT_S24: + m_adjust = bigendian ? AUD_volume_adjust_s24_be : + AUD_volume_adjust_s24_le; + break; + default: + delete m_reader; + AUD_THROW(AUD_ERROR_READER); + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_VolumeReader::~AUD_VolumeReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +bool AUD_VolumeReader::notify(AUD_Message &message) +{ + if(message.type == AUD_MSG_VOLUME) + { + m_volume = message.volume; + + m_reader->notify(message); + + return true; + } + return m_reader->notify(message); +} + +void AUD_VolumeReader::read(int & length, sample_t* & buffer) +{ + sample_t* buf; + AUD_Specs specs = m_reader->getSpecs(); + + m_reader->read(length, buf); + if(m_buffer->getSize() < length*AUD_SAMPLE_SIZE(specs)) + m_buffer->resize(length*AUD_SAMPLE_SIZE(specs)); + + buffer = m_buffer->getBuffer(); + + m_adjust(buffer, buf, length * specs.channels, m_volume); +} diff --git a/intern/audaspace/FX/AUD_VolumeReader.h b/intern/audaspace/FX/AUD_VolumeReader.h new file mode 100644 index 00000000000..f38ae4d265c --- /dev/null +++ b/intern/audaspace/FX/AUD_VolumeReader.h @@ -0,0 +1,72 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_VOLUMEREADER +#define AUD_VOLUMEREADER + +#include "AUD_EffectReader.h" +#include "AUD_ConverterFunctions.h" +class AUD_Buffer; + +/** + * This class reads another reader and changes it's volume. + */ +class AUD_VolumeReader : public AUD_EffectReader +{ +private: + /** + * The playback buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The volume level. + */ + float m_volume; + + /** + * Volume adjustment function. + */ + AUD_volume_adjust_f m_adjust; + +public: + /** + * Creates a new volume reader. + * \param reader The reader to read from. + * \param volume The size of the buffer. + * \exception AUD_Exception Thrown if the reader specified is NULL. + */ + AUD_VolumeReader(AUD_IReader* reader, float volume); + + /** + * Destroys the reader. + */ + virtual ~AUD_VolumeReader(); + + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_VOLUMEREADER diff --git a/intern/audaspace/FX/Makefile b/intern/audaspace/FX/Makefile new file mode 100644 index 00000000000..bda0e2bdab6 --- /dev/null +++ b/intern/audaspace/FX/Makefile @@ -0,0 +1,43 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_fx +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += -I../ffmpeg +CPPFLAGS += -I../intern +CPPFLAGS += -I../SDL +CPPFLAGS += -I../SRC +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/Makefile b/intern/audaspace/Makefile new file mode 100644 index 00000000000..474f53f0e0f --- /dev/null +++ b/intern/audaspace/Makefile @@ -0,0 +1,106 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): GSR +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +include nan_definitions.mk + +LIBNAME = audaspace +SOURCEDIR = intern/audaspace +DIR = $(OCGDIR)/$(SOURCEDIR) +DIRS = intern +DIRS += FX +DIRS += SDL +DIRS += SRC + +ifeq ($(WITH_FFMPEG),true) + DIRS += ffmpeg +endif + +ifeq ($(WITH_OPENAL),true) + DIRS += OpenAL +endif + +ifeq ($(WITH_JACK),true) + DIRS += jack +endif + +ifeq ($(WITH_SNDFILE),true) + DIRS += sndfile +endif + +include nan_subdirs.mk + +install: $(ALL_OR_DEBUG) + @[ -d $(NAN_AUDASPACE) ] || mkdir $(NAN_AUDASPACE) + @[ -d $(NAN_AUDASPACE)/include ] || mkdir $(NAN_AUDASPACE)/include + @[ -d $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_sdl.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) + +ifeq ($(WITH_FFMPEG),true) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_ffmpeg.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) +endif + +ifeq ($(WITH_OPENAL),true) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_openal.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) +endif + +ifeq ($(WITH_JACK),true) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_jack.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) +endif + +ifeq ($(WITH_SNDFILE),true) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_sndfile.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) +endif + +ifeq ($(OS),darwin) + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaudaspace.a + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_src.a + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fx.a + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sdl.a + +ifeq ($(WITH_FFMPEG),true) + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a +endif + +ifeq ($(WITH_OPENAL),true) + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a +endif + +ifeq ($(WITH_JACK),true) + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a +endif + +ifeq ($(WITH_SNDFILE),true) + ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a +endif + +endif + @../tools/cpifdiff.sh intern/*.h $(NAN_AUDASPACE)/include/ diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp new file mode 100644 index 00000000000..b33afa2b955 --- /dev/null +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp @@ -0,0 +1,1362 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_OpenALDevice.h" +#include "AUD_IReader.h" +#include "AUD_IMixer.h" +#include "AUD_ConverterFactory.h" +#include "AUD_SourceCaps.h" + +#include +#include + +#ifdef WIN32 +#include +#else +#include +#endif + +#define AUD_OPENAL_CYCLE_BUFFERS 3 + +/// Saves the data for playback. +struct AUD_OpenALHandle : AUD_Handle +{ + /// Whether it's a buffered or a streamed source. + bool isBuffered; + + /// The reader source. + AUD_IReader* reader; + + /// Whether to keep the source if end of it is reached. + bool keep; + + /// OpenAL sample format. + ALenum format; + + /// OpenAL source. + ALuint source; + + /// OpenAL buffers. + ALuint buffers[AUD_OPENAL_CYCLE_BUFFERS]; + + /// The first buffer to be read next. + int current; + + /// Whether the stream doesn't return any more data. + bool data_end; +}; + +struct AUD_OpenALBufferedFactory +{ + /// The factory. + AUD_IFactory* factory; + + /// The OpenAL buffer. + ALuint buffer; +}; + +typedef std::list::iterator AUD_HandleIterator; +typedef std::list::iterator AUD_BFIterator; + +/******************************************************************************/ +/**************************** Threading Code **********************************/ +/******************************************************************************/ + +void* AUD_openalRunThread(void* device) +{ + AUD_OpenALDevice* dev = (AUD_OpenALDevice*)device; + dev->updateStreams(); + return NULL; +} + +void AUD_OpenALDevice::start() +{ + lock(); + + if(!m_playing) + { + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + + pthread_create(&m_thread, &attr, AUD_openalRunThread, this); + + pthread_attr_destroy(&attr); + + m_playing = true; + } + + unlock(); +} + +void AUD_OpenALDevice::updateStreams() +{ + AUD_OpenALHandle* sound; + + int length; + sample_t* buffer; + + ALint info; + AUD_Specs specs; + + while(1) + { + lock(); + + alcSuspendContext(m_context); + + // for all sounds + AUD_HandleIterator it = m_playingSounds->begin(); + while(it != m_playingSounds->end()) + { + sound = *it; + // increment the iterator to make sure it's valid, + // in case the sound gets deleted after stopping + ++it; + + // is it a streamed sound? + if(!sound->isBuffered) + { + // check for buffer refilling + alGetSourcei(sound->source, AL_BUFFERS_PROCESSED, &info); + + if(info) + { + specs = sound->reader->getSpecs(); + + // for all empty buffers + while(info--) + { + // if there's still data to play back + if(!sound->data_end) + { + // read data + length = m_buffersize; + sound->reader->read(length, buffer); + + // read nothing? + if(length == 0) + { + sound->data_end = true; + break; + } + + // unqueue buffer + alSourceUnqueueBuffers(sound->source, 1, + &sound->buffers[sound->current]); + ALenum err; + if((err = alGetError()) != AL_NO_ERROR) + { + sound->data_end = true; + break; + } + + // fill with new data + alBufferData(sound->buffers[sound->current], + sound->format, + buffer, + length * AUD_SAMPLE_SIZE(specs), + specs.rate); + + if(alGetError() != AL_NO_ERROR) + { + sound->data_end = true; + break; + } + + // and queue again + alSourceQueueBuffers(sound->source, 1, + &sound->buffers[sound->current]); + if(alGetError() != AL_NO_ERROR) + { + sound->data_end = true; + break; + } + + sound->current = (sound->current+1) % + AUD_OPENAL_CYCLE_BUFFERS; + } + else + break; + } + } + } + + // check if the sound has been stopped + alGetSourcei(sound->source, AL_SOURCE_STATE, &info); + + if(info != AL_PLAYING) + { + // if it really stopped + if(sound->data_end) + { + // pause or + if(sound->keep) + pause(sound); + // stop + else + stop(sound); + } + // continue playing + else + alSourcePlay(sound->source); + } + } + + alcProcessContext(m_context); + + // stop thread + if(m_playingSounds->empty()) + { + unlock(); + m_playing = false; + pthread_exit(NULL); + } + + unlock(); + +#ifdef WIN32 + Sleep(20); +#else + usleep(20000); +#endif + } +} + +/******************************************************************************/ +/**************************** IDevice Code ************************************/ +/******************************************************************************/ + +bool AUD_OpenALDevice::isValid(AUD_Handle* handle) +{ + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + if(*i == handle) + return true; + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + if(*i == handle) + return true; + return false; +} + +AUD_OpenALDevice::AUD_OpenALDevice(AUD_Specs specs, int buffersize) +{ + // cannot determine how many channels or which format OpenAL uses, but + // it at least is able to play 16 bit stereo audio + specs.channels = AUD_CHANNELS_STEREO; + specs.format = AUD_FORMAT_S16; + + m_device = alcOpenDevice(NULL); + + if(!m_device) + AUD_THROW(AUD_ERROR_OPENAL); + + // at least try to set the frequency + ALCint attribs[] = { ALC_FREQUENCY, specs.rate, 0 }; + ALCint* attributes = attribs; + if(specs.rate == AUD_RATE_INVALID) + attributes = NULL; + + m_context = alcCreateContext(m_device, attributes); + alcMakeContextCurrent(m_context); + + alcGetIntegerv(m_device, ALC_FREQUENCY, 1, (ALCint*)&specs.rate); + + // check for specific formats and channel counts to be played back + if(alIsExtensionPresent("AL_EXT_FLOAT32") == AL_TRUE) + specs.format = AUD_FORMAT_FLOAT32; + + m_useMC = alIsExtensionPresent("AL_EXT_MCFORMATS") == AL_TRUE; + + alGetError(); + + m_converter = new AUD_ConverterFactory(specs); AUD_NEW("factory") + + m_specs = specs; + m_buffersize = buffersize; + m_playing = false; + + m_playingSounds = new std::list(); AUD_NEW("list") + m_pausedSounds = new std::list(); AUD_NEW("list") + m_bufferedFactories = new std::list(); + AUD_NEW("list") + + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + + pthread_mutex_init(&m_mutex, &attr); + + pthread_mutexattr_destroy(&attr); +} + +AUD_OpenALDevice::~AUD_OpenALDevice() +{ + AUD_OpenALHandle* sound; + + lock(); + alcSuspendContext(m_context); + + // delete all playing sounds + while(!m_playingSounds->empty()) + { + sound = *(m_playingSounds->begin()); + alDeleteSources(1, &sound->source); + if(!sound->isBuffered) + { + delete sound->reader; AUD_DELETE("reader") + alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); + } + delete sound; AUD_DELETE("handle") + m_playingSounds->erase(m_playingSounds->begin()); + } + + // delete all paused sounds + while(!m_pausedSounds->empty()) + { + sound = *(m_pausedSounds->begin()); + alDeleteSources(1, &sound->source); + if(!sound->isBuffered) + { + delete sound->reader; AUD_DELETE("reader") + alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); + } + delete sound; AUD_DELETE("handle") + m_pausedSounds->erase(m_pausedSounds->begin()); + } + + // delete all buffered factories + while(!m_bufferedFactories->empty()) + { + alDeleteBuffers(1, &(*(m_bufferedFactories->begin()))->buffer); + delete *m_bufferedFactories->begin(); AUD_DELETE("bufferedfactory"); + m_bufferedFactories->erase(m_bufferedFactories->begin()); + } + + alcProcessContext(m_context); + + // wait for the thread to stop + if(m_playing) + { + unlock(); + pthread_join(m_thread, NULL); + } + else + unlock(); + + delete m_playingSounds; AUD_DELETE("list") + delete m_pausedSounds; AUD_DELETE("list") + delete m_bufferedFactories; AUD_DELETE("list") + + // quit OpenAL + alcMakeContextCurrent(NULL); + alcDestroyContext(m_context); + alcCloseDevice(m_device); + + delete m_converter; AUD_DELETE("factory") + + pthread_mutex_destroy(&m_mutex); +} + +AUD_Specs AUD_OpenALDevice::getSpecs() +{ + return m_specs; +} + +bool AUD_OpenALDevice::getFormat(ALenum &format, AUD_Specs specs) +{ + bool valid = true; + format = 0; + + switch(specs.format) + { + case AUD_FORMAT_U8: + switch(specs.channels) + { + case AUD_CHANNELS_MONO: + format = AL_FORMAT_MONO8; + break; + case AUD_CHANNELS_STEREO: + format = AL_FORMAT_STEREO8; + break; + case AUD_CHANNELS_SURROUND4: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_QUAD8"); + break; + } + case AUD_CHANNELS_SURROUND51: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_51CHN8"); + break; + } + case AUD_CHANNELS_SURROUND61: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_61CHN8"); + break; + } + case AUD_CHANNELS_SURROUND71: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_71CHN8"); + break; + } + default: + valid = false; + } + break; + case AUD_FORMAT_S16: + switch(specs.channels) + { + case AUD_CHANNELS_MONO: + format = AL_FORMAT_MONO16; + break; + case AUD_CHANNELS_STEREO: + format = AL_FORMAT_STEREO16; + break; + case AUD_CHANNELS_SURROUND4: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_QUAD16"); + break; + } + case AUD_CHANNELS_SURROUND51: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_51CHN16"); + break; + } + case AUD_CHANNELS_SURROUND61: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_61CHN16"); + break; + } + case AUD_CHANNELS_SURROUND71: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_71CHN16"); + break; + } + default: + valid = false; + } + break; + case AUD_FORMAT_FLOAT32: + switch(specs.channels) + { + case AUD_CHANNELS_MONO: + format = alGetEnumValue("AL_FORMAT_MONO_FLOAT32"); + break; + case AUD_CHANNELS_STEREO: + format = alGetEnumValue("AL_FORMAT_STEREO_FLOAT32"); + break; + case AUD_CHANNELS_SURROUND4: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_QUAD32"); + break; + } + case AUD_CHANNELS_SURROUND51: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_51CHN32"); + break; + } + case AUD_CHANNELS_SURROUND61: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_61CHN32"); + break; + } + case AUD_CHANNELS_SURROUND71: + if(m_useMC) + { + format = alGetEnumValue("AL_FORMAT_71CHN32"); + break; + } + default: + valid = false; + } + break; + default: + valid = false; + } + + if(!format) + valid = false; + + return valid; +} + +AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep) +{ + // check if it is a buffered factory + for(AUD_BFIterator i = m_bufferedFactories->begin(); + i != m_bufferedFactories->end(); i++) + { + if((*i)->factory == factory) + { + // create the handle + AUD_OpenALHandle* sound = new AUD_OpenALHandle; AUD_NEW("handle") + sound->keep = keep; + sound->current = -1; + sound->isBuffered = true; + sound->data_end = true; + + alcSuspendContext(m_context); + + // OpenAL playback code + try + { + alGenSources(1, &sound->source); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + + try + { + alSourcei(sound->source, AL_BUFFER, (*i)->buffer); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + } + catch(AUD_Exception) + { + alDeleteSources(1, &sound->source); + throw; + } + } + catch(AUD_Exception) + { + delete sound; AUD_DELETE("handle") + alcProcessContext(m_context); + unlock(); + throw; + } + + // play sound + m_playingSounds->push_back(sound); + + alSourcei(sound->source, AL_SOURCE_RELATIVE, 1); + start(); + + alcProcessContext(m_context); + unlock(); + + return sound; + } + } + + AUD_IReader* reader = factory->createReader(); + + if(reader == NULL) + AUD_THROW(AUD_ERROR_READER); + + AUD_Specs specs; + + specs = reader->getSpecs(); + + // check format + bool valid = true; + + if(specs.format == AUD_FORMAT_INVALID) + valid = false; + else if(specs.format == AUD_FORMAT_S24 || + specs.format == AUD_FORMAT_S32 || + specs.format == AUD_FORMAT_FLOAT32 || + specs.format == AUD_FORMAT_FLOAT64) + { + m_converter->setReader(reader); + reader = m_converter->createReader(); + specs = reader->getSpecs(); + } + + // create the handle + AUD_OpenALHandle* sound = new AUD_OpenALHandle; AUD_NEW("handle") + sound->keep = keep; + sound->reader = reader; + sound->current = 0; + sound->isBuffered = false; + sound->data_end = false; + + valid &= getFormat(sound->format, specs); + + if(!valid) + { + delete sound; AUD_DELETE("handle") + delete reader; AUD_DELETE("reader") + return NULL; + } + + lock(); + alcSuspendContext(m_context); + + // OpenAL playback code + try + { + alGenBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + + try + { + sample_t* buf; + int length; + + for(int i = 0; i < AUD_OPENAL_CYCLE_BUFFERS; i++) + { + length = m_buffersize; + reader->read(length, buf); + alBufferData(sound->buffers[i], sound->format, buf, + length * AUD_SAMPLE_SIZE(specs), specs.rate); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + } + + alGenSources(1, &sound->source); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + + try + { + alSourceQueueBuffers(sound->source, AUD_OPENAL_CYCLE_BUFFERS, + sound->buffers); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + } + catch(AUD_Exception) + { + alDeleteSources(1, &sound->source); + throw; + } + } + catch(AUD_Exception) + { + alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); + throw; + } + } + catch(AUD_Exception) + { + delete sound; AUD_DELETE("handle") + delete reader; AUD_DELETE("reader") + alcProcessContext(m_context); + unlock(); + throw; + } + + // play sound + m_playingSounds->push_back(sound); + alSourcei(sound->source, AL_SOURCE_RELATIVE, 1); + + start(); + + alcProcessContext(m_context); + unlock(); + + return sound; +} + +bool AUD_OpenALDevice::pause(AUD_Handle* handle) +{ + // only songs that are played can be paused + lock(); + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + { + if(*i == handle) + { + m_pausedSounds->push_back(*i); + alSourcePause((*i)->source); + m_playingSounds->erase(i); + unlock(); + return true; + } + } + unlock(); + return false; +} + +bool AUD_OpenALDevice::resume(AUD_Handle* handle) +{ + lock(); + + // only songs that are paused can be resumed + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + { + if(*i == handle) + { + m_playingSounds->push_back(*i); + start(); + m_pausedSounds->erase(i); + unlock(); + return true; + } + } + unlock(); + return false; +} + +bool AUD_OpenALDevice::stop(AUD_Handle* handle) +{ + AUD_OpenALHandle* sound; + + lock(); + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + { + if(*i == handle) + { + sound = *i; + alDeleteSources(1, &sound->source); + if(!sound->isBuffered) + { + delete sound->reader; AUD_DELETE("reader") + alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); + } + delete *i; AUD_DELETE("handle") + m_playingSounds->erase(i); + unlock(); + return true; + } + } + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + { + if(*i == handle) + { + sound = *i; + alDeleteSources(1, &sound->source); + if(!sound->isBuffered) + { + delete sound->reader; AUD_DELETE("reader") + alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers); + } + delete *i; AUD_DELETE("handle") + m_pausedSounds->erase(i); + unlock(); + return true; + } + } + unlock(); + return false; +} + +bool AUD_OpenALDevice::setKeep(AUD_Handle* handle, bool keep) +{ + lock(); + if(isValid(handle)) + { + ((AUD_OpenALHandle*)handle)->keep = keep; + unlock(); + return true; + } + unlock(); + return false; +} + +bool AUD_OpenALDevice::sendMessage(AUD_Handle* handle, AUD_Message &message) +{ + lock(); + + bool result = false; + + if(handle == 0) + { + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + if(!(*i)->isBuffered) + result |= (*i)->reader->notify(message); + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + if(!(*i)->isBuffered) + result |= (*i)->reader->notify(message); + } + else if(isValid(handle)) + if(!((AUD_OpenALHandle*)handle)->isBuffered) + result = ((AUD_OpenALHandle*)handle)->reader->notify(message); + unlock(); + return result; +} + +bool AUD_OpenALDevice::seek(AUD_Handle* handle, float position) +{ + lock(); + + if(isValid(handle)) + { + AUD_OpenALHandle* alhandle = (AUD_OpenALHandle*)handle; + if(alhandle->isBuffered) + alSourcef(alhandle->source, AL_SEC_OFFSET, position); + else + { + alhandle->reader->seek((int)(position * + alhandle->reader->getSpecs().rate)); + alhandle->data_end = false; + + ALint info; + + alGetSourcei(alhandle->source, AL_SOURCE_STATE, &info); + + if(info != AL_PLAYING) + { + if(info != AL_STOPPED) + alSourceStop(alhandle->source); + + alSourceUnqueueBuffers(alhandle->source, + AUD_OPENAL_CYCLE_BUFFERS, + alhandle->buffers); + if(alGetError() == AL_NO_ERROR) + { + sample_t* buf; + int length; + AUD_Specs specs = alhandle->reader->getSpecs(); + + for(int i = 0; i < AUD_OPENAL_CYCLE_BUFFERS; i++) + { + length = m_buffersize; + alhandle->reader->read(length, buf); + alBufferData(alhandle->buffers[i], alhandle->format, + buf, length * AUD_SAMPLE_SIZE(specs), + specs.rate); + + if(alGetError() != AL_NO_ERROR) + break; + } + + alSourceQueueBuffers(alhandle->source, + AUD_OPENAL_CYCLE_BUFFERS, + alhandle->buffers); + } + + alSourceRewind(alhandle->source); + } + } + unlock(); + return true; + } + + unlock(); + return false; +} + +float AUD_OpenALDevice::getPosition(AUD_Handle* handle) +{ + lock(); + + float position = 0.0; + + if(isValid(handle)) + { + AUD_OpenALHandle* h = (AUD_OpenALHandle*)handle; + if(h->isBuffered) + alGetSourcef(h->source, AL_SEC_OFFSET, &position); + else + position = h->reader->getPosition() / + (float)h->reader->getSpecs().rate; + } + + unlock(); + return position; +} + +AUD_Status AUD_OpenALDevice::getStatus(AUD_Handle* handle) +{ + lock(); + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + { + if(*i == handle) + { + unlock(); + return AUD_STATUS_PLAYING; + } + } + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + { + if(*i == handle) + { + unlock(); + return AUD_STATUS_PAUSED; + } + } + unlock(); + return AUD_STATUS_INVALID; +} + +void AUD_OpenALDevice::lock() +{ + pthread_mutex_lock(&m_mutex); +} + +void AUD_OpenALDevice::unlock() +{ + pthread_mutex_unlock(&m_mutex); +} + +/******************************************************************************/ +/**************************** Capabilities Code *******************************/ +/******************************************************************************/ + +bool AUD_OpenALDevice::checkCapability(int capability) +{ + return capability == AUD_CAPS_3D_DEVICE || + capability == AUD_CAPS_VOLUME || + capability == AUD_CAPS_SOURCE_VOLUME || + capability == AUD_CAPS_SOURCE_PITCH || + capability == AUD_CAPS_BUFFERED_FACTORY; +} + +bool AUD_OpenALDevice::setCapability(int capability, void *value) +{ + switch(capability) + { + case AUD_CAPS_VOLUME: + alListenerf(AL_GAIN, *((float*)value)); + return true; + case AUD_CAPS_SOURCE_VOLUME: + { + AUD_SourceCaps* caps = (AUD_SourceCaps*) value; + lock(); + if(isValid(caps->handle)) + { + alSourcef(((AUD_OpenALHandle*)caps->handle)->source, + AL_GAIN, caps->value); + unlock(); + return true; + } + unlock(); + } + break; + case AUD_CAPS_SOURCE_PITCH: + { + AUD_SourceCaps* caps = (AUD_SourceCaps*) value; + lock(); + if(isValid(caps->handle)) + { + alSourcef(((AUD_OpenALHandle*)caps->handle)->source, + AL_PITCH, caps->value); + unlock(); + return true; + } + unlock(); + } + break; + case AUD_CAPS_BUFFERED_FACTORY: + { + AUD_IFactory* factory = (AUD_IFactory*) value; + + // load the factory into an OpenAL buffer + if(factory) + { + lock(); + for(AUD_BFIterator i = m_bufferedFactories->begin(); + i != m_bufferedFactories->end(); i++) + { + if((*i)->factory == factory) + { + unlock(); + return true; + } + } + unlock(); + + AUD_IReader* reader = factory->createReader(); + + if(reader == NULL) + return false; + + AUD_Specs specs; + + specs = reader->getSpecs(); + + // determine format + bool valid = reader->getType() == AUD_TYPE_BUFFER; + + if(valid) + { + if(specs.format == AUD_FORMAT_INVALID) + valid = false; + else if(specs.format == AUD_FORMAT_S24 || + specs.format == AUD_FORMAT_S32 || + specs.format == AUD_FORMAT_FLOAT32 || + specs.format == AUD_FORMAT_FLOAT64) + { + m_converter->setReader(reader); + reader = m_converter->createReader(); + specs = reader->getSpecs(); + } + } + + ALenum format; + + if(valid) + valid = getFormat(format, specs); + + if(!valid) + { + delete reader; AUD_DELETE("reader") + return false; + } + + // load into a buffer + lock(); + alcSuspendContext(m_context); + + AUD_OpenALBufferedFactory* bf = new AUD_OpenALBufferedFactory; + AUD_NEW("bufferedfactory"); + bf->factory = factory; + + try + { + alGenBuffers(1, &bf->buffer); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + + try + { + sample_t* buf; + int length = reader->getLength(); + + reader->read(length, buf); + alBufferData(bf->buffer, format, buf, + length * AUD_SAMPLE_SIZE(specs), + specs.rate); + if(alGetError() != AL_NO_ERROR) + AUD_THROW(AUD_ERROR_OPENAL); + } + catch(AUD_Exception) + { + alDeleteBuffers(1, &bf->buffer); + throw; + } + } + catch(AUD_Exception) + { + delete bf; AUD_DELETE("bufferedfactory") + delete reader; AUD_DELETE("reader") + alcProcessContext(m_context); + unlock(); + return false; + } + + m_bufferedFactories->push_back(bf); + + alcProcessContext(m_context); + unlock(); + } + else + { + // stop all playing and paused buffered sources + lock(); + alcSuspendContext(m_context); + + AUD_OpenALHandle* sound; + AUD_HandleIterator it = m_playingSounds->begin(); + while(it != m_playingSounds->end()) + { + sound = *it; + ++it; + + if(sound->isBuffered) + stop(sound); + } + alcProcessContext(m_context); + + while(!m_bufferedFactories->empty()) + { + alDeleteBuffers(1, + &(*(m_bufferedFactories->begin()))->buffer); + delete *m_bufferedFactories->begin(); + AUD_DELETE("bufferedfactory"); + m_bufferedFactories->erase(m_bufferedFactories->begin()); + } + unlock(); + } + + return true; + } + break; + } + return false; +} + +bool AUD_OpenALDevice::getCapability(int capability, void *value) +{ + switch(capability) + { + case AUD_CAPS_VOLUME: + alGetListenerf(AL_GAIN, (float*)value); + return true; + case AUD_CAPS_SOURCE_VOLUME: + { + AUD_SourceCaps* caps = (AUD_SourceCaps*) value; + lock(); + if(isValid(caps->handle)) + { + alGetSourcef(((AUD_OpenALHandle*)caps->handle)->source, + AL_GAIN, &caps->value); + unlock(); + return true; + } + unlock(); + } + break; + case AUD_CAPS_SOURCE_PITCH: + { + AUD_SourceCaps* caps = (AUD_SourceCaps*) value; + lock(); + if(isValid(caps->handle)) + { + alGetSourcef(((AUD_OpenALHandle*)caps->handle)->source, + AL_PITCH, &caps->value); + unlock(); + return true; + } + unlock(); + } + break; + } + return false; +} + +/******************************************************************************/ +/**************************** 3D Device Code **********************************/ +/******************************************************************************/ + +AUD_Handle* AUD_OpenALDevice::play3D(AUD_IFactory* factory, bool keep) +{ + AUD_OpenALHandle* handle = (AUD_OpenALHandle*)play(factory, keep); + if(handle) + alSourcei(handle->source, AL_SOURCE_RELATIVE, 0); + return handle; +} + +bool AUD_OpenALDevice::updateListener(AUD_3DData &data) +{ + alListenerfv(AL_POSITION, (ALfloat*)data.position); + alListenerfv(AL_VELOCITY, (ALfloat*)data.velocity); + alListenerfv(AL_ORIENTATION, (ALfloat*)&(data.orientation[3])); + + return true; +} + +bool AUD_OpenALDevice::setSetting(AUD_3DSetting setting, float value) +{ + switch(setting) + { + case AUD_3DS_DISTANCE_MODEL: + if(value == AUD_DISTANCE_MODEL_NONE) + alDistanceModel(AL_NONE); + else if(value == AUD_DISTANCE_MODEL_INVERSE) + alDistanceModel(AL_INVERSE_DISTANCE); + else if(value == AUD_DISTANCE_MODEL_INVERSE_CLAMPED) + alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); + else if(value == AUD_DISTANCE_MODEL_LINEAR) + alDistanceModel(AL_LINEAR_DISTANCE); + else if(value == AUD_DISTANCE_MODEL_LINEAR_CLAMPED) + alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED); + else if(value == AUD_DISTANCE_MODEL_EXPONENT) + alDistanceModel(AL_EXPONENT_DISTANCE); + else if(value == AUD_DISTANCE_MODEL_EXPONENT_CLAMPED) + alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED); + else + return false; + return true; + case AUD_3DS_DOPPLER_FACTOR: + alDopplerFactor(value); + return true; + case AUD_3DS_SPEED_OF_SOUND: + alSpeedOfSound(value); + return true; + default: + return false; + } +} + +float AUD_OpenALDevice::getSetting(AUD_3DSetting setting) +{ + switch(setting) + { + case AUD_3DS_DISTANCE_MODEL: + switch(alGetInteger(AL_DISTANCE_MODEL)) + { + case AL_NONE: + return AUD_DISTANCE_MODEL_NONE; + case AL_INVERSE_DISTANCE: + return AUD_DISTANCE_MODEL_INVERSE; + case AL_INVERSE_DISTANCE_CLAMPED: + return AUD_DISTANCE_MODEL_INVERSE_CLAMPED; + case AL_LINEAR_DISTANCE: + return AUD_DISTANCE_MODEL_LINEAR; + case AL_LINEAR_DISTANCE_CLAMPED: + return AUD_DISTANCE_MODEL_LINEAR_CLAMPED; + case AL_EXPONENT_DISTANCE: + return AUD_DISTANCE_MODEL_EXPONENT; + case AL_EXPONENT_DISTANCE_CLAMPED: + return AUD_DISTANCE_MODEL_EXPONENT_CLAMPED; + } + case AUD_3DS_DOPPLER_FACTOR: + return alGetFloat(AL_DOPPLER_FACTOR); + case AUD_3DS_SPEED_OF_SOUND: + return alGetFloat(AL_SPEED_OF_SOUND); + default: + return std::numeric_limits::quiet_NaN(); + } +} + +bool AUD_OpenALDevice::updateSource(AUD_Handle* handle, AUD_3DData &data) +{ + lock(); + + if(isValid(handle)) + { + int source = ((AUD_OpenALHandle*)handle)->source; + alSourcefv(source, AL_POSITION, (ALfloat*)data.position); + alSourcefv(source, AL_VELOCITY, (ALfloat*)data.velocity); + alSourcefv(source, AL_DIRECTION, (ALfloat*)&(data.orientation[3])); + unlock(); + return true; + } + + unlock(); + return false; +} + +bool AUD_OpenALDevice::setSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting, + float value) +{ + lock(); + + bool result = false; + + if(isValid(handle)) + { + int source = ((AUD_OpenALHandle*)handle)->source; + + switch(setting) + { + case AUD_3DSS_CONE_INNER_ANGLE: + alSourcef(source, AL_CONE_INNER_ANGLE, value); + result = true; + break; + case AUD_3DSS_CONE_OUTER_ANGLE: + alSourcef(source, AL_CONE_OUTER_ANGLE, value); + result = true; + break; + case AUD_3DSS_CONE_OUTER_GAIN: + alSourcef(source, AL_CONE_OUTER_GAIN, value); + result = true; + break; + case AUD_3DSS_IS_RELATIVE: + alSourcei(source, AL_SOURCE_RELATIVE, value > 0.0); + result = true; + break; + case AUD_3DSS_MAX_DISTANCE: + alSourcef(source, AL_MAX_DISTANCE, value); + result = true; + break; + case AUD_3DSS_MAX_GAIN: + alSourcef(source, AL_MAX_GAIN, value); + result = true; + break; + case AUD_3DSS_MIN_GAIN: + alSourcef(source, AL_MIN_GAIN, value); + result = true; + break; + case AUD_3DSS_REFERENCE_DISTANCE: + alSourcef(source, AL_REFERENCE_DISTANCE, value); + result = true; + break; + case AUD_3DSS_ROLLOFF_FACTOR: + alSourcef(source, AL_ROLLOFF_FACTOR, value); + result = true; + break; + default: + break; + } + } + + unlock(); + return result; +} + +float AUD_OpenALDevice::getSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting) +{ + float result = std::numeric_limits::quiet_NaN();; + + lock(); + + if(isValid(handle)) + { + int source = ((AUD_OpenALHandle*)handle)->source; + + switch(setting) + { + case AUD_3DSS_CONE_INNER_ANGLE: + alGetSourcef(source, AL_CONE_INNER_ANGLE, &result); + break; + case AUD_3DSS_CONE_OUTER_ANGLE: + alGetSourcef(source, AL_CONE_OUTER_ANGLE, &result); + break; + case AUD_3DSS_CONE_OUTER_GAIN: + alGetSourcef(source, AL_CONE_OUTER_GAIN, &result); + break; + case AUD_3DSS_IS_RELATIVE: + { + ALint i; + alGetSourcei(source, AL_SOURCE_RELATIVE, &i); + result = i ? 1.0 : 0.0; + break; + } + case AUD_3DSS_MAX_DISTANCE: + alGetSourcef(source, AL_MAX_DISTANCE, &result); + break; + case AUD_3DSS_MAX_GAIN: + alGetSourcef(source, AL_MAX_GAIN, &result); + break; + case AUD_3DSS_MIN_GAIN: + alGetSourcef(source, AL_MIN_GAIN, &result); + break; + case AUD_3DSS_REFERENCE_DISTANCE: + alGetSourcef(source, AL_REFERENCE_DISTANCE, &result); + break; + case AUD_3DSS_ROLLOFF_FACTOR: + alGetSourcef(source, AL_ROLLOFF_FACTOR, &result); + break; + default: + break; + } + } + + unlock(); + return result; +} diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.h b/intern/audaspace/OpenAL/AUD_OpenALDevice.h new file mode 100644 index 00000000000..074cd3d1924 --- /dev/null +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.h @@ -0,0 +1,171 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_OPENALDEVICE +#define AUD_OPENALDEVICE + +#include "AUD_IDevice.h" +#include "AUD_I3DDevice.h" +struct AUD_OpenALHandle; +struct AUD_OpenALBufferedFactory; +class AUD_ConverterFactory; + +#include +#include +#include +#include + +/** + * This device plays through OpenAL. + */ +class AUD_OpenALDevice : public AUD_IDevice, public AUD_I3DDevice +{ +private: + /** + * The OpenAL device handle. + */ + ALCdevice* m_device; + + /** + * The OpenAL context. + */ + ALCcontext* m_context; + + /** + * The specification of the device. + */ + AUD_Specs m_specs; + + /** + * Whether the device has the AL_EXT_MCFORMATS extension. + */ + bool m_useMC; + + /** + * The converter factory for readers with wrong input format. + */ + AUD_ConverterFactory* m_converter; + + /** + * The list of sounds that are currently playing. + */ + std::list* m_playingSounds; + + /** + * The list of sounds that are currently paused. + */ + std::list* m_pausedSounds; + + /** + * The list of buffered factories. + */ + std::list* m_bufferedFactories; + + /** + * The mutex for locking. + */ + pthread_mutex_t m_mutex; + + /** + * The streaming thread. + */ + pthread_t m_thread; + + /** + * The condition for streaming thread wakeup. + */ + bool m_playing; + + /** + * Buffer size. + */ + int m_buffersize; + + /** + * Starts the streaming thread. + */ + void start(); + + /** + * Checks if a handle is valid. + * \param handle The handle to check. + * \return Whether the handle is valid. + */ + bool isValid(AUD_Handle* handle); + + /** + * Gets the format according to the specs. + * \param format The variable to put the format into. + * \param specs The specs to read the format from. + * \return Whether the format is valid or not. + */ + bool getFormat(ALenum &format, AUD_Specs specs); + +public: + /** + * Opens the OpenAL audio device for playback. + * \param specs The wanted audio specification. + * \param buffersize The size of the internal buffer. + * \note The specification really used for opening the device may differ. + * \note The buffersize will be multiplicated by three for this device. + * \exception AUD_Exception Thrown if the audio device cannot be opened. + */ + AUD_OpenALDevice(AUD_Specs specs, int buffersize = AUD_DEFAULT_BUFFER_SIZE); + + /** + * Streaming thread main function. + */ + void updateStreams(); + + virtual ~AUD_OpenALDevice(); + + virtual AUD_Specs getSpecs(); + virtual AUD_Handle* play(AUD_IFactory* factory, bool keep = false); + virtual bool pause(AUD_Handle* handle); + virtual bool resume(AUD_Handle* handle); + virtual bool stop(AUD_Handle* handle); + virtual bool setKeep(AUD_Handle* handle, bool keep); + virtual bool sendMessage(AUD_Handle* handle, AUD_Message &message); + virtual bool seek(AUD_Handle* handle, float position); + virtual float getPosition(AUD_Handle* handle); + virtual AUD_Status getStatus(AUD_Handle* handle); + virtual void lock(); + virtual void unlock(); + virtual bool checkCapability(int capability); + virtual bool setCapability(int capability, void *value); + virtual bool getCapability(int capability, void *value); + + virtual AUD_Handle* play3D(AUD_IFactory* factory, bool keep = false); + virtual bool updateListener(AUD_3DData &data); + virtual bool setSetting(AUD_3DSetting setting, float value); + virtual float getSetting(AUD_3DSetting setting); + virtual bool updateSource(AUD_Handle* handle, AUD_3DData &data); + virtual bool setSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting, float value); + virtual float getSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting); +}; + +#endif //AUD_OPENALDEVICE diff --git a/intern/audaspace/OpenAL/Makefile b/intern/audaspace/OpenAL/Makefile new file mode 100644 index 00000000000..4cf9f66b06c --- /dev/null +++ b/intern/audaspace/OpenAL/Makefile @@ -0,0 +1,39 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_openal +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += -I../intern +CPPFLAGS += -I. diff --git a/intern/audaspace/SConscript b/intern/audaspace/SConscript new file mode 100644 index 00000000000..025fa5a2379 --- /dev/null +++ b/intern/audaspace/SConscript @@ -0,0 +1,34 @@ +#!/usr/bin/python + +Import ('env') + +sources = env.Glob('intern/*.cpp') + env.Glob('FX/*.cpp') + env.Glob('SRC/*.cpp') +incs = '. intern FX SRC ' + env['BF_PTHREADS_INC'] + ' ' + env['BF_LIBSAMPLERATE_INC'] +defs = [] + +if env['WITH_BF_FFMPEG']: + sources += env.Glob('ffmpeg/*.cpp') + incs += ' ffmpeg ' + env['BF_FFMPEG_INC'] + defs.append('WITH_FFMPEG') + +if env['WITH_BF_SDL']: + sources += env.Glob('SDL/*.cpp') + incs += ' SDL ' + env['BF_SDL_INC'] + defs.append('WITH_SDL') + +if env['WITH_BF_OPENAL']: + sources += env.Glob('OpenAL/*.cpp') + incs += ' OpenAL ' + env['BF_OPENAL_INC'] + defs.append('WITH_OPENAL') + +if env['WITH_BF_JACK']: + sources += env.Glob('jack/*.cpp') + incs += ' jack ' + env['BF_JACK_INC'] + defs.append('WITH_JACK') + +if env['WITH_BF_SNDFILE']: + sources += env.Glob('sndfile/*.cpp') + incs += ' sndfile ' + env['BF_SNDFILE_INC'] + defs.append('WITH_SNDFILE') + +env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] ) diff --git a/intern/audaspace/SDL/AUD_SDLDevice.cpp b/intern/audaspace/SDL/AUD_SDLDevice.cpp new file mode 100644 index 00000000000..dd443e7f5c7 --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLDevice.cpp @@ -0,0 +1,90 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SDLMixer.h" +#include "AUD_SDLDevice.h" +#include "AUD_IReader.h" + +void AUD_SDLDevice::SDL_mix(void *data, Uint8* buffer, int length) +{ + AUD_SDLDevice* device = (AUD_SDLDevice*)data; + + device->mix((sample_t*)buffer, length/AUD_SAMPLE_SIZE(device->m_specs)); +} + +AUD_SDLDevice::AUD_SDLDevice(AUD_Specs specs, int buffersize) +{ + if(specs.channels == AUD_CHANNELS_INVALID) + specs.channels = AUD_CHANNELS_STEREO; + if(specs.format == AUD_FORMAT_INVALID) + specs.format = AUD_FORMAT_S16; + if(specs.rate == AUD_RATE_INVALID) + specs.rate = AUD_RATE_44100; + + m_specs = specs; + + SDL_AudioSpec format, obtained; + + format.freq = m_specs.rate; + if(m_specs.format == AUD_FORMAT_U8) + format.format = AUDIO_U8; + else + format.format = AUDIO_S16SYS; + format.channels = m_specs.channels; + format.samples = buffersize; + format.callback = AUD_SDLDevice::SDL_mix; + format.userdata = this; + + if(SDL_OpenAudio(&format, &obtained) != 0) + AUD_THROW(AUD_ERROR_SDL); + + m_specs.rate = (AUD_SampleRate)obtained.freq; + m_specs.channels = (AUD_Channels)obtained.channels; + if(obtained.format == AUDIO_U8) + m_specs.format = AUD_FORMAT_U8; + else if(obtained.format == AUDIO_S16LSB || obtained.format == AUDIO_S16MSB) + m_specs.format = AUD_FORMAT_S16; + else + AUD_THROW(AUD_ERROR_SDL); + + m_mixer = new AUD_SDLMixer(); AUD_NEW("mixer") + m_mixer->setSpecs(m_specs); + + create(); +} + +AUD_SDLDevice::~AUD_SDLDevice() +{ + lock(); + SDL_CloseAudio(); + unlock(); + + destroy(); +} + +void AUD_SDLDevice::playing(bool playing) +{ + SDL_PauseAudio(playing ? 0 : 1); +} diff --git a/intern/audaspace/SDL/AUD_SDLDevice.h b/intern/audaspace/SDL/AUD_SDLDevice.h new file mode 100644 index 00000000000..e2c6f7631b7 --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLDevice.h @@ -0,0 +1,66 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SDLDEVICE +#define AUD_SDLDEVICE + +#include "AUD_SoftwareDevice.h" + +#include + +/** + * This device plays back through SDL, the simple direct media layer. + */ +class AUD_SDLDevice : public AUD_SoftwareDevice +{ +private: + /** + * Mixes the next bytes into the buffer. + * \param data The SDL device. + * \param buffer The target buffer. + * \param length The length in bytes to be filled. + */ + static void SDL_mix(void *data, Uint8* buffer, int length); + +protected: + virtual void playing(bool playing); + +public: + /** + * Opens the SDL audio device for playback. + * \param specs The wanted audio specification. + * \param buffersize The size of the internal buffer. + * \note The specification really used for opening the device may differ. + * \exception AUD_Exception Thrown if the audio device cannot be opened. + */ + AUD_SDLDevice(AUD_Specs specs, int buffersize = AUD_DEFAULT_BUFFER_SIZE); + + /** + * Closes the SDL audio device. + */ + virtual ~AUD_SDLDevice(); +}; + +#endif //AUD_SDLDEVICE diff --git a/intern/audaspace/SDL/AUD_SDLMixer.cpp b/intern/audaspace/SDL/AUD_SDLMixer.cpp new file mode 100644 index 00000000000..cacc0c7063c --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLMixer.cpp @@ -0,0 +1,83 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SDLMixer.h" +#include "AUD_SDLMixerFactory.h" + +#include + +AUD_SDLMixer::AUD_SDLMixer() +{ + m_factory = NULL; +} + +AUD_SDLMixer::~AUD_SDLMixer() +{ + if(m_factory) + { + delete m_factory; AUD_DELETE("factory") + } +} + +AUD_IReader* AUD_SDLMixer::prepare(AUD_IReader* reader) +{ + m_factory->setReader(reader); + return m_factory->createReader(); +} + +void AUD_SDLMixer::setSpecs(AUD_Specs specs) +{ + m_samplesize = AUD_SAMPLE_SIZE(specs); + if(m_factory) + { + delete m_factory; AUD_DELETE("factory") + } + m_factory = new AUD_SDLMixerFactory(specs); AUD_NEW("factory") +} + +void AUD_SDLMixer::add(sample_t* buffer, AUD_Specs specs, int length, + float volume) +{ + AUD_SDLMixerBuffer buf; + buf.buffer = buffer; + buf.length = length; + buf.volume = volume; + m_buffers.push_back(buf); +} + +void AUD_SDLMixer::superpose(sample_t* buffer, int length, float volume) +{ + AUD_SDLMixerBuffer buf; + + while(!m_buffers.empty()) + { + buf = m_buffers.front(); + m_buffers.pop_front(); + SDL_MixAudio((Uint8*)buffer, + (Uint8*)buf.buffer, + buf.length * m_samplesize, + (int)(SDL_MIX_MAXVOLUME * volume * buf.volume)); + } +} diff --git a/intern/audaspace/SDL/AUD_SDLMixer.h b/intern/audaspace/SDL/AUD_SDLMixer.h new file mode 100644 index 00000000000..2cc4e51f66d --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLMixer.h @@ -0,0 +1,76 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SDLMIXER +#define AUD_SDLMIXER + +#include "AUD_IMixer.h" +class AUD_SDLMixerFactory; +#include + +struct AUD_SDLMixerBuffer +{ + sample_t* buffer; + int length; + float volume; +}; + +/** + * This class is able to mix audiosignals with the help of SDL. + */ +class AUD_SDLMixer : public AUD_IMixer +{ +private: + /** + * The mixer factory that prepares all readers for superposition. + */ + AUD_SDLMixerFactory* m_factory; + + /** + * The list of buffers to superpose. + */ + std::list m_buffers; + + /** + * The size of an output sample. + */ + int m_samplesize; + +public: + /** + * Creates the mixer. + */ + AUD_SDLMixer(); + + virtual ~AUD_SDLMixer(); + + virtual AUD_IReader* prepare(AUD_IReader* reader); + virtual void setSpecs(AUD_Specs specs); + virtual void add(sample_t* buffer, AUD_Specs specs, int length, + float volume); + virtual void superpose(sample_t* buffer, int length, float volume); +}; + +#endif //AUD_SDLMIXER diff --git a/intern/audaspace/SDL/AUD_SDLMixerFactory.cpp b/intern/audaspace/SDL/AUD_SDLMixerFactory.cpp new file mode 100644 index 00000000000..e0b0c7d3603 --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLMixerFactory.cpp @@ -0,0 +1,65 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SDLMixerFactory.h" +#include "AUD_SDLMixerReader.h" + +#include + +AUD_SDLMixerFactory::AUD_SDLMixerFactory(AUD_IReader* reader, AUD_Specs specs) : + AUD_MixerFactory(reader, specs) {} + +AUD_SDLMixerFactory::AUD_SDLMixerFactory(AUD_IFactory* factory, AUD_Specs specs) : + AUD_MixerFactory(factory, specs) {} + +AUD_SDLMixerFactory::AUD_SDLMixerFactory(AUD_Specs specs) : + AUD_MixerFactory(specs) {} + +AUD_IReader* AUD_SDLMixerFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + AUD_Specs specs = reader->getSpecs(); + if(memcmp(&m_specs, &specs, sizeof(AUD_Specs)) != 0) + { + try + { + reader = new AUD_SDLMixerReader(reader, m_specs); + AUD_NEW("reader") + } + catch(AUD_Exception e) + { + // return 0 in case SDL cannot mix the source + if(e.error != AUD_ERROR_SDL) + throw; + else + reader = NULL; + } + } + } + return reader; +} diff --git a/intern/audaspace/SDL/AUD_SDLMixerFactory.h b/intern/audaspace/SDL/AUD_SDLMixerFactory.h new file mode 100644 index 00000000000..44b36d06859 --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLMixerFactory.h @@ -0,0 +1,45 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SDLMIXERFACTORY +#define AUD_SDLMIXERFACTORY + +#include "AUD_MixerFactory.h" + +/** + * This factory creates a resampling reader that uses SDL's resampling + * functionality which unfortunately is very very very limited. + */ +class AUD_SDLMixerFactory : public AUD_MixerFactory +{ +public: + AUD_SDLMixerFactory(AUD_IReader* reader, AUD_Specs specs); + AUD_SDLMixerFactory(AUD_IFactory* factory, AUD_Specs specs); + AUD_SDLMixerFactory(AUD_Specs specs); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_SDLMIXERFACTORY diff --git a/intern/audaspace/SDL/AUD_SDLMixerReader.cpp b/intern/audaspace/SDL/AUD_SDLMixerReader.cpp new file mode 100644 index 00000000000..0a47e36533a --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLMixerReader.cpp @@ -0,0 +1,216 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SDLMixerReader.h" +#include "AUD_Buffer.h" + +#include + +inline Uint16 AUD_TO_SDL(AUD_SampleFormat format) +{ + // SDL only supports 8 and 16 bit audio + switch(format) + { + case AUD_FORMAT_U8: + return AUDIO_U8; + case AUD_FORMAT_S16: + return AUDIO_S16SYS; + default: + AUD_THROW(AUD_ERROR_SDL); + } +} + +// greatest common divisor +inline int gcd(int a, int b) +{ + int c; + + // make sure a is the bigger + if(b > a) + { + c = b; + b = a; + a = c; + } + + // greetings from Euclides + while(b != 0) + { + c = a % b; + a = b; + b = c; + } + return a; +} + +AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader, + AUD_Specs specs) +{ + if(reader == NULL) + AUD_THROW(AUD_ERROR_READER); + + m_reader = reader; + m_tspecs = specs; + m_sspecs = reader->getSpecs(); + + try + { + // SDL only supports 8 and 16 bit sample formats + if(SDL_BuildAudioCVT(&m_cvt, + AUD_TO_SDL(m_sspecs.format), + m_sspecs.channels, + m_sspecs.rate, + AUD_TO_SDL(specs.format), + specs.channels, + specs.rate) == -1) + AUD_THROW(AUD_ERROR_SDL); + } + catch(AUD_Exception) + { + delete m_reader; AUD_DELETE("reader") + throw; + } + + m_eor = false; + m_rsposition = 0; + m_rssize = 0; + m_ssize = m_sspecs.rate / gcd(specs.rate, m_sspecs.rate); + m_tsize = m_tspecs.rate * m_ssize / m_sspecs.rate; + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") + m_rsbuffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_SDLMixerReader::~AUD_SDLMixerReader() +{ + delete m_reader; AUD_DELETE("reader") + delete m_buffer; AUD_DELETE("buffer") + delete m_rsbuffer; AUD_DELETE("buffer") +} + +bool AUD_SDLMixerReader::isSeekable() +{ + return m_reader->isSeekable(); +} + +void AUD_SDLMixerReader::seek(int position) +{ + m_reader->seek(position * m_ssize / m_tsize); + m_eor = false; +} + +int AUD_SDLMixerReader::getLength() +{ + return m_reader->getLength() * m_tsize / m_ssize; +} + +int AUD_SDLMixerReader::getPosition() +{ + return m_reader->getPosition() * m_tsize / m_ssize; +} + +AUD_Specs AUD_SDLMixerReader::getSpecs() +{ + return m_tspecs; +} + +AUD_ReaderType AUD_SDLMixerReader::getType() +{ + return m_reader->getType(); +} + +bool AUD_SDLMixerReader::notify(AUD_Message &message) +{ + return m_reader->notify(message); +} + +void AUD_SDLMixerReader::read(int & length, sample_t* & buffer) +{ + // sample count for the target buffer without getting a shift + int tns = length + m_tsize - length % m_tsize; + // sample count for the source buffer without getting a shift + int sns = tns * m_ssize / m_tsize; + // target sample size + int tss = AUD_SAMPLE_SIZE(m_tspecs); + // source sample size + int sss = AUD_SAMPLE_SIZE(m_sspecs); + + // input is output buffer + int buf_size = AUD_MAX(tns*tss, sns*sss); + + // resize if necessary + if(m_rsbuffer->getSize() < buf_size) + m_rsbuffer->resize(buf_size, true); + + if(m_buffer->getSize() < length*tss) + m_buffer->resize(length*tss); + + buffer = m_buffer->getBuffer(); + int size; + int index = 0; + sample_t* buf; + + while(index < length) + { + if(m_rsposition == m_rssize) + { + // no more data + if(m_eor) + length = index; + // mix + else + { + // read from source + size = sns; + m_reader->read(size, buf); + + // prepare + m_cvt.buf = m_rsbuffer->getBuffer(); + m_cvt.len = size*sss; + memcpy(m_cvt.buf, buf, size*sss); + + // convert + SDL_ConvertAudio(&m_cvt); + + // end of reader + if(size < sns) + m_eor = true; + + m_rsposition = 0; + m_rssize = size * m_tsize / m_ssize; + } + } + + // size to copy + size = AUD_MIN(m_rssize-m_rsposition, length-index); + + // copy + memcpy(m_buffer->getBuffer() + index * tss, + m_rsbuffer->getBuffer() + m_rsposition * tss, + size*tss); + m_rsposition += size; + index += size; + } +} diff --git a/intern/audaspace/SDL/AUD_SDLMixerReader.h b/intern/audaspace/SDL/AUD_SDLMixerReader.h new file mode 100644 index 00000000000..56668d02171 --- /dev/null +++ b/intern/audaspace/SDL/AUD_SDLMixerReader.h @@ -0,0 +1,128 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SDLMIXERREADER +#define AUD_SDLMIXERREADER + +#include "AUD_IReader.h" +class AUD_Buffer; + +#include + +/** + * This class mixes a sound source with help of the SDL library. + * Unfortunately SDL is only capable of 8 and 16 bit audio, mono and stereo, as + * well as resampling only 2^n sample rate relationships where n is a natural + * number. + * \warning Although SDL can only resample 2^n sample rate relationships, this + * class doesn't check for compliance, so in case of other factors, + * the behaviour is undefined. + */ +class AUD_SDLMixerReader : public AUD_IReader +{ +private: + /** + * The reader that is being mixed. + */ + AUD_IReader* m_reader; + + /** + * The current reading position in the resampling buffer. + */ + int m_rsposition; + + /** + * The count of mixed samples in the resampling buffer. + */ + int m_rssize; + + /** + * The smallest count of source samples to get a fractionless resampling + * factor. + */ + int m_ssize; + + /** + * The smallest count of target samples to get a fractionless resampling + * factor. + */ + int m_tsize; + + /** + * The sound output buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The resampling buffer. + */ + AUD_Buffer *m_rsbuffer; + + /** + * The target specification. + */ + AUD_Specs m_tspecs; + + /** + * The sample specification of the source. + */ + AUD_Specs m_sspecs; + + /** + * Saves whether the end of the source has been reached. + */ + bool m_eor; + + /** + * The SDL_AudioCVT structure used for resampling. + */ + SDL_AudioCVT m_cvt; + +public: + /** + * Creates a resampling reader. + * \param reader The reader to mix. + * \param specs The target specification. + * \exception AUD_Exception Thrown if the source specification cannot be + * mixed to the target specification or if the reader is + * NULL. + */ + AUD_SDLMixerReader(AUD_IReader* reader, AUD_Specs specs); + /** + * Destroys the reader. + */ + ~AUD_SDLMixerReader(); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_SDLMIXERREADER diff --git a/intern/audaspace/SDL/Makefile b/intern/audaspace/SDL/Makefile new file mode 100644 index 00000000000..02a4068f3dc --- /dev/null +++ b/intern/audaspace/SDL/Makefile @@ -0,0 +1,41 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_sdl +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += $(NAN_SDLCFLAGS) +CPPFLAGS += -I../intern +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/SRC/AUD_SRCResampleFactory.cpp b/intern/audaspace/SRC/AUD_SRCResampleFactory.cpp new file mode 100644 index 00000000000..bcace340b24 --- /dev/null +++ b/intern/audaspace/SRC/AUD_SRCResampleFactory.cpp @@ -0,0 +1,53 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SRCResampleFactory.h" +#include "AUD_SRCResampleReader.h" + +AUD_SRCResampleFactory::AUD_SRCResampleFactory(AUD_IReader* reader, + AUD_Specs specs) : + AUD_ResampleFactory(reader, specs) {} + +AUD_SRCResampleFactory::AUD_SRCResampleFactory(AUD_IFactory* factory, + AUD_Specs specs) : + AUD_ResampleFactory(factory, specs) {} + +AUD_SRCResampleFactory::AUD_SRCResampleFactory(AUD_Specs specs) : + AUD_ResampleFactory(specs) {} + +AUD_IReader* AUD_SRCResampleFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + if(reader->getSpecs().rate != m_specs.rate) + { + reader = new AUD_SRCResampleReader(reader, m_specs); + AUD_NEW("reader") + } + } + return reader; +} diff --git a/intern/audaspace/SRC/AUD_SRCResampleFactory.h b/intern/audaspace/SRC/AUD_SRCResampleFactory.h new file mode 100644 index 00000000000..c23c1d2c82e --- /dev/null +++ b/intern/audaspace/SRC/AUD_SRCResampleFactory.h @@ -0,0 +1,46 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SRCRESAMPLEFACTORY +#define AUD_SRCRESAMPLEFACTORY + +#include "AUD_ResampleFactory.h" + +/** + * This factory creates a resampling reader that uses libsamplerate for + * resampling. + * \note The format of the input must be float. + */ +class AUD_SRCResampleFactory : public AUD_ResampleFactory +{ +public: + AUD_SRCResampleFactory(AUD_IReader* reader, AUD_Specs specs); + AUD_SRCResampleFactory(AUD_IFactory* factory, AUD_Specs specs); + AUD_SRCResampleFactory(AUD_Specs specs); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_SRCRESAMPLEFACTORY diff --git a/intern/audaspace/SRC/AUD_SRCResampleReader.cpp b/intern/audaspace/SRC/AUD_SRCResampleReader.cpp new file mode 100644 index 00000000000..f7564d3c010 --- /dev/null +++ b/intern/audaspace/SRC/AUD_SRCResampleReader.cpp @@ -0,0 +1,119 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SRCResampleReader.h" +#include "AUD_Buffer.h" + +#include +#include +#include + +static long src_callback(void *cb_data, float **data) +{ + return ((AUD_SRCResampleReader*)cb_data)->doCallback(data); +} + +AUD_SRCResampleReader::AUD_SRCResampleReader(AUD_IReader* reader, + AUD_Specs specs) : + AUD_EffectReader(reader) +{ + m_sspecs = reader->getSpecs(); + + if(m_sspecs.format != AUD_FORMAT_FLOAT32) + { + delete m_reader; AUD_DELETE("reader") + AUD_THROW(AUD_ERROR_READER); + } + + m_tspecs = specs; + m_tspecs.channels = m_sspecs.channels; + m_tspecs.format = m_sspecs.format; + m_factor = (double)m_tspecs.rate / (double)m_sspecs.rate; + + int error; + m_src = src_callback_new(src_callback, + SRC_SINC_MEDIUM_QUALITY, + m_sspecs.channels, + &error, + this); + + if(!m_src) + { + // XXX printf("%s\n", src_strerror(error)); + delete m_reader; AUD_DELETE("reader") + AUD_THROW(AUD_ERROR_READER); + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_SRCResampleReader::~AUD_SRCResampleReader() +{ + delete m_buffer; AUD_DELETE("buffer") + + src_delete(m_src); +} + +long AUD_SRCResampleReader::doCallback(float** data) +{ + int length = m_buffer->getSize() / 4 / m_tspecs.channels; + sample_t* buffer; + + m_reader->read(length, buffer); + + *data = (float*)buffer; + return length; +} + +void AUD_SRCResampleReader::seek(int position) +{ + m_reader->seek(position / m_factor); + src_reset(m_src); +} + +int AUD_SRCResampleReader::getLength() +{ + return m_reader->getLength() * m_factor; +} + +int AUD_SRCResampleReader::getPosition() +{ + return m_reader->getPosition() * m_factor; +} + +AUD_Specs AUD_SRCResampleReader::getSpecs() +{ + return m_tspecs; +} + +void AUD_SRCResampleReader::read(int & length, sample_t* & buffer) +{ + if(m_buffer->getSize() < length * m_tspecs.channels * 4) + m_buffer->resize(length * m_tspecs.channels * 4); + + buffer = m_buffer->getBuffer(); + + length = src_callback_read(m_src, m_factor, length, (float*)buffer); +} diff --git a/intern/audaspace/SRC/AUD_SRCResampleReader.h b/intern/audaspace/SRC/AUD_SRCResampleReader.h new file mode 100644 index 00000000000..1bacdb3965c --- /dev/null +++ b/intern/audaspace/SRC/AUD_SRCResampleReader.h @@ -0,0 +1,102 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SRCRESAMPLEREADER +#define AUD_SRCRESAMPLEREADER + +#include "AUD_EffectReader.h" +class AUD_Buffer; + +#include + +/** + * This class mixes a sound source with help of the SDL library. + * Unfortunately SDL is only capable of 8 and 16 bit audio, mono and stereo, as + * well as resampling only 2^n sample rate relationships where n is a natural + * number. + * \warning Although SDL can only resample 2^n sample rate relationships, this + * class doesn't check for compliance, so in case of other factors, + * the behaviour is undefined. + */ +class AUD_SRCResampleReader : public AUD_EffectReader +{ +private: + /** + * The resampling factor. + */ + double m_factor; + + /** + * The sound output buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The target specification. + */ + AUD_Specs m_tspecs; + + /** + * The sample specification of the source. + */ + AUD_Specs m_sspecs; + + /** + * The src state structure. + */ + SRC_STATE* m_src; + +public: + /** + * Creates a resampling reader. + * \param reader The reader to mix. + * \param specs The target specification. + * \exception AUD_Exception Thrown if the source specification cannot be + * mixed to the target specification or if the reader is + * NULL. + */ + AUD_SRCResampleReader(AUD_IReader* reader, AUD_Specs specs); + + /** + * Destroys the reader. + */ + ~AUD_SRCResampleReader(); + + /** + * The callback function for SRC. + * \warning Do not call! + * \param data The pointer to the float data. + * \return The count of samples in the float data. + */ + long doCallback(float** data); + + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_SRCRESAMPLEREADER diff --git a/intern/audaspace/SRC/Makefile b/intern/audaspace/SRC/Makefile new file mode 100644 index 00000000000..5cf5f55b11f --- /dev/null +++ b/intern/audaspace/SRC/Makefile @@ -0,0 +1,44 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_src +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += -I$(LCGDIR)/samplerate/include/ +CPPFLAGS += -I../ffmpeg +CPPFLAGS += -I../FX +CPPFLAGS += -I../SDL +CPPFLAGS += -I../intern +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp new file mode 100644 index 00000000000..f67c819ff10 --- /dev/null +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp @@ -0,0 +1,65 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FFMPEGFactory.h" +#include "AUD_FFMPEGReader.h" +#include "AUD_Buffer.h" + +AUD_FFMPEGFactory::AUD_FFMPEGFactory(const char* filename) +{ + if(filename != NULL) + { + m_filename = new char[strlen(filename)+1]; AUD_NEW("string") + strcpy(m_filename, filename); + } + else + m_filename = NULL; +} + +AUD_FFMPEGFactory::AUD_FFMPEGFactory(unsigned char* buffer, int size) +{ + m_filename = NULL; + m_buffer = AUD_Reference(new AUD_Buffer(size)); + memcpy(m_buffer.get()->getBuffer(), buffer, size); +} + +AUD_FFMPEGFactory::~AUD_FFMPEGFactory() +{ + if(m_filename) + { + delete[] m_filename; AUD_DELETE("string") + } +} + +AUD_IReader* AUD_FFMPEGFactory::createReader() +{ + AUD_IReader* reader; + if(m_filename) + reader = new AUD_FFMPEGReader(m_filename); + else + reader = new AUD_FFMPEGReader(m_buffer); + AUD_NEW("reader") + return reader; +} diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h new file mode 100644 index 00000000000..22560303a73 --- /dev/null +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h @@ -0,0 +1,73 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_FFMPEGFACTORY +#define AUD_FFMPEGFACTORY + +#include "AUD_IFactory.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +/** + * This factory reads a sound file via ffmpeg. + * \warning Notice that the needed formats and codecs have to be registered + * for ffmpeg before this class can be used. + */ +class AUD_FFMPEGFactory : public AUD_IFactory +{ +private: + /** + * The filename of the sound source file. + */ + char* m_filename; + + /** + * The buffer to read from. + */ + AUD_Reference m_buffer; + +public: + /** + * Creates a new factory. + * \param filename The sound file path. + */ + AUD_FFMPEGFactory(const char* filename); + + /** + * Creates a new factory. + * \param buffer The buffer to read from. + * \param size The size of the buffer. + */ + AUD_FFMPEGFactory(unsigned char* buffer, int size); + + /** + * Destroys the factory. + */ + ~AUD_FFMPEGFactory(); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_FFMPEGFACTORY diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp new file mode 100644 index 00000000000..0384ba5e0e6 --- /dev/null +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp @@ -0,0 +1,388 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +// needed for INT64_C +#define __STDC_CONSTANT_MACROS + +#include "AUD_FFMPEGReader.h" +#include "AUD_Buffer.h" + +extern "C" { +#include +#include +} + +// This function transforms a FFMPEG SampleFormat to our own sample format +static inline AUD_SampleFormat FFMPEG_TO_AUD(SampleFormat fmt) +{ + switch(fmt) + { + case SAMPLE_FMT_U8: + return AUD_FORMAT_U8; + case SAMPLE_FMT_S16: + return AUD_FORMAT_S16; + case SAMPLE_FMT_S32: + return AUD_FORMAT_S32; + case SAMPLE_FMT_FLT: + return AUD_FORMAT_FLOAT32; + case SAMPLE_FMT_DBL: + return AUD_FORMAT_FLOAT64; + default: + return AUD_FORMAT_INVALID; + } +} + +int AUD_FFMPEGReader::decode(AVPacket* packet, AUD_Buffer* buffer) +{ + // save packet parameters + uint8_t *audio_pkg_data = packet->data; + int audio_pkg_size = packet->size; + + int buf_size = buffer->getSize(); + int buf_pos = 0; + + int read_length, data_size; + + // as long as there is still data in the package + while(audio_pkg_size > 0) + { + // resize buffer if needed + if(buf_size - buf_pos < AVCODEC_MAX_AUDIO_FRAME_SIZE) + { + buffer->resize(buf_size + AVCODEC_MAX_AUDIO_FRAME_SIZE, true); + buf_size += AVCODEC_MAX_AUDIO_FRAME_SIZE; + } + + // read samples from the packet + data_size = buf_size - buf_pos; + /*read_length = avcodec_decode_audio3(m_codecCtx, + (int16_t*)(buffer->getBuffer()+buf_pos), + &data_size, + packet);*/ + read_length = avcodec_decode_audio2(m_codecCtx, + (int16_t*)(buffer->getBuffer()+buf_pos), + &data_size, + audio_pkg_data, + audio_pkg_size); + + buf_pos += data_size; + + // read error, next packet! + if(read_length < 0) + break; + + // move packet parameters + audio_pkg_data += read_length; + audio_pkg_size -= read_length; + } + + return buf_pos; +} + +AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename) +{ + m_position = 0; + m_pkgbuf_left = 0; + m_byteiocontext = NULL; + + // open file + if(av_open_input_file(&m_formatCtx, filename, NULL, 0, NULL)!=0) + AUD_THROW(AUD_ERROR_FILE); + + try + { + if(av_find_stream_info(m_formatCtx)<0) + AUD_THROW(AUD_ERROR_FFMPEG); + + // find audio stream and codec + m_stream = -1; + + for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++) + if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) + && (m_stream < 0)) + { + m_stream=i; + break; + } + if(m_stream == -1) + AUD_THROW(AUD_ERROR_FFMPEG); + + m_codecCtx = m_formatCtx->streams[m_stream]->codec; + + // get a decoder and open it + AVCodec *aCodec = avcodec_find_decoder(m_codecCtx->codec_id); + if(!aCodec) + AUD_THROW(AUD_ERROR_FFMPEG); + + if(avcodec_open(m_codecCtx, aCodec)<0) + AUD_THROW(AUD_ERROR_FFMPEG); + + // XXX this prints file information to stdout: + //dump_format(m_formatCtx, 0, filename, 0); + + m_specs.channels = (AUD_Channels) m_codecCtx->channels; + m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt); + m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate; + } + catch(AUD_Exception) + { + av_close_input_file(m_formatCtx); + throw; + } + + // last but not least if there hasn't been any error, create the buffers + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") + m_pkgbuf = new AUD_Buffer(AVCODEC_MAX_AUDIO_FRAME_SIZE<<1); + AUD_NEW("buffer") +} + +AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference buffer) +{ + m_position = 0; + m_pkgbuf_left = 0; + m_byteiocontext = (ByteIOContext*)av_mallocz(sizeof(ByteIOContext)); + AUD_NEW("byteiocontext") + m_membuffer = buffer; + + if(init_put_byte(m_byteiocontext, buffer.get()->getBuffer(), buffer.get()->getSize(), 0, + NULL, NULL, NULL, NULL) != 0) + AUD_THROW(AUD_ERROR_FILE); + + AVProbeData probe_data; + probe_data.filename = ""; + probe_data.buf = buffer.get()->getBuffer(); + probe_data.buf_size = buffer.get()->getSize(); + AVInputFormat* fmt = av_probe_input_format(&probe_data, 1); + + // open stream + if(av_open_input_stream(&m_formatCtx, m_byteiocontext, "", fmt, NULL)!=0) + AUD_THROW(AUD_ERROR_FILE); + + try + { + if(av_find_stream_info(m_formatCtx)<0) + AUD_THROW(AUD_ERROR_FFMPEG); + + // find audio stream and codec + m_stream = -1; + + for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++) + if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) + && (m_stream < 0)) + { + m_stream=i; + break; + } + if(m_stream == -1) + AUD_THROW(AUD_ERROR_FFMPEG); + + m_codecCtx = m_formatCtx->streams[m_stream]->codec; + + // get a decoder and open it + AVCodec *aCodec = avcodec_find_decoder(m_codecCtx->codec_id); + if(!aCodec) + AUD_THROW(AUD_ERROR_FFMPEG); + + if(avcodec_open(m_codecCtx, aCodec)<0) + AUD_THROW(AUD_ERROR_FFMPEG); + + // XXX this prints stream information to stdout: + //dump_format(m_formatCtx, 0, NULL, 0); + + m_specs.channels = (AUD_Channels) m_codecCtx->channels; + m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt); + m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate; + } + catch(AUD_Exception) + { + av_close_input_stream(m_formatCtx); + av_free(m_byteiocontext); AUD_DELETE("byteiocontext") + throw; + } + + // last but not least if there hasn't been any error, create the buffers + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") + m_pkgbuf = new AUD_Buffer(AVCODEC_MAX_AUDIO_FRAME_SIZE<<1); + AUD_NEW("buffer") +} + +AUD_FFMPEGReader::~AUD_FFMPEGReader() +{ + avcodec_close(m_codecCtx); + + if(m_byteiocontext) + { + av_close_input_stream(m_formatCtx); + av_free(m_byteiocontext); AUD_DELETE("byteiocontext") + } + else + av_close_input_file(m_formatCtx); + + delete m_buffer; AUD_DELETE("buffer") + delete m_pkgbuf; AUD_DELETE("buffer") +} + +bool AUD_FFMPEGReader::isSeekable() +{ + return true; +} + +void AUD_FFMPEGReader::seek(int position) +{ + if(position >= 0) + { + // a value < 0 tells us that seeking failed + if(av_seek_frame(m_formatCtx, + -1, + (uint64_t)(((uint64_t)position * + (uint64_t)AV_TIME_BASE) / + (uint64_t)m_specs.rate), + AVSEEK_FLAG_BACKWARD | AVSEEK_FLAG_ANY) >= 0) + { + avcodec_flush_buffers(m_codecCtx); + m_position = position; + + AVPacket packet; + bool search = true; + + while(search && av_read_frame(m_formatCtx, &packet) >= 0) + { + // is it a frame from the audio stream? + if(packet.stream_index == m_stream) + { + // decode the package + m_pkgbuf_left = decode(&packet, m_pkgbuf); + search = false; + + // check position + if(packet.pts != AV_NOPTS_VALUE) + { + // calculate real position, and read to frame! + m_position = packet.pts * + av_q2d(m_formatCtx->streams[m_stream]->time_base) * + m_specs.rate; + + if(m_position < position) + { + sample_t* buf; + int length = position - m_position; + read(length, buf); + } + } + } + av_free_packet(&packet); + } + } + else + { + // Seeking failed, do nothing. + } + } +} + +int AUD_FFMPEGReader::getLength() +{ + // return approximated remaning size + return (int)((m_formatCtx->duration * m_codecCtx->sample_rate) + / AV_TIME_BASE)-m_position; +} + +int AUD_FFMPEGReader::getPosition() +{ + return m_position; +} + +AUD_Specs AUD_FFMPEGReader::getSpecs() +{ + return m_specs; +} + +AUD_ReaderType AUD_FFMPEGReader::getType() +{ + return AUD_TYPE_STREAM; +} + +bool AUD_FFMPEGReader::notify(AUD_Message &message) +{ + return false; +} + +void AUD_FFMPEGReader::read(int & length, sample_t* & buffer) +{ + // read packages and decode them + AVPacket packet; + int data_size = 0; + int pkgbuf_pos; + int left = length; + int sample_size = AUD_SAMPLE_SIZE(m_specs); + + // resize output buffer if necessary + if(m_buffer->getSize() < length*sample_size) + m_buffer->resize(length*sample_size); + + buffer = m_buffer->getBuffer(); + pkgbuf_pos = m_pkgbuf_left; + m_pkgbuf_left = 0; + + // there may still be data in the buffer from the last call + if(pkgbuf_pos > 0) + { + data_size = AUD_MIN(pkgbuf_pos, left * sample_size); + memcpy(buffer, m_pkgbuf->getBuffer(), data_size); + buffer += data_size; + left -= data_size/sample_size; + } + + // for each frame read as long as there isn't enough data already + while((left > 0) && (av_read_frame(m_formatCtx, &packet) >= 0)) + { + // is it a frame from the audio stream? + if(packet.stream_index == m_stream) + { + // decode the package + pkgbuf_pos = decode(&packet, m_pkgbuf); + + // copy to output buffer + data_size = AUD_MIN(pkgbuf_pos, left * sample_size); + memcpy(buffer, m_pkgbuf->getBuffer(), data_size); + buffer += data_size; + left -= data_size/sample_size; + } + av_free_packet(&packet); + } + // read more data than necessary? + if(pkgbuf_pos > data_size) + { + m_pkgbuf_left = pkgbuf_pos-data_size; + memmove(m_pkgbuf->getBuffer(), m_pkgbuf->getBuffer()+data_size, + pkgbuf_pos-data_size); + } + + buffer = m_buffer->getBuffer(); + + if(left > 0) + length -= left; + m_position += length; +} diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h new file mode 100644 index 00000000000..6e303934f36 --- /dev/null +++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h @@ -0,0 +1,139 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_FFMPEGREADER +#define AUD_FFMPEGREADER + +#include "AUD_IReader.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +struct AVCodecContext; +extern "C" { +#include +} + +/** + * This class reads a sound file via ffmpeg. + * \warning Seeking may not be accurate! Moreover the position is updated after + * a buffer reading call. So calling getPosition right after seek + * normally results in a wrong value. + * \warning Playback of an ogg with some outdated ffmpeg versions results in a + * segfault on windows. + */ +class AUD_FFMPEGReader : public AUD_IReader +{ +private: + /** + * The current position in samples. + */ + int m_position; + + /** + * The playback buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The specification of the audio data. + */ + AUD_Specs m_specs; + + /** + * The buffer for package reading. + */ + AUD_Buffer *m_pkgbuf; + + /** + * The count of samples still available from the last read package. + */ + int m_pkgbuf_left; + + /** + * The AVFormatContext structure for using ffmpeg. + */ + AVFormatContext* m_formatCtx; + + /** + * The AVCodecContext structure for using ffmpeg. + */ + AVCodecContext* m_codecCtx; + + /** + * The ByteIOContext to read the data from. + */ + ByteIOContext* m_byteiocontext; + + /** + * The stream ID in the file. + */ + int m_stream; + + /** + * The memory file to read from, only saved to keep the buffer alive. + */ + AUD_Reference m_membuffer; + + /** + * Decodes a packet into the given buffer. + * \param packet The AVPacket to decode. + * \param buffer The target buffer. + * \return The count of read bytes. + */ + int decode(AVPacket* packet, AUD_Buffer* buffer); + +public: + /** + * Creates a new reader. + * \param filename The path to the file to be read. + * \exception AUD_Exception Thrown if the file specified does not exist or + * cannot be read with ffmpeg. + */ + AUD_FFMPEGReader(const char* filename); + + /** + * Creates a new reader. + * \param buffer The buffer to read from. + * \exception AUD_Exception Thrown if the buffer specified cannot be read + * with ffmpeg. + */ + AUD_FFMPEGReader(AUD_Reference buffer); + + /** + * Destroys the reader and closes the file. + */ + virtual ~AUD_FFMPEGReader(); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_FFMPEGREADER diff --git a/intern/audaspace/ffmpeg/Makefile b/intern/audaspace/ffmpeg/Makefile new file mode 100644 index 00000000000..492ac83f532 --- /dev/null +++ b/intern/audaspace/ffmpeg/Makefile @@ -0,0 +1,41 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_ffmpeg +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += $(NAN_FFMPEGCFLAGS) +CPPFLAGS += -I../intern +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/intern/AUD_Buffer.cpp b/intern/audaspace/intern/AUD_Buffer.cpp new file mode 100644 index 00000000000..71deae0e87e --- /dev/null +++ b/intern/audaspace/intern/AUD_Buffer.cpp @@ -0,0 +1,67 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_Buffer.h" +#include "AUD_Space.h" + +#include +#include + +#define AUD_ALIGN(a) (a + 16 - ((long)a & 15)) + +AUD_Buffer::AUD_Buffer(int size) +{ + m_size = size; + m_buffer = (sample_t*) malloc(size+16); AUD_NEW("buffer") +} + +AUD_Buffer::~AUD_Buffer() +{ + free(m_buffer); AUD_DELETE("buffer") +} + +sample_t* AUD_Buffer::getBuffer() +{ + return AUD_ALIGN(m_buffer); +} + +int AUD_Buffer::getSize() +{ + return m_size; +} + +void AUD_Buffer::resize(int size, bool keep) +{ + sample_t* buffer = (sample_t*) malloc(size+16); AUD_NEW("buffer") + + // copy old data over if wanted + if(keep) + memcpy(AUD_ALIGN(buffer), AUD_ALIGN(m_buffer), AUD_MIN(size, m_size)); + + free(m_buffer); AUD_DELETE("buffer") + + m_buffer = buffer; + m_size = size; +} diff --git a/intern/audaspace/intern/AUD_Buffer.h b/intern/audaspace/intern/AUD_Buffer.h new file mode 100644 index 00000000000..64959b03799 --- /dev/null +++ b/intern/audaspace/intern/AUD_Buffer.h @@ -0,0 +1,75 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_BUFFER +#define AUD_BUFFER + +#include "AUD_Space.h" + +/** + * This class is a simple buffer in RAM which is 16 Byte aligned and provides + * resize functionality. + */ +class AUD_Buffer +{ +private: + /// The size of the buffer in bytes. + int m_size; + + /// The pointer to the buffer memory. + sample_t* m_buffer; + +public: + /** + * Creates a new buffer. + * \param size The size of the buffer in bytes. + */ + AUD_Buffer(int size = 0); + + /** + * Destroys the buffer. + */ + ~AUD_Buffer(); + + /** + * Returns the pointer to the buffer in memory. + */ + sample_t* getBuffer(); + + /** + * Returns the size of the buffer in bytes. + */ + int getSize(); + + /** + * Resizes the buffer. + * \param size The new size of the buffer, measured in bytes. + * \param keep Whether to keep the old data. If the new buffer is smaller, + * the data at the end will be lost. + */ + void resize(int size, bool keep = false); +}; + +#endif //AUD_BUFFER diff --git a/intern/audaspace/intern/AUD_BufferReader.cpp b/intern/audaspace/intern/AUD_BufferReader.cpp new file mode 100644 index 00000000000..47bf5d3d171 --- /dev/null +++ b/intern/audaspace/intern/AUD_BufferReader.cpp @@ -0,0 +1,91 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_BufferReader.h" +#include "AUD_Buffer.h" +#include "AUD_Space.h" + +AUD_BufferReader::AUD_BufferReader(AUD_Reference buffer, + AUD_Specs specs) +{ + m_position = 0; + m_buffer = buffer; + m_specs = specs; +} + +bool AUD_BufferReader::isSeekable() +{ + return true; +} + +void AUD_BufferReader::seek(int position) +{ + if(position < 0) + m_position = 0; + else if(position > m_buffer.get()->getSize() / AUD_SAMPLE_SIZE(m_specs)) + m_position = m_buffer.get()->getSize() / AUD_SAMPLE_SIZE(m_specs); + else + m_position = position; +} + +int AUD_BufferReader::getLength() +{ + return m_buffer.get()->getSize()/AUD_SAMPLE_SIZE(m_specs); +} + +int AUD_BufferReader::getPosition() +{ + return m_position; +} + +AUD_Specs AUD_BufferReader::getSpecs() +{ + return m_specs; +} + +AUD_ReaderType AUD_BufferReader::getType() +{ + return AUD_TYPE_BUFFER; +} + +bool AUD_BufferReader::notify(AUD_Message &message) +{ + return false; +} + +void AUD_BufferReader::read(int & length, sample_t* & buffer) +{ + int sample_size = AUD_SAMPLE_SIZE(m_specs); + + buffer = m_buffer.get()->getBuffer()+m_position*sample_size; + + // in case the end of the buffer is reach + if(m_buffer.get()->getSize() < (m_position+length)*sample_size) + length = m_buffer.get()->getSize()/sample_size-m_position; + + if(length < 0) + length = 0; + m_position += length; +} diff --git a/intern/audaspace/intern/AUD_BufferReader.h b/intern/audaspace/intern/AUD_BufferReader.h new file mode 100644 index 00000000000..f2d8ff6b57d --- /dev/null +++ b/intern/audaspace/intern/AUD_BufferReader.h @@ -0,0 +1,74 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_BUFFERREADER +#define AUD_BUFFERREADER + +#include "AUD_IReader.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +/** + * This class represents a simple reader from a buffer that exists in memory. + * \warning Notice that the buffer used for creating the reader must exist as + * long as the reader exists. + */ +class AUD_BufferReader : public AUD_IReader +{ +private: + /** + * The current position in the buffer. + */ + int m_position; + + /** + * The buffer that is read. + */ + AUD_Reference m_buffer; + + /** + * The specification of the sample data in the buffer. + */ + AUD_Specs m_specs; + +public: + /** + * Creates a new buffer reader. + * \param buffer The buffer to read from. + * \param specs The specification of the sample data in the buffer. + */ + AUD_BufferReader(AUD_Reference buffer, AUD_Specs specs); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_BUFFERREADER diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp new file mode 100644 index 00000000000..45faebc7e97 --- /dev/null +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -0,0 +1,560 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_NULLDevice.h" +#include "AUD_I3DDevice.h" +#include "AUD_FileFactory.h" +#include "AUD_StreamBufferFactory.h" +#include "AUD_DelayFactory.h" +#include "AUD_LimiterFactory.h" +#include "AUD_PingPongFactory.h" +#include "AUD_LoopFactory.h" +#include "AUD_ReadDevice.h" +#include "AUD_SourceCaps.h" +#include "AUD_IReader.h" + +#ifdef WITH_SDL +#include "AUD_SDLDevice.h" +#include "AUD_FloatMixer.h" +#endif + +#ifdef WITH_OPENAL +#include "AUD_OpenALDevice.h" +#endif + +#ifdef WITH_JACK +#include "AUD_JackDevice.h" +#endif + +#ifdef WITH_FFMPEG +extern "C" { +#include +} +#endif + +#include + +typedef AUD_IFactory AUD_Sound; +typedef AUD_ReadDevice AUD_Device; + +#define AUD_CAPI_IMPLEMENTATION +#include "AUD_C-API.h" + +#ifndef NULL +#define NULL 0 +#endif + +static AUD_IDevice* AUD_device = NULL; +static int AUD_available_devices[4]; +static AUD_I3DDevice* AUD_3ddevice = NULL; + +int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize) +{ +#ifdef WITH_FFMPEG + av_register_all(); +#endif + AUD_IDevice* dev = NULL; + + if(AUD_device) + AUD_exit(); + + try + { + switch(device) + { + case AUD_NULL_DEVICE: + dev = new AUD_NULLDevice(); + break; +#ifdef WITH_SDL + case AUD_SDL_DEVICE: + { + dev = new AUD_SDLDevice(specs, buffersize); + AUD_FloatMixer* mixer = new AUD_FloatMixer(); + ((AUD_SDLDevice*)dev)->setMixer(mixer); + break; + } +#endif +#ifdef WITH_OPENAL + case AUD_OPENAL_DEVICE: + dev = new AUD_OpenALDevice(specs, buffersize); + break; +#endif +#ifdef WITH_JACK + case AUD_JACK_DEVICE: + dev = new AUD_JackDevice(specs); + break; +#endif + default: + return false; + } + + AUD_device = dev; + if(AUD_device->checkCapability(AUD_CAPS_3D_DEVICE)) + AUD_3ddevice = dynamic_cast(AUD_device); + + return true; + } + catch(AUD_Exception) + { + return false; + } +} + +int* AUD_enumDevices() +{ + int i = 0; +#ifdef WITH_SDL + AUD_available_devices[i++] = AUD_SDL_DEVICE; +#endif +#ifdef WITH_OPENAL + AUD_available_devices[i++] = AUD_OPENAL_DEVICE; +#endif +#ifdef WITH_JACK + AUD_available_devices[i++] = AUD_JACK_DEVICE; +#endif + AUD_available_devices[i++] = AUD_NULL_DEVICE; + return AUD_available_devices; +} + +void AUD_exit() +{ + if(AUD_device) + { + delete AUD_device; + AUD_device = NULL; + AUD_3ddevice = NULL; + } +} + +void AUD_lock() +{ + assert(AUD_device); + AUD_device->lock(); +} + +void AUD_unlock() +{ + assert(AUD_device); + AUD_device->unlock(); +} + +AUD_SoundInfo AUD_getInfo(AUD_Sound* sound) +{ + assert(sound); + + AUD_IReader* reader = sound->createReader(); + + AUD_SoundInfo info; + + if(reader) + { + info.specs = reader->getSpecs(); + info.length = reader->getLength() / (float) info.specs.rate; + } + else + { + info.specs.channels = AUD_CHANNELS_INVALID; + info.specs.format = AUD_FORMAT_INVALID; + info.specs.rate = AUD_RATE_INVALID; + info.length = 0.0; + } + + return info; +} + +AUD_Sound* AUD_load(const char* filename) +{ + assert(filename); + return new AUD_FileFactory(filename); +} + +AUD_Sound* AUD_loadBuffer(unsigned char* buffer, int size) +{ + assert(buffer); + return new AUD_FileFactory(buffer, size); +} + +AUD_Sound* AUD_bufferSound(AUD_Sound* sound) +{ + assert(sound); + + try + { + return new AUD_StreamBufferFactory(sound); + } + catch(AUD_Exception) + { + return NULL; + } +} + +AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay) +{ + assert(sound); + + try + { + return new AUD_DelayFactory(sound, delay); + } + catch(AUD_Exception) + { + return NULL; + } +} + +extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end) +{ + assert(sound); + + try + { + return new AUD_LimiterFactory(sound, start, end); + } + catch(AUD_Exception) + { + return NULL; + } +} + +AUD_Sound* AUD_pingpongSound(AUD_Sound* sound) +{ + assert(sound); + + try + { + return new AUD_PingPongFactory(sound); + } + catch(AUD_Exception) + { + return NULL; + } +} + +AUD_Sound* AUD_loopSound(AUD_Sound* sound) +{ + assert(sound); + + try + { + return new AUD_LoopFactory(sound); + } + catch(AUD_Exception) + { + return NULL; + } +} + +int AUD_stopLoop(AUD_Handle* handle) +{ + if(handle) + { + AUD_Message message; + message.type = AUD_MSG_LOOP; + message.loopcount = 0; + + try + { + return AUD_device->sendMessage(handle, message); + } + catch(AUD_Exception) + { + } + } + return false; +} + +void AUD_unload(AUD_Sound* sound) +{ + assert(sound); + delete sound; +} + +AUD_Handle* AUD_play(AUD_Sound* sound, int keep) +{ + assert(AUD_device); + assert(sound); + try + { + return AUD_device->play(sound, keep); + } + catch(AUD_Exception) + { + return NULL; + } +} + +int AUD_pause(AUD_Handle* handle) +{ + assert(AUD_device); + return AUD_device->pause(handle); +} + +int AUD_resume(AUD_Handle* handle) +{ + assert(AUD_device); + return AUD_device->resume(handle); +} + +int AUD_stop(AUD_Handle* handle) +{ + if(AUD_device) + return AUD_device->stop(handle); + return false; +} + +int AUD_setKeep(AUD_Handle* handle, int keep) +{ + assert(AUD_device); + return AUD_device->setKeep(handle, keep); +} + +int AUD_seek(AUD_Handle* handle, float seekTo) +{ + assert(AUD_device); + return AUD_device->seek(handle, seekTo); +} + +float AUD_getPosition(AUD_Handle* handle) +{ + assert(AUD_device); + return AUD_device->getPosition(handle); +} + +AUD_Status AUD_getStatus(AUD_Handle* handle) +{ + assert(AUD_device); + return AUD_device->getStatus(handle); +} + +AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep) +{ + assert(AUD_device); + assert(sound); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->play3D(sound, keep); + else + return AUD_device->play(sound, keep); + } + catch(AUD_Exception) + { + return NULL; + } +} + +int AUD_updateListener(AUD_3DData* data) +{ + assert(AUD_device); + assert(data); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->updateListener(*data); + } + catch(AUD_Exception) + { + } + return false; +} + +int AUD_set3DSetting(AUD_3DSetting setting, float value) +{ + assert(AUD_device); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->setSetting(setting, value); + } + catch(AUD_Exception) + { + } + return false; +} + +float AUD_get3DSetting(AUD_3DSetting setting) +{ + assert(AUD_device); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->getSetting(setting); + } + catch(AUD_Exception) + { + } + return 0.0; +} + +int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data) +{ + if(handle) + { + assert(AUD_device); + assert(data); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->updateSource(handle, *data); + } + catch(AUD_Exception) + { + } + } + return false; +} + +int AUD_set3DSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting, float value) +{ + if(handle) + { + assert(AUD_device); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->setSourceSetting(handle, setting, value); + } + catch(AUD_Exception) + { + } + } + return false; +} + +float AUD_get3DSourceSetting(AUD_Handle* handle, AUD_3DSourceSetting setting) +{ + if(handle) + { + assert(AUD_device); + + try + { + if(AUD_3ddevice) + return AUD_3ddevice->getSourceSetting(handle, setting); + } + catch(AUD_Exception) + { + } + } + return 0.0; +} + +int AUD_setSoundVolume(AUD_Handle* handle, float volume) +{ + if(handle) + { + assert(AUD_device); + AUD_SourceCaps caps; + caps.handle = handle; + caps.value = volume; + + try + { + return AUD_device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps); + } + catch(AUD_Exception) {} + } + return false; +} + +int AUD_setSoundPitch(AUD_Handle* handle, float pitch) +{ + if(handle) + { + assert(AUD_device); + AUD_SourceCaps caps; + caps.handle = handle; + caps.value = pitch; + + try + { + return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps); + } + catch(AUD_Exception) {} + } + return false; +} + +AUD_Device* AUD_openReadDevice(AUD_Specs specs) +{ + try + { + return new AUD_ReadDevice(specs); + } + catch(AUD_Exception) + { + return NULL; + } +} + +int AUD_playDevice(AUD_Device* device, AUD_Sound* sound) +{ + assert(device); + assert(sound); + + try + { + return device->play(sound) != NULL; + } + catch(AUD_Exception) + { + return false; + } +} + +int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length) +{ + assert(device); + assert(buffer); + + try + { + return device->read(buffer, length); + } + catch(AUD_Exception) + { + return false; + } +} + +void AUD_closeReadDevice(AUD_Device* device) +{ + assert(device); + + try + { + delete device; + } + catch(AUD_Exception) + { + } +} diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h new file mode 100644 index 00000000000..6ec5ec87ad5 --- /dev/null +++ b/intern/audaspace/intern/AUD_C-API.h @@ -0,0 +1,331 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_CAPI +#define AUD_CAPI + +#ifdef __cplusplus +extern "C" { +#endif + +#include "AUD_Space.h" + +typedef enum +{ + AUD_NULL_DEVICE = 0, + AUD_SDL_DEVICE, + AUD_OPENAL_DEVICE, + AUD_JACK_DEVICE +} AUD_DeviceType; + +typedef struct +{ + AUD_Specs specs; + float length; +} AUD_SoundInfo; + +#ifndef AUD_CAPI_IMPLEMENTATION + typedef void AUD_Sound; + typedef void AUD_Handle; + typedef void AUD_Device; +#endif + +/** + * Initializes an audio device. + * \param device The device type that should be used. + * \param specs The audio specification to be used. + * \param buffersize The buffersize for the device. + * \return Whether the device has been initialized. + */ +extern int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize); + +/** + * Returns a integer list with available sound devices. The last one is always + * AUD_NULL_DEVICE. + */ +extern int* AUD_enumDevices(); + +/** + * Unitinitializes an audio device. + */ +extern void AUD_exit(); + +/** + * Locks the playback device. + */ +extern void AUD_lock(); + +/** + * Unlocks the device. + */ +extern void AUD_unlock(); + +/** + * Returns information about a sound. + * \param sound The sound to get the info about. + * \return The AUD_SoundInfo structure with filled in data. + */ +extern AUD_SoundInfo AUD_getInfo(AUD_Sound* sound); + +/** + * Loads a sound file. + * \param filename The filename of the sound file. + * \return A handle of the sound file. + */ +extern AUD_Sound* AUD_load(const char* filename); + +/** + * Loads a sound file. + * \param buffer The buffer which contains the sound file. + * \param size The size of the buffer. + * \return A handle of the sound file. + */ +extern AUD_Sound* AUD_loadBuffer(unsigned char* buffer, int size); + +/** + * Buffers a sound. + * \param sound The sound to buffer. + * \return A handle of the sound buffer. + */ +extern AUD_Sound* AUD_bufferSound(AUD_Sound* sound); + +/** + * Delays a sound. + * \param sound The sound to dealy. + * \param delay The delay in seconds. + * \return A handle of the delayed sound. + */ +extern AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay); + +/** + * Limits a sound. + * \param sound The sound to limit. + * \param start The start time in seconds. + * \param end The stop time in seconds. + * \return A handle of the limited sound. + */ +extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end); + +/** + * Ping pongs a sound. + * \param sound The sound to ping pong. + * \return A handle of the ping pong sound. + */ +extern AUD_Sound* AUD_pingpongSound(AUD_Sound* sound); + +/** + * Loops a sound. + * \param sound The sound to loop. + * \return A handle of the looped sound. + */ +extern AUD_Sound* AUD_loopSound(AUD_Sound* sound); + +/** + * Stops a looping sound when the current playback finishes. + * \param handle The playback handle. + * \return Whether the handle is valid. + */ +extern int AUD_stopLoop(AUD_Handle* handle); + +/** + * Unloads a sound of any type. + * \param sound The handle of the sound. + */ +extern void AUD_unload(AUD_Sound* sound); + +/** + * Plays back a sound file. + * \param sound The handle of the sound file. + * \param keep When keep is true the sound source will not be deleted but set to + * paused when its end has been reached. + * \return A handle to the played back sound. + */ +extern AUD_Handle* AUD_play(AUD_Sound* sound, int keep); + +/** + * Pauses a played back sound. + * \param handle The handle to the sound. + * \return Whether the handle has been playing or not. + */ +extern int AUD_pause(AUD_Handle* handle); + +/** + * Resumes a paused sound. + * \param handle The handle to the sound. + * \return Whether the handle has been paused or not. + */ +extern int AUD_resume(AUD_Handle* handle); + +/** + * Stops a playing or paused sound. + * \param handle The handle to the sound. + * \return Whether the handle has been valid or not. + */ +extern int AUD_stop(AUD_Handle* handle); + +/** + * Sets the end behaviour of a playing or paused sound. + * \param handle The handle to the sound. + * \param keep When keep is true the sound source will not be deleted but set to + * paused when its end has been reached. + * \return Whether the handle has been valid or not. + */ +extern int AUD_setKeep(AUD_Handle* handle, int keep); + +/** + * Seeks a playing or paused sound. + * \param handle The handle to the sound. + * \param seekTo From where the sound file should be played back in seconds. + * \return Whether the handle has been valid or not. + */ +extern int AUD_seek(AUD_Handle* handle, float seekTo); + +/** + * Retrieves the playback position of a handle. + * \return The current playback position in seconds or 0.0 if the handle is + * invalid. + */ +extern float AUD_getPosition(AUD_Handle* handle); + +/** + * Returns the status of a playing, paused or stopped sound. + * \param handle The handle to the sound. + * \return The status of the sound behind the handle. + */ +extern AUD_Status AUD_getStatus(AUD_Handle* handle); + +/** + * Plays a 3D sound. + * \param sound The handle of the sound file. + * \param keep When keep is true the sound source will not be deleted but set to + * paused when its end has been reached. + * \return A handle to the played back sound. + * \note The factory must provide a mono (single channel) source and the device + * must support 3D audio, otherwise the sound is played back normally. + */ +extern AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep); + +/** + * Updates the listener 3D data. + * \param data The 3D data. + * \return Whether the action succeeded. + */ +extern int AUD_updateListener(AUD_3DData* data); + +/** + * Sets a 3D device setting. + * \param setting The setting type. + * \param value The new setting value. + * \return Whether the action succeeded. + */ +extern int AUD_set3DSetting(AUD_3DSetting setting, float value); + +/** + * Retrieves a 3D device setting. + * \param setting The setting type. + * \return The setting value. + */ +extern float AUD_get3DSetting(AUD_3DSetting setting); + +/** + * Updates a listeners 3D data. + * \param handle The source handle. + * \param data The 3D data. + * \return Whether the action succeeded. + */ +extern int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data); + +/** + * Sets a 3D source setting. + * \param handle The source handle. + * \param setting The setting type. + * \param value The new setting value. + * \return Whether the action succeeded. + */ +extern int AUD_set3DSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting, float value); + +/** + * Retrieves a 3D source setting. + * \param handle The source handle. + * \param setting The setting type. + * \return The setting value. + */ +extern float AUD_get3DSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting); + +/** + * Sets the volume of a played back sound. + * \param handle The handle to the sound. + * \param volume The new volume, must be between 0.0 and 1.0. + * \return Whether the action succeeded. + */ +extern int AUD_setSoundVolume(AUD_Handle* handle, float volume); + +/** + * Sets the pitch of a played back sound. + * \param handle The handle to the sound. + * \param pitch The new pitch. + * \return Whether the action succeeded. + */ +extern int AUD_setSoundPitch(AUD_Handle* handle, float pitch); + +/** + * Opens a read device, with which audio data can be read. + * \param specs The specification of the audio data. + * \return A device handle. + */ +extern AUD_Device* AUD_openReadDevice(AUD_Specs specs); + +/** + * Plays back a sound file through a read device. + * \param device The read device. + * \param sound The handle of the sound file. + * \return Whether the sound could be played back. + */ +extern int AUD_playDevice(AUD_Device* device, AUD_Sound* sound); + +/** + * Reads the next samples into the supplied buffer. + * \param device The read device. + * \param buffer The target buffer. + * \param length The length in samples to be filled. + * \return True if the reading succeeded, false if there are no sounds + * played back currently, in that case the buffer is filled with + * silence. + */ +extern int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length); + +/** + * Closes a read device. + * \param device The read device. + */ +extern void AUD_closeReadDevice(AUD_Device* device); + +#ifdef __cplusplus +} +#endif + +#endif //AUD_CAPI diff --git a/intern/audaspace/intern/AUD_ChannelMapperFactory.cpp b/intern/audaspace/intern/AUD_ChannelMapperFactory.cpp new file mode 100644 index 00000000000..66205a58015 --- /dev/null +++ b/intern/audaspace/intern/AUD_ChannelMapperFactory.cpp @@ -0,0 +1,125 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ChannelMapperFactory.h" +#include "AUD_ChannelMapperReader.h" + +#include + +AUD_ChannelMapperFactory::AUD_ChannelMapperFactory(AUD_IReader* reader, + AUD_Specs specs) : + AUD_MixerFactory(reader, specs) +{ + memset(m_mapping, 0, sizeof(m_mapping)); +} + +AUD_ChannelMapperFactory::AUD_ChannelMapperFactory(AUD_IFactory* factory, + AUD_Specs specs) : + AUD_MixerFactory(factory, specs) +{ + memset(m_mapping, 0, sizeof(m_mapping)); +} + +AUD_ChannelMapperFactory::AUD_ChannelMapperFactory(AUD_Specs specs) : + AUD_MixerFactory(specs) +{ + memset(m_mapping, 0, sizeof(m_mapping)); +} + +AUD_ChannelMapperFactory::~AUD_ChannelMapperFactory() +{ + for(int i = 1; i < 10; i++) + deleteMapping(i); +} + +float** AUD_ChannelMapperFactory::getMapping(int ic) +{ + ic--; + if(ic > 8 || ic < 0) + return 0; + + if(m_mapping[ic]) + { + int channels = -1; + while(m_mapping[ic][++channels] != 0); + if(channels != m_specs.channels) + deleteMapping(ic+1); + } + + if(!m_mapping[ic]) + { + int channels = m_specs.channels; + + m_mapping[ic] = new float*[channels+1]; AUD_NEW("mapping") + m_mapping[ic][channels] = 0; + + for(int i = 0; i < channels; i++) + { + m_mapping[ic][i] = new float[ic+1]; AUD_NEW("mapping") + for(int j = 0; j <= ic; j++) + m_mapping[ic][i][j] = ((i == j) || (channels == 1) || + (ic == 0)) ? 1.0f : 0.0f; + } + } + + return m_mapping[ic]; +} + +void AUD_ChannelMapperFactory::deleteMapping(int ic) +{ + ic--; + if(ic > 8 || ic < 0) + return; + + if(m_mapping[ic]) + { + for(int i = 0; 1; i++) + { + if(m_mapping[ic][i] != 0) + { + delete[] m_mapping[ic][i]; AUD_DELETE("mapping") + } + else + break; + } + delete[] m_mapping[ic]; AUD_DELETE("mapping") + m_mapping[ic] = 0; + } +} + +AUD_IReader* AUD_ChannelMapperFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + int ic = reader->getSpecs().channels; + + reader = new AUD_ChannelMapperReader(reader, getMapping(ic)); + AUD_NEW("reader") + } + + return reader; +} diff --git a/intern/audaspace/intern/AUD_ChannelMapperFactory.h b/intern/audaspace/intern/AUD_ChannelMapperFactory.h new file mode 100644 index 00000000000..c2c39f4bdf6 --- /dev/null +++ b/intern/audaspace/intern/AUD_ChannelMapperFactory.h @@ -0,0 +1,65 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_CHANNELMAPPERFACTORY +#define AUD_CHANNELMAPPERFACTORY + +#include "AUD_MixerFactory.h" + +/** + * This factory creates a reader that maps a sound source's channels to a + * specific output channel count. + */ +class AUD_ChannelMapperFactory : public AUD_MixerFactory +{ +private: + /** + * The mapping specification. + */ + float **m_mapping[9]; + +public: + AUD_ChannelMapperFactory(AUD_IReader* reader, AUD_Specs specs); + AUD_ChannelMapperFactory(AUD_IFactory* factory, AUD_Specs specs); + AUD_ChannelMapperFactory(AUD_Specs specs); + + virtual ~AUD_ChannelMapperFactory(); + + /** + * Returns the mapping array for editing. + * \param ic The count of input channels the array should have. + * \note The count of output channels is read of the desired output specs. + */ + float** getMapping(int ic); + + /** + * Deletes the current channel mapping. + */ + void deleteMapping(int ic); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_CHANNELMAPPERFACTORY diff --git a/intern/audaspace/intern/AUD_ChannelMapperReader.cpp b/intern/audaspace/intern/AUD_ChannelMapperReader.cpp new file mode 100644 index 00000000000..61f97c08a8e --- /dev/null +++ b/intern/audaspace/intern/AUD_ChannelMapperReader.cpp @@ -0,0 +1,108 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ChannelMapperReader.h" +#include "AUD_Buffer.h" + +AUD_ChannelMapperReader::AUD_ChannelMapperReader(AUD_IReader* reader, + float **mapping) : + AUD_EffectReader(reader) +{ + m_specs = reader->getSpecs(); + + if(m_specs.format != AUD_FORMAT_FLOAT32) + { + delete m_reader; AUD_DELETE("reader") + AUD_THROW(AUD_ERROR_READER); + } + + int channels = -1; + m_rch = m_specs.channels; + while(mapping[++channels] != 0); + + m_mapping = new float*[channels]; AUD_NEW("mapping") + m_specs.channels = (AUD_Channels)channels; + + float sum; + int i; + + while(channels--) + { + m_mapping[channels] = new float[m_rch]; AUD_NEW("mapping") + sum = 0.0f; + for(i=0; i < m_rch; i++) + sum += mapping[channels][i]; + for(i=0; i < m_rch; i++) + m_mapping[channels][i] = sum > 0.0 ? mapping[channels][i]/sum : 0.0; + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_ChannelMapperReader::~AUD_ChannelMapperReader() +{ + int channels = m_specs.channels; + + while(channels--) + { + delete[] m_mapping[channels]; AUD_DELETE("mapping") + } + + delete[] m_mapping; AUD_DELETE("mapping") + + delete m_buffer; AUD_DELETE("buffer") +} + +AUD_Specs AUD_ChannelMapperReader::getSpecs() +{ + return m_specs; +} + +void AUD_ChannelMapperReader::read(int & length, sample_t* & buffer) +{ + m_reader->read(length, buffer); + + int channels = m_specs.channels; + + if(m_buffer->getSize() < length * 4 * channels) + m_buffer->resize(length * 4 * channels); + + float* in = (float*)buffer; + float* out = (float*)m_buffer->getBuffer(); + float sum; + + for(int i = 0; i < length; i++) + { + for(int j = 0; j < channels; j++) + { + sum = 0; + for(int k = 0; k < m_rch; k++) + sum += m_mapping[j][k] * in[i * m_rch + k]; + out[i * channels + j] = sum; + } + } + + buffer = m_buffer->getBuffer(); +} diff --git a/intern/audaspace/intern/AUD_ChannelMapperReader.h b/intern/audaspace/intern/AUD_ChannelMapperReader.h new file mode 100644 index 00000000000..fe79ab6edd6 --- /dev/null +++ b/intern/audaspace/intern/AUD_ChannelMapperReader.h @@ -0,0 +1,76 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_CHANNELMAPPERREADER +#define AUD_CHANNELMAPPERREADER + +#include "AUD_EffectReader.h" +class AUD_Buffer; + +/** + * This class maps a sound source's channels to a specific output channel count. + * \note The input sample format must be float. + */ +class AUD_ChannelMapperReader : public AUD_EffectReader +{ +private: + /** + * The sound output buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The output specification. + */ + AUD_Specs m_specs; + + /** + * The channel count of the reader. + */ + int m_rch; + + /** + * The mapping specification. + */ + float **m_mapping; + +public: + /** + * Creates a channel mapper reader. + * \param reader The reader to map. + * \param mapping The mapping specification as two dimensional float array. + * \exception AUD_Exception Thrown if the reader is NULL. + */ + AUD_ChannelMapperReader(AUD_IReader* reader, float **mapping); + /** + * Destroys the reader. + */ + ~AUD_ChannelMapperReader(); + + virtual AUD_Specs getSpecs(); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_CHANNELMAPPERREADER diff --git a/intern/audaspace/intern/AUD_ConverterFactory.cpp b/intern/audaspace/intern/AUD_ConverterFactory.cpp new file mode 100644 index 00000000000..a1a86662072 --- /dev/null +++ b/intern/audaspace/intern/AUD_ConverterFactory.cpp @@ -0,0 +1,54 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ConverterFactory.h" +#include "AUD_ConverterReader.h" + +AUD_ConverterFactory::AUD_ConverterFactory(AUD_IReader* reader, + AUD_Specs specs) : + AUD_MixerFactory(reader, specs) {} + +AUD_ConverterFactory::AUD_ConverterFactory(AUD_IFactory* factory, + AUD_Specs specs) : + AUD_MixerFactory(factory, specs) {} + +AUD_ConverterFactory::AUD_ConverterFactory(AUD_Specs specs) : + AUD_MixerFactory(specs) {} + +AUD_IReader* AUD_ConverterFactory::createReader() +{ + AUD_IReader* reader = getReader(); + + if(reader != 0) + { + if(reader->getSpecs().format != m_specs.format) + { + reader = new AUD_ConverterReader(reader, m_specs); + AUD_NEW("reader") + } + } + + return reader; +} diff --git a/intern/audaspace/intern/AUD_ConverterFactory.h b/intern/audaspace/intern/AUD_ConverterFactory.h new file mode 100644 index 00000000000..3778e8d8f03 --- /dev/null +++ b/intern/audaspace/intern/AUD_ConverterFactory.h @@ -0,0 +1,45 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_CONVERTERFACTORY +#define AUD_CONVERTERFACTORY + +#include "AUD_MixerFactory.h" + +/** + * This factory creates a converter reader that is able to convert from one + * audio format to another. + */ +class AUD_ConverterFactory : public AUD_MixerFactory +{ +public: + AUD_ConverterFactory(AUD_IReader* reader, AUD_Specs specs); + AUD_ConverterFactory(AUD_IFactory* factory, AUD_Specs specs); + AUD_ConverterFactory(AUD_Specs specs); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_CONVERTERFACTORY diff --git a/intern/audaspace/intern/AUD_ConverterFunctions.cpp b/intern/audaspace/intern/AUD_ConverterFunctions.cpp new file mode 100644 index 00000000000..b6d5dffa1a2 --- /dev/null +++ b/intern/audaspace/intern/AUD_ConverterFunctions.cpp @@ -0,0 +1,502 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ConverterFunctions.h" +#include "AUD_Buffer.h" + +#define AUD_U8_0 0x80 +#define AUD_S16_MAX 0x7FFF +#define AUD_S16_MIN 0x8000 +#define AUD_S16_FLT 32768.0 +#define AUD_S32_MAX 0x7FFFFFFF +#define AUD_S32_MIN 0x80000000 +#define AUD_S32_FLT 2147483648.0 +#define AUD_FLT_MAX 1.0 +#define AUD_FLT_MIN -1.0 + +void AUD_convert_u8_s16(sample_t* target, sample_t* source, int length) +{ + int16_t* t = (int16_t*) target; + for(int i = 0; i < length; i++) + t[i] = (((int16_t)source[i]) - AUD_U8_0) << 8; +} + +void AUD_convert_u8_s24_be(sample_t* target, sample_t* source, int length) +{ + for(int i = 0; i < length; i++) + { + target[i*3] = source[i] - AUD_U8_0; + target[i*3+1] = 0; + target[i*3+2] = 0; + } +} + +void AUD_convert_u8_s24_le(sample_t* target, sample_t* source, int length) +{ + for(int i = 0; i < length; i++) + { + target[i*3+2] = source[i] - AUD_U8_0; + target[i*3+1] = 0; + target[i*3] = 0; + } +} + +void AUD_convert_u8_s32(sample_t* target, sample_t* source, int length) +{ + int32_t* t = (int32_t*) target; + for(int i = 0; i < length; i++) + t[i] = (((int32_t)source[i]) - AUD_U8_0) << 24; +} + +void AUD_convert_u8_float(sample_t* target, sample_t* source, int length) +{ + float* t = (float*) target; + for(int i = 0; i < length; i++) + t[i] = (((int32_t)source[i]) - AUD_U8_0) / ((float)AUD_U8_0); +} + +void AUD_convert_u8_double(sample_t* target, sample_t* source, int length) +{ + double* t = (double*) target; + for(int i = 0; i < length; i++) + t[i] = (((int32_t)source[i]) - AUD_U8_0) / ((double)AUD_U8_0); +} + +void AUD_convert_s16_u8(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + for(int i = 0; i < length; i++) + target[i] = (unsigned char)((s[i] >> 8) + AUD_U8_0); +} + +void AUD_convert_s16_s24_be(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + for(int i = 0; i < length; i++) + { + target[i*3] = s[i] >> 8 & 0xFF; + target[i*3+1] = s[i] & 0xFF; + target[i*3+2] = 0; + } +} + +void AUD_convert_s16_s24_le(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + for(int i = 0; i < length; i++) + { + target[i*3+2] = s[i] >> 8 & 0xFF; + target[i*3+1] = s[i] & 0xFF; + target[i*3] = 0; + } +} + +void AUD_convert_s16_s32(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + int32_t* t = (int32_t*) target; + for(int i = 0; i < length; i++) + t[i] = ((int32_t)s[i]) << 16; +} + +void AUD_convert_s16_float(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + float* t = (float*) target; + for(int i = 0; i < length; i++) + t[i] = s[i] / AUD_S16_FLT; +} + +void AUD_convert_s16_double(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + double* t = (double*) target; + for(int i = 0; i < length; i++) + t[i] = s[i] / AUD_S16_FLT; +} + +void AUD_convert_s24_u8_be(sample_t* target, sample_t* source, int length) +{ + for(int i = 0; i < length; i++) + target[i] = source[i*3] ^ AUD_U8_0; +} + +void AUD_convert_s24_u8_le(sample_t* target, sample_t* source, int length) +{ + for(int i = 0; i < length; i++) + target[i] = source[i*3+2] ^ AUD_U8_0; +} + +void AUD_convert_s24_s16_be(sample_t* target, sample_t* source, int length) +{ + int16_t* t = (int16_t*) target; + for(int i = 0; i < length; i++) + t[i] = source[i*3] << 8 | source[i*3+1]; +} + +void AUD_convert_s24_s16_le(sample_t* target, sample_t* source, int length) +{ + int16_t* t = (int16_t*) target; + for(int i = 0; i < length; i++) + t[i] = source[i*3+2] << 8 | source[i*3+1]; +} + +void AUD_convert_s24_s24(sample_t* target, sample_t* source, int length) +{ + memcpy(target, source, length * 3); +} + +void AUD_convert_s24_s32_be(sample_t* target, sample_t* source, int length) +{ + int32_t* t = (int32_t*) target; + for(int i = 0; i < length; i++) + t[i] = source[i*3] << 24 | source[i*3+1] << 16 | source[i*3+2] << 8; +} + +void AUD_convert_s24_s32_le(sample_t* target, sample_t* source, int length) +{ + int32_t* t = (int32_t*) target; + for(int i = 0; i < length; i++) + t[i] = source[i*3+2] << 24 | source[i*3+1] << 16 | source[i*3] << 8; +} + +void AUD_convert_s24_float_be(sample_t* target, sample_t* source, int length) +{ + float* t = (float*) target; + int32_t s; + for(int i = 0; i < length; i++) + { + s = source[i*3] << 24 | source[i*3+1] << 16 | source[i*3+2] << 8; + t[i] = s / AUD_S32_FLT; + } +} + +void AUD_convert_s24_float_le(sample_t* target, sample_t* source, int length) +{ + float* t = (float*) target; + int32_t s; + for(int i = 0; i < length; i++) + { + s = source[i*3+2] << 24 | source[i*3+1] << 16 | source[i*3] << 8; + t[i] = s / AUD_S32_FLT; + } +} + +void AUD_convert_s24_double_be(sample_t* target, sample_t* source, int length) +{ + double* t = (double*) target; + int32_t s; + for(int i = 0; i < length; i++) + { + s = source[i*3] << 24 | source[i*3+1] << 16 | source[i*3+2] << 8; + t[i] = s / AUD_S32_FLT; + } +} + +void AUD_convert_s24_double_le(sample_t* target, sample_t* source, int length) +{ + double* t = (double*) target; + int32_t s; + for(int i = 0; i < length; i++) + { + s = source[i*3+2] << 24 | source[i*3+1] << 16 | source[i*3] << 8; + t[i] = s / AUD_S32_FLT; + } +} + +void AUD_convert_s32_u8(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + for(int i = 0; i < length; i++) + target[i] = (unsigned char)((s[i] >> 24) + AUD_U8_0); +} + +void AUD_convert_s32_s16(sample_t* target, sample_t* source, int length) +{ + int16_t* t = (int16_t*) target; + int32_t* s = (int32_t*) source; + for(int i = 0; i < length; i++) + t[i] = s[i] >> 16; +} + +void AUD_convert_s32_s24_be(sample_t* target, sample_t* source, int length) +{ + int32_t* s = (int32_t*) source; + for(int i = 0; i < length; i++) + { + target[i*3] = s[i] >> 24 & 0xFF; + target[i*3+1] = s[i] >> 16 & 0xFF; + target[i*3+2] = s[i] >> 8 & 0xFF; + } +} + +void AUD_convert_s32_s24_le(sample_t* target, sample_t* source, int length) +{ + int16_t* s = (int16_t*) source; + for(int i = 0; i < length; i++) + { + target[i*3+2] = s[i] >> 24 & 0xFF; + target[i*3+1] = s[i] >> 16 & 0xFF; + target[i*3] = s[i] >> 8 & 0xFF; + } +} + +void AUD_convert_s32_float(sample_t* target, sample_t* source, int length) +{ + int32_t* s = (int32_t*) source; + float* t = (float*) target; + for(int i = 0; i < length; i++) + t[i] = s[i] / AUD_S32_FLT; +} + +void AUD_convert_s32_double(sample_t* target, sample_t* source, int length) +{ + int32_t* s = (int32_t*) source; + double* t = (double*) target; + for(int i = 0; i < length; i++) + t[i] = s[i] / AUD_S32_FLT; +} + +void AUD_convert_float_u8(sample_t* target, sample_t* source, int length) +{ + float* s = (float*) source; + float t; + for(int i = 0; i < length; i++) + { + t = s[i] + AUD_FLT_MAX; + if(t <= 0.0f) + target[i] = 0; + else if(t >= 2.0f) + target[i] = 255; + else + target[i] = (unsigned char)(t*127); + } +} + +void AUD_convert_float_s16(sample_t* target, sample_t* source, int length) +{ + int16_t* t = (int16_t*) target; + float* s = (float*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t[i] = AUD_S16_MIN; + else if(s[i] >= AUD_FLT_MAX) + t[i] = AUD_S16_MAX; + else + t[i] = (int16_t)(s[i] * AUD_S16_MAX); + } +} + +void AUD_convert_float_s24_be(sample_t* target, sample_t* source, int length) +{ + int32_t t; + float* s = (float*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t = AUD_S32_MIN; + else if(s[i] >= AUD_FLT_MAX) + t = AUD_S32_MAX; + else + t = (int32_t)(s[i]*AUD_S32_MAX); + target[i*3] = t >> 24 & 0xFF; + target[i*3+1] = t >> 16 & 0xFF; + target[i*3+2] = t >> 8 & 0xFF; + } +} + +void AUD_convert_float_s24_le(sample_t* target, sample_t* source, int length) +{ + int32_t t; + float* s = (float*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t = AUD_S32_MIN; + else if(s[i] >= AUD_FLT_MAX) + t = AUD_S32_MAX; + else + t = (int32_t)(s[i]*AUD_S32_MAX); + target[i*3+2] = t >> 24 & 0xFF; + target[i*3+1] = t >> 16 & 0xFF; + target[i*3] = t >> 8 & 0xFF; + } +} + +void AUD_convert_float_s32(sample_t* target, sample_t* source, int length) +{ + int32_t* t = (int32_t*) target; + float* s = (float*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t[i] = AUD_S32_MIN; + else if(s[i] >= AUD_FLT_MAX) + t[i] = AUD_S32_MAX; + else + t[i] = (int32_t)(s[i]*AUD_S32_MAX); + } +} + +void AUD_convert_float_double(sample_t* target, sample_t* source, int length) +{ + float* s = (float*) source; + double* t = (double*) target; + for(int i = 0; i < length; i++) + t[i] = s[i]; +} + +void AUD_convert_double_u8(sample_t* target, sample_t* source, int length) +{ + double* s = (double*) source; + double t; + for(int i = 0; i < length; i++) + { + t = s[i] + AUD_FLT_MAX; + if(t <= 0.0) + target[i] = 0; + else if(t >= 2.0) + target[i] = 255; + else + target[i] = (unsigned char)(t*127); + } +} + +void AUD_convert_double_s16(sample_t* target, sample_t* source, int length) +{ + int16_t* t = (int16_t*) target; + double* s = (double*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t[i] = AUD_S16_MIN; + else if(s[i] >= AUD_FLT_MAX) + t[i] = AUD_S16_MAX; + else + t[i] = (int16_t)(s[i]*AUD_S16_MAX); + } +} + +void AUD_convert_double_s24_be(sample_t* target, sample_t* source, int length) +{ + int32_t t; + double* s = (double*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t = AUD_S32_MIN; + else if(s[i] >= AUD_FLT_MAX) + t = AUD_S32_MAX; + else + t = (int32_t)(s[i]*AUD_S32_MAX); + target[i*3] = t >> 24 & 0xFF; + target[i*3+1] = t >> 16 & 0xFF; + target[i*3+2] = t >> 8 & 0xFF; + } +} + +void AUD_convert_double_s24_le(sample_t* target, sample_t* source, int length) +{ + int32_t t; + double* s = (double*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t = AUD_S32_MIN; + else if(s[i] >= AUD_FLT_MAX) + t = AUD_S32_MAX; + else + t = (int32_t)(s[i]*AUD_S32_MAX); + target[i*3+2] = t >> 24 & 0xFF; + target[i*3+1] = t >> 16 & 0xFF; + target[i*3] = t >> 8 & 0xFF; + } +} + +void AUD_convert_double_s32(sample_t* target, sample_t* source, int length) +{ + int32_t* t = (int32_t*) target; + double* s = (double*) source; + for(int i = 0; i < length; i++) + { + if(s[i] <= AUD_FLT_MIN) + t[i] = AUD_S32_MIN; + else if(s[i] >= AUD_FLT_MAX) + t[i] = AUD_S32_MAX; + else + t[i] = (int32_t)(s[i]*AUD_S32_MAX); + } +} + +void AUD_convert_double_float(sample_t* target, sample_t* source, int length) +{ + double* s = (double*) source; + float* t = (float*) target; + for(int i = 0; i < length; i++) + t[i] = s[i]; +} + +void AUD_volume_adjust_u8(sample_t* target, sample_t* source, + int count, float volume) +{ + for(int i=0; i> 23) * 255) << 24; + value *= volume; + target[i+2] = value >> 16; + target[i+1] = value >> 8; + target[i] = value; + } +} + +void AUD_volume_adjust_s24_be(sample_t* target, sample_t* source, + int count, float volume) +{ + count *= 3; + int value; + + for(int i=0; i < count; i+=3) + { + value = source[i] << 16 | source[i+1] << 8 | source[i+2]; + value |= (((value & 0x800000) >> 23) * 255) << 24; + value *= volume; + target[i] = value >> 16; + target[i+1] = value >> 8; + target[i+2] = value; + } +} + diff --git a/intern/audaspace/intern/AUD_ConverterFunctions.h b/intern/audaspace/intern/AUD_ConverterFunctions.h new file mode 100644 index 00000000000..c1dd0f4a3a2 --- /dev/null +++ b/intern/audaspace/intern/AUD_ConverterFunctions.h @@ -0,0 +1,156 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_CONVERTERFUNCTIONS +#define AUD_CONVERTERFUNCTIONS + +#include "AUD_Space.h" + +#include +#ifdef _MSC_VER +#if (_MSC_VER < 1300) + typedef short int16_t; + typedef int int32_t; +#else + typedef __int16 int16_t; + typedef __int32 int32_t; +#endif +#else +#include +#endif + +typedef void (*AUD_convert_f)(sample_t* target, sample_t* source, int length); + +typedef void (*AUD_volume_adjust_f)(sample_t* target, sample_t* source, + int count, float volume); + +template +void AUD_convert_copy(sample_t* target, sample_t* source, int length) +{ + memcpy(target, source, length*sizeof(T)); +} + +void AUD_convert_u8_s16(sample_t* target, sample_t* source, int length); + +void AUD_convert_u8_s24_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_u8_s24_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_u8_s32(sample_t* target, sample_t* source, int length); + +void AUD_convert_u8_float(sample_t* target, sample_t* source, int length); + +void AUD_convert_u8_double(sample_t* target, sample_t* source, int length); + +void AUD_convert_s16_u8(sample_t* target, sample_t* source, int length); + +void AUD_convert_s16_s24_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s16_s24_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s16_s32(sample_t* target, sample_t* source, int length); + +void AUD_convert_s16_float(sample_t* target, sample_t* source, int length); + +void AUD_convert_s16_double(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_u8_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_u8_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_s16_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_s16_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_s24(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_s32_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_s32_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_float_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_float_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_double_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s24_double_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s32_u8(sample_t* target, sample_t* source, int length); + +void AUD_convert_s32_s16(sample_t* target, sample_t* source, int length); + +void AUD_convert_s32_s24_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_s32_s24_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_s32_float(sample_t* target, sample_t* source, int length); + +void AUD_convert_s32_double(sample_t* target, sample_t* source, int length); + +void AUD_convert_float_u8(sample_t* target, sample_t* source, int length); + +void AUD_convert_float_s16(sample_t* target, sample_t* source, int length); + +void AUD_convert_float_s24_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_float_s24_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_float_s32(sample_t* target, sample_t* source, int length); + +void AUD_convert_float_double(sample_t* target, sample_t* source, int length); + +void AUD_convert_double_u8(sample_t* target, sample_t* source, int length); + +void AUD_convert_double_s16(sample_t* target, sample_t* source, int length); + +void AUD_convert_double_s24_be(sample_t* target, sample_t* source, int length); + +void AUD_convert_double_s24_le(sample_t* target, sample_t* source, int length); + +void AUD_convert_double_s32(sample_t* target, sample_t* source, int length); + +void AUD_convert_double_float(sample_t* target, sample_t* source, int length); + +template +void AUD_volume_adjust(sample_t* target, sample_t* source, + int count, float volume) +{ + T* t = (T*)target; + T* s = (T*)source; + for(int i=0; i < count; i++) + t[i] = (T)(s[i] * volume); +} + +void AUD_volume_adjust_u8(sample_t* target, sample_t* source, + int count, float volume); + +void AUD_volume_adjust_s24_le(sample_t* target, sample_t* source, + int count, float volume); + +void AUD_volume_adjust_s24_be(sample_t* target, sample_t* source, + int count, float volume); + +#endif //AUD_CONVERTERFUNCTIONS diff --git a/intern/audaspace/intern/AUD_ConverterReader.cpp b/intern/audaspace/intern/AUD_ConverterReader.cpp new file mode 100644 index 00000000000..da25a2b7460 --- /dev/null +++ b/intern/audaspace/intern/AUD_ConverterReader.cpp @@ -0,0 +1,260 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_ConverterReader.h" +#include "AUD_Buffer.h" + +AUD_ConverterReader::AUD_ConverterReader(AUD_IReader* reader, AUD_Specs specs) : + AUD_EffectReader(reader) +{ + m_specs = reader->getSpecs(); + + int bigendian = 1; + bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian + + switch(m_specs.format) + { + case AUD_FORMAT_U8: + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_copy; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_u8_s16; + break; + case AUD_FORMAT_S24: + if(bigendian) + m_convert = AUD_convert_u8_s24_be; + else + m_convert = AUD_convert_u8_s24_le; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_u8_s32; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_u8_float; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_u8_double; + break; + default: + break; + } + break; + case AUD_FORMAT_S16: + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_s16_u8; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_copy; + break; + case AUD_FORMAT_S24: + if(bigendian) + m_convert = AUD_convert_s16_s24_be; + else + m_convert = AUD_convert_s16_s24_le; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_s16_s32; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_s16_float; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_s16_double; + break; + default: + break; + } + break; + case AUD_FORMAT_S24: + if(bigendian) + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_u8_s24_be; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_s16_s24_be; + break; + case AUD_FORMAT_S24: + m_convert = AUD_convert_s24_s24; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_s32_s24_be; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_float_s24_be; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_double_s24_be; + break; + default: + break; + } + else + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_u8_s24_le; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_s16_s24_le; + break; + case AUD_FORMAT_S24: + m_convert = AUD_convert_s24_s24; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_s32_s24_le; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_float_s24_le; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_double_s24_le; + break; + default: + break; + } + break; + case AUD_FORMAT_S32: + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_s32_u8; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_s32_s16; + break; + case AUD_FORMAT_S24: + if(bigendian) + m_convert = AUD_convert_s32_s24_be; + else + m_convert = AUD_convert_s32_s24_le; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_copy; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_s32_float; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_s32_double; + break; + default: + break; + } + break; + case AUD_FORMAT_FLOAT32: + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_float_u8; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_float_s16; + break; + case AUD_FORMAT_S24: + if(bigendian) + m_convert = AUD_convert_float_s24_be; + else + m_convert = AUD_convert_float_s24_le; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_float_s32; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_copy; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_float_double; + break; + default: + break; + } + break; + case AUD_FORMAT_FLOAT64: + switch(specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_double_u8; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_double_s16; + break; + case AUD_FORMAT_S24: + if(bigendian) + m_convert = AUD_convert_double_s24_be; + else + m_convert = AUD_convert_double_s24_le; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_double_s32; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_double_float; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_copy; + break; + default: + break; + } + break; + default: + break; + } + + m_specs.format = specs.format; + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_ConverterReader::~AUD_ConverterReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +AUD_Specs AUD_ConverterReader::getSpecs() +{ + return m_specs; +} + +void AUD_ConverterReader::read(int & length, sample_t* & buffer) +{ + m_reader->read(length, buffer); + + int samplesize = AUD_SAMPLE_SIZE(m_specs); + + if(m_buffer->getSize() < length*samplesize) + m_buffer->resize(length*samplesize); + + m_convert(m_buffer->getBuffer(), buffer, length*m_specs.channels); + + buffer = m_buffer->getBuffer(); +} diff --git a/intern/audaspace/intern/AUD_ConverterReader.h b/intern/audaspace/intern/AUD_ConverterReader.h new file mode 100644 index 00000000000..f855372b636 --- /dev/null +++ b/intern/audaspace/intern/AUD_ConverterReader.h @@ -0,0 +1,71 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_CONVERTERREADER +#define AUD_CONVERTERREADER + +#include "AUD_EffectReader.h" +#include "AUD_ConverterFunctions.h" +class AUD_Buffer; + +/** + * This class converts a sound source from one to another format. + */ +class AUD_ConverterReader : public AUD_EffectReader +{ +private: + /** + * The sound output buffer. + */ + AUD_Buffer *m_buffer; + + /** + * The target specification. + */ + AUD_Specs m_specs; + + /** + * Converter function. + */ + AUD_convert_f m_convert; + +public: + /** + * Creates a converter reader. + * \param reader The reader to convert. + * \param specs The target specification. + * \exception AUD_Exception Thrown if the reader is NULL. + */ + AUD_ConverterReader(AUD_IReader* reader, AUD_Specs specs); + /** + * Destroys the reader. + */ + ~AUD_ConverterReader(); + + virtual AUD_Specs getSpecs(); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_CONVERTERREADER diff --git a/intern/audaspace/intern/AUD_FileFactory.cpp b/intern/audaspace/intern/AUD_FileFactory.cpp new file mode 100644 index 00000000000..b63390803b1 --- /dev/null +++ b/intern/audaspace/intern/AUD_FileFactory.cpp @@ -0,0 +1,95 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FileFactory.h" +#include "AUD_Buffer.h" + +#include + +#ifdef WITH_FFMPEG +#include "AUD_FFMPEGReader.h" +#endif +#ifdef WITH_SNDFILE +#include "AUD_SndFileReader.h" +#endif + +AUD_FileFactory::AUD_FileFactory(const char* filename) +{ + if(filename != NULL) + { + m_filename = new char[strlen(filename)+1]; AUD_NEW("string") + strcpy(m_filename, filename); + } + else + m_filename = NULL; +} + +AUD_FileFactory::AUD_FileFactory(unsigned char* buffer, int size) +{ + m_filename = NULL; + m_buffer = AUD_Reference(new AUD_Buffer(size)); + memcpy(m_buffer.get()->getBuffer(), buffer, size); +} + +AUD_FileFactory::~AUD_FileFactory() +{ + if(m_filename) + { + delete[] m_filename; AUD_DELETE("string") + } +} + +AUD_IReader* AUD_FileFactory::createReader() +{ + AUD_IReader* reader = 0; + +#ifdef WITH_SNDFILE + try + { + if(m_filename) + reader = new AUD_SndFileReader(m_filename); + else + reader = new AUD_SndFileReader(m_buffer); + AUD_NEW("reader") + return reader; + } + catch(AUD_Exception e) {} +#endif + +#ifdef WITH_FFMPEG + try + { + if(m_filename) + reader = new AUD_FFMPEGReader(m_filename); + else + reader = new AUD_FFMPEGReader(m_buffer); + AUD_NEW("reader") + return reader; + } + catch(AUD_Exception e) {} +#endif + + return reader; +} diff --git a/intern/audaspace/intern/AUD_FileFactory.h b/intern/audaspace/intern/AUD_FileFactory.h new file mode 100644 index 00000000000..6ab8f280534 --- /dev/null +++ b/intern/audaspace/intern/AUD_FileFactory.h @@ -0,0 +1,71 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_FILEFACTORY +#define AUD_FILEFACTORY + +#include "AUD_IFactory.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +/** + * This factory tries to read a sound file via all available file readers. + */ +class AUD_FileFactory : public AUD_IFactory +{ +private: + /** + * The filename of the sound source file. + */ + char* m_filename; + + /** + * The buffer to read from. + */ + AUD_Reference m_buffer; + +public: + /** + * Creates a new factory. + * \param filename The sound file path. + */ + AUD_FileFactory(const char* filename); + + /** + * Creates a new factory. + * \param buffer The buffer to read from. + * \param size The size of the buffer. + */ + AUD_FileFactory(unsigned char* buffer, int size); + + /** + * Destroys the factory. + */ + ~AUD_FileFactory(); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_FILEFACTORY diff --git a/intern/audaspace/intern/AUD_FloatMixer.cpp b/intern/audaspace/intern/AUD_FloatMixer.cpp new file mode 100644 index 00000000000..f7133b9c30e --- /dev/null +++ b/intern/audaspace/intern/AUD_FloatMixer.cpp @@ -0,0 +1,172 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FloatMixer.h" +#include "AUD_ConverterFactory.h" +#include "AUD_SRCResampleFactory.h" +#include "AUD_ChannelMapperFactory.h" +#include "AUD_IReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_FloatMixer::AUD_FloatMixer() +{ + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") + + m_converter = NULL; + m_resampler = NULL; + m_mapper = NULL; +} + +AUD_FloatMixer::~AUD_FloatMixer() +{ + delete m_buffer; AUD_DELETE("buffer") + + if(m_converter) + { + delete m_converter; AUD_DELETE("factory") + } + if(m_resampler) + { + delete m_resampler; AUD_DELETE("factory") + } + if(m_mapper) + { + delete m_mapper; AUD_DELETE("factory") + } +} + +AUD_IReader* AUD_FloatMixer::prepare(AUD_IReader* reader) +{ + m_converter->setReader(reader); + reader = m_converter->createReader(); + + m_resampler->setReader(reader); + reader = m_resampler->createReader(); + + if(reader->getSpecs().channels != m_specs.channels) + { + m_mapper->setReader(reader); + reader = m_mapper->createReader(); + } + + return reader; +} + +void AUD_FloatMixer::setSpecs(AUD_Specs specs) +{ + m_specs = specs; + + if(m_converter) + { + delete m_converter; AUD_DELETE("factory") + } + if(m_resampler) + { + delete m_resampler; AUD_DELETE("factory") + } + if(m_mapper) + { + delete m_mapper; AUD_DELETE("factory") + } + + specs.format = AUD_FORMAT_FLOAT32; + + m_converter = new AUD_ConverterFactory(specs); AUD_NEW("factory") + m_resampler = new AUD_SRCResampleFactory(specs); AUD_NEW("factory") + m_mapper = new AUD_ChannelMapperFactory(specs); AUD_NEW("factory") + + int bigendian = 1; + bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian + + switch(m_specs.format) + { + case AUD_FORMAT_U8: + m_convert = AUD_convert_float_u8; + break; + case AUD_FORMAT_S16: + m_convert = AUD_convert_float_s16; + break; + case AUD_FORMAT_S24: + if(bigendian) + m_convert = AUD_convert_float_s24_be; + else + m_convert = AUD_convert_float_s24_le; + break; + case AUD_FORMAT_S32: + m_convert = AUD_convert_float_s32; + break; + case AUD_FORMAT_FLOAT32: + m_convert = AUD_convert_copy; + break; + case AUD_FORMAT_FLOAT64: + m_convert = AUD_convert_float_double; + break; + default: + break; + } +} + +void AUD_FloatMixer::add(sample_t* buffer, AUD_Specs specs, int length, + float volume) +{ + AUD_FloatMixerBuffer buf; + buf.buffer = buffer; + buf.length = length; + buf.volume = volume; + m_buffers.push_back(buf); +} + +void AUD_FloatMixer::superpose(sample_t* buffer, int length, float volume) +{ + AUD_FloatMixerBuffer buf; + + int channels = m_specs.channels; + + if(m_buffer->getSize() < length * channels * 4) + m_buffer->resize(length * channels * 4); + + float* out = (float*)m_buffer->getBuffer(); + float* in; + + memset(out, 0, length * channels * 4); + + int end; + + while(!m_buffers.empty()) + { + buf = m_buffers.front(); + m_buffers.pop_front(); + + end = buf.length*channels; + in = (float*) buf.buffer; + + for(int i = 0; i < end; i++) + out[i] += in[i]*buf.volume * volume; + } + + m_convert(buffer, (sample_t*) out, length * channels); +} diff --git a/intern/audaspace/intern/AUD_FloatMixer.h b/intern/audaspace/intern/AUD_FloatMixer.h new file mode 100644 index 00000000000..728a0faf3cb --- /dev/null +++ b/intern/audaspace/intern/AUD_FloatMixer.h @@ -0,0 +1,100 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_FLOATMIXER +#define AUD_FLOATMIXER + +#include "AUD_IMixer.h" +#include "AUD_ConverterFunctions.h" +class AUD_ConverterFactory; +class AUD_SRCResampleFactory; +class AUD_ChannelMapperFactory; +class AUD_Buffer; +#include + +struct AUD_FloatMixerBuffer +{ + sample_t* buffer; + int length; + float volume; +}; + +/** + * This class is able to mix two audiosignals with floats. + */ +class AUD_FloatMixer : public AUD_IMixer +{ +private: + /** + * The converter factory that converts all readers for superposition. + */ + AUD_ConverterFactory* m_converter; + + /** + * The resampling factory that resamples all readers for superposition. + */ + AUD_SRCResampleFactory* m_resampler; + + /** + * The channel mapper factory that maps all readers for superposition. + */ + AUD_ChannelMapperFactory* m_mapper; + + /** + * The list of buffers to superpose. + */ + std::list m_buffers; + + /** + * The output specification. + */ + AUD_Specs m_specs; + + /** + * The temporary mixing buffer. + */ + AUD_Buffer* m_buffer; + + /** + * Converter function. + */ + AUD_convert_f m_convert; + +public: + /** + * Creates the mixer. + */ + AUD_FloatMixer(); + + virtual ~AUD_FloatMixer(); + + virtual AUD_IReader* prepare(AUD_IReader* reader); + virtual void setSpecs(AUD_Specs specs); + virtual void add(sample_t* buffer, AUD_Specs specs, int length, + float volume); + virtual void superpose(sample_t* buffer, int length, float volume); +}; + +#endif //AUD_FLOATMIXER diff --git a/intern/audaspace/intern/AUD_I3DDevice.h b/intern/audaspace/intern/AUD_I3DDevice.h new file mode 100644 index 00000000000..c36924160de --- /dev/null +++ b/intern/audaspace/intern/AUD_I3DDevice.h @@ -0,0 +1,103 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_I3DDEVICE +#define AUD_I3DDEVICE + +#include "AUD_Space.h" + +/** + * This class represents an output device for 3D sound. + * Whether a normal device supports this or not can be checked with the + * AUD_CAPS_3D_DEVICE capability. + */ +class AUD_I3DDevice +{ +public: + /** + * Plays a 3D sound source. + * \param factory The factory to create the reader for the sound source. + * \param keep When keep is true the sound source will not be deleted but + * set to paused when its end has been reached. + * \return Returns a handle with which the playback can be controlled. + * This is NULL if the sound couldn't be played back. + * \exception AUD_Exception Thrown if there's an unexpected (from the + * device side) error during creation of the reader. + * \note The factory must provide a mono (single channel) source otherwise + * the sound is played back normally. + */ + virtual AUD_Handle* play3D(AUD_IFactory* factory, bool keep = false)=0; + + /** + * Updates a listeners 3D data. + * \param data The 3D data. + * \return Whether the action succeeded. + */ + virtual bool updateListener(AUD_3DData &data)=0; + + /** + * Sets a 3D device setting. + * \param setting The setting type. + * \param value The new setting value. + * \return Whether the action succeeded. + */ + virtual bool setSetting(AUD_3DSetting setting, float value)=0; + + /** + * Retrieves a 3D device setting. + * \param setting The setting type. + * \return The setting value. + */ + virtual float getSetting(AUD_3DSetting setting)=0; + + /** + * Updates a listeners 3D data. + * \param handle The source handle. + * \param data The 3D data. + * \return Whether the action succeeded. + */ + virtual bool updateSource(AUD_Handle* handle, AUD_3DData &data)=0; + + /** + * Sets a 3D source setting. + * \param handle The source handle. + * \param setting The setting type. + * \param value The new setting value. + * \return Whether the action succeeded. + */ + virtual bool setSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting, float value)=0; + + /** + * Retrieves a 3D source setting. + * \param handle The source handle. + * \param setting The setting type. + * \return The setting value. + */ + virtual float getSourceSetting(AUD_Handle* handle, + AUD_3DSourceSetting setting)=0; +}; + +#endif //AUD_I3DDEVICE diff --git a/intern/audaspace/intern/AUD_IDevice.h b/intern/audaspace/intern/AUD_IDevice.h new file mode 100644 index 00000000000..af2cae206f3 --- /dev/null +++ b/intern/audaspace/intern/AUD_IDevice.h @@ -0,0 +1,191 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_IDEVICE +#define AUD_IDEVICE + +#include "AUD_Space.h" +class AUD_IFactory; + +/// Handle structure, for inherition. +typedef struct +{ +} AUD_Handle; + +/** + * This class represents an output device for sound sources. + * Output devices may be several backends such as plattform independand like + * SDL or OpenAL or plattform specific like DirectSound, but they may also be + * files, RAM buffers or other types of streams. + * \warning Thread safety must be insured so that no reader is beeing called + * twice at the same time. + */ +class AUD_IDevice +{ +public: + /** + * Destroys the device. + */ + virtual ~AUD_IDevice() {} + + /** + * Returns the specification of the device. + */ + virtual AUD_Specs getSpecs()=0; + + /** + * Plays a sound source. + * \param factory The factory to create the reader for the sound source. + * \param keep When keep is true the sound source will not be deleted but + * set to paused when its end has been reached. + * \return Returns a handle with which the playback can be controlled. + * This is NULL if the sound couldn't be played back. + * \exception AUD_Exception Thrown if there's an unexpected (from the + * device side) error during creation of the reader. + */ + virtual AUD_Handle* play(AUD_IFactory* factory, bool keep = false)=0; + + /** + * Pauses a played back sound. + * \param handle The handle returned by the play function. + * \return + * - true if the sound has been paused. + * - false if the sound isn't playing back or the handle is invalid. + */ + virtual bool pause(AUD_Handle* handle)=0; + + /** + * Resumes a paused sound. + * \param handle The handle returned by the play function. + * \return + * - true if the sound has been resumed. + * - false if the sound isn't paused or the handle is invalid. + */ + virtual bool resume(AUD_Handle* handle)=0; + + /** + * Stops a played back or paused sound. The handle is definitely invalid + * afterwards. + * \param handle The handle returned by the play function. + * \return + * - true if the sound has been stopped. + * - false if the handle is invalid. + */ + virtual bool stop(AUD_Handle* handle)=0; + + /** + * Sets the behaviour of the device for a played back sound when the sound + * doesn't return any more samples. + * \param handle The handle returned by the play function. + * \param keep True when the source should be paused and not deleted. + * \return + * - true if the behaviour has been changed. + * - false if the handle is invalid. + */ + virtual bool setKeep(AUD_Handle* handle, bool keep)=0; + + /** + * Sends a message to a sound or all sounds that are currently played or + * paused. + * \param handle The sound that should receive the message or NULL if all + * sounds should receive it. + * \param message The message. + * \return True if the message has been read by at least one sound. + */ + virtual bool sendMessage(AUD_Handle* handle, AUD_Message &message)=0; + + /** + * Seeks in a played back sound. + * \param handle The handle returned by the play function. + * \param position The new position from where to play back, in seconds. + * \return + * - true if the handle is valid. + * - false if the handle is invalid. + * \warning Whether the seek works or not depends on the sound source. + */ + virtual bool seek(AUD_Handle* handle, float position)=0; + + /** + * Retrieves the current playback position of a sound. + * \param handle The handle returned by the play function. + * \return The playback position in seconds, or 0.0 if the handle is + * invalid. + */ + virtual float getPosition(AUD_Handle* handle)=0; + + /** + * Returns the status of a played back sound. + * \param handle The handle returned by the play function. + * \return + * - AUD_STATUS_INVALID if the sound has stopped or the handle is + *. invalid + * - AUD_STATUS_PLAYING if the sound is currently played back. + * - AUD_STATUS_PAUSED if the sound is currently paused. + * \see AUD_Status + */ + virtual AUD_Status getStatus(AUD_Handle* handle)=0; + + /** + * Locks the device. + * Used to make sure that between lock and unlock, no buffers are read, so + * that it is possible to start, resume, pause, stop or seek several + * playback handles simultaneously. + * \warning Make sure the locking time is as small as possible to avoid + * playback delays that result in unexpected noise and cracks. + */ + virtual void lock()=0; + + /** + * Unlocks the previously locked device. + */ + virtual void unlock()=0; + + /** + * Checks if a specific capability as available on a device. + * \param capability The capability. + * \return Whether it is available or not. + */ + virtual bool checkCapability(int capability)=0; + + /** + * Set a value of a capability. The data behind the pointer depends on the + * capability. + * \param capability The capability. + * \param value The value. + * \return Whether the action succeeded or not. + */ + virtual bool setCapability(int capability, void *value)=0; + + /** + * Retrieves a value of a capability. The data behind the pointer depends on + * the capability. + * \param capability The capability. + * \param value The value. + * \return Whether the action succeeded or not. + */ + virtual bool getCapability(int capability, void *value)=0; +}; + +#endif //AUD_IDevice diff --git a/intern/audaspace/intern/AUD_IFactory.h b/intern/audaspace/intern/AUD_IFactory.h new file mode 100644 index 00000000000..f7f29c9e842 --- /dev/null +++ b/intern/audaspace/intern/AUD_IFactory.h @@ -0,0 +1,55 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_IFACTORY +#define AUD_IFACTORY + +#include "AUD_Space.h" +class AUD_IReader; + +/** + * This class represents a type of sound source and saves the necessary values + * for it. It is able to create a reader that is actually usable for playback + * of the respective sound source through the factory method createReader. + */ +class AUD_IFactory +{ +public: + /** + * Destroys the factory. + */ + virtual ~AUD_IFactory(){} + + /** + * Creates a reader for playback of the sound source. + * \return A pointer to an AUD_IReader object or NULL if there has been an + * error. + * \exception AUD_Exception An exception may be thrown if there has been + * a more unexpected error during reader creation. + */ + virtual AUD_IReader* createReader()=0; +}; + +#endif //AUD_IFACTORY diff --git a/intern/audaspace/intern/AUD_IMixer.h b/intern/audaspace/intern/AUD_IMixer.h new file mode 100644 index 00000000000..c65e4c69cf7 --- /dev/null +++ b/intern/audaspace/intern/AUD_IMixer.h @@ -0,0 +1,77 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_IMIXER +#define AUD_IMIXER + +#include "AUD_Space.h" +class AUD_IReader; + +/** + * This class is able to mix audiosignals of different format and channel count. + * \note This class doesn't do resampling! + */ +class AUD_IMixer +{ +public: + /** + * Destroys the mixer. + */ + virtual ~AUD_IMixer(){} + + /** + * This funuction prepares a reader for playback. + * \param reader The reader to prepare. + * \return The reader that should be used for playback. + */ + virtual AUD_IReader* prepare(AUD_IReader* reader)=0; + + /** + * Sets the target specification for superposing. + * \param specs The target specification. + */ + virtual void setSpecs(AUD_Specs specs)=0; + + /** + * Adds a buffer for superposition. + * \param buffer The buffer to superpose. + * \param specs The specification of the buffer. + * \param start The start sample of the buffer. + * \param length The length of the buffer in samples. + * \param volume The mixing volume. Must be a value between 0.0 and 1.0. + */ + virtual void add(sample_t* buffer, AUD_Specs specs, int length, + float volume)=0; + + /** + * Superposes all added buffers into an output buffer. + * \param buffer The target buffer for superposing. + * \param length The length of the buffer in samples. + * \param volume The mixing volume. Must be a value between 0.0 and 1.0. + */ + virtual void superpose(sample_t* buffer, int length, float volume)=0; +}; + +#endif //AUD_IMIXER diff --git a/intern/audaspace/intern/AUD_IReader.h b/intern/audaspace/intern/AUD_IReader.h new file mode 100644 index 00000000000..4b563100659 --- /dev/null +++ b/intern/audaspace/intern/AUD_IReader.h @@ -0,0 +1,117 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_IREADER +#define AUD_IREADER + +#include "AUD_Space.h" + +/** + * This class represents a sound source as stream or as buffer which can be read + * for example by another reader, a device or whatever. + */ +class AUD_IReader +{ +public: + /** + * Destroys the reader. + */ + virtual ~AUD_IReader(){} + + /** + * Tells whether the source provides seeking functionality or not. + * \warning This doesn't mean that the seeking always has to succeed. + * \return Always returns true for readers of the buffer type. + * \see getType + */ + virtual bool isSeekable()=0; + + /** + * Seeks to a specific position in the source. + * This function must work for buffer type readers. + * \param position The position to seek for measured in samples. To get + * from a given time to the samples you simply have to multiply the + * time value in seconds with the sample rate of the reader. + * \warning This may work or not, depending on the actual reader. + * \see getType + */ + virtual void seek(int position)=0; + + /** + * Returns an aproximated length of the source in samples. + * For readers of the type buffer this has to return a correct value! + * \return The length as sample count. May be negative if unknown. + * \see getType + */ + virtual int getLength()=0; + + /** + * Returns the position of the source as a sample count value. + * \return The current position in the source. A negative value indicates + * that the position is unknown. + * \warning The value returned doesn't always have to be correct for readers + * of the stream type, especially after seeking, it must though for + * the buffer ones. + * \see getType + */ + virtual int getPosition()=0; + + /** + * Returns the specification of the reader. + * \return The AUD_Specs structure. + */ + virtual AUD_Specs getSpecs()=0; + + /** + * Returns the type of the reader. There are special conditions for the + * readers of the buffer type. Those have to return correct position and + * length values as well as they must be seekable. + * \return AUD_TYPE_BUFFER or AUD_TYPE_STREAM. + */ + virtual AUD_ReaderType getType()=0; + + /** + * Sends a message to this reader and if it has subreaders it broadcasts + * the message to them. + * \param message The message. + * \return Whether the message has been read by the reader or one of his + * subreaders. + */ + virtual bool notify(AUD_Message &message)=0; + + /** + * Request to read the next length samples out of the source. + * The buffer for reading has to stay valid until the next call of this + * method or until the reader is deleted. + * \param[in,out] length The count of samples that should be read. Shall + * contain the real count of samples after reading, in case + * there were only fewer samples available. + * A smaller value also indicates the end of the reader. + * \param[out] buffer The pointer to the buffer with the samples. + */ + virtual void read(int & length, sample_t* & buffer)=0; +}; + +#endif //AUD_IREADER diff --git a/intern/audaspace/intern/AUD_MixerFactory.cpp b/intern/audaspace/intern/AUD_MixerFactory.cpp new file mode 100644 index 00000000000..db38d1004db --- /dev/null +++ b/intern/audaspace/intern/AUD_MixerFactory.cpp @@ -0,0 +1,109 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_MixerFactory.h" +#include "AUD_IReader.h" + +AUD_IReader* AUD_MixerFactory::getReader() +{ + AUD_IReader* reader; + + // first check for an existing reader + if(m_reader != 0) + { + reader = m_reader; + m_reader = 0; + return reader; + } + + // otherwise create a reader if there is a factory + if(m_factory != 0) + { + reader = m_factory->createReader(); + return reader; + } + + return 0; +} + +AUD_MixerFactory::AUD_MixerFactory(AUD_IReader* reader, + AUD_Specs specs) +{ + m_specs = specs; + m_reader = reader; + m_factory = 0; +} + +AUD_MixerFactory::AUD_MixerFactory(AUD_IFactory* factory, + AUD_Specs specs) +{ + m_specs = specs; + m_reader = 0; + m_factory = factory; +} + +AUD_MixerFactory::AUD_MixerFactory(AUD_Specs specs) +{ + m_specs = specs; + m_reader = 0; + m_factory = 0; +} + +AUD_MixerFactory::~AUD_MixerFactory() +{ + if(m_reader != 0) + { + delete m_reader; AUD_DELETE("reader") + } +} + +AUD_Specs AUD_MixerFactory::getSpecs() +{ + return m_specs; +} + +void AUD_MixerFactory::setSpecs(AUD_Specs specs) +{ + m_specs = specs; +} + +void AUD_MixerFactory::setReader(AUD_IReader* reader) +{ + if(m_reader != 0) + { + delete m_reader; AUD_DELETE("reader") + } + m_reader = reader; +} + +void AUD_MixerFactory::setFactory(AUD_IFactory* factory) +{ + m_factory = factory; +} + +AUD_IFactory* AUD_MixerFactory::getFactory() +{ + return m_factory; +} diff --git a/intern/audaspace/intern/AUD_MixerFactory.h b/intern/audaspace/intern/AUD_MixerFactory.h new file mode 100644 index 00000000000..c61dd283c67 --- /dev/null +++ b/intern/audaspace/intern/AUD_MixerFactory.h @@ -0,0 +1,117 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_MIXERFACTORY +#define AUD_MIXERFACTORY + +#include "AUD_IFactory.h" + +/** + * This factory is a base class for all mixer factories. + */ +class AUD_MixerFactory : public AUD_IFactory +{ +protected: + /** + * The reader that should be mixed later. + */ + AUD_IReader* m_reader; + + /** + * If there is no reader it is created out of this factory. + */ + AUD_IFactory* m_factory; + + /** + * The target specification for resampling. + */ + AUD_Specs m_specs; + + /** + * Returns the reader created out of the factory or taken from m_reader. + * This method can be used for the createReader function of the implementing + * classes. + * \return The reader to mix, or NULL if there is no reader or factory. + */ + AUD_IReader* getReader(); + +public: + /** + * Creates a new factory. + * \param reader The reader to mix. + * \param specs The target specification. + */ + AUD_MixerFactory(AUD_IReader* reader, AUD_Specs specs); + + /** + * Creates a new factory. + * \param factory The factory to create the readers to mix out of. + * \param specs The target specification. + */ + AUD_MixerFactory(AUD_IFactory* factory, AUD_Specs specs); + + /** + * Creates a new factory. + * \param specs The target specification. + */ + AUD_MixerFactory(AUD_Specs specs); + + /** + * Destroys the resampling factory. + */ + virtual ~AUD_MixerFactory(); + + /** + * Returns the target specification for resampling. + */ + AUD_Specs getSpecs(); + + /** + * Sets the target specification for resampling. + * \param specs The specification. + */ + void setSpecs(AUD_Specs specs); + + /** + * Sets the reader for resampling. + * If there has already been a reader, it will be deleted. + * \param reader The reader that should be used as source for resampling. + */ + void setReader(AUD_IReader* reader); + + /** + * Sets the factory for resampling. + * \param factory The factory that should be used as source for resampling. + */ + void setFactory(AUD_IFactory* factory); + + /** + * Returns the saved factory. + * \return The factory or NULL if there has no factory been saved. + */ + AUD_IFactory* getFactory(); +}; + +#endif //AUD_MIXERFACTORY diff --git a/intern/audaspace/intern/AUD_NULLDevice.cpp b/intern/audaspace/intern/AUD_NULLDevice.cpp new file mode 100644 index 00000000000..d237b71b67e --- /dev/null +++ b/intern/audaspace/intern/AUD_NULLDevice.cpp @@ -0,0 +1,108 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_NULLDevice.h" +#include "AUD_IReader.h" +#include "AUD_IFactory.h" + +AUD_NULLDevice::AUD_NULLDevice() +{ + m_specs.channels = AUD_CHANNELS_INVALID; + m_specs.format = AUD_FORMAT_INVALID; + m_specs.rate = AUD_RATE_INVALID; +} + +AUD_Specs AUD_NULLDevice::getSpecs() +{ + return m_specs; +} + +AUD_Handle* AUD_NULLDevice::play(AUD_IFactory* factory, bool keep) +{ + return 0; +} + +bool AUD_NULLDevice::pause(AUD_Handle* handle) +{ + return false; +} + +bool AUD_NULLDevice::resume(AUD_Handle* handle) +{ + return false; +} + +bool AUD_NULLDevice::stop(AUD_Handle* handle) +{ + return false; +} + +bool AUD_NULLDevice::setKeep(AUD_Handle* handle, bool keep) +{ + return false; +} + +bool AUD_NULLDevice::sendMessage(AUD_Handle* handle, AUD_Message &message) +{ + return false; +} + +bool AUD_NULLDevice::seek(AUD_Handle* handle, float position) +{ + return false; +} + +float AUD_NULLDevice::getPosition(AUD_Handle* handle) +{ + return 0.0f; +} + +AUD_Status AUD_NULLDevice::getStatus(AUD_Handle* handle) +{ + return AUD_STATUS_INVALID; +} + +void AUD_NULLDevice::lock() +{ +} + +void AUD_NULLDevice::unlock() +{ +} + +bool AUD_NULLDevice::checkCapability(int capability) +{ + return false; +} + +bool AUD_NULLDevice::setCapability(int capability, void *value) +{ + return false; +} + +bool AUD_NULLDevice::getCapability(int capability, void *value) +{ + return false; +} diff --git a/intern/audaspace/intern/AUD_NULLDevice.h b/intern/audaspace/intern/AUD_NULLDevice.h new file mode 100644 index 00000000000..155f24f8837 --- /dev/null +++ b/intern/audaspace/intern/AUD_NULLDevice.h @@ -0,0 +1,65 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_NULLDEVICE +#define AUD_NULLDEVICE + +#include "AUD_IDevice.h" + +/** + * This device plays nothing. + */ +class AUD_NULLDevice : public AUD_IDevice +{ +private: + /** + * The specs of the device. + */ + AUD_Specs m_specs; + +public: + /** + * Creates a new NULL device. + */ + AUD_NULLDevice(); + + virtual AUD_Specs getSpecs(); + virtual AUD_Handle* play(AUD_IFactory* factory, bool keep = false); + virtual bool pause(AUD_Handle* handle); + virtual bool resume(AUD_Handle* handle); + virtual bool stop(AUD_Handle* handle); + virtual bool setKeep(AUD_Handle* handle, bool keep); + virtual bool sendMessage(AUD_Handle* handle, AUD_Message &message); + virtual bool seek(AUD_Handle* handle, float position); + virtual float getPosition(AUD_Handle* handle); + virtual AUD_Status getStatus(AUD_Handle* handle); + virtual void lock(); + virtual void unlock(); + virtual bool checkCapability(int capability); + virtual bool setCapability(int capability, void *value); + virtual bool getCapability(int capability, void *value); +}; + +#endif //AUD_NULLDEVICE diff --git a/intern/audaspace/intern/AUD_ReadDevice.cpp b/intern/audaspace/intern/AUD_ReadDevice.cpp new file mode 100644 index 00000000000..e2c1d2fac81 --- /dev/null +++ b/intern/audaspace/intern/AUD_ReadDevice.cpp @@ -0,0 +1,64 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FloatMixer.h" +#include "AUD_ReadDevice.h" +#include "AUD_IReader.h" + +#include + +AUD_ReadDevice::AUD_ReadDevice(AUD_Specs specs) +{ + m_specs = specs; + + m_mixer = new AUD_FloatMixer(); AUD_NEW("mixer") + m_mixer->setSpecs(m_specs); + + m_playing = false; + + create(); +} + +AUD_ReadDevice::~AUD_ReadDevice() +{ + destroy(); +} + +bool AUD_ReadDevice::read(sample_t* buffer, int length) +{ + if(m_playing) + mix(buffer, length); + else + if(m_specs.format == AUD_FORMAT_U8) + memset(buffer, 0x80, length * AUD_SAMPLE_SIZE(m_specs)); + else + memset(buffer, 0, length * AUD_SAMPLE_SIZE(m_specs)); + return m_playing; +} + +void AUD_ReadDevice::playing(bool playing) +{ + m_playing = playing; +} diff --git a/intern/audaspace/intern/AUD_ReadDevice.h b/intern/audaspace/intern/AUD_ReadDevice.h new file mode 100644 index 00000000000..d69b0c31ea5 --- /dev/null +++ b/intern/audaspace/intern/AUD_ReadDevice.h @@ -0,0 +1,68 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_READDEVICE +#define AUD_READDEVICE + +#include "AUD_SoftwareDevice.h" + +/** + * This device enables to let the user read raw data out of it. + */ +class AUD_ReadDevice : public AUD_SoftwareDevice +{ +protected: + virtual void playing(bool playing); + +private: + /** + * Whether the device currently. + */ + bool m_playing; + +public: + /** + * Creates a new read device. + * \param specs The wanted audio specification. + */ + AUD_ReadDevice(AUD_Specs specs); + + /** + * Closes the device. + */ + virtual ~AUD_ReadDevice(); + + /** + * Reads the next bytes into the supplied buffer. + * \param buffer The target buffer. + * \param length The length in samples to be filled. + * \return True if the reading succeeded, false if there are no sounds + * played back currently, in that case the buffer is filled with + * silence. + */ + bool read(sample_t* buffer, int length); +}; + +#endif //AUD_READDEVICE diff --git a/intern/audaspace/intern/AUD_Reference.h b/intern/audaspace/intern/AUD_Reference.h new file mode 100644 index 00000000000..9bb9d7440b3 --- /dev/null +++ b/intern/audaspace/intern/AUD_Reference.h @@ -0,0 +1,115 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_REFERENCE +#define AUD_REFERENCE + +template +/** + * This class provides reference counting functionality. + */ +class AUD_Reference +{ +private: + /// The reference. + T* m_reference; + /// The reference counter. + int* m_refcount; +public: + /** + * Creates a new reference counter. + * \param reference The reference. + */ + AUD_Reference(T* reference = 0) + { + m_reference = reference; + m_refcount = new int; AUD_NEW("int") + *m_refcount = 1; + } + + /** + * Copies a AUD_Reference object. + * \param ref The AUD_Reference object to copy. + */ + AUD_Reference(const AUD_Reference& ref) + { + m_reference = ref.m_reference; + m_refcount = ref.m_refcount; + (*m_refcount)++; + } + + /** + * Destroys a AUD_Reference object, if there's no furthere reference on the + * reference, it is destroyed as well. + */ + ~AUD_Reference() + { + (*m_refcount)--; + if(*m_refcount == 0) + { + if(m_reference != 0) + { + delete m_reference; AUD_DELETE("buffer") + } + delete m_refcount; AUD_DELETE("int") + } + } + + /** + * Copies a AUD_Reference object. + * \param ref The AUD_Reference object to copy. + */ + AUD_Reference& operator=(const AUD_Reference& ref) + { + if(&ref == this) + return *this; + + (*m_refcount)--; + if(*m_refcount == 0) + { + if(m_reference != 0) + { + delete m_reference; AUD_DELETE("buffer") + } + delete m_refcount; AUD_DELETE("int") + } + + m_reference = ref.m_reference; + m_refcount = ref.m_refcount; + (*m_refcount)++; + + return *this; + } + + /** + * Returns the reference. + */ + T* get() + { + return m_reference; + } +}; + +#endif // AUD_REFERENCE diff --git a/intern/audaspace/intern/AUD_ResampleFactory.h b/intern/audaspace/intern/AUD_ResampleFactory.h new file mode 100644 index 00000000000..5493e1005b7 --- /dev/null +++ b/intern/audaspace/intern/AUD_ResampleFactory.h @@ -0,0 +1,33 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_RESAMPLEFACTORY +#define AUD_RESAMPLEFACTORY + +#include "AUD_MixerFactory.h" + +typedef AUD_MixerFactory AUD_ResampleFactory; + +#endif //AUD_RESAMPLEFACTORY diff --git a/intern/audaspace/intern/AUD_SinusFactory.cpp b/intern/audaspace/intern/AUD_SinusFactory.cpp new file mode 100644 index 00000000000..ae878b9df60 --- /dev/null +++ b/intern/audaspace/intern/AUD_SinusFactory.cpp @@ -0,0 +1,51 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SinusFactory.h" +#include "AUD_SinusReader.h" +#include "AUD_Space.h" + +AUD_SinusFactory::AUD_SinusFactory(double frequency, AUD_SampleRate sampleRate) +{ + m_frequency = frequency; + m_sampleRate = sampleRate; +} + +AUD_IReader* AUD_SinusFactory::createReader() +{ + AUD_IReader* reader = new AUD_SinusReader(m_frequency, m_sampleRate); + AUD_NEW("reader") + return reader; +} + +double AUD_SinusFactory::getFrequency() +{ + return m_frequency; +} + +void AUD_SinusFactory::setFrequency(double frequency) +{ + m_frequency = frequency; +} diff --git a/intern/audaspace/intern/AUD_SinusFactory.h b/intern/audaspace/intern/AUD_SinusFactory.h new file mode 100644 index 00000000000..ffb36e741b9 --- /dev/null +++ b/intern/audaspace/intern/AUD_SinusFactory.h @@ -0,0 +1,70 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SINUSFACTORY +#define AUD_SINUSFACTORY + +#include "AUD_IFactory.h" + +/** + * This factory creates a reader that plays a sine tone. + */ +class AUD_SinusFactory : public AUD_IFactory +{ +private: + /** + * The frequence of the sine wave. + */ + double m_frequency; + + /** + * The target sample rate for output. + */ + AUD_SampleRate m_sampleRate; + +public: + /** + * Creates a new sine factory. + * \param frequency The desired frequency. + * \param sampleRate The target sample rate for playback. + */ + AUD_SinusFactory(double frequency, + AUD_SampleRate sampleRate = AUD_RATE_44100); + + /** + * Returns the frequency of the sine wave. + */ + double getFrequency(); + + /** + * Sets the frequency. + * \param frequency The new frequency. + */ + void setFrequency(double frequency); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_SINUSFACTORY diff --git a/intern/audaspace/intern/AUD_SinusReader.cpp b/intern/audaspace/intern/AUD_SinusReader.cpp new file mode 100644 index 00000000000..87e2f789d66 --- /dev/null +++ b/intern/audaspace/intern/AUD_SinusReader.cpp @@ -0,0 +1,104 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SinusReader.h" +#include "AUD_Buffer.h" + +#include + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +AUD_SinusReader::AUD_SinusReader(double frequency, AUD_SampleRate sampleRate) +{ + m_frequency = frequency; + m_position = 0; + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") + m_sampleRate = sampleRate; +} + +AUD_SinusReader::~AUD_SinusReader() +{ + delete m_buffer; AUD_DELETE("buffer") +} + +bool AUD_SinusReader::isSeekable() +{ + return true; +} + +void AUD_SinusReader::seek(int position) +{ + m_position = position; +} + +int AUD_SinusReader::getLength() +{ + return -1; +} + +int AUD_SinusReader::getPosition() +{ + return m_position; +} + +AUD_Specs AUD_SinusReader::getSpecs() +{ + AUD_Specs specs; + specs.rate = m_sampleRate; + specs.format = AUD_FORMAT_S16; + specs.channels = AUD_CHANNELS_STEREO; + return specs; +} + +AUD_ReaderType AUD_SinusReader::getType() +{ + return AUD_TYPE_STREAM; +} + +bool AUD_SinusReader::notify(AUD_Message &message) +{ + return false; +} + +void AUD_SinusReader::read(int & length, sample_t* & buffer) +{ + // resize if necessary + if(m_buffer->getSize() < length*4) + m_buffer->resize(length*4); + + // fill with sine data + short* buf = (short*) m_buffer->getBuffer(); + for(int i=0; i < length; i++) + { + buf[i*2] = sin((m_position + i) * 2.0 * M_PI * m_frequency / + (float)m_sampleRate) * 32700; + buf[i*2+1] = buf[i*2]; + } + + buffer = (sample_t*)buf; + m_position += length; +} diff --git a/intern/audaspace/intern/AUD_SinusReader.h b/intern/audaspace/intern/AUD_SinusReader.h new file mode 100644 index 00000000000..cb060dd8a43 --- /dev/null +++ b/intern/audaspace/intern/AUD_SinusReader.h @@ -0,0 +1,86 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SINUSREADER +#define AUD_SINUSREADER + +#include "AUD_IReader.h" +class AUD_Buffer; + +/** + * This class is used for sine tone playback. + * The output format is in the 16 bit format and stereo, the sample rate can be + * specified. + * As the two channels both play the same the output could also be mono, but + * in most cases this will result in having to resample for output, so stereo + * sound is created directly. + */ +class AUD_SinusReader : public AUD_IReader +{ +private: + /** + * The frequency of the sine wave. + */ + double m_frequency; + + /** + * The current position in samples. + */ + int m_position; + + /** + * The playback buffer. + */ + AUD_Buffer* m_buffer; + + /** + * The sample rate for the output. + */ + AUD_SampleRate m_sampleRate; + +public: + /** + * Creates a new reader. + * \param frequency The frequency of the sine wave. + * \param sampleRate The output sample rate. + */ + AUD_SinusReader(double frequency, AUD_SampleRate sampleRate); + + /** + * Destroys the reader. + */ + virtual ~AUD_SinusReader(); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_SINUSREADER diff --git a/intern/audaspace/intern/AUD_SoftwareDevice.cpp b/intern/audaspace/intern/AUD_SoftwareDevice.cpp new file mode 100644 index 00000000000..174ff8c8979 --- /dev/null +++ b/intern/audaspace/intern/AUD_SoftwareDevice.cpp @@ -0,0 +1,444 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SoftwareDevice.h" +#include "AUD_IReader.h" +#include "AUD_IMixer.h" +#include "AUD_IFactory.h" +#include "AUD_SourceCaps.h" + +#include + +/// Saves the data for playback. +struct AUD_SoftwareHandle : AUD_Handle +{ + /// The reader source. + AUD_IReader* reader; + + /// Whether to keep the source if end of it is reached. + bool keep; + + /// The volume of the source. + float volume; +}; + +typedef std::list::iterator AUD_HandleIterator; + +void AUD_SoftwareDevice::create() +{ + m_playingSounds = new std::list(); AUD_NEW("list") + m_pausedSounds = new std::list(); AUD_NEW("list") + m_playback = false; + m_volume = 1.0; + + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + + pthread_mutex_init(&m_mutex, &attr); + + pthread_mutexattr_destroy(&attr); +} + +void AUD_SoftwareDevice::destroy() +{ + if(m_playback) + playing(m_playback = false); + + delete m_mixer; AUD_DELETE("mixer") + + // delete all playing sounds + while(m_playingSounds->begin() != m_playingSounds->end()) + { + delete (*(m_playingSounds->begin()))->reader; AUD_DELETE("reader") + delete *(m_playingSounds->begin()); AUD_DELETE("handle") + m_playingSounds->erase(m_playingSounds->begin()); + } + delete m_playingSounds; AUD_DELETE("list") + + // delete all paused sounds + while(m_pausedSounds->begin() != m_pausedSounds->end()) + { + delete (*(m_pausedSounds->begin()))->reader; AUD_DELETE("reader") + delete *(m_pausedSounds->begin()); AUD_DELETE("handle") + m_pausedSounds->erase(m_pausedSounds->begin()); + } + delete m_pausedSounds; AUD_DELETE("list") + + pthread_mutex_destroy(&m_mutex); +} + +void AUD_SoftwareDevice::mix(sample_t* buffer, int length) +{ + lock(); + + AUD_SoftwareHandle* sound; + int len; + sample_t* buf; + int sample_size = AUD_SAMPLE_SIZE(m_specs); + std::list stopSounds; + + // for all sounds + AUD_HandleIterator it = m_playingSounds->begin(); + while(it != m_playingSounds->end()) + { + sound = *it; + // increment the iterator to make sure it's valid, + // in case the sound gets deleted after stopping + ++it; + + // get the buffer from the source + len = length; + sound->reader->read(len, buf); + + m_mixer->add(buf, sound->reader->getSpecs(), len, sound->volume); + + // in case the end of the sound is reached + if(len < length) + { + if(sound->keep) + pause(sound); + else + stopSounds.push_back(sound); + } + } + + // fill with silence + if(m_specs.format == AUD_FORMAT_U8) + memset(buffer, 0x80, length * sample_size); + else + memset(buffer, 0, length * sample_size); + + // superpose + m_mixer->superpose(buffer, length, m_volume); + + while(!stopSounds.empty()) + { + sound = stopSounds.front(); + stopSounds.pop_front(); + stop(sound); + } + + unlock(); +} + +bool AUD_SoftwareDevice::isValid(AUD_Handle* handle) +{ + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + if(*i == handle) + return true; + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + if(*i == handle) + return true; + return false; +} + +void AUD_SoftwareDevice::setMixer(AUD_IMixer* mixer) +{ + delete m_mixer; AUD_DELETE("mixer") + m_mixer = mixer; + mixer->setSpecs(m_specs); +} + +AUD_Specs AUD_SoftwareDevice::getSpecs() +{ + return m_specs; +} + +AUD_Handle* AUD_SoftwareDevice::play(AUD_IFactory* factory, bool keep) +{ + AUD_IReader* reader = factory->createReader(); + + if(reader == NULL) + AUD_THROW(AUD_ERROR_READER); + + // prepare the reader + reader = m_mixer->prepare(reader); + if(reader == NULL) + return NULL; + + AUD_Specs rs = reader->getSpecs(); + + // play sound + AUD_SoftwareHandle* sound = new AUD_SoftwareHandle; AUD_NEW("handle") + sound->keep = keep; + sound->reader = reader; + sound->volume = 1.0; + + lock(); + m_playingSounds->push_back(sound); + + if(!m_playback) + playing(m_playback = true); + unlock(); + + return sound; +} + +bool AUD_SoftwareDevice::pause(AUD_Handle* handle) +{ + // only songs that are played can be paused + lock(); + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + { + if(*i == handle) + { + m_pausedSounds->push_back(*i); + m_playingSounds->erase(i); + if(m_playingSounds->empty()) + playing(m_playback = false); + unlock(); + return true; + } + } + unlock(); + return false; +} + +bool AUD_SoftwareDevice::resume(AUD_Handle* handle) +{ + // only songs that are paused can be resumed + lock(); + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + { + if(*i == handle) + { + m_playingSounds->push_back(*i); + m_pausedSounds->erase(i); + if(!m_playback) + playing(m_playback = true); + unlock(); + return true; + } + } + unlock(); + return false; +} + +bool AUD_SoftwareDevice::stop(AUD_Handle* handle) +{ + lock(); + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + { + if(*i == handle) + { + delete (*i)->reader; AUD_DELETE("reader") + delete *i; AUD_DELETE("handle") + m_playingSounds->erase(i); + if(m_playingSounds->empty()) + playing(m_playback = false); + unlock(); + return true; + } + } + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + { + if(*i == handle) + { + delete (*i)->reader; AUD_DELETE("reader") + delete *i; AUD_DELETE("handle") + m_pausedSounds->erase(i); + unlock(); + return true; + } + } + unlock(); + return false; +} + +bool AUD_SoftwareDevice::setKeep(AUD_Handle* handle, bool keep) +{ + lock(); + if(isValid(handle)) + { + ((AUD_SoftwareHandle*)handle)->keep = keep; + unlock(); + return true; + } + unlock(); + return false; +} + +bool AUD_SoftwareDevice::sendMessage(AUD_Handle* handle, AUD_Message &message) +{ + lock(); + + bool result = false; + + if(handle == 0) + { + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + result |= (*i)->reader->notify(message); + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + result |= (*i)->reader->notify(message); + } + else if(isValid(handle)) + result = ((AUD_SoftwareHandle*)handle)->reader->notify(message); + unlock(); + return result; +} + +bool AUD_SoftwareDevice::seek(AUD_Handle* handle, float position) +{ + lock(); + + if(isValid(handle)) + { + AUD_IReader* reader = ((AUD_SoftwareHandle*)handle)->reader; + reader->seek((int)(position * reader->getSpecs().rate)); + unlock(); + return true; + } + + unlock(); + return false; +} + +float AUD_SoftwareDevice::getPosition(AUD_Handle* handle) +{ + lock(); + + float position = 0.0f; + + if(isValid(handle)) + { + AUD_SoftwareHandle* h = (AUD_SoftwareHandle*)handle; + position = h->reader->getPosition() / (float)m_specs.rate; + } + + unlock(); + return position; +} + +AUD_Status AUD_SoftwareDevice::getStatus(AUD_Handle* handle) +{ + lock(); + for(AUD_HandleIterator i = m_playingSounds->begin(); + i != m_playingSounds->end(); i++) + { + if(*i == handle) + { + unlock(); + return AUD_STATUS_PLAYING; + } + } + for(AUD_HandleIterator i = m_pausedSounds->begin(); + i != m_pausedSounds->end(); i++) + { + if(*i == handle) + { + unlock(); + return AUD_STATUS_PAUSED; + } + } + unlock(); + return AUD_STATUS_INVALID; +} + +void AUD_SoftwareDevice::lock() +{ + pthread_mutex_lock(&m_mutex); +} + +void AUD_SoftwareDevice::unlock() +{ + pthread_mutex_unlock(&m_mutex); +} + +bool AUD_SoftwareDevice::checkCapability(int capability) +{ + return capability == AUD_CAPS_SOFTWARE_DEVICE || + capability == AUD_CAPS_VOLUME || + capability == AUD_CAPS_SOURCE_VOLUME; +} + +bool AUD_SoftwareDevice::setCapability(int capability, void *value) +{ + switch(capability) + { + case AUD_CAPS_VOLUME: + lock(); + m_volume = *((float*)value); + if(m_volume > 1.0) + m_volume = 1.0; + else if(m_volume < 0.0) + m_volume = 0.0; + unlock(); + return true; + case AUD_CAPS_SOURCE_VOLUME: + { + AUD_SourceCaps* caps = (AUD_SourceCaps*) value; + lock(); + if(isValid(caps->handle)) + { + AUD_SoftwareHandle* handle = (AUD_SoftwareHandle*)caps->handle; + handle->volume = caps->value; + if(handle->volume > 1.0) + handle->volume = 1.0; + else if(handle->volume < 0.0) + handle->volume = 0.0; + unlock(); + return true; + } + unlock(); + } + break; + } + return false; +} + +bool AUD_SoftwareDevice::getCapability(int capability, void *value) +{ + switch(capability) + { + case AUD_CAPS_VOLUME: + lock(); + *((float*)value) = m_volume; + unlock(); + return true; + case AUD_CAPS_SOURCE_VOLUME: + { + AUD_SourceCaps* caps = (AUD_SourceCaps*) value; + lock(); + if(isValid(caps->handle)) + { + caps->value = ((AUD_SoftwareHandle*)caps->handle)->volume; + unlock(); + return true; + } + unlock(); + } + break; + } + return false; +} diff --git a/intern/audaspace/intern/AUD_SoftwareDevice.h b/intern/audaspace/intern/AUD_SoftwareDevice.h new file mode 100644 index 00000000000..3768786fa9c --- /dev/null +++ b/intern/audaspace/intern/AUD_SoftwareDevice.h @@ -0,0 +1,137 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SOFTWAREDEVICE +#define AUD_SOFTWAREDEVICE + +#include "AUD_IDevice.h" +struct AUD_SoftwareHandle; +class AUD_IMixer; + +#include +#include + +/** + * This device plays is a generic device with software mixing. + * Classes implementing this have to: + * - Implement the playing function. + * - Prepare the m_specs, m_mixer variables. + * - Call the create and destroy functions. + * - Call the mix function to retrieve their audio data. + */ +class AUD_SoftwareDevice : public AUD_IDevice +{ +protected: + /** + * The specification of the device. + */ + AUD_Specs m_specs; + + /** + * The mixer. Will be deleted by the destroy function. + */ + AUD_IMixer* m_mixer; + + /** + * Initializes member variables. + */ + void create(); + + /** + * Uninitializes member variables. + */ + void destroy(); + + /** + * Mixes the next samples into the buffer. + * \param buffer The target buffer. + * \param length The length in samples to be filled. + */ + void mix(sample_t* buffer, int length); + + /** + * This function tells the device, to start or pause playback. + * \param playing True if device should playback. + */ + virtual void playing(bool playing)=0; + +private: + /** + * The list of sounds that are currently playing. + */ + std::list* m_playingSounds; + + /** + * The list of sounds that are currently paused. + */ + std::list* m_pausedSounds; + + /** + * Whether there is currently playback. + */ + bool m_playback; + + /** + * The mutex for locking. + */ + pthread_mutex_t m_mutex; + + /** + * The overall volume of the device. + */ + float m_volume; + + /** + * Checks if a handle is valid. + * \param handle The handle to check. + * \return Whether the handle is valid. + */ + bool isValid(AUD_Handle* handle); + +public: + /** + * Sets a new mixer. + * \param mixer The new mixer. + */ + void setMixer(AUD_IMixer* mixer); + + virtual AUD_Specs getSpecs(); + virtual AUD_Handle* play(AUD_IFactory* factory, bool keep = false); + virtual bool pause(AUD_Handle* handle); + virtual bool resume(AUD_Handle* handle); + virtual bool stop(AUD_Handle* handle); + virtual bool setKeep(AUD_Handle* handle, bool keep); + virtual bool sendMessage(AUD_Handle* handle, AUD_Message &message); + virtual bool seek(AUD_Handle* handle, float position); + virtual float getPosition(AUD_Handle* handle); + virtual AUD_Status getStatus(AUD_Handle* handle); + virtual void lock(); + virtual void unlock(); + virtual bool checkCapability(int capability); + virtual bool setCapability(int capability, void *value); + virtual bool getCapability(int capability, void *value); +}; + +#endif //AUD_SOFTWAREDEVICE diff --git a/intern/audaspace/intern/AUD_SourceCaps.h b/intern/audaspace/intern/AUD_SourceCaps.h new file mode 100644 index 00000000000..b1edd2b9b4e --- /dev/null +++ b/intern/audaspace/intern/AUD_SourceCaps.h @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SOURCECAPS +#define AUD_SOURCECAPS + +#include "AUD_IDevice.h" + +/// The structure for source capabilities. +typedef struct +{ + /// The source to apply the capability on. + AUD_Handle* handle; + + /// The value for the capability. + float value; +} AUD_SourceCaps; + +#endif //AUD_SOURCECAPS diff --git a/intern/audaspace/intern/AUD_Space.h b/intern/audaspace/intern/AUD_Space.h new file mode 100644 index 00000000000..123d9c272a0 --- /dev/null +++ b/intern/audaspace/intern/AUD_Space.h @@ -0,0 +1,295 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SPACE +#define AUD_SPACE + +/// The size of a format in bytes. +#define AUD_FORMAT_SIZE(format) (format & 0x0F) +/// The size of a sample in the specified format in bytes. +#define AUD_SAMPLE_SIZE(specs) (specs.channels * (specs.format & 0x0F)) +/// Throws a AUD_Exception with the provided error code. +#define AUD_THROW(exception) { AUD_Exception e; e.error = exception; throw e; } + +/// Returns the smaller of the two values. +#define AUD_MIN(a, b) (((a) < (b)) ? (a) : (b)) +/// Returns the bigger of the two values. +#define AUD_MAX(a, b) (((a) > (b)) ? (a) : (b)) + +// 5 sec * 44100 samples/sec * 4 bytes/sample * 6 channels +/// The size by which a buffer should be resized if the final extent is unknown. +#define AUD_BUFFER_RESIZE_BYTES 5292000 + +/// The default playback buffer size of a device. +#define AUD_DEFAULT_BUFFER_SIZE 1024 + +// Capability defines + +/// This capability checks whether a device is a 3D device. See AUD_I3DDevice.h. +#define AUD_CAPS_3D_DEVICE 0x0001 + +/** + * This capability checks whether a device is a software device. See + * AUD_SoftwareDevice. + */ +#define AUD_CAPS_SOFTWARE_DEVICE 0x0002 + +/** + * This capability enables the user to set the overall volume of the device. + * You can set and get it with the pointer pointing to a float value between + * 0.0 (muted) and 1.0 (maximum volume). + */ +#define AUD_CAPS_VOLUME 0x0101 + +/** + * This capability enables the user to set the volume of a source. + * You can set and get it with the pointer pointing to a AUD_SourceValue + * structure defined in AUD_SourceCaps.h. + */ +#define AUD_CAPS_SOURCE_VOLUME 0x1001 + +/** + * This capability enables the user to set the pitch of a source. + * You can set and get it with the pointer pointing to a AUD_SourceValue + * structure defined in AUD_SourceCaps.h. + */ +#define AUD_CAPS_SOURCE_PITCH 0x1002 + +/** + * This capability enables the user to buffer a factory into the device. + * Setting with the factory as pointer loads the factory into a device internal + * buffer. Play function calls with the buffered factory as argument result in + * the internal buffer being played back, so there's no reader created, what + * also results in not being able to send messages to that handle. + * A repeated call with the same factory doesn't do anything. + * A set call with a NULL pointer results in all buffered factories being + * deleted. + * \note This is only possible with factories that create readers of the buffer + * type. + */ +#define AUD_CAPS_BUFFERED_FACTORY 0x2001 + +// Used for debugging memory leaks. +//#define AUD_DEBUG_MEMORY + +#ifdef AUD_DEBUG_MEMORY +int AUD_References(int count = 0, const char* text = ""); +#define AUD_NEW(text) AUD_References(1, text); +#define AUD_DELETE(text) AUD_References(-1, text); +#else +#define AUD_NEW(text) +#define AUD_DELETE(text) +#endif + +/** + * The format of a sample. + * The last 4 bit save the byte count of the format. + */ +typedef enum +{ + AUD_FORMAT_INVALID = 0x00, /// Invalid sample format. + AUD_FORMAT_U8 = 0x01, /// 1 byte unsigned byte. + AUD_FORMAT_S16 = 0x12, /// 2 byte signed integer. + AUD_FORMAT_S24 = 0x13, /// 3 byte signed integer. + AUD_FORMAT_S32 = 0x14, /// 4 byte signed integer. + AUD_FORMAT_FLOAT32 = 0x24, /// 4 byte float. + AUD_FORMAT_FLOAT64 = 0x28 /// 8 byte float. +} AUD_SampleFormat; + +/// The channel count. +typedef enum +{ + AUD_CHANNELS_INVALID = 0, /// Invalid channel count. + AUD_CHANNELS_MONO = 1, /// Mono. + AUD_CHANNELS_STEREO = 2, /// Stereo. + AUD_CHANNELS_STEREO_LFE = 3, /// Stereo with LFE channel. + AUD_CHANNELS_SURROUND4 = 4, /// 4 channel surround sound. + AUD_CHANNELS_SURROUND5 = 5, /// 5 channel surround sound. + AUD_CHANNELS_SURROUND51 = 6, /// 5.1 surround sound. + AUD_CHANNELS_SURROUND61 = 7, /// 6.1 surround sound. + AUD_CHANNELS_SURROUND71 = 8, /// 7.1 surround sound. + AUD_CHANNELS_SURROUND72 = 9 /// 7.2 surround sound. +} AUD_Channels; + +/** + * The sample rate tells how many samples are played back within one second. + * Some exotic formats may use other sample rates than provided here. + */ +typedef enum +{ + AUD_RATE_INVALID = 0, /// Invalid sample rate. + AUD_RATE_8000 = 8000, /// 8000 Hz. + AUD_RATE_16000 = 16000, /// 16000 Hz. + AUD_RATE_11025 = 11025, /// 11025 Hz. + AUD_RATE_22050 = 22050, /// 22050 Hz. + AUD_RATE_32000 = 32000, /// 32000 Hz. + AUD_RATE_44100 = 44100, /// 44100 Hz. + AUD_RATE_48000 = 48000, /// 48000 Hz. + AUD_RATE_88200 = 88200, /// 88200 Hz. + AUD_RATE_96000 = 96000, /// 96000 Hz. + AUD_RATE_192000 = 192000 /// 192000 Hz. +} AUD_SampleRate; + +/** + * Type of a reader. + * @see AUD_IReader for details. + */ +typedef enum +{ + AUD_TYPE_INVALID = 0, /// Invalid reader type. + AUD_TYPE_BUFFER, /// Reader reads from a buffer. + AUD_TYPE_STREAM /// Reader reads from a stream. +} AUD_ReaderType; + +/// Status of a playback handle. +typedef enum +{ + AUD_STATUS_INVALID = 0, /// Invalid handle. Maybe due to stopping. + AUD_STATUS_PLAYING, /// Sound is playing. + AUD_STATUS_PAUSED /// Sound is being paused. +} AUD_Status; + +/// Error codes for exceptions (C++ library) or for return values (C API). +typedef enum +{ + AUD_NO_ERROR = 0, + AUD_ERROR_READER, + AUD_ERROR_FACTORY, + AUD_ERROR_FILE, + AUD_ERROR_FFMPEG, + AUD_ERROR_SDL, + AUD_ERROR_OPENAL, + AUD_ERROR_JACK +} AUD_Error; + +/// Message codes. +typedef enum +{ + AUD_MSG_INVALID = 0, /// Invalid message. + AUD_MSG_LOOP, /// Loop reader message. + AUD_MSG_VOLUME /// Volume reader message. +} AUD_MessageType; + +/// Fading types. +typedef enum +{ + AUD_FADE_IN, + AUD_FADE_OUT +} AUD_FadeType; + +/// 3D device settings. +typedef enum +{ + AUD_3DS_NONE, /// No setting. + AUD_3DS_SPEED_OF_SOUND, /// Speed of sound. + AUD_3DS_DOPPLER_FACTOR, /// Doppler factor. + AUD_3DS_DISTANCE_MODEL /// Distance model. +} AUD_3DSetting; + +/// Possible distance models for the 3D device. +#define AUD_DISTANCE_MODEL_NONE 0.0f +#define AUD_DISTANCE_MODEL_INVERSE 1.0f +#define AUD_DISTANCE_MODEL_INVERSE_CLAMPED 2.0f +#define AUD_DISTANCE_MODEL_LINEAR 3.0f +#define AUD_DISTANCE_MODEL_LINEAR_CLAMPED 4.0f +#define AUD_DISTANCE_MODEL_EXPONENT 5.0f +#define AUD_DISTANCE_MODEL_EXPONENT_CLAMPED 6.0f + +/// 3D source settings. +typedef enum +{ + AUD_3DSS_NONE, /// No setting. + AUD_3DSS_IS_RELATIVE, /// > 0 tells that the sound source is + /// relative to the listener + AUD_3DSS_MIN_GAIN, /// Minimum gain. + AUD_3DSS_MAX_GAIN, /// Maximum gain. + AUD_3DSS_REFERENCE_DISTANCE, /// Reference distance. + AUD_3DSS_MAX_DISTANCE, /// Maximum distance. + AUD_3DSS_ROLLOFF_FACTOR, /// Rolloff factor. + AUD_3DSS_CONE_INNER_ANGLE, /// Cone inner angle. + AUD_3DSS_CONE_OUTER_ANGLE, /// Cone outer angle. + AUD_3DSS_CONE_OUTER_GAIN /// Cone outer gain. +} AUD_3DSourceSetting; + +/// Sample pointer type. +typedef unsigned char sample_t; + +/// Specification of a sound source or device. +typedef struct +{ + /// Sample rate in Hz. + AUD_SampleRate rate; + + /// Sample format. + AUD_SampleFormat format; + + /// Channel count. + AUD_Channels channels; +} AUD_Specs; + +/// Exception structure. +typedef struct +{ + /** + * Error code. + * \see AUD_Error + */ + AUD_Error error; + + // void* userData; - for the case it is needed someday +} AUD_Exception; + +/// Message structure. +typedef struct +{ + /** + * The message type. + */ + AUD_MessageType type; + + union + { + // loop reader + int loopcount; + + // volume reader + float volume; + }; +} AUD_Message; + +/// Handle structure, for inherition. +typedef struct +{ + /// x, y and z coordinates of the object. + float position[3]; + + /// x, y and z coordinates telling the velocity and direction of the object. + float velocity[3]; + + /// 3x3 matrix telling the orientation of the object. + float orientation[9]; +} AUD_3DData; + +#endif //AUD_SPACE diff --git a/intern/audaspace/intern/AUD_StreamBufferFactory.cpp b/intern/audaspace/intern/AUD_StreamBufferFactory.cpp new file mode 100644 index 00000000000..11391fa4a08 --- /dev/null +++ b/intern/audaspace/intern/AUD_StreamBufferFactory.cpp @@ -0,0 +1,80 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_StreamBufferFactory.h" +#include "AUD_BufferReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_StreamBufferFactory::AUD_StreamBufferFactory(AUD_IFactory* factory) +{ + AUD_IReader* reader = factory->createReader(); + + if(reader == NULL) + AUD_THROW(AUD_ERROR_READER); + + m_specs = reader->getSpecs(); + m_buffer = AUD_Reference(new AUD_Buffer()); AUD_NEW("buffer") + + int sample_size = AUD_SAMPLE_SIZE(m_specs); + int length; + int index = 0; + sample_t* buffer; + + // get an aproximated size if possible + int size = reader->getLength(); + + if(size <= 0) + size = AUD_BUFFER_RESIZE_BYTES / sample_size; + else + size += m_specs.rate; + + // as long as we fill our buffer to the end + while(index == m_buffer.get()->getSize() / sample_size) + { + // increase + m_buffer.get()->resize(size*sample_size, true); + + // read more + length = size-index; + reader->read(length, buffer); + memcpy(m_buffer.get()->getBuffer()+index*sample_size, + buffer, + length*sample_size); + size += AUD_BUFFER_RESIZE_BYTES / sample_size; + index += length; + } + + m_buffer.get()->resize(index*sample_size, true); + delete reader; AUD_DELETE("reader") +} + +AUD_IReader* AUD_StreamBufferFactory::createReader() +{ + AUD_IReader* reader = new AUD_BufferReader(m_buffer, m_specs); + AUD_NEW("reader") + return reader; +} diff --git a/intern/audaspace/intern/AUD_StreamBufferFactory.h b/intern/audaspace/intern/AUD_StreamBufferFactory.h new file mode 100644 index 00000000000..eda06f6c10c --- /dev/null +++ b/intern/audaspace/intern/AUD_StreamBufferFactory.h @@ -0,0 +1,62 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_STREAMBUFFERFACTORY +#define AUD_STREAMBUFFERFACTORY + +#include "AUD_IFactory.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +/** + * This factory creates a buffer out of a reader. This way normally streamed + * sound sources can be loaded into memory for buffered playback. + */ +class AUD_StreamBufferFactory : public AUD_IFactory +{ +private: + /** + * The buffer that holds the audio data. + */ + AUD_Reference m_buffer; + + /** + * The specification of the samples. + */ + AUD_Specs m_specs; + +public: + /** + * Creates the factory and reads the reader created by the factory supplied + * to the buffer. + * \param factory The factory that creates the reader for buffering. + * \exception AUD_Exception Thrown if the reader cannot be created. + */ + AUD_StreamBufferFactory(AUD_IFactory* factory); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_STREAMBUFFERFACTORY diff --git a/intern/audaspace/intern/Makefile b/intern/audaspace/intern/Makefile new file mode 100644 index 00000000000..4bdca04c1cb --- /dev/null +++ b/intern/audaspace/intern/Makefile @@ -0,0 +1,70 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = audaspace +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +ifeq ($(WITH_SDL),true) + CPPFLAGS += -DWITH_SDL + CPPFLAGS += $(NAN_SDLCFLAGS) +endif + +ifeq ($(WITH_OPENAL),true) + CPPFLAGS += -DWITH_OPENAL + CPPFLAGS += -I../OpenAL +endif + +ifeq ($(WITH_JACK),true) + CPPFLAGS += -DWITH_JACK + CPPFLAGS += $(NAN_JACKCFLAGS) + CPPFLAGS += -I../jack +endif + +ifeq ($(WITH_FFMPEG),true) + CPPFLAGS += -DWITH_FFMPEG + CPPFLAGS += $(NAN_FFMPEGCFLAGS) +endif + +ifeq ($(WITH_SNDFILE),true) + CPPFLAGS += -DWITH_SNDFILE + CPPFLAGS += -I../sndfile +endif + +CPPFLAGS += -I$(LCGDIR)/samplerate/include/ +CPPFLAGS += -I../ffmpeg +CPPFLAGS += -I../FX +CPPFLAGS += -I../SDL +CPPFLAGS += -I../SRC +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/jack/AUD_JackDevice.cpp b/intern/audaspace/jack/AUD_JackDevice.cpp new file mode 100644 index 00000000000..4d8ab93d672 --- /dev/null +++ b/intern/audaspace/jack/AUD_JackDevice.cpp @@ -0,0 +1,149 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_FloatMixer.h" +#include "AUD_JackDevice.h" +#include "AUD_IReader.h" +#include "AUD_Buffer.h" + +#include +#include + +// AUD_XXX this is not realtime suitable! +int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data) +{ + AUD_JackDevice* device = (AUD_JackDevice*)data; + unsigned int samplesize = AUD_SAMPLE_SIZE(device->m_specs); + if(device->m_buffer->getSize() < samplesize * length) + device->m_buffer->resize(samplesize * length); + device->mix(device->m_buffer->getBuffer(), length); + + float* in = (float*) device->m_buffer->getBuffer(); + float* out; + int count = device->m_specs.channels; + + for(unsigned int i = 0; i < count; i++) + { + out = (float*)jack_port_get_buffer(device->m_ports[i], length); + for(unsigned int j = 0; j < length; j++) + out[j] = in[j * count + i]; + } + + return 0; +} + +void AUD_JackDevice::jack_shutdown(void *data) +{ + AUD_JackDevice* device = (AUD_JackDevice*)data; + device->m_valid = false; +} + +AUD_JackDevice::AUD_JackDevice(AUD_Specs specs) +{ + if(specs.channels == AUD_CHANNELS_INVALID) + specs.channels = AUD_CHANNELS_STEREO; + + // jack uses floats + m_specs = specs; + m_specs.format = AUD_FORMAT_FLOAT32; + + jack_options_t options = JackNullOption; + jack_status_t status; + + // open client + m_client = jack_client_open("Blender", options, &status); + if(m_client == NULL) + AUD_THROW(AUD_ERROR_JACK); + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer"); + + // set callbacks + jack_set_process_callback(m_client, AUD_JackDevice::jack_mix, this); + jack_on_shutdown(m_client, AUD_JackDevice::jack_shutdown, this); + + // register our output channels which are called ports in jack + m_ports = new jack_port_t*[m_specs.channels]; AUD_NEW("jack_port") + + try + { + char portname[64]; + for(int i = 0; i < m_specs.channels; i++) + { + sprintf(portname, "out %d", i+1); + m_ports[i] = jack_port_register(m_client, portname, + JACK_DEFAULT_AUDIO_TYPE, + JackPortIsOutput, 0); + if(m_ports[i] == NULL) + AUD_THROW(AUD_ERROR_JACK); + } + + m_specs.rate = (AUD_SampleRate)jack_get_sample_rate(m_client); + + // activate the client + if(jack_activate(m_client)) + AUD_THROW(AUD_ERROR_JACK); + } + catch(AUD_Exception) + { + jack_client_close(m_client); + delete[] m_ports; AUD_DELETE("jack_port") + delete m_buffer; AUD_DELETE("buffer"); + throw; + } + + const char** ports = jack_get_ports(m_client, NULL, NULL, + JackPortIsPhysical | JackPortIsInput); + if(ports != NULL) + { + for(int i = 0; i < m_specs.channels && ports[i]; i++) + jack_connect(m_client, jack_port_name(m_ports[i]), ports[i]); + + free(ports); + } + + m_mixer = new AUD_FloatMixer(); AUD_NEW("mixer") + m_mixer->setSpecs(m_specs); + + m_valid = true; + + create(); +} + +AUD_JackDevice::~AUD_JackDevice() +{ + lock(); + if(m_valid) + jack_client_close(m_client); + delete[] m_ports; AUD_DELETE("jack_port") + delete m_buffer; AUD_DELETE("buffer"); + unlock(); + + destroy(); +} + +void AUD_JackDevice::playing(bool playing) +{ + // Do nothing. +} diff --git a/intern/audaspace/jack/AUD_JackDevice.h b/intern/audaspace/jack/AUD_JackDevice.h new file mode 100644 index 00000000000..f0c887a2f43 --- /dev/null +++ b/intern/audaspace/jack/AUD_JackDevice.h @@ -0,0 +1,92 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_JACKDEVICE +#define AUD_JACKDEVICE + + +#include "AUD_SoftwareDevice.h" +class AUD_Buffer; + +#include + +/** + * This device plays back through Jack. + */ +class AUD_JackDevice : public AUD_SoftwareDevice +{ +private: + /** + * The output ports of jack. + */ + jack_port_t** m_ports; + + /** + * The jack client. + */ + jack_client_t* m_client; + + /** + * The output buffer. + */ + AUD_Buffer* m_buffer; + + /** + * Whether the device is valid. + */ + bool m_valid; + + /** + * Invalidates the jack device. + * \param data The jack device that gets invalidet by jack. + */ + static void jack_shutdown(void *data); + + /** + * Mixes the next bytes into the buffer. + * \param length The length in samples to be filled. + * \param data A pointer to the jack device. + * \return 0 what shows success. + */ + static int jack_mix(jack_nframes_t length, void *data); + +protected: + virtual void playing(bool playing); + +public: + /** + * Creates a Jack client for audio output. + * \param specs The wanted audio specification, where only the channel count is important. + * \exception AUD_Exception Thrown if the audio device cannot be opened. + */ + AUD_JackDevice(AUD_Specs specs); + + /** + * Closes the Jack client. + */ + virtual ~AUD_JackDevice(); +}; + +#endif //AUD_JACKDEVICE diff --git a/intern/audaspace/jack/Makefile b/intern/audaspace/jack/Makefile new file mode 100644 index 00000000000..23cadf559c0 --- /dev/null +++ b/intern/audaspace/jack/Makefile @@ -0,0 +1,44 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): GSR +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_jack +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +# If we are here, jack is enable. +CPPFLAGS += -DWITH_JACK +CPPFLAGS += $(NAN_JACKCFLAGS) + +CPPFLAGS += -I../intern +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/make/msvc_9_0/audaspace.vcproj b/intern/audaspace/make/msvc_9_0/audaspace.vcproj new file mode 100644 index 00000000000..0d8ade43e07 --- /dev/null +++ b/intern/audaspace/make/msvc_9_0/audaspace.vcproj @@ -0,0 +1,767 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/audaspace/sndfile/AUD_SndFileFactory.cpp b/intern/audaspace/sndfile/AUD_SndFileFactory.cpp new file mode 100644 index 00000000000..bac6dc321f4 --- /dev/null +++ b/intern/audaspace/sndfile/AUD_SndFileFactory.cpp @@ -0,0 +1,67 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SndFileFactory.h" +#include "AUD_SndFileReader.h" +#include "AUD_Buffer.h" + +#include + +AUD_SndFileFactory::AUD_SndFileFactory(const char* filename) +{ + if(filename != NULL) + { + m_filename = new char[strlen(filename)+1]; AUD_NEW("string") + strcpy(m_filename, filename); + } + else + m_filename = NULL; +} + +AUD_SndFileFactory::AUD_SndFileFactory(unsigned char* buffer, int size) +{ + m_filename = NULL; + m_buffer = AUD_Reference(new AUD_Buffer(size)); + memcpy(m_buffer.get()->getBuffer(), buffer, size); +} + +AUD_SndFileFactory::~AUD_SndFileFactory() +{ + if(m_filename) + { + delete[] m_filename; AUD_DELETE("string") + } +} + +AUD_IReader* AUD_SndFileFactory::createReader() +{ + AUD_IReader* reader; + if(m_filename) + reader = new AUD_SndFileReader(m_filename); + else + reader = new AUD_SndFileReader(m_buffer); + AUD_NEW("reader") + return reader; +} diff --git a/intern/audaspace/sndfile/AUD_SndFileFactory.h b/intern/audaspace/sndfile/AUD_SndFileFactory.h new file mode 100644 index 00000000000..98187ff1590 --- /dev/null +++ b/intern/audaspace/sndfile/AUD_SndFileFactory.h @@ -0,0 +1,71 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SNDFILEFACTORY +#define AUD_SNDFILEFACTORY + +#include "AUD_IFactory.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +/** + * This factory reads a sound file via libsndfile. + */ +class AUD_SndFileFactory : public AUD_IFactory +{ +private: + /** + * The filename of the sound source file. + */ + char* m_filename; + + /** + * The buffer to read from. + */ + AUD_Reference m_buffer; + +public: + /** + * Creates a new factory. + * \param filename The sound file path. + */ + AUD_SndFileFactory(const char* filename); + + /** + * Creates a new factory. + * \param buffer The buffer to read from. + * \param size The size of the buffer. + */ + AUD_SndFileFactory(unsigned char* buffer, int size); + + /** + * Destroys the factory. + */ + ~AUD_SndFileFactory(); + + virtual AUD_IReader* createReader(); +}; + +#endif //AUD_SNDFILEFACTORY diff --git a/intern/audaspace/sndfile/AUD_SndFileReader.cpp b/intern/audaspace/sndfile/AUD_SndFileReader.cpp new file mode 100644 index 00000000000..485818552bb --- /dev/null +++ b/intern/audaspace/sndfile/AUD_SndFileReader.cpp @@ -0,0 +1,233 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#include "AUD_SndFileReader.h" +#include "AUD_Buffer.h" + +#include + +// This function transforms a SampleFormat to our own sample format +static inline AUD_SampleFormat SNDFILE_TO_AUD(int fmt) +{ + switch(fmt & SF_FORMAT_SUBMASK) + { + // only read s16, s32 and double as they are + case SF_FORMAT_PCM_16: + return AUD_FORMAT_S16; + case SF_FORMAT_PCM_32: + return AUD_FORMAT_S32; + case SF_FORMAT_DOUBLE: + return AUD_FORMAT_FLOAT64; + // read all other formats as floats + default: + return AUD_FORMAT_FLOAT32; + } +} + +sf_count_t AUD_SndFileReader::vio_get_filelen(void *user_data) +{ + AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data; + return reader->m_membuffer.get()->getSize(); +} + +sf_count_t AUD_SndFileReader::vio_seek(sf_count_t offset, int whence, void *user_data) +{ + AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data; + + switch(whence) + { + case SEEK_SET: + reader->m_memoffset = offset; + break; + case SEEK_CUR: + reader->m_memoffset = reader->m_memoffset + offset; + break; + case SEEK_END: + reader->m_memoffset = reader->m_membuffer.get()->getSize() + offset; + break; + } + + return reader->m_memoffset; +} + +sf_count_t AUD_SndFileReader::vio_read(void *ptr, sf_count_t count, void *user_data) +{ + AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data; + + if(reader->m_memoffset + count > reader->m_membuffer.get()->getSize()) + count = reader->m_membuffer.get()->getSize() - reader->m_memoffset; + + memcpy(ptr, reader->m_membuffer.get()->getBuffer() + reader->m_memoffset, count); + reader->m_memoffset += count; + + return count; +} + +sf_count_t AUD_SndFileReader::vio_tell(void *user_data) +{ + AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data; + + return reader->m_memoffset; +} + +AUD_SndFileReader::AUD_SndFileReader(const char* filename) +{ + SF_INFO sfinfo; + + sfinfo.format = 0; + m_sndfile = sf_open(filename, SFM_READ, &sfinfo); + + if(!m_sndfile) + AUD_THROW(AUD_ERROR_FILE); + + m_specs.channels = (AUD_Channels) sfinfo.channels; + m_specs.format = SNDFILE_TO_AUD(sfinfo.format); + m_specs.rate = (AUD_SampleRate) sfinfo.samplerate; + m_length = sfinfo.frames; + m_seekable = sfinfo.seekable; + m_position = 0; + + switch(m_specs.format) + { + case AUD_FORMAT_S16: + m_read = (sf_read_f) sf_readf_short; + break; + case AUD_FORMAT_S32: + m_read = (sf_read_f) sf_readf_int; + break; + case AUD_FORMAT_FLOAT64: + m_read = (sf_read_f) sf_readf_double; + break; + default: + m_read = (sf_read_f) sf_readf_float; + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_SndFileReader::AUD_SndFileReader(AUD_Reference buffer) +{ + m_membuffer = buffer; + m_memoffset = 0; + + m_vio.get_filelen = vio_get_filelen; + m_vio.read = vio_read; + m_vio.seek = vio_seek; + m_vio.tell = vio_tell; + m_vio.write = NULL; + + SF_INFO sfinfo; + + sfinfo.format = 0; + m_sndfile = sf_open_virtual(&m_vio, SFM_READ, &sfinfo, this); + + if(!m_sndfile) + AUD_THROW(AUD_ERROR_FILE); + + m_specs.channels = (AUD_Channels) sfinfo.channels; + m_specs.format = SNDFILE_TO_AUD(sfinfo.format); + m_specs.rate = (AUD_SampleRate) sfinfo.samplerate; + m_length = sfinfo.frames; + m_seekable = sfinfo.seekable; + m_position = 0; + + switch(m_specs.format) + { + case AUD_FORMAT_S16: + m_read = (sf_read_f) sf_readf_short; + break; + case AUD_FORMAT_S32: + m_read = (sf_read_f) sf_readf_int; + break; + case AUD_FORMAT_FLOAT64: + m_read = (sf_read_f) sf_readf_double; + break; + default: + m_read = (sf_read_f) sf_readf_float; + } + + m_buffer = new AUD_Buffer(); AUD_NEW("buffer") +} + +AUD_SndFileReader::~AUD_SndFileReader() +{ + sf_close(m_sndfile); + + delete m_buffer; AUD_DELETE("buffer") +} + +bool AUD_SndFileReader::isSeekable() +{ + return m_seekable; +} + +void AUD_SndFileReader::seek(int position) +{ + if(m_seekable) + { + position = sf_seek(m_sndfile, position, SEEK_SET); + m_position = position; + } +} + +int AUD_SndFileReader::getLength() +{ + return m_length; +} + +int AUD_SndFileReader::getPosition() +{ + return m_position; +} + +AUD_Specs AUD_SndFileReader::getSpecs() +{ + return m_specs; +} + +AUD_ReaderType AUD_SndFileReader::getType() +{ + return AUD_TYPE_STREAM; +} + +bool AUD_SndFileReader::notify(AUD_Message &message) +{ + return false; +} + +void AUD_SndFileReader::read(int & length, sample_t* & buffer) +{ + int sample_size = AUD_SAMPLE_SIZE(m_specs); + + // resize output buffer if necessary + if(m_buffer->getSize() < length*sample_size) + m_buffer->resize(length*sample_size); + + buffer = m_buffer->getBuffer(); + + length = m_read(m_sndfile, buffer, length); + + m_position += length; +} diff --git a/intern/audaspace/sndfile/AUD_SndFileReader.h b/intern/audaspace/sndfile/AUD_SndFileReader.h new file mode 100644 index 00000000000..da890ef53ca --- /dev/null +++ b/intern/audaspace/sndfile/AUD_SndFileReader.h @@ -0,0 +1,131 @@ +/* + * $Id$ + * + * ***** BEGIN LGPL LICENSE BLOCK ***** + * + * Copyright 2009 Jörg Hermann Müller + * + * This file is part of AudaSpace. + * + * AudaSpace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * AudaSpace is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with AudaSpace. If not, see . + * + * ***** END LGPL LICENSE BLOCK ***** + */ + +#ifndef AUD_SNDFILEREADER +#define AUD_SNDFILEREADER + +#include "AUD_IReader.h" +#include "AUD_Reference.h" +class AUD_Buffer; + +#include + +typedef sf_count_t (*sf_read_f)(SNDFILE *sndfile, void *ptr, sf_count_t frames); + +/** + * This class reads a sound file via libsndfile. + */ +class AUD_SndFileReader : public AUD_IReader +{ +private: + /** + * The current position in samples. + */ + int m_position; + + /** + * The sample count in the file. + */ + int m_length; + + /** + * Whether the file is seekable. + */ + bool m_seekable; + + /** + * The specification of the audio data. + */ + AUD_Specs m_specs; + + /** + * The playback buffer. + */ + AUD_Buffer* m_buffer; + + /** + * The sndfile. + */ + SNDFILE* m_sndfile; + + /** + * The reading function. + */ + sf_read_f m_read; + + /** + * The virtual IO structure for memory file reading. + */ + SF_VIRTUAL_IO m_vio; + + /** + * The pointer to the memory file. + */ + AUD_Reference m_membuffer; + + /** + * The current reading pointer of the memory file. + */ + int m_memoffset; + + // Functions for libsndfile virtual IO functionality + static sf_count_t vio_get_filelen(void *user_data); + static sf_count_t vio_seek(sf_count_t offset, int whence, void *user_data); + static sf_count_t vio_read(void *ptr, sf_count_t count, void *user_data); + static sf_count_t vio_tell(void *user_data); + +public: + /** + * Creates a new reader. + * \param filename The path to the file to be read. + * \exception AUD_Exception Thrown if the file specified does not exist or + * cannot be read with libsndfile. + */ + AUD_SndFileReader(const char* filename); + + /** + * Creates a new reader. + * \param buffer The buffer to read from. + * \exception AUD_Exception Thrown if the buffer specified cannot be read + * with libsndfile. + */ + AUD_SndFileReader(AUD_Reference buffer); + + /** + * Destroys the reader and closes the file. + */ + virtual ~AUD_SndFileReader(); + + virtual bool isSeekable(); + virtual void seek(int position); + virtual int getLength(); + virtual int getPosition(); + virtual AUD_Specs getSpecs(); + virtual AUD_ReaderType getType(); + virtual bool notify(AUD_Message &message); + virtual void read(int & length, sample_t* & buffer); +}; + +#endif //AUD_SNDFILEREADER diff --git a/intern/audaspace/sndfile/Makefile b/intern/audaspace/sndfile/Makefile new file mode 100644 index 00000000000..1cf0b2683fb --- /dev/null +++ b/intern/audaspace/sndfile/Makefile @@ -0,0 +1,40 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_sndfile +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += -I../intern +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/bmfont/BMF_Api.h b/intern/bmfont/BMF_Api.h deleted file mode 100644 index 252f60623a7..00000000000 --- a/intern/bmfont/BMF_Api.h +++ /dev/null @@ -1,162 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * - * API of the OpenGL bitmap font library. - * Currently draws fonts using the glBitmap routine. - * This implies that drawing speed is heavyly dependant on - * the 2D capabilities of the graphics card. - */ - -#ifndef __BMF_API_H -#define __BMF_API_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "BMF_Fonts.h" - -/** - * Returns the font for a given font type. - * @param font The font to retrieve. - * @return The font (or nil if not found). - */ -BMF_Font* BMF_GetFont(BMF_FontType font); - -/** - * Draws a character at the current raster position. - * @param font The font to use. - * @param c The character to draw. - * @return Indication of success (0 == error). - */ -int BMF_DrawCharacter(BMF_Font* font, char c); - -/** - * Draws a string at the current raster position. - * @param font The font to use. - * @param str The string to draw. - * @return Indication of success (0 == error). - */ -int BMF_DrawString(BMF_Font* font, char* str); - -/** - * Returns the width of a character in pixels. - * @param font The font to use. - * @param c The character. - * @return The length. - */ -int BMF_GetCharacterWidth(BMF_Font* font, char c); - -/** - * Returns the width of a string of characters. - * @param font The font to use. - * @param str The string. - * @return The length. - */ -int BMF_GetStringWidth(BMF_Font* font, char* str); - -/** - * Returns the bounding box of a string of characters. - * @param font The font to use. - * @param str The string. - * @param llx Lower left x coord - * @param lly Lower left y coord - * @param urx Upper right x coord - * @param ury Upper right y coord - */ -void BMF_GetStringBoundingBox(BMF_Font* font, char* str, float*llx, float *lly, float *urx, float *ury); - - -/** - * Returns the bounding box of the font. The width and - * height represent the bounding box of the union of - * all glyps. The minimum and maximum values of the - * box represent the extent of the font and its positioning - * about the origin. - */ -void BMF_GetFontBoundingBox(BMF_Font* font, int *xmin_r, int *ymin_r, int *xmax_r, int *ymax_r); - -/** - * Same as GetFontBoundingBox but only returns the height - */ -int BMF_GetFontHeight(BMF_Font* font); - -/** - * Convert the given @a font to a texture, and return the GL texture - * ID of the texture. If the texture ID is bound, text can - * be drawn using the texture by calling DrawStringTexture. - * - * @param font The font to create the texture from. - * @return The GL texture ID of the new texture, or -1 if unable - * to create. - */ -int BMF_GetFontTexture(BMF_Font* font); - -/** - * Draw the given @a str at the point @a x, @a y, @a z, using - * texture coordinates. This assumes that an appropriate texture - * has been bound, see BMF_BitmapFont::GetTexture(). The string - * is drawn along the positive X axis. - * - * @param font The font to draw with. - * @param string The c-string to draw. - * @param x The x coordinate to start drawing at. - * @param y The y coordinate to start drawing at. - * @param z The z coordinate to start drawing at. - */ -void BMF_DrawStringTexture(BMF_Font* font, char* string, float x, float y, float z); - - /** - * Draw the given @a string at the point @a xpos, @a ypos using - * char and float buffers. - * - * @param string The c-string to draw. - * @param xpos The x coordinate to start drawing at. - * @param ypos The y coordinate to start drawing at. - * @param fgcol The forground color. - * @param bgcol The background color. - * @param buf Unsigned char image buffer, when NULL to not operate on it. - * @param fbuf float image buffer, when NULL to not operate on it. - * @param w image buffer width. - * @param h image buffer height. - * @param channels number of channels in the image (3 or 4 - currently) - */ -void BMF_DrawStringBuf(BMF_Font* font, char *str, int posx, int posy, float *col, unsigned char *buf, float *fbuf, int w, int h, int channels); - - -#ifdef __cplusplus -} -#endif - -#endif /* __BMF_API_H */ - diff --git a/intern/bmfont/BMF_Fonts.h b/intern/bmfont/BMF_Fonts.h deleted file mode 100644 index 00a902573fb..00000000000 --- a/intern/bmfont/BMF_Fonts.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * Defines the names of the fonts in the library. - */ - -#ifndef __BMF_FONTS_H -#define __BMF_FONTS_H - -#include "BMF_Settings.h" - -typedef enum -{ - BMF_kHelvetica10 = 0, -#if BMF_INCLUDE_HELV12 - BMF_kHelvetica12, -#endif -#if BMF_INCLUDE_HELVB8 - BMF_kHelveticaBold8, -#endif -#if BMF_INCLUDE_HELVB10 - BMF_kHelveticaBold10, -#endif -#if BMF_INCLUDE_HELVB12 - BMF_kHelveticaBold12, -#endif -#if BMF_INCLUDE_HELVB14 - BMF_kHelveticaBold14, -#endif -#if BMF_INCLUDE_SCR12 - BMF_kScreen12, -#endif -#if BMF_INCLUDE_SCR14 - BMF_kScreen14, -#endif -#if BMF_INCLUDE_SCR15 - BMF_kScreen15, -#endif - BMF_kNumFonts -} BMF_FontType; - -typedef struct BMF_Font BMF_Font; - -#endif /* __BMF_FONTS_H */ - diff --git a/intern/bmfont/BMF_Settings.h b/intern/bmfont/BMF_Settings.h deleted file mode 100644 index b599c97d6ee..00000000000 --- a/intern/bmfont/BMF_Settings.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * Allows you to determine which fonts to include in the library. - */ - -#ifndef __BMF_SETTINGS_H -#define __BMF_SETTINGS_H - -/* This font is included always */ -#define BMF_INCLUDE_HELV10 1 - -#ifndef BMF_MINIMAL - -/* These fonts are included with the minimal setting defined */ -#define BMF_INCLUDE_HELV12 1 -#define BMF_INCLUDE_HELVB8 1 -#define BMF_INCLUDE_HELVB10 1 -#define BMF_INCLUDE_HELVB12 1 -#define BMF_INCLUDE_HELVB14 1 -#define BMF_INCLUDE_SCR12 1 -#define BMF_INCLUDE_SCR14 1 -#define BMF_INCLUDE_SCR15 1 - -#else /* BMF_MINIMAL */ -#define BMF_INCLUDE_HELV12 0 -#define BMF_INCLUDE_HELVB8 0 -#define BMF_INCLUDE_HELVB10 0 -#define BMF_INCLUDE_HELVB12 0 -#define BMF_INCLUDE_HELVB14 0 -#define BMF_INCLUDE_SCR12 0 -#define BMF_INCLUDE_SCR14 0 -#define BMF_INCLUDE_SCR15 0 - -#endif /* BMF_MINIMAL */ - -#endif /* __BMF_SETTINGS_H */ - diff --git a/intern/bmfont/CMakeLists.txt b/intern/bmfont/CMakeLists.txt deleted file mode 100644 index 3ae636a6097..00000000000 --- a/intern/bmfont/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -SET(INC . intern) - -FILE(GLOB SRC intern/*.cpp) - -BLENDERLIB(bf_bmfont "${SRC}" "${INC}") -#, libtype=['intern','player'], priority = [20, 185] ) diff --git a/intern/bmfont/Makefile b/intern/bmfont/Makefile deleted file mode 100644 index bc42f52a1fb..00000000000 --- a/intern/bmfont/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Hans Lambermont -# -# ***** END GPL LICENSE BLOCK ***** -# bmfont main makefile. -# - -include nan_definitions.mk - -LIBNAME = bmfont -SOURCEDIR = intern/$(LIBNAME) -DIR = $(OCGDIR)/$(SOURCEDIR) -DIRS = intern -#not ready yet TESTDIRS = test - -include nan_subdirs.mk - -install: all debug - @[ -d $(NAN_BMFONT) ] || mkdir $(NAN_BMFONT) - @[ -d $(NAN_BMFONT)/include ] || mkdir $(NAN_BMFONT)/include - @[ -d $(NAN_BMFONT)/lib ] || mkdir $(NAN_BMFONT)/lib - @[ -d $(NAN_BMFONT)/lib/debug ] || mkdir $(NAN_BMFONT)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libbmfont.a $(NAN_BMFONT)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libbmfont.a $(NAN_BMFONT)/lib/debug/ -ifeq ($(OS),darwin) - ranlib $(NAN_BMFONT)/lib/libbmfont.a - ranlib $(NAN_BMFONT)/lib/debug/libbmfont.a -endif - @../tools/cpifdiff.sh *.h $(NAN_BMFONT)/include/ - diff --git a/intern/bmfont/SConscript b/intern/bmfont/SConscript deleted file mode 100644 index 4febe2735e7..00000000000 --- a/intern/bmfont/SConscript +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/python -Import ('env') - -sources = env.Glob('intern/*.cpp') - -incs = '. intern' -incs += ' ' + env['BF_OPENGL_INC'] -defs = '' - -env.BlenderLib ('bf_bmfont', sources, Split(incs), Split(defs), libtype=['intern','player'], priority = [20, 185] ) diff --git a/intern/bmfont/intern/BDF2BMF.py b/intern/bmfont/intern/BDF2BMF.py deleted file mode 100644 index 15b9e5b8eb4..00000000000 --- a/intern/bmfont/intern/BDF2BMF.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/python - -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# ***** END GPL LICENCE BLOCK ***** -# -------------------------------------------------------------------------- - -HELP_TXT = \ -''' -Convert BDF pixmap fonts into C++ files Blender can read. -Use to replace bitmap fonts or add new ones. - -Usage - python bdf2bmf.py -name=SomeName myfile.bdf - -Blender currently supports fonts with a maximum width of 8 pixels. -''' - -# -------- Simple BDF parser -import sys -def parse_bdf(f, MAX_CHARS=256): - lines = [l.strip().upper().split() for l in f.readlines()] - - is_bitmap = False - dummy = {'BITMAP':[]} - char_data = [dummy.copy() for i in xrange(MAX_CHARS)] - context_bitmap = [] - - for l in lines: - if l[0]=='ENCODING': enc = int(l[1]) - elif l[0]=='BBX': bbx = [int(c) for c in l[1:]] - elif l[0]=='DWIDTH': dwidth = int(l[1]) - elif l[0]=='BITMAP': is_bitmap = True - elif l[0]=='ENDCHAR': - if enc < MAX_CHARS: - char_data[enc]['BBX'] = bbx - char_data[enc]['DWIDTH'] = dwidth - char_data[enc]['BITMAP'] = context_bitmap - - context_bitmap = [] - enc = bbx = None - is_bitmap = False - else: - # None of the above, Ok, were reading a bitmap - if is_bitmap and enc < MAX_CHARS: - context_bitmap.append( int(l[0], 16) ) - - return char_data -# -------- end simple BDF parser - -def bdf2cpp_name(path): - return path.split('.')[0] + '.cpp' - -def convert_to_blender(bdf_dict, font_name, origfilename, MAX_CHARS=256): - - # first get a global width/height, also set the offsets - xmin = ymin = 10000000 - xmax = ymax = -10000000 - - bitmap_offsets = [-1] * MAX_CHARS - bitmap_tot = 0 - for i, c in enumerate(bdf_dict): - if c.has_key('BBX'): - bbx = c['BBX'] - xmax = max(bbx[0], xmax) - ymax = max(bbx[1], ymax) - xmin = min(bbx[2], xmin) - ymin = min(bbx[3], ymin) - - bitmap_offsets[i] = bitmap_tot - bitmap_tot += len(c['BITMAP']) - - c['BITMAP'].reverse() - - # Now we can write. Ok if we have no .'s in the path. - f = open(bdf2cpp_name(origfilename), 'w') - - f.write(''' -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" - -#include "BMF_Settings.h" -''') - - f.write('#if BMF_INCLUDE_%s\n\n' % font_name.upper()) - f.write('static unsigned char bitmap_data[]= {') - newline = 8 - - for i, c in enumerate(bdf_dict): - - for cdata in c['BITMAP']: - # Just formatting - newline+=1 - if newline >= 8: - newline = 0 - f.write('\n\t') - # End formatting - - f.write('0x%.2hx,' % cdata) # 0x80 <- format - - f.write("\n};\n") - - f.write("BMF_FontData BMF_font_%s = {\n" % font_name) - f.write('\t%d, %d,\n' % (xmin, ymin)) - f.write('\t%d, %d,\n' % (xmax, ymax)) - - f.write('\t{\n') - - - for i, c in enumerate(bdf_dict): - if bitmap_offsets[i] == -1 or c.has_key('BBX') == False: - f.write('\t\t{0,0,0,0,0, -1},\n') - else: - bbx = c['BBX'] - f.write('\t\t{%d,%d,%d,%d,%d, %d},\n' % (bbx[0], bbx[1], -bbx[2], -bbx[3], c['DWIDTH'], bitmap_offsets[i])) - - f.write(''' - }, - bitmap_data -}; - -#endif -''') - -def main(): - # replace "[-name=foo]" with "[-name] [foo]" - args = [] - for arg in sys.argv: - for a in arg.replace('=', ' ').split(): - args.append(a) - - name = 'untitled' - done_anything = False - for i, arg in enumerate(args): - if arg == '-name': - if i==len(args)-1: - print 'no arg given for -name, aborting' - return - else: - name = args[i+1] - - elif arg.lower().endswith('.bdf'): - try: - f = open(arg) - print '...Writing to:', bdf2cpp_name(arg) - except: - print 'could not open "%s", aborting' % arg - - - bdf_dict = parse_bdf(f) - convert_to_blender(bdf_dict, name, arg) - done_anything = True - - if not done_anything: - print HELP_TXT - print '...nothing to do' - -if __name__ == '__main__': - main() - diff --git a/intern/bmfont/intern/BMF_Api.cpp b/intern/bmfont/intern/BMF_Api.cpp deleted file mode 100644 index 1699393e53d..00000000000 --- a/intern/bmfont/intern/BMF_Api.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * - * Implementation of the API of the OpenGL bitmap font library. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_Api.h" - -#include "BMF_BitmapFont.h" - - -#if BMF_INCLUDE_HELV10 -extern BMF_FontData BMF_font_helv10; -static BMF_BitmapFont bmfHelv10(&BMF_font_helv10); -#endif // BMF_INCLUDE_HELV10 -#if BMF_INCLUDE_HELV12 -extern BMF_FontData BMF_font_helv12; -static BMF_BitmapFont bmfHelv12(&BMF_font_helv12); -#endif // BMF_INCLUDE_HELV12 -#if BMF_INCLUDE_HELVB8 -extern BMF_FontData BMF_font_helvb8; -static BMF_BitmapFont bmfHelvb8(&BMF_font_helvb8); -#endif // BMF_INCLUDE_HELVB8 -#if BMF_INCLUDE_HELVB10 -extern BMF_FontData BMF_font_helvb10; -static BMF_BitmapFont bmfHelvb10(&BMF_font_helvb10); -#endif // BMF_INCLUDE_HELVB10 -#if BMF_INCLUDE_HELVB12 -extern BMF_FontData BMF_font_helvb12; -static BMF_BitmapFont bmfHelvb12(&BMF_font_helvb12); -#endif // BMF_INCLUDE_HELVB12 -#if BMF_INCLUDE_HELVB14 -extern BMF_FontData BMF_font_helvb14; -static BMF_BitmapFont bmfHelvb14(&BMF_font_helvb14); -#endif // BMF_INCLUDE_HELVB14 -#if BMF_INCLUDE_SCR12 -extern BMF_FontData BMF_font_scr12; -static BMF_BitmapFont bmfScreen12(&BMF_font_scr12); -#endif // BMF_INCLUDE_SCR12 -#if BMF_INCLUDE_SCR14 -extern BMF_FontData BMF_font_scr14; -static BMF_BitmapFont bmfScreen14(&BMF_font_scr14); -#endif // BMF_INCLUDE_SCR14 -#if BMF_INCLUDE_SCR15 -extern BMF_FontData BMF_font_scr15; -static BMF_BitmapFont bmfScreen15(&BMF_font_scr15); -#endif // BMF_INCLUDE_SCR15 - - -BMF_Font* BMF_GetFont(BMF_FontType font) -{ - switch (font) - { -#if BMF_INCLUDE_HELV10 - case BMF_kHelvetica10: return (BMF_Font*) &bmfHelv10; -#endif // BMF_INCLUDE_HELV10 -#if BMF_INCLUDE_HELV12 - case BMF_kHelvetica12: return (BMF_Font*) &bmfHelv12; -#endif // BMF_INCLUDE_HELV12 -#if BMF_INCLUDE_HELVB8 - case BMF_kHelveticaBold8: return (BMF_Font*) &bmfHelvb8; -#endif // BMF_INCLUDE_HELVB8 -#if BMF_INCLUDE_HELVB10 - case BMF_kHelveticaBold10: return (BMF_Font*) &bmfHelvb10; -#endif // BMF_INCLUDE_HELVB10 -#if BMF_INCLUDE_HELVB12 - case BMF_kHelveticaBold12: return (BMF_Font*) &bmfHelvb12; -#endif // BMF_INCLUDE_HELVB12 -#if BMF_INCLUDE_HELVB14 - case BMF_kHelveticaBold14: return (BMF_Font*) &bmfHelvb14; -#endif // BMF_INCLUDE_HELVB12 -#if BMF_INCLUDE_SCR12 - case BMF_kScreen12: return (BMF_Font*) &bmfScreen12; -#endif // BMF_INCLUDE_SCR12 -#if BMF_INCLUDE_SCR14 - case BMF_kScreen14: return (BMF_Font*) &bmfScreen14; -#endif // BMF_INCLUDE_SCR14 -#if BMF_INCLUDE_SCR15 - case BMF_kScreen15: return (BMF_Font*) &bmfScreen15; -#endif // BMF_INCLUDE_SCR15 - default: - break; - } - return 0; -} - - -int BMF_DrawCharacter(BMF_Font* font, char c) -{ - char str[2] = {c, '\0'}; - return BMF_DrawString(font, str); -} - - -int BMF_DrawString(BMF_Font* font, char* str) -{ - if (!font) return 0; - ((BMF_BitmapFont*)font)->DrawString(str); - return 1; -} - - -int BMF_GetCharacterWidth(BMF_Font* font, char c) -{ - char str[2] = {c, '\0'}; - return BMF_GetStringWidth(font, str); -} - - -int BMF_GetStringWidth(BMF_Font* font, char* str) -{ - if (!font) return 0; - return ((BMF_BitmapFont*)font)->GetStringWidth(str); -} - -void BMF_GetStringBoundingBox(BMF_Font* font, char* str, float*llx, float *lly, float *urx, float *ury){ - if (!font){ - *llx = *lly = *urx = *ury = 0; - }else{ - ((BMF_BitmapFont*)font)->GetStringBoundingBox(str, llx, lly, urx, ury); - } -} - -void BMF_GetFontBoundingBox(BMF_Font* font, int *xmin_r, int *ymin_r, int *xmax_r, int *ymax_r) -{ - if (!font) return; - ((BMF_BitmapFont*)font)->GetFontBoundingBox(*xmin_r, *ymin_r, *xmax_r, *ymax_r); -} - -int BMF_GetFontHeight(BMF_Font* font) -{ - if (!font) return -1; - return ((BMF_BitmapFont*)font)->GetFontHeight(); -} - -int BMF_GetFontTexture(BMF_Font* font) { - if (!font) return -1; - return ((BMF_BitmapFont*)font)->GetTexture(); -} - -void BMF_DrawStringTexture(BMF_Font* font, char *string, float x, float y, float z) { - if (!font) return; - ((BMF_BitmapFont*)font)->DrawStringTexture(string, x, y, z); -} - -void BMF_DrawStringBuf(BMF_Font* font, char *str, int posx, int posy, float *col, unsigned char *buf, float *fbuf, int w, int h, int channels) { - if (!font) return; - ((BMF_BitmapFont*)font)->DrawStringBuf(str, posx, posy, col, buf, fbuf, w, h, channels); -} diff --git a/intern/bmfont/intern/BMF_BitmapFont.cpp b/intern/bmfont/intern/BMF_BitmapFont.cpp deleted file mode 100644 index 0111e9c3f93..00000000000 --- a/intern/bmfont/intern/BMF_BitmapFont.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - */ - - -#include - - - -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#if defined(WIN32) || defined(__APPLE__) - #ifdef WIN32 - #if !defined(__CYGWIN32__) - #pragma warning(disable:4244) - #endif /* __CYGWIN32__ */ - #include - #include - #else // WIN32 - // __APPLE__ is defined - #include - #endif // WIN32 -#else // defined(WIN32) || defined(__APPLE__) - #include -#endif // defined(WIN32) || defined(__APPLE__) - -#include "BMF_BitmapFont.h" - - -BMF_BitmapFont::BMF_BitmapFont(BMF_FontData* fontData) -: m_fontData(fontData) -{ -} - - -BMF_BitmapFont::~BMF_BitmapFont(void) -{ -} - -void BMF_BitmapFont::DrawString(char* str) -{ - GLint alignment; - unsigned char c; - - glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - while ( (c = (unsigned char) *str++) ) { - BMF_CharData & cd = m_fontData->chars[c]; - - if (cd.data_offset==-1) { - GLubyte nullBitmap = 0; - - glBitmap(1, 1, 0, 0, cd.advance, 0, &nullBitmap); - } else { - GLubyte *bitmap = &m_fontData->bitmap_data[cd.data_offset]; - - glBitmap(cd.width, cd.height, cd.xorig, cd.yorig, cd.advance, 0, bitmap); - } - } - - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); -} - - -int BMF_BitmapFont::GetStringWidth(char* str) -{ - unsigned char c; - int length = 0; - - while ( (c = (unsigned char) *str++) ) { - length += m_fontData->chars[c].advance; - } - - return length; -} - -void BMF_BitmapFont::GetFontBoundingBox(int & xMin, int & yMin, int & xMax, int & yMax) -{ - xMin = m_fontData->xmin; - yMin = m_fontData->ymin; - xMax = m_fontData->xmax; - yMax = m_fontData->ymax; -} - -int BMF_BitmapFont::GetFontHeight( void ) -{ - return m_fontData->ymax - m_fontData->ymin; -} - -void BMF_BitmapFont::GetStringBoundingBox(char* str, float*llx, float *lly, float *urx, float *ury) -{ - unsigned char c; - int length = 0; - int ascent = 0; - int descent = 0; - - while ( (c = (unsigned char) *str++) ) { - length += m_fontData->chars[c].advance; - int d = m_fontData->chars[c].yorig; - int a = m_fontData->chars[c].height - m_fontData->chars[c].yorig; - if(a > ascent) ascent = a; - if(d > descent) descent = d; - } - *llx = (float)0; - *lly = (float)-descent; - *urx = (float)length; - *ury = (float)ascent; -} - - -int BMF_BitmapFont::GetTexture() -{ - int fWidth = m_fontData->xmax - m_fontData->xmin; - int fHeight = m_fontData->ymax - m_fontData->ymin; - - if (fWidth>=16 || fHeight>=16) { - return -1; - } - - int cRows = 16, cCols = 16; - int cWidth = 16, cHeight = 16; - int iWidth = cCols*cWidth; - int iHeight = cRows*cHeight; - GLubyte *img = new GLubyte [iHeight*iWidth]; - GLuint texId; - - int baseLine = -(m_fontData->ymin); - - memset(img, 0, iHeight*iWidth); - for (int i = 0; i<256; i++) { - BMF_CharData & cd = m_fontData->chars[i]; - - if (cd.data_offset != -1) { - int cellX = i%16; - int cellY = i/16; - - for (int y = 0; ybitmap_data[cd.data_offset + ((cd.width+7)/8)*y]; - - for (int x = 0; xymin); - - glBegin(GL_QUADS); - while ( (c = (unsigned char) *str++) ) { - BMF_CharData & cd = m_fontData->chars[c]; - - if (cd.data_offset != -1) { - float cellX = (c%16)/16.0; - float cellY = (c/16)/16.0; - - glTexCoord2f(cellX + 1.0/16.0, cellY); - glVertex3f(x + pos + 16.0, -baseLine + y + 0.0, z); - - glTexCoord2f(cellX + 1.0/16.0, cellY + 1.0/16.0); - glVertex3f(x + pos + 16.0, -baseLine + y + 16.0, z); - - glTexCoord2f(cellX, cellY + 1.0/16.0); - glVertex3f(x + pos + 0.0, -baseLine + y + 16.0, z); - - glTexCoord2f(cellX, cellY); - glVertex3f(x + pos + 0.0, -baseLine + y + 0.0, z); - } - - pos += cd.advance; - } - glEnd(); -} - -#define FTOCHAR(val) val<=0.0f?0: (val>=1.0f?255: (char)(255.0f*val)) -void BMF_BitmapFont::DrawStringBuf(char *str, int posx, int posy, float *col, unsigned char *buf, float *fbuf, int w, int h, int channels) -{ - int x, y; - - if (buf==0 && fbuf==0) - return; - - /*offset for font*/ - posx -= m_fontData->xmin; - posy -= m_fontData->ymin; - - if (buf) { - unsigned char colch[4]; - unsigned char *max, *pixel; - unsigned char c; - - for (x=0; x<4; x++) { - colch[x] = FTOCHAR(col[x]); - } - - max = buf + (4 * (w * h)); - while ((c = (unsigned char) *str++)) { - BMF_CharData & cd = m_fontData->chars[c]; - if (cd.data_offset != -1) { - for (y = 0; y < cd.height; y++) { - unsigned char* chrRow = &m_fontData->bitmap_data[cd.data_offset + ((cd.width+7)/8)*y]; - for (x = cd.xorig; x < cd.width; x++) { - pixel = buf + 4 * (((posy + y - cd.yorig) * w) + (posx + x)); - if ((pixel < max) && (pixel > buf)) { - int byteIdx = x/8; - int bitIdx = 7 - (x%8); - - if (chrRow[byteIdx]&(1<chars[c]; - if (cd.data_offset != -1) { - for (yi = 0; yi < cd.height; yi++) { - unsigned char* chrRow = &m_fontData->bitmap_data[cd.data_offset + ((cd.width+7)/8)*yi]; - for (xi = cd.xorig; xi < cd.width; xi++) { - pixel = fbuf + 4 * (((posy + yi - cd.yorig) * w) + (posx + xi)); - if ((pixel < max) && (pixel > fbuf)) { - int byteIdx = xi/8; - int bitIdx = 7 - (xi%8); - - if (chrRow[byteIdx]&(1< -#endif - -#include "BMF_FontData.h" - -#include "BMF_Settings.h" - -#if BMF_INCLUDE_HELV10 - -static unsigned char bitmap_data[]= { - 0x80,0x00,0x80,0x80,0x80,0x80,0x80,0x80, - 0xa0,0xa0,0x50,0x50,0xf8,0x28,0x7c,0x28, - 0x28,0x20,0x70,0xa8,0x28,0x70,0xa0,0xa8, - 0x70,0x20,0x26,0x29,0x16,0x10,0x08,0x68, - 0x94,0x64,0x64,0x98,0x98,0xa4,0x60,0x50, - 0x50,0x20,0x80,0x40,0x40,0x20,0x40,0x40, - 0x80,0x80,0x80,0x80,0x40,0x40,0x20,0x80, - 0x40,0x40,0x20,0x20,0x20,0x20,0x40,0x40, - 0x80,0xa0,0x40,0xa0,0x20,0x20,0xf8,0x20, - 0x20,0x80,0x40,0x40,0xf8,0x80,0x80,0x80, - 0x40,0x40,0x40,0x40,0x20,0x20,0x70,0x88, - 0x88,0x88,0x88,0x88,0x88,0x70,0x40,0x40, - 0x40,0x40,0x40,0x40,0xc0,0x40,0xf8,0x80, - 0x40,0x30,0x08,0x08,0x88,0x70,0x70,0x88, - 0x08,0x08,0x30,0x08,0x88,0x70,0x10,0x10, - 0xf8,0x90,0x50,0x50,0x30,0x10,0x70,0x88, - 0x08,0x08,0xf0,0x80,0x80,0xf8,0x70,0x88, - 0x88,0xc8,0xb0,0x80,0x88,0x70,0x40,0x40, - 0x20,0x20,0x10,0x10,0x08,0xf8,0x70,0x88, - 0x88,0x88,0x70,0x88,0x88,0x70,0x70,0x88, - 0x08,0x68,0x98,0x88,0x88,0x70,0x80,0x00, - 0x00,0x00,0x00,0x80,0x80,0x40,0x40,0x00, - 0x00,0x00,0x00,0x40,0x20,0x40,0x80,0x40, - 0x20,0xf0,0x00,0xf0,0x80,0x40,0x20,0x40, - 0x80,0x40,0x00,0x40,0x40,0x20,0x10,0x90, - 0x60,0x3e,0x00,0x40,0x00,0x9b,0x00,0xa4, - 0x80,0xa4,0x80,0xa2,0x40,0x92,0x40,0x4d, - 0x40,0x20,0x80,0x1f,0x00,0x82,0x82,0x7c, - 0x44,0x28,0x28,0x10,0x10,0xf0,0x88,0x88, - 0x88,0xf0,0x88,0x88,0xf0,0x78,0x84,0x80, - 0x80,0x80,0x80,0x84,0x78,0xf0,0x88,0x84, - 0x84,0x84,0x84,0x88,0xf0,0xf8,0x80,0x80, - 0x80,0xf8,0x80,0x80,0xf8,0x80,0x80,0x80, - 0x80,0xf0,0x80,0x80,0xf8,0x74,0x8c,0x84, - 0x8c,0x80,0x80,0x84,0x78,0x84,0x84,0x84, - 0x84,0xfc,0x84,0x84,0x84,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x60,0x90,0x10, - 0x10,0x10,0x10,0x10,0x10,0x88,0x88,0x90, - 0x90,0xe0,0xa0,0x90,0x88,0xf0,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x92,0x92,0x92, - 0xaa,0xaa,0xc6,0xc6,0x82,0x8c,0x8c,0x94, - 0x94,0xa4,0xa4,0xc4,0xc4,0x78,0x84,0x84, - 0x84,0x84,0x84,0x84,0x78,0x80,0x80,0x80, - 0x80,0xf0,0x88,0x88,0xf0,0x02,0x7c,0x8c, - 0x94,0x84,0x84,0x84,0x84,0x78,0x88,0x88, - 0x88,0x88,0xf0,0x88,0x88,0xf0,0x70,0x88, - 0x88,0x08,0x70,0x80,0x88,0x70,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0xf8,0x78,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x28, - 0x28,0x44,0x44,0x44,0x82,0x82,0x22,0x00, - 0x22,0x00,0x22,0x00,0x55,0x00,0x49,0x00, - 0x49,0x00,0x88,0x80,0x88,0x80,0x88,0x88, - 0x50,0x50,0x20,0x50,0x88,0x88,0x10,0x10, - 0x10,0x28,0x28,0x44,0x44,0x82,0xf8,0x80, - 0x40,0x20,0x20,0x10,0x08,0xf8,0xc0,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, - 0x20,0x20,0x40,0x40,0x40,0x40,0x80,0x80, - 0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0xc0,0x88,0x50,0x50,0x20,0x20,0xfc, - 0x80,0x80,0x40,0x68,0x90,0x90,0x70,0x10, - 0xe0,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x80, - 0x80,0x60,0x90,0x80,0x80,0x90,0x60,0x68, - 0x98,0x88,0x88,0x98,0x68,0x08,0x08,0x60, - 0x90,0x80,0xf0,0x90,0x60,0x40,0x40,0x40, - 0x40,0x40,0xe0,0x40,0x30,0x70,0x08,0x68, - 0x98,0x88,0x88,0x98,0x68,0x88,0x88,0x88, - 0x88,0xc8,0xb0,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x00,0x80,0x90,0x90, - 0xa0,0xc0,0xa0,0x90,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x92,0x92, - 0x92,0x92,0x92,0xec,0x88,0x88,0x88,0x88, - 0xc8,0xb0,0x70,0x88,0x88,0x88,0x88,0x70, - 0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0, - 0x08,0x08,0x68,0x98,0x88,0x88,0x98,0x68, - 0x80,0x80,0x80,0x80,0xc0,0xa0,0x60,0x90, - 0x10,0x60,0x90,0x60,0x60,0x40,0x40,0x40, - 0x40,0xe0,0x40,0x40,0x70,0x90,0x90,0x90, - 0x90,0x90,0x20,0x20,0x50,0x50,0x88,0x88, - 0x28,0x28,0x54,0x54,0x92,0x92,0x88,0x88, - 0x50,0x20,0x50,0x88,0x80,0x40,0x40,0x60, - 0xa0,0xa0,0x90,0x90,0xf0,0x80,0x40,0x20, - 0x10,0xf0,0x20,0x40,0x40,0x40,0x40,0x80, - 0x40,0x40,0x40,0x20,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40, - 0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, - 0x98,0x64,0x80,0x80,0x80,0x80,0x80,0x80, - 0x00,0x80,0x40,0x70,0xa8,0xa0,0xa0,0xa8, - 0x70,0x10,0xb0,0x48,0x40,0x40,0xe0,0x40, - 0x48,0x30,0x90,0x60,0x90,0x90,0x60,0x90, - 0x20,0xf8,0x20,0xf8,0x50,0x50,0x88,0x88, - 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x80, - 0x80,0x80,0x70,0x88,0x18,0x70,0xc8,0x98, - 0x70,0xc0,0x88,0x70,0xa0,0x38,0x44,0x9a, - 0xa2,0x9a,0x44,0x38,0xe0,0x00,0xa0,0x20, - 0xe0,0x28,0x50,0xa0,0x50,0x28,0x08,0x08, - 0xf8,0xe0,0x38,0x44,0xaa,0xb2,0xba,0x44, - 0x38,0xe0,0x60,0x90,0x90,0x60,0xf8,0x00, - 0x20,0x20,0xf8,0x20,0x20,0xe0,0x40,0xa0, - 0x60,0xc0,0x20,0x40,0xe0,0x80,0x40,0x80, - 0x80,0xf0,0x90,0x90,0x90,0x90,0x90,0x28, - 0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8, - 0x7c,0xc0,0xc0,0x40,0x40,0x40,0xc0,0x40, - 0xe0,0x00,0xe0,0xa0,0xe0,0xa0,0x50,0x28, - 0x50,0xa0,0x21,0x00,0x17,0x80,0x13,0x00, - 0x09,0x00,0x48,0x00,0x44,0x00,0xc4,0x00, - 0x42,0x00,0x27,0x12,0x15,0x0b,0x48,0x44, - 0xc4,0x42,0x21,0x00,0x17,0x80,0x13,0x00, - 0x09,0x00,0xc8,0x00,0x24,0x00,0x44,0x00, - 0xe2,0x00,0x60,0x90,0x80,0x40,0x20,0x20, - 0x00,0x20,0x82,0x82,0x7c,0x44,0x28,0x28, - 0x10,0x10,0x00,0x10,0x20,0x82,0x82,0x7c, - 0x44,0x28,0x28,0x10,0x10,0x00,0x10,0x08, - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10, - 0x00,0x28,0x10,0x82,0x82,0x7c,0x44,0x28, - 0x28,0x10,0x10,0x00,0x28,0x14,0x82,0x82, - 0x7c,0x44,0x28,0x28,0x10,0x10,0x00,0x28, - 0x82,0x82,0x7c,0x44,0x28,0x28,0x10,0x10, - 0x10,0x28,0x10,0x8f,0x80,0x88,0x00,0x78, - 0x00,0x48,0x00,0x2f,0x80,0x28,0x00,0x18, - 0x00,0x1f,0x80,0x30,0x10,0x78,0x84,0x80, - 0x80,0x80,0x80,0x84,0x78,0xf8,0x80,0x80, - 0x80,0xf8,0x80,0x80,0xf8,0x00,0x20,0x40, - 0xf8,0x80,0x80,0x80,0xf8,0x80,0x80,0xf8, - 0x00,0x20,0x10,0xf8,0x80,0x80,0xf8,0x80, - 0x80,0x80,0xf8,0x00,0x50,0x20,0xf8,0x80, - 0x80,0x80,0xf8,0x80,0x80,0xf8,0x00,0x50, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x00,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x00,0x80,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x00,0xa0, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0x00,0xa0,0x78,0x44,0x42,0x42,0xf2, - 0x42,0x44,0x78,0x8c,0x8c,0x94,0x94,0xa4, - 0xa4,0xc4,0xc4,0x00,0x50,0x28,0x78,0x84, - 0x84,0x84,0x84,0x84,0x84,0x78,0x00,0x10, - 0x20,0x78,0x84,0x84,0x84,0x84,0x84,0x84, - 0x78,0x00,0x10,0x08,0x78,0x84,0x84,0x84, - 0x84,0x84,0x84,0x78,0x00,0x28,0x10,0x78, - 0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x00, - 0x50,0x28,0x78,0x84,0x84,0x84,0x84,0x84, - 0x84,0x78,0x00,0x48,0x88,0x50,0x20,0x50, - 0x88,0x80,0x78,0xc4,0xa4,0xa4,0x94,0x94, - 0x8c,0x78,0x04,0x78,0x84,0x84,0x84,0x84, - 0x84,0x84,0x84,0x00,0x10,0x20,0x78,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x00,0x20, - 0x10,0x78,0x84,0x84,0x84,0x84,0x84,0x84, - 0x84,0x00,0x28,0x10,0x78,0x84,0x84,0x84, - 0x84,0x84,0x84,0x84,0x00,0x48,0x10,0x10, - 0x10,0x28,0x28,0x44,0x44,0x82,0x00,0x10, - 0x08,0x80,0x80,0xf0,0x88,0x88,0xf0,0x80, - 0x80,0xa0,0x90,0x90,0x90,0xa0,0x90,0x90, - 0x60,0x68,0x90,0x90,0x70,0x10,0xe0,0x00, - 0x20,0x40,0x68,0x90,0x90,0x70,0x10,0xe0, - 0x00,0x20,0x10,0x68,0x90,0x90,0x70,0x10, - 0xe0,0x00,0x50,0x20,0x68,0x90,0x90,0x70, - 0x10,0xe0,0x00,0xa0,0x50,0x68,0x90,0x90, - 0x70,0x10,0xe0,0x00,0x50,0x68,0x90,0x90, - 0x70,0x10,0xe0,0x20,0x50,0x20,0x6c,0x92, - 0x90,0x7e,0x12,0xec,0x60,0x20,0x60,0x90, - 0x80,0x80,0x90,0x60,0x60,0x90,0x80,0xf0, - 0x90,0x60,0x00,0x20,0x40,0x60,0x90,0x80, - 0xf0,0x90,0x60,0x00,0x40,0x20,0x60,0x90, - 0x80,0xf0,0x90,0x60,0x00,0x50,0x20,0x60, - 0x90,0x80,0xf0,0x90,0x60,0x00,0x50,0x40, - 0x40,0x40,0x40,0x40,0x40,0x00,0x40,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x80, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00, - 0xa0,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x00,0xa0,0x70,0x88,0x88,0x88,0x88,0x78, - 0x90,0x60,0x50,0x90,0x90,0x90,0x90,0x90, - 0xe0,0x00,0xa0,0x50,0x70,0x88,0x88,0x88, - 0x88,0x70,0x00,0x20,0x40,0x70,0x88,0x88, - 0x88,0x88,0x70,0x00,0x20,0x10,0x70,0x88, - 0x88,0x88,0x88,0x70,0x00,0x50,0x20,0x70, - 0x88,0x88,0x88,0x88,0x70,0x00,0x50,0x28, - 0x70,0x88,0x88,0x88,0x88,0x70,0x00,0x50, - 0x20,0x00,0xf8,0x00,0x20,0x70,0x88,0xc8, - 0xa8,0x98,0x74,0x70,0x90,0x90,0x90,0x90, - 0x90,0x00,0x20,0x40,0x70,0x90,0x90,0x90, - 0x90,0x90,0x00,0x40,0x20,0x70,0x90,0x90, - 0x90,0x90,0x90,0x00,0x50,0x20,0x70,0x90, - 0x90,0x90,0x90,0x90,0x00,0x50,0x80,0x40, - 0x40,0x60,0xa0,0xa0,0x90,0x90,0x00,0x20, - 0x10,0x80,0x80,0xb0,0xc8,0x88,0x88,0xc8, - 0xb0,0x80,0x80,0x80,0x40,0x40,0x60,0xa0, - 0xa0,0x90,0x90,0x00,0x50, -}; - -BMF_FontData BMF_font_helv10 = { - -1, -2, - 10, 11, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 12, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 3, -1}, - {1, 8, -1, 0, 3, 0}, - {3, 2, -1, -6, 4, 8}, - {6, 7, 0, 0, 6, 10}, - {5, 9, 0, 1, 6, 17}, - {8, 8, 0, 0, 9, 26}, - {6, 8, -1, 0, 8, 34}, - {2, 3, -1, -5, 3, 42}, - {3, 10, 0, 2, 4, 45}, - {3, 10, -1, 2, 4, 55}, - {3, 3, 0, -5, 4, 65}, - {5, 5, 0, -1, 6, 68}, - {2, 3, 0, 2, 3, 73}, - {5, 1, -1, -3, 7, 76}, - {1, 1, -1, 0, 3, 77}, - {3, 8, 0, 0, 3, 78}, - {5, 8, 0, 0, 6, 86}, - {2, 8, -1, 0, 6, 94}, - {5, 8, 0, 0, 6, 102}, - {5, 8, 0, 0, 6, 110}, - {5, 8, 0, 0, 6, 118}, - {5, 8, 0, 0, 6, 126}, - {5, 8, 0, 0, 6, 134}, - {5, 8, 0, 0, 6, 142}, - {5, 8, 0, 0, 6, 150}, - {5, 8, 0, 0, 6, 158}, - {1, 6, -1, 0, 3, 166}, - {2, 8, 0, 2, 3, 172}, - {3, 5, -1, -1, 6, 180}, - {4, 3, 0, -2, 5, 185}, - {3, 5, -1, -1, 6, 188}, - {4, 8, -1, 0, 6, 193}, - {10, 10, 0, 2, 11, 201}, - {7, 8, 0, 0, 7, 221}, - {5, 8, -1, 0, 7, 229}, - {6, 8, -1, 0, 8, 237}, - {6, 8, -1, 0, 8, 245}, - {5, 8, -1, 0, 7, 253}, - {5, 8, -1, 0, 6, 261}, - {6, 8, -1, 0, 8, 269}, - {6, 8, -1, 0, 8, 277}, - {1, 8, -1, 0, 3, 285}, - {4, 8, 0, 0, 5, 293}, - {5, 8, -1, 0, 7, 301}, - {4, 8, -1, 0, 6, 309}, - {7, 8, -1, 0, 9, 317}, - {6, 8, -1, 0, 8, 325}, - {6, 8, -1, 0, 8, 333}, - {5, 8, -1, 0, 7, 341}, - {7, 9, -1, 1, 8, 349}, - {5, 8, -1, 0, 7, 358}, - {5, 8, -1, 0, 7, 366}, - {5, 8, 0, 0, 5, 374}, - {6, 8, -1, 0, 8, 382}, - {7, 8, 0, 0, 7, 390}, - {9, 8, 0, 0, 9, 398}, - {5, 8, -1, 0, 7, 414}, - {7, 8, 0, 0, 7, 422}, - {5, 8, -1, 0, 7, 430}, - {2, 10, -1, 2, 3, 438}, - {3, 8, 0, 0, 3, 448}, - {2, 10, 0, 2, 3, 456}, - {5, 5, 0, -3, 6, 466}, - {6, 1, 0, 2, 6, 471}, - {2, 3, 0, -5, 3, 472}, - {5, 6, 0, 0, 5, 475}, - {5, 8, 0, 0, 6, 481}, - {4, 6, 0, 0, 5, 489}, - {5, 8, 0, 0, 6, 495}, - {4, 6, 0, 0, 5, 503}, - {4, 8, 0, 0, 4, 509}, - {5, 8, 0, 2, 6, 517}, - {5, 8, 0, 0, 6, 525}, - {1, 8, 0, 0, 2, 533}, - {1, 9, 0, 1, 2, 541}, - {4, 8, 0, 0, 5, 550}, - {1, 8, 0, 0, 2, 558}, - {7, 6, 0, 0, 8, 566}, - {5, 6, 0, 0, 6, 572}, - {5, 6, 0, 0, 6, 578}, - {5, 8, 0, 2, 6, 584}, - {5, 8, 0, 2, 6, 592}, - {3, 6, 0, 0, 4, 600}, - {4, 6, 0, 0, 5, 606}, - {3, 8, 0, 0, 4, 612}, - {4, 6, 0, 0, 5, 620}, - {5, 6, 0, 0, 6, 626}, - {7, 6, 0, 0, 8, 632}, - {5, 6, 0, 0, 6, 638}, - {4, 8, 0, 2, 5, 644}, - {4, 6, 0, 0, 5, 652}, - {3, 10, 0, 2, 3, 658}, - {1, 10, -1, 2, 3, 668}, - {3, 10, 0, 2, 3, 678}, - {6, 2, 0, -3, 7, 688}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 3, -1}, - {1, 8, -1, 2, 3, 690}, - {5, 8, 0, 1, 6, 698}, - {5, 8, 0, 0, 6, 706}, - {4, 6, 0, -1, 5, 714}, - {5, 8, 0, 0, 6, 720}, - {1, 10, -1, 2, 3, 728}, - {5, 10, 0, 2, 6, 738}, - {3, 1, 0, -7, 3, 748}, - {7, 7, -1, 0, 9, 749}, - {3, 5, 0, -3, 4, 756}, - {5, 5, 0, 0, 6, 761}, - {5, 3, -1, -2, 7, 766}, - {3, 1, 0, -3, 4, 769}, - {7, 7, -1, 0, 9, 770}, - {3, 1, 0, -7, 3, 777}, - {4, 4, 0, -3, 4, 778}, - {5, 7, 0, 0, 6, 782}, - {3, 4, 0, -3, 3, 789}, - {3, 4, 0, -3, 3, 793}, - {2, 2, 0, -6, 3, 797}, - {4, 8, 0, 2, 5, 799}, - {6, 10, 0, 2, 6, 807}, - {2, 1, 0, -3, 3, 817}, - {2, 2, 0, 2, 3, 818}, - {2, 4, 0, -3, 3, 820}, - {3, 5, 0, -3, 4, 824}, - {5, 5, 0, 0, 6, 829}, - {9, 8, 0, 0, 9, 834}, - {8, 8, 0, 0, 9, 850}, - {9, 8, 0, 0, 9, 858}, - {4, 8, -1, 2, 6, 874}, - {7, 11, 0, 0, 7, 882}, - {7, 11, 0, 0, 7, 893}, - {7, 11, 0, 0, 7, 904}, - {7, 11, 0, 0, 7, 915}, - {7, 10, 0, 0, 7, 926}, - {7, 11, 0, 0, 7, 936}, - {9, 8, 0, 0, 10, 947}, - {6, 10, -1, 2, 8, 963}, - {5, 11, -1, 0, 7, 973}, - {5, 11, -1, 0, 7, 984}, - {5, 11, -1, 0, 7, 995}, - {5, 10, -1, 0, 7, 1006}, - {2, 11, 0, 0, 3, 1016}, - {2, 11, -1, 0, 3, 1027}, - {3, 11, 0, 0, 3, 1038}, - {3, 10, 0, 0, 3, 1049}, - {7, 8, 0, 0, 8, 1059}, - {6, 11, -1, 0, 8, 1067}, - {6, 11, -1, 0, 8, 1078}, - {6, 11, -1, 0, 8, 1089}, - {6, 11, -1, 0, 8, 1100}, - {6, 11, -1, 0, 8, 1111}, - {6, 10, -1, 0, 8, 1122}, - {5, 5, 0, -1, 6, 1132}, - {6, 10, -1, 1, 8, 1137}, - {6, 11, -1, 0, 8, 1147}, - {6, 11, -1, 0, 8, 1158}, - {6, 11, -1, 0, 8, 1169}, - {6, 10, -1, 0, 8, 1180}, - {7, 11, 0, 0, 7, 1190}, - {5, 8, -1, 0, 7, 1201}, - {4, 8, 0, 0, 5, 1209}, - {5, 9, 0, 0, 5, 1217}, - {5, 9, 0, 0, 5, 1226}, - {5, 9, 0, 0, 5, 1235}, - {5, 9, 0, 0, 5, 1244}, - {5, 8, 0, 0, 5, 1253}, - {5, 9, 0, 0, 5, 1261}, - {7, 6, 0, 0, 8, 1270}, - {4, 8, 0, 2, 5, 1276}, - {4, 9, 0, 0, 5, 1284}, - {4, 9, 0, 0, 5, 1293}, - {4, 9, 0, 0, 5, 1302}, - {4, 8, 0, 0, 5, 1311}, - {2, 9, 1, 0, 2, 1319}, - {2, 9, 0, 0, 2, 1328}, - {3, 9, 1, 0, 2, 1337}, - {3, 8, 0, 0, 2, 1346}, - {5, 9, 0, 0, 6, 1354}, - {4, 9, 0, 0, 5, 1363}, - {5, 9, 0, 0, 6, 1372}, - {5, 9, 0, 0, 6, 1381}, - {5, 9, 0, 0, 6, 1390}, - {5, 9, 0, 0, 6, 1399}, - {5, 8, 0, 0, 6, 1408}, - {5, 5, 0, -1, 6, 1416}, - {6, 6, 0, 0, 6, 1421}, - {4, 9, 0, 0, 5, 1427}, - {4, 9, 0, 0, 5, 1436}, - {4, 9, 0, 0, 5, 1445}, - {4, 8, 0, 0, 5, 1454}, - {4, 11, 0, 2, 5, 1462}, - {5, 10, 0, 2, 6, 1473}, - {4, 10, 0, 2, 5, 1483}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_helv12.cpp b/intern/bmfont/intern/BMF_font_helv12.cpp deleted file mode 100644 index 29b08b659ee..00000000000 --- a/intern/bmfont/intern/BMF_font_helv12.cpp +++ /dev/null @@ -1,525 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_HELV12 - -static unsigned char bitmap_data[]= { - 0x80,0x00,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0xa0,0xa0,0xa0,0x50,0x50,0x50,0xfc, - 0x28,0xfc,0x28,0x28,0x20,0x70,0xa8,0xa8, - 0x28,0x70,0xa0,0xa8,0x70,0x20,0x23,0x00, - 0x14,0x80,0x14,0x80,0x13,0x00,0x08,0x00, - 0x68,0x00,0x94,0x00,0x94,0x00,0x62,0x00, - 0x72,0x8c,0x84,0x8a,0x50,0x30,0x48,0x48, - 0x30,0x80,0x40,0xc0,0x20,0x40,0x40,0x80, - 0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, - 0x80,0x40,0x40,0x20,0x20,0x20,0x20,0x20, - 0x20,0x40,0x40,0x80,0xa0,0x40,0xa0,0x20, - 0x20,0xf8,0x20,0x20,0x80,0x40,0x40,0xf8, - 0x80,0x80,0x80,0x40,0x40,0x40,0x20,0x20, - 0x10,0x10,0x70,0x88,0x88,0x88,0x88,0x88, - 0x88,0x88,0x70,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0xe0,0x20,0xf8,0x80,0x80,0x40, - 0x20,0x10,0x08,0x88,0x70,0x70,0x88,0x88, - 0x08,0x08,0x30,0x08,0x88,0x70,0x08,0x08, - 0xfc,0x88,0x48,0x28,0x28,0x18,0x08,0x70, - 0x88,0x88,0x08,0x08,0xf0,0x80,0x80,0xf8, - 0x70,0x88,0x88,0x88,0xc8,0xb0,0x80,0x88, - 0x70,0x40,0x40,0x20,0x20,0x20,0x10,0x10, - 0x08,0xf8,0x70,0x88,0x88,0x88,0x88,0x70, - 0x88,0x88,0x70,0x70,0x88,0x08,0x08,0x78, - 0x88,0x88,0x88,0x70,0x80,0x00,0x00,0x00, - 0x00,0x80,0x80,0x40,0x40,0x00,0x00,0x00, - 0x00,0x40,0x0c,0x30,0xc0,0x30,0x0c,0xf8, - 0x00,0xf8,0xc0,0x30,0x0c,0x30,0xc0,0x20, - 0x00,0x20,0x20,0x10,0x10,0x88,0x88,0x70, - 0x3e,0x00,0x40,0x00,0x9b,0x00,0xa6,0x80, - 0xa2,0x40,0xa2,0x40,0x92,0x40,0x4d,0x40, - 0x60,0x80,0x1f,0x00,0x82,0x82,0x82,0x7c, - 0x44,0x44,0x28,0x28,0x10,0xf8,0x84,0x84, - 0x84,0xf8,0x84,0x84,0x84,0xf8,0x3c,0x42, - 0x80,0x80,0x80,0x80,0x80,0x42,0x3c,0xf8, - 0x84,0x82,0x82,0x82,0x82,0x82,0x84,0xf8, - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80, - 0xfc,0x80,0x80,0x80,0x80,0xf8,0x80,0x80, - 0x80,0xfc,0x3a,0x46,0x82,0x82,0x8e,0x80, - 0x80,0x42,0x3c,0x82,0x82,0x82,0x82,0xfe, - 0x82,0x82,0x82,0x82,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x70,0x88,0x88, - 0x08,0x08,0x08,0x08,0x08,0x08,0x82,0x84, - 0x88,0x90,0xe0,0xa0,0x90,0x88,0x84,0xf8, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x88,0x80,0x88,0x80,0x94,0x80,0x94,0x80, - 0xa2,0x80,0xa2,0x80,0xc1,0x80,0xc1,0x80, - 0x80,0x80,0x82,0x86,0x8a,0x8a,0x92,0xa2, - 0xa2,0xc2,0x82,0x3c,0x42,0x81,0x81,0x81, - 0x81,0x81,0x42,0x3c,0x80,0x80,0x80,0x80, - 0xf8,0x84,0x84,0x84,0xf8,0x3d,0x42,0x85, - 0x89,0x81,0x81,0x81,0x42,0x3c,0x84,0x84, - 0x84,0x88,0xf8,0x84,0x84,0x84,0xf8,0x78, - 0x84,0x84,0x04,0x18,0x60,0x80,0x84,0x78, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0xfe,0x78,0x84,0x84,0x84,0x84,0x84,0x84, - 0x84,0x84,0x10,0x10,0x28,0x28,0x44,0x44, - 0x44,0x82,0x82,0x22,0x00,0x22,0x00,0x22, - 0x00,0x55,0x00,0x55,0x00,0x49,0x00,0x88, - 0x80,0x88,0x80,0x88,0x80,0x82,0x44,0x44, - 0x28,0x10,0x28,0x44,0x44,0x82,0x10,0x10, - 0x10,0x10,0x28,0x44,0x44,0x82,0x82,0xfe, - 0x80,0x40,0x20,0x10,0x08,0x04,0x02,0xfe, - 0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0xc0,0x10,0x10,0x20,0x20, - 0x20,0x40,0x40,0x80,0x80,0xc0,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0xc0,0x88,0x50,0x20,0xfe,0xc0,0x80,0x40, - 0x74,0x88,0x88,0x78,0x08,0x88,0x70,0xb0, - 0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, - 0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x68, - 0x98,0x88,0x88,0x88,0x98,0x68,0x08,0x08, - 0x70,0x88,0x80,0xf8,0x88,0x88,0x70,0x40, - 0x40,0x40,0x40,0x40,0x40,0xe0,0x40,0x30, - 0x70,0x88,0x08,0x68,0x98,0x88,0x88,0x88, - 0x98,0x68,0x88,0x88,0x88,0x88,0x88,0xc8, - 0xb0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x00,0x80,0x80,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x40, - 0x88,0x90,0xa0,0xc0,0xc0,0xa0,0x90,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x92,0x92,0x92,0x92,0x92,0xda, - 0xa4,0x88,0x88,0x88,0x88,0x88,0xc8,0xb0, - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x80, - 0x80,0x80,0xb0,0xc8,0x88,0x88,0x88,0xc8, - 0xb0,0x08,0x08,0x08,0x68,0x98,0x88,0x88, - 0x88,0x98,0x68,0x80,0x80,0x80,0x80,0x80, - 0xc0,0xa0,0x60,0x90,0x10,0x60,0x80,0x90, - 0x60,0x60,0x40,0x40,0x40,0x40,0x40,0xe0, - 0x40,0x40,0x68,0x98,0x88,0x88,0x88,0x88, - 0x88,0x20,0x20,0x50,0x50,0x88,0x88,0x88, - 0x22,0x00,0x22,0x00,0x55,0x00,0x49,0x00, - 0x49,0x00,0x88,0x80,0x88,0x80,0x84,0x84, - 0x48,0x30,0x30,0x48,0x84,0x80,0x40,0x20, - 0x20,0x50,0x50,0x90,0x88,0x88,0x88,0xf0, - 0x80,0x40,0x40,0x20,0x10,0xf0,0x30,0x40, - 0x40,0x40,0x40,0x40,0x80,0x40,0x40,0x40, - 0x40,0x30,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0xc0,0x20, - 0x20,0x20,0x20,0x20,0x10,0x20,0x20,0x20, - 0x20,0xc0,0x98,0x64,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x00,0x80,0x40,0x70, - 0xc8,0xa0,0xa0,0xa0,0xa8,0x70,0x10,0xb0, - 0x48,0x20,0x20,0xf0,0x40,0x40,0x48,0x30, - 0x84,0x78,0x48,0x48,0x78,0x84,0x20,0x20, - 0xf8,0x20,0xf8,0x20,0x50,0x88,0x88,0x80, - 0x80,0x80,0x80,0x00,0x00,0x00,0x80,0x80, - 0x80,0x80,0x70,0x88,0x08,0x30,0x48,0x88, - 0x88,0x90,0x60,0x80,0x88,0x70,0xa0,0x3e, - 0x00,0x41,0x00,0x9c,0x80,0xa2,0x80,0xa0, - 0x80,0xa2,0x80,0x9c,0x80,0x41,0x00,0x3e, - 0x00,0xe0,0x00,0xa0,0x20,0xe0,0x28,0x50, - 0xa0,0x50,0x28,0x04,0x04,0x04,0xfc,0xf0, - 0x3e,0x00,0x41,0x00,0x94,0x80,0x94,0x80, - 0x98,0x80,0x94,0x80,0x9c,0x80,0x41,0x00, - 0x3e,0x00,0xf0,0x60,0x90,0x90,0x60,0xf8, - 0x00,0x20,0x20,0xf8,0x20,0x20,0xf0,0x40, - 0x20,0x90,0x60,0xc0,0x20,0x40,0x20,0xe0, - 0x80,0x40,0x80,0x80,0x80,0xe8,0x98,0x88, - 0x88,0x88,0x88,0x88,0x28,0x28,0x28,0x28, - 0x28,0x28,0x68,0xe8,0xe8,0xe8,0x68,0x3c, - 0x80,0xc0,0x20,0x20,0x40,0x40,0x40,0x40, - 0xc0,0x40,0xe0,0x00,0xe0,0xa0,0xe0,0xa0, - 0x50,0x28,0x50,0xa0,0x41,0x00,0x27,0x80, - 0x15,0x00,0x13,0x00,0x49,0x00,0x44,0x00, - 0x44,0x00,0xc2,0x00,0x41,0x00,0x47,0x80, - 0x22,0x00,0x11,0x00,0x14,0x80,0x4b,0x00, - 0x48,0x00,0x44,0x00,0xc2,0x00,0x41,0x00, - 0x21,0x00,0x17,0x80,0x15,0x00,0x0b,0x00, - 0xc9,0x00,0x24,0x00,0x44,0x00,0x22,0x00, - 0xe1,0x00,0x70,0x88,0x88,0x40,0x40,0x20, - 0x20,0x00,0x20,0x82,0x82,0x82,0x7c,0x44, - 0x44,0x28,0x10,0x10,0x00,0x10,0x20,0x82, - 0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10, - 0x00,0x10,0x08,0x82,0x82,0x82,0x7c,0x44, - 0x44,0x28,0x10,0x10,0x00,0x28,0x10,0x82, - 0x82,0x82,0x7c,0x44,0x44,0x28,0x10,0x10, - 0x00,0x28,0x14,0x82,0x82,0x82,0x7c,0x44, - 0x44,0x28,0x10,0x10,0x00,0x28,0x82,0x82, - 0x82,0x7c,0x44,0x44,0x28,0x10,0x10,0x10, - 0x28,0x10,0x8f,0x80,0x88,0x00,0x88,0x00, - 0x78,0x00,0x4f,0x80,0x48,0x00,0x28,0x00, - 0x28,0x00,0x1f,0x80,0x30,0x08,0x08,0x3c, - 0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x3c, - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80, - 0xfc,0x00,0x10,0x20,0xfc,0x80,0x80,0x80, - 0xfc,0x80,0x80,0x80,0xfc,0x00,0x10,0x08, - 0xfc,0x80,0x80,0x80,0xfc,0x80,0x80,0x80, - 0xfc,0x00,0x28,0x10,0xfc,0x80,0x80,0x80, - 0xfc,0x80,0x80,0x80,0xfc,0x00,0x28,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x00,0x40,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x00,0x80,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, - 0x00,0xa0,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x00,0xa0,0x7c,0x42, - 0x41,0x41,0xf1,0x41,0x41,0x42,0x7c,0x82, - 0x86,0x8a,0x8a,0x92,0xa2,0xa2,0xc2,0x82, - 0x00,0x28,0x14,0x3c,0x42,0x81,0x81,0x81, - 0x81,0x81,0x42,0x3c,0x00,0x08,0x10,0x3c, - 0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c, - 0x00,0x08,0x04,0x3c,0x42,0x81,0x81,0x81, - 0x81,0x81,0x42,0x3c,0x00,0x14,0x08,0x3c, - 0x42,0x81,0x81,0x81,0x81,0x81,0x42,0x3c, - 0x00,0x28,0x14,0x3c,0x42,0x81,0x81,0x81, - 0x81,0x81,0x42,0x3c,0x00,0x24,0x88,0x50, - 0x20,0x50,0x88,0x80,0x00,0x5e,0x00,0x21, - 0x00,0x50,0x80,0x48,0x80,0x44,0x80,0x44, - 0x80,0x42,0x80,0x21,0x00,0x1e,0x80,0x00, - 0x40,0x78,0x84,0x84,0x84,0x84,0x84,0x84, - 0x84,0x84,0x00,0x10,0x20,0x78,0x84,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x00,0x10, - 0x08,0x78,0x84,0x84,0x84,0x84,0x84,0x84, - 0x84,0x84,0x00,0x28,0x10,0x78,0x84,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x00,0x48, - 0x10,0x10,0x10,0x10,0x28,0x44,0x44,0x82, - 0x82,0x00,0x10,0x08,0x80,0x80,0xf8,0x84, - 0x84,0x84,0xf8,0x80,0x80,0xb0,0x88,0x88, - 0x88,0xb0,0x88,0x88,0x88,0x70,0x74,0x88, - 0x88,0x78,0x08,0x88,0x70,0x00,0x10,0x20, - 0x74,0x88,0x88,0x78,0x08,0x88,0x70,0x00, - 0x20,0x10,0x74,0x88,0x88,0x78,0x08,0x88, - 0x70,0x00,0x50,0x20,0x74,0x88,0x88,0x78, - 0x08,0x88,0x70,0x00,0x50,0x28,0x74,0x88, - 0x88,0x78,0x08,0x88,0x70,0x00,0x50,0x74, - 0x88,0x88,0x78,0x08,0x88,0x70,0x30,0x48, - 0x30,0x77,0x00,0x88,0x80,0x88,0x00,0x7f, - 0x80,0x08,0x80,0x88,0x80,0x77,0x00,0x60, - 0x10,0x20,0x70,0x88,0x80,0x80,0x80,0x88, - 0x70,0x70,0x88,0x80,0xf8,0x88,0x88,0x70, - 0x00,0x20,0x40,0x70,0x88,0x80,0xf8,0x88, - 0x88,0x70,0x00,0x20,0x10,0x70,0x88,0x80, - 0xf8,0x88,0x88,0x70,0x00,0x50,0x20,0x70, - 0x88,0x80,0xf8,0x88,0x88,0x70,0x00,0x50, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00, - 0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x00,0x80,0x40,0x40,0x40,0x40,0x40, - 0x40,0x40,0x40,0x00,0xa0,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x00,0xa0,0x70, - 0x88,0x88,0x88,0x88,0x78,0x08,0x50,0x30, - 0x68,0x88,0x88,0x88,0x88,0x88,0xc8,0xb0, - 0x00,0x50,0x28,0x70,0x88,0x88,0x88,0x88, - 0x88,0x70,0x00,0x20,0x40,0x70,0x88,0x88, - 0x88,0x88,0x88,0x70,0x00,0x20,0x10,0x70, - 0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x50, - 0x20,0x70,0x88,0x88,0x88,0x88,0x88,0x70, - 0x00,0x50,0x28,0x70,0x88,0x88,0x88,0x88, - 0x88,0x70,0x00,0x50,0x20,0x00,0xf8,0x00, - 0x20,0xb8,0x44,0x64,0x54,0x4c,0x44,0x3a, - 0x68,0x98,0x88,0x88,0x88,0x88,0x88,0x00, - 0x20,0x40,0x68,0x98,0x88,0x88,0x88,0x88, - 0x88,0x00,0x20,0x10,0x68,0x98,0x88,0x88, - 0x88,0x88,0x88,0x00,0x50,0x20,0x68,0x98, - 0x88,0x88,0x88,0x88,0x88,0x00,0x50,0x80, - 0x40,0x20,0x20,0x50,0x50,0x90,0x88,0x88, - 0x88,0x00,0x20,0x10,0x80,0x80,0x80,0xb0, - 0xc8,0x88,0x88,0x88,0xc8,0xb0,0x80,0x80, - 0xc0,0x20,0x20,0x20,0x30,0x50,0x50,0x48, - 0x88,0x88,0x00,0x50, -}; - -BMF_FontData BMF_font_helv12 = { - 0, -3, - 11, 12, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 16, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 4, -1}, - {1, 9, -1, 0, 3, 0}, - {3, 3, -1, -6, 5, 9}, - {6, 8, 0, 0, 7, 12}, - {5, 10, -1, 1, 7, 20}, - {9, 9, -1, 0, 11, 30}, - {7, 9, -1, 0, 9, 48}, - {2, 3, -1, -6, 3, 57}, - {3, 12, -1, 3, 4, 60}, - {3, 12, 0, 3, 4, 72}, - {3, 3, -1, -6, 5, 84}, - {5, 5, -1, -1, 7, 87}, - {2, 3, -1, 2, 4, 92}, - {5, 1, -1, -3, 8, 95}, - {1, 1, -1, 0, 3, 96}, - {4, 9, 0, 0, 4, 97}, - {5, 9, -1, 0, 7, 106}, - {3, 9, -1, 0, 7, 115}, - {5, 9, -1, 0, 7, 124}, - {5, 9, -1, 0, 7, 133}, - {6, 9, 0, 0, 7, 142}, - {5, 9, -1, 0, 7, 151}, - {5, 9, -1, 0, 7, 160}, - {5, 9, -1, 0, 7, 169}, - {5, 9, -1, 0, 7, 178}, - {5, 9, -1, 0, 7, 187}, - {1, 6, -1, 0, 3, 196}, - {2, 8, 0, 2, 3, 202}, - {6, 5, 0, -1, 7, 210}, - {5, 3, -1, -2, 7, 215}, - {6, 5, -1, -1, 7, 218}, - {5, 9, -1, 0, 7, 223}, - {10, 10, -1, 1, 12, 232}, - {7, 9, -1, 0, 9, 252}, - {6, 9, -1, 0, 8, 261}, - {7, 9, -1, 0, 9, 270}, - {7, 9, -1, 0, 9, 279}, - {6, 9, -1, 0, 8, 288}, - {6, 9, -1, 0, 8, 297}, - {7, 9, -1, 0, 9, 306}, - {7, 9, -1, 0, 9, 315}, - {1, 9, -1, 0, 3, 324}, - {5, 9, -1, 0, 7, 333}, - {7, 9, -1, 0, 8, 342}, - {5, 9, -1, 0, 7, 351}, - {9, 9, -1, 0, 11, 360}, - {7, 9, -1, 0, 9, 378}, - {8, 9, -1, 0, 10, 387}, - {6, 9, -1, 0, 8, 396}, - {8, 9, -1, 0, 10, 405}, - {6, 9, -1, 0, 8, 414}, - {6, 9, -1, 0, 8, 423}, - {7, 9, 0, 0, 7, 432}, - {6, 9, -1, 0, 8, 441}, - {7, 9, -1, 0, 9, 450}, - {9, 9, -1, 0, 11, 459}, - {7, 9, -1, 0, 9, 477}, - {7, 9, -1, 0, 9, 486}, - {7, 9, -1, 0, 9, 495}, - {2, 12, -1, 3, 3, 504}, - {4, 9, 0, 0, 4, 516}, - {2, 12, 0, 3, 3, 525}, - {5, 3, 0, -5, 6, 537}, - {7, 1, 0, 2, 7, 540}, - {2, 3, 0, -6, 3, 541}, - {6, 7, -1, 0, 7, 544}, - {5, 9, -1, 0, 7, 551}, - {5, 7, -1, 0, 7, 560}, - {5, 9, -1, 0, 7, 567}, - {5, 7, -1, 0, 7, 576}, - {4, 9, 0, 0, 3, 583}, - {5, 10, -1, 3, 7, 592}, - {5, 9, -1, 0, 7, 602}, - {1, 9, -1, 0, 3, 611}, - {2, 12, 0, 3, 3, 620}, - {5, 9, -1, 0, 6, 632}, - {1, 9, -1, 0, 3, 641}, - {7, 7, -1, 0, 9, 650}, - {5, 7, -1, 0, 7, 657}, - {5, 7, -1, 0, 7, 664}, - {5, 10, -1, 3, 7, 671}, - {5, 10, -1, 3, 7, 681}, - {3, 7, -1, 0, 4, 691}, - {4, 7, -1, 0, 6, 698}, - {3, 9, 0, 0, 3, 705}, - {5, 7, -1, 0, 7, 714}, - {5, 7, -1, 0, 7, 721}, - {9, 7, 0, 0, 9, 728}, - {6, 7, 0, 0, 6, 742}, - {5, 10, -1, 3, 7, 749}, - {4, 7, -1, 0, 6, 759}, - {4, 12, 0, 3, 4, 766}, - {1, 12, -1, 3, 3, 778}, - {4, 12, 0, 3, 4, 790}, - {6, 2, 0, -3, 7, 802}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 4, -1}, - {1, 10, -1, 3, 3, 804}, - {5, 9, -1, 1, 7, 814}, - {5, 9, -1, 0, 7, 823}, - {6, 6, 0, -1, 7, 832}, - {5, 9, -1, 0, 7, 838}, - {1, 11, -1, 2, 3, 847}, - {5, 12, 0, 3, 6, 858}, - {3, 1, 0, -8, 3, 870}, - {9, 9, -1, 0, 11, 871}, - {3, 5, -1, -4, 5, 889}, - {5, 5, -1, -1, 7, 894}, - {6, 4, -1, -2, 8, 899}, - {4, 1, 0, -3, 5, 903}, - {9, 9, -1, 0, 11, 904}, - {4, 1, 0, -8, 4, 922}, - {4, 4, 0, -4, 5, 923}, - {5, 7, -1, 0, 7, 927}, - {4, 5, 0, -3, 4, 934}, - {3, 5, 0, -3, 4, 939}, - {2, 2, 0, -8, 2, 944}, - {5, 10, -1, 3, 7, 946}, - {6, 12, 0, 3, 7, 956}, - {1, 1, -1, -3, 3, 968}, - {3, 4, 0, 3, 3, 969}, - {2, 5, -1, -3, 4, 973}, - {3, 5, -1, -4, 5, 978}, - {5, 5, -1, -1, 7, 983}, - {9, 9, 0, 0, 10, 988}, - {9, 9, 0, 0, 10, 1006}, - {9, 9, 0, 0, 10, 1024}, - {5, 9, -1, 3, 7, 1042}, - {7, 12, -1, 0, 9, 1051}, - {7, 12, -1, 0, 9, 1063}, - {7, 12, -1, 0, 9, 1075}, - {7, 12, -1, 0, 9, 1087}, - {7, 11, -1, 0, 9, 1099}, - {7, 12, -1, 0, 9, 1110}, - {9, 9, -1, 0, 11, 1122}, - {7, 12, -1, 3, 9, 1140}, - {6, 12, -1, 0, 8, 1152}, - {6, 12, -1, 0, 8, 1164}, - {6, 12, -1, 0, 8, 1176}, - {6, 11, -1, 0, 8, 1188}, - {2, 12, 0, 0, 3, 1199}, - {2, 12, -1, 0, 3, 1211}, - {3, 12, 0, 0, 3, 1223}, - {3, 11, 0, 0, 3, 1235}, - {8, 9, 0, 0, 9, 1246}, - {7, 12, -1, 0, 9, 1255}, - {8, 12, -1, 0, 10, 1267}, - {8, 12, -1, 0, 10, 1279}, - {8, 12, -1, 0, 10, 1291}, - {8, 12, -1, 0, 10, 1303}, - {8, 11, -1, 0, 10, 1315}, - {5, 5, -1, -1, 7, 1326}, - {10, 11, 0, 1, 10, 1331}, - {6, 12, -1, 0, 8, 1353}, - {6, 12, -1, 0, 8, 1365}, - {6, 12, -1, 0, 8, 1377}, - {6, 11, -1, 0, 8, 1389}, - {7, 12, -1, 0, 9, 1400}, - {6, 9, -1, 0, 8, 1412}, - {5, 9, -1, 0, 7, 1421}, - {6, 10, -1, 0, 7, 1430}, - {6, 10, -1, 0, 7, 1440}, - {6, 10, -1, 0, 7, 1450}, - {6, 10, -1, 0, 7, 1460}, - {6, 9, -1, 0, 7, 1470}, - {6, 10, -1, 0, 7, 1479}, - {9, 7, -1, 0, 11, 1489}, - {5, 10, -1, 3, 7, 1503}, - {5, 10, -1, 0, 7, 1513}, - {5, 10, -1, 0, 7, 1523}, - {5, 10, -1, 0, 7, 1533}, - {5, 9, -1, 0, 7, 1543}, - {2, 10, 0, 0, 3, 1552}, - {2, 10, -1, 0, 3, 1562}, - {3, 10, 0, 0, 3, 1572}, - {3, 9, 0, 0, 3, 1582}, - {5, 10, -1, 0, 7, 1591}, - {5, 10, -1, 0, 7, 1601}, - {5, 10, -1, 0, 7, 1611}, - {5, 10, -1, 0, 7, 1621}, - {5, 10, -1, 0, 7, 1631}, - {5, 10, -1, 0, 7, 1641}, - {5, 9, -1, 0, 7, 1651}, - {5, 5, -1, -1, 7, 1660}, - {7, 7, 0, 0, 7, 1665}, - {5, 10, -1, 0, 7, 1672}, - {5, 10, -1, 0, 7, 1682}, - {5, 10, -1, 0, 7, 1692}, - {5, 9, -1, 0, 7, 1702}, - {5, 13, -1, 3, 7, 1711}, - {5, 12, -1, 3, 7, 1724}, - {5, 12, -1, 3, 7, 1736}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_helvb10.cpp b/intern/bmfont/intern/BMF_font_helvb10.cpp deleted file mode 100644 index cdd3656c5c0..00000000000 --- a/intern/bmfont/intern/BMF_font_helvb10.cpp +++ /dev/null @@ -1,492 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_HELVB10 - -static unsigned char bitmap_data[]= { - 0x00,0xc0,0x00,0x80,0x80,0xc0,0xc0,0xc0, - 0xc0,0xa0,0xa0,0xa0,0x50,0x50,0xfc,0x28, - 0x7e,0x28,0x28,0x20,0x70,0xa8,0x28,0x38, - 0x70,0xe0,0xa8,0x70,0x20,0x8c,0x56,0x2c, - 0x10,0x10,0x68,0xb4,0x62,0x76,0xdc,0xcc, - 0xde,0x70,0xd8,0xd8,0x70,0x80,0x40,0xc0, - 0xc0,0x20,0x60,0x40,0xc0,0xc0,0xc0,0xc0, - 0x40,0x60,0x20,0x80,0xc0,0x40,0x60,0x60, - 0x60,0x60,0x40,0xc0,0x80,0xa0,0x40,0xa0, - 0x30,0x30,0xfc,0x30,0x30,0x80,0x40,0xc0, - 0xc0,0xf8,0xc0,0xc0,0x80,0x80,0x40,0x40, - 0x20,0x20,0x10,0x10,0x70,0xd8,0xd8,0xd8, - 0xd8,0xd8,0xd8,0x70,0x60,0x60,0x60,0x60, - 0x60,0x60,0xe0,0x60,0xf8,0xc0,0x60,0x30, - 0x18,0x18,0xd8,0x70,0x70,0xd8,0x18,0x18, - 0x30,0x18,0xd8,0x70,0x18,0x18,0xfc,0x98, - 0x58,0x38,0x18,0x08,0x70,0xd8,0x98,0x18, - 0xf0,0xc0,0xc0,0xf8,0x70,0xd8,0xd8,0xd8, - 0xf0,0xc0,0xd8,0x70,0x60,0x60,0x60,0x30, - 0x30,0x18,0x18,0xf8,0x70,0xd8,0xd8,0xd8, - 0x70,0xd8,0xd8,0x70,0x70,0xd8,0x18,0x78, - 0xd8,0xd8,0xd8,0x70,0xc0,0xc0,0x00,0x00, - 0xc0,0xc0,0x80,0x40,0xc0,0xc0,0x00,0x00, - 0xc0,0xc0,0x30,0x60,0xc0,0x60,0x30,0xf8, - 0x00,0xf8,0xc0,0x60,0x30,0x60,0xc0,0x60, - 0x00,0x60,0x60,0x30,0x18,0xd8,0x70,0x3e, - 0x00,0x40,0x00,0x9b,0x00,0xa4,0x80,0xa2, - 0x40,0x92,0x40,0x4d,0x40,0x60,0x80,0x1f, - 0x00,0xc6,0xc6,0xfe,0x6c,0x6c,0x6c,0x38, - 0x38,0xf8,0xcc,0xcc,0xcc,0xf8,0xcc,0xcc, - 0xf8,0x3c,0x66,0xc2,0xc0,0xc0,0xc2,0x66, - 0x3c,0xf0,0xd8,0xcc,0xcc,0xcc,0xcc,0xd8, - 0xf0,0xf8,0xc0,0xc0,0xc0,0xf8,0xc0,0xc0, - 0xf8,0xc0,0xc0,0xc0,0xc0,0xf0,0xc0,0xc0, - 0xf8,0x3a,0x66,0xc6,0xce,0xc0,0xc2,0x66, - 0x3c,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc, - 0xcc,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0x70,0xd8,0x18,0x18,0x18,0x18,0x18, - 0x18,0xc6,0xcc,0xd8,0xf0,0xe0,0xf0,0xd8, - 0xcc,0xf8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc9,0x80,0xc9,0x80,0xdd,0x80,0xd5, - 0x80,0xf7,0x80,0xe3,0x80,0xe3,0x80,0xc1, - 0x80,0xc6,0xce,0xce,0xd6,0xd6,0xe6,0xe6, - 0xc6,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0x6c, - 0x38,0xc0,0xc0,0xc0,0xf8,0xcc,0xcc,0xcc, - 0xf8,0x02,0x3c,0x6c,0xd6,0xc6,0xc6,0xc6, - 0x6c,0x38,0xcc,0xcc,0xcc,0xf8,0xcc,0xcc, - 0xcc,0xf8,0x78,0xcc,0x8c,0x1c,0x78,0xe0, - 0xcc,0x78,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0xfc,0x78,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0x10,0x38,0x38,0x6c,0x6c,0x6c, - 0xc6,0xc6,0x33,0x00,0x33,0x00,0x7f,0x80, - 0x6d,0x80,0x6d,0x80,0xcc,0xc0,0xcc,0xc0, - 0xcc,0xc0,0xc6,0xc6,0x6c,0x38,0x38,0x6c, - 0xc6,0xc6,0x18,0x18,0x18,0x3c,0x66,0x66, - 0xc3,0xc3,0xfc,0xc0,0x60,0x70,0x30,0x18, - 0x0c,0xfc,0xe0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xe0,0x10,0x10,0x20,0x20, - 0x40,0x40,0x80,0x80,0xe0,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0xe0,0x90,0x90, - 0xf0,0x60,0xfc,0xc0,0xc0,0x80,0x40,0x6c, - 0xd8,0xd8,0x78,0x98,0x70,0xf0,0xd8,0xd8, - 0xd8,0xd8,0xf0,0xc0,0xc0,0x70,0xd0,0xc0, - 0xc0,0xd0,0x70,0x78,0xd8,0xd8,0xd8,0xd8, - 0x78,0x18,0x18,0x70,0xd8,0xc0,0xf8,0xd8, - 0x70,0x60,0x60,0x60,0x60,0x60,0xf0,0x60, - 0x38,0x70,0x18,0x78,0xd8,0xd8,0xd8,0xd8, - 0x68,0xd8,0xd8,0xd8,0xd8,0xd8,0xf0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00, - 0xc0,0xc0,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x00,0x60,0xcc,0xd8,0xf0,0xe0,0xf0, - 0xd8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xdb,0xdb,0xdb,0xdb,0xdb, - 0xb6,0xd8,0xd8,0xd8,0xd8,0xd8,0xb0,0x70, - 0xd8,0xd8,0xd8,0xd8,0x70,0xc0,0xc0,0xf0, - 0xd8,0xd8,0xd8,0xd8,0xb0,0x18,0x18,0x78, - 0xd8,0xd8,0xd8,0xd8,0x68,0xc0,0xc0,0xc0, - 0xc0,0xe0,0xb0,0x70,0xd8,0x18,0x70,0xd8, - 0x70,0x30,0x60,0x60,0x60,0x60,0xf0,0x60, - 0x60,0x68,0xd8,0xd8,0xd8,0xd8,0xd8,0x20, - 0x70,0x50,0xd8,0xd8,0xd8,0x6c,0x6c,0x6c, - 0xd6,0xd6,0xd6,0xcc,0xcc,0x78,0x30,0x78, - 0xcc,0x60,0x30,0x30,0x78,0xd8,0xd8,0xd8, - 0xd8,0xf8,0xc0,0x60,0x30,0x18,0xf8,0x30, - 0x60,0x60,0x60,0x60,0xc0,0x60,0x60,0x60, - 0x30,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0xc0,0x60,0x60,0x60,0x60, - 0x30,0x60,0x60,0x60,0xc0,0xb0,0x68,0x00, - 0xc0,0xc0,0xc0,0xc0,0x40,0x40,0x00,0xc0, - 0x40,0x70,0xd8,0xa0,0xa0,0xd8,0x70,0x10, - 0xd8,0x68,0x60,0x60,0xf0,0x60,0x68,0x38, - 0x84,0x78,0x48,0x48,0x78,0x84,0x30,0xfc, - 0x30,0xfc,0x48,0xcc,0x84,0x84,0x80,0x80, - 0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80, - 0x70,0x98,0x38,0x70,0xc8,0x98,0x70,0xe0, - 0xc8,0x70,0xa0,0x3c,0x42,0x9d,0xa1,0xa5, - 0x99,0x42,0x3c,0xe0,0x00,0xa0,0x20,0xe0, - 0x6c,0xd8,0x6c,0x08,0x08,0xf8,0xf0,0x3c, - 0x42,0xa5,0xb9,0xa5,0xbd,0x42,0x3c,0xe0, - 0xc0,0xa0,0x60,0xfc,0x00,0x30,0x30,0xfc, - 0x30,0x30,0xe0,0x40,0xa0,0x60,0xc0,0x20, - 0x40,0xe0,0x80,0x40,0xc0,0xc0,0xe8,0xd8, - 0xd8,0xd8,0xd8,0xd8,0x28,0x28,0x28,0x28, - 0x28,0x68,0xe8,0xe8,0xe8,0x7c,0xc0,0xc0, - 0x40,0x40,0x40,0xc0,0x40,0xe0,0x00,0xe0, - 0xa0,0xe0,0xd8,0x6c,0xd8,0x42,0x2f,0x26, - 0x12,0x48,0x48,0xc4,0x44,0x4e,0x24,0x2a, - 0x16,0x48,0x48,0xc4,0x44,0x42,0x2f,0x26, - 0x12,0xc8,0x28,0x44,0xe4,0x70,0xd8,0xc0, - 0x60,0x30,0x30,0x00,0x30,0xc6,0xc6,0xfe, - 0x6c,0x6c,0x6c,0x38,0x38,0x00,0x10,0x20, - 0xc6,0xc6,0xfe,0x6c,0x6c,0x6c,0x38,0x38, - 0x00,0x10,0x08,0xc6,0xc6,0xfe,0x6c,0x6c, - 0x6c,0x38,0x38,0x00,0x28,0x10,0xc6,0xc6, - 0xfe,0x6c,0x6c,0x6c,0x38,0x38,0x00,0x28, - 0x14,0xc6,0xc6,0xfe,0x6c,0x6c,0x6c,0x38, - 0x38,0x00,0x28,0xc6,0xc6,0xfe,0x6c,0x6c, - 0x6c,0x38,0x38,0x10,0x28,0x10,0xcf,0x80, - 0xcc,0x00,0xfc,0x00,0x6c,0x00,0x6f,0x80, - 0x6c,0x00,0x3c,0x00,0x3f,0x80,0x30,0x10, - 0x3c,0x66,0xc2,0xc0,0xc0,0xc2,0x66,0x3c, - 0xf8,0xc0,0xc0,0xc0,0xf8,0xc0,0xc0,0xf8, - 0x00,0x20,0x40,0xf8,0xc0,0xc0,0xc0,0xf8, - 0xc0,0xc0,0xf8,0x00,0x20,0x10,0xf8,0xc0, - 0xc0,0xc0,0xf8,0xc0,0xc0,0xf8,0x00,0x50, - 0x20,0xf8,0xc0,0xc0,0xc0,0xf8,0xc0,0xc0, - 0xf8,0x00,0x50,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0x00,0x40,0x80,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x80, - 0x40,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x00,0xa0,0x40,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x00,0x90,0x78,0x6c, - 0x66,0x66,0xf6,0x66,0x6c,0x78,0xc6,0xce, - 0xce,0xd6,0xd6,0xe6,0xe6,0xc6,0x00,0x28, - 0x14,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0x6c, - 0x38,0x00,0x08,0x10,0x38,0x6c,0xc6,0xc6, - 0xc6,0xc6,0x6c,0x38,0x00,0x10,0x08,0x38, - 0x6c,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00, - 0x28,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xc6, - 0x6c,0x38,0x00,0x28,0x14,0x38,0x6c,0xc6, - 0xc6,0xc6,0xc6,0x6c,0x38,0x00,0x28,0xcc, - 0x78,0x30,0x78,0xcc,0xb8,0x6c,0xe6,0xd6, - 0xd6,0xce,0x6c,0x3a,0x78,0xcc,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0x00,0x10,0x20,0x78, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00, - 0x10,0x08,0x78,0xcc,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0x00,0x50,0x20,0x78,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x48,0x18, - 0x18,0x18,0x3c,0x66,0x66,0xc3,0xc3,0x00, - 0x08,0x04,0xc0,0xc0,0xf8,0xcc,0xcc,0xcc, - 0xf8,0xc0,0xd0,0xc8,0xc8,0xc8,0xd0,0xc8, - 0xc8,0x70,0x6c,0xd8,0xd8,0x78,0x98,0x70, - 0x00,0x10,0x20,0x6c,0xd8,0xd8,0x78,0x98, - 0x70,0x00,0x20,0x10,0x6c,0xd8,0xd8,0x78, - 0x98,0x70,0x00,0x50,0x20,0x6c,0xd8,0xd8, - 0x78,0x98,0x70,0x00,0x50,0x28,0x6c,0xd8, - 0xd8,0x78,0x98,0x70,0x00,0x50,0x6c,0xd8, - 0xd8,0x78,0x98,0x70,0x20,0x50,0x20,0x6e, - 0xdb,0xd8,0x7f,0x9b,0x7e,0x60,0x20,0x70, - 0xd0,0xc0,0xc0,0xd0,0x70,0x70,0xd8,0xc0, - 0xf8,0xd8,0x70,0x00,0x20,0x40,0x70,0xd8, - 0xc0,0xf8,0xd8,0x70,0x00,0x20,0x10,0x70, - 0xd8,0xc0,0xf8,0xd8,0x70,0x00,0x50,0x20, - 0x70,0xd8,0xc0,0xf8,0xd8,0x70,0x00,0x50, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x40, - 0x80,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00, - 0x80,0x40,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0x00,0xa0,0x40,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0x00,0xa0,0x70,0xd8,0xd8,0xd8,0xd8, - 0x70,0xa0,0x60,0x50,0xd8,0xd8,0xd8,0xd8, - 0xd8,0xb0,0x00,0xa0,0x50,0x70,0xd8,0xd8, - 0xd8,0xd8,0x70,0x00,0x20,0x40,0x70,0xd8, - 0xd8,0xd8,0xd8,0x70,0x00,0x20,0x10,0x70, - 0xd8,0xd8,0xd8,0xd8,0x70,0x00,0x50,0x20, - 0x70,0xd8,0xd8,0xd8,0xd8,0x70,0x00,0xa0, - 0x50,0x70,0xd8,0xd8,0xd8,0xd8,0x70,0x00, - 0x50,0x30,0x00,0xfc,0x00,0x30,0xb8,0x6c, - 0x6c,0x7c,0x6c,0x3a,0x68,0xd8,0xd8,0xd8, - 0xd8,0xd8,0x00,0x20,0x40,0x68,0xd8,0xd8, - 0xd8,0xd8,0xd8,0x00,0x20,0x10,0x68,0xd8, - 0xd8,0xd8,0xd8,0xd8,0x00,0x50,0x20,0x68, - 0xd8,0xd8,0xd8,0xd8,0xd8,0x00,0x50,0x60, - 0x30,0x30,0x78,0xd8,0xd8,0xd8,0xd8,0x00, - 0x20,0x10,0xc0,0xc0,0xf0,0xd8,0xc8,0xc8, - 0xd8,0xf0,0xc0,0xc0,0x60,0x30,0x30,0x78, - 0xd8,0xd8,0xd8,0xd8,0x00,0x50, -}; - -BMF_FontData BMF_font_helvb10 = { - -1, -2, - 10, 11, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 12, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 1, 0, 0, 3, 0}, - {2, 8, -1, 0, 4, 1}, - {3, 3, -1, -5, 5, 9}, - {7, 7, 1, 0, 6, 12}, - {5, 10, 0, 1, 6, 19}, - {7, 8, 0, 0, 8, 29}, - {7, 8, 0, 0, 8, 37}, - {2, 4, 0, -4, 3, 45}, - {3, 10, 0, 2, 4, 49}, - {3, 10, 0, 2, 4, 59}, - {3, 3, 0, -5, 4, 69}, - {6, 5, 0, -1, 6, 72}, - {2, 4, 0, 2, 3, 77}, - {5, 1, -1, -3, 7, 81}, - {2, 2, 0, 0, 3, 82}, - {4, 8, 0, 0, 4, 84}, - {5, 8, 0, 0, 6, 92}, - {3, 8, -1, 0, 6, 100}, - {5, 8, 0, 0, 6, 108}, - {5, 8, 0, 0, 6, 116}, - {6, 8, 0, 0, 6, 124}, - {5, 8, 0, 0, 6, 132}, - {5, 8, 0, 0, 6, 140}, - {5, 8, 0, 0, 6, 148}, - {5, 8, 0, 0, 6, 156}, - {5, 8, 0, 0, 6, 164}, - {2, 6, 0, 0, 3, 172}, - {2, 8, 0, 2, 3, 178}, - {4, 5, 0, -1, 5, 186}, - {5, 3, 0, -2, 6, 191}, - {4, 5, 0, -1, 5, 194}, - {5, 8, 0, 0, 6, 199}, - {10, 9, 0, 1, 11, 207}, - {7, 8, 0, 0, 8, 225}, - {6, 8, 0, 0, 7, 233}, - {7, 8, 0, 0, 8, 241}, - {6, 8, 0, 0, 7, 249}, - {5, 8, 0, 0, 6, 257}, - {5, 8, 0, 0, 6, 265}, - {7, 8, 0, 0, 8, 273}, - {6, 8, 0, 0, 7, 281}, - {2, 8, 0, 0, 3, 289}, - {5, 8, 0, 0, 6, 297}, - {7, 8, 0, 0, 7, 305}, - {5, 8, 0, 0, 6, 313}, - {9, 8, 0, 0, 10, 321}, - {7, 8, 0, 0, 8, 337}, - {7, 8, 0, 0, 8, 345}, - {6, 8, 0, 0, 7, 353}, - {7, 9, 0, 1, 8, 361}, - {6, 8, 0, 0, 7, 370}, - {6, 8, 0, 0, 7, 378}, - {6, 8, 0, 0, 7, 386}, - {6, 8, 0, 0, 7, 394}, - {7, 8, 0, 0, 8, 402}, - {10, 8, 0, 0, 11, 410}, - {7, 8, 0, 0, 8, 426}, - {8, 8, 0, 0, 9, 434}, - {6, 8, 0, 0, 7, 442}, - {3, 10, 0, 2, 4, 450}, - {4, 8, 0, 0, 4, 460}, - {3, 10, 0, 2, 4, 468}, - {4, 4, 0, -4, 5, 478}, - {6, 1, 0, 2, 6, 482}, - {2, 4, 0, -4, 3, 483}, - {6, 6, 0, 0, 6, 487}, - {5, 8, 0, 0, 6, 493}, - {4, 6, 0, 0, 5, 501}, - {5, 8, 0, 0, 6, 507}, - {5, 6, 0, 0, 6, 515}, - {5, 8, 1, 0, 4, 521}, - {5, 8, 0, 2, 6, 529}, - {5, 8, 0, 0, 6, 537}, - {2, 8, 0, 0, 3, 545}, - {3, 10, 1, 2, 3, 553}, - {6, 8, 0, 0, 6, 563}, - {2, 8, 0, 0, 3, 571}, - {8, 6, 0, 0, 9, 579}, - {5, 6, 0, 0, 6, 585}, - {5, 6, 0, 0, 6, 591}, - {5, 8, 0, 2, 6, 597}, - {5, 8, 0, 2, 6, 605}, - {4, 6, 0, 0, 4, 613}, - {5, 6, 0, 0, 6, 619}, - {4, 8, 1, 0, 4, 625}, - {5, 6, 0, 0, 6, 633}, - {5, 6, 0, 0, 6, 639}, - {7, 6, 0, 0, 8, 645}, - {6, 6, 0, 0, 7, 651}, - {5, 8, 0, 2, 6, 657}, - {5, 6, 0, 0, 6, 665}, - {4, 10, 0, 2, 5, 671}, - {1, 10, -1, 2, 3, 681}, - {4, 10, 0, 2, 5, 691}, - {5, 2, 0, -3, 6, 701}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 1, 0, 0, 3, 703}, - {2, 8, -1, 2, 4, 704}, - {5, 8, 0, 1, 6, 712}, - {5, 8, 0, 0, 6, 720}, - {6, 6, 0, -1, 6, 728}, - {6, 8, 0, 0, 7, 734}, - {1, 10, -1, 2, 3, 742}, - {5, 10, 0, 2, 6, 752}, - {3, 1, 0, -7, 3, 762}, - {8, 8, -1, 0, 10, 763}, - {3, 5, -1, -3, 5, 771}, - {6, 3, 0, -1, 7, 776}, - {5, 3, -1, -2, 7, 779}, - {4, 1, 0, -3, 5, 782}, - {8, 8, -1, 0, 10, 783}, - {3, 1, 0, -7, 3, 791}, - {3, 3, 0, -5, 4, 792}, - {6, 7, 0, 0, 6, 795}, - {3, 4, 0, -4, 3, 802}, - {3, 4, 0, -4, 3, 806}, - {2, 2, 0, -7, 3, 810}, - {5, 8, 0, 2, 6, 812}, - {6, 10, 0, 2, 6, 820}, - {2, 1, 0, -3, 3, 830}, - {2, 2, 0, 2, 3, 831}, - {2, 4, 0, -4, 3, 833}, - {3, 5, -1, -3, 5, 837}, - {6, 3, 0, -1, 7, 842}, - {8, 8, 0, 0, 9, 845}, - {7, 8, 0, 0, 9, 853}, - {8, 8, 0, 0, 9, 861}, - {5, 8, 0, 2, 6, 869}, - {7, 11, 0, 0, 8, 877}, - {7, 11, 0, 0, 8, 888}, - {7, 11, 0, 0, 8, 899}, - {7, 11, 0, 0, 8, 910}, - {7, 10, 0, 0, 8, 921}, - {7, 11, 0, 0, 8, 931}, - {9, 8, 0, 0, 10, 942}, - {7, 10, 0, 2, 8, 958}, - {5, 11, 0, 0, 6, 968}, - {5, 11, 0, 0, 6, 979}, - {5, 11, 0, 0, 6, 990}, - {5, 10, 0, 0, 6, 1001}, - {2, 11, 0, 0, 3, 1011}, - {2, 11, 0, 0, 3, 1022}, - {3, 11, 1, 0, 3, 1033}, - {4, 10, 1, 0, 3, 1044}, - {7, 8, 1, 0, 7, 1054}, - {7, 11, 0, 0, 8, 1062}, - {7, 11, 0, 0, 8, 1073}, - {7, 11, 0, 0, 8, 1084}, - {7, 11, 0, 0, 8, 1095}, - {7, 11, 0, 0, 8, 1106}, - {7, 10, 0, 0, 8, 1117}, - {6, 5, 0, -1, 6, 1127}, - {7, 8, 0, 0, 8, 1132}, - {6, 11, 0, 0, 7, 1140}, - {6, 11, 0, 0, 7, 1151}, - {6, 11, 0, 0, 7, 1162}, - {6, 10, 0, 0, 7, 1173}, - {8, 11, 0, 0, 9, 1183}, - {6, 8, 0, 0, 7, 1194}, - {5, 8, 0, 0, 6, 1202}, - {6, 9, 0, 0, 6, 1210}, - {6, 9, 0, 0, 6, 1219}, - {6, 9, 0, 0, 6, 1228}, - {6, 9, 0, 0, 6, 1237}, - {6, 8, 0, 0, 6, 1246}, - {6, 9, 0, 0, 6, 1254}, - {8, 6, 0, 0, 9, 1263}, - {4, 8, 0, 2, 5, 1269}, - {5, 9, 0, 0, 6, 1277}, - {5, 9, 0, 0, 6, 1286}, - {5, 9, 0, 0, 6, 1295}, - {5, 8, 0, 0, 6, 1304}, - {2, 9, 0, 0, 3, 1312}, - {2, 9, 0, 0, 3, 1321}, - {3, 9, 0, 0, 3, 1330}, - {3, 8, 0, 0, 3, 1339}, - {5, 9, 0, 0, 6, 1347}, - {5, 9, 0, 0, 6, 1356}, - {5, 9, 0, 0, 6, 1365}, - {5, 9, 0, 0, 6, 1374}, - {5, 9, 0, 0, 6, 1383}, - {5, 9, 0, 0, 6, 1392}, - {5, 8, 0, 0, 6, 1401}, - {6, 5, 0, -1, 6, 1409}, - {7, 6, 1, 0, 6, 1414}, - {5, 9, 0, 0, 6, 1420}, - {5, 9, 0, 0, 6, 1429}, - {5, 9, 0, 0, 6, 1438}, - {5, 8, 0, 0, 6, 1447}, - {5, 11, 0, 2, 6, 1455}, - {5, 10, 0, 2, 6, 1466}, - {5, 10, 0, 2, 6, 1476}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_helvb12.cpp b/intern/bmfont/intern/BMF_font_helvb12.cpp deleted file mode 100644 index 8b56bdceee7..00000000000 --- a/intern/bmfont/intern/BMF_font_helvb12.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_HELVB12 - -static unsigned char bitmap_data[]= { - 0x00,0xc0,0xc0,0x00,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xa0,0xa0,0xa0,0x6c, - 0x00,0x6c,0x00,0x6c,0x00,0xff,0x00,0x36, - 0x00,0x36,0x00,0x36,0x00,0x7f,0x80,0x1b, - 0x00,0x1b,0x00,0x1b,0x00,0x30,0x30,0x78, - 0xec,0xac,0x3c,0x38,0x70,0xf0,0xd4,0xdc, - 0x78,0x30,0x63,0x80,0x37,0xc0,0x36,0xc0, - 0x1f,0xc0,0x1b,0x80,0x0c,0x00,0x76,0x00, - 0xfe,0x00,0xdb,0x00,0xfb,0x00,0x71,0x80, - 0x73,0x80,0xff,0x00,0xce,0x00,0xcf,0x00, - 0xdd,0x80,0x79,0x80,0x38,0x00,0x6c,0x00, - 0x6c,0x00,0x7c,0x00,0x38,0x00,0x80,0x40, - 0xc0,0xc0,0x30,0x60,0x60,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0x60,0x60,0x30, - 0xc0,0x60,0x60,0x30,0x30,0x30,0x30,0x30, - 0x30,0x30,0x30,0x60,0x60,0xc0,0xd8,0x70, - 0x70,0xf8,0x20,0x30,0x30,0xfc,0xfc,0x30, - 0x30,0x80,0x40,0xc0,0xc0,0xfc,0xfc,0xc0, - 0xc0,0xc0,0xc0,0xc0,0x60,0x60,0x60,0x20, - 0x30,0x30,0x30,0x18,0x18,0x18,0x78,0xfc, - 0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfc, - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0xf0,0xf0,0x30,0xfc,0xfc,0xc0,0x60, - 0x70,0x38,0x18,0xcc,0xcc,0xfc,0x78,0x78, - 0xfc,0xcc,0xcc,0x0c,0x38,0x38,0x0c,0xcc, - 0xfc,0x78,0x0c,0x0c,0xfe,0xfe,0xcc,0x6c, - 0x6c,0x3c,0x3c,0x1c,0x1c,0x78,0xfc,0xcc, - 0xcc,0x0c,0xfc,0xf8,0xc0,0xc0,0xfc,0xfc, - 0x78,0xfc,0xcc,0xcc,0xcc,0xfc,0xf8,0xc0, - 0xcc,0xfc,0x78,0x60,0x60,0x60,0x30,0x30, - 0x30,0x18,0x18,0x0c,0xfc,0xfc,0x78,0xfc, - 0xcc,0xcc,0xcc,0x78,0x78,0xcc,0xcc,0xfc, - 0x78,0x78,0xfc,0xcc,0x0c,0x7c,0xfc,0xcc, - 0xcc,0xcc,0xfc,0x78,0xc0,0xc0,0x00,0x00, - 0x00,0x00,0xc0,0xc0,0x80,0x40,0xc0,0xc0, - 0x00,0x00,0x00,0x00,0xc0,0xc0,0x0c,0x38, - 0xe0,0xe0,0x38,0x0c,0xfc,0xfc,0x00,0xfc, - 0xfc,0xc0,0x70,0x1c,0x1c,0x70,0xc0,0x30, - 0x30,0x00,0x30,0x30,0x38,0x1c,0xcc,0xcc, - 0xfc,0x78,0x1f,0x00,0x71,0x80,0x40,0x00, - 0xdd,0x80,0xb6,0xc0,0xb2,0x40,0xb3,0x60, - 0xdb,0x20,0x4d,0xa0,0x60,0x40,0x39,0xc0, - 0x0f,0x00,0xc3,0xc3,0xff,0x7e,0x66,0x66, - 0x3c,0x3c,0x3c,0x18,0x18,0xf8,0xfc,0xcc, - 0xcc,0xcc,0xf8,0xf8,0xcc,0xcc,0xfc,0xf8, - 0x78,0xfc,0xcc,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xcc,0xfc,0x78,0xf8,0xfc,0xce,0xc6,0xc6, - 0xc6,0xc6,0xc6,0xce,0xfc,0xf8,0xfc,0xfc, - 0xc0,0xc0,0xc0,0xf8,0xf8,0xc0,0xc0,0xfc, - 0xfc,0xc0,0xc0,0xc0,0xc0,0xc0,0xf8,0xf8, - 0xc0,0xc0,0xfc,0xfc,0x76,0xfe,0xc6,0xc6, - 0xde,0xde,0xc0,0xc0,0xc6,0xfe,0x7c,0xc6, - 0xc6,0xc6,0xc6,0xc6,0xfe,0xfe,0xc6,0xc6, - 0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0x70,0xf8,0xd8, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0xc6,0xce,0xcc,0xd8,0xf8,0xf0,0xf0,0xd8, - 0xcc,0xcc,0xc6,0xfc,0xfc,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc9,0x80, - 0xc9,0x80,0xdd,0x80,0xdd,0x80,0xf7,0x80, - 0xf7,0x80,0xe3,0x80,0xe3,0x80,0xe3,0x80, - 0xc1,0x80,0xc1,0x80,0xc6,0xc6,0xce,0xce, - 0xde,0xd6,0xf6,0xe6,0xe6,0xc6,0xc6,0x7c, - 0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6, - 0xfe,0x7c,0xc0,0xc0,0xc0,0xc0,0xfc,0xfe, - 0xc6,0xc6,0xc6,0xfe,0xfc,0x06,0x7e,0xfc, - 0xce,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xfe, - 0x7c,0xc6,0xc6,0xc6,0xce,0xfc,0xfc,0xc6, - 0xc6,0xc6,0xfe,0xfc,0x78,0xfc,0xcc,0x0c, - 0x1c,0x78,0xe0,0xc0,0xcc,0xfc,0x78,0x30, - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0xfc,0xfc,0x7c,0xfe,0xc6,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0xc6,0xc6,0x18,0x18,0x18, - 0x3c,0x3c,0x3c,0x66,0x66,0x66,0xc3,0xc3, - 0x33,0x00,0x33,0x00,0x33,0x00,0x3b,0x00, - 0x7f,0x80,0x6d,0x80,0x6d,0x80,0x6d,0x80, - 0xcc,0xc0,0xcc,0xc0,0xcc,0xc0,0xc3,0xc3, - 0x66,0x7e,0x3c,0x18,0x3c,0x7e,0x66,0xc3, - 0xc3,0x18,0x18,0x18,0x18,0x18,0x3c,0x3c, - 0x66,0x66,0xc3,0xc3,0xfe,0xfe,0xc0,0x60, - 0x60,0x30,0x18,0x18,0x0c,0xfe,0xfe,0xe0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xe0,0x30,0x30,0x30, - 0x70,0x60,0x60,0x60,0xe0,0xc0,0xc0,0xc0, - 0xe0,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0xe0,0x88,0xd8, - 0x70,0x70,0x20,0xfe,0xc0,0xc0,0x80,0x40, - 0x76,0xfc,0xcc,0xfc,0x7c,0x8c,0xfc,0x78, - 0xd8,0xfc,0xcc,0xcc,0xcc,0xcc,0xfc,0xd8, - 0xc0,0xc0,0xc0,0x78,0xfc,0xcc,0xc0,0xc0, - 0xcc,0xfc,0x78,0x6c,0xfc,0xcc,0xcc,0xcc, - 0xcc,0xfc,0x6c,0x0c,0x0c,0x0c,0x78,0xfc, - 0xc0,0xfc,0xfc,0xcc,0xfc,0x78,0x60,0x60, - 0x60,0x60,0x60,0x60,0xf0,0xf0,0x60,0x70, - 0x30,0x78,0xfc,0x0c,0x6c,0xfc,0xcc,0xcc, - 0xcc,0xcc,0xfc,0x6c,0xcc,0xcc,0xcc,0xcc, - 0xcc,0xec,0xfc,0xd8,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00, - 0xc0,0xc0,0xc0,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x00,0x60,0x60, - 0xcc,0xd8,0xd8,0xf0,0xe0,0xf0,0xd8,0xcc, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xcc,0xc0, - 0xcc,0xc0,0xcc,0xc0,0xcc,0xc0,0xcc,0xc0, - 0xee,0xc0,0xff,0xc0,0xbb,0x80,0xcc,0xcc, - 0xcc,0xcc,0xcc,0xec,0xfc,0xd8,0x78,0xfc, - 0xcc,0xcc,0xcc,0xcc,0xfc,0x78,0xc0,0xc0, - 0xc0,0xd8,0xfc,0xcc,0xcc,0xcc,0xcc,0xfc, - 0xd8,0x0c,0x0c,0x0c,0x6c,0xfc,0xcc,0xcc, - 0xcc,0xcc,0xfc,0x6c,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xe0,0xb0,0x78,0xfc,0xcc,0x1c, - 0x78,0xe0,0xfc,0x78,0x30,0x70,0x60,0x60, - 0x60,0x60,0xf0,0xf0,0x60,0x60,0x6c,0xfc, - 0xdc,0xcc,0xcc,0xcc,0xcc,0xcc,0x30,0x30, - 0x78,0x78,0x78,0xcc,0xcc,0xcc,0x24,0x24, - 0x76,0x76,0x7e,0xdb,0xdb,0xdb,0xcc,0xcc, - 0x78,0x38,0x70,0x78,0xcc,0xcc,0xe0,0xf0, - 0x30,0x30,0x38,0x78,0x78,0x48,0xcc,0xcc, - 0xcc,0xfc,0xfc,0x60,0x30,0x30,0x18,0xfc, - 0xfc,0x30,0x60,0x60,0x60,0x60,0x60,0x40, - 0x80,0x40,0x60,0x60,0x60,0x60,0x30,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0xc0,0x60,0x60,0x60, - 0x60,0x60,0x20,0x10,0x20,0x60,0x60,0x60, - 0x60,0xc0,0x98,0xfc,0x64,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0xc0,0xc0, - 0xc0,0x78,0xfc,0xec,0xe0,0xd0,0xd4,0xfc, - 0x78,0x0c,0xdc,0xfe,0x60,0x30,0x30,0xfc, - 0x30,0x60,0x64,0x7c,0x38,0xcc,0x78,0xcc, - 0xcc,0x78,0xcc,0x18,0x18,0x18,0x7e,0x18, - 0x7e,0x3c,0x66,0x66,0xc3,0xc3,0x80,0x80, - 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x80, - 0x80,0x80,0x80,0x78,0xfc,0xcc,0x1c,0x38, - 0x6c,0xcc,0xcc,0xd8,0x70,0xe0,0xcc,0xfc, - 0x78,0xd8,0xd8,0x1f,0x00,0x71,0xc0,0x6e, - 0xc0,0xdb,0x60,0xdb,0x60,0xd8,0x60,0xdb, - 0x60,0xdb,0x60,0x6e,0xc0,0x71,0xc0,0x1f, - 0x00,0xf0,0x00,0xd0,0xb0,0x70,0xb0,0x60, - 0x36,0x6c,0xd8,0x6c,0x36,0x0c,0x0c,0xfc, - 0xfc,0xe0,0xe0,0x1f,0x00,0x71,0xc0,0x7b, - 0xc0,0xdb,0x60,0xdf,0x60,0xde,0x60,0xdb, - 0x60,0xdb,0x60,0x7e,0xc0,0x71,0xc0,0x1f, - 0x00,0xf0,0xf0,0x60,0x90,0x90,0x60,0xfc, - 0xfc,0x00,0x30,0x30,0xfc,0xfc,0x30,0x30, - 0xf0,0x40,0x20,0x10,0x90,0x60,0x60,0x90, - 0x10,0x20,0x90,0x60,0xc0,0x70,0x30,0xc0, - 0xc0,0xc0,0xec,0xfc,0xdc,0xcc,0xcc,0xcc, - 0xcc,0xcc,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x76,0xf6,0xf6,0xf6,0xfe,0x7e, - 0xc0,0xc0,0xc0,0x60,0x40,0x40,0x40,0x40, - 0x40,0xc0,0x40,0xf8,0x00,0x70,0xd8,0xd8, - 0xd8,0x70,0xd8,0x6c,0x36,0x6c,0xd8,0x20, - 0x80,0x27,0xc0,0x12,0x80,0x12,0x80,0x09, - 0x80,0x4c,0x80,0x44,0x00,0x42,0x00,0x42, - 0x00,0xc1,0x00,0x41,0x00,0x23,0xc0,0x21, - 0x00,0x10,0x80,0x10,0x40,0x0a,0x40,0x4d, - 0x80,0x44,0x00,0x42,0x00,0x42,0x00,0xc1, - 0x00,0x41,0x00,0x20,0x80,0x27,0xc0,0x12, - 0x80,0x12,0x80,0x09,0x80,0x6c,0x80,0x94, - 0x00,0x12,0x00,0x22,0x00,0x91,0x00,0x61, - 0x00,0x78,0xfc,0xcc,0xcc,0xe0,0x70,0x30, - 0x30,0x00,0x30,0x30,0xc3,0xc3,0x7e,0x7e, - 0x24,0x3c,0x18,0x18,0x00,0x0c,0x38,0x30, - 0xc3,0xc3,0x7e,0x7e,0x24,0x3c,0x18,0x18, - 0x00,0x30,0x1c,0x0c,0xc3,0xc3,0x7e,0x7e, - 0x24,0x3c,0x18,0x18,0x00,0x66,0x3c,0x18, - 0xc3,0xc3,0x7e,0x7e,0x24,0x3c,0x18,0x18, - 0x00,0x2c,0x3e,0x1a,0xc3,0xc3,0x7e,0x7e, - 0x24,0x3c,0x18,0x18,0x00,0x6c,0x6c,0xc3, - 0xc3,0x7e,0x7e,0x24,0x3c,0x18,0x18,0x00, - 0x18,0x34,0x18,0xc7,0xe0,0xc7,0xe0,0xfe, - 0x00,0x7e,0x00,0x66,0x00,0x67,0xc0,0x37, - 0xc0,0x36,0x00,0x3e,0x00,0x1f,0xe0,0x1f, - 0xe0,0x60,0x30,0x20,0x78,0xfc,0xcc,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xcc,0xfc,0x78,0xfc, - 0xfc,0xc0,0xf8,0xf8,0xc0,0xfc,0xfc,0x00, - 0x18,0x70,0x60,0xfc,0xfc,0xc0,0xf8,0xf8, - 0xc0,0xfc,0xfc,0x00,0x60,0x38,0x18,0xfc, - 0xfc,0xc0,0xf8,0xf8,0xc0,0xfc,0xfc,0x00, - 0xcc,0x78,0x30,0xfc,0xfc,0xc0,0xf8,0xf8, - 0xc0,0xfc,0xfc,0x00,0xd8,0xd8,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x30, - 0xe0,0xc0,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x00,0xc0,0x70,0x30,0x30,0x30, - 0x30,0x30,0x30,0x30,0x30,0x30,0x00,0xcc, - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0x30,0x00,0xd8,0xd8,0x7c,0x7e,0x67, - 0x63,0x63,0xfb,0xfb,0x63,0x67,0x7e,0x7c, - 0xc6,0xce,0xce,0xde,0xf6,0xe6,0xe6,0xc6, - 0x00,0x58,0x7c,0x34,0x7c,0xfe,0xc6,0xc6, - 0xc6,0xc6,0xfe,0x7c,0x00,0x18,0x70,0x60, - 0x7c,0xfe,0xc6,0xc6,0xc6,0xc6,0xfe,0x7c, - 0x00,0x30,0x1c,0x0c,0x7c,0xfe,0xc6,0xc6, - 0xc6,0xc6,0xfe,0x7c,0x00,0xcc,0x78,0x30, - 0x7c,0xfe,0xc6,0xc6,0xc6,0xc6,0xfe,0x7c, - 0x00,0x58,0x7c,0x34,0x7c,0xfe,0xc6,0xc6, - 0xc6,0xc6,0xfe,0x7c,0x00,0x6c,0x6c,0xcc, - 0x78,0x30,0x30,0x78,0xcc,0xde,0x00,0x7f, - 0x00,0x63,0x00,0x73,0x00,0x7b,0x00,0x6b, - 0x00,0x6f,0x00,0x67,0x00,0x63,0x00,0x7f, - 0x00,0x3d,0x80,0x7c,0xfe,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0x00,0x18,0x70,0x60,0x7c, - 0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00, - 0x30,0x1c,0x0c,0x7c,0xfe,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0x00,0xcc,0x78,0x30,0x7c, - 0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00, - 0x6c,0x6c,0x18,0x18,0x18,0x18,0x3c,0x7e, - 0xe7,0xc3,0x00,0x30,0x1c,0x0c,0xc0,0xc0, - 0xfc,0xfe,0xc6,0xc6,0xc6,0xfe,0xfc,0xc0, - 0xc0,0xd8,0xdc,0xcc,0xcc,0xcc,0xd8,0xd8, - 0xcc,0xcc,0xfc,0x78,0x76,0xfc,0xcc,0xfc, - 0x7c,0x8c,0xfc,0x78,0x00,0x18,0x70,0x60, - 0x76,0xfc,0xcc,0xfc,0x7c,0x8c,0xfc,0x78, - 0x00,0x60,0x38,0x18,0x76,0xfc,0xcc,0xfc, - 0x7c,0x8c,0xfc,0x78,0x00,0xcc,0x78,0x30, - 0x76,0xfc,0xcc,0xfc,0x7c,0x8c,0xfc,0x78, - 0x00,0x58,0x7c,0x34,0x76,0xfc,0xcc,0xfc, - 0x7c,0x8c,0xfc,0x78,0x00,0xd8,0xd8,0x76, - 0xfc,0xcc,0xfc,0x7c,0x8c,0xfc,0x78,0x00, - 0x30,0x68,0x30,0x77,0x80,0xff,0xc0,0xcc, - 0x00,0xff,0xc0,0x7f,0xc0,0x8c,0xc0,0xff, - 0xc0,0x7b,0x80,0x60,0x30,0x20,0x78,0xfc, - 0xcc,0xc0,0xc0,0xcc,0xfc,0x78,0x78,0xfc, - 0xc0,0xfc,0xfc,0xcc,0xfc,0x78,0x00,0x18, - 0x70,0x60,0x78,0xfc,0xc0,0xfc,0xfc,0xcc, - 0xfc,0x78,0x00,0x60,0x38,0x18,0x78,0xfc, - 0xc0,0xfc,0xfc,0xcc,0xfc,0x78,0x00,0xcc, - 0x78,0x30,0x78,0xfc,0xc0,0xfc,0xfc,0xcc, - 0xfc,0x78,0x00,0xd8,0xd8,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x00,0x30,0xe0, - 0xc0,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x00,0xc0,0x70,0x30,0x30,0x30,0x30, - 0x30,0x30,0x30,0x30,0x30,0x00,0xcc,0x78, - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0x00,0xd8,0xd8,0x78,0xfc,0xcc,0xcc, - 0xcc,0xcc,0xfc,0x78,0xb0,0x60,0xd0,0xcc, - 0xcc,0xcc,0xcc,0xcc,0xec,0xfc,0xd8,0x00, - 0xb0,0xf8,0x68,0x78,0xfc,0xcc,0xcc,0xcc, - 0xcc,0xfc,0x78,0x00,0x18,0x70,0x60,0x78, - 0xfc,0xcc,0xcc,0xcc,0xcc,0xfc,0x78,0x00, - 0x60,0x38,0x18,0x78,0xfc,0xcc,0xcc,0xcc, - 0xcc,0xfc,0x78,0x00,0xcc,0x78,0x30,0x78, - 0xfc,0xcc,0xcc,0xcc,0xcc,0xfc,0x78,0x00, - 0xb0,0xf8,0x68,0x78,0xfc,0xcc,0xcc,0xcc, - 0xcc,0xfc,0x78,0x00,0xd8,0xd8,0x30,0x30, - 0x00,0xfc,0xfc,0x00,0x30,0x30,0xc0,0x78, - 0xfc,0xcc,0xec,0xdc,0xcc,0xfc,0x78,0x0c, - 0x6c,0xfc,0xdc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0x00,0x18,0x70,0x60,0x6c,0xfc,0xdc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0x00,0x60,0x38,0x18, - 0x6c,0xfc,0xdc,0xcc,0xcc,0xcc,0xcc,0xcc, - 0x00,0xcc,0x78,0x30,0x6c,0xfc,0xdc,0xcc, - 0xcc,0xcc,0xcc,0xcc,0x00,0xd8,0xd8,0xe0, - 0xf0,0x30,0x30,0x38,0x78,0x78,0x48,0xcc, - 0xcc,0xcc,0x00,0x60,0x38,0x18,0xc0,0xc0, - 0xc0,0xd8,0xfc,0xcc,0xcc,0xcc,0xcc,0xfc, - 0xd8,0xc0,0xc0,0xc0,0xe0,0xf0,0x30,0x30, - 0x38,0x78,0x78,0x48,0xcc,0xcc,0xcc,0x00, - 0xd8,0xd8, -}; - -BMF_FontData BMF_font_helvb12 = { - -1, -3, - 11, 12, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 12, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 1, 0, 0, 3, 0}, - {2, 11, -1, 0, 4, 1}, - {3, 3, 0, -8, 4, 12}, - {9, 11, 1, 0, 7, 15}, - {6, 13, 0, 2, 7, 37}, - {10, 11, 0, 0, 11, 50}, - {9, 11, 0, 0, 9, 72}, - {2, 4, 0, -7, 3, 94}, - {4, 14, 0, 3, 4, 98}, - {4, 14, 1, 3, 4, 112}, - {5, 5, 0, -6, 6, 126}, - {6, 6, 0, -1, 7, 131}, - {2, 4, 0, 2, 3, 137}, - {6, 2, -1, -3, 9, 141}, - {2, 2, 0, 0, 3, 143}, - {5, 13, 1, 2, 4, 145}, - {6, 11, 0, 0, 7, 158}, - {4, 11, 0, 0, 6, 169}, - {6, 11, 0, 0, 7, 180}, - {6, 11, 0, 0, 7, 191}, - {7, 11, 0, 0, 7, 202}, - {6, 11, 0, 0, 7, 213}, - {6, 11, 0, 0, 7, 224}, - {6, 11, 0, 0, 7, 235}, - {6, 11, 0, 0, 7, 246}, - {6, 11, 0, 0, 7, 257}, - {2, 8, -1, 0, 4, 268}, - {2, 10, -1, 2, 4, 276}, - {6, 6, 0, -1, 7, 286}, - {6, 5, 0, -2, 7, 292}, - {6, 6, 0, -1, 7, 297}, - {6, 11, 0, 0, 7, 303}, - {11, 12, 0, 1, 12, 314}, - {8, 11, 0, 0, 8, 338}, - {6, 11, -1, 0, 8, 349}, - {6, 11, -1, 0, 8, 360}, - {7, 11, -1, 0, 9, 371}, - {6, 11, -1, 0, 8, 382}, - {6, 11, -1, 0, 7, 393}, - {7, 11, -1, 0, 9, 404}, - {7, 11, -1, 0, 9, 415}, - {2, 11, -2, 0, 6, 426}, - {5, 11, 0, 0, 6, 437}, - {7, 11, -1, 0, 8, 448}, - {6, 11, -1, 0, 7, 459}, - {9, 11, -1, 0, 11, 470}, - {7, 11, -1, 0, 9, 492}, - {7, 11, -1, 0, 9, 503}, - {7, 11, -1, 0, 9, 514}, - {7, 12, -1, 1, 9, 525}, - {7, 11, -1, 0, 9, 537}, - {6, 11, -1, 0, 8, 548}, - {6, 11, 0, 0, 6, 559}, - {7, 11, -1, 0, 9, 570}, - {8, 11, 0, 0, 8, 581}, - {10, 11, 0, 0, 10, 592}, - {8, 11, 0, 0, 8, 614}, - {8, 11, 0, 0, 8, 625}, - {7, 11, 0, 0, 7, 636}, - {3, 14, 0, 3, 4, 647}, - {4, 11, 0, 0, 5, 661}, - {3, 14, 0, 3, 4, 672}, - {5, 5, 0, -6, 7, 686}, - {7, 1, 0, 2, 7, 691}, - {2, 4, 0, -7, 3, 692}, - {7, 8, 0, 0, 7, 696}, - {6, 11, 0, 0, 7, 704}, - {6, 8, 0, 0, 7, 715}, - {6, 11, 0, 0, 7, 723}, - {6, 8, 0, 0, 7, 734}, - {4, 11, 0, 0, 5, 742}, - {6, 11, 0, 3, 7, 753}, - {6, 11, 0, 0, 7, 764}, - {2, 11, -1, 0, 5, 775}, - {3, 14, 0, 3, 5, 786}, - {6, 11, 0, 0, 6, 800}, - {2, 11, -1, 0, 5, 811}, - {10, 8, 0, 0, 11, 822}, - {6, 8, 0, 0, 7, 838}, - {6, 8, 0, 0, 7, 846}, - {6, 11, 0, 3, 7, 854}, - {6, 11, 0, 3, 7, 865}, - {4, 8, 0, 0, 4, 876}, - {6, 8, 0, 0, 7, 884}, - {4, 10, 0, 0, 5, 892}, - {6, 8, 0, 0, 7, 902}, - {6, 8, 0, 0, 7, 910}, - {8, 8, 0, 0, 9, 918}, - {6, 8, 0, 0, 7, 926}, - {6, 11, 0, 3, 7, 934}, - {6, 8, 0, 0, 7, 945}, - {4, 14, 0, 3, 4, 953}, - {1, 13, -1, 2, 3, 967}, - {4, 14, 0, 3, 4, 980}, - {6, 3, 0, -3, 7, 994}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {2, 11, 0, 3, 3, 997}, - {6, 10, 0, 1, 7, 1008}, - {7, 11, 0, 0, 7, 1018}, - {6, 6, 0, -3, 7, 1029}, - {8, 11, 1, 0, 7, 1035}, - {1, 13, -1, 2, 3, 1046}, - {6, 14, 0, 3, 7, 1059}, - {5, 2, 0, -9, 5, 1073}, - {11, 11, 0, 0, 12, 1075}, - {4, 7, 0, -4, 5, 1097}, - {7, 5, 0, -2, 8, 1104}, - {6, 4, -1, -3, 9, 1109}, - {3, 2, 0, -3, 4, 1113}, - {11, 11, 0, 0, 12, 1115}, - {4, 2, 0, -9, 4, 1137}, - {4, 4, -1, -7, 6, 1139}, - {6, 9, 0, -1, 7, 1143}, - {4, 6, 0, -5, 4, 1152}, - {4, 6, 0, -5, 4, 1158}, - {4, 3, -1, -9, 4, 1164}, - {6, 11, 0, 3, 7, 1167}, - {7, 14, -1, 3, 10, 1178}, - {2, 2, 0, -5, 3, 1192}, - {3, 3, -1, 3, 5, 1194}, - {2, 6, 0, -5, 4, 1197}, - {5, 7, 0, -4, 6, 1203}, - {7, 5, 0, -2, 8, 1210}, - {10, 11, 0, 0, 11, 1215}, - {10, 11, 0, 0, 11, 1237}, - {10, 11, 0, 0, 11, 1259}, - {6, 11, 0, 3, 7, 1281}, - {8, 12, 0, 0, 8, 1292}, - {8, 12, 0, 0, 8, 1304}, - {8, 12, 0, 0, 8, 1316}, - {8, 12, 0, 0, 8, 1328}, - {8, 11, 0, 0, 8, 1340}, - {8, 12, 0, 0, 8, 1351}, - {11, 11, 0, 0, 12, 1363}, - {6, 14, -1, 3, 8, 1385}, - {6, 12, -1, 0, 8, 1399}, - {6, 12, -1, 0, 8, 1411}, - {6, 12, -1, 0, 8, 1423}, - {6, 11, -1, 0, 8, 1435}, - {4, 12, -1, 0, 6, 1446}, - {4, 12, -1, 0, 6, 1458}, - {6, 12, 0, 0, 6, 1470}, - {5, 11, 0, 0, 6, 1482}, - {8, 11, 0, 0, 9, 1493}, - {7, 12, -1, 0, 9, 1504}, - {7, 12, -1, 0, 9, 1516}, - {7, 12, -1, 0, 9, 1528}, - {7, 12, -1, 0, 9, 1540}, - {7, 12, -1, 0, 9, 1552}, - {7, 11, -1, 0, 9, 1564}, - {6, 6, 0, -1, 7, 1575}, - {9, 11, 0, 0, 9, 1581}, - {7, 12, -1, 0, 9, 1603}, - {7, 12, -1, 0, 9, 1615}, - {7, 12, -1, 0, 9, 1627}, - {7, 11, -1, 0, 9, 1639}, - {8, 12, 0, 0, 8, 1650}, - {7, 11, -1, 0, 9, 1662}, - {6, 11, 0, 0, 7, 1673}, - {7, 12, 0, 0, 7, 1684}, - {7, 12, 0, 0, 7, 1696}, - {7, 12, 0, 0, 7, 1708}, - {7, 12, 0, 0, 7, 1720}, - {7, 11, 0, 0, 7, 1732}, - {7, 12, 0, 0, 7, 1743}, - {10, 8, 0, 0, 11, 1755}, - {6, 11, 0, 3, 7, 1771}, - {6, 12, 0, 0, 7, 1782}, - {6, 12, 0, 0, 7, 1794}, - {6, 12, 0, 0, 7, 1806}, - {6, 11, 0, 0, 7, 1818}, - {4, 12, 0, 0, 5, 1829}, - {4, 12, 0, 0, 5, 1841}, - {6, 12, 1, 0, 5, 1853}, - {5, 11, 1, 0, 5, 1865}, - {6, 11, 0, 0, 7, 1876}, - {6, 12, 0, 0, 7, 1887}, - {6, 12, 0, 0, 7, 1899}, - {6, 12, 0, 0, 7, 1911}, - {6, 12, 0, 0, 7, 1923}, - {6, 12, 0, 0, 7, 1935}, - {6, 11, 0, 0, 7, 1947}, - {6, 8, 0, 0, 7, 1958}, - {6, 10, 0, 1, 7, 1966}, - {6, 12, 0, 0, 7, 1976}, - {6, 12, 0, 0, 7, 1988}, - {6, 12, 0, 0, 7, 2000}, - {6, 11, 0, 0, 7, 2012}, - {6, 15, 0, 3, 7, 2023}, - {6, 14, 0, 3, 7, 2038}, - {6, 14, 0, 3, 7, 2052}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_helvb14.cpp b/intern/bmfont/intern/BMF_font_helvb14.cpp deleted file mode 100644 index c6d3e0ec701..00000000000 --- a/intern/bmfont/intern/BMF_font_helvb14.cpp +++ /dev/null @@ -1,623 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_HELVB14 - -static unsigned char bitmap_data[]= { - 0x00,0xc0,0xc0,0x00,0x00,0x80,0x80,0x80, - 0xc0,0xc0,0xc0,0xc0,0xc0,0x90,0xd8,0xd8, - 0xd8,0x48,0x48,0x48,0xfe,0xfe,0x24,0x24, - 0x7f,0x7f,0x12,0x12,0x12,0x10,0x10,0x38, - 0x7c,0xd6,0xd6,0x16,0x3c,0x78,0xd0,0xd6, - 0xd6,0x7c,0x38,0x10,0x30,0xc0,0x11,0xe0, - 0x19,0x20,0x09,0x20,0x0d,0xe0,0x64,0xc0, - 0xf6,0x00,0x92,0x00,0x93,0x00,0xf1,0x00, - 0x61,0x80,0x71,0x80,0xff,0x00,0xce,0x00, - 0xc6,0x00,0xcf,0x00,0x79,0x00,0x30,0x00, - 0x38,0x00,0x6c,0x00,0x6c,0x00,0x7c,0x00, - 0x38,0x00,0x80,0x40,0xc0,0xc0,0x30,0x20, - 0x60,0x40,0x40,0xc0,0xc0,0xc0,0xc0,0xc0, - 0x40,0x40,0x60,0x20,0x30,0xc0,0x40,0x60, - 0x20,0x20,0x30,0x30,0x30,0x30,0x30,0x20, - 0x20,0x60,0x40,0xc0,0xd8,0x50,0x20,0xf8, - 0x20,0x20,0x30,0x30,0x30,0xfc,0xfc,0x30, - 0x30,0x30,0x80,0x40,0x40,0xc0,0xc0,0xfe, - 0xfe,0xc0,0xc0,0x80,0x80,0xc0,0x40,0x40, - 0x60,0x20,0x20,0x30,0x10,0x10,0x30,0x78, - 0x48,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x48, - 0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0x30,0x30,0xf0,0x30,0x10,0xfc,0xfc, - 0x60,0x60,0x30,0x18,0x18,0x0c,0xcc,0xcc, - 0x78,0x30,0x30,0x78,0xcc,0xcc,0x0c,0x38, - 0x38,0x0c,0xcc,0xcc,0x78,0x30,0x18,0x18, - 0xfc,0xfc,0x98,0x58,0x58,0x38,0x38,0x38, - 0x18,0x18,0x70,0xf8,0xcc,0x0c,0x0c,0xcc, - 0xfc,0xd8,0x60,0x60,0x7c,0x7c,0x30,0x78, - 0xcc,0xcc,0xcc,0xcc,0xfc,0xd8,0xc0,0x4c, - 0x7c,0x38,0x60,0x60,0x60,0x20,0x30,0x30, - 0x10,0x18,0x08,0x0c,0xfc,0xfc,0x70,0xf8, - 0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc, - 0x7c,0x38,0x70,0xf8,0xc8,0x0c,0x6c,0xfc, - 0xcc,0xcc,0xcc,0xcc,0x78,0x30,0xc0,0xc0, - 0x00,0x00,0x00,0x00,0xc0,0xc0,0x80,0x40, - 0x40,0xc0,0xc0,0x00,0x00,0x00,0x00,0xc0, - 0xc0,0x02,0x0e,0x3c,0xf0,0xf0,0x3c,0x0e, - 0x02,0xfc,0xfc,0x00,0x00,0xfc,0xfc,0x80, - 0xe0,0x78,0x1e,0x1e,0x78,0xe0,0x80,0x30, - 0x30,0x00,0x30,0x30,0x18,0x18,0x0c,0xcc, - 0xcc,0x7c,0x38,0x0f,0x80,0x38,0x60,0x60, - 0x00,0x4d,0xc0,0xd3,0x20,0x93,0x30,0x91, - 0x10,0x91,0x90,0xc9,0x90,0x46,0x90,0x60, - 0x30,0x30,0x20,0x1c,0xc0,0x07,0x80,0xe1, - 0xc0,0x61,0x80,0x7f,0x80,0x7f,0x80,0x33, - 0x00,0x33,0x00,0x33,0x00,0x1e,0x00,0x1e, - 0x00,0x1e,0x00,0x0c,0x00,0x0c,0x00,0xfc, - 0xfe,0xc7,0xc3,0xc7,0xfe,0xfc,0xc6,0xc3, - 0xc7,0xfe,0xfc,0x3c,0x7e,0x63,0xc3,0xc0, - 0xc0,0xc0,0xc0,0xc3,0x63,0x7e,0x3c,0xfc, - 0xfe,0xc6,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, - 0xc6,0xfe,0xfc,0xfe,0xfe,0xc0,0xc0,0xc0, - 0xfe,0xfe,0xc0,0xc0,0xc0,0xfe,0xfe,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xfc,0xfc,0xc0,0xc0, - 0xc0,0xfe,0xfe,0x3e,0x80,0x7f,0x80,0x63, - 0x80,0xc1,0x80,0xc7,0x80,0xc7,0x80,0xc0, - 0x00,0xc0,0x00,0xc1,0x80,0x63,0x80,0x7f, - 0x00,0x3e,0x00,0xc3,0xc3,0xc3,0xc3,0xc3, - 0xff,0xff,0xc3,0xc3,0xc3,0xc3,0xc3,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0x78,0xfc,0xcc,0xcc,0xcc, - 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0xc3, - 0x80,0xc7,0x00,0xc6,0x00,0xcc,0x00,0xdc, - 0x00,0xf8,0x00,0xf0,0x00,0xd8,0x00,0xcc, - 0x00,0xce,0x00,0xc7,0x00,0xc3,0x00,0xfe, - 0xfe,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xcc,0xc0,0xcc,0xc0,0xcc, - 0xc0,0xde,0xc0,0xde,0xc0,0xd2,0xc0,0xd2, - 0xc0,0xf3,0xc0,0xf3,0xc0,0xe1,0xc0,0xe1, - 0xc0,0xe1,0xc0,0xc3,0xc7,0xc7,0xcf,0xcf, - 0xdb,0xdb,0xf3,0xf3,0xe3,0xe3,0xc3,0x3e, - 0x00,0x7f,0x00,0x63,0x00,0xc1,0x80,0xc1, - 0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1, - 0x80,0x63,0x00,0x7f,0x00,0x3e,0x00,0xc0, - 0xc0,0xc0,0xc0,0xf8,0xfc,0xce,0xc6,0xc6, - 0xce,0xfc,0xf8,0x01,0x80,0x3d,0x80,0x7f, - 0x00,0x67,0x00,0xcd,0x80,0xcd,0x80,0xc1, - 0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63, - 0x00,0x7f,0x00,0x3e,0x00,0xc3,0xc3,0xc3, - 0xc3,0xc7,0xfe,0xfe,0xc7,0xc3,0xc7,0xfe, - 0xfc,0x3c,0x7e,0xe7,0xc3,0x07,0x1e,0x78, - 0xe0,0xc3,0xe7,0x7e,0x3c,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff, - 0xff,0x3c,0x7e,0xe7,0xc3,0xc3,0xc3,0xc3, - 0xc3,0xc3,0xc3,0xc3,0xc3,0x18,0x18,0x18, - 0x3c,0x3c,0x24,0x66,0x66,0x66,0xc3,0xc3, - 0xc3,0x30,0xc0,0x30,0xc0,0x30,0xc0,0x39, - 0xc0,0x79,0xe0,0x69,0x60,0x6f,0x60,0x6f, - 0x60,0xc6,0x30,0xc6,0x30,0xc6,0x30,0xc6, - 0x30,0xe3,0x80,0x63,0x00,0x63,0x00,0x36, - 0x00,0x36,0x00,0x1c,0x00,0x1c,0x00,0x36, - 0x00,0x36,0x00,0x63,0x00,0x63,0x00,0xe3, - 0x80,0x0c,0x00,0x0c,0x00,0x0c,0x00,0x0c, - 0x00,0x0c,0x00,0x1e,0x00,0x1e,0x00,0x33, - 0x00,0x33,0x00,0x61,0x80,0x61,0x80,0xe1, - 0xc0,0xff,0xff,0x60,0x70,0x30,0x18,0x18, - 0x0c,0x0e,0x06,0xff,0xff,0xe0,0xe0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xe0,0xe0,0x10,0x10,0x30,0x20, - 0x20,0x60,0x40,0x40,0xc0,0x80,0x80,0xe0, - 0xe0,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0xe0,0xe0,0xcc,0xcc, - 0x48,0x78,0x78,0x30,0x30,0xfe,0xc0,0xc0, - 0x80,0x40,0x6c,0xfc,0xcc,0xcc,0x7c,0x1c, - 0xcc,0xfc,0x78,0xd8,0xfc,0xee,0xc6,0xc6, - 0xc6,0xee,0xfc,0xd8,0xc0,0xc0,0xc0,0x38, - 0x7c,0xec,0xc0,0xc0,0xc0,0xec,0x7c,0x38, - 0x36,0x7e,0xee,0xc6,0xc6,0xc6,0xee,0x7e, - 0x36,0x06,0x06,0x06,0x38,0x7c,0xcc,0xc0, - 0xfc,0xcc,0xcc,0x78,0x30,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0xf0,0xf0,0x60,0x70, - 0x30,0x78,0xfc,0xc6,0x36,0x7e,0xee,0xc6, - 0xc6,0xc6,0xee,0x7e,0x36,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0xe6,0xfe,0xdc,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0x00,0xc0,0xc0,0xc0,0xe0,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x00,0x60,0x60,0xce,0xcc,0xd8,0xd8, - 0xf0,0xf0,0xd8,0xd8,0xcc,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xcc,0xc0,0xcc,0xc0, - 0xcc,0xc0,0xcc,0xc0,0xcc,0xc0,0xcc,0xc0, - 0xcc,0xc0,0xff,0xc0,0xdb,0x80,0xc6,0xc6, - 0xc6,0xc6,0xc6,0xc6,0xe6,0xfe,0xdc,0x38, - 0x7c,0xee,0xc6,0xc6,0xc6,0xee,0x7c,0x38, - 0xc0,0xc0,0xc0,0xd8,0xfc,0xee,0xc6,0xc6, - 0xc6,0xee,0xfc,0xd8,0x06,0x06,0x06,0x36, - 0x7e,0xee,0xc6,0xc6,0xc6,0xee,0x7e,0x36, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xe0,0xf8, - 0xd0,0x78,0xfc,0xcc,0x1c,0x78,0xe0,0xcc, - 0xfc,0x78,0x30,0x70,0x60,0x60,0x60,0x60, - 0x60,0xf0,0xf0,0x60,0x60,0x76,0xfe,0xce, - 0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x30,0x30, - 0x30,0x78,0x78,0x48,0xcc,0xcc,0xcc,0x33, - 0x00,0x33,0x00,0x33,0x00,0x73,0x80,0x7f, - 0x80,0x4c,0x80,0x4c,0x80,0xcc,0xc0,0xcc, - 0xc0,0xc6,0xee,0x6c,0x38,0x38,0x38,0x6c, - 0xee,0xc6,0x60,0x70,0x10,0x18,0x38,0x38, - 0x2c,0x6c,0x6c,0xc6,0xc6,0xc6,0xfc,0xfc, - 0x60,0x60,0x30,0x18,0x18,0xfc,0xfc,0x30, - 0x70,0x60,0x60,0x60,0x60,0x60,0xc0,0x60, - 0x60,0x60,0x60,0x60,0x70,0x30,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0xc0,0xe0,0x60, - 0x60,0x60,0x60,0x60,0x30,0x60,0x60,0x60, - 0x60,0x60,0xe0,0xc0,0x98,0xfc,0x64,0xc0, - 0xc0,0xc0,0xc0,0xc0,0x80,0x80,0x80,0x00, - 0x00,0xc0,0xc0,0x20,0x20,0x38,0x7c,0xec, - 0xe0,0xd0,0xd0,0xdc,0x7c,0x38,0x08,0x08, - 0xcc,0xfe,0x70,0x30,0x30,0xf8,0x60,0xc0, - 0xcc,0xcc,0x7c,0x38,0xcc,0x78,0xcc,0xcc, - 0xcc,0xcc,0x78,0xcc,0x18,0x18,0x18,0x7e, - 0x18,0x7e,0x18,0x3c,0x24,0x66,0x42,0xc3, - 0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00, - 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x38, - 0x7c,0x6c,0x0c,0x18,0x7c,0xe6,0xc6,0xce, - 0x7c,0x30,0x60,0x6c,0x7c,0x38,0xd8,0xd8, - 0x1e,0x00,0x33,0x00,0x40,0x80,0xde,0xc0, - 0xb3,0x40,0xa0,0x40,0xa0,0x40,0xb3,0x40, - 0xde,0xc0,0x40,0x80,0x33,0x00,0x1e,0x00, - 0xf0,0x00,0xd0,0xb0,0x70,0xb0,0x60,0x24, - 0x6c,0xd8,0xd8,0x6c,0x24,0x06,0x06,0x06, - 0xfe,0xfe,0xe0,0xe0,0x1e,0x00,0x33,0x00, - 0x40,0x80,0xd2,0xc0,0x96,0x40,0x9c,0x40, - 0x92,0x40,0x92,0x40,0xdc,0xc0,0x40,0x80, - 0x33,0x00,0x1e,0x00,0xf0,0x60,0x90,0x90, - 0x90,0x60,0xfc,0xfc,0x00,0x30,0x30,0x30, - 0xfc,0xfc,0x30,0x30,0x30,0xf0,0x80,0x40, - 0x20,0x90,0xb0,0x60,0x60,0xb0,0x10,0x60, - 0x30,0x90,0x60,0xc0,0x60,0xc0,0xc0,0xc0, - 0xf6,0xfe,0xce,0xc6,0xc6,0xc6,0xc6,0xc6, - 0xc6,0x14,0x14,0x14,0x14,0x14,0x14,0x14, - 0x14,0x74,0xf4,0xf4,0xf4,0xf4,0x74,0x3e, - 0xc0,0xc0,0xc0,0x60,0x40,0x20,0x20,0x20, - 0x20,0x20,0xe0,0x20,0xf0,0x00,0x60,0x90, - 0x90,0x90,0x60,0x90,0xd8,0x6c,0x6c,0xd8, - 0x90,0x20,0x40,0x10,0x40,0x13,0xe0,0x0a, - 0x40,0x09,0x40,0x24,0xc0,0x24,0x40,0x22, - 0x00,0x22,0x00,0x21,0x00,0xe1,0x00,0x20, - 0x80,0x21,0xe0,0x11,0x00,0x10,0x80,0x08, - 0x40,0x09,0x20,0x25,0x60,0x24,0xc0,0x22, - 0x00,0x22,0x00,0x21,0x00,0xe1,0x00,0x20, - 0x80,0x20,0x40,0x10,0x40,0x13,0xe0,0x0a, - 0x40,0x09,0x40,0x64,0xc0,0xb4,0x40,0x12, - 0x00,0x62,0x00,0x31,0x00,0x91,0x00,0x60, - 0x80,0x70,0xf8,0xcc,0xcc,0xc0,0x60,0x60, - 0x30,0x30,0x00,0x30,0x30,0xe1,0xc0,0x61, - 0x80,0x7f,0x80,0x3f,0x00,0x33,0x00,0x33, - 0x00,0x12,0x00,0x1e,0x00,0x1e,0x00,0x0c, - 0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x18, - 0x00,0xe1,0xc0,0x61,0x80,0x7f,0x80,0x3f, - 0x00,0x33,0x00,0x33,0x00,0x12,0x00,0x1e, - 0x00,0x1e,0x00,0x0c,0x00,0x0c,0x00,0x00, - 0x00,0x0c,0x00,0x06,0x00,0xe1,0xc0,0x61, - 0x80,0x7f,0x80,0x3f,0x00,0x33,0x00,0x33, - 0x00,0x12,0x00,0x1e,0x00,0x1e,0x00,0x0c, - 0x00,0x0c,0x00,0x00,0x00,0x36,0x00,0x1c, - 0x00,0xe1,0xc0,0x61,0x80,0x7f,0x80,0x3f, - 0x00,0x33,0x00,0x33,0x00,0x12,0x00,0x1e, - 0x00,0x1e,0x00,0x0c,0x00,0x0c,0x00,0x00, - 0x00,0x16,0x00,0x0d,0x00,0xe1,0xc0,0x61, - 0x80,0x7f,0x80,0x3f,0x00,0x33,0x00,0x33, - 0x00,0x12,0x00,0x1e,0x00,0x1e,0x00,0x0c, - 0x00,0x0c,0x00,0x00,0x00,0x36,0x00,0x36, - 0x00,0xe1,0xc0,0x61,0x80,0x7f,0x80,0x3f, - 0x00,0x33,0x00,0x33,0x00,0x12,0x00,0x1e, - 0x00,0x1e,0x00,0x0c,0x00,0x0c,0x00,0x0c, - 0x00,0x0a,0x00,0x06,0x00,0xe3,0xf8,0x63, - 0xf8,0x7f,0x00,0x7f,0x00,0x33,0x00,0x33, - 0xf8,0x3b,0xf8,0x1b,0x00,0x1b,0x00,0x1f, - 0x00,0x0f,0xf8,0x0f,0xf8,0x18,0x0c,0x08, - 0x3c,0x7e,0x63,0xc3,0xc0,0xc0,0xc0,0xc0, - 0xc3,0x63,0x7e,0x3c,0xfe,0xfe,0xc0,0xc0, - 0xc0,0xfe,0xfe,0xc0,0xc0,0xfe,0xfe,0x00, - 0x18,0x30,0xfe,0xfe,0xc0,0xc0,0xc0,0xfe, - 0xfe,0xc0,0xc0,0xfe,0xfe,0x00,0x18,0x0c, - 0xfe,0xfe,0xc0,0xc0,0xc0,0xfe,0xfe,0xc0, - 0xc0,0xfe,0xfe,0x00,0x6c,0x38,0xfe,0xfe, - 0xc0,0xc0,0xc0,0xfe,0xfe,0xc0,0xc0,0xfe, - 0xfe,0x00,0x6c,0x6c,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00, - 0x60,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0xc0,0x60, - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0x30,0x30,0x00,0xd8,0x70,0x30,0x30, - 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0x00,0xd8,0xd8,0x7e,0x00,0x7f,0x00, - 0x63,0x00,0x61,0x80,0x61,0x80,0xf9,0x80, - 0xf9,0x80,0x61,0x80,0x61,0x80,0x63,0x00, - 0x7f,0x00,0x7e,0x00,0xc3,0xc7,0xc7,0xcf, - 0xcb,0xdb,0xd3,0xf3,0xe3,0xe3,0xc3,0x00, - 0x2c,0x1a,0x3e,0x00,0x7f,0x00,0x63,0x00, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, - 0xc1,0x80,0x63,0x00,0x7f,0x00,0x3e,0x00, - 0x00,0x00,0x0c,0x00,0x18,0x00,0x3e,0x00, - 0x7f,0x00,0x63,0x00,0xc1,0x80,0xc1,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x00, - 0x7f,0x00,0x3e,0x00,0x00,0x00,0x18,0x00, - 0x0c,0x00,0x3e,0x00,0x7f,0x00,0x63,0x00, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, - 0xc1,0x80,0x63,0x00,0x7f,0x00,0x3e,0x00, - 0x00,0x00,0x36,0x00,0x1c,0x00,0x3e,0x00, - 0x7f,0x00,0x63,0x00,0xc1,0x80,0xc1,0x80, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0x63,0x00, - 0x7f,0x00,0x3e,0x00,0x00,0x00,0x2c,0x00, - 0x1a,0x00,0x3e,0x00,0x7f,0x00,0x63,0x00, - 0xc1,0x80,0xc1,0x80,0xc1,0x80,0xc1,0x80, - 0xc1,0x80,0x63,0x00,0x7f,0x00,0x3e,0x00, - 0x00,0x00,0x36,0x00,0x36,0x00,0x84,0xcc, - 0x78,0x30,0x30,0x78,0xcc,0x84,0xbe,0x00, - 0xff,0x00,0x63,0x00,0xf1,0x80,0xd1,0x80, - 0xc9,0x80,0xc9,0x80,0xc5,0x80,0xc7,0x80, - 0x63,0x00,0x7f,0x80,0x3e,0x80,0x3c,0x7e, - 0xe7,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3, - 0xc3,0x00,0x18,0x30,0x3c,0x7e,0xe7,0xc3, - 0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x00, - 0x18,0x0c,0x3c,0x7e,0xe7,0xc3,0xc3,0xc3, - 0xc3,0xc3,0xc3,0xc3,0xc3,0x00,0x6c,0x38, - 0x3c,0x7e,0xe7,0xc3,0xc3,0xc3,0xc3,0xc3, - 0xc3,0xc3,0xc3,0x00,0x6c,0x6c,0x0c,0x00, - 0x0c,0x00,0x0c,0x00,0x0c,0x00,0x0c,0x00, - 0x1e,0x00,0x1e,0x00,0x33,0x00,0x33,0x00, - 0x61,0x80,0xe1,0xc0,0x00,0x00,0x0c,0x00, - 0x06,0x00,0xc0,0xc0,0xf8,0xfc,0xce,0xc6, - 0xc6,0xce,0xfc,0xf8,0xc0,0xc0,0xd8,0xdc, - 0xc6,0xc6,0xc6,0xdc,0xd8,0xcc,0xcc,0xcc, - 0x7c,0x38,0x6c,0xfc,0xcc,0xcc,0x7c,0x1c, - 0xcc,0xfc,0x78,0x00,0x30,0x60,0x6c,0xfc, - 0xcc,0xcc,0x7c,0x1c,0xcc,0xfc,0x78,0x00, - 0x30,0x18,0x6c,0xfc,0xcc,0xcc,0x7c,0x1c, - 0xcc,0xfc,0x78,0x00,0xd8,0x70,0x6c,0xfc, - 0xcc,0xcc,0x7c,0x1c,0xcc,0xfc,0x78,0x00, - 0x58,0x34,0x6c,0xfc,0xcc,0xcc,0x7c,0x1c, - 0xcc,0xfc,0x78,0x00,0xd8,0xd8,0x6c,0xfc, - 0xcc,0xcc,0x7c,0x1c,0xcc,0xfc,0x78,0x00, - 0x30,0x28,0x18,0x73,0x80,0xff,0xc0,0xcc, - 0xc0,0xcc,0x00,0x7f,0xc0,0x1c,0xc0,0xcc, - 0xc0,0xff,0xc0,0x73,0x80,0x30,0x18,0x10, - 0x38,0x7c,0xec,0xc0,0xc0,0xc0,0xec,0x7c, - 0x38,0x38,0x7c,0xcc,0xc0,0xfc,0xcc,0xcc, - 0x78,0x30,0x00,0x30,0x60,0x38,0x7c,0xcc, - 0xc0,0xfc,0xcc,0xcc,0x78,0x30,0x00,0x30, - 0x18,0x38,0x7c,0xcc,0xc0,0xfc,0xcc,0xcc, - 0x78,0x30,0x00,0x6c,0x38,0x38,0x7c,0xcc, - 0xc0,0xfc,0xcc,0xcc,0x78,0x30,0x00,0xd8, - 0xd8,0x60,0x60,0x60,0x60,0x60,0x60,0x60, - 0x60,0x60,0x00,0x60,0xc0,0xc0,0xc0,0xc0, - 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0xc0, - 0x60,0x30,0x30,0x30,0x30,0x30,0x30,0x30, - 0x30,0x30,0x00,0xd8,0x70,0x30,0x30,0x30, - 0x30,0x30,0x30,0x30,0x30,0x30,0x00,0xd8, - 0xd8,0x38,0x7c,0xee,0xc6,0xc6,0xc6,0xee, - 0x7c,0x3c,0xf8,0x38,0x6c,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0xe6,0xfe,0xdc,0x00,0x58, - 0x34,0x38,0x7c,0xee,0xc6,0xc6,0xc6,0xee, - 0x7c,0x38,0x00,0x18,0x30,0x38,0x7c,0xee, - 0xc6,0xc6,0xc6,0xee,0x7c,0x38,0x00,0x30, - 0x18,0x38,0x7c,0xee,0xc6,0xc6,0xc6,0xee, - 0x7c,0x38,0x00,0x6c,0x38,0x38,0x7c,0xee, - 0xc6,0xc6,0xc6,0xee,0x7c,0x38,0x00,0x58, - 0x34,0x38,0x7c,0xee,0xc6,0xc6,0xc6,0xee, - 0x7c,0x38,0x00,0x6c,0x6c,0x30,0x30,0x00, - 0xfc,0xfc,0x00,0x30,0x30,0xb8,0x7c,0xee, - 0xe6,0xd6,0xce,0xee,0x7c,0x3a,0x76,0xfe, - 0xce,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00, - 0x18,0x30,0x76,0xfe,0xce,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0x00,0x30,0x18,0x76,0xfe, - 0xce,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00, - 0x6c,0x38,0x76,0xfe,0xce,0xc6,0xc6,0xc6, - 0xc6,0xc6,0xc6,0x00,0x6c,0x6c,0x60,0x70, - 0x10,0x18,0x38,0x38,0x2c,0x6c,0x6c,0xc6, - 0xc6,0xc6,0x00,0x30,0x18,0xc0,0xc0,0xc0, - 0xd8,0xfc,0xee,0xc6,0xc6,0xc6,0xee,0xfc, - 0xd8,0xc0,0xc0,0xc0,0x60,0x70,0x10,0x18, - 0x38,0x38,0x2c,0x6c,0x6c,0xc6,0xc6,0xc6, - 0x00,0x6c,0x6c, -}; - -BMF_FontData BMF_font_helvb14 = { - -2, -3, - 12, 14, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 12, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 1, 0, 0, 3, 0}, - {2, 12, -1, 0, 4, 1}, - {5, 4, 0, -8, 6, 13}, - {8, 12, 1, 0, 7, 17}, - {7, 15, 0, 2, 7, 29}, - {11, 11, 0, 0, 12, 44}, - {9, 12, 0, 0, 9, 66}, - {2, 4, -1, -8, 4, 90}, - {4, 15, 0, 3, 4, 94}, - {4, 15, 1, 3, 4, 109}, - {5, 6, 0, -6, 5, 124}, - {6, 8, -1, 0, 8, 130}, - {2, 5, 0, 3, 3, 138}, - {7, 2, 0, -3, 8, 143}, - {2, 2, 0, 0, 3, 145}, - {4, 11, 0, 0, 4, 147}, - {6, 12, 0, 0, 7, 158}, - {4, 12, 0, 0, 7, 170}, - {6, 12, 0, 0, 7, 182}, - {6, 12, 0, 0, 7, 194}, - {6, 12, 0, 0, 7, 206}, - {6, 12, 0, 0, 7, 218}, - {6, 12, 0, 0, 7, 230}, - {6, 12, 0, 0, 7, 242}, - {6, 12, 0, 0, 7, 254}, - {6, 12, 0, 0, 7, 266}, - {2, 8, -1, 0, 4, 278}, - {2, 11, -1, 3, 4, 286}, - {7, 8, 0, 0, 8, 297}, - {6, 6, -1, -1, 8, 305}, - {7, 8, 0, 0, 8, 311}, - {6, 12, -1, 0, 8, 319}, - {12, 14, 0, 2, 13, 331}, - {10, 12, 1, 0, 9, 359}, - {8, 12, 0, 0, 9, 383}, - {8, 12, 0, 0, 9, 395}, - {8, 12, 0, 0, 9, 407}, - {7, 12, 0, 0, 8, 419}, - {7, 12, -1, 0, 8, 431}, - {9, 12, 0, 0, 10, 443}, - {8, 12, 0, 0, 9, 467}, - {2, 12, -1, 0, 5, 479}, - {6, 12, 0, 0, 7, 491}, - {9, 12, -1, 0, 10, 503}, - {7, 12, -1, 0, 8, 527}, - {10, 12, 0, 0, 11, 539}, - {8, 12, 0, 0, 9, 563}, - {9, 12, 0, 0, 10, 575}, - {7, 12, -1, 0, 9, 599}, - {9, 13, 0, 1, 10, 611}, - {8, 12, 0, 0, 9, 637}, - {8, 12, 0, 0, 9, 649}, - {8, 12, 0, 0, 9, 661}, - {8, 12, 0, 0, 9, 673}, - {8, 12, 0, 0, 9, 685}, - {12, 12, 0, 0, 13, 697}, - {9, 12, 0, 0, 10, 721}, - {10, 12, 1, 0, 9, 745}, - {8, 12, 0, 0, 9, 769}, - {3, 15, 0, 3, 4, 781}, - {4, 11, 0, 0, 4, 796}, - {3, 15, 0, 3, 4, 807}, - {6, 7, -1, -4, 8, 822}, - {7, 1, 0, 3, 7, 829}, - {2, 4, -1, -8, 4, 830}, - {6, 9, 0, 0, 7, 834}, - {7, 12, 0, 0, 8, 843}, - {6, 9, 0, 0, 7, 855}, - {7, 12, 0, 0, 8, 864}, - {6, 9, 0, 0, 7, 876}, - {4, 12, 0, 0, 5, 885}, - {7, 12, 0, 3, 8, 897}, - {7, 12, 0, 0, 8, 909}, - {2, 12, 0, 0, 3, 921}, - {3, 15, 1, 3, 3, 933}, - {7, 12, 0, 0, 7, 948}, - {2, 12, 0, 0, 3, 960}, - {10, 9, 0, 0, 11, 972}, - {7, 9, 0, 0, 8, 990}, - {7, 9, 0, 0, 8, 999}, - {7, 12, 0, 3, 8, 1008}, - {7, 12, 0, 3, 8, 1020}, - {5, 9, 0, 0, 5, 1032}, - {6, 9, 0, 0, 7, 1041}, - {4, 11, 0, 0, 5, 1050}, - {7, 9, 0, 0, 8, 1061}, - {6, 9, 0, 0, 7, 1070}, - {10, 9, 0, 0, 11, 1079}, - {7, 9, 0, 0, 8, 1097}, - {7, 12, 0, 3, 8, 1106}, - {6, 9, 0, 0, 7, 1118}, - {4, 15, 0, 3, 5, 1127}, - {1, 15, -1, 3, 4, 1142}, - {4, 15, 0, 3, 5, 1157}, - {6, 3, -1, -3, 8, 1172}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {2, 12, -1, 3, 4, 1175}, - {6, 13, 0, 2, 7, 1187}, - {7, 12, 0, 0, 7, 1200}, - {6, 8, 0, -2, 7, 1212}, - {8, 12, 1, 0, 7, 1220}, - {1, 15, -1, 3, 4, 1232}, - {7, 15, 0, 3, 7, 1247}, - {5, 2, 1, -10, 4, 1262}, - {10, 12, 0, 0, 10, 1264}, - {4, 7, 0, -5, 5, 1288}, - {6, 6, 0, -1, 7, 1295}, - {7, 5, 0, -2, 8, 1301}, - {3, 2, 0, -3, 4, 1306}, - {10, 12, 0, 0, 10, 1308}, - {4, 1, 0, -11, 4, 1332}, - {4, 5, 0, -7, 5, 1333}, - {6, 11, -1, 0, 8, 1338}, - {4, 7, 0, -5, 4, 1349}, - {4, 7, 0, -5, 4, 1356}, - {3, 2, -1, -10, 4, 1363}, - {7, 12, 0, 3, 8, 1365}, - {7, 15, 0, 3, 7, 1377}, - {2, 2, 0, -5, 3, 1392}, - {3, 3, 0, 3, 4, 1394}, - {3, 7, 0, -5, 4, 1397}, - {4, 7, 0, -5, 5, 1404}, - {6, 6, 0, -1, 7, 1411}, - {11, 12, 1, 0, 11, 1417}, - {11, 12, 1, 0, 11, 1441}, - {11, 12, 0, 0, 11, 1465}, - {6, 12, -1, 3, 8, 1489}, - {10, 14, 1, 0, 9, 1501}, - {10, 14, 1, 0, 9, 1529}, - {10, 14, 1, 0, 9, 1557}, - {10, 14, 1, 0, 9, 1585}, - {10, 14, 1, 0, 9, 1613}, - {10, 14, 1, 0, 9, 1641}, - {13, 12, 1, 0, 13, 1669}, - {8, 15, 0, 3, 9, 1693}, - {7, 14, 0, 0, 8, 1708}, - {7, 14, 0, 0, 8, 1722}, - {7, 14, 0, 0, 8, 1736}, - {7, 14, 0, 0, 8, 1750}, - {3, 14, 0, 0, 5, 1764}, - {3, 14, -1, 0, 5, 1778}, - {5, 14, 1, 0, 5, 1792}, - {5, 14, 1, 0, 5, 1806}, - {9, 12, 1, 0, 9, 1820}, - {8, 14, 0, 0, 9, 1844}, - {9, 14, 0, 0, 10, 1858}, - {9, 14, 0, 0, 10, 1886}, - {9, 14, 0, 0, 10, 1914}, - {9, 14, 0, 0, 10, 1942}, - {9, 14, 0, 0, 10, 1970}, - {6, 8, -1, 0, 8, 1998}, - {9, 12, 0, 0, 10, 2006}, - {8, 14, 0, 0, 9, 2030}, - {8, 14, 0, 0, 9, 2044}, - {8, 14, 0, 0, 9, 2058}, - {8, 14, 0, 0, 9, 2072}, - {10, 14, 1, 0, 9, 2086}, - {7, 12, -1, 0, 9, 2114}, - {7, 12, 0, 0, 8, 2126}, - {6, 12, 0, 0, 7, 2138}, - {6, 12, 0, 0, 7, 2150}, - {6, 12, 0, 0, 7, 2162}, - {6, 12, 0, 0, 7, 2174}, - {6, 12, 0, 0, 7, 2186}, - {6, 13, 0, 0, 7, 2198}, - {10, 9, 0, 0, 11, 2211}, - {6, 12, 0, 3, 7, 2229}, - {6, 12, 0, 0, 7, 2241}, - {6, 12, 0, 0, 7, 2253}, - {6, 12, 0, 0, 7, 2265}, - {6, 12, 0, 0, 7, 2277}, - {3, 12, 1, 0, 3, 2289}, - {3, 12, 0, 0, 3, 2301}, - {5, 12, 2, 0, 3, 2313}, - {5, 12, 2, 0, 3, 2325}, - {7, 12, 0, 0, 8, 2337}, - {7, 12, 0, 0, 8, 2349}, - {7, 12, 0, 0, 8, 2361}, - {7, 12, 0, 0, 8, 2373}, - {7, 12, 0, 0, 8, 2385}, - {7, 12, 0, 0, 8, 2397}, - {7, 12, 0, 0, 8, 2409}, - {6, 8, -1, 0, 8, 2421}, - {7, 9, 0, 0, 8, 2429}, - {7, 12, 0, 0, 8, 2438}, - {7, 12, 0, 0, 8, 2450}, - {7, 12, 0, 0, 8, 2462}, - {7, 12, 0, 0, 8, 2474}, - {7, 15, 0, 3, 8, 2486}, - {7, 15, 0, 3, 8, 2501}, - {7, 15, 0, 3, 8, 2516}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_helvb8.cpp b/intern/bmfont/intern/BMF_font_helvb8.cpp deleted file mode 100644 index fb56049c8fe..00000000000 --- a/intern/bmfont/intern/BMF_font_helvb8.cpp +++ /dev/null @@ -1,455 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_HELVB8 - -static unsigned char bitmap_data[]= { - 0x00,0x80,0x00,0x80,0x80,0x80,0x80,0xa0, - 0xa0,0xa0,0x50,0xf8,0x50,0xf8,0x50,0x40, - 0xe0,0x10,0x60,0x80,0x70,0x20,0x5c,0x54, - 0x2c,0xd0,0xa8,0xe8,0x58,0xb0,0xa8,0x48, - 0xa0,0x40,0x80,0x80,0x80,0x40,0x80,0x80, - 0x80,0x80,0x80,0x40,0x80,0x40,0x40,0x40, - 0x40,0x40,0x80,0x40,0xe0,0x40,0x20,0x20, - 0xf8,0x20,0x20,0x80,0x40,0x40,0xf0,0x80, - 0x80,0x80,0x80,0x80,0x40,0x40,0x40,0x60, - 0x90,0x90,0x90,0x90,0x60,0x40,0x40,0x40, - 0x40,0xc0,0x40,0xf0,0x40,0x20,0x10,0x90, - 0x60,0xc0,0x20,0x20,0xc0,0x20,0xc0,0x20, - 0x20,0xf0,0x60,0x20,0x20,0xc0,0x20,0x20, - 0xc0,0x80,0xe0,0x60,0x90,0x90,0xe0,0x80, - 0x70,0x40,0x40,0x40,0x20,0x10,0xf0,0x60, - 0x90,0x90,0x60,0x90,0x60,0x60,0x10,0x70, - 0x90,0x90,0x60,0x80,0x00,0x00,0x80,0x80, - 0x40,0x40,0x00,0x00,0x40,0x20,0x40,0x80, - 0x40,0x20,0xe0,0x00,0xe0,0x80,0x40,0x20, - 0x40,0x80,0x40,0x00,0x40,0x20,0xc0,0x78, - 0x80,0x9e,0xa5,0x99,0x41,0x3e,0x88,0x88, - 0x70,0x50,0x20,0x20,0xe0,0x90,0x90,0xe0, - 0x90,0xe0,0x70,0x88,0x80,0x80,0x88,0x70, - 0xf0,0x88,0x88,0x88,0x88,0xf0,0xf0,0x80, - 0x80,0xe0,0x80,0xf0,0x80,0x80,0x80,0xe0, - 0x80,0xf0,0x70,0x88,0x88,0x98,0x80,0x70, - 0x88,0x88,0x88,0xf8,0x88,0x88,0x80,0x80, - 0x80,0x80,0x80,0x80,0x40,0xa0,0x20,0x20, - 0x20,0x20,0x90,0x90,0xe0,0xc0,0xa0,0x90, - 0xe0,0x80,0x80,0x80,0x80,0x80,0xa8,0xa8, - 0xa8,0xa8,0xd8,0x88,0x88,0x98,0xa8,0xa8, - 0xc8,0x88,0x70,0x88,0x88,0x88,0x88,0x70, - 0x80,0x80,0xe0,0x90,0x90,0xe0,0x10,0x20, - 0x70,0x88,0x88,0x88,0x88,0x70,0x90,0x90, - 0xe0,0x90,0x90,0xe0,0xe0,0x10,0x10,0xe0, - 0x80,0x70,0x40,0x40,0x40,0x40,0x40,0xe0, - 0x70,0x88,0x88,0x88,0x88,0x88,0x40,0xa0, - 0x90,0x90,0x90,0x90,0x48,0x48,0x6c,0x92, - 0x92,0x92,0x90,0x90,0x60,0x60,0x90,0x90, - 0x20,0x20,0x30,0x48,0x48,0xc8,0xf0,0x80, - 0x40,0x20,0x10,0xf0,0xc0,0x80,0x80,0x80, - 0x80,0x80,0xc0,0x40,0x40,0x40,0x40,0x80, - 0x80,0x80,0xc0,0x40,0x40,0x40,0x40,0x40, - 0xc0,0x88,0x50,0x20,0xf8,0x80,0x80,0x80, - 0xd0,0xa0,0xe0,0x20,0xc0,0xe0,0x90,0x90, - 0x90,0xe0,0x80,0x80,0x60,0x80,0x80,0x80, - 0x60,0x70,0x90,0x90,0x90,0x70,0x10,0x10, - 0x60,0x80,0xe0,0xa0,0x40,0x40,0x40,0x40, - 0x40,0xe0,0x40,0x20,0x60,0x10,0x70,0x90, - 0x90,0x70,0x90,0x90,0x90,0x90,0xe0,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x80, - 0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x00, - 0x40,0xa0,0xa0,0xc0,0xc0,0xa0,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xa8, - 0xa8,0xa8,0xa8,0xf0,0x90,0x90,0x90,0x90, - 0xe0,0x60,0x90,0x90,0x90,0x60,0x80,0xe0, - 0x90,0x90,0x90,0xe0,0x10,0x70,0x90,0x90, - 0x90,0x70,0x80,0x80,0x80,0xc0,0xa0,0xc0, - 0x20,0x60,0x80,0x60,0x40,0x40,0x40,0x40, - 0xe0,0x40,0x40,0x60,0xa0,0xa0,0xa0,0xa0, - 0x40,0xa0,0x90,0x90,0x90,0x50,0x50,0xa8, - 0xa8,0xa8,0x90,0x90,0x60,0x90,0x90,0x80, - 0x40,0x60,0x90,0x90,0x90,0xe0,0x80,0x40, - 0x20,0xe0,0x20,0x40,0x40,0xc0,0x40,0x40, - 0x20,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x40,0x40,0x60,0x40,0x40,0x80,0xb0, - 0x48,0x00,0x80,0x80,0x80,0x80,0x80,0x00, - 0x80,0x40,0x40,0xa0,0x80,0xa0,0x40,0x40, - 0xf0,0x40,0x40,0xe0,0x40,0x30,0x88,0x70, - 0x50,0x70,0x88,0x20,0x20,0xf8,0x50,0x88, - 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0xe0, - 0x10,0x30,0x60,0x90,0x60,0x80,0x70,0x90, - 0x78,0x84,0xb4,0xa4,0xb4,0x84,0x78,0xe0, - 0x00,0xe0,0x20,0xc0,0x50,0xa0,0x50,0x10, - 0x10,0xf0,0xc0,0x78,0x84,0xac,0xb4,0xb4, - 0x84,0x78,0xe0,0x40,0xa0,0x40,0xf0,0x00, - 0x20,0xf0,0x20,0xc0,0x80,0x40,0x80,0xc0, - 0x20,0x60,0xe0,0x80,0x40,0x80,0x80,0xe0, - 0xa0,0xa0,0xa0,0x50,0x50,0x50,0x50,0xd0, - 0xd0,0xd0,0x78,0x80,0x80,0x80,0x40,0x40, - 0x40,0xc0,0x40,0xe0,0x00,0xe0,0xa0,0xe0, - 0xa0,0x50,0xa0,0x04,0x5e,0x2c,0x54,0x48, - 0xc4,0x40,0x0e,0x44,0x22,0x5c,0x48,0xc4, - 0x40,0x04,0x5e,0x2c,0xd4,0x28,0x64,0xe0, - 0x60,0x90,0x40,0x20,0x00,0x20,0x88,0x88, - 0x70,0x50,0x20,0x20,0x00,0x20,0x40,0x88, - 0x88,0x70,0x50,0x20,0x20,0x00,0x20,0x10, - 0x88,0x88,0x70,0x50,0x20,0x20,0x00,0x50, - 0x20,0x88,0x88,0x70,0x50,0x20,0x20,0x00, - 0x50,0x28,0x88,0x88,0x70,0x50,0x20,0x20, - 0x00,0x50,0x88,0x88,0x70,0x50,0x20,0x20, - 0x20,0x50,0x20,0x9e,0x90,0x7c,0x50,0x30, - 0x3e,0x80,0x40,0x70,0x88,0x80,0x88,0x88, - 0x70,0xf0,0x80,0x80,0xe0,0x80,0xf0,0x00, - 0x20,0x40,0xf0,0x80,0x80,0xe0,0x80,0xf0, - 0x00,0x40,0x20,0xf0,0x80,0x80,0xe0,0x80, - 0xf0,0x00,0xa0,0x40,0xf0,0x80,0x80,0xe0, - 0x80,0xf0,0x00,0xa0,0x40,0x40,0x40,0x40, - 0x40,0x40,0x00,0x40,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x00,0x80,0x40,0x40,0x40, - 0x40,0x40,0x40,0x40,0x00,0xa0,0x40,0x40, - 0x40,0x40,0x40,0x40,0x40,0x00,0xa0,0x70, - 0x48,0x48,0xe8,0x48,0x70,0x88,0x98,0xa8, - 0xa8,0xc8,0x88,0x00,0x50,0x28,0x70,0x88, - 0x88,0x88,0x88,0x70,0x00,0x20,0x40,0x70, - 0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x10, - 0x70,0x88,0x88,0x88,0x88,0x70,0x00,0x50, - 0x20,0x70,0x88,0x88,0x88,0x88,0x70,0x00, - 0x50,0x28,0x70,0x88,0x88,0x88,0x88,0x70, - 0x00,0x50,0x90,0x60,0x60,0x90,0x80,0xf0, - 0xc8,0xa8,0x98,0x88,0x78,0x08,0x70,0x88, - 0x88,0x88,0x88,0x88,0x00,0x20,0x40,0x70, - 0x88,0x88,0x88,0x88,0x88,0x00,0x20,0x10, - 0x70,0x88,0x88,0x88,0x88,0x88,0x00,0x50, - 0x20,0x70,0x88,0x88,0x88,0x88,0x88,0x00, - 0x50,0x20,0x20,0x30,0x48,0x48,0xc8,0x00, - 0x10,0x08,0x80,0xf0,0x88,0x88,0xf0,0x80, - 0x80,0xa0,0x90,0x90,0xa0,0x90,0x60,0xd0, - 0xa0,0xe0,0x20,0xc0,0x00,0x40,0x80,0xd0, - 0xa0,0xe0,0x20,0xc0,0x00,0x40,0x20,0xd0, - 0xa0,0xe0,0x20,0xc0,0x00,0xa0,0x40,0x68, - 0x50,0x70,0x10,0x60,0x00,0xb0,0x68,0xd0, - 0xa0,0xe0,0x20,0xc0,0x00,0xa0,0xd0,0xa0, - 0xe0,0x20,0xc0,0x40,0xa0,0x40,0xd8,0xa0, - 0xf8,0x28,0xd0,0x80,0x40,0x60,0x80,0x80, - 0x80,0x60,0x60,0x80,0xe0,0xa0,0x40,0x00, - 0x20,0x40,0x60,0x80,0xe0,0xa0,0x40,0x00, - 0x40,0x20,0x60,0x80,0xe0,0xa0,0x40,0x00, - 0xa0,0x40,0x60,0x80,0xe0,0xa0,0x40,0x00, - 0xa0,0x40,0x40,0x40,0x40,0x40,0x00,0x40, - 0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x80, - 0x40,0x40,0x40,0x40,0x40,0x40,0x00,0xa0, - 0x40,0x40,0x40,0x40,0x40,0x40,0x00,0xa0, - 0x60,0x90,0x90,0x90,0x70,0xa0,0x60,0x90, - 0x90,0x90,0x90,0x90,0xe0,0x00,0xa0,0x50, - 0x60,0x90,0x90,0x90,0x60,0x00,0x20,0x40, - 0x60,0x90,0x90,0x90,0x60,0x00,0x20,0x10, - 0x60,0x90,0x90,0x90,0x60,0x00,0xa0,0x40, - 0x60,0x90,0x90,0x90,0x60,0x00,0xa0,0x50, - 0x60,0x90,0x90,0x90,0x60,0x00,0x90,0x20, - 0x00,0xf0,0x00,0x20,0x80,0x70,0x68,0x58, - 0x48,0x3c,0x02,0x60,0xa0,0xa0,0xa0,0xa0, - 0x00,0x40,0x80,0x60,0xa0,0xa0,0xa0,0xa0, - 0x00,0x40,0x20,0x60,0xa0,0xa0,0xa0,0xa0, - 0x00,0xa0,0x40,0x60,0xa0,0xa0,0xa0,0xa0, - 0x00,0xa0,0x80,0x40,0x60,0x90,0x90,0x90, - 0x00,0x20,0x10,0x80,0xe0,0x90,0x90,0x90, - 0xe0,0x80,0x80,0x40,0x60,0x90,0x90,0x90, - 0x00,0x50, -}; - -BMF_FontData BMF_font_helvb8 = { - 0, -2, - 9, 9, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 8, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 1, 0, 0, 2, 0}, - {1, 6, -1, 0, 2, 1}, - {3, 3, -1, -3, 3, 7}, - {5, 5, 0, 0, 5, 10}, - {4, 7, -1, 1, 5, 15}, - {6, 6, -1, 0, 7, 22}, - {5, 6, -1, 0, 6, 28}, - {1, 3, -1, -3, 2, 34}, - {2, 7, -1, 1, 3, 37}, - {2, 7, -1, 1, 3, 44}, - {3, 3, -1, -2, 3, 51}, - {5, 5, -1, 0, 5, 54}, - {2, 3, 0, 2, 2, 59}, - {4, 1, -2, -2, 6, 62}, - {1, 1, -1, 0, 2, 63}, - {2, 7, -1, 1, 2, 64}, - {4, 6, -1, 0, 5, 71}, - {2, 6, -2, 0, 5, 77}, - {4, 6, -1, 0, 5, 83}, - {3, 6, -2, 0, 5, 89}, - {4, 6, -1, 0, 5, 95}, - {3, 6, -2, 0, 5, 101}, - {4, 6, -1, 0, 5, 107}, - {4, 6, -1, 0, 5, 113}, - {4, 6, -1, 0, 5, 119}, - {4, 6, -1, 0, 5, 125}, - {1, 4, -1, 0, 2, 131}, - {2, 6, 0, 2, 2, 135}, - {3, 5, -1, 0, 5, 141}, - {3, 3, -1, -1, 4, 146}, - {3, 5, -2, 0, 5, 149}, - {3, 5, -2, 0, 5, 154}, - {8, 7, -1, 1, 9, 159}, - {5, 6, -1, 0, 6, 166}, - {4, 6, -2, 0, 6, 172}, - {5, 6, -1, 0, 6, 178}, - {5, 6, -1, 0, 6, 184}, - {4, 6, -2, 0, 6, 190}, - {4, 6, -2, 0, 5, 196}, - {5, 6, -1, 0, 6, 202}, - {5, 6, -1, 0, 6, 208}, - {1, 6, -1, 0, 2, 214}, - {3, 6, -1, 0, 4, 220}, - {4, 6, -2, 0, 6, 226}, - {3, 6, -2, 0, 5, 232}, - {5, 6, -2, 0, 7, 238}, - {5, 6, -1, 0, 6, 244}, - {5, 6, -1, 0, 6, 250}, - {4, 6, -2, 0, 6, 256}, - {5, 8, -1, 2, 6, 262}, - {4, 6, -2, 0, 6, 270}, - {4, 6, -2, 0, 6, 276}, - {3, 6, -1, 0, 4, 282}, - {5, 6, -1, 0, 6, 288}, - {4, 6, -2, 0, 6, 294}, - {7, 6, -1, 0, 7, 300}, - {4, 6, -2, 0, 6, 306}, - {5, 6, -1, 0, 6, 312}, - {4, 6, -2, 0, 6, 318}, - {2, 7, -1, 1, 2, 324}, - {2, 7, 0, 1, 2, 331}, - {2, 7, 0, 1, 2, 338}, - {5, 3, 0, -2, 5, 345}, - {5, 1, 0, 1, 5, 348}, - {1, 3, -1, -3, 2, 349}, - {4, 5, -1, 0, 4, 352}, - {4, 7, -1, 0, 5, 357}, - {3, 5, -1, 0, 4, 364}, - {4, 7, -1, 0, 5, 369}, - {3, 5, -1, 0, 4, 376}, - {3, 7, -1, 0, 3, 381}, - {4, 6, -1, 1, 5, 388}, - {4, 7, -1, 0, 5, 394}, - {1, 7, -1, 0, 2, 401}, - {2, 9, 0, 2, 2, 408}, - {3, 7, -1, 0, 4, 417}, - {1, 7, -1, 0, 2, 424}, - {5, 5, -1, 0, 6, 431}, - {4, 5, -1, 0, 5, 436}, - {4, 5, -1, 0, 5, 441}, - {4, 6, -1, 1, 5, 446}, - {4, 6, -1, 1, 5, 452}, - {3, 5, -1, 0, 3, 458}, - {3, 5, -1, 0, 4, 463}, - {3, 7, -1, 0, 3, 468}, - {3, 5, -1, 0, 4, 475}, - {4, 5, -1, 0, 5, 480}, - {5, 5, -1, 0, 6, 485}, - {4, 5, -1, 0, 5, 490}, - {4, 6, -1, 1, 4, 495}, - {3, 5, -1, 0, 4, 501}, - {3, 7, 0, 1, 2, 506}, - {1, 7, -1, 1, 2, 513}, - {3, 7, 0, 1, 2, 520}, - {5, 2, -1, -2, 6, 527}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 1, 0, 0, 2, 529}, - {1, 7, -1, 2, 2, 530}, - {3, 7, -1, 1, 5, 537}, - {4, 6, -1, 0, 5, 544}, - {5, 5, 0, 0, 4, 550}, - {5, 5, -1, 0, 6, 555}, - {1, 7, -1, 1, 2, 560}, - {4, 8, -1, 2, 5, 567}, - {4, 1, 0, -5, 2, 575}, - {6, 7, -1, 1, 7, 576}, - {3, 5, 0, -1, 3, 583}, - {4, 3, -1, -1, 5, 588}, - {4, 3, -1, -1, 6, 591}, - {2, 1, 0, -2, 3, 594}, - {6, 7, -1, 1, 7, 595}, - {3, 1, 0, -5, 2, 602}, - {3, 3, -1, -3, 3, 603}, - {4, 5, -1, 0, 5, 606}, - {2, 4, -1, -2, 2, 611}, - {3, 4, 0, -2, 2, 615}, - {2, 2, 0, -4, 2, 619}, - {3, 6, -1, 2, 4, 621}, - {5, 8, 0, 2, 5, 627}, - {1, 2, -1, -1, 2, 635}, - {2, 2, 0, 2, 2, 637}, - {2, 4, 0, -2, 2, 639}, - {3, 5, 0, -1, 3, 643}, - {4, 3, -1, -1, 5, 648}, - {7, 7, 0, 1, 7, 651}, - {7, 7, 0, 1, 7, 658}, - {7, 7, 0, 1, 7, 665}, - {4, 6, -1, 1, 5, 672}, - {5, 9, -1, 0, 6, 678}, - {5, 9, -1, 0, 6, 687}, - {5, 9, -1, 0, 6, 696}, - {5, 9, -1, 0, 6, 705}, - {5, 8, -1, 0, 6, 714}, - {5, 9, -1, 0, 6, 722}, - {7, 6, -1, 0, 8, 731}, - {5, 8, -1, 2, 6, 737}, - {4, 9, -2, 0, 6, 745}, - {4, 9, -2, 0, 6, 754}, - {4, 9, -2, 0, 6, 763}, - {4, 8, -2, 0, 6, 772}, - {2, 9, 0, 0, 2, 780}, - {2, 9, -1, 0, 2, 789}, - {3, 9, 0, 0, 2, 798}, - {3, 8, 0, 0, 2, 807}, - {5, 6, -1, 0, 6, 815}, - {5, 9, -1, 0, 6, 821}, - {5, 9, -1, 0, 6, 830}, - {5, 9, -1, 0, 6, 839}, - {5, 9, -1, 0, 6, 848}, - {5, 9, -1, 0, 6, 857}, - {5, 8, -1, 0, 6, 866}, - {4, 4, -1, 0, 5, 874}, - {5, 8, -1, 1, 6, 878}, - {5, 9, -1, 0, 6, 886}, - {5, 9, -1, 0, 6, 895}, - {5, 9, -1, 0, 6, 904}, - {5, 8, -1, 0, 6, 913}, - {5, 9, -1, 0, 6, 921}, - {5, 6, -1, 0, 6, 930}, - {4, 7, -2, 1, 6, 936}, - {4, 8, -1, 0, 4, 943}, - {4, 8, -1, 0, 4, 951}, - {4, 8, -1, 0, 4, 959}, - {5, 8, 0, 0, 4, 967}, - {4, 7, -1, 0, 4, 975}, - {4, 8, -1, 0, 4, 982}, - {5, 5, -1, 0, 6, 990}, - {3, 7, -1, 2, 4, 995}, - {3, 8, -1, 0, 4, 1002}, - {3, 8, -1, 0, 4, 1010}, - {3, 8, -1, 0, 4, 1018}, - {3, 7, -1, 0, 4, 1026}, - {2, 8, 0, 0, 2, 1033}, - {2, 8, -1, 0, 2, 1041}, - {3, 8, 0, 0, 2, 1049}, - {3, 7, 0, 0, 2, 1057}, - {4, 8, -1, 0, 5, 1064}, - {4, 8, -1, 0, 5, 1072}, - {4, 8, -1, 0, 5, 1080}, - {4, 8, -1, 0, 5, 1088}, - {4, 8, -1, 0, 5, 1096}, - {4, 8, -1, 0, 5, 1104}, - {4, 7, -1, 0, 5, 1112}, - {4, 5, -1, 0, 5, 1119}, - {7, 7, 0, 1, 5, 1124}, - {3, 8, -1, 0, 4, 1131}, - {3, 8, -1, 0, 4, 1139}, - {3, 8, -1, 0, 4, 1147}, - {3, 7, -1, 0, 4, 1155}, - {4, 9, -1, 1, 4, 1162}, - {4, 7, -1, 1, 5, 1171}, - {4, 8, -1, 1, 4, 1178}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_scr12.cpp b/intern/bmfont/intern/BMF_font_scr12.cpp deleted file mode 100644 index be0be544474..00000000000 --- a/intern/bmfont/intern/BMF_font_scr12.cpp +++ /dev/null @@ -1,484 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_SCR12 - -static unsigned char bitmap_data[]= { - 0x80,0x80,0x00,0x80,0x80,0x80,0x80,0x80, - 0xa0,0xa0,0xa0,0xa0,0x50,0x50,0xfc,0x28, - 0x28,0x7e,0x14,0x14,0x20,0x70,0xa8,0x28, - 0x70,0xa0,0xa8,0x70,0x20,0x98,0x54,0x54, - 0x2c,0xd0,0xa8,0xa8,0x64,0x74,0x88,0x8c, - 0x50,0x20,0x50,0x48,0x30,0x80,0x40,0x20, - 0x20,0x20,0x40,0x40,0x80,0x80,0x80,0x80, - 0x40,0x40,0x20,0x80,0x40,0x40,0x20,0x20, - 0x20,0x20,0x40,0x40,0x80,0x20,0xa8,0x70, - 0xa8,0x20,0x20,0x20,0xf8,0x20,0x20,0x80, - 0x40,0x40,0xc0,0xf8,0x80,0x80,0x80,0x80, - 0x40,0x40,0x20,0x20,0x10,0x10,0x08,0x08, - 0x70,0x88,0x88,0xc8,0xa8,0x98,0x88,0x70, - 0xe0,0x40,0x40,0x40,0x40,0x40,0xc0,0x40, - 0xf8,0x80,0x40,0x20,0x10,0x08,0x88,0x70, - 0x70,0x88,0x08,0x08,0x70,0x08,0x88,0x70, - 0x10,0x10,0x10,0xf8,0x90,0x50,0x30,0x10, - 0x70,0x88,0x08,0x08,0xf0,0x80,0x80,0xf8, - 0x70,0x88,0x88,0x88,0xf0,0x80,0x88,0x70, - 0x40,0x40,0x20,0x20,0x10,0x10,0x08,0xf8, - 0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x70, - 0x70,0x88,0x08,0x78,0x88,0x88,0x88,0x70, - 0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x40, - 0x40,0xc0,0x00,0x00,0x40,0x40,0x08,0x10, - 0x20,0x40,0x80,0x40,0x20,0x10,0x08,0xf8, - 0x00,0xf8,0x80,0x40,0x20,0x10,0x08,0x10, - 0x20,0x40,0x80,0x20,0x00,0x20,0x20,0x10, - 0x88,0x88,0x70,0x38,0x40,0x98,0xa8,0xa8, - 0x98,0x48,0x30,0x88,0x88,0xf8,0x88,0x50, - 0x50,0x20,0x20,0xf0,0x88,0x88,0x88,0xf0, - 0x88,0x88,0xf0,0x70,0x88,0x80,0x80,0x80, - 0x80,0x88,0x70,0xf0,0x88,0x88,0x88,0x88, - 0x88,0x88,0xf0,0xf8,0x80,0x80,0x80,0xf0, - 0x80,0x80,0xf8,0x80,0x80,0x80,0x80,0xf0, - 0x80,0x80,0xf8,0x68,0x98,0x88,0x88,0x98, - 0x80,0x88,0x70,0x88,0x88,0x88,0x88,0xf8, - 0x88,0x88,0x88,0xe0,0x40,0x40,0x40,0x40, - 0x40,0x40,0xe0,0x70,0x88,0x88,0x08,0x08, - 0x08,0x08,0x08,0x88,0x88,0x90,0xa0,0xc0, - 0xa0,0x90,0x88,0xf8,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x88,0x88,0xa8,0xa8,0xd8, - 0xd8,0x88,0x88,0x88,0x98,0x98,0xa8,0xa8, - 0xc8,0xc8,0x88,0x70,0x88,0x88,0x88,0x88, - 0x88,0x88,0x70,0x80,0x80,0x80,0x80,0xf0, - 0x88,0x88,0xf0,0x08,0x10,0x70,0xa8,0x88, - 0x88,0x88,0x88,0x88,0x70,0x88,0x90,0x90, - 0xa0,0xf0,0x88,0x88,0xf0,0x70,0x88,0x88, - 0x08,0x70,0x80,0x88,0x70,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0xf8,0x70,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0x20,0x20,0x50, - 0x50,0x50,0x88,0x88,0x88,0x50,0x50,0xf8, - 0xa8,0xa8,0xa8,0x88,0x88,0x88,0x88,0x50, - 0x20,0x20,0x50,0x88,0x88,0x20,0x20,0x20, - 0x20,0x50,0x50,0x88,0x88,0xf8,0x80,0x40, - 0x40,0x20,0x10,0x08,0xf8,0xe0,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0xe0,0x08,0x08, - 0x10,0x10,0x20,0x20,0x40,0x40,0x80,0x80, - 0xe0,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0xe0,0x88,0x50,0x20,0xfe,0x20,0x40,0x80, - 0x80,0x68,0x98,0x88,0x78,0x08,0x70,0xb0, - 0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80,0x70, - 0x88,0x80,0x80,0x88,0x70,0x68,0x98,0x88, - 0x88,0x98,0x68,0x08,0x08,0x70,0x88,0x80, - 0xf8,0x88,0x70,0x40,0x40,0x40,0x40,0x40, - 0xf0,0x40,0x38,0xf0,0x08,0x68,0x98,0x88, - 0x88,0x98,0x68,0x88,0x88,0x88,0x88,0xc8, - 0xb0,0x80,0x80,0x20,0x20,0x20,0x20,0x20, - 0xe0,0x00,0x20,0x60,0x90,0x10,0x10,0x10, - 0x10,0x10,0x70,0x00,0x10,0x88,0x90,0xa0, - 0xc0,0xa0,0x90,0x80,0x80,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0xe0,0xa8,0xa8,0xa8, - 0xa8,0xa8,0xd0,0x88,0x88,0x88,0x88,0xc8, - 0xb0,0x70,0x88,0x88,0x88,0x88,0x70,0x80, - 0x80,0xb0,0xc8,0x88,0x88,0xc8,0xb0,0x08, - 0x08,0x68,0x98,0x88,0x88,0x98,0x68,0x80, - 0x80,0x80,0x80,0xc8,0xb0,0x70,0x88,0x10, - 0x60,0x88,0x70,0x30,0x40,0x40,0x40,0x40, - 0xf0,0x40,0x68,0x98,0x88,0x88,0x88,0x88, - 0x20,0x20,0x50,0x50,0x88,0x88,0x50,0xa8, - 0xa8,0xa8,0x88,0x88,0x88,0x88,0x50,0x20, - 0x50,0x88,0xf0,0x08,0x68,0x98,0x88,0x88, - 0x88,0x88,0xf8,0x80,0x40,0x20,0x10,0xf8, - 0x18,0x20,0x20,0x20,0x20,0xc0,0x20,0x20, - 0x20,0x18,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0xc0,0x20,0x20,0x20, - 0x20,0x18,0x20,0x20,0x20,0xc0,0x98,0xb4, - 0x64,0x80,0x80,0x80,0x80,0x80,0x00,0x80, - 0x80,0x20,0x20,0x70,0x88,0x80,0x88,0x70, - 0x20,0x20,0xb0,0x48,0x40,0xf0,0x40,0x40, - 0x48,0x30,0x90,0x60,0x90,0x90,0x60,0x90, - 0x20,0x70,0x20,0x70,0x20,0x50,0x88,0x88, - 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x80, - 0x80,0x80,0x70,0x88,0x10,0x28,0x48,0x90, - 0xa0,0x40,0x88,0x70,0xa0,0x78,0x84,0xb4, - 0xa4,0xb4,0x84,0x78,0xf0,0x90,0x70,0x10, - 0x60,0x14,0x28,0x50,0xa0,0x50,0x28,0x14, - 0x08,0xf8,0xf0,0x78,0x84,0xac,0xb4,0xb4, - 0x84,0x78,0xe0,0x60,0x90,0x60,0xf8,0x00, - 0x20,0x20,0xf8,0x20,0x20,0xe0,0x40,0x20, - 0xa0,0x40,0xc0,0x20,0x40,0x20,0xc0,0x80, - 0x40,0x80,0xe8,0x90,0x90,0x90,0x90,0x28, - 0x28,0x28,0x28,0x68,0xa8,0xa8,0xa8,0x7c, - 0x80,0x80,0xc0,0x40,0xe0,0x40,0x40,0xc0, - 0x40,0xf0,0x60,0x90,0x90,0x60,0xa0,0x50, - 0x28,0x14,0x28,0x50,0xa0,0x08,0x38,0xa8, - 0x58,0x28,0xf0,0x48,0x40,0xc0,0x40,0x38, - 0x10,0x88,0x68,0x30,0xf0,0x48,0x40,0xc0, - 0x40,0x08,0x38,0xa8,0x58,0x28,0xd0,0x28, - 0x40,0x20,0xc0,0x70,0x88,0x88,0x40,0x20, - 0x20,0x00,0x20,0x88,0x88,0xf8,0x88,0x50, - 0x50,0x20,0x00,0x20,0x40,0x88,0x88,0xf8, - 0x50,0x50,0x20,0x20,0x00,0x20,0x10,0x88, - 0x88,0xf8,0x50,0x50,0x20,0x20,0x00,0x50, - 0x20,0x88,0x88,0xf8,0x50,0x50,0x20,0x20, - 0x00,0xb0,0x68,0x88,0x88,0xf8,0x50,0x50, - 0x20,0x20,0x00,0x50,0x88,0x88,0xf8,0x50, - 0x50,0x20,0x20,0x20,0x50,0x20,0x9c,0x90, - 0xf0,0x50,0x5c,0x30,0x30,0x1c,0x60,0x20, - 0x70,0x88,0x80,0x80,0x80,0x80,0x88,0x70, - 0xf8,0x80,0x80,0xf0,0x80,0x80,0xf8,0x00, - 0x20,0x40,0xf8,0x80,0x80,0xf0,0x80,0x80, - 0xf8,0x00,0x20,0x10,0xf8,0x80,0x80,0xf0, - 0x80,0x80,0xf8,0x00,0x50,0x20,0xf8,0x80, - 0x80,0xf0,0x80,0x80,0xf8,0x00,0x50,0xe0, - 0x40,0x40,0x40,0x40,0x40,0xe0,0x00,0x40, - 0x80,0xe0,0x40,0x40,0x40,0x40,0x40,0xe0, - 0x00,0x40,0x20,0xe0,0x40,0x40,0x40,0x40, - 0x40,0xe0,0x00,0xa0,0x40,0xe0,0x40,0x40, - 0x40,0x40,0x40,0xe0,0x00,0xa0,0x78,0x44, - 0x44,0xf4,0x44,0x44,0x44,0x78,0x88,0x98, - 0x98,0xa8,0xc8,0xc8,0x88,0x00,0xb0,0x68, - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, - 0x20,0x40,0x70,0x88,0x88,0x88,0x88,0x88, - 0x70,0x00,0x20,0x10,0x70,0x88,0x88,0x88, - 0x88,0x88,0x70,0x00,0x50,0x20,0x70,0x88, - 0x88,0x88,0x88,0x88,0x70,0x00,0xb0,0x68, - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, - 0x50,0x88,0x50,0x20,0x50,0x88,0xb8,0x44, - 0x64,0x54,0x4c,0x44,0x3a,0x70,0x88,0x88, - 0x88,0x88,0x88,0x88,0x00,0x20,0x40,0x70, - 0x88,0x88,0x88,0x88,0x88,0x88,0x00,0x20, - 0x10,0x70,0x88,0x88,0x88,0x88,0x88,0x88, - 0x00,0x50,0x20,0x70,0x88,0x88,0x88,0x88, - 0x88,0x88,0x00,0x50,0x20,0x20,0x20,0x50, - 0x50,0x88,0x88,0x00,0x20,0x10,0x80,0x80, - 0xf0,0x88,0x88,0x88,0xf0,0x80,0x80,0xb0, - 0x88,0x88,0x88,0x90,0xa0,0x90,0x60,0x78, - 0x88,0x78,0x08,0x70,0x00,0x20,0x40,0x78, - 0x88,0x78,0x08,0x70,0x00,0x20,0x10,0x78, - 0x88,0x78,0x08,0x70,0x00,0x50,0x20,0x78, - 0x88,0x78,0x08,0x70,0x00,0xb0,0x68,0x78, - 0x88,0x78,0x08,0x70,0x00,0x50,0x78,0x88, - 0x78,0x08,0x70,0x00,0x20,0x50,0x20,0x6c, - 0x90,0x7c,0x12,0x6c,0x60,0x20,0x70,0x88, - 0x80,0x80,0x88,0x70,0x78,0x80,0xf8,0x88, - 0x70,0x00,0x20,0x40,0x78,0x80,0xf8,0x88, - 0x70,0x00,0x20,0x10,0x78,0x80,0xf8,0x88, - 0x70,0x00,0x50,0x20,0x78,0x80,0xf8,0x88, - 0x70,0x00,0x50,0x20,0x20,0x20,0x20,0xe0, - 0x00,0x40,0x80,0x20,0x20,0x20,0x20,0xe0, - 0x00,0x40,0x20,0x20,0x20,0x20,0x20,0xe0, - 0x00,0xa0,0x40,0x20,0x20,0x20,0x20,0xe0, - 0x00,0xa0,0x70,0x88,0x88,0x88,0x78,0x08, - 0x90,0x60,0xd0,0x88,0x88,0x88,0xc8,0xb0, - 0x00,0xb0,0x68,0x70,0x88,0x88,0x88,0x70, - 0x00,0x20,0x40,0x70,0x88,0x88,0x88,0x70, - 0x00,0x20,0x10,0x70,0x88,0x88,0x88,0x70, - 0x00,0x50,0x20,0x70,0x88,0x88,0x88,0x70, - 0x00,0xb0,0x68,0x70,0x88,0x88,0x88,0x70, - 0x00,0x50,0x20,0x00,0xf8,0x00,0x20,0xb8, - 0x64,0x54,0x4c,0x3a,0x68,0x98,0x88,0x88, - 0x88,0x00,0x20,0x40,0x68,0x98,0x88,0x88, - 0x88,0x00,0x20,0x10,0x68,0x98,0x88,0x88, - 0x88,0x00,0x50,0x20,0x68,0x98,0x88,0x88, - 0x88,0x00,0x50,0xf0,0x08,0x68,0x98,0x88, - 0x88,0x88,0x00,0x20,0x10,0x80,0x80,0xb0, - 0xc8,0x88,0x88,0xc8,0xb0,0x80,0x80,0xf0, - 0x08,0x68,0x98,0x88,0x88,0x88,0x00,0xd8, -}; - -BMF_FontData BMF_font_scr12 = { - 0, -2, - 7, 10, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 16, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 7, -1}, - {1, 8, -3, 0, 7, 0}, - {3, 4, -2, -5, 7, 8}, - {7, 8, 0, 0, 7, 12}, - {5, 9, -1, 1, 7, 20}, - {6, 8, 0, 0, 7, 29}, - {6, 8, 0, 0, 7, 37}, - {3, 4, -2, -5, 7, 45}, - {3, 10, -2, 2, 7, 49}, - {3, 10, -2, 2, 7, 59}, - {5, 5, -1, -3, 7, 69}, - {5, 5, -1, -1, 7, 74}, - {2, 4, -2, 2, 7, 79}, - {5, 1, -1, -3, 7, 83}, - {1, 2, -3, 0, 7, 84}, - {5, 10, -1, 1, 7, 86}, - {5, 8, -1, 0, 7, 96}, - {3, 8, -2, 0, 7, 104}, - {5, 8, -1, 0, 7, 112}, - {5, 8, -1, 0, 7, 120}, - {5, 8, -1, 0, 7, 128}, - {5, 8, -1, 0, 7, 136}, - {5, 8, -1, 0, 7, 144}, - {5, 8, -1, 0, 7, 152}, - {5, 8, -1, 0, 7, 160}, - {5, 8, -1, 0, 7, 168}, - {1, 6, -3, 0, 7, 176}, - {2, 8, -2, 2, 7, 182}, - {5, 9, -1, 1, 7, 190}, - {5, 3, -1, -2, 7, 199}, - {5, 9, -1, 1, 7, 202}, - {5, 8, -1, 0, 7, 211}, - {5, 8, -1, 0, 7, 219}, - {5, 8, -1, 0, 7, 227}, - {5, 8, -1, 0, 7, 235}, - {5, 8, -1, 0, 7, 243}, - {5, 8, -1, 0, 7, 251}, - {5, 8, -1, 0, 7, 259}, - {5, 8, -1, 0, 7, 267}, - {5, 8, -1, 0, 7, 275}, - {5, 8, -1, 0, 7, 283}, - {3, 8, -2, 0, 7, 291}, - {5, 8, -1, 0, 7, 299}, - {5, 8, -1, 0, 7, 307}, - {5, 8, -1, 0, 7, 315}, - {5, 8, -1, 0, 7, 323}, - {5, 8, -1, 0, 7, 331}, - {5, 8, -1, 0, 7, 339}, - {5, 8, -1, 0, 7, 347}, - {5, 10, -1, 2, 7, 355}, - {5, 8, -1, 0, 7, 365}, - {5, 8, -1, 0, 7, 373}, - {5, 8, -1, 0, 7, 381}, - {5, 8, -1, 0, 7, 389}, - {5, 8, -1, 0, 7, 397}, - {5, 8, -1, 0, 7, 405}, - {5, 8, -1, 0, 7, 413}, - {5, 8, -1, 0, 7, 421}, - {5, 8, -1, 0, 7, 429}, - {3, 9, -2, 1, 7, 437}, - {5, 10, -1, 1, 7, 446}, - {3, 9, -2, 1, 7, 456}, - {5, 3, -1, -5, 7, 465}, - {7, 1, 0, 1, 7, 468}, - {3, 4, -2, -5, 7, 469}, - {5, 6, -1, 0, 7, 473}, - {5, 8, -1, 0, 7, 479}, - {5, 6, -1, 0, 7, 487}, - {5, 8, -1, 0, 7, 493}, - {5, 6, -1, 0, 7, 501}, - {5, 8, -1, 0, 7, 507}, - {5, 8, -1, 2, 7, 515}, - {5, 8, -1, 0, 7, 523}, - {3, 8, -2, 0, 7, 531}, - {4, 10, -1, 2, 7, 539}, - {5, 8, -1, 0, 7, 549}, - {3, 8, -2, 0, 7, 557}, - {5, 6, -1, 0, 7, 565}, - {5, 6, -1, 0, 7, 571}, - {5, 6, -1, 0, 7, 577}, - {5, 8, -1, 2, 7, 583}, - {5, 8, -1, 2, 7, 591}, - {5, 6, -1, 0, 7, 599}, - {5, 6, -1, 0, 7, 605}, - {4, 7, -1, 0, 7, 611}, - {5, 6, -1, 0, 7, 618}, - {5, 6, -1, 0, 7, 624}, - {5, 6, -1, 0, 7, 630}, - {5, 6, -1, 0, 7, 636}, - {5, 8, -1, 2, 7, 642}, - {5, 6, -1, 0, 7, 650}, - {5, 10, -1, 2, 7, 656}, - {1, 10, -3, 1, 7, 666}, - {5, 10, -1, 2, 7, 676}, - {6, 3, 0, -2, 7, 686}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 8, -3, 2, 7, 689}, - {5, 9, -1, 0, 7, 697}, - {5, 8, -1, 0, 7, 706}, - {4, 6, -1, -2, 7, 714}, - {5, 8, -1, 0, 7, 720}, - {1, 10, -3, 1, 7, 728}, - {5, 10, -1, 1, 7, 738}, - {3, 1, -2, -7, 7, 748}, - {6, 7, 0, 0, 7, 749}, - {4, 5, -1, -4, 7, 756}, - {6, 7, 0, 0, 7, 761}, - {5, 2, -1, -3, 7, 768}, - {4, 1, -1, -3, 7, 770}, - {6, 7, 0, 0, 7, 771}, - {3, 1, -2, -7, 7, 778}, - {4, 3, -1, -4, 7, 779}, - {5, 7, -1, 0, 7, 782}, - {3, 5, -2, -4, 7, 789}, - {3, 5, -2, -4, 7, 794}, - {2, 2, -2, -7, 7, 799}, - {5, 6, -1, 1, 7, 801}, - {6, 9, 0, 1, 7, 807}, - {1, 2, -3, -3, 7, 816}, - {2, 2, -2, 2, 7, 818}, - {3, 5, -2, -4, 7, 820}, - {4, 5, -1, -4, 7, 825}, - {6, 7, 0, 0, 7, 830}, - {5, 10, -1, 1, 7, 837}, - {5, 10, -1, 1, 7, 847}, - {5, 10, -1, 1, 7, 857}, - {5, 8, -1, 2, 7, 867}, - {5, 10, -1, 0, 7, 875}, - {5, 10, -1, 0, 7, 885}, - {5, 10, -1, 0, 7, 895}, - {5, 10, -1, 0, 7, 905}, - {5, 9, -1, 0, 7, 915}, - {5, 10, -1, 0, 7, 924}, - {6, 8, 0, 0, 7, 934}, - {5, 10, -1, 2, 7, 942}, - {5, 10, -1, 0, 7, 952}, - {5, 10, -1, 0, 7, 962}, - {5, 10, -1, 0, 7, 972}, - {5, 9, -1, 0, 7, 982}, - {3, 10, -2, 0, 7, 991}, - {3, 10, -2, 0, 7, 1001}, - {3, 10, -2, 0, 7, 1011}, - {3, 9, -2, 0, 7, 1021}, - {6, 8, 0, 0, 7, 1030}, - {5, 10, -1, 0, 7, 1038}, - {5, 10, -1, 0, 7, 1048}, - {5, 10, -1, 0, 7, 1058}, - {5, 10, -1, 0, 7, 1068}, - {5, 10, -1, 0, 7, 1078}, - {5, 9, -1, 0, 7, 1088}, - {5, 5, -1, -1, 7, 1097}, - {7, 7, 0, 0, 7, 1102}, - {5, 10, -1, 0, 7, 1109}, - {5, 10, -1, 0, 7, 1119}, - {5, 10, -1, 0, 7, 1129}, - {5, 9, -1, 0, 7, 1139}, - {5, 10, -1, 0, 7, 1148}, - {5, 9, -1, 0, 7, 1158}, - {5, 8, -1, 0, 7, 1167}, - {5, 8, -1, 0, 7, 1175}, - {5, 8, -1, 0, 7, 1183}, - {5, 8, -1, 0, 7, 1191}, - {5, 8, -1, 0, 7, 1199}, - {5, 7, -1, 0, 7, 1207}, - {5, 9, -1, 0, 7, 1214}, - {7, 5, 0, 0, 7, 1223}, - {5, 8, -1, 2, 7, 1228}, - {5, 8, -1, 0, 7, 1236}, - {5, 8, -1, 0, 7, 1244}, - {5, 8, -1, 0, 7, 1252}, - {5, 7, -1, 0, 7, 1260}, - {3, 8, -2, 0, 7, 1267}, - {3, 8, -2, 0, 7, 1275}, - {3, 8, -2, 0, 7, 1283}, - {3, 7, -2, 0, 7, 1291}, - {5, 9, -1, 0, 7, 1298}, - {5, 8, -1, 0, 7, 1307}, - {5, 8, -1, 0, 7, 1315}, - {5, 8, -1, 0, 7, 1323}, - {5, 8, -1, 0, 7, 1331}, - {5, 8, -1, 0, 7, 1339}, - {5, 7, -1, 0, 7, 1347}, - {5, 5, -1, -1, 7, 1354}, - {7, 5, 0, 0, 7, 1359}, - {5, 8, -1, 0, 7, 1364}, - {5, 8, -1, 0, 7, 1372}, - {5, 8, -1, 0, 7, 1380}, - {5, 7, -1, 0, 7, 1388}, - {5, 10, -1, 2, 7, 1395}, - {5, 10, -1, 2, 7, 1405}, - {5, 9, -1, 2, 7, 1415}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_scr14.cpp b/intern/bmfont/intern/BMF_font_scr14.cpp deleted file mode 100644 index 596442885e1..00000000000 --- a/intern/bmfont/intern/BMF_font_scr14.cpp +++ /dev/null @@ -1,510 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_SCR14 - -static unsigned char bitmap_data[]= { - 0x80,0x80,0x00,0x80,0x80,0x80,0x80,0x80, - 0x80,0xa0,0xa0,0xa0,0xa0,0x50,0x50,0xfc, - 0x28,0x28,0x28,0x7e,0x14,0x14,0x20,0x70, - 0xa8,0x28,0x30,0x60,0xa0,0xa8,0x70,0x20, - 0x98,0x54,0x54,0x2c,0x10,0x68,0x54,0x54, - 0x32,0x74,0x88,0x8c,0x90,0x60,0x20,0x50, - 0x48,0x30,0x80,0x40,0x20,0x20,0x20,0x40, - 0x40,0x80,0x80,0x80,0x80,0x80,0x40,0x40, - 0x20,0x80,0x40,0x40,0x20,0x20,0x20,0x20, - 0x20,0x40,0x40,0x80,0x20,0xa8,0x70,0x70, - 0xa8,0x20,0x20,0x20,0xf8,0x20,0x20,0x80, - 0x40,0x40,0xc0,0xf8,0x80,0x80,0x80,0x80, - 0x40,0x40,0x20,0x20,0x10,0x10,0x08,0x08, - 0x70,0x88,0x88,0xc8,0xa8,0x98,0x88,0x88, - 0x70,0xe0,0x40,0x40,0x40,0x40,0x40,0x40, - 0xc0,0x40,0xf8,0x80,0x40,0x20,0x10,0x08, - 0x88,0x88,0x70,0x70,0x88,0x08,0x08,0x70, - 0x08,0x08,0x88,0x70,0x10,0x10,0x10,0xf8, - 0x90,0x50,0x50,0x30,0x10,0x70,0x88,0x08, - 0x08,0x08,0xf0,0x80,0x80,0xf8,0x70,0x88, - 0x88,0x88,0x88,0xf0,0x80,0x88,0x70,0x40, - 0x40,0x40,0x20,0x20,0x10,0x10,0x08,0xf8, - 0x70,0x88,0x88,0x88,0x70,0x88,0x88,0x88, - 0x70,0x70,0x88,0x08,0x08,0x78,0x88,0x88, - 0x88,0x70,0x80,0x80,0x00,0x00,0x80,0x80, - 0x80,0x40,0x40,0xc0,0x00,0x00,0x40,0x40, - 0x08,0x10,0x20,0x40,0x80,0x40,0x20,0x10, - 0x08,0xf8,0x00,0xf8,0x80,0x40,0x20,0x10, - 0x08,0x10,0x20,0x40,0x80,0x20,0x20,0x00, - 0x20,0x20,0x10,0x88,0x88,0x70,0x38,0x40, - 0x98,0xa8,0xa8,0x98,0x88,0x48,0x30,0x88, - 0x88,0xf8,0x88,0x50,0x50,0x50,0x20,0x20, - 0xf0,0x88,0x88,0x88,0xf0,0x88,0x88,0x88, - 0xf0,0x70,0x88,0x80,0x80,0x80,0x80,0x80, - 0x88,0x70,0xf0,0x88,0x88,0x88,0x88,0x88, - 0x88,0x88,0xf0,0xf8,0x80,0x80,0x80,0xf0, - 0x80,0x80,0x80,0xf8,0x80,0x80,0x80,0x80, - 0xf0,0x80,0x80,0x80,0xf8,0x68,0x98,0x88, - 0x88,0x98,0x80,0x80,0x88,0x70,0x88,0x88, - 0x88,0x88,0xf8,0x88,0x88,0x88,0x88,0xe0, - 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xe0, - 0x70,0x88,0x88,0x08,0x08,0x08,0x08,0x08, - 0x08,0x88,0x88,0x90,0xa0,0xc0,0xa0,0x90, - 0x88,0x88,0xf8,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x88,0x88,0x88,0xa8,0xa8, - 0xd8,0xd8,0x88,0x88,0x88,0x98,0x98,0xa8, - 0xa8,0xc8,0xc8,0x88,0x88,0x70,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0x70,0x80,0x80, - 0x80,0x80,0xf0,0x88,0x88,0x88,0xf0,0x08, - 0x10,0x70,0xa8,0x88,0x88,0x88,0x88,0x88, - 0x88,0x70,0x88,0x88,0x90,0xa0,0xf0,0x88, - 0x88,0x88,0xf0,0x70,0x88,0x08,0x08,0x70, - 0x80,0x80,0x88,0x70,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0xf8,0x70,0x88,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0x20,0x20, - 0x50,0x50,0x50,0x88,0x88,0x88,0x88,0x50, - 0x50,0xf8,0xa8,0xa8,0x88,0x88,0x88,0x88, - 0x88,0x88,0x50,0x50,0x20,0x50,0x50,0x88, - 0x88,0x20,0x20,0x20,0x20,0x20,0x50,0x50, - 0x88,0x88,0xf8,0x80,0x40,0x40,0x20,0x10, - 0x10,0x08,0xf8,0xf0,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0xf0,0x08,0x08, - 0x10,0x10,0x20,0x20,0x40,0x40,0x80,0x80, - 0xf0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x10,0x10,0xf0,0x88,0x50,0x20,0xfe,0x20, - 0x40,0x80,0x80,0x68,0x98,0x88,0x78,0x08, - 0x88,0x70,0xb0,0xc8,0x88,0x88,0x88,0xc8, - 0xb0,0x80,0x80,0x70,0x88,0x80,0x80,0x80, - 0x88,0x70,0x68,0x98,0x88,0x88,0x88,0x98, - 0x68,0x08,0x08,0x70,0x88,0x80,0xf8,0x88, - 0x88,0x70,0x40,0x40,0x40,0x40,0x40,0x40, - 0xf0,0x40,0x38,0x70,0x88,0x08,0x68,0x98, - 0x88,0x88,0x88,0x98,0x68,0x88,0x88,0x88, - 0x88,0x88,0xc8,0xb0,0x80,0x80,0x20,0x20, - 0x20,0x20,0x20,0x20,0xe0,0x00,0x20,0x60, - 0x90,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x70,0x00,0x10,0x88,0x88,0x90,0xe0,0xa0, - 0x90,0x88,0x80,0x80,0x20,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0xe0,0xa8,0xa8,0xa8, - 0xa8,0xa8,0xa8,0xd0,0x88,0x88,0x88,0x88, - 0x88,0xc8,0xb0,0x70,0x88,0x88,0x88,0x88, - 0x88,0x70,0x80,0x80,0x80,0xb0,0xc8,0x88, - 0x88,0x88,0xc8,0xb0,0x08,0x08,0x08,0x68, - 0x98,0x88,0x88,0x88,0x98,0x68,0x80,0x80, - 0x80,0x80,0x80,0xc8,0xb0,0x70,0x88,0x08, - 0x70,0x80,0x88,0x70,0x30,0x40,0x40,0x40, - 0x40,0x40,0xf0,0x40,0x40,0x68,0x98,0x88, - 0x88,0x88,0x88,0x88,0x20,0x20,0x50,0x50, - 0x88,0x88,0x88,0x50,0xa8,0xa8,0xa8,0xa8, - 0x88,0x88,0x88,0x88,0x50,0x20,0x50,0x88, - 0x88,0x70,0x88,0x08,0x68,0x98,0x88,0x88, - 0x88,0x88,0x88,0xf8,0x80,0x40,0x20,0x10, - 0x08,0xf8,0x18,0x20,0x20,0x20,0x20,0x20, - 0xc0,0x20,0x20,0x20,0x20,0x18,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0xc0,0x20,0x20,0x20,0x20,0x20, - 0x18,0x20,0x20,0x20,0x20,0xc0,0x98,0xb4, - 0x64,0x80,0x80,0x80,0x80,0x80,0x80,0x00, - 0x80,0x80,0x20,0x20,0x70,0x88,0x80,0x80, - 0x88,0x70,0x20,0x20,0xb0,0x48,0x40,0x40, - 0xf0,0x40,0x40,0x48,0x30,0x88,0x70,0x88, - 0x88,0x70,0x88,0x70,0x20,0xf8,0x20,0xf8, - 0x50,0x50,0x88,0x88,0x80,0x80,0x80,0x80, - 0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x80, - 0x70,0x88,0x10,0x28,0x48,0x88,0x90,0xa0, - 0x40,0x88,0x70,0xd8,0x38,0x44,0x92,0xaa, - 0xa2,0xaa,0x92,0x44,0x38,0xf8,0x00,0x68, - 0x90,0x70,0x10,0x60,0x12,0x24,0x48,0x90, - 0x48,0x24,0x12,0x08,0x08,0xf8,0xf0,0x38, - 0x44,0xaa,0xaa,0xb2,0xaa,0xb2,0x44,0x38, - 0xe0,0x60,0x90,0x90,0x60,0xf8,0x00,0x20, - 0x20,0xf8,0x20,0x20,0xe0,0x40,0x20,0xa0, - 0x40,0xc0,0x20,0x40,0x20,0xc0,0x80,0x40, - 0x80,0x80,0xb4,0xc8,0x88,0x88,0x88,0x88, - 0x28,0x28,0x28,0x28,0x28,0x68,0xa8,0xa8, - 0xa8,0x7c,0x80,0x80,0xc0,0x20,0x40,0xe0, - 0x40,0x40,0xc0,0x40,0xf8,0x00,0x70,0x88, - 0x88,0x88,0x70,0x90,0x48,0x24,0x12,0x24, - 0x48,0x90,0x04,0x9e,0x54,0x2c,0x14,0xe8, - 0x44,0x40,0xc0,0x40,0x1c,0x08,0x84,0x54, - 0x28,0x10,0xe8,0x44,0x40,0xc0,0x40,0x04, - 0x9e,0x54,0x2c,0xd4,0x28,0x44,0x20,0xc0, - 0x70,0x88,0x80,0x40,0x20,0x20,0x00,0x00, - 0x20,0x20,0x88,0x88,0xf8,0x88,0x50,0x50, - 0x20,0x20,0x00,0x20,0x40,0x88,0x88,0xf8, - 0x88,0x50,0x50,0x20,0x20,0x00,0x20,0x10, - 0x88,0x88,0xf8,0x88,0x50,0x50,0x20,0x20, - 0x00,0x50,0x20,0x88,0x88,0xf8,0x88,0x50, - 0x50,0x20,0x20,0x00,0xb0,0x68,0x88,0x88, - 0xf8,0x88,0x50,0x50,0x20,0x20,0x00,0xd8, - 0x88,0x88,0xf8,0x88,0x50,0x50,0x20,0x20, - 0x20,0x50,0x20,0x9c,0x90,0xf0,0x90,0x5c, - 0x50,0x30,0x30,0x1c,0x60,0x10,0x20,0x70, - 0x88,0x80,0x80,0x80,0x80,0x80,0x88,0x70, - 0xf8,0x80,0x80,0x80,0xf0,0x80,0x80,0xf8, - 0x00,0x20,0x40,0xf8,0x80,0x80,0x80,0xf0, - 0x80,0x80,0xf8,0x00,0x20,0x10,0xf8,0x80, - 0x80,0x80,0xf0,0x80,0x80,0xf8,0x00,0x50, - 0x20,0xf8,0x80,0x80,0x80,0xf0,0x80,0x80, - 0xf8,0x00,0xd8,0xe0,0x40,0x40,0x40,0x40, - 0x40,0x40,0xe0,0x00,0x40,0x80,0xe0,0x40, - 0x40,0x40,0x40,0x40,0x40,0xe0,0x00,0x40, - 0x20,0xe0,0x40,0x40,0x40,0x40,0x40,0x40, - 0xe0,0x00,0xa0,0x40,0x70,0x20,0x20,0x20, - 0x20,0x20,0x20,0x70,0x00,0xd8,0x78,0x44, - 0x44,0x44,0xf4,0x44,0x44,0x44,0x78,0x88, - 0x98,0x98,0xa8,0xa8,0xc8,0xc8,0x88,0x00, - 0xb0,0x68,0x70,0x88,0x88,0x88,0x88,0x88, - 0x88,0x70,0x00,0x20,0x40,0x70,0x88,0x88, - 0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x10, - 0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70, - 0x00,0x50,0x20,0x70,0x88,0x88,0x88,0x88, - 0x88,0x88,0x70,0x00,0xb0,0x68,0x70,0x88, - 0x88,0x88,0x88,0x88,0x88,0x70,0x00,0xd8, - 0x88,0x50,0x20,0x50,0x88,0xb8,0x44,0x64, - 0x64,0x54,0x4c,0x4c,0x44,0x3a,0x70,0x88, - 0x88,0x88,0x88,0x88,0x88,0x88,0x00,0x20, - 0x40,0x70,0x88,0x88,0x88,0x88,0x88,0x88, - 0x88,0x00,0x20,0x10,0x70,0x88,0x88,0x88, - 0x88,0x88,0x88,0x88,0x00,0x50,0x20,0x70, - 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x00, - 0xd8,0x20,0x20,0x20,0x20,0x50,0x50,0x88, - 0x88,0x00,0x20,0x10,0xe0,0x40,0x78,0x44, - 0x44,0x44,0x78,0x40,0xe0,0xb0,0x88,0x88, - 0x88,0x90,0xa0,0x90,0x90,0x60,0x68,0x98, - 0x88,0x78,0x08,0x88,0x70,0x00,0x20,0x40, - 0x68,0x98,0x88,0x78,0x08,0x88,0x70,0x00, - 0x20,0x10,0x68,0x98,0x88,0x78,0x08,0x88, - 0x70,0x00,0x50,0x20,0x68,0x98,0x88,0x78, - 0x08,0x88,0x70,0x00,0xb0,0x68,0x68,0x98, - 0x88,0x78,0x08,0x88,0x70,0x00,0xd8,0x68, - 0x98,0x88,0x78,0x08,0x88,0x70,0x00,0x20, - 0x50,0x20,0x6c,0x92,0x90,0x7e,0x12,0x92, - 0x6c,0x60,0x10,0x20,0x70,0x88,0x80,0x80, - 0x80,0x88,0x70,0x70,0x88,0x80,0xf8,0x88, - 0x88,0x70,0x00,0x20,0x40,0x70,0x88,0x80, - 0xf8,0x88,0x88,0x70,0x00,0x20,0x10,0x70, - 0x88,0x80,0xf8,0x88,0x88,0x70,0x00,0x50, - 0x20,0x70,0x88,0x80,0xf8,0x88,0x88,0x70, - 0x00,0xd8,0x20,0x20,0x20,0x20,0x20,0x20, - 0xe0,0x00,0x20,0x40,0x20,0x20,0x20,0x20, - 0x20,0x20,0xe0,0x00,0x20,0x10,0x20,0x20, - 0x20,0x20,0x20,0x20,0xe0,0x00,0xa0,0x40, - 0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x00, - 0xd8,0x70,0x88,0x88,0x88,0x88,0x88,0x78, - 0x10,0xd0,0x20,0xd0,0x88,0x88,0x88,0x88, - 0x88,0xc8,0xb0,0x00,0xb0,0x68,0x70,0x88, - 0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x40, - 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, - 0x20,0x10,0x70,0x88,0x88,0x88,0x88,0x88, - 0x70,0x00,0x50,0x20,0x70,0x88,0x88,0x88, - 0x88,0x88,0x70,0x00,0xb0,0x68,0x70,0x88, - 0x88,0x88,0x88,0x88,0x70,0x00,0xd8,0x10, - 0x10,0x00,0xfe,0x00,0x10,0x10,0xb8,0x44, - 0x64,0x54,0x4c,0x44,0x3a,0x68,0x98,0x88, - 0x88,0x88,0x88,0x88,0x00,0x20,0x40,0x68, - 0x98,0x88,0x88,0x88,0x88,0x88,0x00,0x20, - 0x10,0x68,0x98,0x88,0x88,0x88,0x88,0x88, - 0x00,0x50,0x20,0x68,0x98,0x88,0x88,0x88, - 0x88,0x88,0x00,0xd8,0x70,0x88,0x08,0x68, - 0x98,0x88,0x88,0x88,0x88,0x88,0x00,0x20, - 0x10,0xe0,0x40,0x58,0x64,0x44,0x44,0x44, - 0x64,0x58,0x40,0xc0,0x70,0x88,0x08,0x68, - 0x98,0x88,0x88,0x88,0x88,0x88,0x00,0xd8, -}; - -BMF_FontData BMF_font_scr14 = { - 0, -3, - 7, 11, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 16, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 7, -1}, - {1, 9, -3, 0, 7, 0}, - {3, 4, -2, -5, 7, 9}, - {7, 9, 0, 0, 7, 13}, - {5, 10, -1, 1, 7, 22}, - {7, 9, 0, 0, 7, 32}, - {6, 9, 0, 0, 7, 41}, - {3, 4, -2, -5, 7, 50}, - {3, 11, -2, 1, 7, 54}, - {3, 11, -2, 1, 7, 65}, - {5, 6, -1, -2, 7, 76}, - {5, 5, -1, -2, 7, 82}, - {2, 4, -2, 2, 7, 87}, - {5, 1, -1, -4, 7, 91}, - {1, 2, -3, 0, 7, 92}, - {5, 10, -1, 0, 7, 94}, - {5, 9, -1, 0, 7, 104}, - {3, 9, -2, 0, 7, 113}, - {5, 9, -1, 0, 7, 122}, - {5, 9, -1, 0, 7, 131}, - {5, 9, -1, 0, 7, 140}, - {5, 9, -1, 0, 7, 149}, - {5, 9, -1, 0, 7, 158}, - {5, 9, -1, 0, 7, 167}, - {5, 9, -1, 0, 7, 176}, - {5, 9, -1, 0, 7, 185}, - {1, 6, -3, 0, 7, 194}, - {2, 8, -2, 1, 7, 200}, - {5, 9, -1, 0, 7, 208}, - {5, 3, -1, -3, 7, 217}, - {5, 9, -1, 0, 7, 220}, - {5, 9, -1, 0, 7, 229}, - {5, 9, -1, 0, 7, 238}, - {5, 9, -1, 0, 7, 247}, - {5, 9, -1, 0, 7, 256}, - {5, 9, -1, 0, 7, 265}, - {5, 9, -1, 0, 7, 274}, - {5, 9, -1, 0, 7, 283}, - {5, 9, -1, 0, 7, 292}, - {5, 9, -1, 0, 7, 301}, - {5, 9, -1, 0, 7, 310}, - {3, 9, -2, 0, 7, 319}, - {5, 9, -1, 0, 7, 328}, - {5, 9, -1, 0, 7, 337}, - {5, 9, -1, 0, 7, 346}, - {5, 9, -1, 0, 7, 355}, - {5, 9, -1, 0, 7, 364}, - {5, 9, -1, 0, 7, 373}, - {5, 9, -1, 0, 7, 382}, - {5, 11, -1, 2, 7, 391}, - {5, 9, -1, 0, 7, 402}, - {5, 9, -1, 0, 7, 411}, - {5, 9, -1, 0, 7, 420}, - {5, 9, -1, 0, 7, 429}, - {5, 9, -1, 0, 7, 438}, - {5, 9, -1, 0, 7, 447}, - {5, 9, -1, 0, 7, 456}, - {5, 9, -1, 0, 7, 465}, - {5, 9, -1, 0, 7, 474}, - {4, 11, -2, 1, 7, 483}, - {5, 10, -1, 0, 7, 494}, - {4, 11, -1, 1, 7, 504}, - {5, 3, -1, -6, 7, 515}, - {7, 1, 0, 2, 7, 518}, - {3, 4, -2, -5, 7, 519}, - {5, 7, -1, 0, 7, 523}, - {5, 9, -1, 0, 7, 530}, - {5, 7, -1, 0, 7, 539}, - {5, 9, -1, 0, 7, 546}, - {5, 7, -1, 0, 7, 555}, - {5, 9, -1, 0, 7, 562}, - {5, 10, -1, 3, 7, 571}, - {5, 9, -1, 0, 7, 581}, - {3, 9, -2, 0, 7, 590}, - {4, 12, -1, 3, 7, 599}, - {5, 9, -1, 0, 7, 611}, - {3, 9, -2, 0, 7, 620}, - {5, 7, -1, 0, 7, 629}, - {5, 7, -1, 0, 7, 636}, - {5, 7, -1, 0, 7, 643}, - {5, 10, -1, 3, 7, 650}, - {5, 10, -1, 3, 7, 660}, - {5, 7, -1, 0, 7, 670}, - {5, 7, -1, 0, 7, 677}, - {4, 9, -1, 0, 7, 684}, - {5, 7, -1, 0, 7, 693}, - {5, 7, -1, 0, 7, 700}, - {5, 7, -1, 0, 7, 707}, - {5, 7, -1, 0, 7, 714}, - {5, 10, -1, 3, 7, 721}, - {5, 7, -1, 0, 7, 731}, - {5, 12, -1, 2, 7, 738}, - {1, 12, -3, 2, 7, 750}, - {5, 12, -1, 2, 7, 762}, - {6, 3, 0, -3, 7, 774}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {1, 9, -3, 2, 7, 777}, - {5, 10, -1, 0, 7, 786}, - {5, 9, -1, 0, 7, 796}, - {5, 6, -1, -3, 7, 805}, - {5, 9, -1, 0, 7, 811}, - {1, 12, -3, 2, 7, 820}, - {5, 11, -1, 2, 7, 832}, - {5, 1, -1, -8, 7, 843}, - {7, 9, 0, 0, 7, 844}, - {5, 7, -1, -2, 7, 853}, - {7, 7, 0, 0, 7, 860}, - {5, 3, -1, -3, 7, 867}, - {4, 1, -1, -4, 7, 870}, - {7, 9, 0, 0, 7, 871}, - {3, 1, -2, -8, 7, 880}, - {4, 4, -1, -4, 7, 881}, - {5, 7, -1, 0, 7, 885}, - {3, 5, -2, -5, 7, 892}, - {3, 5, -2, -5, 7, 897}, - {2, 2, -3, -8, 7, 902}, - {6, 8, -1, 2, 7, 904}, - {6, 10, 0, 1, 7, 912}, - {1, 2, -3, -3, 7, 922}, - {3, 3, -2, 3, 7, 924}, - {3, 5, -2, -5, 7, 927}, - {5, 7, -1, -2, 7, 932}, - {7, 7, 0, 0, 7, 939}, - {7, 10, 0, 0, 7, 946}, - {6, 11, 0, 1, 7, 956}, - {7, 9, 0, -1, 7, 967}, - {5, 10, -1, 3, 7, 976}, - {5, 11, -1, 0, 7, 986}, - {5, 11, -1, 0, 7, 997}, - {5, 11, -1, 0, 7, 1008}, - {5, 11, -1, 0, 7, 1019}, - {5, 10, -1, 0, 7, 1030}, - {5, 11, -1, 0, 7, 1040}, - {6, 9, 0, 0, 7, 1051}, - {5, 12, -1, 3, 7, 1060}, - {5, 11, -1, 0, 7, 1072}, - {5, 11, -1, 0, 7, 1083}, - {5, 11, -1, 0, 7, 1094}, - {5, 10, -1, 0, 7, 1105}, - {3, 11, -2, 0, 7, 1115}, - {3, 11, -2, 0, 7, 1126}, - {3, 11, -2, 0, 7, 1137}, - {5, 10, -1, 0, 7, 1148}, - {6, 9, 0, 0, 7, 1158}, - {5, 11, -1, 0, 7, 1167}, - {5, 11, -1, 0, 7, 1178}, - {5, 11, -1, 0, 7, 1189}, - {5, 11, -1, 0, 7, 1200}, - {5, 11, -1, 0, 7, 1211}, - {5, 10, -1, 0, 7, 1222}, - {5, 5, -1, -1, 7, 1232}, - {7, 9, 0, 0, 7, 1237}, - {5, 11, -1, 0, 7, 1246}, - {5, 11, -1, 0, 7, 1257}, - {5, 11, -1, 0, 7, 1268}, - {5, 10, -1, 0, 7, 1279}, - {5, 11, -1, 0, 7, 1289}, - {6, 9, 0, 0, 7, 1300}, - {5, 9, -1, 0, 7, 1309}, - {5, 10, -1, 0, 7, 1318}, - {5, 10, -1, 0, 7, 1328}, - {5, 10, -1, 0, 7, 1338}, - {5, 10, -1, 0, 7, 1348}, - {5, 9, -1, 0, 7, 1358}, - {5, 11, -1, 0, 7, 1367}, - {7, 7, 0, 0, 7, 1378}, - {5, 10, -1, 3, 7, 1385}, - {5, 10, -1, 0, 7, 1395}, - {5, 10, -1, 0, 7, 1405}, - {5, 10, -1, 0, 7, 1415}, - {5, 9, -1, 0, 7, 1425}, - {3, 10, -2, 0, 7, 1434}, - {4, 10, -2, 0, 7, 1444}, - {3, 10, -2, 0, 7, 1454}, - {5, 9, -2, 0, 7, 1464}, - {5, 11, -1, 0, 7, 1473}, - {5, 10, -1, 0, 7, 1484}, - {5, 10, -1, 0, 7, 1494}, - {5, 10, -1, 0, 7, 1504}, - {5, 10, -1, 0, 7, 1514}, - {5, 10, -1, 0, 7, 1524}, - {5, 9, -1, 0, 7, 1534}, - {7, 7, 0, 0, 7, 1543}, - {7, 7, 0, 0, 7, 1550}, - {5, 10, -1, 0, 7, 1557}, - {5, 10, -1, 0, 7, 1567}, - {5, 10, -1, 0, 7, 1577}, - {5, 9, -1, 0, 7, 1587}, - {5, 13, -1, 3, 7, 1596}, - {6, 11, 0, 2, 7, 1609}, - {5, 12, -1, 3, 7, 1620}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/BMF_font_scr15.cpp b/intern/bmfont/intern/BMF_font_scr15.cpp deleted file mode 100644 index 8490e999bdb..00000000000 --- a/intern/bmfont/intern/BMF_font_scr15.cpp +++ /dev/null @@ -1,525 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "BMF_FontData.h" -#include "BMF_Settings.h" - -#if BMF_INCLUDE_SCR15 - -static unsigned char bitmap_data[]= { - 0x80,0x80,0x00,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x90,0x90,0x90,0x90,0x48,0x48, - 0x48,0xfe,0x24,0x24,0x24,0x7f,0x12,0x12, - 0x20,0x70,0xa8,0xa8,0x28,0x30,0x60,0xa0, - 0xa8,0xa8,0x70,0x20,0x8c,0x52,0x52,0x2c, - 0x10,0x10,0x68,0x94,0x94,0x62,0x72,0x8c, - 0x84,0x8a,0x50,0x20,0x30,0x48,0x48,0x30, - 0x80,0x40,0x60,0x60,0x10,0x20,0x40,0x40, - 0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x20, - 0x10,0x80,0x40,0x20,0x20,0x10,0x10,0x10, - 0x10,0x10,0x20,0x20,0x40,0x80,0x20,0xa8, - 0x70,0x70,0xa8,0x20,0x10,0x10,0x10,0xfe, - 0x10,0x10,0x10,0x80,0x40,0x20,0x60,0x60, - 0xfc,0xc0,0xc0,0x80,0x80,0x40,0x40,0x20, - 0x20,0x10,0x10,0x08,0x08,0x04,0x04,0x78, - 0x84,0x84,0xc4,0xa4,0x94,0x8c,0x84,0x84, - 0x78,0xe0,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0xc0,0x40,0xfc,0x80,0x40,0x20,0x10, - 0x08,0x04,0x84,0x84,0x78,0x78,0x84,0x04, - 0x04,0x04,0x38,0x04,0x04,0x84,0x78,0x08, - 0x08,0x08,0xfc,0x88,0x48,0x48,0x28,0x18, - 0x08,0x78,0x84,0x04,0x04,0x04,0xf8,0x80, - 0x80,0x80,0xfc,0x78,0x84,0x84,0x84,0x84, - 0xf8,0x80,0x80,0x84,0x78,0x20,0x20,0x20, - 0x10,0x10,0x08,0x08,0x04,0x04,0xfc,0x78, - 0x84,0x84,0x84,0x84,0x78,0x84,0x84,0x84, - 0x78,0x78,0x84,0x04,0x04,0x7c,0x84,0x84, - 0x84,0x84,0x78,0xc0,0xc0,0x00,0x00,0x00, - 0xc0,0xc0,0x80,0x40,0xc0,0xc0,0x00,0x00, - 0x00,0xc0,0xc0,0x04,0x08,0x10,0x20,0x40, - 0x80,0x40,0x20,0x10,0x08,0x04,0xfc,0x00, - 0x00,0xfc,0x80,0x40,0x20,0x10,0x08,0x04, - 0x08,0x10,0x20,0x40,0x80,0x10,0x10,0x00, - 0x10,0x10,0x08,0x04,0x84,0x84,0x78,0x38, - 0x44,0x80,0x98,0xa4,0xa4,0x9c,0x84,0x48, - 0x30,0x84,0x84,0xfc,0x84,0x48,0x48,0x48, - 0x30,0x30,0x30,0xf8,0x84,0x84,0x84,0x84, - 0xf8,0x84,0x84,0x84,0xf8,0x78,0x84,0x84, - 0x80,0x80,0x80,0x80,0x84,0x84,0x78,0xf0, - 0x88,0x84,0x84,0x84,0x84,0x84,0x84,0x88, - 0xf0,0xfc,0x80,0x80,0x80,0x80,0xf8,0x80, - 0x80,0x80,0xfc,0x80,0x80,0x80,0x80,0x80, - 0xf8,0x80,0x80,0x80,0xfc,0x74,0x8c,0x84, - 0x84,0x84,0x9c,0x80,0x80,0x84,0x78,0x84, - 0x84,0x84,0x84,0x84,0xfc,0x84,0x84,0x84, - 0x84,0xe0,0x40,0x40,0x40,0x40,0x40,0x40, - 0x40,0x40,0xe0,0x70,0x88,0x88,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x84,0x84,0x88, - 0x90,0xa0,0xc0,0xa0,0x90,0x88,0x84,0xfc, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x82,0x82,0x92,0x92,0xaa,0xaa,0xc6, - 0xc6,0x82,0x82,0x84,0x8c,0x8c,0x94,0x94, - 0xa4,0xa4,0xc4,0xc4,0x84,0x78,0x84,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x78,0x80, - 0x80,0x80,0x80,0xf8,0x84,0x84,0x84,0x84, - 0xf8,0x04,0x08,0x10,0x78,0xa4,0x84,0x84, - 0x84,0x84,0x84,0x84,0x84,0x78,0x84,0x84, - 0x88,0x90,0xf8,0x84,0x84,0x84,0x84,0xf8, - 0x78,0x84,0x84,0x04,0x18,0x60,0x80,0x84, - 0x84,0x78,0x10,0x10,0x10,0x10,0x10,0x10, - 0x10,0x10,0x10,0xfe,0x78,0x84,0x84,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x30,0x30, - 0x30,0x48,0x48,0x48,0x84,0x84,0x84,0x84, - 0x44,0x44,0x44,0xaa,0xaa,0xaa,0x92,0x92, - 0x92,0x82,0x84,0x84,0x48,0x48,0x30,0x30, - 0x48,0x48,0x84,0x84,0x10,0x10,0x10,0x10, - 0x10,0x28,0x44,0x44,0x82,0x82,0xfc,0x80, - 0x40,0x40,0x20,0x10,0x08,0x08,0x04,0xfc, - 0xf0,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0xf0,0x04,0x04,0x08, - 0x08,0x10,0x10,0x20,0x20,0x40,0x40,0x80, - 0x80,0xf0,0x10,0x10,0x10,0x10,0x10,0x10, - 0x10,0x10,0x10,0x10,0x10,0xf0,0x88,0x50, - 0x20,0xff,0x20,0x40,0xc0,0xc0,0x74,0x88, - 0x88,0x78,0x08,0x88,0x70,0xb8,0xc4,0x84, - 0x84,0x84,0xc4,0xb8,0x80,0x80,0x80,0x78, - 0x84,0x80,0x80,0x80,0x84,0x78,0x74,0x8c, - 0x84,0x84,0x84,0x8c,0x74,0x04,0x04,0x04, - 0x78,0x84,0x80,0xfc,0x84,0x84,0x78,0x20, - 0x20,0x20,0x20,0x20,0x20,0xf8,0x20,0x20, - 0x1c,0x78,0x84,0x04,0x04,0x74,0x8c,0x84, - 0x84,0x84,0x8c,0x74,0x84,0x84,0x84,0x84, - 0x84,0xc4,0xb8,0x80,0x80,0x80,0x20,0x20, - 0x20,0x20,0x20,0x20,0xe0,0x00,0x20,0x20, - 0x70,0x88,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x38,0x00,0x08,0x08,0x84,0x88, - 0x90,0xe0,0xa0,0x90,0x88,0x80,0x80,0x80, - 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0xe0,0x92,0x92,0x92,0x92,0x92,0x92, - 0xec,0x84,0x84,0x84,0x84,0x84,0xc4,0xb8, - 0x78,0x84,0x84,0x84,0x84,0x84,0x78,0x80, - 0x80,0x80,0x80,0xb8,0xc4,0x84,0x84,0x84, - 0xc4,0xb8,0x04,0x04,0x04,0x04,0x74,0x8c, - 0x84,0x84,0x84,0x8c,0x74,0x80,0x80,0x80, - 0x80,0x80,0xc4,0xb8,0x78,0x84,0x04,0x78, - 0x80,0x84,0x78,0x1c,0x20,0x20,0x20,0x20, - 0x20,0xf8,0x20,0x20,0x74,0x8c,0x84,0x84, - 0x84,0x84,0x84,0x30,0x30,0x48,0x48,0x84, - 0x84,0x84,0x6c,0x92,0x92,0x92,0x92,0x82, - 0x82,0x84,0x84,0x48,0x30,0x48,0x84,0x84, - 0x78,0x84,0x04,0x04,0x74,0x8c,0x84,0x84, - 0x84,0x84,0x84,0xfc,0x80,0x40,0x20,0x10, - 0x08,0xfc,0x1c,0x20,0x20,0x20,0x20,0x20, - 0xc0,0x20,0x20,0x20,0x20,0x20,0x1c,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0xe0,0x10,0x10, - 0x10,0x10,0x10,0x0c,0x10,0x10,0x10,0x10, - 0x10,0xe0,0x98,0xb4,0x64,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x00,0x80,0x80,0x20, - 0x20,0x70,0x88,0x80,0x80,0x88,0x70,0x20, - 0x20,0xb8,0x44,0x40,0x40,0xf0,0x40,0x40, - 0x40,0x48,0x30,0x84,0x78,0x84,0x84,0x84, - 0x78,0x84,0x38,0x10,0x7c,0x10,0x7c,0x28, - 0x44,0x44,0x82,0x82,0x80,0x80,0x80,0x80, - 0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80, - 0x80,0x80,0x78,0x84,0x04,0x18,0x24,0x44, - 0x84,0x88,0x90,0x60,0x80,0x84,0x78,0xd8, - 0x38,0x44,0x92,0xaa,0xa2,0xaa,0x92,0x44, - 0x38,0xf8,0x00,0x68,0x90,0x70,0x10,0x60, - 0x09,0x12,0x24,0x48,0x90,0x48,0x24,0x12, - 0x09,0x04,0x04,0xfc,0xfc,0x38,0x44,0xaa, - 0xaa,0xb2,0xaa,0xb2,0x44,0x38,0xf0,0x60, - 0x90,0x90,0x60,0xfe,0x00,0x10,0x10,0x10, - 0xfe,0x10,0x10,0x10,0xf0,0x40,0x20,0x90, - 0x60,0xe0,0x10,0x60,0x10,0xe0,0x80,0x40, - 0x80,0x80,0x80,0xb4,0xc8,0x88,0x88,0x88, - 0x88,0x88,0x24,0x24,0x24,0x24,0x24,0x24, - 0x64,0xa4,0xa4,0xa4,0xa4,0x7e,0xc0,0xc0, - 0x20,0x40,0xe0,0x40,0x40,0xc0,0x40,0xf8, - 0x00,0x70,0x88,0x88,0x88,0x70,0x90,0x48, - 0x24,0x12,0x09,0x12,0x24,0x48,0x90,0x04, - 0x9e,0x54,0x2c,0x14,0xe8,0x44,0x42,0xc0, - 0x40,0x1e,0x08,0x84,0x52,0x2c,0x10,0xe8, - 0x44,0x42,0xc0,0x40,0x04,0x9e,0x54,0x2c, - 0xd4,0x28,0x44,0x22,0xc0,0x78,0x84,0x84, - 0x80,0x40,0x20,0x20,0x00,0x20,0x20,0x84, - 0x84,0xfc,0x84,0x48,0x48,0x30,0x30,0x00, - 0x20,0x40,0x84,0x84,0xfc,0x84,0x48,0x48, - 0x30,0x30,0x00,0x10,0x08,0x84,0x84,0xfc, - 0x84,0x48,0x48,0x30,0x30,0x00,0x48,0x30, - 0x84,0x84,0xfc,0x84,0x48,0x48,0x30,0x30, - 0x00,0x98,0x64,0x84,0x84,0xfc,0x84,0x48, - 0x48,0x30,0x30,0x00,0x6c,0x84,0x84,0xfc, - 0x84,0x48,0x48,0x30,0x30,0x30,0x48,0x30, - 0x9e,0x90,0x90,0xf0,0x90,0x5c,0x50,0x50, - 0x30,0x1e,0x30,0x08,0x10,0x78,0x84,0x84, - 0x80,0x80,0x80,0x80,0x84,0x84,0x78,0xfc, - 0x80,0x80,0x80,0xf8,0x80,0x80,0xfc,0x00, - 0x20,0x40,0xfc,0x80,0x80,0x80,0xf8,0x80, - 0x80,0xfc,0x00,0x10,0x08,0xfc,0x80,0x80, - 0x80,0xf8,0x80,0x80,0xfc,0x00,0x48,0x30, - 0xfc,0x80,0x80,0x80,0xf8,0x80,0x80,0xfc, - 0x00,0x6c,0xe0,0x40,0x40,0x40,0x40,0x40, - 0x40,0xe0,0x00,0x40,0x80,0xe0,0x40,0x40, - 0x40,0x40,0x40,0x40,0xe0,0x00,0x40,0x20, - 0xe0,0x40,0x40,0x40,0x40,0x40,0x40,0xe0, - 0x00,0x90,0x60,0x70,0x20,0x20,0x20,0x20, - 0x20,0x20,0x70,0x00,0xd8,0x78,0x44,0x42, - 0x42,0x42,0xf2,0x42,0x42,0x44,0x78,0x84, - 0x8c,0x94,0x94,0xa4,0xa4,0xc4,0x84,0x00, - 0x98,0x64,0x78,0x84,0x84,0x84,0x84,0x84, - 0x84,0x78,0x00,0x20,0x40,0x78,0x84,0x84, - 0x84,0x84,0x84,0x84,0x78,0x00,0x10,0x08, - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x78, - 0x00,0x48,0x30,0x78,0x84,0x84,0x84,0x84, - 0x84,0x84,0x78,0x00,0x98,0x64,0x78,0x84, - 0x84,0x84,0x84,0x84,0x84,0x78,0x00,0x6c, - 0x84,0x48,0x30,0x30,0x48,0x84,0xbc,0x42, - 0x62,0x52,0x52,0x4a,0x4a,0x46,0x42,0x3d, - 0x78,0x84,0x84,0x84,0x84,0x84,0x84,0x84, - 0x00,0x20,0x40,0x78,0x84,0x84,0x84,0x84, - 0x84,0x84,0x84,0x00,0x10,0x08,0x78,0x84, - 0x84,0x84,0x84,0x84,0x84,0x84,0x00,0x48, - 0x30,0x78,0x84,0x84,0x84,0x84,0x84,0x84, - 0x84,0x00,0x6c,0x10,0x10,0x10,0x10,0x28, - 0x44,0x44,0x82,0x00,0x10,0x08,0xe0,0x40, - 0x7c,0x42,0x42,0x42,0x42,0x7c,0x40,0xe0, - 0x98,0xa4,0x84,0x84,0x84,0x88,0xb0,0x88, - 0x88,0x70,0x74,0x88,0x88,0x78,0x08,0x88, - 0x70,0x00,0x20,0x40,0x74,0x88,0x88,0x78, - 0x08,0x88,0x70,0x00,0x20,0x10,0x74,0x88, - 0x88,0x78,0x08,0x88,0x70,0x00,0x48,0x30, - 0x74,0x88,0x88,0x78,0x08,0x88,0x70,0x00, - 0x98,0x64,0x74,0x88,0x88,0x78,0x08,0x88, - 0x70,0x00,0xd8,0x74,0x88,0x88,0x78,0x08, - 0x88,0x70,0x00,0x30,0x48,0x30,0x6c,0x92, - 0x90,0x7e,0x12,0x92,0x6c,0x30,0x08,0x10, - 0x78,0x84,0x80,0x80,0x80,0x84,0x78,0x78, - 0x84,0x80,0xfc,0x84,0x84,0x78,0x00,0x20, - 0x40,0x78,0x84,0x80,0xfc,0x84,0x84,0x78, - 0x00,0x10,0x08,0x78,0x84,0x80,0xfc,0x84, - 0x84,0x78,0x00,0x48,0x30,0x78,0x84,0x80, - 0xfc,0x84,0x84,0x78,0x00,0x6c,0x20,0x20, - 0x20,0x20,0x20,0x20,0xe0,0x00,0x40,0x80, - 0x20,0x20,0x20,0x20,0x20,0x20,0xe0,0x00, - 0x40,0x20,0x20,0x20,0x20,0x20,0x20,0x20, - 0xe0,0x00,0x90,0x60,0x10,0x10,0x10,0x10, - 0x10,0x10,0x70,0x00,0xd8,0x78,0x84,0x84, - 0x84,0x84,0x84,0x7c,0x04,0xc8,0x30,0xc8, - 0x84,0x84,0x84,0x84,0x84,0xc4,0xb8,0x00, - 0x98,0x64,0x78,0x84,0x84,0x84,0x84,0x84, - 0x78,0x00,0x20,0x40,0x78,0x84,0x84,0x84, - 0x84,0x84,0x78,0x00,0x10,0x08,0x78,0x84, - 0x84,0x84,0x84,0x84,0x78,0x00,0x48,0x30, - 0x78,0x84,0x84,0x84,0x84,0x84,0x78,0x00, - 0x98,0x64,0x78,0x84,0x84,0x84,0x84,0x84, - 0x78,0x00,0x00,0x6c,0x30,0x00,0x00,0xfc, - 0x00,0x00,0x30,0xbc,0x62,0x52,0x4a,0x46, - 0x42,0x3d,0x74,0x8c,0x84,0x84,0x84,0x84, - 0x84,0x00,0x20,0x40,0x74,0x8c,0x84,0x84, - 0x84,0x84,0x84,0x00,0x20,0x10,0x74,0x8c, - 0x84,0x84,0x84,0x84,0x84,0x00,0x48,0x30, - 0x74,0x8c,0x84,0x84,0x84,0x84,0x84,0x00, - 0x00,0x6c,0x78,0x84,0x04,0x04,0x74,0x8c, - 0x84,0x84,0x84,0x84,0x84,0x00,0x20,0x10, - 0xe0,0x40,0x40,0x5c,0x62,0x42,0x42,0x42, - 0x62,0x5c,0x40,0x40,0xc0,0x78,0x84,0x04, - 0x04,0x74,0x8c,0x84,0x84,0x84,0x84,0x84, - 0x00,0x00,0x6c, -}; - -BMF_FontData BMF_font_scr15 = { - 0, -4, - 8, 11, - { - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 20, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 8, -1}, - {1, 10, -3, 0, 8, 0}, - {4, 4, -2, -6, 8, 10}, - {8, 10, 0, 0, 8, 14}, - {5, 12, -1, 1, 8, 24}, - {7, 10, 0, 0, 8, 36}, - {7, 10, 0, 0, 8, 46}, - {3, 4, -2, -6, 8, 56}, - {4, 13, -2, 2, 8, 60}, - {4, 13, -2, 2, 8, 73}, - {5, 6, -1, -2, 8, 86}, - {7, 7, 0, -1, 8, 92}, - {3, 5, -2, 3, 8, 99}, - {6, 1, -1, -4, 8, 104}, - {2, 2, -3, 0, 8, 105}, - {6, 12, -1, 1, 8, 107}, - {6, 10, -1, 0, 8, 119}, - {3, 10, -3, 0, 8, 129}, - {6, 10, -1, 0, 8, 139}, - {6, 10, -1, 0, 8, 149}, - {6, 10, -1, 0, 8, 159}, - {6, 10, -1, 0, 8, 169}, - {6, 10, -1, 0, 8, 179}, - {6, 10, -1, 0, 8, 189}, - {6, 10, -1, 0, 8, 199}, - {6, 10, -1, 0, 8, 209}, - {2, 7, -3, 0, 8, 219}, - {2, 9, -3, 2, 8, 226}, - {6, 11, -1, 1, 8, 235}, - {6, 4, -1, -3, 8, 246}, - {6, 11, -1, 1, 8, 250}, - {6, 10, -1, 0, 8, 261}, - {6, 10, -1, 0, 8, 271}, - {6, 10, -1, 0, 8, 281}, - {6, 10, -1, 0, 8, 291}, - {6, 10, -1, 0, 8, 301}, - {6, 10, -1, 0, 8, 311}, - {6, 10, -1, 0, 8, 321}, - {6, 10, -1, 0, 8, 331}, - {6, 10, -1, 0, 8, 341}, - {6, 10, -1, 0, 8, 351}, - {3, 10, -2, 0, 8, 361}, - {5, 10, -1, 0, 8, 371}, - {6, 10, -1, 0, 8, 381}, - {6, 10, -1, 0, 8, 391}, - {7, 10, 0, 0, 8, 401}, - {6, 10, -1, 0, 8, 411}, - {6, 10, -1, 0, 8, 421}, - {6, 10, -1, 0, 8, 431}, - {6, 13, -1, 3, 8, 441}, - {6, 10, -1, 0, 8, 454}, - {6, 10, -1, 0, 8, 464}, - {7, 10, 0, 0, 8, 474}, - {6, 10, -1, 0, 8, 484}, - {6, 10, -1, 0, 8, 494}, - {7, 10, 0, 0, 8, 504}, - {6, 10, -1, 0, 8, 514}, - {7, 10, 0, 0, 8, 524}, - {6, 10, -1, 0, 8, 534}, - {4, 13, -2, 2, 8, 544}, - {6, 12, -1, 1, 8, 557}, - {4, 13, -2, 2, 8, 569}, - {5, 3, -1, -6, 8, 582}, - {8, 1, 0, 3, 8, 585}, - {3, 4, -2, -6, 8, 586}, - {6, 7, -1, 0, 8, 590}, - {6, 10, -1, 0, 8, 597}, - {6, 7, -1, 0, 8, 607}, - {6, 10, -1, 0, 8, 614}, - {6, 7, -1, 0, 8, 624}, - {6, 10, -1, 0, 8, 631}, - {6, 11, -1, 4, 8, 641}, - {6, 10, -1, 0, 8, 652}, - {3, 10, -2, 0, 8, 662}, - {5, 14, -1, 4, 8, 672}, - {6, 10, -1, 0, 8, 686}, - {3, 10, -2, 0, 8, 696}, - {7, 7, 0, 0, 8, 706}, - {6, 7, -1, 0, 8, 713}, - {6, 7, -1, 0, 8, 720}, - {6, 11, -1, 4, 8, 727}, - {6, 11, -1, 4, 8, 738}, - {6, 7, -1, 0, 8, 749}, - {6, 7, -1, 0, 8, 756}, - {6, 9, -1, 0, 8, 763}, - {6, 7, -1, 0, 8, 772}, - {6, 7, -1, 0, 8, 779}, - {7, 7, 0, 0, 8, 786}, - {6, 7, -1, 0, 8, 793}, - {6, 11, -1, 4, 8, 800}, - {6, 7, -1, 0, 8, 811}, - {6, 13, -1, 2, 8, 818}, - {1, 14, -3, 3, 8, 831}, - {6, 13, -1, 2, 8, 845}, - {6, 3, -1, -3, 8, 858}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0,0,0,0,0, -1}, - {0, 0, 0, 0, 8, -1}, - {1, 10, -3, 3, 8, 861}, - {5, 10, -1, 0, 8, 871}, - {6, 10, -1, 0, 8, 881}, - {6, 7, -1, -2, 8, 891}, - {7, 10, 0, 0, 8, 898}, - {1, 14, -3, 3, 8, 908}, - {6, 13, -1, 3, 8, 922}, - {5, 1, -1, -9, 8, 935}, - {7, 9, 0, 0, 8, 936}, - {5, 7, -1, -3, 8, 945}, - {8, 9, 0, 0, 8, 952}, - {6, 3, -1, -3, 8, 961}, - {6, 1, -1, -4, 8, 964}, - {7, 9, 0, 0, 8, 965}, - {4, 1, -2, -9, 8, 974}, - {4, 4, -2, -4, 8, 975}, - {7, 9, 0, 0, 8, 979}, - {4, 5, -2, -5, 8, 988}, - {4, 5, -2, -5, 8, 993}, - {2, 2, -3, -9, 8, 998}, - {6, 10, -1, 3, 8, 1000}, - {7, 12, 0, 2, 8, 1010}, - {2, 1, -3, -4, 8, 1022}, - {3, 3, -3, 3, 8, 1023}, - {3, 5, -3, -5, 8, 1026}, - {5, 7, -1, -3, 8, 1031}, - {8, 9, 0, 0, 8, 1038}, - {7, 10, 0, 0, 8, 1047}, - {7, 11, 0, 1, 8, 1057}, - {7, 9, 0, -1, 8, 1068}, - {6, 10, -1, 2, 8, 1077}, - {6, 11, -1, 0, 8, 1087}, - {6, 11, -1, 0, 8, 1098}, - {6, 11, -1, 0, 8, 1109}, - {6, 11, -1, 0, 8, 1120}, - {6, 10, -1, 0, 8, 1131}, - {6, 11, -1, 0, 8, 1141}, - {7, 10, 0, 0, 8, 1152}, - {6, 13, -1, 3, 8, 1162}, - {6, 11, -1, 0, 8, 1175}, - {6, 11, -1, 0, 8, 1186}, - {6, 11, -1, 0, 8, 1197}, - {6, 10, -1, 0, 8, 1208}, - {3, 11, -2, 0, 8, 1218}, - {3, 11, -2, 0, 8, 1229}, - {4, 11, -2, 0, 8, 1240}, - {5, 10, -1, 0, 8, 1251}, - {7, 10, 0, 0, 8, 1261}, - {6, 11, -1, 0, 8, 1271}, - {6, 11, -1, 0, 8, 1282}, - {6, 11, -1, 0, 8, 1293}, - {6, 11, -1, 0, 8, 1304}, - {6, 11, -1, 0, 8, 1315}, - {6, 10, -1, 0, 8, 1326}, - {6, 6, -1, -1, 8, 1336}, - {8, 10, 0, 0, 8, 1342}, - {6, 11, -1, 0, 8, 1352}, - {6, 11, -1, 0, 8, 1363}, - {6, 11, -1, 0, 8, 1374}, - {6, 10, -1, 0, 8, 1385}, - {7, 11, 0, 0, 8, 1395}, - {7, 10, 0, 0, 8, 1406}, - {6, 10, -1, 0, 8, 1416}, - {6, 10, -1, 0, 8, 1426}, - {6, 10, -1, 0, 8, 1436}, - {6, 10, -1, 0, 8, 1446}, - {6, 10, -1, 0, 8, 1456}, - {6, 9, -1, 0, 8, 1466}, - {6, 11, -1, 0, 8, 1475}, - {7, 7, 0, 0, 8, 1486}, - {6, 10, -1, 3, 8, 1493}, - {6, 10, -1, 0, 8, 1503}, - {6, 10, -1, 0, 8, 1513}, - {6, 10, -1, 0, 8, 1523}, - {6, 9, -1, 0, 8, 1533}, - {3, 10, -2, 0, 8, 1542}, - {3, 10, -2, 0, 8, 1552}, - {4, 10, -2, 0, 8, 1562}, - {5, 9, -1, 0, 8, 1572}, - {6, 11, -1, 0, 8, 1581}, - {6, 10, -1, 0, 8, 1592}, - {6, 10, -1, 0, 8, 1602}, - {6, 10, -1, 0, 8, 1612}, - {6, 10, -1, 0, 8, 1622}, - {6, 10, -1, 0, 8, 1632}, - {6, 10, -1, 0, 8, 1642}, - {6, 7, -1, 0, 8, 1652}, - {8, 7, 0, 0, 8, 1659}, - {6, 10, -1, 0, 8, 1666}, - {6, 10, -1, 0, 8, 1676}, - {6, 10, -1, 0, 8, 1686}, - {6, 10, -1, 0, 8, 1696}, - {6, 14, -1, 4, 8, 1706}, - {7, 13, 0, 3, 8, 1720}, - {6, 14, -1, 4, 8, 1733}, - }, - bitmap_data -}; - -#endif - diff --git a/intern/bmfont/intern/Makefile b/intern/bmfont/intern/Makefile deleted file mode 100644 index f420cfcf1e6..00000000000 --- a/intern/bmfont/intern/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# bmfont intern Makefile -# - -LIBNAME = bmfont -DIR = $(OCGDIR)/intern/$(LIBNAME) - -include nan_compile.mk - -CCFLAGS += $(LEVEL_2_CPP_WARNINGS) - -CPPFLAGS += -I. -CPPFLAGS += -I.. -CPPFLAGS += -I$(OPENGL_HEADERS) - diff --git a/intern/bmfont/make/msvc_6_0/bmfont.dsp b/intern/bmfont/make/msvc_6_0/bmfont.dsp deleted file mode 100644 index a9d2d9722e1..00000000000 --- a/intern/bmfont/make/msvc_6_0/bmfont.dsp +++ /dev/null @@ -1,176 +0,0 @@ -# Microsoft Developer Studio Project File - Name="bmfont" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=bmfont - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "bmfont.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "bmfont.mak" CFG="bmfont - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "bmfont - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "bmfont - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "bmfont - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\bmfont" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\bmfont" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /I "../../intern" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\bmfont\libbmfont.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copying BMFONT files library (release target) to lib tree. -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\bmfont\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\bmfont\*.lib ..\..\..\..\..\lib\windows\bmfont\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "bmfont - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\bmfont\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\bmfont\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../.." /I "../../intern" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\bmfont\debug\libbmfont.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copying BMFONT files library (debug target) to lib tree. -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\bmfont\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\bmfont\debug\*.lib ..\..\..\..\..\lib\windows\bmfont\lib\debug\*.a ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "bmfont - Win32 Release" -# Name "bmfont - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\BMF_Api.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_BitmapFont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_helv10.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_helv12.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_helvb10.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_helvb12.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_helvb14.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_helvb8.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_scr12.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_scr14.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_font_scr15.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\BMF_BitmapFont.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BMF_FontData.h -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\BMF_Api.h -# End Source File -# Begin Source File - -SOURCE=..\..\BMF_Fonts.h -# End Source File -# Begin Source File - -SOURCE=..\..\BMF_Settings.h -# End Source File -# End Group -# End Group -# End Target -# End Project diff --git a/intern/bmfont/make/msvc_6_0/bmfont.dsw b/intern/bmfont/make/msvc_6_0/bmfont.dsw deleted file mode 100644 index d2e2f94cd0b..00000000000 --- a/intern/bmfont/make/msvc_6_0/bmfont.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "bmfont"=.\bmfont.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/intern/bmfont/make/msvc_7_0/bmfont.sln b/intern/bmfont/make/msvc_7_0/bmfont.sln deleted file mode 100644 index 7f1979a8273..00000000000 --- a/intern/bmfont/make/msvc_7_0/bmfont.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmfont", "bmfont.vcproj", "{8CDFE9DC-F28C-4E1F-9389-3066BB0AB09F}" -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {8CDFE9DC-F28C-4E1F-9389-3066BB0AB09F}.Debug.ActiveCfg = Debug|Win32 - {8CDFE9DC-F28C-4E1F-9389-3066BB0AB09F}.Debug.Build.0 = Debug|Win32 - {8CDFE9DC-F28C-4E1F-9389-3066BB0AB09F}.Release.ActiveCfg = Release|Win32 - {8CDFE9DC-F28C-4E1F-9389-3066BB0AB09F}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/intern/bmfont/make/msvc_7_0/bmfont.vcproj b/intern/bmfont/make/msvc_7_0/bmfont.vcproj deleted file mode 100644 index 089130bc5e0..00000000000 --- a/intern/bmfont/make/msvc_7_0/bmfont.vcproj +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/intern/bmfont/test/Makefile b/intern/bmfont/test/Makefile deleted file mode 100644 index 135db74f38b..00000000000 --- a/intern/bmfont/test/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# Test the bmfont module -# - -LIBNAME = bmfont -SOURCEDIR = intern/$(LIBNAME)/test -DIR = $(OCGDIR)/$(SOURCEDIR) -DIRS = simpletest - -include nan_subdirs.mk -include nan_compile.mk -include nan_link.mk - -TESTLIBS = $(OCGDIR)/intern/$(LIBNAME)/$(DEBUG_DIR)lib$(LIBNAME).a -TESTLIBS += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a -TESTLIBS += $(LCGDIR)/ghost/$(DEBUG_DIR)lib/libghost.a - - -ifeq ($(OS),$(findstring $(OS), "beos darwin linux freebsd openbsd")) - TESTLIBS += -L/usr/X11R6/lib -lglut -pthread -endif - -ifeq ($(OS),$(findstring $(OS), "solaris")) - TESTLIBS += -L/usr/openwin/lib -lglut -lX11 -lGL -lGLU -lXmu -endif - - -all debug:: - @echo "****> linking $@ in $(SOURCEDIR)" - $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)BMF_Test $(DIR)/BMF_Test.o $(TESTLIBS) - -clean:: - $(RM) $(DIR)/BMF_Test $(DIR)/debug/BMF_Test - -test:: $(DIR)/BMF_Test - $(DIR)/BMF_Test $(NAN_TEST_VERBOSITY) - diff --git a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp b/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp deleted file mode 100644 index 13e6e65f706..00000000000 --- a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsp +++ /dev/null @@ -1,109 +0,0 @@ -# Microsoft Developer Studio Project File - Name="BMF_Test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=BMF_Test - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BMF_Test.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BMF_Test.mak" CFG="BMF_Test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BMF_Test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "BMF_Test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BMF_Test - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test" -# PROP Intermediate_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../" /I "../../../../../lib/windows/string/include" /I "../../../../../lib/windows/ghost/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libstring.a libghost.a glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../../../lib/windows/string/lib" /libpath:"../../../../../lib/windows/ghost/lib" - -!ELSEIF "$(CFG)" == "BMF_Test - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test/debug" -# PROP Intermediate_Dir "../../../../../../obj/windows/intern/BMF_bmfont/test/debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../" /I "../../../../../lib/windows/string/include" /I "../../../../../lib/windows/ghost/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib opengl32.lib libstring.a libghost.a user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../../../lib/windows/string/lib" /libpath:"../../../../../lib/windows/ghost/lib" - -!ENDIF - -# Begin Target - -# Name "BMF_Test - Win32 Release" -# Name "BMF_Test - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\intern\BMF_glut_helb8.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\intern\BMF_glut_helb8.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\BMF_Test.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw b/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw deleted file mode 100644 index 5baacb9adf7..00000000000 --- a/intern/bmfont/test/make/msvc_6_0/BMF_Test.dsw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "BMF_Test"=.\BMF_Test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name BMF_bmfont - End Project Dependency -}}} - -############################################################################### - -Project: "BMF_bmfont"=..\..\..\make\msvc_6_0\BMF_bmfont.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/intern/bmfont/test/simpletest/BMF_Test.cpp b/intern/bmfont/test/simpletest/BMF_Test.cpp deleted file mode 100644 index 93a55042a4f..00000000000 --- a/intern/bmfont/test/simpletest/BMF_Test.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * Simple test file for the bitmap font library using GHOST. - * @author Maarten Gribnau - * @date November 15, 2001 - */ - -#include - -#ifdef HAVE_CONFIG_H -#include -#endif - -#define FALSE 0 -#define TRUE 1 - -#if defined(WIN32) || defined(__APPLE__) -#ifdef WIN32 -#include -#include -#else // WIN32 -// __APPLE__ is defined -#include -#endif // WIN32 -#else // defined(WIN32) || defined(__APPLE__) -#include -#endif // defined(WIN32) || defined(__APPLE__) - - -#include "STR_String.h" -#include "GHOST_Rect.h" - -#include "GHOST_ISystem.h" -#include "GHOST_IEvent.h" -#include "GHOST_IEventConsumer.h" - -#include "BMF_Api.h" - -static class Application* fApp; -static GHOST_ISystem* fSystem = 0; - - -static void drawGL() -{ - GLint x = 10, y = 10; - - ::glRasterPos2i(x, y); - BMF_Font *font = BMF_GetFont(BMF_kHelvetica10); - BMF_DrawString(font, "Helvetica 10 point"); - y += 14; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kHelvetica12); - BMF_DrawString(font, "Helvetica 12 point"); - y += 16; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kHelveticaBold8); - BMF_DrawString(font, "Helvetica Bold 8 point"); - y += 12; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kHelveticaBold10); - BMF_DrawString(font, "Helvetica Bold 10 point"); - y += 14; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kHelveticaBold12); - BMF_DrawString(font, "Helvetica Bold 12 point"); - y += 16; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kHelveticaBold14); - BMF_DrawString(font, "Helvetica Bold 14 point"); - y += 18; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kScreen12); - BMF_DrawString(font, "Screen 12 point"); - y += 16; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kScreen14); - BMF_DrawString(font, "Screen 14 point"); - y += 18; - ::glRasterPos2i(x, y); - font = BMF_GetFont(BMF_kScreen15); - BMF_DrawString(font, "Screen 15 point"); -} - - -static void setViewPortGL(GHOST_IWindow* window) -{ - window->activateDrawingContext(); - GHOST_Rect bnds; - window->getClientBounds(bnds); - - ::glViewport(0, 0, bnds.getWidth(), bnds.getHeight()); - - ::glMatrixMode(GL_PROJECTION); - ::glLoadIdentity(); - ::glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); - - ::glClearColor(.2f,0.0f,0.0f,0.0f); - ::glClear(GL_COLOR_BUFFER_BIT); -} - - - -class Application : public GHOST_IEventConsumer { -public: - Application(GHOST_ISystem* system); - virtual bool processEvent(GHOST_IEvent* event); - - GHOST_ISystem* m_system; - GHOST_IWindow* m_mainWindow; - bool m_exitRequested; -}; - - -Application::Application(GHOST_ISystem* system) - : m_system(system), m_mainWindow(0), m_exitRequested(false) -{ - fApp = this; - - // Create the main window - STR_String title1 ("gears - main window"); - m_mainWindow = system->createWindow(title1, 10, 64, 320, 200, GHOST_kWindowStateNormal, GHOST_kDrawingContextTypeOpenGL,FALSE); - if (!m_mainWindow) { - std::cout << "could not create main window\n"; - exit(-1); - } -} - - -bool Application::processEvent(GHOST_IEvent* event) -{ - bool handled = true; - - switch (event->getType()) { - case GHOST_kEventWindowClose: - { - GHOST_IWindow* window2 = event->getWindow(); - if (window2 == m_mainWindow) { - exit(0); - } else { - m_system->disposeWindow(window2); - } - } - break; - - case GHOST_kEventWindowActivate: - handled = false; - break; - case GHOST_kEventWindowDeactivate: - handled = false; - break; - case GHOST_kEventWindowUpdate: - { - GHOST_IWindow* window2 = event->getWindow(); - if (!m_system->validWindow(window2)) break; - { - setViewPortGL(window2); - drawGL(); - window2->swapBuffers(); - } - } - break; - - default: - handled = false; - break; - } - return handled; -} - - -int main(int /*argc*/, char** /*argv*/) -{ - // Create the system - GHOST_ISystem::createSystem(); - fSystem = GHOST_ISystem::getSystem(); - - if (fSystem) { - // Create an application object - Application app (fSystem); - - // Add the application as event consumer - fSystem->addEventConsumer(&app); - - // Enter main loop - while (!app.m_exitRequested) { - fSystem->processEvents(TRUE); - fSystem->dispatchEvents(); - } - } - - // Dispose the system - GHOST_ISystem::disposeSystem(); - - return 0; -} - diff --git a/intern/bmfont/test/simpletest/Makefile b/intern/bmfont/test/simpletest/Makefile deleted file mode 100644 index 5c5e32f2ed2..00000000000 --- a/intern/bmfont/test/simpletest/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# Test the bmfont module -# - -LIBNAME = bmfont -DIR = $(OCGDIR)/intern/$(LIBNAME)/test - -# we don't want a library here, only object files: -ALLTARGETS = $(OBJS) - -include nan_compile.mk - -CCFLAGS += $(LEVEL_2_CPP_WARNINGS) - -CPPFLAGS = -I../.. -CPPFLAGS += -I../../intern -CPPFLAGS += -I$(OPENGL_HEADERS) -CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_GHOST)/include diff --git a/intern/boolop/Makefile b/intern/boolop/Makefile index 4058c4ca7c1..a7a08f665c7 100644 --- a/intern/boolop/Makefile +++ b/intern/boolop/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # bsp main makefile. @@ -38,16 +40,13 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_BOOLOP) ] || mkdir $(NAN_BOOLOP) @[ -d $(NAN_BOOLOP)/include ] || mkdir $(NAN_BOOLOP)/include - @[ -d $(NAN_BOOLOP)/lib ] || mkdir $(NAN_BOOLOP)/lib - @[ -d $(NAN_BOOLOP)/lib/debug ] || mkdir $(NAN_BOOLOP)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libboolop.a $(NAN_BOOLOP)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libboolop.a $(NAN_BOOLOP)/lib/debug/ + @[ -d $(NAN_BOOLOP)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_BOOLOP)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libboolop.a $(NAN_BOOLOP)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_BOOLOP)/lib/libboolop.a - ranlib $(NAN_BOOLOP)/lib/debug/libboolop.a + ranlib $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a endif @../tools/cpifdiff.sh extern/*.h $(NAN_BOOLOP)/include/ diff --git a/intern/boolop/SConscript b/intern/boolop/SConscript index bec263f251f..6a85b2d69be 100644 --- a/intern/boolop/SConscript +++ b/intern/boolop/SConscript @@ -8,7 +8,7 @@ incs += ' ../../source/blender/makesdna ../../intern/guardedalloc' incs += ' ../../source/blender/blenlib' if (env['OURPLATFORM'] == 'win32-mingw'): - env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype=['common','intern'], priority = [30,85] ) + env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='intern', priority = 5 ) else: - env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='common', priority = 5 ) + env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='intern', priority = 5 ) diff --git a/intern/boolop/intern/BOP_Merge2.cpp b/intern/boolop/intern/BOP_Merge2.cpp index bbf3f8ba702..e2367d1319e 100644 --- a/intern/boolop/intern/BOP_Merge2.cpp +++ b/intern/boolop/intern/BOP_Merge2.cpp @@ -1,6 +1,6 @@ /** * - * $Id: BOP_Merge22.cpp 14444 2008-04-16 22:40:48Z hos $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -294,8 +294,8 @@ void BOP_Merge2::cleanup( void ) BOP_Vertexs v = m_mesh->getVertexs(); for( BOP_IT_Vertexs it = v.begin(); it != v.end(); ++it ) { if( (*it)->getTAG() != BROKEN) { - BOP_Indexs edges = (*it)->getEdges(); - for(BOP_IT_Indexs i = edges.begin();i!=edges.end();i++) + BOP_Indexs iedges = (*it)->getEdges(); + for(BOP_IT_Indexs i = iedges.begin();i!=iedges.end();i++) if( m_mesh->getEdge((*i))->getUsed( ) == false) (*it)->removeEdge( *i ); if( (*it)->getEdges().size() == 0 ) (*it)->setTAG(BROKEN); } @@ -432,8 +432,8 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) vert->setTAG(BROKEN); for(BOP_IT_Indexs it = edges.begin(); it != edges.end(); ++it ) { - BOP_Edge *edge = m_mesh->getEdge(*it); - edge->setUsed(false); + BOP_Edge *tedge = m_mesh->getEdge(*it); + tedge->setUsed(false); } didMerge = true; } diff --git a/intern/boolop/intern/BOP_Misc.h b/intern/boolop/intern/BOP_Misc.h index d021579d161..ce963b5ce92 100644 --- a/intern/boolop/intern/BOP_Misc.h +++ b/intern/boolop/intern/BOP_Misc.h @@ -1,6 +1,6 @@ /** * - * $Id: BOP_Misc.h 14444 2008-04-16 22:40:48Z khughes $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/intern/boolop/make/msvc_6_0/boolop.dsp b/intern/boolop/make/msvc_6_0/boolop.dsp index f8a072b4531..d4e0025adc2 100644 --- a/intern/boolop/make/msvc_6_0/boolop.dsp +++ b/intern/boolop/make/msvc_6_0/boolop.dsp @@ -1,222 +1,222 @@ -# Microsoft Developer Studio Project File - Name="boolop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=boolop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "boolop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "boolop.mak" CFG="boolop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "boolop - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "boolop - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "boolop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\source\blender\makesdna\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "../../extern" /I "..\..\..\..\..\lib\windows\guardedalloc\include\\" /I "..\..\..\..\source\blender\blenlib\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO copy to lib folder XCOPY /Y .\release\*.lib ..\..\..\..\..\lib\windows\boolop\lib\*.lib -# End Special Build Tool - -!ELSEIF "$(CFG)" == "boolop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\blender\makesdna\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "../../extern" /I "..\..\..\..\..\lib\windows\guardedalloc\include\\" /I "..\..\..\..\source\blender\blenlib\\" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "boolop - Win32 Release" -# Name "boolop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\BOP_BBox.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_BSPNode.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_BSPTree.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Edge.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Face.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Face2Face.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Interface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_MathUtils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Merge.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Mesh.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Segment.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Splitter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Tag.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Triangulator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Vertex.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\intern\BOP_BBox.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_BSPNode.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_BSPTree.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Chrono.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Edge.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Face.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Face2Face.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Indexs.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_MathUtils.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Merge.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Mesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Segment.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Splitter.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Tag.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Triangulator.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BOP_Vertex.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="boolop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=boolop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "boolop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "boolop.mak" CFG="boolop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "boolop - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "boolop - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "boolop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\source\blender\makesdna\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "../../extern" /I "..\..\..\..\..\lib\windows\guardedalloc\include\\" /I "..\..\..\..\source\blender\blenlib\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO copy to lib folder XCOPY /Y .\release\*.lib ..\..\..\..\..\lib\windows\boolop\lib\*.lib +# End Special Build Tool + +!ELSEIF "$(CFG)" == "boolop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\blender\makesdna\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "../../extern" /I "..\..\..\..\..\lib\windows\guardedalloc\include\\" /I "..\..\..\..\source\blender\blenlib\\" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "boolop - Win32 Release" +# Name "boolop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\intern\BOP_BBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_BSPNode.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_BSPTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Edge.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Face.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Face2Face.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Interface.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_MathUtils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Merge.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Mesh.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Segment.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Splitter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Tag.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Triangulator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Vertex.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\intern\BOP_BBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_BSPNode.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_BSPTree.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Chrono.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Edge.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Face.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Face2Face.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Indexs.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_MathUtils.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Merge.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Mesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Segment.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Splitter.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Tag.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Triangulator.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BOP_Vertex.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/boolop/make/msvc_9_0/boolop.vcproj b/intern/boolop/make/msvc_9_0/boolop.vcproj new file mode 100644 index 00000000000..7fe83962695 --- /dev/null +++ b/intern/boolop/make/msvc_9_0/boolop.vcproj @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/bsp/Makefile b/intern/bsp/Makefile index fd106acab83..cd1653206a6 100644 --- a/intern/bsp/Makefile +++ b/intern/bsp/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # bsp main makefile. @@ -38,19 +40,14 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_BSP) ] || mkdir $(NAN_BSP) @[ -d $(NAN_BSP)/include ] || mkdir $(NAN_BSP)/include - @[ -d $(NAN_BSP)/lib ] || mkdir $(NAN_BSP)/lib - @[ -d $(NAN_BSP)/lib/debug ] || mkdir $(NAN_BSP)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libbsp.a $(NAN_BSP)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libbsp.a $(NAN_BSP)/lib/debug/ + @[ -d $(NAN_BSP)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_BSP)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libbsp.a $(NAN_BSP)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_BSP)/lib/libbsp.a - ranlib $(NAN_BSP)/lib/debug/libbsp.a + ranlib $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a endif @../tools/cpifdiff.sh extern/*.h $(NAN_BSP)/include/ - - diff --git a/intern/bsp/SConscript b/intern/bsp/SConscript index 39f278625a9..2ecc280f135 100644 --- a/intern/bsp/SConscript +++ b/intern/bsp/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('intern/*.cpp') incs = 'intern ../container ../moto/include ../memutil' if (env['OURPLATFORM'] == 'win32-mingw'): - env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype=['common','intern'], priority=[26,69] ) -else: env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=26 ) +else: + env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=20 ) diff --git a/intern/bsp/make/msvc6_0/bsplib.dsp b/intern/bsp/make/msvc6_0/bsplib.dsp index 00bac967221..703a6326d3a 100644 --- a/intern/bsp/make/msvc6_0/bsplib.dsp +++ b/intern/bsp/make/msvc6_0/bsplib.dsp @@ -1,138 +1,138 @@ -# Microsoft Developer Studio Project File - Name="bsplib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=bsplib - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "bsplib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "bsplib.mak" CFG="bsplib - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "bsplib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "bsplib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "bsplib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\bsp\" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\bsp\" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /I "../../../../../lib/windows/memutil/include" /I "../.." /I "../../../../../lib/windows/moto/include" /I "../../../../../lib/windows/container/include" /I "..\..\..\container" /I "..\..\..\moto\include" /I "..\..\..\memutil" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\bsp\libbsp.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\bsp\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\bsp\*.lib ..\..\..\..\..\lib\windows\bsp\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "bsplib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\bsp\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\bsp\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../lib/windows/memutil" /I "../.." /I "../../../../../lib/windows/moto/include" /I "../../../../../lib/windows/container/include" /I "../../../../../lib/windows/memutil/include" /I "..\..\..\container" /I "..\..\..\moto\include" /I "..\..\..\memutil" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\bsp\debug\libbsp.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\bsp\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\bsp\debug\*.lib ..\..\..\..\..\lib\windows\bsp\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\bsp\debug\vc60.* ..\..\..\..\..\lib\windows\bsp\lib\debug\ ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "bsplib - Win32 Release" -# Name "bsplib - Win32 Debug" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\BSP_CSGException.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BSP_CSGISplitter.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BSP_CSGMesh.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BSP_CSGMesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BSP_CSGMesh_CFIterator.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BSP_MeshPrimitives.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\BSP_MeshPrimitives.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\CSG_BooleanOps.cpp -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\extern\CSG_BooleanOps.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="bsplib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=bsplib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "bsplib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "bsplib.mak" CFG="bsplib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "bsplib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "bsplib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "bsplib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\bsp\" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\bsp\" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /I "../../../../../lib/windows/memutil/include" /I "../.." /I "../../../../../lib/windows/moto/include" /I "../../../../../lib/windows/container/include" /I "..\..\..\container" /I "..\..\..\moto\include" /I "..\..\..\memutil" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\bsp\libbsp.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\bsp\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\bsp\*.lib ..\..\..\..\..\lib\windows\bsp\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "bsplib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\bsp\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\bsp\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../lib/windows/memutil" /I "../.." /I "../../../../../lib/windows/moto/include" /I "../../../../../lib/windows/container/include" /I "../../../../../lib/windows/memutil/include" /I "..\..\..\container" /I "..\..\..\moto\include" /I "..\..\..\memutil" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\bsp\debug\libbsp.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\bsp\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\bsp\debug\*.lib ..\..\..\..\..\lib\windows\bsp\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\bsp\debug\vc60.* ..\..\..\..\..\lib\windows\bsp\lib\debug\ ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "bsplib - Win32 Release" +# Name "bsplib - Win32 Debug" +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\intern\BSP_CSGException.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BSP_CSGISplitter.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BSP_CSGMesh.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BSP_CSGMesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BSP_CSGMesh_CFIterator.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BSP_MeshPrimitives.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\BSP_MeshPrimitives.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\CSG_BooleanOps.cpp +# End Source File +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\extern\CSG_BooleanOps.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/bsp/make/msvc6_0/bsplib.dsw b/intern/bsp/make/msvc6_0/bsplib.dsw index 1827dc3746e..de8cdcd1d33 100644 --- a/intern/bsp/make/msvc6_0/bsplib.dsw +++ b/intern/bsp/make/msvc6_0/bsplib.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "bsplib"=.\bsplib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "bsplib"=.\bsplib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/bsp/make/msvc_9_0/bsplib.vcproj b/intern/bsp/make/msvc_9_0/bsplib.vcproj new file mode 100644 index 00000000000..a1b16d5b93f --- /dev/null +++ b/intern/bsp/make/msvc_9_0/bsplib.vcproj @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp index aaa45273845..4474eaa5d90 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp +++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp @@ -1,126 +1,126 @@ -# Microsoft Developer Studio Project File - Name="BSP_GhostTest" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=BSP_GhostTest - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BSP_GhostTest.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BSP_GhostTest.mak" CFG="BSP_GhostTest - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BSP_GhostTest - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "BSP_GhostTest - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BSP_GhostTest - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" - -!ELSEIF "$(CFG)" == "BSP_GhostTest - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" - -!ENDIF - -# Begin Target - -# Name "BSP_GhostTest - Win32 Release" -# Name "BSP_GhostTest - Win32 Debug" -# Begin Source File - -SOURCE=.\BSP_GhostTest3D.cpp -# End Source File -# Begin Source File - -SOURCE=.\BSP_GhostTest3D.h -# End Source File -# Begin Source File - -SOURCE=.\BSP_MeshDrawer.cpp -# End Source File -# Begin Source File - -SOURCE=.\BSP_MeshDrawer.h -# End Source File -# Begin Source File - -SOURCE=.\BSP_PlyLoader.cpp -# End Source File -# Begin Source File - -SOURCE=.\BSP_PlyLoader.h -# End Source File -# Begin Source File - -SOURCE=.\BSP_TMesh.h -# End Source File -# Begin Source File - -SOURCE=.\main.cpp -# End Source File -# Begin Source File - -SOURCE=.\ply.h -# End Source File -# Begin Source File - -SOURCE=.\plyfile.c -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BSP_GhostTest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=BSP_GhostTest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BSP_GhostTest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BSP_GhostTest.mak" CFG="BSP_GhostTest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BSP_GhostTest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "BSP_GhostTest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BSP_GhostTest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" + +!ELSEIF "$(CFG)" == "BSP_GhostTest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" + +!ENDIF + +# Begin Target + +# Name "BSP_GhostTest - Win32 Release" +# Name "BSP_GhostTest - Win32 Debug" +# Begin Source File + +SOURCE=.\BSP_GhostTest3D.cpp +# End Source File +# Begin Source File + +SOURCE=.\BSP_GhostTest3D.h +# End Source File +# Begin Source File + +SOURCE=.\BSP_MeshDrawer.cpp +# End Source File +# Begin Source File + +SOURCE=.\BSP_MeshDrawer.h +# End Source File +# Begin Source File + +SOURCE=.\BSP_PlyLoader.cpp +# End Source File +# Begin Source File + +SOURCE=.\BSP_PlyLoader.h +# End Source File +# Begin Source File + +SOURCE=.\BSP_TMesh.h +# End Source File +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# Begin Source File + +SOURCE=.\ply.h +# End Source File +# Begin Source File + +SOURCE=.\plyfile.c +# End Source File +# End Target +# End Project diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw index 802fba84bef..0d9ca3d2b08 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw +++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw @@ -1,125 +1,125 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "BSP_GhostTest"=.\BSP_GhostTest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name bsplib - End Project Dependency - Begin Project Dependency - Project_Dep_Name ghost - End Project Dependency - Begin Project Dependency - Project_Dep_Name string - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency -}}} - -############################################################################### - -Project: "MoTo"=..\..\..\moto\make\msvc_6_0\MoTo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "bsplib"=..\..\make\msvc6_0\bsplib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name container - End Project Dependency - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency -}}} - -############################################################################### - -Project: "container"=..\..\..\container\make\msvc_6_0\container.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency -}}} - -############################################################################### - -Project: "ghost"=..\..\..\ghost\make\msvc\ghost.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "memutil"=..\..\..\memutil\make\msvc_60\memutil.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "string"=..\..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BSP_GhostTest"=.\BSP_GhostTest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name bsplib + End Project Dependency + Begin Project Dependency + Project_Dep_Name ghost + End Project Dependency + Begin Project Dependency + Project_Dep_Name string + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency +}}} + +############################################################################### + +Project: "MoTo"=..\..\..\moto\make\msvc_6_0\MoTo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "bsplib"=..\..\make\msvc6_0\bsplib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name container + End Project Dependency + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency +}}} + +############################################################################### + +Project: "container"=..\..\..\container\make\msvc_6_0\container.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency +}}} + +############################################################################### + +Project: "ghost"=..\..\..\ghost\make\msvc\ghost.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "memutil"=..\..\..\memutil\make\msvc_60\memutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "string"=..\..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/bsp/test/Makefile b/intern/bsp/test/Makefile index eebf7470a0f..91e4497b267 100644 --- a/intern/bsp/test/Makefile +++ b/intern/bsp/test/Makefile @@ -47,7 +47,7 @@ SLIBS += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a SLIBS += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a SLIBS += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a -ifeq ($(OS),$(findstring $(OS), "beos darwin linux freebsd openbsd")) +ifeq ($(OS),$(findstring $(OS), "darwin linux freebsd openbsd")) LLIBS = -L/usr/X11R6/lib -lglut -pthread -lXi -lXmu endif diff --git a/intern/container/Makefile b/intern/container/Makefile index 76cba5b3ea1..8a9c038f0ee 100644 --- a/intern/container/Makefile +++ b/intern/container/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # container main makefile. @@ -38,12 +40,10 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_CONTAINER) ] || mkdir $(NAN_CONTAINER) @[ -d $(NAN_CONTAINER)/include ] || mkdir $(NAN_CONTAINER)/include - @[ -d $(NAN_CONTAINER)/lib ] || mkdir $(NAN_CONTAINER)/lib - @[ -d $(NAN_CONTAINER)/lib/debug ] || mkdir $(NAN_CONTAINER)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libcontainer.a $(NAN_CONTAINER)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libcontainer.a $(NAN_CONTAINER)/lib/debug + @[ -d $(NAN_CONTAINER)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_CONTAINER)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libcontainer.a $(NAN_CONTAINER)/lib/$(DEBUG_DIR) @../tools/cpifdiff.sh *.h $(NAN_CONTAINER)/include/ diff --git a/intern/container/make/msvc_6_0/container.dsp b/intern/container/make/msvc_6_0/container.dsp index 2ccf1f0a384..ac565c4c1ec 100644 --- a/intern/container/make/msvc_6_0/container.dsp +++ b/intern/container/make/msvc_6_0/container.dsp @@ -1,133 +1,133 @@ -# Microsoft Developer Studio Project File - Name="container" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=container - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "container.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "container.mak" CFG="container - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "container - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "container - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "container - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\container" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\container" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/container/libcontainer.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\container\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\container\*.lib ..\..\..\..\..\lib\windows\container\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "container - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\container\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\container\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\container\debug\libcontainer.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\container\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\container\debug\*.lib ..\..\..\..\..\lib\windows\container\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\container\debug\vc60.* ..\..\..\..\..\lib\windows\container\lib\debug\ ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "container - Win32 Release" -# Name "container - Win32 Debug" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\CTR_List.cpp - -!IF "$(CFG)" == "container - Win32 Release" - -# ADD CPP /I "../extern" /I "../../" - -!ELSEIF "$(CFG)" == "container - Win32 Debug" - -# ADD CPP /I "../../" - -!ENDIF - -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\CTR_List.h -# End Source File -# Begin Source File - -SOURCE=..\..\CTR_Map.h -# End Source File -# Begin Source File - -SOURCE=..\..\CTR_TaggedIndex.h -# End Source File -# Begin Source File - -SOURCE=..\..\CTR_TaggedSetOps.h -# End Source File -# Begin Source File - -SOURCE=..\..\CTR_UHeap.h -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="container" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=container - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "container.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "container.mak" CFG="container - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "container - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "container - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "container - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\container" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\container" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/container/libcontainer.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\container\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\container\*.lib ..\..\..\..\..\lib\windows\container\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "container - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\container\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\container\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\container\debug\libcontainer.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\container\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\container\debug\*.lib ..\..\..\..\..\lib\windows\container\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\container\debug\vc60.* ..\..\..\..\..\lib\windows\container\lib\debug\ ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "container - Win32 Release" +# Name "container - Win32 Debug" +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\intern\CTR_List.cpp + +!IF "$(CFG)" == "container - Win32 Release" + +# ADD CPP /I "../extern" /I "../../" + +!ELSEIF "$(CFG)" == "container - Win32 Debug" + +# ADD CPP /I "../../" + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\CTR_List.h +# End Source File +# Begin Source File + +SOURCE=..\..\CTR_Map.h +# End Source File +# Begin Source File + +SOURCE=..\..\CTR_TaggedIndex.h +# End Source File +# Begin Source File + +SOURCE=..\..\CTR_TaggedSetOps.h +# End Source File +# Begin Source File + +SOURCE=..\..\CTR_UHeap.h +# End Source File +# End Target +# End Project diff --git a/intern/container/make/msvc_6_0/container.dsw b/intern/container/make/msvc_6_0/container.dsw index 13092e3c427..ed9604641fb 100644 --- a/intern/container/make/msvc_6_0/container.dsw +++ b/intern/container/make/msvc_6_0/container.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "container"=.\container.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "container"=.\container.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/container/make/msvc_9_0/container.vcproj b/intern/container/make/msvc_9_0/container.vcproj new file mode 100644 index 00000000000..2b40571672d --- /dev/null +++ b/intern/container/make/msvc_9_0/container.vcproj @@ -0,0 +1,387 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/decimation/Makefile b/intern/decimation/Makefile index 9241d87c3a3..7ff87fa018b 100644 --- a/intern/decimation/Makefile +++ b/intern/decimation/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # decimation main makefile. @@ -38,16 +40,13 @@ TESTDIRS = test include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_DECIMATION) ] || mkdir $(NAN_DECIMATION) @[ -d $(NAN_DECIMATION)/include ] || mkdir $(NAN_DECIMATION)/include - @[ -d $(NAN_DECIMATION)/lib ] || mkdir $(NAN_DECIMATION)/lib - @[ -d $(NAN_DECIMATION)/lib/debug ] || mkdir $(NAN_DECIMATION)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libdecimation.a $(NAN_DECIMATION)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libdecimation.a $(NAN_DECIMATION)/lib/debug/ + @[ -d $(NAN_DECIMATION)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_DECIMATION)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libdecimation.a $(NAN_DECIMATION)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_DECIMATION)/lib/libdecimation.a - ranlib $(NAN_DECIMATION)/lib/debug/libdecimation.a + ranlib $(NAN_DECIMATION)/lib/$(DEBUG_DIR)libdecimation.a endif @../tools/cpifdiff.sh extern/*.h $(NAN_DECIMATION)/include/ diff --git a/intern/decimation/SConscript b/intern/decimation/SConscript index cf199fb3bc5..ef95a795928 100644 --- a/intern/decimation/SConscript +++ b/intern/decimation/SConscript @@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp') incs = '. ../moto/include ../container ../memutil' -env.BlenderLib ('bf_decimation', sources, Split(incs) , [], libtype=['core','common','player'], priority = [10, 20, 25] ) +env.BlenderLib ('bf_decimation', sources, Split(incs) , [], libtype=['core'], priority = [10] ) diff --git a/intern/decimation/intern/LOD_ExternNormalEditor.cpp b/intern/decimation/intern/LOD_ExternNormalEditor.cpp index b7c7b5a529b..21fd4f3e39f 100644 --- a/intern/decimation/intern/LOD_ExternNormalEditor.cpp +++ b/intern/decimation/intern/LOD_ExternNormalEditor.cpp @@ -41,8 +41,8 @@ LOD_ExternNormalEditor( LOD_Decimation_InfoPtr extern_info, LOD_ManMesh2 &mesh ) : - m_extern_info (extern_info), - m_mesh(mesh) + m_mesh(mesh), + m_extern_info (extern_info) { } diff --git a/intern/decimation/intern/LOD_ManMesh2.cpp b/intern/decimation/intern/LOD_ManMesh2.cpp index 2fe49b36583..99f1c7d926a 100644 --- a/intern/decimation/intern/LOD_ManMesh2.cpp +++ b/intern/decimation/intern/LOD_ManMesh2.cpp @@ -546,7 +546,7 @@ DeleteEdge( // edges[e] should already have been removed from the heap - MT_assert(edges[e].HeapPos() == 0xffffffff); + MT_assert(edges[e].HeapPos() == -1); edges[e] = edges[last]; // also have to swap there heap positions.!!!!! diff --git a/intern/decimation/intern/LOD_QSDecimator.cpp b/intern/decimation/intern/LOD_QSDecimator.cpp index 1a0ec87f05b..0b0de767a9a 100644 --- a/intern/decimation/intern/LOD_QSDecimator.cpp +++ b/intern/decimation/intern/LOD_QSDecimator.cpp @@ -91,10 +91,10 @@ LOD_QSDecimator( LOD_ExternNormalEditor &face_editor, LOD_ExternBufferEditor &extern_editor ) : + m_is_armed (false), m_mesh(mesh), m_face_editor(face_editor), - m_extern_editor(extern_editor), - m_is_armed (false) + m_extern_editor(extern_editor) { m_deg_edges.reserve(32); m_deg_faces.reserve(32); @@ -318,7 +318,7 @@ UpdateHeap( LOD_Edge &e = edge_set[*edge_it]; m_heap->Remove(&edge_set[0],e.HeapPos()); - e.HeapPos() = 0xffffffff; + e.HeapPos() = -1; } } diff --git a/intern/decimation/make/msvc_6_0/decimation.dsp b/intern/decimation/make/msvc_6_0/decimation.dsp index 013e9e077fb..40b65a032db 100644 --- a/intern/decimation/make/msvc_6_0/decimation.dsp +++ b/intern/decimation/make/msvc_6_0/decimation.dsp @@ -1,186 +1,186 @@ -# Microsoft Developer Studio Project File - Name="decimation" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=decimation - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "decimation.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "decimation.mak" CFG="decimation - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "decimation - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "decimation - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "decimation - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\decimation" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\decimation" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /Ob2 /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I"..\..\..\moto\include" /I"..\..\..\memutil" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\decimation\libdecimation.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\decimation\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\decimation\*.lib ..\..\..\..\..\lib\windows\decimation\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "decimation - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\decimation\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\decimation\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W4 /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I"..\..\..\moto\include" /I"..\..\..\memutil" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\decimation\debug\libdecimation.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\decimation\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\decimation\debug\*.lib ..\..\..\..\..\lib\windows\decimation\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\decimation\debug\vc60.* ..\..\..\..\..\lib\windows\decimation\lib\debug\ ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "decimation - Win32 Release" -# Name "decimation - Win32 Debug" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\LOD_decimation.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_DecimationClass.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_EdgeCollapser.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_EdgeCollapser.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_ExternBufferEditor.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_ExternNormalEditor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_ExternNormalEditor.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_FaceNormalEditor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_FaceNormalEditor.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_ManMesh2.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_ManMesh2.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_MeshBounds.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_MeshException.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_MeshPrimitives.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_MeshPrimitives.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_QSDecimator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_QSDecimator.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_Quadric.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_QuadricEditor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\LOD_QuadricEditor.h -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\extern\LOD_decimation.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="decimation" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=decimation - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "decimation.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "decimation.mak" CFG="decimation - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "decimation - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "decimation - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "decimation - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\decimation" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\decimation" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /Ob2 /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I"..\..\..\moto\include" /I"..\..\..\memutil" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\decimation\libdecimation.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\decimation\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\decimation\*.lib ..\..\..\..\..\lib\windows\decimation\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "decimation - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\decimation\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\decimation\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W4 /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\container\include\\" /I "..\..\..\..\..\lib\windows\memutil\include\\" /I "..\..\..\..\..\lib\windows\moto\include\\" /I"..\..\..\moto\include" /I"..\..\..\memutil" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\decimation\debug\libdecimation.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\decimation\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\decimation\debug\*.lib ..\..\..\..\..\lib\windows\decimation\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\decimation\debug\vc60.* ..\..\..\..\..\lib\windows\decimation\lib\debug\ ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "decimation - Win32 Release" +# Name "decimation - Win32 Debug" +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\intern\LOD_decimation.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_DecimationClass.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_EdgeCollapser.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_EdgeCollapser.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_ExternBufferEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_ExternNormalEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_ExternNormalEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_FaceNormalEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_FaceNormalEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_ManMesh2.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_ManMesh2.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_MeshBounds.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_MeshException.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_MeshPrimitives.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_MeshPrimitives.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_QSDecimator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_QSDecimator.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_Quadric.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_QuadricEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\LOD_QuadricEditor.h +# End Source File +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\extern\LOD_decimation.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/decimation/make/msvc_6_0/decimation.dsw b/intern/decimation/make/msvc_6_0/decimation.dsw index f874b324725..d46268c2545 100644 --- a/intern/decimation/make/msvc_6_0/decimation.dsw +++ b/intern/decimation/make/msvc_6_0/decimation.dsw @@ -1,33 +1,33 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "decimation"=.\decimation.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - - - - - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "decimation"=.\decimation.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + + + + + diff --git a/intern/decimation/make/msvc_9_0/decimation.vcproj b/intern/decimation/make/msvc_9_0/decimation.vcproj new file mode 100644 index 00000000000..7d58bf1f4c6 --- /dev/null +++ b/intern/decimation/make/msvc_9_0/decimation.vcproj @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt index 03fd4a3fefc..e541d334086 100644 --- a/intern/elbeem/CMakeLists.txt +++ b/intern/elbeem/CMakeLists.txt @@ -24,17 +24,17 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC ${PNG_INC} ${ZLIB_INC} ${SDL_INC} extern) +SET(INC ${PNG_INC} ${ZLIB_INC} extern) FILE(GLOB SRC intern/*.cpp) ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1) IF(WINDOWS) - ADD_DEFINITIONS(-DUSE_MSVC6FIXES) + ADD_DEFINITIONS(-DUSE_MSVC6FIXES) ENDIF(WINDOWS) IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) + ADD_DEFINITIONS(-DPARALLEL=1) ENDIF(WITH_OPENMP) BLENDERLIB_NOLIST(bf_elbeem "${SRC}" "${INC}") diff --git a/intern/elbeem/Makefile b/intern/elbeem/Makefile index 9ea08d63374..e7e8a8baa64 100644 --- a/intern/elbeem/Makefile +++ b/intern/elbeem/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # elbeem main makefile. @@ -40,16 +42,13 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_ELBEEM) ] || mkdir $(NAN_ELBEEM) @[ -d $(NAN_ELBEEM)/include ] || mkdir $(NAN_ELBEEM)/include - @[ -d $(NAN_ELBEEM)/lib ] || mkdir $(NAN_ELBEEM)/lib - @[ -d $(NAN_ELBEEM)/lib/debug ] || mkdir $(NAN_ELBEEM)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libelbeem.a $(NAN_ELBEEM)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libelbeem.a $(NAN_ELBEEM)/lib/debug/ + @[ -d $(NAN_ELBEEM)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_ELBEEM)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libelbeem.a $(NAN_ELBEEM)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_ELBEEM)/lib/libelbeem.a - ranlib $(NAN_ELBEEM)/lib/debug/libelbeem.a + ranlib $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a endif @../tools/cpifdiff.sh extern/*.h $(NAN_ELBEEM)/include/ diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript index f1c09423f04..0900ab1db5c 100644 --- a/intern/elbeem/SConscript +++ b/intern/elbeem/SConscript @@ -10,9 +10,9 @@ defs = 'NOGUI ELBEEM_BLENDER=1' if env['WITH_BF_OPENMP']: defs += ' PARALLEL' -if env['OURPLATFORM']=='win32-vc': +if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): defs += ' USE_MSVC6FIXES' -incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC'] +incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] incs += ' extern ' -env.BlenderLib ('bf_elbeem', sources, Split(incs), Split(defs), libtype='blender', priority=0 ) +env.BlenderLib ('bf_elbeem', sources, Split(incs), Split(defs), libtype='intern', priority=0 ) diff --git a/intern/elbeem/extern/LBM_fluidsim.h b/intern/elbeem/extern/LBM_fluidsim.h index dd8c63d0d39..ec30d65af20 100644 --- a/intern/elbeem/extern/LBM_fluidsim.h +++ b/intern/elbeem/extern/LBM_fluidsim.h @@ -31,36 +31,11 @@ #ifndef LBM_FLUIDSIM_H #define LBM_FLUIDSIM_H -struct Mesh; -struct DerivedMesh; -struct Object; -struct fluidsimDerivedMesh; - -extern double fluidsimViscosityPreset[6]; -extern char* fluidsimViscosityPresetString[6]; - -/* allocates and initializes fluidsim data */ -struct FluidsimSettings* fluidsimSettingsNew(struct Object *srcob); - -/* frees internal data itself */ -void fluidsimSettingsFree(struct FluidsimSettings* sb); - -/* duplicate internal data */ -struct FluidsimSettings* fluidsimSettingsCopy(struct FluidsimSettings* sb); - -/* export blender geometry to fluid solver */ -void fluidsimBake(struct Object* ob); - -/* read & write bobj / bobj.gz files (e.g. for fluid sim surface meshes) */ -void writeBobjgz(char *filename, struct Object *ob, int useGlobalCoords, int append, float time); -struct Mesh* readBobjgz(char *filename, struct Mesh *orgmesh, float* bbstart, float *bbsize); - -/* create derived mesh for fluid sim objects */ -// WARNING - currently implemented in DerivedMesh.c! -void loadFluidsimMesh(struct Object *srcob, int useRenderParams); +/* note; elbeem.h was exported all over, should only expose LBM_fluidsim.h */ +#include "elbeem.h" /* run simulation with given config file */ -// WARNING - implemented in intern/elbeem/blendercall.cpp +// implemented in intern/elbeem/blendercall.cpp int performElbeemSimulation(char *cfgfilename); diff --git a/intern/elbeem/intern/paraloopend.h b/intern/elbeem/intern/paraloopend.h index 6bb224b625a..a396e395126 100644 --- a/intern/elbeem/intern/paraloopend.h +++ b/intern/elbeem/intern/paraloopend.h @@ -22,9 +22,9 @@ { if(doReduce) { // synchronize global vars - for(int j=0; jaddFullParticle( calcListParts[j] ); + for(size_t j=0; jaddFullParticle( calcListParts[j] ); if(calcMaxVlen>mMaxVlen) { mMxvx = calcMxvx; mMxvy = calcMxvy; diff --git a/intern/elbeem/intern/solver_init.cpp b/intern/elbeem/intern/solver_init.cpp index 270531d80be..fee011a70ae 100644 --- a/intern/elbeem/intern/solver_init.cpp +++ b/intern/elbeem/intern/solver_init.cpp @@ -1401,7 +1401,7 @@ void LbmFsgrSolver::initMovingObstacles(bool staticInit) { debMsgStd("LbmFsgrSolver::initMovingObstacles",DM_MSG," obj "<getName()<<" skip:"<getIsAnimated()<<" gid:"<getGeoInitId()<<" simgid:"<getGeoInitType()&FGI_ALLBOUNDS) || - (obj->getGeoInitType()&FGI_FLUID) && staticInit ) { + ((obj->getGeoInitType()&FGI_FLUID) && staticInit) ) { otype = ntype = CFInvalid; switch(obj->getGeoInitType()) { @@ -1464,7 +1464,7 @@ void LbmFsgrSolver::initMovingObstacles(bool staticInit) { obj->applyTransformation(targetTime, &mMOIVertices,NULL /* no old normals needed */, 0, mMOIVertices.size(), false ); } else { // only do transform update - obj->getMovingPoints(mMOIVertices,pNormals); + obj->getMovingPoints(mMOIVertices,pNormals); // mMOIVertices = mCachedMovPoints mMOIVerticesOld = mMOIVertices; // WARNING - assumes mSimulationTime is global!? obj->applyTransformation(targetTime, &mMOIVertices,pNormals, 0, mMOIVertices.size(), false ); diff --git a/intern/elbeem/intern/utilities.h b/intern/elbeem/intern/utilities.h index 825e92251fe..a5f63e696a6 100644 --- a/intern/elbeem/intern/utilities.h +++ b/intern/elbeem/intern/utilities.h @@ -154,12 +154,18 @@ int writePng(const char *fileName, unsigned char **rowsp, int w, int h); */ /* minimum */ +#ifdef MIN +#undef MIN +#endif template < class T > inline T MIN( T a, T b ) { return (a < b) ? a : b ; } /* maximum */ +#ifdef MAX +#undef MAX +#endif template < class T > inline T MAX( T a, T b ) diff --git a/intern/elbeem/make/msvc_6_0/elbeem.dsp b/intern/elbeem/make/msvc_6_0/elbeem.dsp index ef5daa29fa4..652687ca82b 100644 --- a/intern/elbeem/make/msvc_6_0/elbeem.dsp +++ b/intern/elbeem/make/msvc_6_0/elbeem.dsp @@ -1,290 +1,290 @@ -# Microsoft Developer Studio Project File - Name="elbeem" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=elbeem - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "elbeem.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "elbeem.mak" CFG="elbeem - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "elbeem - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "elbeem - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "elbeem - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /I "../../../../../lib/windows/sdl/include" /I "../../../../../lib/windows/zlib/include" /I "../../../../../lib/windows/png/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NOGUI" /D "ELBEEM_BLENDER" /YX /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Release\blender_elbeem.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO copy to lib ... xcopy /Y .\release\blender_elbeem.lib ..\..\..\..\..\lib\windows\elbeem\lib\*.* -# End Special Build Tool - -!ELSEIF "$(CFG)" == "elbeem - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../lib/windows/sdl/include" /I "../../../../../lib/windows/zlib/include" /I "../../../../../lib/windows/png/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NOGUI" /D "ELBEEM_BLENDER" /YX /FD /GZ /c -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Debug\blender_elbeem.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO copy to lib ... xcopy /Y .\debug\blender_elbeem.lib ..\..\..\..\..\lib\windows\elbeem\lib\debug\*.* -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "elbeem - Win32 Release" -# Name "elbeem - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\attributes.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\elbeem.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\isosurface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_blenderdumper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_bsptree.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_geometrymodel.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_geometryobject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_lighting.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_ray.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_world.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\parametrizer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\particletracer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\simulation_object.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_adap.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_init.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_interface.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_main.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_util.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\utilities.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\intern\attributes.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\isosurface.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\mcubes_tables.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_blenderdumper.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_bsptree.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_geometryclass.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_geometrymodel.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_geometryobject.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_geometryshader.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_lighting.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_lightobject.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_material.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_matrices.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_ray.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_renderglobals.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_rndstream.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_scene.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_triangle.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_vector3dim.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\ntl_world.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\parametrizer.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\particletracer.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\simulation_object.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_class.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_dimenions.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_interface.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\solver_relax.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\utilities.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="elbeem" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=elbeem - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "elbeem.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "elbeem.mak" CFG="elbeem - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "elbeem - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "elbeem - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "elbeem - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /I "../../../../../lib/windows/sdl/include" /I "../../../../../lib/windows/zlib/include" /I "../../../../../lib/windows/png/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "NOGUI" /D "ELBEEM_BLENDER" /YX /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Release\blender_elbeem.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO copy to lib ... xcopy /Y .\release\blender_elbeem.lib ..\..\..\..\..\lib\windows\elbeem\lib\*.* +# End Special Build Tool + +!ELSEIF "$(CFG)" == "elbeem - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../lib/windows/sdl/include" /I "../../../../../lib/windows/zlib/include" /I "../../../../../lib/windows/png/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NOGUI" /D "ELBEEM_BLENDER" /YX /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\blender_elbeem.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO copy to lib ... xcopy /Y .\debug\blender_elbeem.lib ..\..\..\..\..\lib\windows\elbeem\lib\debug\*.* +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "elbeem - Win32 Release" +# Name "elbeem - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\intern\attributes.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\elbeem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\isosurface.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_blenderdumper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_bsptree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_geometrymodel.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_geometryobject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_lighting.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_ray.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_world.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\parametrizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\particletracer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\simulation_object.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_adap.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_init.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_interface.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_main.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_util.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\utilities.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\intern\attributes.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\isosurface.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\mcubes_tables.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_blenderdumper.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_bsptree.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_geometryclass.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_geometrymodel.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_geometryobject.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_geometryshader.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_lighting.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_lightobject.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_material.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_matrices.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_ray.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_renderglobals.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_rndstream.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_scene.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_triangle.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_vector3dim.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\ntl_world.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\parametrizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\particletracer.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\simulation_object.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_class.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_dimenions.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_interface.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\solver_relax.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\utilities.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/elbeem/make/msvc_9_0/elbeem.vcproj b/intern/elbeem/make/msvc_9_0/elbeem.vcproj new file mode 100644 index 00000000000..4108e09799d --- /dev/null +++ b/intern/elbeem/make/msvc_9_0/elbeem.vcproj @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index b559d49958c..9128e923e19 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -24,33 +24,35 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC . ../string ${WINTAB_INC}) +SET(INC . ../string) FILE(GLOB SRC intern/*.cpp) IF(APPLE) - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp") ELSE(APPLE) - IF(WIN32) - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp") - ELSE(WIN32) - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp") - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp") - ENDIF(WIN32) + IF(WIN32) + SET(INC ${INC} ${WINTAB_INC}) + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp") + ELSE(WIN32) + SET(INC ${INC} ${X11_X11_INCLUDE_PATH}) + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp") + LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp") + ENDIF(WIN32) ENDIF(APPLE) BLENDERLIB(bf_ghost "${SRC}" "${INC}") diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index cb1eac7a9a6..c0b7077fb53 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -367,6 +367,17 @@ extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, GHOST_TInt32 x, GHOST_TInt32 y); +/** + * Grabs the cursor for a modal operation, to keep receiving + * events when the mouse is outside the window. X11 only, others + * do this automatically. + * @param windowhandle The handle to the window + * @param grab The new grab state of the cursor. + * @return Indication of success. + */ +extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle, + int grab); + /*************************************************************************************** ** Access to mouse button and keyboard states. ***************************************************************************************/ @@ -771,14 +782,16 @@ extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, /** * Return the data from the clipboad - * @return clipboard data + * @param return the selection instead, X11 only feature + * @return clipboard data */ -extern GHOST_TUns8* GHOST_getClipboard(int flag); +extern GHOST_TUns8* GHOST_getClipboard(int selection); /** * Put data to the Clipboard + * @param set the selection instead, X11 only feature */ -extern void GHOST_putClipboard(GHOST_TInt8 *buffer, int flag); +extern void GHOST_putClipboard(GHOST_TInt8 *buffer, int selection); #ifdef __cplusplus } diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index baf0cb813f8..08794dfd085 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -356,12 +356,12 @@ public: * @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer * */ - virtual GHOST_TUns8* getClipboard(int flag) const = 0; + virtual GHOST_TUns8* getClipboard(bool selection) const = 0; /** * Put data to the Clipboard */ - virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const = 0; + virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0; protected: /** diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 0861d8b8946..d91995e35ec 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -252,6 +252,14 @@ public: * @return Indication of success. */ virtual GHOST_TSuccess setCursorVisibility(bool visible) = 0; + + /** + * Grabs the cursor for a modal operation. + * @param grab The new grab state of the cursor. + * @return Indication of success. + */ + virtual GHOST_TSuccess setCursorGrab(bool grab) { return GHOST_kSuccess; }; + }; #endif // _GHOST_IWINDOW_H_ diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 6b1295f649b..73ed0bdd1fa 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -64,8 +64,14 @@ typedef enum * the pen's angle in 3D space vertically downwards on to the XY plane * --Matt */ +typedef enum { + GHOST_kTabletModeNone = 0, + GHOST_kTabletModeStylus, + GHOST_kTabletModeEraser +} GHOST_TTabletMode; + typedef struct GHOST_TabletData { - char Active; /* 0=None, 1=Stylus, 2=Eraser */ + GHOST_TTabletMode Active; /* 0=None, 1=Stylus, 2=Eraser */ float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */ float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */ float Ytilt; /* as above */ @@ -104,7 +110,9 @@ typedef enum { GHOST_kWindowState8Normal = 8, GHOST_kWindowState8Maximized, GHOST_kWindowState8Minimized, - GHOST_kWindowState8FullScreen + GHOST_kWindowState8FullScreen, + GHOST_kWindowStateModified, + GHOST_kWindowStateUnModified } GHOST_TWindowState; @@ -150,6 +158,9 @@ typedef enum { GHOST_kEventWindowDeactivate, GHOST_kEventWindowUpdate, GHOST_kEventWindowSize, + GHOST_kEventWindowMove, + + GHOST_kEventTimer, GHOST_kNumEventTypes } GHOST_TEventType; diff --git a/intern/ghost/Makefile b/intern/ghost/Makefile index f809a32ac8f..e983c3a9cee 100644 --- a/intern/ghost/Makefile +++ b/intern/ghost/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # ghost main makefile. @@ -38,16 +40,13 @@ TESTDIRS = test include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_GHOST) ] || mkdir $(NAN_GHOST) @[ -d $(NAN_GHOST)/include ] || mkdir $(NAN_GHOST)/include - @[ -d $(NAN_GHOST)/lib ] || mkdir $(NAN_GHOST)/lib - @[ -d $(NAN_GHOST)/lib/debug ] || mkdir $(NAN_GHOST)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libghost.a $(NAN_GHOST)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libghost.a $(NAN_GHOST)/lib/debug/ + @[ -d $(NAN_GHOST)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_GHOST)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libghost.a $(NAN_GHOST)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_GHOST)/lib/libghost.a - ranlib $(NAN_GHOST)/lib/debug/libghost.a + ranlib $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a endif @../tools/cpifdiff.sh *.h $(NAN_GHOST)/include/ diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript index f6283cfc0f2..48009152699 100644 --- a/intern/ghost/SConscript +++ b/intern/ghost/SConscript @@ -14,7 +14,7 @@ if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6'): for f in pf: sources.remove('intern' + os.sep + f + 'Win32.cpp') sources.remove('intern' + os.sep + f + 'Carbon.cpp') -elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'): +elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): for f in pf: sources.remove('intern' + os.sep + f + 'X11.cpp') sources.remove('intern' + os.sep + f + 'Carbon.cpp') @@ -27,6 +27,6 @@ else: Exit() incs = '. ../string ' + env['BF_OPENGL_INC'] -if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'): +if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'): incs = env['BF_WINTAB_INC'] + ' ' + incs -env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['core','player'], priority = [25,15] ) +env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern','player'], priority = [40,15] ) diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp index b7643784250..5c23b6c42a3 100644 --- a/intern/ghost/intern/GHOST_C-api.cpp +++ b/intern/ghost/intern/GHOST_C-api.cpp @@ -48,11 +48,6 @@ #include "GHOST_IEventConsumer.h" #include "intern/GHOST_CallbackEventConsumer.h" -#ifdef WIN32 -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning -#endif //WIN32 - - GHOST_SystemHandle GHOST_CreateSystem(void) { GHOST_ISystem::createSystem(); @@ -359,6 +354,14 @@ GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, } +GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle, + int grab) +{ + GHOST_IWindow* window = (GHOST_IWindow*) windowhandle; + + return window->setCursorGrab(grab?true:false); +} + GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle, GHOST_TModifierKeyMask mask, @@ -815,15 +818,15 @@ GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, return result; } -GHOST_TUns8* GHOST_getClipboard(int flag) +GHOST_TUns8* GHOST_getClipboard(int selection) { GHOST_ISystem* system = GHOST_ISystem::getSystem(); - return system->getClipboard(flag); + return system->getClipboard(selection); } -void GHOST_putClipboard(GHOST_TInt8 *buffer, int flag) +void GHOST_putClipboard(GHOST_TInt8 *buffer, int selection) { GHOST_ISystem* system = GHOST_ISystem::getSystem(); - system->putClipboard(buffer, flag); + system->putClipboard(buffer, selection); } diff --git a/intern/ghost/intern/GHOST_DisplayManager.h b/intern/ghost/intern/GHOST_DisplayManager.h index a707b5aeddd..50c59a6d348 100644 --- a/intern/ghost/intern/GHOST_DisplayManager.h +++ b/intern/ghost/intern/GHOST_DisplayManager.h @@ -35,10 +35,6 @@ #include "GHOST_Types.h" -#ifdef WIN32 -#pragma warning (disable:4786) // suppress stl-MSVC debug info warning -#endif // WIN32 - #include /** diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp index a8565578967..1a61428bccc 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp +++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp @@ -126,7 +126,7 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::setCurrentDisplaySetting(GHOST_TUns8 d GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerWin32::setCurrentDisplaySetting(): only main display is supported"); GHOST_DisplaySetting match; - GHOST_TSuccess success = findMatch(display, setting, match); + findMatch(display, setting, match); DEVMODE dm; int i = 0; while (::EnumDisplaySettings(NULL, i++, &dm)) { diff --git a/intern/ghost/intern/GHOST_EventManager.cpp b/intern/ghost/intern/GHOST_EventManager.cpp index f9b13115f32..92cea8d8ff7 100644 --- a/intern/ghost/intern/GHOST_EventManager.cpp +++ b/intern/ghost/intern/GHOST_EventManager.cpp @@ -51,6 +51,15 @@ GHOST_EventManager::GHOST_EventManager() GHOST_EventManager::~GHOST_EventManager() { disposeEvents(); + + TConsumerVector::iterator iter= m_consumers.begin(); + while (iter != m_consumers.end()) + { + GHOST_IEventConsumer* consumer = *iter; + delete consumer; + m_consumers.erase(iter); + iter = m_consumers.begin(); + } } diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h index 33e5c2f20ba..c3ec9583c04 100644 --- a/intern/ghost/intern/GHOST_EventManager.h +++ b/intern/ghost/intern/GHOST_EventManager.h @@ -33,10 +33,6 @@ #ifndef _GHOST_EVENT_MANAGER_H_ #define _GHOST_EVENT_MANAGER_H_ -#ifdef WIN32 -#pragma warning (disable:4786) // suppress stl-MSVC debug info warning -#endif // WIN32 - #include #include diff --git a/intern/ghost/intern/GHOST_EventPrinter.cpp b/intern/ghost/intern/GHOST_EventPrinter.cpp index ae9c0d81a01..b4f5cc96083 100644 --- a/intern/ghost/intern/GHOST_EventPrinter.cpp +++ b/intern/ghost/intern/GHOST_EventPrinter.cpp @@ -48,36 +48,36 @@ bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event) if (event->getType() == GHOST_kEventWindowUpdate) return false; - //std::cout << "GHOST_EventPrinter::processEvent, time: " << (GHOST_TInt32)event->getTime() << ", type: "; + std::cout << "GHOST_EventPrinter::processEvent, time: " << (GHOST_TInt32)event->getTime() << ", type: "; switch (event->getType()) { case GHOST_kEventUnknown: - //std::cout << "GHOST_kEventUnknown"; handled = false; + std::cout << "GHOST_kEventUnknown"; handled = false; break; case GHOST_kEventButtonUp: { GHOST_TEventButtonData* buttonData = (GHOST_TEventButtonData*)((GHOST_IEvent*)event)->getData(); - //std::cout << "GHOST_kEventCursorButtonUp, button: " << buttonData->button; + std::cout << "GHOST_kEventCursorButtonUp, button: " << buttonData->button; } break; case GHOST_kEventButtonDown: { GHOST_TEventButtonData* buttonData = (GHOST_TEventButtonData*)((GHOST_IEvent*)event)->getData(); - //std::cout << "GHOST_kEventButtonDown, button: " << buttonData->button; + std::cout << "GHOST_kEventButtonDown, button: " << buttonData->button; } break; case GHOST_kEventWheel: { GHOST_TEventWheelData* wheelData = (GHOST_TEventWheelData*)((GHOST_IEvent*)event)->getData(); - //std::cout << "GHOST_kEventWheel, z: " << wheelData->z; + std::cout << "GHOST_kEventWheel, z: " << wheelData->z; } break; case GHOST_kEventCursorMove: { GHOST_TEventCursorData* cursorData = (GHOST_TEventCursorData*)((GHOST_IEvent*)event)->getData(); - //std::cout << "GHOST_kEventCursorMove, (x,y): (" << cursorData->x << "," << cursorData->y << ")"; + std::cout << "GHOST_kEventCursorMove, (x,y): (" << cursorData->x << "," << cursorData->y << ")"; } break; @@ -86,7 +86,7 @@ bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event) GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData(); STR_String str; getKeyString(keyData->key, str); - //std::cout << "GHOST_kEventKeyUp, key: " << str.Ptr(); + std::cout << "GHOST_kEventKeyUp, key: " << str.Ptr(); } break; case GHOST_kEventKeyDown: @@ -94,34 +94,34 @@ bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event) GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData(); STR_String str; getKeyString(keyData->key, str); - //std::cout << "GHOST_kEventKeyDown, key: " << str.Ptr(); + std::cout << "GHOST_kEventKeyDown, key: " << str.Ptr(); } break; case GHOST_kEventQuit: - //std::cout << "GHOST_kEventQuit"; + std::cout << "GHOST_kEventQuit"; break; case GHOST_kEventWindowClose: - //std::cout << "GHOST_kEventWindowClose"; + std::cout << "GHOST_kEventWindowClose"; break; case GHOST_kEventWindowActivate: - //std::cout << "GHOST_kEventWindowActivate"; + std::cout << "GHOST_kEventWindowActivate"; break; case GHOST_kEventWindowDeactivate: - //std::cout << "GHOST_kEventWindowDeactivate"; + std::cout << "GHOST_kEventWindowDeactivate"; break; case GHOST_kEventWindowUpdate: - //std::cout << "GHOST_kEventWindowUpdate"; + std::cout << "GHOST_kEventWindowUpdate"; break; case GHOST_kEventWindowSize: - //std::cout << "GHOST_kEventWindowSize"; + std::cout << "GHOST_kEventWindowSize"; break; default: - //std::cout << "not found"; handled = false; + std::cout << "not found"; handled = false; break; } - //std::cout << "\n"; + std::cout << "\n"; return handled; } diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp index 87e5f375958..229744e2000 100644 --- a/intern/ghost/intern/GHOST_System.cpp +++ b/intern/ghost/intern/GHOST_System.cpp @@ -290,7 +290,8 @@ GHOST_TSuccess GHOST_System::init() #ifdef GHOST_DEBUG if (m_eventManager) { - m_eventManager->addConsumer(&m_eventPrinter); + m_eventPrinter = new GHOST_EventPrinter(); + //m_eventManager->addConsumer(m_eventPrinter); } #endif // GHOST_DEBUG diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index efce931860a..066fe4b93d3 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -284,18 +284,18 @@ public: /** * Returns the selection buffer - * @param flag Only used on X11 - * @return Returns the clipboard data + * @param selection Only used on X11 + * @return Returns the clipboard data * */ - virtual GHOST_TUns8* getClipboard(int flag) const = 0; + virtual GHOST_TUns8* getClipboard(bool selection) const = 0; /** * Put data to the Clipboard - * @param buffer The buffer to copy to the clipboard - * @param flag The clipboard to copy too only used on X11 + * @param buffer The buffer to copy to the clipboard + * @param selection The clipboard to copy too only used on X11 */ - virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const = 0; + virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0; protected: /** @@ -335,7 +335,7 @@ protected: /** Prints all the events. */ #ifdef GHOST_DEBUG - GHOST_EventPrinter m_eventPrinter; + GHOST_EventPrinter* m_eventPrinter; #endif // GHOST_DEBUG /** Settings of the display before the display went fullscreen. */ diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index 067c8deee32..57d6f6c06cc 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -34,7 +34,6 @@ * @date May 7, 2001 */ - #include #include #include "GHOST_SystemCarbon.h" @@ -430,6 +429,29 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow( return window; } +GHOST_TSuccess GHOST_SystemCarbon::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual) +{ + GHOST_TSuccess success = GHOST_kFailure; + + // need yo make this Carbon all on 10.5 for fullscreen to work correctly + CGCaptureAllDisplays(); + + success = GHOST_System::beginFullScreen( setting, window, stereoVisual); + + if( success != GHOST_kSuccess ) { + // fullscreen failed for other reasons, release + CGReleaseAllDisplays(); + } + + return success; +} + +GHOST_TSuccess GHOST_SystemCarbon::endFullScreen(void) +{ + CGReleaseAllDisplays(); + return GHOST_System::endFullScreen(); +} + /* this is an old style low level event queue. As we want to handle our own timers, this is ok. the full screen hack should be removed */ @@ -438,21 +460,21 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent) bool anyProcessed = false; EventRef event; +// SetMouseCoalescingEnabled(false, NULL); + do { GHOST_TimerManager* timerMgr = getTimerManager(); if (waitForEvent) { - GHOST_TUns64 curtime = getMilliSeconds(); GHOST_TUns64 next = timerMgr->nextFireTime(); double timeOut; if (next == GHOST_kFireTimeNever) { timeOut = kEventDurationForever; } else { - if (next<=curtime) + timeOut = (double)(next - getMilliSeconds())/1000.0; + if (timeOut < 0.0) timeOut = 0.0; - else - timeOut = (double) (next - getMilliSeconds())/1000.0; } ::ReceiveNextEvent(0, NULL, timeOut, false, &event); @@ -471,7 +493,6 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent) } } - /* end loop when no more events available */ while (::ReceiveNextEvent(0, NULL, 0, true, &event)==noErr) { OSStatus status= ::SendEventToEventTarget(event, ::GetEventDispatcherTarget()); @@ -767,21 +788,21 @@ OSStatus GHOST_SystemCarbon::handleTabletEvent(EventRef event) switch(tabletProximityRecord.pointerType) { case 1: /* stylus */ - ct.Active = 1; + ct.Active = GHOST_kTabletModeStylus; break; case 2: /* puck, not supported so far */ - ct.Active = 0; + ct.Active = GHOST_kTabletModeNone; break; case 3: /* eraser */ - ct.Active = 2; + ct.Active = GHOST_kTabletModeEraser; break; default: - ct.Active = 0; + ct.Active = GHOST_kTabletModeNone; break; } } else { // pointer is leaving - return to mouse - ct.Active = 0; + ct.Active = GHOST_kTabletModeNone; } } } @@ -959,10 +980,16 @@ bool GHOST_SystemCarbon::handleMouseDown(EventRef event) * events. By setting m_ignoreWindowSizedMessages these are suppressed. * @see GHOST_SystemCarbon::handleWindowEvent(EventRef event) */ + /* even worse: scale window also generates a load of events, and nothing + is handled (read: client's event proc called) until you release mouse (ton) */ + GHOST_ASSERT(validWindow(ghostWindow), "GHOST_SystemCarbon::handleMouseDown: invalid window"); m_ignoreWindowSizedMessages = true; ::DragWindow(window, mousePos, &GetQDGlobalsScreenBits(&screenBits)->bounds); m_ignoreWindowSizedMessages = false; + + pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowMove, ghostWindow) ); + break; case inContent: @@ -1114,7 +1141,7 @@ OSStatus GHOST_SystemCarbon::sEventHandlerProc(EventHandlerCallRef handler, Even return err; } -GHOST_TUns8* GHOST_SystemCarbon::getClipboard(int flag) const +GHOST_TUns8* GHOST_SystemCarbon::getClipboard(bool selection) const { PasteboardRef inPasteboard; PasteboardItemID itemID; @@ -1153,9 +1180,9 @@ GHOST_TUns8* GHOST_SystemCarbon::getClipboard(int flag) const } } -void GHOST_SystemCarbon::putClipboard(GHOST_TInt8 *buffer, int flag) const +void GHOST_SystemCarbon::putClipboard(GHOST_TInt8 *buffer, bool selection) const { - if(flag == 1) {return;} //If Flag is 1 means the selection and is used on X11 + if(selection) {return;} // for copying the selection, used on X11 PasteboardRef inPasteboard; CFDataRef textData = NULL; diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h index 2a1d6325784..5b3b786a5ac 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.h +++ b/intern/ghost/intern/GHOST_SystemCarbon.h @@ -118,6 +118,14 @@ public: const GHOST_TEmbedderWindowID parentWindow = 0 ); + virtual GHOST_TSuccess beginFullScreen( + const GHOST_DisplaySetting& setting, + GHOST_IWindow** window, + const bool stereoVisual + ); + + virtual GHOST_TSuccess endFullScreen( void ); + /*************************************************************************************** ** Event management functionality ***************************************************************************************/ @@ -169,17 +177,17 @@ public: /** * Returns Clipboard data - * @param flag Indicate which buffer to return - * @return Returns the selected buffer + * @param selection Indicate which buffer to return + * @return Returns the selected buffer */ - virtual GHOST_TUns8* getClipboard(int flag) const; + virtual GHOST_TUns8* getClipboard(bool selection) const; /** * Puts buffer to system clipboard * @param buffer The buffer to be copied - * @param flag Indicates which buffer to copy too Only used on X11 + * @param selection Indicates which buffer to copy too, only used on X11 */ - virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const; + virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const; protected: /** diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index feb0fe39040..8513d056795 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -38,9 +38,8 @@ #include #endif -#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning - #include "GHOST_SystemWin32.h" +//#include //for printf() // win64 doesn't define GWL_USERDATA #ifdef WIN32 @@ -202,11 +201,12 @@ bool GHOST_SystemWin32::processEvents(bool waitForEvent) ::Sleep(1); #else GHOST_TUns64 next = timerMgr->nextFireTime(); + GHOST_TInt64 maxSleep = next - getMilliSeconds(); if (next == GHOST_kFireTimeNever) { ::WaitMessage(); - } else { - ::SetTimer(NULL, 0, next - getMilliSeconds(), NULL); + } else if(maxSleep >= 0.0) { + ::SetTimer(NULL, 0, maxSleep, NULL); ::WaitMessage(); ::KillTimer(NULL, 0); } @@ -232,7 +232,7 @@ bool GHOST_SystemWin32::processEvents(bool waitForEvent) GHOST_TSuccess GHOST_SystemWin32::getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const { POINT point; - bool success = ::GetCursorPos(&point) == TRUE; + ::GetCursorPos(&point); x = point.x; y = point.y; return GHOST_kSuccess; @@ -537,7 +537,7 @@ GHOST_Event* GHOST_SystemWin32::processWindowEvent(GHOST_TEventType type, GHOST_ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { GHOST_Event* event = 0; - LRESULT lResult; + LRESULT lResult = 0; GHOST_SystemWin32* system = ((GHOST_SystemWin32*)getSystem()); GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized") @@ -747,6 +747,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * the message is sent asynchronously, so the window is activated immediately. */ event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window); + /* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL + will not be dispatched to OUR active window if we minimize one of OUR windows. */ + lResult = ::DefWindowProc(hwnd, msg, wParam, lParam); break; case WM_PAINT: /* An application sends the WM_PAINT message when the system or another application @@ -766,10 +769,23 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * message without calling DefWindowProc. */ event = processWindowEvent(GHOST_kEventWindowSize, window); + break; case WM_CAPTURECHANGED: window->lostMouseCapture(); break; - + case WM_MOVING: + /* The WM_MOVING message is sent to a window that the user is moving. By processing + * this message, an application can monitor the size and position of the drag rectangle + * and, if needed, change its size or position. + */ + case WM_MOVE: + /* The WM_SIZE and WM_MOVE messages are not sent if an application handles the + * WM_WINDOWPOSCHANGED message without calling DefWindowProc. It is more efficient + * to perform any move or size change processing during the WM_WINDOWPOSCHANGED + * message without calling DefWindowProc. + */ + event = processWindowEvent(GHOST_kEventWindowMove, window); + break; //////////////////////////////////////////////////////////////////////// // Window events, ignored //////////////////////////////////////////////////////////////////////// @@ -782,12 +798,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * to perform any move or size change processing during the WM_WINDOWPOSCHANGED * message without calling DefWindowProc. */ - case WM_MOVE: - /* The WM_SIZE and WM_MOVE messages are not sent if an application handles the - * WM_WINDOWPOSCHANGED message without calling DefWindowProc. It is more efficient - * to perform any move or size change processing during the WM_WINDOWPOSCHANGED - * message without calling DefWindowProc. - */ case WM_ERASEBKGND: /* An application sends the WM_ERASEBKGND message when the window background must be * erased (for example, when a window is resized). The message is sent to prepare an @@ -822,11 +832,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, */ case WM_SETFOCUS: /* The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus. */ - case WM_MOVING: - /* The WM_MOVING message is sent to a window that the user is moving. By processing - * this message, an application can monitor the size and position of the drag rectangle - * and, if needed, change its size or position. - */ case WM_ENTERSIZEMOVE: /* The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving * or sizing modal loop. The window enters the moving or sizing modal loop when the user @@ -904,7 +909,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, if (event) { system->pushEvent(event); - lResult = 0; } else { lResult = ::DefWindowProc(hwnd, msg, wParam, lParam); @@ -912,7 +916,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, return lResult; } -GHOST_TUns8* GHOST_SystemWin32::getClipboard(int flag) const +GHOST_TUns8* GHOST_SystemWin32::getClipboard(bool selection) const { char *buffer; char *temp_buff; @@ -942,9 +946,10 @@ GHOST_TUns8* GHOST_SystemWin32::getClipboard(int flag) const } } -void GHOST_SystemWin32::putClipboard(GHOST_TInt8 *buffer, int flag) const +void GHOST_SystemWin32::putClipboard(GHOST_TInt8 *buffer, bool selection) const { - if(flag == 1) {return;} //If Flag is 1 means the selection and is used on X11 + if(selection) {return;} // for copying the selection, used on X11 + if (OpenClipboard(NULL)) { HLOCAL clipbuffer; char *data; diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h index 00f7af00162..9387b6cad50 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.h +++ b/intern/ghost/intern/GHOST_SystemWin32.h @@ -170,17 +170,17 @@ public: /** * Returns unsinged char from CUT_BUFFER0 - * @param flag Flag is not used on win32 on used on X11 - * @return Returns the Clipboard + * @param selection Used by X11 only + * @return Returns the Clipboard */ - virtual GHOST_TUns8* getClipboard(int flag) const; + virtual GHOST_TUns8* getClipboard(bool selection) const; /** * Puts buffer to system clipboard - * @param flag Flag is not used on win32 on used on X11 - * @return No return + * @param selection Used by X11 only + * @return No return */ - virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const; + virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const; protected: /** diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 8073756e453..9f6f3b4d5b0 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -107,6 +107,25 @@ GHOST_SystemX11( m_wm_protocols= XInternAtom(m_display, "WM_PROTOCOLS", False); m_wm_take_focus= XInternAtom(m_display, "WM_TAKE_FOCUS", False); + m_wm_state= XInternAtom(m_display, "WM_STATE", False); + m_wm_change_state= XInternAtom(m_display, "WM_CHANGE_STATE", False); + m_net_state= XInternAtom(m_display, "_NET_WM_STATE", False); + m_net_max_horz= XInternAtom(m_display, + "_NET_WM_STATE_MAXIMIZED_HORZ", False); + m_net_max_vert= XInternAtom(m_display, + "_NET_WM_STATE_MAXIMIZED_VERT", False); + m_net_fullscreen= XInternAtom(m_display, + "_NET_WM_STATE_FULLSCREEN", False); + m_motif= XInternAtom(m_display, "_MOTIF_WM_HINTS", False); + m_targets= XInternAtom(m_display, "TARGETS", False); + m_string= XInternAtom(m_display, "STRING", False); + m_compound_text= XInternAtom(m_display, "COMPOUND_TEXT", False); + m_text= XInternAtom(m_display, "TEXT", False); + m_clipboard= XInternAtom(m_display, "CLIPBOARD", False); + m_primary= XInternAtom(m_display, "PRIMARY", False); + m_xclip_out= XInternAtom(m_display, "XCLIP_OUT", False); + m_incr= XInternAtom(m_display, "INCR", False); + m_utf8_string= XInternAtom(m_display, "UTF8_STRING", False); // compute the initial time timeval tv; @@ -129,6 +148,13 @@ GHOST_SystemX11( } +GHOST_SystemX11:: +~GHOST_SystemX11() +{ + XCloseDisplay(m_display); +} + + GHOST_TSuccess GHOST_SystemX11:: init( @@ -136,11 +162,9 @@ init( GHOST_TSuccess success = GHOST_System::init(); if (success) { - m_keyboard_vector = new char[32]; - m_displayManager = new GHOST_DisplayManagerX11(this); - if (m_keyboard_vector && m_displayManager) { + if (m_displayManager) { return GHOST_kSuccess; } } @@ -222,11 +246,8 @@ createWindow( ); if (window) { - - // Install a new protocol for this window - so we can overide - // the default window closure mechanism. - - XSetWMProtocols(m_display, window->getXWindow(), &m_delete_window_atom, 1); + // Both are now handle in GHOST_WindowX11.cpp + // Focus and Delete atoms. if (window->getValid()) { // Store the pointer to the window @@ -308,7 +329,10 @@ processEvents( if (next==GHOST_kFireTimeNever) { SleepTillEvent(m_display, -1); } else { - SleepTillEvent(m_display, next - getMilliSeconds()); + GHOST_TInt64 maxSleep = next - getMilliSeconds(); + + if(maxSleep >= 0) + SleepTillEvent(m_display, next - getMilliSeconds()); } } @@ -515,11 +539,28 @@ GHOST_SystemX11::processEvent(XEvent *xe) window, data); } } else if (((Atom)xcme.data.l[0]) == m_wm_take_focus) { + XWindowAttributes attr; + Window fwin; + int revert_to; + /* as ICCCM say, we need reply this event * with a SetInputFocus, the data[1] have * the valid timestamp (send by the wm). + * + * Some WM send this event before the + * window is really mapped (for example + * change from virtual desktop), so we need + * to be sure that our windows is mapped + * or this call fail and close blender. */ - XSetInputFocus(m_display, xcme.window, RevertToParent, xcme.data.l[1]); + if (XGetWindowAttributes(m_display, xcme.window, &attr) == True) { + if (XGetInputFocus(m_display, &fwin, &revert_to) == True) { + if (attr.map_state == IsViewable) { + if (fwin != xcme.window) + XSetInputFocus(m_display, xcme.window, RevertToParent, xcme.data.l[1]); + } + } + } } else { /* Unknown client message, ignore */ } @@ -531,12 +572,45 @@ GHOST_SystemX11::processEvent(XEvent *xe) // We're not interested in the following things.(yet...) case NoExpose : case GraphicsExpose : + break; case EnterNotify: case LeaveNotify: + { // XCrossingEvents pointer leave enter window. + // also do cursor move here, MotionNotify only + // happens when motion starts & ends inside window + XCrossingEvent &xce = xe->xcrossing; + + g_event = new + GHOST_EventCursor( + getMilliSeconds(), + GHOST_kEventCursorMove, + window, + xce.x_root, + xce.y_root + ); break; + } case MapNotify: + /* + * From ICCCM: + * [ Clients can select for StructureNotify on their + * top-level windows to track transition between + * Normal and Iconic states. Receipt of a MapNotify + * event will indicate a transition to the Normal + * state, and receipt of an UnmapNotify event will + * indicate a transition to the Iconic state. ] + */ + if (window->m_post_init == True) { + /* + * Now we are sure that the window is + * mapped, so only need change the state. + */ + window->setState (window->m_post_state); + window->m_post_init = False; + } + break; case UnmapNotify: break; case MappingNotify: @@ -610,12 +684,12 @@ GHOST_SystemX11::processEvent(XEvent *xe) { XProximityNotifyEvent* data = (XProximityNotifyEvent*)xe; if(data->deviceid == window->GetXTablet().StylusID) - window->GetXTablet().CommonData.Active= 1; + window->GetXTablet().CommonData.Active= GHOST_kTabletModeStylus; else if(data->deviceid == window->GetXTablet().EraserID) - window->GetXTablet().CommonData.Active= 2; + window->GetXTablet().CommonData.Active= GHOST_kTabletModeEraser; } else if(xe->type == window->GetXTablet().ProxOutEvent) - window->GetXTablet().CommonData.Active= 0; + window->GetXTablet().CommonData.Active= GHOST_kTabletModeNone; break; } @@ -646,9 +720,9 @@ getModifierKeys( // analyse the masks retuned from XQueryPointer. - memset(m_keyboard_vector,0,sizeof(m_keyboard_vector)); + memset((void *)m_keyboard_vector,0,sizeof(m_keyboard_vector)); - XQueryKeymap(m_display,m_keyboard_vector); + XQueryKeymap(m_display,(char *)m_keyboard_vector); // now translate key symobols into keycodes and // test with vector. @@ -975,114 +1049,298 @@ convertXKey( #undef GXMAP - GHOST_TUns8* -GHOST_SystemX11:: -getClipboard(int flag -) const { - //Flag - //0 = Regular clipboard 1 = selection - static Atom Primary_atom, clip_String, compound_text; - Atom rtype; - Window m_window, owner; - unsigned char *data, *tmp_data; - int bits; - unsigned long len, bytes; - XEvent xevent; - - vector & win_vec = m_windowManager->getWindows(); - vector::iterator win_it = win_vec.begin(); - GHOST_WindowX11 * window = static_cast(*win_it); - m_window = window->getXWindow(); +/* from xclip.c xcout() v0.11 */ - clip_String = XInternAtom(m_display, "_BLENDER_STRING", False); - compound_text = XInternAtom(m_display, "COMPOUND_TEXT", False); +#define XCLIB_XCOUT_NONE 0 /* no context */ +#define XCLIB_XCOUT_SENTCONVSEL 1 /* sent a request */ +#define XCLIB_XCOUT_INCR 2 /* in an incr loop */ +#define XCLIB_XCOUT_FALLBACK 3 /* STRING failed, need fallback to UTF8 */ +#define XCLIB_XCOUT_FALLBACK_UTF8 4 /* UTF8 failed, move to compouned */ +#define XCLIB_XCOUT_FALLBACK_COMP 5 /* compouned failed, move to text. */ +#define XCLIB_XCOUT_FALLBACK_TEXT 6 - //lets check the owner and if it is us then return the static buffer - if(flag == 0) { - Primary_atom = XInternAtom(m_display, "CLIPBOARD", False); - owner = XGetSelectionOwner(m_display, Primary_atom); - if (owner == m_window) { - data = (unsigned char*) malloc(strlen(txt_cut_buffer)+1); - strcpy((char*)data, txt_cut_buffer); - return (GHOST_TUns8*)data; - } else if (owner == None) { - return NULL; - } - } else { - Primary_atom = XInternAtom(m_display, "PRIMARY", False); - owner = XGetSelectionOwner(m_display, Primary_atom); - if (owner == m_window) { - data = (unsigned char*) malloc(strlen(txt_select_buffer)+1); - strcpy((char*)data, txt_select_buffer); - return (GHOST_TUns8*)data; - } else if (owner == None) { - return NULL; - } - } - - if(!Primary_atom) { - return NULL; - } - - XDeleteProperty(m_display, m_window, Primary_atom); - XConvertSelection(m_display, Primary_atom, compound_text, clip_String, m_window, CurrentTime); //XA_STRING - XFlush(m_display); - - //This needs to change so we do not wait for ever or check owner first - while(1) { - XNextEvent(m_display, &xevent); - if(xevent.type == SelectionNotify) { - if(XGetWindowProperty(m_display, m_window, xevent.xselection.property, 0L, 4096L, False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) == Success) { - if (data) { - tmp_data = (unsigned char*) malloc(strlen((char*)data)+1); - strcpy((char*)tmp_data, (char*)data); - XFree(data); - return (GHOST_TUns8*)tmp_data; - } - } - return NULL; - } - } -} - - void -GHOST_SystemX11:: -putClipboard( -GHOST_TInt8 *buffer, int flag) const +// Retrieves the contents of a selections. +void GHOST_SystemX11::getClipboard_xcout(XEvent evt, + Atom sel, Atom target, unsigned char **txt, + unsigned long *len, unsigned int *context) const { - static Atom Primary_atom; - Window m_window, owner; - - if(!buffer) {return;} - - if(flag == 0) { - Primary_atom = XInternAtom(m_display, "CLIPBOARD", False); - if(txt_cut_buffer) { free((void*)txt_cut_buffer); } - - txt_cut_buffer = (char*) malloc(strlen(buffer)+1); - strcpy(txt_cut_buffer, buffer); - } else { - Primary_atom = XInternAtom(m_display, "PRIMARY", False); - if(txt_select_buffer) { free((void*)txt_select_buffer); } - - txt_select_buffer = (char*) malloc(strlen(buffer)+1); - strcpy(txt_select_buffer, buffer); - } - + Atom pty_type; + int pty_format; + unsigned char *buffer; + unsigned long pty_size, pty_items; + unsigned char *ltxt= *txt; + vector & win_vec = m_windowManager->getWindows(); vector::iterator win_it = win_vec.begin(); GHOST_WindowX11 * window = static_cast(*win_it); - m_window = window->getXWindow(); + Window win = window->getXWindow(); - if(!Primary_atom) { - return; + switch (*context) { + // There is no context, do an XConvertSelection() + case XCLIB_XCOUT_NONE: + // Initialise return length to 0 + if (*len > 0) { + free(*txt); + *len = 0; + } + + // Send a selection request + XConvertSelection(m_display, sel, target, m_xclip_out, win, CurrentTime); + *context = XCLIB_XCOUT_SENTCONVSEL; + return; + + case XCLIB_XCOUT_SENTCONVSEL: + if (evt.type != SelectionNotify) + return; + + if (target == m_utf8_string && evt.xselection.property == None) { + *context= XCLIB_XCOUT_FALLBACK_UTF8; + return; + } + else if (target == m_compound_text && evt.xselection.property == None) { + *context= XCLIB_XCOUT_FALLBACK_COMP; + return; + } + else if (target == m_text && evt.xselection.property == None) { + *context= XCLIB_XCOUT_FALLBACK_TEXT; + return; + } + + // find the size and format of the data in property + XGetWindowProperty(m_display, win, m_xclip_out, 0, 0, False, + AnyPropertyType, &pty_type, &pty_format, + &pty_items, &pty_size, &buffer); + XFree(buffer); + + if (pty_type == m_incr) { + // start INCR mechanism by deleting property + XDeleteProperty(m_display, win, m_xclip_out); + XFlush(m_display); + *context = XCLIB_XCOUT_INCR; + return; + } + + // if it's not incr, and not format == 8, then there's + // nothing in the selection (that xclip understands, anyway) + + if (pty_format != 8) { + *context = XCLIB_XCOUT_NONE; + return; + } + + // not using INCR mechanism, just read the property + XGetWindowProperty(m_display, win, m_xclip_out, 0, (long) pty_size, + False, AnyPropertyType, &pty_type, + &pty_format, &pty_items, &pty_size, &buffer); + + // finished with property, delete it + XDeleteProperty(m_display, win, m_xclip_out); + + // copy the buffer to the pointer for returned data + ltxt = (unsigned char *) malloc(pty_items); + memcpy(ltxt, buffer, pty_items); + + // set the length of the returned data + *len = pty_items; + *txt = ltxt; + + // free the buffer + XFree(buffer); + + *context = XCLIB_XCOUT_NONE; + + // complete contents of selection fetched, return 1 + return; + + case XCLIB_XCOUT_INCR: + // To use the INCR method, we basically delete the + // property with the selection in it, wait for an + // event indicating that the property has been created, + // then read it, delete it, etc. + + // make sure that the event is relevant + if (evt.type != PropertyNotify) + return; + + // skip unless the property has a new value + if (evt.xproperty.state != PropertyNewValue) + return; + + // check size and format of the property + XGetWindowProperty(m_display, win, m_xclip_out, 0, 0, False, + AnyPropertyType, &pty_type, &pty_format, + &pty_items, &pty_size, (unsigned char **) &buffer); + + if (pty_format != 8) { + // property does not contain text, delete it + // to tell the other X client that we have read + // it and to send the next property + XFree(buffer); + XDeleteProperty(m_display, win, m_xclip_out); + return; + } + + if (pty_size == 0) { + // no more data, exit from loop + XFree(buffer); + XDeleteProperty(m_display, win, m_xclip_out); + *context = XCLIB_XCOUT_NONE; + + // this means that an INCR transfer is now + // complete, return 1 + return; + } + + XFree(buffer); + + // if we have come this far, the propery contains + // text, we know the size. + XGetWindowProperty(m_display, win, m_xclip_out, 0, (long) pty_size, + False, AnyPropertyType, &pty_type, &pty_format, + &pty_items, &pty_size, (unsigned char **) &buffer); + + // allocate memory to accommodate data in *txt + if (*len == 0) { + *len = pty_items; + ltxt = (unsigned char *) malloc(*len); + } + else { + *len += pty_items; + ltxt = (unsigned char *) realloc(ltxt, *len); + } + + // add data to ltxt + memcpy(<xt[*len - pty_items], buffer, pty_items); + + *txt = ltxt; + XFree(buffer); + + // delete property to get the next item + XDeleteProperty(m_display, win, m_xclip_out); + XFlush(m_display); + return; } - - XSetSelectionOwner(m_display, Primary_atom, m_window, CurrentTime); - owner = XGetSelectionOwner(m_display, Primary_atom); - if (owner != m_window) - fprintf(stderr, "failed to own primary\n"); - return; } +GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const +{ + Atom sseln; + Atom target= m_string; + Window owner; + + // from xclip.c doOut() v0.11 + unsigned char *sel_buf; + unsigned long sel_len= 0; + XEvent evt; + unsigned int context= XCLIB_XCOUT_NONE; + + if (selection == True) + sseln= m_primary; + else + sseln= m_clipboard; + + vector & win_vec = m_windowManager->getWindows(); + vector::iterator win_it = win_vec.begin(); + GHOST_WindowX11 * window = static_cast(*win_it); + Window win = window->getXWindow(); + + /* check if we are the owner. */ + owner= XGetSelectionOwner(m_display, sseln); + if (owner == win) { + if (sseln == m_clipboard) { + sel_buf= (unsigned char *)malloc(strlen(txt_cut_buffer)+1); + strcpy((char *)sel_buf, txt_cut_buffer); + return((GHOST_TUns8*)sel_buf); + } + else { + sel_buf= (unsigned char *)malloc(strlen(txt_select_buffer)+1); + strcpy((char *)sel_buf, txt_select_buffer); + return((GHOST_TUns8*)sel_buf); + } + } + else if (owner == None) + return(NULL); + + while (1) { + /* only get an event if xcout() is doing something */ + if (context != XCLIB_XCOUT_NONE) + XNextEvent(m_display, &evt); + + /* fetch the selection, or part of it */ + getClipboard_xcout(evt, sseln, target, &sel_buf, &sel_len, &context); + + /* fallback is needed. set XA_STRING to target and restart the loop. */ + if (context == XCLIB_XCOUT_FALLBACK) { + context= XCLIB_XCOUT_NONE; + target= m_string; + continue; + } + else if (context == XCLIB_XCOUT_FALLBACK_UTF8) { + /* utf8 fail, move to compouned text. */ + context= XCLIB_XCOUT_NONE; + target= m_compound_text; + continue; + } + else if (context == XCLIB_XCOUT_FALLBACK_COMP) { + /* compouned text faile, move to text. */ + context= XCLIB_XCOUT_NONE; + target= m_text; + continue; + } + + /* only continue if xcout() is doing something */ + if (context == XCLIB_XCOUT_NONE) + break; + } + + if (sel_len) { + /* only print the buffer out, and free it, if it's not + * empty + */ + unsigned char *tmp_data = (unsigned char*) malloc(sel_len+1); + memcpy((char*)tmp_data, (char*)sel_buf, sel_len); + tmp_data[sel_len] = '\0'; + + if (sseln == m_string) + XFree(sel_buf); + else + free(sel_buf); + + return (GHOST_TUns8*)tmp_data; + } + return(NULL); +} + +void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const +{ + Window m_window, owner; + + vector & win_vec = m_windowManager->getWindows(); + vector::iterator win_it = win_vec.begin(); + GHOST_WindowX11 * window = static_cast(*win_it); + m_window = window->getXWindow(); + + if (buffer) { + if (selection == False) { + XSetSelectionOwner(m_display, m_clipboard, m_window, CurrentTime); + owner= XGetSelectionOwner(m_display, m_clipboard); + if (txt_cut_buffer) + free((void*)txt_cut_buffer); + + txt_cut_buffer = (char*) malloc(strlen(buffer)+1); + strcpy(txt_cut_buffer, buffer); + } else { + XSetSelectionOwner(m_display, m_primary, m_window, CurrentTime); + owner= XGetSelectionOwner(m_display, m_primary); + if (txt_select_buffer) + free((void*)txt_select_buffer); + + txt_select_buffer = (char*) malloc(strlen(buffer)+1); + strcpy(txt_select_buffer, buffer); + } + + if (owner != m_window) + fprintf(stderr, "failed to own primary\n"); + } +} diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index 576577917ba..782f08f6737 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -59,6 +59,12 @@ public: GHOST_SystemX11( ); + /** + * Destructor. + */ + virtual ~GHOST_SystemX11(); + + GHOST_TSuccess init( ); @@ -199,27 +205,54 @@ public: prepareNdofInfo( volatile GHOST_TEventNDOFData *current_values ); - + + /* Helped function for get data from the clipboard. */ + void getClipboard_xcout(XEvent evt, Atom sel, Atom target, + unsigned char **txt, unsigned long *len, + unsigned int *context) const; + /** * Returns unsinged char from CUT_BUFFER0 - * @param flag Flag indicates which buffer to return 0 for clipboard 1 for selection - * @return Returns the Clipboard indicated by Flag + * @param selection Get selection, X11 only feature + * @return Returns the Clipboard indicated by Flag */ - GHOST_TUns8* - getClipboard(int flag) const; + GHOST_TUns8 *getClipboard(bool selection) const; /** * Puts buffer to system clipboard * @param buffer The buffer to copy to the clipboard - * @param flag Flag indicates which buffer to set ownership of 0 for clipboard 1 for selection + * @param selection Set the selection into the clipboard, X11 only feature */ - virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const; + void putClipboard(GHOST_TInt8 *buffer, bool selection) const; - /* Atom used for ICCCM. */ + /** + * Atom used for ICCCM, WM-spec and Motif. + * We only need get this atom at the start, it's relative + * to the display not the window and are public for every + * window that need it. + */ + Atom m_wm_state; + Atom m_wm_change_state; + Atom m_net_state; + Atom m_net_max_horz; + Atom m_net_max_vert; + Atom m_net_fullscreen; + Atom m_motif; Atom m_wm_take_focus; Atom m_wm_protocols; Atom m_delete_window_atom; + /* Atoms for Selection, copy & paste. */ + Atom m_targets; + Atom m_string; + Atom m_compound_text; + Atom m_text; + Atom m_clipboard; + Atom m_primary; + Atom m_xclip_out; + Atom m_incr; + Atom m_utf8_string; + private : Display * m_display; @@ -231,7 +264,7 @@ private : GHOST_TUns64 m_start_time; /// A vector of keyboard key masks - char *m_keyboard_vector; + char m_keyboard_vector[32]; /** * Return the ghost window associated with the diff --git a/intern/ghost/intern/GHOST_TimerManager.h b/intern/ghost/intern/GHOST_TimerManager.h index 27bbdb1ea1d..b37b5b79c14 100644 --- a/intern/ghost/intern/GHOST_TimerManager.h +++ b/intern/ghost/intern/GHOST_TimerManager.h @@ -33,10 +33,6 @@ #ifndef _GHOST_TIMER_MANAGER_H_ #define _GHOST_TIMER_MANAGER_H_ -#ifdef WIN32 -#pragma warning (disable:4786) // suppress stl-MSVC debug info warning -#endif // WIN32 - #include #include "GHOST_Types.h" diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp index a35680d1586..dee890830a1 100644 --- a/intern/ghost/intern/GHOST_Window.cpp +++ b/intern/ghost/intern/GHOST_Window.cpp @@ -50,6 +50,7 @@ GHOST_Window::GHOST_Window( : m_drawingContextType(type), m_cursorVisible(true), + m_cursorGrabbed(true), m_cursorShape(GHOST_kStandardCursorDefault), m_stereoVisual(stereoVisual) { @@ -93,6 +94,20 @@ GHOST_TSuccess GHOST_Window::setCursorVisibility(bool visible) } } +GHOST_TSuccess GHOST_Window::setCursorGrab(bool grab) +{ + if(m_cursorGrabbed == grab) + return GHOST_kSuccess; + + if (setWindowCursorGrab(grab)) { + m_cursorGrabbed = grab; + return GHOST_kSuccess; + } + else { + return GHOST_kFailure; + } +} + GHOST_TSuccess GHOST_Window::setCursorShape(GHOST_TStandardCursor cursorShape) { if (setWindowCursorShape(cursorShape)) { diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 06318613b14..88178bae5b3 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -166,6 +166,13 @@ public: */ virtual GHOST_TSuccess setCursorVisibility(bool visible); + /** + * Sets the cursor grab. + * @param grab The new grab state of the cursor. + * @return Indication of success. + */ + virtual GHOST_TSuccess setCursorGrab(bool grab); + /** * Returns the type of drawing context used in this window. * @return The current type of drawing context. @@ -218,6 +225,12 @@ protected: * native window system calls. */ virtual GHOST_TSuccess setWindowCursorVisibility(bool visible) = 0; + + /** + * Sets the cursor grab on the window using + * native window system calls. + */ + virtual GHOST_TSuccess setWindowCursorGrab(bool grab) { return GHOST_kSuccess; }; /** * Sets the cursor shape on the window using @@ -242,6 +255,9 @@ protected: /** The current visibility of the cursor */ bool m_cursorVisible; + + /** The current grabbed state of the cursor */ + bool m_cursorGrabbed; /** The current shape of the cursor */ GHOST_TStandardCursor m_cursorShape; diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp index 9ae9e283b69..362e949a0a4 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.cpp +++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp @@ -51,7 +51,6 @@ AGL_RGBA, AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_DEPTH_SIZE, 32, -AGL_AUX_BUFFERS, 1, AGL_NONE, }; @@ -61,7 +60,6 @@ AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_FULLSCREEN, AGL_DEPTH_SIZE, 32, -AGL_AUX_BUFFERS, 1, AGL_NONE, }; @@ -185,7 +183,7 @@ GHOST_WindowCarbon::GHOST_WindowCarbon( updateDrawingContext(); activateDrawingContext(); - m_tablet.Active = 0; + m_tablet.Active = GHOST_kTabletModeNone; } } @@ -252,7 +250,9 @@ void GHOST_WindowCarbon::getClientBounds(GHOST_Rect& bounds) const { Rect rect; GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getClientBounds(): window invalid") - ::GetPortBounds(m_grafPtr, &rect); + //::GetPortBounds(m_grafPtr, &rect); + ::GetWindowBounds(m_windowRef, kWindowContentRgn, &rect); + bounds.m_b = rect.bottom; bounds.m_l = rect.left; bounds.m_r = rect.right; @@ -326,7 +326,7 @@ GHOST_TWindowState GHOST_WindowCarbon::getState() const { GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getState(): window invalid") GHOST_TWindowState state; - if (::IsWindowVisible(m_windowRef)) { + if (::IsWindowVisible(m_windowRef) == false) { state = GHOST_kWindowStateMinimized; } else if (::IsWindowInStandardState(m_windowRef, nil, nil)) { @@ -378,6 +378,12 @@ GHOST_TSuccess GHOST_WindowCarbon::setState(GHOST_TWindowState state) case GHOST_kWindowStateMinimized: ::HideWindow(m_windowRef); break; + case GHOST_kWindowStateModified: + SetWindowModified(m_windowRef, 1); + break; + case GHOST_kWindowStateUnModified: + SetWindowModified(m_windowRef, 0); + break; case GHOST_kWindowStateMaximized: case GHOST_kWindowStateNormal: default: diff --git a/intern/ghost/intern/GHOST_WindowManager.cpp b/intern/ghost/intern/GHOST_WindowManager.cpp index 2b0809929c5..af96653db13 100644 --- a/intern/ghost/intern/GHOST_WindowManager.cpp +++ b/intern/ghost/intern/GHOST_WindowManager.cpp @@ -54,6 +54,7 @@ GHOST_WindowManager::GHOST_WindowManager() : GHOST_WindowManager::~GHOST_WindowManager() { + /* m_windows is freed by GHOST_System::disposeWindow */ } diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h index 46d8036328e..46e80d2c603 100644 --- a/intern/ghost/intern/GHOST_WindowManager.h +++ b/intern/ghost/intern/GHOST_WindowManager.h @@ -33,10 +33,6 @@ #ifndef _GHOST_WINDOW_MANAGER_H_ #define _GHOST_WINDOW_MANAGER_H_ -#ifdef WIN32 -#pragma warning (disable:4786) // suppress stl-MSVC debug info warning -#endif // WIN32 - #include #include "GHOST_Rect.h" diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 6a06f4d715a..e2caf31edee 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -111,22 +111,40 @@ GHOST_WindowWin32::GHOST_WindowWin32( m_hasMouseCaptured(false), m_nPressedButtons(0), m_customCursor(0), + m_wintab(NULL), m_tabletData(NULL), m_tablet(0), - m_wintab(NULL), m_maxPressure(0) { if (state != GHOST_kWindowStateFullScreen) { - /* Convert client size into window size */ + RECT rect; + GHOST_TUns32 tw, th; + width += GetSystemMetrics(SM_CXSIZEFRAME)*2; height += GetSystemMetrics(SM_CYSIZEFRAME)*2 + GetSystemMetrics(SM_CYCAPTION); + // take taskbar into account + SystemParametersInfo(SPI_GETWORKAREA,0,&rect,0); + th = rect.bottom - rect.top; + tw = rect.right - rect.left; + + if(tw < width) + { + width = tw; + left = rect.left; + } + if(th < height) + { + height = th; + top = rect.top; + } + m_hWnd = ::CreateWindow( s_windowClassName, // pointer to registered class name title, // pointer to window name WS_OVERLAPPEDWINDOW, // window style - left, // horizontal position of window - top, // vertical position of window + left, // horizontal position of window + top, // vertical position of window width, // window width height, // window height 0, // handle to parent or owner window @@ -150,7 +168,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( } if (m_hWnd) { // Store a pointer to this class in the window structure - LONG result = ::SetWindowLong(m_hWnd, GWL_USERDATA, (LONG)this); + ::SetWindowLongPtr(m_hWnd, GWL_USERDATA, (LONG_PTR)this); // Store the device context m_hDC = ::GetDC(m_hWnd); @@ -226,7 +244,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( m_tablet = fpWTOpen( m_hWnd, &lc, TRUE ); if (m_tablet) { m_tabletData = new GHOST_TabletData(); - m_tabletData->Active = 0; + m_tabletData->Active = GHOST_kTabletModeNone; } } } @@ -239,7 +257,7 @@ GHOST_WindowWin32::~GHOST_WindowWin32() if (m_wintab) { GHOST_WIN32_WTClose fpWTClose = ( GHOST_WIN32_WTClose ) ::GetProcAddress( m_wintab, "WTClose" ); if (fpWTClose) { - if (m_tablet) + if (m_tablet) fpWTClose(m_tablet); if (m_tabletData) delete m_tabletData; @@ -297,11 +315,22 @@ void GHOST_WindowWin32::getWindowBounds(GHOST_Rect& bounds) const void GHOST_WindowWin32::getClientBounds(GHOST_Rect& bounds) const { RECT rect; - ::GetClientRect(m_hWnd, &rect); - bounds.m_b = rect.bottom; - bounds.m_l = rect.left; - bounds.m_r = rect.right; - bounds.m_t = rect.top; + + LONG_PTR result = ::GetWindowLongPtr(m_hWnd, GWL_STYLE); + ::GetWindowRect(m_hWnd, &rect); + + if((result & (WS_POPUP | WS_MAXIMIZE)) != (WS_POPUP | WS_MAXIMIZE)) { + bounds.m_b = rect.bottom-GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYSIZEFRAME)*2; + bounds.m_l = rect.left; + bounds.m_r = rect.right-GetSystemMetrics(SM_CYSIZEFRAME)*2; + bounds.m_t = rect.top; + } else { + ::GetWindowRect(m_hWnd, &rect); + bounds.m_b = rect.bottom; + bounds.m_l = rect.left; + bounds.m_r = rect.right; + bounds.m_t = rect.top; + } } @@ -310,7 +339,7 @@ GHOST_TSuccess GHOST_WindowWin32::setClientWidth(GHOST_TUns32 width) GHOST_TSuccess success; GHOST_Rect cBnds, wBnds; getClientBounds(cBnds); - if (cBnds.getWidth() != width) { + if (cBnds.getWidth() != (GHOST_TInt32)width) { getWindowBounds(wBnds); int cx = wBnds.getWidth() + width - cBnds.getWidth(); int cy = wBnds.getHeight(); @@ -329,7 +358,7 @@ GHOST_TSuccess GHOST_WindowWin32::setClientHeight(GHOST_TUns32 height) GHOST_TSuccess success; GHOST_Rect cBnds, wBnds; getClientBounds(cBnds); - if (cBnds.getHeight() != height) { + if (cBnds.getHeight() != (GHOST_TInt32)height) { getWindowBounds(wBnds); int cx = wBnds.getWidth(); int cy = wBnds.getHeight() + height - cBnds.getHeight(); @@ -348,7 +377,7 @@ GHOST_TSuccess GHOST_WindowWin32::setClientSize(GHOST_TUns32 width, GHOST_TUns32 GHOST_TSuccess success; GHOST_Rect cBnds, wBnds; getClientBounds(cBnds); - if ((cBnds.getWidth() != width) || (cBnds.getHeight() != height)) { + if ((cBnds.getWidth() != (GHOST_TInt32)width) || (cBnds.getHeight() != (GHOST_TInt32)height)) { getWindowBounds(wBnds); int cx = wBnds.getWidth() + width - cBnds.getWidth(); int cy = wBnds.getHeight() + height - cBnds.getHeight(); @@ -369,7 +398,11 @@ GHOST_TWindowState GHOST_WindowWin32::getState() const state = GHOST_kWindowStateMinimized; } else if (::IsZoomed(m_hWnd)) { - state = GHOST_kWindowStateMaximized; + LONG_PTR result = ::GetWindowLongPtr(m_hWnd, GWL_STYLE); + if((result & (WS_POPUP | WS_MAXIMIZE)) != (WS_POPUP | WS_MAXIMIZE)) + state = GHOST_kWindowStateMaximized; + else + state = GHOST_kWindowStateFullScreen; } else { state = GHOST_kWindowStateNormal; @@ -402,23 +435,25 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) wp.length = sizeof(WINDOWPLACEMENT); ::GetWindowPlacement(m_hWnd, &wp); switch (state) { - case GHOST_kWindowStateMinimized: - wp.showCmd = SW_SHOWMINIMIZED; + case GHOST_kWindowStateMinimized: + wp.showCmd = SW_SHOWMINIMIZED; break; - case GHOST_kWindowStateMaximized: - ShowWindow(m_hWnd, SW_HIDE); //fe. HACK! - //Solves redraw problems when switching from fullscreen to normal. - - wp.showCmd = SW_SHOWMAXIMIZED; - SetWindowLong(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); + case GHOST_kWindowStateMaximized: + ShowWindow(m_hWnd, SW_HIDE); + wp.showCmd = SW_SHOWMAXIMIZED; + SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); break; case GHOST_kWindowStateFullScreen: wp.showCmd = SW_SHOWMAXIMIZED; - SetWindowLong(m_hWnd, GWL_STYLE, WS_POPUP | WS_MAXIMIZE); + wp.ptMaxPosition.x = 0; + wp.ptMaxPosition.y = 0; + SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_POPUP | WS_MAXIMIZE); break; - case GHOST_kWindowStateNormal: - default: - wp.showCmd = SW_SHOWNORMAL; + case GHOST_kWindowStateNormal: + default: + ShowWindow(m_hWnd, SW_HIDE); + wp.showCmd = SW_SHOWNORMAL; + SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); break; } return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; @@ -475,7 +510,7 @@ GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextTyp switch (type) { case GHOST_kDrawingContextTypeOpenGL: { - if(m_stereoVisual) + if(m_stereoVisual) sPreferredFormat.dwFlags |= PFD_STEREO; // Attempt to match device context pixel format to the preferred format @@ -612,9 +647,9 @@ void GHOST_WindowWin32::loadCursor(bool visible, GHOST_TStandardCursor cursor) c default: success = false; } - + if (success) { - HCURSOR hCursor = ::SetCursor(::LoadCursor(0, id)); + ::SetCursor(::LoadCursor(0, id)); } } } @@ -645,7 +680,7 @@ void GHOST_WindowWin32::processWin32TabletInitEvent() { if (m_wintab) { GHOST_WIN32_WTInfo fpWTInfo = ( GHOST_WIN32_WTInfo ) ::GetProcAddress( m_wintab, "WTInfoA" ); - + // let's see if we can initialize tablet here /* check if WinTab available. */ if (fpWTInfo) { @@ -656,7 +691,7 @@ void GHOST_WindowWin32::processWin32TabletInitEvent() m_maxPressure = Pressure.axMax; else m_maxPressure = 0; - + BOOL tiltSupport = fpWTInfo (WTI_DEVICES, DVC_ORIENTATION, &Orientation); if (tiltSupport) { /* does the tablet support azimuth ([0]) and altitude ([1]) */ @@ -669,7 +704,7 @@ void GHOST_WindowWin32::processWin32TabletInitEvent() } } - m_tabletData->Active = 0; + m_tabletData->Active = GHOST_kTabletModeNone; } } } @@ -685,15 +720,15 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam) switch (pkt.pkCursor) { case 0: /* first device */ case 3: /* second device */ - m_tabletData->Active = 0; /* puck - not yet supported */ + m_tabletData->Active = GHOST_kTabletModeNone; /* puck - not yet supported */ break; case 1: case 4: - m_tabletData->Active = 1; /* stylus */ + m_tabletData->Active = GHOST_kTabletModeStylus; /* stylus */ break; case 2: case 5: - m_tabletData->Active = 2; /* eraser */ + m_tabletData->Active = GHOST_kTabletModeEraser; /* eraser */ break; } if (m_maxPressure > 0) { @@ -722,17 +757,17 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam) WACOM uses negative altitude values to show that the pen is inverted; therefore we cast .orAltitude as an (int) and then use the absolute value. */ - + /* convert raw fixed point data to radians */ - altRad = (fabs((float)ort.orAltitude)/(float)m_maxAltitude) * M_PI/2.0; - azmRad = ((float)ort.orAzimuth/(float)m_maxAzimuth) * M_PI*2.0; + altRad = (float)((fabs((float)ort.orAltitude)/(float)m_maxAltitude) * M_PI/2.0); + azmRad = (float)(((float)ort.orAzimuth/(float)m_maxAzimuth) * M_PI*2.0); /* find length of the stylus' projected vector on the XY plane */ vecLen = cos(altRad); /* from there calculate X and Y components based on azimuth */ m_tabletData->Xtilt = sin(azmRad) * vecLen; - m_tabletData->Ytilt = sin(M_PI/2.0 - azmRad) * vecLen; + m_tabletData->Ytilt = (float)(sin(M_PI/2.0 - azmRad) * vecLen); } else { m_tabletData->Xtilt = 0.0f; @@ -762,25 +797,25 @@ static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt) shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00); return shrt; } -GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], +GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY) { - return setWindowCustomCursorShape((GHOST_TUns8*)bitmap, (GHOST_TUns8*)mask, + return setWindowCustomCursorShape((GHOST_TUns8*)bitmap, (GHOST_TUns8*)mask, 16, 16, hotX, hotY, 0, 1); } -GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, int sizeX, int sizeY, int hotX, int hotY, +GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, + GHOST_TUns8 *mask, int sizeX, int sizeY, int hotX, int hotY, int fg_color, int bg_color) { GHOST_TUns32 andData[32]; GHOST_TUns32 xorData[32]; GHOST_TUns32 fullBitRow, fullMaskRow; int x, y, cols; - + cols=sizeX/8; /* Num of whole bytes per row (width of bm/mask) */ if (sizeX%8) cols++; - + if (m_customCursor) { DestroyCursor(m_customCursor); m_customCursor = NULL; @@ -820,9 +855,9 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) { int weight = 0; - + /* assume desktop color depth is 32 bits per pixel */ - + /* cull unusable pixel formats */ /* if no formats can be found, can we determine why it was rejected? */ if( !(pfd.dwFlags & PFD_SUPPORT_OPENGL) || @@ -831,45 +866,45 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) { ( pfd.cDepthBits <= 8 ) || !(pfd.iPixelType == PFD_TYPE_RGBA) ) return 0; - + weight = 1; /* it's usable */ - + /* the bigger the depth buffer the better */ /* give no weight to a 16-bit depth buffer, because those are crap */ weight += pfd.cDepthBits - 16; - + weight += pfd.cColorBits - 8; - + /* want swap copy capability -- it matters a lot */ if(pfd.dwFlags & PFD_SWAP_COPY) weight += 16; - + /* but if it's a generic (not accelerated) view, it's really bad */ if(pfd.dwFlags & PFD_GENERIC_FORMAT) weight /= 10; - + return weight; } -/* A modification of Ron Fosner's replacement for ChoosePixelFormat */ +/* A modification of Ron Fosner's replacement for ChoosePixelFormat */ /* returns 0 on error, else returns the pixel format number to be used */ static int EnumPixelFormats(HDC hdc) { int iPixelFormat; int i, n, w, weight = 0; - PIXELFORMATDESCRIPTOR pfd, pfd_fallback; - + PIXELFORMATDESCRIPTOR pfd; + /* we need a device context to do anything */ if(!hdc) return 0; iPixelFormat = 1; /* careful! PFD numbers are 1 based, not zero based */ - - /* obtain detailed information about + + /* obtain detailed information about the device context's first pixel format */ - n = 1+::DescribePixelFormat(hdc, iPixelFormat, + n = 1+::DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - + /* choose a pixel format using the useless Windows function in case we come up empty handed */ iPixelFormat = ::ChoosePixelFormat( hdc, &sPreferredFormat ); - + if(!iPixelFormat) return 0; /* couldn't find one to use */ for(i=1; i<=n; i++) { /* not the idiom, but it's right */ @@ -884,7 +919,7 @@ static int EnumPixelFormats(HDC hdc) { } } if (weight == 0) { - // we could find the correct stereo setting, just find any suitable format + // we could find the correct stereo setting, just find any suitable format for(i=1; i<=n; i++) { /* not the idiom, but it's right */ ::DescribePixelFormat( hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd ); w = WeightPixelFormat(pfd); diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 73d61a30977..060e9ca6f6c 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -42,6 +42,9 @@ #include #include +#include +#include + // For obscure full screen mode stuuf // lifted verbatim from blut. @@ -54,6 +57,16 @@ typedef struct { #define MWM_HINTS_DECORATIONS (1L << 1) +/* + * A Client can't change the window property, that is + * the work of the window manager. In case, we send + * a ClientMessage to the RootWindow with the property + * and the Action (WM-spec define this): + */ +#define _NET_WM_STATE_REMOVE 0 +#define _NET_WM_STATE_ADD 1 +#define _NET_WM_STATE_TOGGLE 2 + /* import bpy I = bpy.data.images['blender.png'] # the 48x48 icon @@ -177,6 +190,8 @@ GHOST_WindowX11( printf("%s:%d: X11 glxChooseVisual() failed for OpenGL, verify working openGL system!\n", __FILE__, __LINE__); return; } + + memset(&m_xtablet, 0, sizeof(m_xtablet)); // Create a bunch of attributes needed to create an X window. @@ -258,52 +273,28 @@ GHOST_WindowX11( } - - // Are we in fullscreen mode - then include - // some obscure blut code to remove decorations. - - if (state == GHOST_kWindowStateFullScreen) { - - MotifWmHints hints; - Atom atom; - - atom = XInternAtom(m_display, "_MOTIF_WM_HINTS", False); - - if (atom == None) { - GHOST_PRINT("Could not intern X atom for _MOTIF_WM_HINTS.\n"); - } else { - hints.flags = MWM_HINTS_DECORATIONS; - hints.decorations = 0; /* Absolutely no decorations. */ - // other hints.decorations make no sense - // you can't select individual decorations - - XChangeProperty(m_display, m_window, - atom, atom, 32, - PropModeReplace, (unsigned char *) &hints, 4); - } - } else if (state == GHOST_kWindowStateMaximized) { - // With this, xprop should report the following just after launch - // _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ - // After demaximization the right side is empty, though (maybe not the most correct then?) - Atom state, atomh, atomv; - - state = XInternAtom(m_display, "_NET_WM_STATE", False); - atomh = XInternAtom(m_display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); - atomv = XInternAtom(m_display, "_NET_WM_STATE_MAXIMIZED_VERT", False); - if (state == None ) { - GHOST_PRINT("Atom _NET_WM_STATE requested but not avaliable nor created.\n"); - } else { - XChangeProperty(m_display, m_window, - state, XA_ATOM, 32, - PropModeAppend, (unsigned char *) &atomh, 1); - XChangeProperty(m_display, m_window, - state, XA_ATOM, 32, - PropModeAppend, (unsigned char *) &atomv, 1); - } - } + /* + * One of the problem with WM-spec is that can't set a property + * to a window that isn't mapped. That is why we can't "just + * call setState" here. + * + * To fix this, we first need know that the window is really + * map waiting for the MapNotify event. + * + * So, m_post_init indicate that we need wait for the MapNotify + * event and then set the Window state to the m_post_state. + */ + if ((state != GHOST_kWindowStateNormal) && (state != GHOST_kWindowStateMinimized)) { + m_post_init = True; + m_post_state = state; + } + else { + m_post_init = False; + m_post_state = GHOST_kWindowStateNormal; + } // Create some hints for the window manager on how - // we want this window treated. + // we want this window treated. XSizeHints * xsizehints = XAllocSizeHints(); xsizehints->flags = USPosition | USSize; @@ -386,7 +377,8 @@ GHOST_WindowX11( XDestroyImage( mask_image ); xwmhints->initial_state = NormalState; - xwmhints->flags = IconPixmapHint|IconMaskHint|StateHint; + xwmhints->input= True; + xwmhints->flags= InputHint|IconPixmapHint|IconMaskHint|StateHint; XSetWMHints(display, m_window, xwmhints ); XFree(xwmhints); // done setting the icon @@ -422,6 +414,100 @@ static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent) { return 0 ; } +/* These C functions are copied from Wine 1.1.13's wintab.c */ +#define BOOL int +#define TRUE 1 +#define FALSE 0 + +static bool match_token(const char *haystack, const char *needle) +{ + const char *p, *q; + for (p = haystack; *p; ) + { + while (*p && isspace(*p)) + p++; + if (! *p) + break; + + for (q = needle; *q && *p && tolower(*p) == tolower(*q); q++) + p++; + if (! *q && (isspace(*p) || !*p)) + return TRUE; + + while (*p && ! isspace(*p)) + p++; + } + return FALSE; +} + +/* Determining if an X device is a Tablet style device is an imperfect science. +** We rely on common conventions around device names as well as the type reported +** by Wacom tablets. This code will likely need to be expanded for alternate tablet types +** +** Wintab refers to any device that interacts with the tablet as a cursor, +** (stylus, eraser, tablet mouse, airbrush, etc) +** this is not to be confused with wacom x11 configuration "cursor" device. +** Wacoms x11 config "cursor" refers to its device slot (which we mirror with +** our gSysCursors) for puck like devices (tablet mice essentially). +*/ +#if 0 // unused +static BOOL is_tablet_cursor(const char *name, const char *type) +{ + int i; + static const char *tablet_cursor_whitelist[] = { + "wacom", + "wizardpen", + "acecad", + "tablet", + "cursor", + "stylus", + "eraser", + "pad", + NULL + }; + + for (i=0; tablet_cursor_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_cursor_whitelist[i])) + return TRUE; + if (type && match_token(type, tablet_cursor_whitelist[i])) + return TRUE; + } + return FALSE; +} +#endif +static BOOL is_stylus(const char *name, const char *type) +{ + int i; + static const char* tablet_stylus_whitelist[] = { + "stylus", + "wizardpen", + "acecad", + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type && match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + + return FALSE; +} + +static BOOL is_eraser(const char *name, const char *type) +{ + if (name && match_token(name, "eraser")) + return TRUE; + if (type && match_token(type, "eraser")) + return TRUE; + return FALSE; +} +#undef BOOL +#undef TRUE +#undef FALSE +/* end code copied from wine */ + void GHOST_WindowX11::initXInputDevices() { static XErrorHandler old_handler = (XErrorHandler) 0 ; @@ -431,15 +517,21 @@ void GHOST_WindowX11::initXInputDevices() if(version->present) { int device_count; XDeviceInfo* device_info = XListInputDevices(m_display, &device_count); - m_xtablet.StylusDevice = 0; - m_xtablet.EraserDevice = 0; - m_xtablet.CommonData.Active= 0; + m_xtablet.StylusDevice = NULL; + m_xtablet.EraserDevice = NULL; + m_xtablet.CommonData.Active= GHOST_kTabletModeNone; /* Install our error handler to override Xlib's termination behavior */ old_handler = XSetErrorHandler(ApplicationErrorHandler) ; for(int i=0; inum_classes; ++j) { if(ici->c_class==ValuatorClass) { +// printf("\t\tfound ValuatorClass\n"); XValuatorInfo* xvi = (XValuatorInfo*)ici; m_xtablet.PressureLevels = xvi->axes[2].max_value; @@ -464,11 +557,16 @@ void GHOST_WindowX11::initXInputDevices() m_xtablet.StylusID= 0; } } - if(!strcasecmp(device_info[i].name, "eraser")) { + else if(m_xtablet.EraserDevice==NULL && is_eraser(device_info[i].name, device_type)) { +// printf("\tfound eraser\n"); m_xtablet.EraserID= device_info[i].id; m_xtablet.EraserDevice = XOpenDevice(m_display, m_xtablet.EraserID); if (m_xtablet.EraserDevice == NULL) m_xtablet.EraserID= 0; } + + if(device_type) { + XFree((void*)device_type); + } } /* Restore handler */ @@ -509,7 +607,7 @@ GHOST_WindowX11:: getXWindow( ){ return m_window; -} +} bool GHOST_WindowX11:: @@ -523,7 +621,17 @@ GHOST_WindowX11:: setTitle( const STR_String& title ){ + Atom name = XInternAtom(m_display, "_NET_WM_NAME", 0); + Atom utf8str = XInternAtom(m_display, "UTF8_STRING", 0); + XChangeProperty(m_display, m_window, + name, utf8str, 8, PropModeReplace, + (const unsigned char*) title.ReadPtr(), + strlen(title.ReadPtr())); + +// This should convert to valid x11 string +// and getTitle would need matching change XStoreName(m_display,m_window,title); + XFlush(m_display); } @@ -620,7 +728,7 @@ screenToClient( GHOST_TInt32& outX, GHOST_TInt32& outY ) const { - // not sure about this one! + // This is correct! int ax,ay; Window temp; @@ -664,28 +772,298 @@ clientToScreen( outY = ay; } +void GHOST_WindowX11::icccmSetState(int state) +{ + XEvent xev; - GHOST_TWindowState -GHOST_WindowX11:: -getState( -) const { - //FIXME - return GHOST_kWindowStateNormal; + if (state != IconicState) + return; + + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.display = m_display; + xev.xclient.window = m_window; + xev.xclient.format = 32; + xev.xclient.message_type = m_system->m_wm_change_state; + xev.xclient.data.l[0] = state; + XSendEvent (m_display, RootWindow(m_display, DefaultScreen(m_display)), + False, SubstructureNotifyMask | SubstructureRedirectMask, &xev); } - GHOST_TSuccess -GHOST_WindowX11:: -setState( - GHOST_TWindowState state -){ - //TODO +int GHOST_WindowX11::icccmGetState(void) const +{ + unsigned char *prop_ret; + unsigned long bytes_after, num_ret; + Atom type_ret; + int format_ret, st; - if (state == (int)getState()) { - return GHOST_kSuccess; - } else { - return GHOST_kFailure; + prop_ret = NULL; + st = XGetWindowProperty(m_display, m_window, m_system->m_wm_state, 0, + 0x7fffffff, False, m_system->m_wm_state, &type_ret, + &format_ret, &num_ret, &bytes_after, &prop_ret); + + if ((st == Success) && (prop_ret) && (num_ret == 2)) + st = prop_ret[0]; + else + st = NormalState; + + if (prop_ret) + XFree(prop_ret); + return (st); +} + +void GHOST_WindowX11::netwmMaximized(bool set) +{ + XEvent xev; + + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.window = m_window; + xev.xclient.message_type = m_system->m_net_state; + xev.xclient.format = 32; + + if (set == True) + xev.xclient.data.l[0] = _NET_WM_STATE_ADD; + else + xev.xclient.data.l[0] = _NET_WM_STATE_REMOVE; + + xev.xclient.data.l[1] = m_system->m_net_max_horz; + xev.xclient.data.l[2] = m_system->m_net_max_vert; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + XSendEvent(m_display, RootWindow(m_display, DefaultScreen(m_display)), + False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); +} + +bool GHOST_WindowX11::netwmIsMaximized(void) const +{ + unsigned char *prop_ret; + unsigned long bytes_after, num_ret, i; + Atom type_ret; + bool st; + int format_ret, ret, count; + + prop_ret = NULL; + st = False; + ret = XGetWindowProperty(m_display, m_window, m_system->m_net_state, 0, + 0x7fffffff, False, XA_ATOM, &type_ret, &format_ret, + &num_ret, &bytes_after, &prop_ret); + if ((ret == Success) && (prop_ret) && (format_ret == 32)) { + count = 0; + for (i = 0; i < num_ret; i++) { + if (((unsigned long *) prop_ret)[i] == m_system->m_net_max_horz) + count++; + if (((unsigned long *) prop_ret)[i] == m_system->m_net_max_vert) + count++; + if (count == 2) { + st = True; + break; + } + } } + if (prop_ret) + XFree(prop_ret); + return (st); +} + +void GHOST_WindowX11::netwmFullScreen(bool set) +{ + XEvent xev; + + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.window = m_window; + xev.xclient.message_type = m_system->m_net_state; + xev.xclient.format = 32; + + if (set == True) + xev.xclient.data.l[0] = _NET_WM_STATE_ADD; + else + xev.xclient.data.l[0] = _NET_WM_STATE_REMOVE; + + xev.xclient.data.l[1] = m_system->m_net_fullscreen; + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + XSendEvent(m_display, RootWindow(m_display, DefaultScreen(m_display)), + False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); +} + +bool GHOST_WindowX11::netwmIsFullScreen(void) const +{ + unsigned char *prop_ret; + unsigned long bytes_after, num_ret, i; + Atom type_ret; + bool st; + int format_ret, ret; + + prop_ret = NULL; + st = False; + ret = XGetWindowProperty(m_display, m_window, m_system->m_net_state, 0, + 0x7fffffff, False, XA_ATOM, &type_ret, &format_ret, + &num_ret, &bytes_after, &prop_ret); + if ((ret == Success) && (prop_ret) && (format_ret == 32)) { + for (i = 0; i < num_ret; i++) { + if (((unsigned long *) prop_ret)[i] == m_system->m_net_fullscreen) { + st = True; + break; + } + } + } + + if (prop_ret) + XFree(prop_ret); + return (st); +} + +void GHOST_WindowX11::motifFullScreen(bool set) +{ + MotifWmHints hints; + + hints.flags = MWM_HINTS_DECORATIONS; + if (set == True) + hints.decorations = 0; + else + hints.decorations = 1; + + XChangeProperty(m_display, m_window, m_system->m_motif, + m_system->m_motif, 32, PropModeReplace, + (unsigned char *) &hints, 4); +} + +bool GHOST_WindowX11::motifIsFullScreen(void) const +{ + unsigned char *prop_ret; + unsigned long bytes_after, num_ret; + MotifWmHints *hints; + Atom type_ret; + bool state; + int format_ret, st; + + prop_ret = NULL; + state = False; + st = XGetWindowProperty(m_display, m_window, m_system->m_motif, 0, + 0x7fffffff, False, m_system->m_motif, + &type_ret, &format_ret, &num_ret, + &bytes_after, &prop_ret); + if ((st == Success) && (prop_ret)) { + hints = (MotifWmHints *) prop_ret; + if (hints->flags & MWM_HINTS_DECORATIONS) { + if (!hints->decorations) + state = True; + } + } + + if (prop_ret) + XFree(prop_ret); + return (state); +} + +GHOST_TWindowState GHOST_WindowX11::getState() const +{ + GHOST_TWindowState state_ret; + int state; + + state_ret = GHOST_kWindowStateNormal; + state = icccmGetState(); + /* + * In the Iconic and Withdrawn state, the window + * is unmaped, so only need return a Minimized state. + */ + if ((state == IconicState) || (state == WithdrawnState)) + state_ret = GHOST_kWindowStateMinimized; + else if (netwmIsMaximized() == True) + state_ret = GHOST_kWindowStateMaximized; + else if (netwmIsFullScreen() == True) + state_ret = GHOST_kWindowStateFullScreen; + else if (motifIsFullScreen() == True) + state_ret = GHOST_kWindowStateFullScreen; + return (state_ret); +} + +GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state) +{ + GHOST_TWindowState cur_state; + bool is_max, is_full, is_motif_full; + + cur_state = getState(); + if (state == (int)cur_state) + return GHOST_kSuccess; + + if (cur_state != GHOST_kWindowStateMinimized) { + /* + * The window don't have this property's + * if it's not mapped. + */ + is_max = netwmIsMaximized(); + is_full = netwmIsFullScreen(); + } + else { + is_max = False; + is_full = False; + } + + is_motif_full = motifIsFullScreen(); + + if (state == GHOST_kWindowStateNormal) { + if (is_max == True) + netwmMaximized(False); + if (is_full == True) + netwmFullScreen(False); + if (is_motif_full == True) + motifFullScreen(False); + icccmSetState(NormalState); + return (GHOST_kSuccess); + } + + if (state == GHOST_kWindowStateFullScreen) { + /* + * We can't change to full screen if the window + * isn't mapped. + */ + if (cur_state == GHOST_kWindowStateMinimized) + return (GHOST_kFailure); + + if (is_max == True) + netwmMaximized(False); + if (is_full == False) + netwmFullScreen(True); + if (is_motif_full == False) + motifFullScreen(True); + return (GHOST_kSuccess); + } + + if (state == GHOST_kWindowStateMaximized) { + /* + * We can't change to Maximized if the window + * isn't mapped. + */ + if (cur_state == GHOST_kWindowStateMinimized) + return (GHOST_kFailure); + + if (is_full == True) + netwmFullScreen(False); + if (is_motif_full == True) + motifFullScreen(False); + if (is_max == False) + netwmMaximized(True); + return (GHOST_kSuccess); + } + + if (state == GHOST_kWindowStateMinimized) { + /* + * The window manager need save the current state of + * the window (maximized, full screen, etc). + */ + icccmSetState(IconicState); + return (GHOST_kSuccess); + } + + return (GHOST_kFailure); } #include @@ -840,6 +1218,13 @@ GHOST_WindowX11:: XFreeCursor(m_display, m_custom_cursor); } + /* close tablet devices */ + if(m_xtablet.StylusDevice) + XCloseDevice(m_display, m_xtablet.StylusDevice); + + if(m_xtablet.EraserDevice) + XCloseDevice(m_display, m_xtablet.EraserDevice); + if (m_context) { if (m_context == s_firstContext) { s_firstContext = NULL; @@ -1014,6 +1399,21 @@ setWindowCursorVisibility( GHOST_TSuccess GHOST_WindowX11:: +setWindowCursorGrab( + bool grab +){ + if(grab) + XGrabPointer(m_display, m_window, True, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); + else + XUngrabPointer(m_display, CurrentTime); + + XFlush(m_display); + + return GHOST_kSuccess; +} + + GHOST_TSuccess +GHOST_WindowX11:: setWindowCursorShape( GHOST_TStandardCursor shape ){ @@ -1051,13 +1451,12 @@ setWindowCustomCursorShape( int fg_color, int bg_color ){ + Colormap colormap= DefaultColormap(m_display, DefaultScreen(m_display)); Pixmap bitmap_pix, mask_pix; XColor fg, bg; - if(XAllocNamedColor(m_display, DefaultColormap(m_display, DefaultScreen(m_display)), - "White", &fg, &fg) == 0) return GHOST_kFailure; - if(XAllocNamedColor(m_display, DefaultColormap(m_display, DefaultScreen(m_display)), - "Black", &bg, &bg) == 0) return GHOST_kFailure; + if(XAllocNamedColor(m_display, colormap, "White", &fg, &fg) == 0) return GHOST_kFailure; + if(XAllocNamedColor(m_display, colormap, "Black", &bg, &bg) == 0) return GHOST_kFailure; if (m_custom_cursor) { XFreeCursor(m_display, m_custom_cursor); @@ -1073,6 +1472,9 @@ setWindowCustomCursorShape( XFreePixmap(m_display, bitmap_pix); XFreePixmap(m_display, mask_pix); + XFreeColors(m_display, colormap, &fg.pixel, 1, 0L); + XFreeColors(m_display, colormap, &bg.pixel, 1, 0L); + return GHOST_kSuccess; } diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h index abb5c131cb7..6f8940bdcbb 100644 --- a/intern/ghost/intern/GHOST_WindowX11.h +++ b/intern/ghost/intern/GHOST_WindowX11.h @@ -212,6 +212,15 @@ public: const GHOST_TabletData* GetTabletData() { return &m_xtablet.CommonData; } + + /* + * Need this in case that we want start the window + * in FullScree or Maximized state. + * Check GHOST_WindowX11.cpp + */ + bool m_post_init; + GHOST_TWindowState m_post_state; + protected: /** * Tries to install a rendering context in this window. @@ -240,6 +249,15 @@ protected: bool visible ); + /** + * Sets the cursor grab on the window using + * native window system calls. + */ + GHOST_TSuccess + setWindowCursorGrab( + bool grab + ); + /** * Sets the cursor shape on the window using * native window system calls. @@ -327,6 +345,18 @@ private : /* Tablet devices */ XTablet m_xtablet; + + void icccmSetState(int state); + int icccmGetState() const; + + void netwmMaximized(bool set); + bool netwmIsMaximized() const; + + void netwmFullScreen(bool set); + bool netwmIsFullScreen() const; + + void motifFullScreen(bool set); + bool motifIsFullScreen() const; }; diff --git a/intern/ghost/intern/Makefile b/intern/ghost/intern/Makefile index 467ec768720..5b95bbb3b68 100644 --- a/intern/ghost/intern/Makefile +++ b/intern/ghost/intern/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): none yet. +# Contributor(s): GSR # # ***** END GPL LICENSE BLOCK ***** # ghost intern Makefile @@ -38,8 +40,6 @@ CCSRCS += GHOST_Rect.cpp GHOST_DisplayManager.cpp GHOST_C-api.cpp CCSRCS += GHOST_CallbackEventConsumer.cpp CCSRCS += GHOST_NDOFManager.cpp -include nan_definitions.mk - ifeq ($(OS),$(findstring $(OS), "darwin")) CCSRCS += $(wildcard *Carbon.cpp) endif diff --git a/intern/ghost/make/msvc/ghost.dsp b/intern/ghost/make/msvc/ghost.dsp index fd287488b56..741d1c3a247 100644 --- a/intern/ghost/make/msvc/ghost.dsp +++ b/intern/ghost/make/msvc/ghost.dsp @@ -1,292 +1,292 @@ -# Microsoft Developer Studio Project File - Name="ghost" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=ghost - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ghost.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ghost.mak" CFG="ghost - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ghost - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "ghost - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ghost - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\ghost" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\ghost" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /I "../../../../../lib/windows/string/include" /I "..\..\..\..\intern\string" /I "../../../../../lib/windows/wintab/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\ghost\libghost.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copying GHOST files library (release target) to lib tree. -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\ghost\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\ghost\*.lib ..\..\..\..\..\lib\windows\ghost\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "ghost - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\ghost\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\ghost\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /I "../../../../../lib/windows/string/include" /I "..\..\..\..\intern\string" /I "../../../../../lib/windows/wintab/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\ghost\debug\libghost.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copying GHOST files library (debug target) to lib tree. -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\ghost\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\ghost\debug\*.lib ..\..\..\..\..\lib\windows\ghost\lib\debug\*.a ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "ghost - Win32 Release" -# Name "ghost - Win32 Debug" -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\GHOST_Buttons.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_CallbackEventConsumer.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_Debug.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_DisplayManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_DisplayManagerWin32.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_Event.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventButton.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventCursor.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventKey.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventPrinter.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventWheel.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventWindow.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_ModifierKeys.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_System.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_SystemWin32.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_TimerManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_TimerTask.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_Window.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_WindowManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_WindowWin32.h -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE="..\..\GHOST_C-api.h" -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_IEvent.h -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_IEventConsumer.h -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_ISystem.h -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_ITimerTask.h -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_IWindow.h -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_Rect.h -# End Source File -# Begin Source File - -SOURCE=..\..\GHOST_Types.h -# End Source File -# End Group -# End Group -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\GHOST_Buttons.cpp -# End Source File -# Begin Source File - -SOURCE="..\..\intern\GHOST_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_CallbackEventConsumer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_DisplayManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_DisplayManagerWin32.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_EventPrinter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_ISystem.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_ModifierKeys.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_Rect.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_System.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_SystemWin32.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_TimerManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_Window.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_WindowManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\GHOST_WindowWin32.cpp -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="ghost" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ghost - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ghost.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ghost.mak" CFG="ghost - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ghost - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "ghost - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ghost - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\ghost" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\ghost" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /I "../../../../../lib/windows/string/include" /I "..\..\..\..\intern\string" /I "../../../../../lib/windows/wintab/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\ghost\libghost.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Copying GHOST files library (release target) to lib tree. +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\ghost\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\ghost\*.lib ..\..\..\..\..\lib\windows\ghost\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ghost - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\ghost\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\ghost\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /I "../../../../../lib/windows/string/include" /I "..\..\..\..\intern\string" /I "../../../../../lib/windows/wintab/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\ghost\debug\libghost.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Copying GHOST files library (debug target) to lib tree. +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\ghost\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\ghost\debug\*.lib ..\..\..\..\..\lib\windows\ghost\lib\debug\*.a ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ghost - Win32 Release" +# Name "ghost - Win32 Debug" +# Begin Group "Header Files" + +# PROP Default_Filter "" +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\intern\GHOST_Buttons.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_CallbackEventConsumer.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_Debug.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_DisplayManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_DisplayManagerWin32.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_Event.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventButton.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventCursor.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventKey.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventPrinter.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventWheel.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventWindow.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_ModifierKeys.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_System.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_SystemWin32.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_TimerManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_TimerTask.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_Window.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_WindowManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_WindowWin32.h +# End Source File +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE="..\..\GHOST_C-api.h" +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_IEvent.h +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_IEventConsumer.h +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_ISystem.h +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_ITimerTask.h +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_IWindow.h +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_Rect.h +# End Source File +# Begin Source File + +SOURCE=..\..\GHOST_Types.h +# End Source File +# End Group +# End Group +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\intern\GHOST_Buttons.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\intern\GHOST_C-api.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_CallbackEventConsumer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_DisplayManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_DisplayManagerWin32.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_EventPrinter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_ISystem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_ModifierKeys.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_Rect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_System.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_SystemWin32.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_TimerManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_Window.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_WindowManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\GHOST_WindowWin32.cpp +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/ghost/make/msvc/ghost.dsw b/intern/ghost/make/msvc/ghost.dsw index 807a6ec3157..a98e7644c11 100644 --- a/intern/ghost/make/msvc/ghost.dsw +++ b/intern/ghost/make/msvc/ghost.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "ghost"=".\ghost.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ghost"=".\ghost.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/ghost/make/msvc_9_0/ghost.vcproj b/intern/ghost/make/msvc_9_0/ghost.vcproj new file mode 100644 index 00000000000..fa128786a90 --- /dev/null +++ b/intern/ghost/make/msvc_9_0/ghost.vcproj @@ -0,0 +1,539 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/ghost/test/make/msvc_6_0/gears.dsp b/intern/ghost/test/make/msvc_6_0/gears.dsp index 3e809a6b604..e068231bf32 100644 --- a/intern/ghost/test/make/msvc_6_0/gears.dsp +++ b/intern/ghost/test/make/msvc_6_0/gears.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="gears" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=gears - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gears.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gears.mak" CFG="gears - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gears - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "gears - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gears - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/" -# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../.." /I "../../../../string" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "gears - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/debug" -# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../.." /I "../../../../string" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "gears - Win32 Release" -# Name "gears - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\gears\GHOST_Test.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="gears" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=gears - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "gears.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "gears.mak" CFG="gears - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "gears - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "gears - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "gears - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/" +# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../.." /I "../../../../string" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "gears - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/debug" +# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../.." /I "../../../../string" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "gears - Win32 Release" +# Name "gears - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\gears\GHOST_Test.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/intern/ghost/test/make/msvc_6_0/gears_C.dsp b/intern/ghost/test/make/msvc_6_0/gears_C.dsp index 5972d123268..df0ae0448fd 100644 --- a/intern/ghost/test/make/msvc_6_0/gears_C.dsp +++ b/intern/ghost/test/make/msvc_6_0/gears_C.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="gears_C" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=gears_C - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gears_C.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gears_C.mak" CFG="gears_C - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gears_C - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "gears_C - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gears_C - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/" -# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../.." /I "../../../../string" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "gears_C - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/debug" -# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../.." /I "../../../../string" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "gears_C - Win32 Release" -# Name "gears_C - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\gears\GHOST_C-Test.c" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="gears_C" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=gears_C - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "gears_C.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "gears_C.mak" CFG="gears_C - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "gears_C - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "gears_C - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "gears_C - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/" +# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../.." /I "../../../../string" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "gears_C - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../../../../../obj/windows/intern/ghost/test/debug" +# PROP Intermediate_Dir "../../../../../../obj/windows/intern/ghost/test/debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../.." /I "../../../../string" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "gears_C - Win32 Release" +# Name "gears_C - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\gears\GHOST_C-Test.c" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/intern/ghost/test/make/msvc_6_0/ghost_test.dsw b/intern/ghost/test/make/msvc_6_0/ghost_test.dsw index 03bf5eb5c9a..7a56a3b5ef1 100644 --- a/intern/ghost/test/make/msvc_6_0/ghost_test.dsw +++ b/intern/ghost/test/make/msvc_6_0/ghost_test.dsw @@ -1,77 +1,77 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "gears"=.\gears.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name ghost - End Project Dependency - Begin Project Dependency - Project_Dep_Name string - End Project Dependency -}}} - -############################################################################### - -Project: "gears_C"=.\gears_C.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name ghost - End Project Dependency - Begin Project Dependency - Project_Dep_Name string - End Project Dependency -}}} - -############################################################################### - -Project: "ghost"=..\..\..\make\msvc\ghost.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "string"=..\..\..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "gears"=.\gears.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ghost + End Project Dependency + Begin Project Dependency + Project_Dep_Name string + End Project Dependency +}}} + +############################################################################### + +Project: "gears_C"=.\gears_C.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ghost + End Project Dependency + Begin Project Dependency + Project_Dep_Name string + End Project Dependency +}}} + +############################################################################### + +Project: "ghost"=..\..\..\make\msvc\ghost.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "string"=..\..\..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/ghost/test/multitest/Makefile b/intern/ghost/test/multitest/Makefile index e67faf012d2..1ecbcd98e2b 100644 --- a/intern/ghost/test/multitest/Makefile +++ b/intern/ghost/test/multitest/Makefile @@ -41,7 +41,6 @@ CCFLAGS += $(LEVEL_1_CPP_WARNINGS) CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(NAN_STRING)/include -CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I../.. @@ -49,7 +48,6 @@ OCGGHOST = $(OCGDIR)/intern/ghost LIBS = $(OCGGHOST)/$(DEBUG_DIR)libghost.a SLIBS += $(LCGDIR)/string/lib/libstring.a -SLIBS += $(LCGDIR)/bmfont/lib/libbmfont.a SLIBS += $(LCGDIR)/guardedalloc/lib/libguardedalloc.a all:: diff --git a/intern/guardedalloc/BLO_sys_types.h b/intern/guardedalloc/BLO_sys_types.h index 5ed3117c890..e3c64f9746a 100644 --- a/intern/guardedalloc/BLO_sys_types.h +++ b/intern/guardedalloc/BLO_sys_types.h @@ -82,7 +82,7 @@ typedef unsigned long uintptr_t; #define _UINTPTR_T_DEFINED #endif -#elif defined(__linux__) +#elif defined(__linux__) || defined(__NetBSD__) /* Linux-i386, Linux-Alpha, Linux-ppc */ #include diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index af64fb99d58..40ca35632d7 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -29,4 +29,9 @@ SET(INC .) FILE(GLOB SRC intern/*.c) BLENDERLIB(bf_guardedalloc "${SRC}" "${INC}") -#, libtype=['intern', 'player'], priority = [10, 175] ) + +# Override C++ alloc optional +IF(WITH_CXX_GUARDEDALLOC) + FILE(GLOB SRC cpp/*.cpp) + BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}") +ENDIF(WITH_CXX_GUARDEDALLOC) diff --git a/intern/guardedalloc/Makefile b/intern/guardedalloc/Makefile index f0cef3d222c..55894d54c8e 100644 --- a/intern/guardedalloc/Makefile +++ b/intern/guardedalloc/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # decimation main makefile. @@ -38,16 +40,13 @@ TESTDIRS = test include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_GUARDEDALLOC) ] || mkdir $(NAN_GUARDEDALLOC) @[ -d $(NAN_GUARDEDALLOC)/include ] || mkdir $(NAN_GUARDEDALLOC)/include - @[ -d $(NAN_GUARDEDALLOC)/lib ] || mkdir $(NAN_GUARDEDALLOC)/lib - @[ -d $(NAN_GUARDEDALLOC)/lib/debug ] || mkdir $(NAN_GUARDEDALLOC)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libguardedalloc.a $(NAN_GUARDEDALLOC)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libguardedalloc.a $(NAN_GUARDEDALLOC)/lib/debug/ + @[ -d $(NAN_GUARDEDALLOC)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_GUARDEDALLOC)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libguardedalloc.a $(NAN_GUARDEDALLOC)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a - ranlib $(NAN_GUARDEDALLOC)/lib/debug/libguardedalloc.a + ranlib $(NAN_GUARDEDALLOC)/lib/$(DEBUG_DIR)libguardedalloc.a endif @../tools/cpifdiff.sh *.h $(NAN_GUARDEDALLOC)/include/ diff --git a/intern/guardedalloc/SConscript b/intern/guardedalloc/SConscript index ef6c6b49266..2ee0f84b464 100644 --- a/intern/guardedalloc/SConscript +++ b/intern/guardedalloc/SConscript @@ -5,4 +5,4 @@ Import('env') sources = env.Glob('intern/*.c') incs = '.' -env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern', 'player'], priority = [10, 175] ) +env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern','player'], priority = [5,150] ) diff --git a/intern/guardedalloc/cpp/mallocn.cpp b/intern/guardedalloc/cpp/mallocn.cpp new file mode 100644 index 00000000000..0ee22e734b9 --- /dev/null +++ b/intern/guardedalloc/cpp/mallocn.cpp @@ -0,0 +1,41 @@ +/** + * $Id$ + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Campbell Barton + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include +#include "../MEM_guardedalloc.h" + +void* operator new (size_t size) +{ + return MEM_mallocN(size, "c++/anonymous"); +} + +/* not default but can be used when needing to set a string */ +void* operator new (size_t size, const char *str) +{ + return MEM_mallocN(size, str); +} + +void operator delete (void *p) +{ + MEM_freeN(p); +} diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 7bdca7339fc..3b5f6a0caf9 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -38,8 +38,7 @@ #include /* mmap exception */ -#if defined(AMIGA) || defined(__BeOS) -#elif defined(WIN32) +#if defined(WIN32) #include #include "mmap_win.h" #else @@ -292,9 +291,6 @@ void *MEM_callocN(unsigned int len, const char *str) /* note; mmap returns zero'd memory */ void *MEM_mapallocN(unsigned int len, const char *str) { -#if defined(AMIGA) || defined(__BeOS) - return MEM_callocN(len, str); -#else MemHead *memh; mem_lock_thread(); @@ -329,7 +325,6 @@ void *MEM_mapallocN(unsigned int len, const char *str) print_error("Mapalloc returns nill, fallback to regular malloc: len=%d in %s, total %u\n",len, str, mmap_in_use); return MEM_callocN(len, str); } -#endif } /* Memory statistics print */ @@ -589,10 +584,6 @@ static void rem_memblock(MemHead *memh) totblock--; mem_in_use -= memh->len; -#if defined(AMIGA) || defined(__BeOS) - free(memh); -#else - if(memh->mmap) { mmap_in_use -= memh->len; if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail))) @@ -603,7 +594,6 @@ static void rem_memblock(MemHead *memh) memset(memh+1, 255, memh->len); free(memh); } -#endif } static void MemorY_ErroR(const char *block, const char *error) diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c index 642cc16296e..979e77ebbed 100644 --- a/intern/guardedalloc/intern/mmap_win.c +++ b/intern/guardedalloc/intern/mmap_win.c @@ -1,5 +1,5 @@ /** - * $Id: $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -162,6 +162,7 @@ intptr_t munmap(void *ptr, intptr_t size) CloseHandle( mm->maphandle ); CloseHandle( mm->fhandle); mmap_remlink(mmapbase, mm); + free(mm); return 0; } diff --git a/intern/guardedalloc/make/msvc_6_0/guardedalloc.dsp b/intern/guardedalloc/make/msvc_6_0/guardedalloc.dsp index 21cc20e14f1..1c02b639a30 100644 --- a/intern/guardedalloc/make/msvc_6_0/guardedalloc.dsp +++ b/intern/guardedalloc/make/msvc_6_0/guardedalloc.dsp @@ -1,114 +1,114 @@ -# Microsoft Developer Studio Project File - Name="guardedalloc" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=guardedalloc - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "guardedalloc.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "guardedalloc.mak" CFG="guardedalloc - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "guardedalloc - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "guardedalloc - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "guardedalloc - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\guardedalloc\" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\guardedalloc\" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\guardedalloc\libguardedalloc.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\guardedalloc\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\guardedalloc\*.lib ..\..\..\..\..\lib\windows\guardedalloc\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "guardedalloc - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\guardedalloc\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\guardedalloc\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\guardedalloc\debug\libguardedalloc.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\guardedalloc\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\guardedalloc\debug\*.lib ..\..\..\..\..\lib\windows\guardedalloc\lib\debug\*.a ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "guardedalloc - Win32 Release" -# Name "guardedalloc - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\mallocn.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\MEM_guardedalloc.h -# End Source File -# End Group -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="guardedalloc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=guardedalloc - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "guardedalloc.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "guardedalloc.mak" CFG="guardedalloc - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "guardedalloc - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "guardedalloc - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "guardedalloc - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\guardedalloc\" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\guardedalloc\" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\guardedalloc\libguardedalloc.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\guardedalloc\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\guardedalloc\*.lib ..\..\..\..\..\lib\windows\guardedalloc\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "guardedalloc - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\guardedalloc\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\guardedalloc\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\guardedalloc\debug\libguardedalloc.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\guardedalloc\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\guardedalloc\debug\*.lib ..\..\..\..\..\lib\windows\guardedalloc\lib\debug\*.a ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "guardedalloc - Win32 Release" +# Name "guardedalloc - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\intern\mallocn.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\MEM_guardedalloc.h +# End Source File +# End Group +# End Group +# End Target +# End Project diff --git a/intern/guardedalloc/make/msvc_9_0/guardedalloc.vcproj b/intern/guardedalloc/make/msvc_9_0/guardedalloc.vcproj new file mode 100644 index 00000000000..d59b80f7b62 --- /dev/null +++ b/intern/guardedalloc/make/msvc_9_0/guardedalloc.vcproj @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/guardedalloc/mmap_win.h b/intern/guardedalloc/mmap_win.h index 443c3b6f4ce..855c46c08da 100644 --- a/intern/guardedalloc/mmap_win.h +++ b/intern/guardedalloc/mmap_win.h @@ -1,5 +1,5 @@ /** - * $Id: $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/intern/iksolver/Makefile b/intern/iksolver/Makefile index a6cfa88eb30..09e6e3a1c2a 100644 --- a/intern/iksolver/Makefile +++ b/intern/iksolver/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # iksolver main makefile. @@ -38,16 +40,13 @@ TESTDIRS = test include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_IKSOLVER) ] || mkdir $(NAN_IKSOLVER) @[ -d $(NAN_IKSOLVER)/include ] || mkdir $(NAN_IKSOLVER)/include - @[ -d $(NAN_IKSOLVER)/lib ] || mkdir $(NAN_IKSOLVER)/lib - @[ -d $(NAN_IKSOLVER)/lib/debug ] || mkdir $(NAN_IKSOLVER)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libiksolver.a $(NAN_IKSOLVER)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libiksolver.a $(NAN_IKSOLVER)/lib/debug/ + @[ -d $(NAN_IKSOLVER)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_IKSOLVER)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libiksolver.a $(NAN_IKSOLVER)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_IKSOLVER)/lib/libiksolver.a - ranlib $(NAN_IKSOLVER)/lib/debug/libiksolver.a + ranlib $(NAN_IKSOLVER)/lib/$(DEBUG_DIR)libiksolver.a endif @../tools/cpifdiff.sh extern/*.h $(NAN_IKSOLVER)/include/ diff --git a/intern/iksolver/SConscript b/intern/iksolver/SConscript index 543ee46487c..7adb2d50893 100644 --- a/intern/iksolver/SConscript +++ b/intern/iksolver/SConscript @@ -5,5 +5,5 @@ sources = env.Glob('intern/*.cpp') incs = 'intern ../moto/include ../memutil' -env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern','player'], priority=[20,100] ) +env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern','player'], priority=[100,90] ) diff --git a/intern/iksolver/intern/IK_Solver.cpp b/intern/iksolver/intern/IK_Solver.cpp index 9de937ea4b2..9eec1c38a2d 100644 --- a/intern/iksolver/intern/IK_Solver.cpp +++ b/intern/iksolver/intern/IK_Solver.cpp @@ -175,11 +175,12 @@ void IK_SetLimit(IK_Segment *seg, IK_SegmentAxis axis, float lmin, float lmax) IK_QSegment *qseg = (IK_QSegment*)seg; if (axis >= IK_TRANS_X) { - if(!qseg->Translational()) + if(!qseg->Translational()) { if(qseg->Composite() && qseg->Composite()->Translational()) qseg = qseg->Composite(); else return; + } if(axis == IK_TRANS_X) axis = IK_X; else if(axis == IK_TRANS_Y) axis = IK_Y; @@ -201,11 +202,12 @@ void IK_SetStiffness(IK_Segment *seg, IK_SegmentAxis axis, float stiffness) MT_Scalar weight = 1.0-stiffness; if (axis >= IK_TRANS_X) { - if(!qseg->Translational()) + if(!qseg->Translational()) { if(qseg->Composite() && qseg->Composite()->Translational()) qseg = qseg->Composite(); else return; + } if(axis == IK_TRANS_X) axis = IK_X; else if(axis == IK_TRANS_Y) axis = IK_Y; diff --git a/intern/iksolver/intern/TNT/tntmath.h b/intern/iksolver/intern/TNT/tntmath.h index 5773900caf9..55a79e2aba0 100644 --- a/intern/iksolver/intern/TNT/tntmath.h +++ b/intern/iksolver/intern/TNT/tntmath.h @@ -35,7 +35,9 @@ // conventional functions required by several matrix algorithms - +#ifdef _WIN32 +#define hypot _hypot +#endif namespace TNT { diff --git a/intern/iksolver/make/msvc_6_0/iksolver.dsp b/intern/iksolver/make/msvc_6_0/iksolver.dsp index c5e842bdd04..f40ef72a62a 100644 --- a/intern/iksolver/make/msvc_6_0/iksolver.dsp +++ b/intern/iksolver/make/msvc_6_0/iksolver.dsp @@ -1,260 +1,260 @@ -# Microsoft Developer Studio Project File - Name="iksolver" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=iksolver - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "iksolver.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "iksolver.mak" CFG="iksolver - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "iksolver - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "iksolver - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "iksolver - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\iksolver" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\iksolver" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /Ob2 /I "..\..\..\..\intern\moto\include" /I "..\..\..\..\intern\memutil" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\iksolver\libiksolver.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\iksolver\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\iksolver\*.lib ..\..\..\..\..\lib\windows\iksolver\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "iksolver - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\iksolver\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\iksolver\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\intern\moto\include" /I "..\..\..\..\intern\memutil" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\iksolver\debug\libiksolver.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\iksolver\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\iksolver\debug\*.lib ..\..\..\..\..\lib\windows\iksolver\lib\debug\*.a ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "iksolver - Win32 Release" -# Name "iksolver - Win32 Debug" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Group "common" - -# PROP Default_Filter "" -# End Group -# Begin Group "TNT" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\intern\TNT\cholesky.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\cmat.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\fcscmat.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\fmat.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\fortran.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\fspvec.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\index.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\lapack.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\lu.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\qr.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\region1d.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\region2d.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\stopwatch.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\subscript.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\svd.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\tnt.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\tntmath.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\tntreqs.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\transv.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\triang.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\trisolve.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\vec.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\vecadaptor.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\TNT\version.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\intern\IK_QJacobian.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QJacobian.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QJacobianSolver.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QJacobianSolver.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QSegment.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QSegment.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QSolver_Class.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QTask.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_QTask.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\IK_Solver.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_ExpMap.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_ExpMap.h -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\extern\IK_solver.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="iksolver" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=iksolver - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "iksolver.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "iksolver.mak" CFG="iksolver - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "iksolver - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "iksolver - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "iksolver - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\iksolver" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\iksolver" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /Ob2 /I "..\..\..\..\intern\moto\include" /I "..\..\..\..\intern\memutil" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\iksolver\libiksolver.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\iksolver\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\iksolver\*.lib ..\..\..\..\..\lib\windows\iksolver\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "iksolver - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\iksolver\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\iksolver\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\intern\moto\include" /I "..\..\..\..\intern\memutil" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\iksolver\debug\libiksolver.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\iksolver\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\iksolver\debug\*.lib ..\..\..\..\..\lib\windows\iksolver\lib\debug\*.a ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "iksolver - Win32 Release" +# Name "iksolver - Win32 Debug" +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Group "common" + +# PROP Default_Filter "" +# End Group +# Begin Group "TNT" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\intern\TNT\cholesky.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\cmat.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\fcscmat.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\fmat.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\fortran.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\fspvec.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\index.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\lapack.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\lu.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\qr.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\region1d.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\region2d.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\stopwatch.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\subscript.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\svd.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\tnt.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\tntmath.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\tntreqs.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\transv.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\triang.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\trisolve.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\vec.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\vecadaptor.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\TNT\version.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\intern\IK_QJacobian.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QJacobian.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QJacobianSolver.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QJacobianSolver.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QSegment.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QSegment.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QSolver_Class.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QTask.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_QTask.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\IK_Solver.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_ExpMap.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_ExpMap.h +# End Source File +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\extern\IK_solver.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/iksolver/make/msvc_6_0/iksolver.dsw b/intern/iksolver/make/msvc_6_0/iksolver.dsw index 90a123d9ce8..9771088c42d 100644 --- a/intern/iksolver/make/msvc_6_0/iksolver.dsw +++ b/intern/iksolver/make/msvc_6_0/iksolver.dsw @@ -1,35 +1,35 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "iksolver"=.\iksolver.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - - - - - - - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "iksolver"=.\iksolver.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + + + + + + + diff --git a/intern/iksolver/make/msvc_9_0/iksolver.vcproj b/intern/iksolver/make/msvc_9_0/iksolver.vcproj new file mode 100644 index 00000000000..0e87556380b --- /dev/null +++ b/intern/iksolver/make/msvc_9_0/iksolver.vcproj @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/iksolver/test/Makefile b/intern/iksolver/test/Makefile index 4ab317f9e9f..ed867ba2a73 100644 --- a/intern/iksolver/test/Makefile +++ b/intern/iksolver/test/Makefile @@ -46,7 +46,7 @@ LIBS += $(OCGDIR)/intern/$(LIBNAME)/$(DEBUG_DIR)libiksolver.a SLIBS += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a -ifeq ($(OS),$(findstring $(OS), "beos darwin linux freebsd openbsd")) +ifeq ($(OS),$(findstring $(OS), "darwin linux freebsd openbsd")) LLIBS = -L/usr/X11R6/lib -lglut -pthread endif diff --git a/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsp b/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsp index 8688b2fcc2c..2de994d12e3 100644 --- a/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsp +++ b/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsp @@ -1,130 +1,130 @@ -# Microsoft Developer Studio Project File - Name="ik_glut_test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ik_glut_test - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ik_glut_test.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ik_glut_test.mak" CFG="ik_glut_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ik_glut_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ik_glut_test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ik_glut_test - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\extern" /I "..\..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\..\lib\windows\memutil\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 iksolver_rmtd.lib libmoto.a /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\windows\release" /libpath:"..\..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\..\lib\windows\moto\lib" - -!ELSEIF "$(CFG)" == "ik_glut_test - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\extern" /I "..\..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\..\lib\windows\memutil\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 iksolver_dmtd.lib libmoto.a /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMTD.lib" /pdbtype:sept /libpath:"..\..\..\..\lib\windows\debug" /libpath:"..\..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\..\lib\windows\moto\lib\debug" - -!ENDIF - -# Begin Target - -# Name "ik_glut_test - Win32 Release" -# Name "ik_glut_test - Win32 Debug" -# Begin Group "common" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\common\GlutDrawer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\common\GlutDrawer.h -# End Source File -# Begin Source File - -SOURCE=..\..\common\GlutKeyboardManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\common\GlutKeyboardManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\common\GlutMouseManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\common\GlutMouseManager.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\intern\ChainDrawer.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\main.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MyGlutKeyHandler.h -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MyGlutMouseHandler.h -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="ik_glut_test" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=ik_glut_test - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ik_glut_test.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ik_glut_test.mak" CFG="ik_glut_test - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ik_glut_test - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ik_glut_test - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ik_glut_test - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\extern" /I "..\..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\..\lib\windows\memutil\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 iksolver_rmtd.lib libmoto.a /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\windows\release" /libpath:"..\..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\..\lib\windows\moto\lib" + +!ELSEIF "$(CFG)" == "ik_glut_test - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\extern" /I "..\..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\..\lib\windows\memutil\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 iksolver_dmtd.lib libmoto.a /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMTD.lib" /pdbtype:sept /libpath:"..\..\..\..\lib\windows\debug" /libpath:"..\..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\..\lib\windows\moto\lib\debug" + +!ENDIF + +# Begin Target + +# Name "ik_glut_test - Win32 Release" +# Name "ik_glut_test - Win32 Debug" +# Begin Group "common" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\common\GlutDrawer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\common\GlutDrawer.h +# End Source File +# Begin Source File + +SOURCE=..\..\common\GlutKeyboardManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\common\GlutKeyboardManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\common\GlutMouseManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\common\GlutMouseManager.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\intern\ChainDrawer.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\main.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MyGlutKeyHandler.h +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MyGlutMouseHandler.h +# End Source File +# End Target +# End Project diff --git a/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsw b/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsw index 09b7094137b..84915beaeb2 100644 --- a/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsw +++ b/intern/iksolver/test/ik_glut_test/make/msvc_6_0/ik_glut_test.dsw @@ -1,49 +1,49 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "ik_glut_test"=.\ik_glut_test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name iksolver - End Project Dependency -}}} - -############################################################################### - -Project: "iksolver"=..\..\..\..\make\msvc_6_0\iksolver.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - - - - - - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ik_glut_test"=.\ik_glut_test.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name iksolver + End Project Dependency +}}} + +############################################################################### + +Project: "iksolver"=..\..\..\..\make\msvc_6_0\iksolver.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + + + + + + diff --git a/intern/make/msvc_6_0/build_install_all.dsp b/intern/make/msvc_6_0/build_install_all.dsp index 110c28ddeac..714c30fc5cf 100644 --- a/intern/make/msvc_6_0/build_install_all.dsp +++ b/intern/make/msvc_6_0/build_install_all.dsp @@ -1,68 +1,68 @@ -# Microsoft Developer Studio Project File - Name="Build_install_all" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Generic Project" 0x010a - -CFG=Build_install_all - Win32 Debug -!MESSAGE This is not a valid makefile. To Build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Build_install_all.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Build_install_all.mak" CFG="Build_install_all - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Build_install_all - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Build_install_all - Win32 Debug" (based on "Win32 (x86) Generic Project") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -MTL=midl.exe - -!IF "$(CFG)" == "Build_install_all - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" - -!ELSEIF "$(CFG)" == "Build_install_all - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Python freeze -PostBuild_Cmds=ECHO Freezing Blender Python code ..\..\python\freeze\freeze.bat -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "Build_install_all - Win32 Release" -# Name "Build_install_all - Win32 Debug" -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="Build_install_all" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Generic Project" 0x010a + +CFG=Build_install_all - Win32 Debug +!MESSAGE This is not a valid makefile. To Build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Build_install_all.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Build_install_all.mak" CFG="Build_install_all - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Build_install_all - Win32 Release" (based on "Win32 (x86) Generic Project") +!MESSAGE "Build_install_all - Win32 Debug" (based on "Win32 (x86) Generic Project") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +MTL=midl.exe + +!IF "$(CFG)" == "Build_install_all - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "Build_install_all - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Python freeze +PostBuild_Cmds=ECHO Freezing Blender Python code ..\..\python\freeze\freeze.bat +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "Build_install_all - Win32 Release" +# Name "Build_install_all - Win32 Debug" +# End Target +# End Project diff --git a/intern/make/msvc_6_0/intern.dsw b/intern/make/msvc_6_0/intern.dsw index 2818636c1c6..1f37f3c618a 100644 --- a/intern/make/msvc_6_0/intern.dsw +++ b/intern/make/msvc_6_0/intern.dsw @@ -1,302 +1,302 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Build_install_all"=.\build_install_all.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name OpenNL - End Project Dependency - Begin Project Dependency - Project_Dep_Name bmfont - End Project Dependency - Begin Project Dependency - Project_Dep_Name bsplib - End Project Dependency - Begin Project Dependency - Project_Dep_Name container - End Project Dependency - Begin Project Dependency - Project_Dep_Name decimation - End Project Dependency - Begin Project Dependency - Project_Dep_Name DummySoundSystem - End Project Dependency - Begin Project Dependency - Project_Dep_Name ghost - End Project Dependency - Begin Project Dependency - Project_Dep_Name guardedalloc - End Project Dependency - Begin Project Dependency - Project_Dep_Name iksolver - End Project Dependency - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency - Begin Project Dependency - Project_Dep_Name SoundSystem - End Project Dependency - Begin Project Dependency - Project_Dep_Name string - End Project Dependency - Begin Project Dependency - Project_Dep_Name elbeem - End Project Dependency - Begin Project Dependency - Project_Dep_Name boolop - End Project Dependency - Begin Project Dependency - Project_Dep_Name OpenALSoundSystem - End Project Dependency -}}} - -############################################################################### - -Project: "DummySoundSystem"=..\..\SoundSystem\make\msvc_6_0\dummy\DummySoundSystem.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "MoTo"=..\..\moto\make\msvc_6_0\MoTo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "OpenALSoundSystem"=..\..\SoundSystem\make\msvc_6_0\openal\OpenALSoundSystem.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "OpenNL"=..\..\opennl\make\msvc_6_0\OpenNL.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SoundSystem"=..\..\SoundSystem\make\msvc_6_0\SoundSystem.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "bmfont"=..\..\bmfont\make\msvc_6_0\bmfont.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "boolop"=..\..\boolop\make\msvc_6_0\boolop.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "bsplib"=..\..\bsp\make\msvc6_0\bsplib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name container - End Project Dependency - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency -}}} - -############################################################################### - -Project: "container"=..\..\container\make\msvc_6_0\container.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "csg"=..\..\csg\make\msvc60\csg.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "decimation"=..\..\decimation\make\msvc_6_0\decimation.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency - Begin Project Dependency - Project_Dep_Name container - End Project Dependency -}}} - -############################################################################### - -Project: "elbeem"=..\..\elbeem\make\msvc_6_0\elbeem.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ghost"=..\..\ghost\make\msvc\ghost.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name string - End Project Dependency -}}} - -############################################################################### - -Project: "guardedalloc"=..\..\guardedalloc\make\msvc_6_0\guardedalloc.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "iksolver"=..\..\iksolver\make\msvc_6_0\iksolver.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "memutil"=..\..\memutil\make\msvc_60\memutil.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "string"=..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Build_install_all"=.\build_install_all.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name OpenNL + End Project Dependency + Begin Project Dependency + Project_Dep_Name bmfont + End Project Dependency + Begin Project Dependency + Project_Dep_Name bsplib + End Project Dependency + Begin Project Dependency + Project_Dep_Name container + End Project Dependency + Begin Project Dependency + Project_Dep_Name decimation + End Project Dependency + Begin Project Dependency + Project_Dep_Name DummySoundSystem + End Project Dependency + Begin Project Dependency + Project_Dep_Name ghost + End Project Dependency + Begin Project Dependency + Project_Dep_Name guardedalloc + End Project Dependency + Begin Project Dependency + Project_Dep_Name iksolver + End Project Dependency + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency + Begin Project Dependency + Project_Dep_Name SoundSystem + End Project Dependency + Begin Project Dependency + Project_Dep_Name string + End Project Dependency + Begin Project Dependency + Project_Dep_Name elbeem + End Project Dependency + Begin Project Dependency + Project_Dep_Name boolop + End Project Dependency + Begin Project Dependency + Project_Dep_Name OpenALSoundSystem + End Project Dependency +}}} + +############################################################################### + +Project: "DummySoundSystem"=..\..\SoundSystem\make\msvc_6_0\dummy\DummySoundSystem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MoTo"=..\..\moto\make\msvc_6_0\MoTo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "OpenALSoundSystem"=..\..\SoundSystem\make\msvc_6_0\openal\OpenALSoundSystem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "OpenNL"=..\..\opennl\make\msvc_6_0\OpenNL.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SoundSystem"=..\..\SoundSystem\make\msvc_6_0\SoundSystem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "bmfont"=..\..\bmfont\make\msvc_6_0\bmfont.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "boolop"=..\..\boolop\make\msvc_6_0\boolop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "bsplib"=..\..\bsp\make\msvc6_0\bsplib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name container + End Project Dependency + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency +}}} + +############################################################################### + +Project: "container"=..\..\container\make\msvc_6_0\container.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "csg"=..\..\csg\make\msvc60\csg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "decimation"=..\..\decimation\make\msvc_6_0\decimation.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency + Begin Project Dependency + Project_Dep_Name container + End Project Dependency +}}} + +############################################################################### + +Project: "elbeem"=..\..\elbeem\make\msvc_6_0\elbeem.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ghost"=..\..\ghost\make\msvc\ghost.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name string + End Project Dependency +}}} + +############################################################################### + +Project: "guardedalloc"=..\..\guardedalloc\make\msvc_6_0\guardedalloc.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "iksolver"=..\..\iksolver\make\msvc_6_0\iksolver.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "memutil"=..\..\memutil\make\msvc_60\memutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "string"=..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/make/msvc_9_0/INT_build_install_all.vcproj b/intern/make/msvc_9_0/INT_build_install_all.vcproj new file mode 100644 index 00000000000..dbb58134b0f --- /dev/null +++ b/intern/make/msvc_9_0/INT_build_install_all.vcproj @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/memutil/Makefile b/intern/memutil/Makefile index 787ca4fd58f..50aa0528f31 100644 --- a/intern/memutil/Makefile +++ b/intern/memutil/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # memutil main makefile. @@ -38,16 +40,13 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_MEMUTIL) ] || mkdir $(NAN_MEMUTIL) @[ -d $(NAN_MEMUTIL)/include ] || mkdir $(NAN_MEMUTIL)/include - @[ -d $(NAN_MEMUTIL)/lib ] || mkdir $(NAN_MEMUTIL)/lib - @[ -d $(NAN_MEMUTIL)/lib/debug ] || mkdir $(NAN_MEMUTIL)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libmemutil.a $(NAN_MEMUTIL)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libmemutil.a $(NAN_MEMUTIL)/lib/debug + @[ -d $(NAN_MEMUTIL)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_MEMUTIL)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libmemutil.a $(NAN_MEMUTIL)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_MEMUTIL)/lib/libmemutil.a - ranlib $(NAN_MEMUTIL)/lib/debug/libmemutil.a + ranlib $(NAN_MEMUTIL)/lib/$(DEBUG_DIR)libmemutil.a endif @../tools/cpifdiff.sh *.h $(NAN_MEMUTIL)/include/ diff --git a/intern/memutil/SConscript b/intern/memutil/SConscript index 4528de814f3..318d4a3997e 100644 --- a/intern/memutil/SConscript +++ b/intern/memutil/SConscript @@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp') incs = '. ..' -env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern', 'player'], priority = [0, 180] ) +env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern','player'], priority = [0,155] ) diff --git a/intern/memutil/make/msvc_60/memutil.dsp b/intern/memutil/make/msvc_60/memutil.dsp index 62b7efba9d8..b7e7904e9bf 100644 --- a/intern/memutil/make/msvc_60/memutil.dsp +++ b/intern/memutil/make/msvc_60/memutil.dsp @@ -1,150 +1,150 @@ -# Microsoft Developer Studio Project File - Name="memutil" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=memutil - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "memutil.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "memutil.mak" CFG="memutil - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "memutil - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "memutil - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "memutil - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\memutil\" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\memutil\" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /I "../../" /I "../../../" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\memutil\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\memutil\*.lib ..\..\..\..\..\lib\windows\memutil\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "memutil - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\memutil\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\memutil\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../../" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\memutil\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\memutil\debug\*.lib ..\..\..\..\..\lib\windows\memutil\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\memutil\debug\vc60.* ..\..\..\..\..\lib\windows\memutil\lib\debug\ ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "memutil - Win32 Release" -# Name "memutil - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\MEM_Allocator.h -# End Source File -# Begin Source File - -SOURCE=..\..\MEM_CacheLimiter.h -# End Source File -# Begin Source File - -SOURCE="..\..\intern\MEM_CacheLimiterC-Api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\..\guardedalloc\MEM_guardedalloc.h -# End Source File -# Begin Source File - -SOURCE="..\..\intern\MEM_RefCountedC-Api.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "intern" - -# PROP Default_Filter "" -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\MEM_NonCopyable.h -# End Source File -# Begin Source File - -SOURCE=..\..\MEM_RefCounted.h -# End Source File -# Begin Source File - -SOURCE="..\..\MEM_RefCountedC-Api.h" -# End Source File -# Begin Source File - -SOURCE=..\..\MEM_RefCountPtr.h -# End Source File -# Begin Source File - -SOURCE=..\..\MEM_SmartPtr.h -# End Source File -# End Group -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="memutil" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=memutil - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "memutil.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "memutil.mak" CFG="memutil - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "memutil - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "memutil - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "memutil - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\memutil\" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\memutil\" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /I "../../" /I "../../../" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\memutil\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\memutil\*.lib ..\..\..\..\..\lib\windows\memutil\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "memutil - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\memutil\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\memutil\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../../" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\memutil\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\memutil\debug\*.lib ..\..\..\..\..\lib\windows\memutil\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\memutil\debug\vc60.* ..\..\..\..\..\lib\windows\memutil\lib\debug\ ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "memutil - Win32 Release" +# Name "memutil - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\MEM_Allocator.h +# End Source File +# Begin Source File + +SOURCE=..\..\MEM_CacheLimiter.h +# End Source File +# Begin Source File + +SOURCE="..\..\intern\MEM_CacheLimiterC-Api.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\guardedalloc\MEM_guardedalloc.h +# End Source File +# Begin Source File + +SOURCE="..\..\intern\MEM_RefCountedC-Api.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "intern" + +# PROP Default_Filter "" +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\MEM_NonCopyable.h +# End Source File +# Begin Source File + +SOURCE=..\..\MEM_RefCounted.h +# End Source File +# Begin Source File + +SOURCE="..\..\MEM_RefCountedC-Api.h" +# End Source File +# Begin Source File + +SOURCE=..\..\MEM_RefCountPtr.h +# End Source File +# Begin Source File + +SOURCE=..\..\MEM_SmartPtr.h +# End Source File +# End Group +# End Group +# End Target +# End Project diff --git a/intern/memutil/make/msvc_60/memutil.dsw b/intern/memutil/make/msvc_60/memutil.dsw index bba4cbcdafd..3c19a94c701 100644 --- a/intern/memutil/make/msvc_60/memutil.dsw +++ b/intern/memutil/make/msvc_60/memutil.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "memutil"=".\memutil.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "memutil"=".\memutil.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/memutil/make/msvc_9_0/memutil.vcproj b/intern/memutil/make/msvc_9_0/memutil.vcproj new file mode 100644 index 00000000000..6f642fb16bc --- /dev/null +++ b/intern/memutil/make/msvc_9_0/memutil.vcproj @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/moto/Makefile b/intern/moto/Makefile index 7bd7ea10abc..3ad4fde9c4e 100644 --- a/intern/moto/Makefile +++ b/intern/moto/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # moto main makefile. @@ -38,16 +40,13 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_MOTO) ] || mkdir $(NAN_MOTO) @[ -d $(NAN_MOTO)/include ] || mkdir $(NAN_MOTO)/include - @[ -d $(NAN_MOTO)/lib ] || mkdir $(NAN_MOTO)/lib - @[ -d $(NAN_MOTO)/lib/debug ] || mkdir $(NAN_MOTO)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libmoto.a $(NAN_MOTO)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libmoto.a $(NAN_MOTO)/lib/debug/ + @[ -d $(NAN_MOTO)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_MOTO)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libmoto.a $(NAN_MOTO)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_MOTO)/lib/libmoto.a - ranlib $(NAN_MOTO)/lib/debug/libmoto.a + ranlib $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a endif @../tools/cpifdiff.sh include/*.h $(NAN_MOTO)/include/ diff --git a/intern/moto/SConscript b/intern/moto/SConscript index 636515aa5c5..d9bbafe4623 100644 --- a/intern/moto/SConscript +++ b/intern/moto/SConscript @@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp') incs = 'include' -env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern','game','game2','player'], priority = [15, 55, 100, 135] ) +env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern','player'], priority = [130,95] ) diff --git a/intern/moto/include/MT_Matrix3x3.h b/intern/moto/include/MT_Matrix3x3.h index 899a2731588..c6d299d19fd 100644 --- a/intern/moto/include/MT_Matrix3x3.h +++ b/intern/moto/include/MT_Matrix3x3.h @@ -98,6 +98,18 @@ public: m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m; } + void setValue3x3(const float *m) { + m_el[0][0] = *m++; m_el[1][0] = *m++; m_el[2][0] = *m++; + m_el[0][1] = *m++; m_el[1][1] = *m++; m_el[2][1] = *m++; + m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m; + } + + void setValue3x3(const double *m) { + m_el[0][0] = *m++; m_el[1][0] = *m++; m_el[2][0] = *m++; + m_el[0][1] = *m++; m_el[1][1] = *m++; m_el[2][1] = *m++; + m_el[0][2] = *m++; m_el[1][2] = *m++; m_el[2][2] = *m; + } + void setValue(MT_Scalar xx, MT_Scalar xy, MT_Scalar xz, MT_Scalar yx, MT_Scalar yy, MT_Scalar yz, MT_Scalar zx, MT_Scalar zy, MT_Scalar zz) { @@ -194,6 +206,18 @@ public: *m++ = m_el[0][2]; *m++ = m_el[1][2]; *m++ = m_el[2][2]; *m = 0.0; } + void getValue3x3(float *m) const { + *m++ = (float) m_el[0][0]; *m++ = (float) m_el[1][0]; *m++ = (float) m_el[2][0]; + *m++ = (float) m_el[0][1]; *m++ = (float) m_el[1][1]; *m++ = (float) m_el[2][1]; + *m++ = (float) m_el[0][2]; *m++ = (float) m_el[1][2]; *m++ = (float) m_el[2][2]; + } + + void getValue3x3(double *m) const { + *m++ = m_el[0][0]; *m++ = m_el[1][0]; *m++ = m_el[2][0]; + *m++ = m_el[0][1]; *m++ = m_el[1][1]; *m++ = m_el[2][1]; + *m++ = m_el[0][2]; *m++ = m_el[1][2]; *m++ = m_el[2][2]; + } + MT_Quaternion getRotation() const; MT_Matrix3x3& operator*=(const MT_Matrix3x3& m); diff --git a/intern/moto/include/MT_Quaternion.inl b/intern/moto/include/MT_Quaternion.inl index ecfd6699f67..ec747c453d3 100644 --- a/intern/moto/include/MT_Quaternion.inl +++ b/intern/moto/include/MT_Quaternion.inl @@ -74,19 +74,27 @@ GEN_INLINE MT_Scalar MT_Quaternion::angle(const MT_Quaternion& q) const GEN_INLINE MT_Quaternion MT_Quaternion::slerp(const MT_Quaternion& q, const MT_Scalar& t) const { - MT_Scalar theta = angle(q); - - if (!MT_fuzzyZero(theta)) + MT_Scalar d, s0, s1; + MT_Scalar s = dot(q); + bool neg = (s < 0.0); + + if (neg) + s = -s; + if ((1.0 - s) > 0.0001) { - MT_Scalar d = MT_Scalar(1.0) / sin(theta); - MT_Scalar s0 = sin((MT_Scalar(1.0) - t) * theta); - MT_Scalar s1 = sin(t * theta); - - return d*(*this * s0 + q * s1); + MT_Scalar theta = acos(s); + d = MT_Scalar(1.0) / sin(theta); + s0 = sin((MT_Scalar(1.0) - t) * theta); + s1 = sin(t * theta); } else { - return *this; + d = MT_Scalar(1.0); + s0 = MT_Scalar(1.0) - t; + s1 = t; } + if (neg) + s1 = -s1; + return d*(*this * s0 + q * s1); } diff --git a/intern/moto/make/msvc_6_0/MoTo.dsp b/intern/moto/make/msvc_6_0/MoTo.dsp index 23224fc7fa8..541c4aa4774 100644 --- a/intern/moto/make/msvc_6_0/MoTo.dsp +++ b/intern/moto/make/msvc_6_0/MoTo.dsp @@ -1,379 +1,379 @@ -# Microsoft Developer Studio Project File - Name="MoTo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=MoTo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "MoTo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "MoTo.mak" CFG="MoTo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "MoTo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "MoTo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\moto\" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\moto\" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W4 /GX /O2 /Ob2 /I "..\..\include\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\moto\libmoto.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\include\*.h ..\..\..\..\..\lib\windows\moto\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\moto\*.lib ..\..\..\..\..\lib\windows\moto\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\moto\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\moto\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include\\" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\moto\debug\libmoto.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\include\*.h ..\..\..\..\..\lib\windows\moto\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\moto\debug\*.lib ..\..\..\..\..\lib\windows\moto\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\moto\debug\vc60.* ..\..\..\..\..\lib\windows\moto\lib\debug\ ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "MoTo - Win32 Release" -# Name "MoTo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\MT_CmMatrix4x4.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Matrix3x3.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Matrix4x4.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Plane3.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Point3.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Quaternion.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_random.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Transform.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Vector2.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Vector3.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\intern\MT_Vector4.cpp - -!IF "$(CFG)" == "MoTo - Win32 Release" - -# ADD CPP /W3 /I "../../include" - -!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "inlines" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\include\MT_Matrix3x3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Matrix4x4.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Plane3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Point2.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Point3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Quaternion.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Vector2.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Vector3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Vector4.inl -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\include\GEN_List.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\GEN_Map.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_assert.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_CmMatrix4x4.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Matrix3x3.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Matrix4x4.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_MinMax.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Optimize.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Plane3.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Point2.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Point3.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Quaternion.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_random.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Scalar.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Stream.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Transform.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Tuple2.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Tuple3.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Tuple4.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Vector2.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Vector3.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\MT_Vector4.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\NM_Scalar.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="MoTo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=MoTo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MoTo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MoTo.mak" CFG="MoTo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MoTo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "MoTo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\moto\" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\moto\" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W4 /GX /O2 /Ob2 /I "..\..\include\\" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\moto\libmoto.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\include\*.h ..\..\..\..\..\lib\windows\moto\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\moto\*.lib ..\..\..\..\..\lib\windows\moto\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\moto\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\moto\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include\\" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\moto\debug\libmoto.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\include\*.h ..\..\..\..\..\lib\windows\moto\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\moto\debug\*.lib ..\..\..\..\..\lib\windows\moto\lib\debug\*.a ECHO Copying Debug info. XCOPY /Y ..\..\..\..\obj\windows\intern\moto\debug\vc60.* ..\..\..\..\..\lib\windows\moto\lib\debug\ ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "MoTo - Win32 Release" +# Name "MoTo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\intern\MT_CmMatrix4x4.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Matrix3x3.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Matrix4x4.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Plane3.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Point3.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Quaternion.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_random.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Transform.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Vector2.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Vector3.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\intern\MT_Vector4.cpp + +!IF "$(CFG)" == "MoTo - Win32 Release" + +# ADD CPP /W3 /I "../../include" + +!ELSEIF "$(CFG)" == "MoTo - Win32 Debug" + +!ENDIF + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "inlines" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\include\MT_Matrix3x3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Matrix4x4.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Plane3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Point2.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Point3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Quaternion.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Vector2.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Vector3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Vector4.inl +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\include\GEN_List.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\GEN_Map.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_assert.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_CmMatrix4x4.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Matrix3x3.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Matrix4x4.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_MinMax.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Optimize.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Plane3.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Point2.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Point3.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Quaternion.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_random.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Scalar.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Stream.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Transform.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Tuple2.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Tuple3.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Tuple4.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Vector2.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Vector3.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\MT_Vector4.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\NM_Scalar.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/moto/make/msvc_6_0/MoTo.dsw b/intern/moto/make/msvc_6_0/MoTo.dsw index bc76539dd6c..e45520d5c72 100644 --- a/intern/moto/make/msvc_6_0/MoTo.dsw +++ b/intern/moto/make/msvc_6_0/MoTo.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "MoTo"=.\MoTo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MoTo"=.\MoTo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/moto/make/msvc_9_0/moto.vcproj b/intern/moto/make/msvc_9_0/moto.vcproj new file mode 100644 index 00000000000..b33bb165a75 --- /dev/null +++ b/intern/moto/make/msvc_9_0/moto.vcproj @@ -0,0 +1,713 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/opennl/Makefile b/intern/opennl/Makefile index a84fd135d1d..023491792db 100644 --- a/intern/opennl/Makefile +++ b/intern/opennl/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # opennl main makefile. @@ -40,25 +42,19 @@ DIRS = intern superlu include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_OPENNL) ] || mkdir $(NAN_OPENNL) @[ -d $(NAN_OPENNL)/include ] || mkdir $(NAN_OPENNL)/include - @[ -d $(NAN_OPENNL)/lib ] || mkdir $(NAN_OPENNL)/lib - @[ -d $(NAN_OPENNL)/lib/debug ] || mkdir $(NAN_OPENNL)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libopennl.a $(NAN_OPENNL)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libopennl.a $(NAN_OPENNL)/lib/debug/ + @[ -d $(NAN_OPENNL)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_OPENNL)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libopennl.a $(NAN_OPENNL)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_OPENNL)/lib/libopennl.a - ranlib $(NAN_OPENNL)/lib/debug/libopennl.a + ranlib $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a endif @../tools/cpifdiff.sh extern/*.h $(NAN_OPENNL)/include/ @[ -d $(NAN_SUPERLU) ] || mkdir $(NAN_SUPERLU) - @[ -d $(NAN_SUPERLU)/lib ] || mkdir $(NAN_SUPERLU)/lib - @[ -d $(NAN_SUPERLU)/lib/debug ] || mkdir $(NAN_SUPERLU)/lib/debug - @../tools/cpifdiff.sh $(DIR_SLU)/libsuperlu.a $(NAN_SUPERLU)/lib/ - @../tools/cpifdiff.sh $(DIR_SLU)/debug/libsuperlu.a $(NAN_SUPERLU)/lib/debug/ + @[ -d $(NAN_SUPERLU)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_SUPERLU)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR_SLU)/$(DEBUG_DIR)libsuperlu.a $(NAN_SUPERLU)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_SUPERLU)/lib/libsuperlu.a - ranlib $(NAN_SUPERLU)/lib/debug/libsuperlu.a + ranlib $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a endif diff --git a/intern/opennl/SConscript b/intern/opennl/SConscript index e46cefbff58..f68810d2f16 100644 --- a/intern/opennl/SConscript +++ b/intern/opennl/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c') incs = 'extern superlu' if (env['OURPLATFORM'] == 'win32-mingw'): - env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core','intern','player'], priority=[1,80,22] ) + env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core','intern'], priority=[1,80] ) else: - env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core','player'], priority=[55,22] ) + env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core'], priority=[55] ) diff --git a/intern/opennl/make/msvc_6_0/OpenNL.dsp b/intern/opennl/make/msvc_6_0/OpenNL.dsp index bce93059e50..aaf8f0298c1 100644 --- a/intern/opennl/make/msvc_6_0/OpenNL.dsp +++ b/intern/opennl/make/msvc_6_0/OpenNL.dsp @@ -1,252 +1,252 @@ -# Microsoft Developer Studio Project File - Name="OpenNL" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=OpenNL - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "OpenNL.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "OpenNL.mak" CFG="OpenNL - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "OpenNL - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "OpenNL - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "OpenNL - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../../../../obj/windows/intern/opennl" -# PROP Intermediate_Dir "../../../../obj/windows/intern/opennl/imf" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../extern" /I "../../superlu" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/opennl\blender_ONL.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO copy header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\opennl\include\*.h ECHO copy library XCOPY /Y ..\..\..\..\obj\windows\intern\openNL\*.lib ..\..\..\..\..\lib\windows\openNL\*.lib -# End Special Build Tool - -!ELSEIF "$(CFG)" == "OpenNL - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../../../obj/windows/intern/opennl/Debug/" -# PROP Intermediate_Dir "../../../../obj/windows/intern/opennl/imf/Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../extern" /I "../../superlu" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/opennl/Debug/blender_ONL.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO copy header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\opennl\include\*.h ECHO copy library XCOPY /Y ..\..\..\..\obj\windows\intern\openNL\debug\*.lib ..\..\..\..\..\lib\windows\openNL\debug\*.lib -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "OpenNL - Win32 Release" -# Name "OpenNL - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\superlu\colamd.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\get_perm_c.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\heap_relax_snode.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\lsame.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\memory.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\mmd.c -# End Source File -# Begin Source File - -SOURCE=..\..\intern\opennl.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\relax_snode.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\scolumn_bmod.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\scolumn_dfs.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\scopy_to_ucol.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sgssv.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sgstrf.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sgstrs.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\smemory.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\smyblas2.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sp_coletree.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sp_ienv.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sp_preorder.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\spanel_bmod.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\spanel_dfs.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\spivotL.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\spruneL.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\ssnode_bmod.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\ssnode_dfs.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\ssp_blas2.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\ssp_blas3.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\strsv.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\superlu_timer.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\sutil.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\util.c -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\xerbla.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\superlu\Cnames.h -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\colamd.h -# End Source File -# Begin Source File - -SOURCE=..\..\extern\ONL_opennl.h -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\ssp_defs.h -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\supermatrix.h -# End Source File -# Begin Source File - -SOURCE=..\..\superlu\util.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="OpenNL" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=OpenNL - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "OpenNL.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "OpenNL.mak" CFG="OpenNL - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "OpenNL - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "OpenNL - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "OpenNL - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../../../obj/windows/intern/opennl" +# PROP Intermediate_Dir "../../../../obj/windows/intern/opennl/imf" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../extern" /I "../../superlu" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/opennl\blender_ONL.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO copy header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\opennl\include\*.h ECHO copy library XCOPY /Y ..\..\..\..\obj\windows\intern\openNL\*.lib ..\..\..\..\..\lib\windows\openNL\*.lib +# End Special Build Tool + +!ELSEIF "$(CFG)" == "OpenNL - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../../../obj/windows/intern/opennl/Debug/" +# PROP Intermediate_Dir "../../../../obj/windows/intern/opennl/imf/Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../extern" /I "../../superlu" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/opennl/Debug/blender_ONL.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO copy header files XCOPY /Y ..\..\extern\*.h ..\..\..\..\..\lib\windows\opennl\include\*.h ECHO copy library XCOPY /Y ..\..\..\..\obj\windows\intern\openNL\debug\*.lib ..\..\..\..\..\lib\windows\openNL\debug\*.lib +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "OpenNL - Win32 Release" +# Name "OpenNL - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\superlu\colamd.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\get_perm_c.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\heap_relax_snode.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\lsame.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\memory.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\mmd.c +# End Source File +# Begin Source File + +SOURCE=..\..\intern\opennl.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\relax_snode.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\scolumn_bmod.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\scolumn_dfs.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\scopy_to_ucol.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sgssv.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sgstrf.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sgstrs.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\smemory.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\smyblas2.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sp_coletree.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sp_ienv.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sp_preorder.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\spanel_bmod.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\spanel_dfs.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\spivotL.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\spruneL.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\ssnode_bmod.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\ssnode_dfs.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\ssp_blas2.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\ssp_blas3.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\strsv.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\superlu_timer.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\sutil.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\util.c +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\xerbla.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\superlu\Cnames.h +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\colamd.h +# End Source File +# Begin Source File + +SOURCE=..\..\extern\ONL_opennl.h +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\ssp_defs.h +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\supermatrix.h +# End Source File +# Begin Source File + +SOURCE=..\..\superlu\util.h +# End Source File +# End Group +# End Target +# End Project diff --git a/intern/opennl/make/msvc_6_0/OpenNL.dsw b/intern/opennl/make/msvc_6_0/OpenNL.dsw index 407aeb006fd..5b7c9138c97 100644 --- a/intern/opennl/make/msvc_6_0/OpenNL.dsw +++ b/intern/opennl/make/msvc_6_0/OpenNL.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "OpenNL"=.\OpenNL.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "OpenNL"=.\OpenNL.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/opennl/make/msvc_9_0/opennl.vcproj b/intern/opennl/make/msvc_9_0/opennl.vcproj new file mode 100644 index 00000000000..28051a491d2 --- /dev/null +++ b/intern/opennl/make/msvc_9_0/opennl.vcproj @@ -0,0 +1,993 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/opennl/superlu/BLO_sys_types.h b/intern/opennl/superlu/BLO_sys_types.h index 411a8582f96..56a27ec17ce 100644 --- a/intern/opennl/superlu/BLO_sys_types.h +++ b/intern/opennl/superlu/BLO_sys_types.h @@ -83,7 +83,7 @@ typedef unsigned long uintptr_t; #define _UINTPTR_T_DEFINED #endif -#elif defined(__linux__) +#elif defined(__linux__) || defined(__NetBSD__) /* Linux-i386, Linux-Alpha, Linux-ppc */ #include diff --git a/intern/opennl/superlu/get_perm_c.c b/intern/opennl/superlu/get_perm_c.c index e255b4a76bd..4c0ee95c4c6 100644 --- a/intern/opennl/superlu/get_perm_c.c +++ b/intern/opennl/superlu/get_perm_c.c @@ -366,6 +366,10 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c) int *b_rowind, *dhead, *qsize, *llist, *marker; double t, SuperLU_timer_(); + /* make gcc happy */ + b_rowind=NULL; + b_colptr=NULL; + m = A->nrow; n = A->ncol; diff --git a/intern/opennl/superlu/util.c b/intern/opennl/superlu/util.c index 824cabacee5..f77da9c4736 100644 --- a/intern/opennl/superlu/util.c +++ b/intern/opennl/superlu/util.c @@ -34,7 +34,7 @@ float DenseSize(int n, float sum_nw); void superlu_abort_and_exit(char* msg) { - fprintf(stderr, msg); + fprintf(stderr, "%s", msg); exit (-1); } diff --git a/intern/smoke/CMakeLists.txt b/intern/smoke/CMakeLists.txt new file mode 100644 index 00000000000..8ed7a7c9115 --- /dev/null +++ b/intern/smoke/CMakeLists.txt @@ -0,0 +1,42 @@ +# $Id$ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Daniel Genrich +# +# ***** END GPL LICENSE BLOCK ***** + +SET(INC ${PNG_INC} ${ZLIB_INC} intern ../../extern/bullet2/src ../memutil ../guardealloc) + +FILE(GLOB SRC intern/*.cpp) + +IF(WITH_OPENMP) + ADD_DEFINITIONS(-DPARALLEL=1) +ENDIF(WITH_OPENMP) + +IF(WITH_FFTW3) + ADD_DEFINITIONS(-DFFTW3=1) + SET(INC ${INC} ${FFTW3_INC}) +ENDIF(WITH_FFTW3) + + +BLENDERLIB(bf_smoke "${SRC}" "${INC}") +#, libtype='blender', priority = 0 ) diff --git a/intern/smoke/Makefile b/intern/smoke/Makefile new file mode 100644 index 00000000000..e5144a9c3f8 --- /dev/null +++ b/intern/smoke/Makefile @@ -0,0 +1,54 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Hans Lambermont, GSR +# +# ***** END GPL LICENSE BLOCK ***** +# smoke main makefile. +# + +include nan_definitions.mk + +unexport NAN_QUIET + +LIBNAME = smoke +SOURCEDIR = intern/$(LIBNAME) +DIR = $(OCGDIR)/$(SOURCEDIR) +DIRS = intern +#not ready yet TESTDIRS = test + +include nan_subdirs.mk + +install: $(ALL_OR_DEBUG) + @[ -d $(NAN_SMOKE) ] || mkdir $(NAN_SMOKE) + @[ -d $(NAN_SMOKE)/include ] || mkdir $(NAN_SMOKE)/include + @[ -d $(NAN_SMOKE)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_SMOKE)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_SMOKE)/lib/$(DEBUG_DIR) +ifeq ($(OS),darwin) + ranlib $(NAN_SMOKE)/lib/$(DEBUG_DIR)lib$(LIBNAME).a +endif + @../tools/cpifdiff.sh extern/*.h $(NAN_SMOKE)/include/ + diff --git a/intern/smoke/SConscript b/intern/smoke/SConscript new file mode 100644 index 00000000000..af5bf1aeb20 --- /dev/null +++ b/intern/smoke/SConscript @@ -0,0 +1,18 @@ +#!/usr/bin/python +Import ('env') + +sources = env.Glob('intern/*.cpp') + +defs = '' + +if env['WITH_BF_OPENMP']: + defs += ' PARALLEL=1' + +incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] +incs += ' intern ../../extern/bullet2/src ../memutil ../guardealloc ' + +if env['WITH_BF_FFTW3']: + defs += ' FFTW3=1' + incs += env['BF_FFTW3_INC'] + +env.BlenderLib ('bf_smoke', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] ) diff --git a/intern/smoke/extern/smoke_API.h b/intern/smoke/extern/smoke_API.h new file mode 100644 index 00000000000..5607df70cf3 --- /dev/null +++ b/intern/smoke/extern/smoke_API.h @@ -0,0 +1,79 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2009 by Daniel Genrich + * All rights reserved. + * + * Contributor(s): Daniel Genrich + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef SMOKE_API_H_ +#define SMOKE_API_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +struct FLUID_3D; + +// export +void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles); + +// low res +struct FLUID_3D *smoke_init(int *res, float *p0, float dt); +void smoke_free(struct FLUID_3D *fluid); + +void smoke_initBlenderRNA(struct FLUID_3D *fluid, float *alpha, float *beta); +void smoke_step(struct FLUID_3D *fluid, size_t framenr); + +float *smoke_get_density(struct FLUID_3D *fluid); +float *smoke_get_heat(struct FLUID_3D *fluid); +float *smoke_get_velocity_x(struct FLUID_3D *fluid); +float *smoke_get_velocity_y(struct FLUID_3D *fluid); +float *smoke_get_velocity_z(struct FLUID_3D *fluid); + +unsigned char *smoke_get_obstacle(struct FLUID_3D *fluid); + +size_t smoke_get_index(int x, int max_x, int y, int max_y, int z); +size_t smoke_get_index2d(int x, int max_x, int y); + +void smoke_dissolve(struct FLUID_3D *fluid, int speed, int log); + +// wavelet turbulence functions +struct WTURBULENCE *smoke_turbulence_init(int *res, int amplify, int noisetype); +void smoke_turbulence_free(struct WTURBULENCE *wt); +void smoke_turbulence_step(struct WTURBULENCE *wt, struct FLUID_3D *fluid); + +float *smoke_turbulence_get_density(struct WTURBULENCE *wt); +void smoke_turbulence_get_res(struct WTURBULENCE *wt, int *res); +void smoke_turbulence_set_noise(struct WTURBULENCE *wt, int type); +void smoke_initWaveletBlenderRNA(struct WTURBULENCE *wt, float *strength); + +void smoke_dissolve_wavelet(struct WTURBULENCE *wt, int speed, int log); + +// export +void smoke_turbulence_export(struct WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw); + +#ifdef __cplusplus +} +#endif + +#endif /* SMOKE_API_H_ */ diff --git a/intern/smoke/intern/EIGENVALUE_HELPER.h b/intern/smoke/intern/EIGENVALUE_HELPER.h new file mode 100644 index 00000000000..6ff61c5ca8e --- /dev/null +++ b/intern/smoke/intern/EIGENVALUE_HELPER.h @@ -0,0 +1,47 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +////////////////////////////////////////////////////////////////////// +// Helper function, compute eigenvalues of 3x3 matrix +////////////////////////////////////////////////////////////////////// + +#include "tnt/jama_eig.h" + +////////////////////////////////////////////////////////////////////// +// eigenvalues of 3x3 non-symmetric matrix +////////////////////////////////////////////////////////////////////// +int inline computeEigenvalues3x3( + float dout[3], + float a[3][3]) +{ + TNT::Array2D A = TNT::Array2D(3,3, &a[0][0]); + TNT::Array1D eig = TNT::Array1D(3); + TNT::Array1D eigImag = TNT::Array1D(3); + JAMA::Eigenvalue jeig = JAMA::Eigenvalue(A); + jeig.getRealEigenvalues(eig); + + // complex ones + jeig.getImagEigenvalues(eigImag); + dout[0] = sqrt(eig[0]*eig[0] + eigImag[0]*eigImag[0]); + dout[1] = sqrt(eig[1]*eig[1] + eigImag[1]*eigImag[1]); + dout[2] = sqrt(eig[2]*eig[2] + eigImag[2]*eigImag[2]); + return 0; +} + +#undef rfabs +#undef ROT diff --git a/intern/smoke/intern/FFT_NOISE.h b/intern/smoke/intern/FFT_NOISE.h new file mode 100644 index 00000000000..2c278cdc4fc --- /dev/null +++ b/intern/smoke/intern/FFT_NOISE.h @@ -0,0 +1,178 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +///////////////////////////////////////////////////////////////////////// +// + +#ifndef FFT_NOISE_H_ +#define FFT_NOISE_H_ + +#if FFTW3==1 +#include +#include +#include + +#include "WAVELET_NOISE.h" + +#ifndef M_PI +#define M_PI 3.14159265 +#endif + +///////////////////////////////////////////////////////////////////////// +// shift spectrum to the format that FFTW expects +///////////////////////////////////////////////////////////////////////// +static void shift3D(float*& field, int xRes, int yRes, int zRes) +{ + int xHalf = xRes / 2; + int yHalf = yRes / 2; + int zHalf = zRes / 2; + // int slabSize = xRes * yRes; + for (int z = 0; z < zHalf; z++) + for (int y = 0; y < yHalf; y++) + for (int x = 0; x < xHalf; x++) + { + int index = x + y * xRes + z * xRes * yRes; + float temp; + int xSwap = xHalf; + int ySwap = yHalf * xRes; + int zSwap = zHalf * xRes * yRes; + + // [0,0,0] to [1,1,1] + temp = field[index]; + field[index] = field[index + xSwap + ySwap + zSwap]; + field[index + xSwap + ySwap + zSwap] = temp; + + // [1,0,0] to [0,1,1] + temp = field[index + xSwap]; + field[index + xSwap] = field[index + ySwap + zSwap]; + field[index + ySwap + zSwap] = temp; + + // [0,1,0] to [1,0,1] + temp = field[index + ySwap]; + field[index + ySwap] = field[index + xSwap + zSwap]; + field[index + xSwap + zSwap] = temp; + + // [0,0,1] to [1,1,0] + temp = field[index + zSwap]; + field[index + zSwap] = field[index + xSwap + ySwap]; + field[index + xSwap + ySwap] = temp; + } +} + +static void generatTile_FFT(float* const noiseTileData, std::string filename) +{ + if (loadTile(noiseTileData, filename)) return; + + int res = NOISE_TILE_SIZE; + int xRes = res; + int yRes = res; + int zRes = res; + int totalCells = xRes * yRes * zRes; + + // create and shift the filter + float* filter = new float[totalCells]; + for (int z = 0; z < zRes; z++) + for (int y = 0; y < yRes; y++) + for (int x = 0; x < xRes; x++) + { + int index = x + y * xRes + z * xRes * yRes; + float diff[] = {abs(x - xRes/2), + abs(y - yRes/2), + abs(z - zRes/2)}; + float radius = sqrtf(diff[0] * diff[0] + + diff[1] * diff[1] + + diff[2] * diff[2]) / (xRes / 2); + radius *= M_PI; + float H = cos((M_PI / 2.0f) * log(4.0f * radius / M_PI) / log(2.0f)); + H = H * H; + float filtered = H; + + // clamp everything outside the wanted band + if (radius >= M_PI / 2.0f) + filtered = 0.0f; + + // make sure to capture all low frequencies + if (radius <= M_PI / 4.0f) + filtered = 1.0f; + + filter[index] = filtered; + } + shift3D(filter, xRes, yRes, zRes); + + // create the noise + float* noise = new float[totalCells]; + int index = 0; + MTRand twister; + for (int z = 0; z < zRes; z++) + for (int y = 0; y < yRes; y++) + for (int x = 0; x < xRes; x++, index++) + noise[index] = twister.randNorm(); + + // create padded field + fftw_complex* forward = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * totalCells); + + // init padded field + index = 0; + for (int z = 0; z < zRes; z++) + for (int y = 0; y < yRes; y++) + for (int x = 0; x < xRes; x++, index++) + { + forward[index][0] = noise[index]; + forward[index][1] = 0.0f; + } + + // forward FFT + fftw_complex* backward = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * totalCells); + fftw_plan forwardPlan = fftw_plan_dft_3d(xRes, yRes, zRes, forward, backward, FFTW_FORWARD, FFTW_ESTIMATE); + fftw_execute(forwardPlan); + fftw_destroy_plan(forwardPlan); + + // apply filter + index = 0; + for (int z = 0; z < zRes; z++) + for (int y = 0; y < yRes; y++) + for (int x = 0; x < xRes; x++, index++) + { + backward[index][0] *= filter[index]; + backward[index][1] *= filter[index]; + } + + // backward FFT + fftw_plan backwardPlan = fftw_plan_dft_3d(xRes, yRes, zRes, backward, forward, FFTW_BACKWARD, FFTW_ESTIMATE); + fftw_execute(backwardPlan); + fftw_destroy_plan(backwardPlan); + + // subtract out the low frequency components + index = 0; + for (int z = 0; z < zRes; z++) + for (int y = 0; y < yRes; y++) + for (int x = 0; x < xRes; x++, index++) + noise[index] -= forward[index][0] / totalCells; + + // save out the noise tile + saveTile(noise, filename); + + fftw_free(forward); + fftw_free(backward); + delete[] filter; + delete[] noise; +} + +#endif + +#endif /* FFT_NOISE_H_ */ diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp new file mode 100644 index 00000000000..8a32eaa2e68 --- /dev/null +++ b/intern/smoke/intern/FLUID_3D.cpp @@ -0,0 +1,717 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// FLUID_3D.cpp: implementation of the FLUID_3D class. +// +////////////////////////////////////////////////////////////////////// + +#include "FLUID_3D.h" +#include "IMAGE.h" +#include +#include "SPHERE.h" +#include + +// boundary conditions of the fluid domain +#define DOMAIN_BC_FRONT 0 // z +#define DOMAIN_BC_TOP 1 // y +#define DOMAIN_BC_LEFT 1 // x +#define DOMAIN_BC_BACK DOMAIN_BC_FRONT +#define DOMAIN_BC_BOTTOM DOMAIN_BC_TOP +#define DOMAIN_BC_RIGHT DOMAIN_BC_LEFT + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +FLUID_3D::FLUID_3D(int *res, float *p0, float dt) : + _xRes(res[0]), _yRes(res[1]), _zRes(res[2]), _res(0.0f), _dt(dt) +{ + // set simulation consts + // _dt = dt; // 0.10 + + // start point of array + _p0[0] = p0[0]; + _p0[1] = p0[1]; + _p0[2] = p0[2]; + + _iterations = 100; + _tempAmb = 0; + _heatDiffusion = 1e-3; + _vorticityEps = 2.0; + _totalTime = 0.0f; + _totalSteps = 0; + _res = Vec3Int(_xRes,_yRes,_zRes); + _maxRes = MAX3(_xRes, _yRes, _zRes); + + // initialize wavelet turbulence + /* + if(amplify) + _wTurbulence = new WTURBULENCE(_res[0],_res[1],_res[2], amplify, noisetype); + else + _wTurbulence = NULL; + */ + + // scale the constants according to the refinement of the grid + _dx = 1.0f / (float)_maxRes; + float scaling = 64.0f / _maxRes; + scaling = (scaling < 1.0f) ? 1.0f : scaling; + _vorticityEps /= scaling; + + // allocate arrays + _totalCells = _xRes * _yRes * _zRes; + _slabSize = _xRes * _yRes; + _xVelocity = new float[_totalCells]; + _yVelocity = new float[_totalCells]; + _zVelocity = new float[_totalCells]; + _xVelocityOld = new float[_totalCells]; + _yVelocityOld = new float[_totalCells]; + _zVelocityOld = new float[_totalCells]; + _xForce = new float[_totalCells]; + _yForce = new float[_totalCells]; + _zForce = new float[_totalCells]; + _density = new float[_totalCells]; + _densityOld = new float[_totalCells]; + _heat = new float[_totalCells]; + _heatOld = new float[_totalCells]; + _obstacles = new unsigned char[_totalCells]; // set 0 at end of step + + // DG TODO: check if alloc went fine + + for (int x = 0; x < _totalCells; x++) + { + _density[x] = 0.0f; + _densityOld[x] = 0.0f; + _heat[x] = 0.0f; + _heatOld[x] = 0.0f; + _xVelocity[x] = 0.0f; + _yVelocity[x] = 0.0f; + _zVelocity[x] = 0.0f; + _xVelocityOld[x] = 0.0f; + _yVelocityOld[x] = 0.0f; + _zVelocityOld[x] = 0.0f; + _xForce[x] = 0.0f; + _yForce[x] = 0.0f; + _zForce[x] = 0.0f; + _obstacles[x] = false; + } + + // set side obstacles + int index; + for (int y = 0; y < _yRes; y++) + for (int x = 0; x < _xRes; x++) + { + // front slab + index = x + y * _xRes; + if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1; + + // back slab + index += _totalCells - _slabSize; + if(DOMAIN_BC_BACK==1) _obstacles[index] = 1; + } + + for (int z = 0; z < _zRes; z++) + for (int x = 0; x < _xRes; x++) + { + // bottom slab + index = x + z * _slabSize; + if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1; + + // top slab + index += _slabSize - _xRes; + if(DOMAIN_BC_TOP==1) _obstacles[index] = 1; + } + + for (int z = 0; z < _zRes; z++) + for (int y = 0; y < _yRes; y++) + { + // left slab + index = y * _xRes + z * _slabSize; + if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1; + + // right slab + index += _xRes - 1; + if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1; + } +} + +FLUID_3D::~FLUID_3D() +{ + if (_xVelocity) delete[] _xVelocity; + if (_yVelocity) delete[] _yVelocity; + if (_zVelocity) delete[] _zVelocity; + if (_xVelocityOld) delete[] _xVelocityOld; + if (_yVelocityOld) delete[] _yVelocityOld; + if (_zVelocityOld) delete[] _zVelocityOld; + if (_xForce) delete[] _xForce; + if (_yForce) delete[] _yForce; + if (_zForce) delete[] _zForce; + if (_density) delete[] _density; + if (_densityOld) delete[] _densityOld; + if (_heat) delete[] _heat; + if (_heatOld) delete[] _heatOld; + if (_obstacles) delete[] _obstacles; + // if (_wTurbulence) delete _wTurbulence; + + // printf("deleted fluid\n"); +} + +// init direct access functions from blender +void FLUID_3D::initBlenderRNA(float *alpha, float *beta) +{ + _alpha = alpha; + _beta = beta; +} + +////////////////////////////////////////////////////////////////////// +// step simulation once +////////////////////////////////////////////////////////////////////// +void FLUID_3D::step() +{ + // addSmokeTestCase(_density, _res); + // addSmokeTestCase(_heat, _res); + + // wipe forces + for (int i = 0; i < _totalCells; i++) + { + _xForce[i] = _yForce[i] = _zForce[i] = 0.0f; + // _obstacles[i] &= ~2; + } + + wipeBoundaries(); + + // run the solvers + addVorticity(); + addBuoyancy(_heat, _density); + addForce(); + project(); + diffuseHeat(); + + // advect everything + advectMacCormack(); + + // if(_wTurbulence) { + // _wTurbulence->stepTurbulenceFull(_dt/_dx, + // _xVelocity, _yVelocity, _zVelocity, _obstacles); + // _wTurbulence->stepTurbulenceReadable(_dt/_dx, + // _xVelocity, _yVelocity, _zVelocity, _obstacles); + // } +/* + // no file output + float *src = _density; + string prefix = string("./original.preview/density_fullxy_"); + writeImageSliceXY(src,_res, _res[2]/2, prefix, _totalSteps); +*/ + // artificial damping -- this is necessary because we use a + // collated grid, and at very coarse grid resolutions, banding + // artifacts can occur + artificialDamping(_xVelocity); + artificialDamping(_yVelocity); + artificialDamping(_zVelocity); +/* +// no file output + string pbrtPrefix = string("./pbrt/density_small_"); + IMAGE::dumpPBRT(_totalSteps, pbrtPrefix, _density, _res[0],_res[1],_res[2]); + */ + _totalTime += _dt; + _totalSteps++; + + // todo xxx dg: only clear obstacles, not boundaries + // memset(_obstacles, 0, sizeof(unsigned char)*_xRes*_yRes*_zRes); +} + +////////////////////////////////////////////////////////////////////// +// helper function to dampen co-located grid artifacts of given arrays in intervals +// (only needed for velocity, strength (w) depends on testcase... +////////////////////////////////////////////////////////////////////// +void FLUID_3D::artificialDamping(float* field) { + const float w = 0.9; + if(_totalSteps % 4 == 1) { + for (int z = 1; z < _res[2]-1; z++) + for (int y = 1; y < _res[1]-1; y++) + for (int x = 1+(y+z)%2; x < _res[0]-1; x+=2) { + const int index = x + y*_res[0] + z * _slabSize; + field[index] = (1-w)*field[index] + 1./6. * w*( + field[index+1] + field[index-1] + + field[index+_res[0]] + field[index-_res[0]] + + field[index+_slabSize] + field[index-_slabSize] ); + } + } + if(_totalSteps % 4 == 3) { + for (int z = 1; z < _res[2]-1; z++) + for (int y = 1; y < _res[1]-1; y++) + for (int x = 1+(y+z+1)%2; x < _res[0]-1; x+=2) { + const int index = x + y*_res[0] + z * _slabSize; + field[index] = (1-w)*field[index] + 1./6. * w*( + field[index+1] + field[index-1] + + field[index+_res[0]] + field[index-_res[0]] + + field[index+_slabSize] + field[index-_slabSize] ); + } + } +} + +////////////////////////////////////////////////////////////////////// +// copy out the boundary in all directions +////////////////////////////////////////////////////////////////////// +void FLUID_3D::copyBorderAll(float* field) +{ + int index; + for (int y = 0; y < _yRes; y++) + for (int x = 0; x < _xRes; x++) + { + // front slab + index = x + y * _xRes; + field[index] = field[index + _slabSize]; + + // back slab + index += _totalCells - _slabSize; + field[index] = field[index - _slabSize]; + } + + for (int z = 0; z < _zRes; z++) + for (int x = 0; x < _xRes; x++) + { + // bottom slab + index = x + z * _slabSize; + field[index] = field[index + _xRes]; + + // top slab + index += _slabSize - _xRes; + field[index] = field[index - _xRes]; + } + + for (int z = 0; z < _zRes; z++) + for (int y = 0; y < _yRes; y++) + { + // left slab + index = y * _xRes + z * _slabSize; + field[index] = field[index + 1]; + + // right slab + index += _xRes - 1; + field[index] = field[index - 1]; + } +} + +////////////////////////////////////////////////////////////////////// +// wipe boundaries of velocity and density +////////////////////////////////////////////////////////////////////// +void FLUID_3D::wipeBoundaries() +{ + setZeroBorder(_xVelocity, _res); + setZeroBorder(_yVelocity, _res); + setZeroBorder(_zVelocity, _res); + setZeroBorder(_density, _res); +} + +////////////////////////////////////////////////////////////////////// +// add forces to velocity field +////////////////////////////////////////////////////////////////////// +void FLUID_3D::addForce() +{ + for (int i = 0; i < _totalCells; i++) + { + _xVelocity[i] += _dt * _xForce[i]; + _yVelocity[i] += _dt * _yForce[i]; + _zVelocity[i] += _dt * _zForce[i]; + } +} + +////////////////////////////////////////////////////////////////////// +// project into divergence free field +////////////////////////////////////////////////////////////////////// +void FLUID_3D::project() +{ + int x, y, z; + size_t index; + + float *_pressure = new float[_totalCells]; + float *_divergence = new float[_totalCells]; + + memset(_pressure, 0, sizeof(float)*_totalCells); + memset(_divergence, 0, sizeof(float)*_totalCells); + + setObstacleBoundaries(_pressure); + + // copy out the boundaries + if(DOMAIN_BC_LEFT == 0) setNeumannX(_xVelocity, _res); + else setZeroX(_xVelocity, _res); + + if(DOMAIN_BC_TOP == 0) setNeumannY(_yVelocity, _res); + else setZeroY(_yVelocity, _res); + + if(DOMAIN_BC_FRONT == 0) setNeumannZ(_zVelocity, _res); + else setZeroZ(_zVelocity, _res); + + // calculate divergence + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + float xright = _xVelocity[index + 1]; + float xleft = _xVelocity[index - 1]; + float yup = _yVelocity[index + _xRes]; + float ydown = _yVelocity[index - _xRes]; + float ztop = _zVelocity[index + _slabSize]; + float zbottom = _zVelocity[index - _slabSize]; + + if(_obstacles[index+1]) xright = - _xVelocity[index]; + if(_obstacles[index-1]) xleft = - _xVelocity[index]; + if(_obstacles[index+_xRes]) yup = - _yVelocity[index]; + if(_obstacles[index-_xRes]) ydown = - _yVelocity[index]; + if(_obstacles[index+_slabSize]) ztop = - _zVelocity[index]; + if(_obstacles[index-_slabSize]) zbottom = - _zVelocity[index]; + + _divergence[index] = -_dx * 0.5f * ( + xright - xleft + + yup - ydown + + ztop - zbottom ); + + // DG: commenting this helps CG to get a better start, 10-20% speed improvement + // _pressure[index] = 0.0f; + } + copyBorderAll(_pressure); + + // solve Poisson equation + solvePressurePre(_pressure, _divergence, _obstacles); + + setObstaclePressure(_pressure); + + // project out solution + float invDx = 1.0f / _dx; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if(!_obstacles[index]) + { + _xVelocity[index] -= 0.5f * (_pressure[index + 1] - _pressure[index - 1]) * invDx; + _yVelocity[index] -= 0.5f * (_pressure[index + _xRes] - _pressure[index - _xRes]) * invDx; + _zVelocity[index] -= 0.5f * (_pressure[index + _slabSize] - _pressure[index - _slabSize]) * invDx; + }/* + else + { + _xVelocity[index] = _yVelocity[index] = _zVelocity[index] = 0.0f; + }*/ + } + + if (_pressure) delete[] _pressure; + if (_divergence) delete[] _divergence; +} + +////////////////////////////////////////////////////////////////////// +// diffuse heat +////////////////////////////////////////////////////////////////////// +void FLUID_3D::diffuseHeat() +{ + SWAP_POINTERS(_heat, _heatOld); + + copyBorderAll(_heatOld); + solveHeat(_heat, _heatOld, _obstacles); + + // zero out inside obstacles + for (int x = 0; x < _totalCells; x++) + if (_obstacles[x]) + _heat[x] = 0.0f; +} + +////////////////////////////////////////////////////////////////////// +// stamp an obstacle in the _obstacles field +////////////////////////////////////////////////////////////////////// +void FLUID_3D::addObstacle(OBSTACLE* obstacle) +{ + int index = 0; + for (int z = 0; z < _zRes; z++) + for (int y = 0; y < _yRes; y++) + for (int x = 0; x < _xRes; x++, index++) + if (obstacle->inside(x * _dx, y * _dx, z * _dx)) { + _obstacles[index] = true; + } +} + +////////////////////////////////////////////////////////////////////// +// calculate the obstacle directional types +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setObstaclePressure(float *_pressure) +{ + // tag remaining obstacle blocks + for (int z = 1, index = _slabSize + _xRes + 1; + z < _zRes - 1; z++, index += 2 * _xRes) + for (int y = 1; y < _yRes - 1; y++, index += 2) + for (int x = 1; x < _xRes - 1; x++, index++) + { + // could do cascade of ifs, but they are a pain + if (_obstacles[index]) + { + const int top = _obstacles[index + _slabSize]; + const int bottom= _obstacles[index - _slabSize]; + const int up = _obstacles[index + _xRes]; + const int down = _obstacles[index - _xRes]; + const int left = _obstacles[index - 1]; + const int right = _obstacles[index + 1]; + + // unused + // const bool fullz = (top && bottom); + // const bool fully = (up && down); + //const bool fullx = (left && right); + + _xVelocity[index] = + _yVelocity[index] = + _zVelocity[index] = 0.0f; + _pressure[index] = 0.0f; + + // average pressure neighbors + float pcnt = 0.; + if (left && !right) { + _pressure[index] += _pressure[index + 1]; + pcnt += 1.; + } + if (!left && right) { + _pressure[index] += _pressure[index - 1]; + pcnt += 1.; + } + if (up && !down) { + _pressure[index] += _pressure[index - _xRes]; + pcnt += 1.; + } + if (!up && down) { + _pressure[index] += _pressure[index + _xRes]; + pcnt += 1.; + } + if (top && !bottom) { + _pressure[index] += _pressure[index - _slabSize]; + pcnt += 1.; + // _zVelocity[index] += - _zVelocity[index - _slabSize]; + // vp += 1.0; + } + if (!top && bottom) { + _pressure[index] += _pressure[index + _slabSize]; + pcnt += 1.; + // _zVelocity[index] += - _zVelocity[index + _slabSize]; + // vp += 1.0; + } + + if(pcnt > 0.000001f) + _pressure[index] /= pcnt; + + // test - dg + // if(vp > 0.000001f) + // _zVelocity[index] /= vp; + + // TODO? set correct velocity bc's + // velocities are only set to zero right now + // this means it's not a full no-slip boundary condition + // but a "half-slip" - still looks ok right now + } + } +} + +void FLUID_3D::setObstacleBoundaries(float *_pressure) +{ + // cull degenerate obstacles , move to addObstacle? + for (int z = 1, index = _slabSize + _xRes + 1; + z < _zRes - 1; z++, index += 2 * _xRes) + for (int y = 1; y < _yRes - 1; y++, index += 2) + for (int x = 1; x < _xRes - 1; x++, index++) + { + if (_obstacles[index] != EMPTY) + { + const int top = _obstacles[index + _slabSize]; + const int bottom= _obstacles[index - _slabSize]; + const int up = _obstacles[index + _xRes]; + const int down = _obstacles[index - _xRes]; + const int left = _obstacles[index - 1]; + const int right = _obstacles[index + 1]; + + int counter = 0; + if (up) counter++; + if (down) counter++; + if (left) counter++; + if (right) counter++; + if (top) counter++; + if (bottom) counter++; + + if (counter < 3) + _obstacles[index] = EMPTY; + } + if (_obstacles[index]) + { + _xVelocity[index] = + _yVelocity[index] = + _zVelocity[index] = 0.0f; + _pressure[index] = 0.0f; + } + } +} + +////////////////////////////////////////////////////////////////////// +// add buoyancy forces +////////////////////////////////////////////////////////////////////// +void FLUID_3D::addBuoyancy(float *heat, float *density) +{ + int index = 0; + + for (int z = 0; z < _zRes; z++) + for (int y = 0; y < _yRes; y++) + for (int x = 0; x < _xRes; x++, index++) + { + _zForce[index] += *_alpha * density[index] + (*_beta * (heat[index] - _tempAmb)); // DG: was _yForce, changed for Blender + } +} + +////////////////////////////////////////////////////////////////////// +// add vorticity to the force field +////////////////////////////////////////////////////////////////////// +void FLUID_3D::addVorticity() +{ + int x,y,z,index; + if(_vorticityEps<=0.) return; + + float *_xVorticity, *_yVorticity, *_zVorticity, *_vorticity; + + _xVorticity = new float[_totalCells]; + _yVorticity = new float[_totalCells]; + _zVorticity = new float[_totalCells]; + _vorticity = new float[_totalCells]; + + memset(_xVorticity, 0, sizeof(float)*_totalCells); + memset(_yVorticity, 0, sizeof(float)*_totalCells); + memset(_zVorticity, 0, sizeof(float)*_totalCells); + memset(_vorticity, 0, sizeof(float)*_totalCells); + + // calculate vorticity + float gridSize = 0.5f / _dx; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + int up = _obstacles[index + _xRes] ? index : index + _xRes; + int down = _obstacles[index - _xRes] ? index : index - _xRes; + float dy = (up == index || down == index) ? 1.0f / _dx : gridSize; + int out = _obstacles[index + _slabSize] ? index : index + _slabSize; + int in = _obstacles[index - _slabSize] ? index : index - _slabSize; + float dz = (out == index || in == index) ? 1.0f / _dx : gridSize; + int right = _obstacles[index + 1] ? index : index + 1; + int left = _obstacles[index - 1] ? index : index - 1; + float dx = (right == index || right == index) ? 1.0f / _dx : gridSize; + + _xVorticity[index] = (_zVelocity[up] - _zVelocity[down]) * dy + (-_yVelocity[out] + _yVelocity[in]) * dz; + _yVorticity[index] = (_xVelocity[out] - _xVelocity[in]) * dz + (-_zVelocity[right] + _zVelocity[left]) * dx; + _zVorticity[index] = (_yVelocity[right] - _yVelocity[left]) * dx + (-_xVelocity[up] + _xVelocity[down])* dy; + + _vorticity[index] = sqrtf(_xVorticity[index] * _xVorticity[index] + + _yVorticity[index] * _yVorticity[index] + + _zVorticity[index] * _zVorticity[index]); + } + + // calculate normalized vorticity vectors + float eps = _vorticityEps; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + if (!_obstacles[index]) + { + float N[3]; + + int up = _obstacles[index + _xRes] ? index : index + _xRes; + int down = _obstacles[index - _xRes] ? index : index - _xRes; + float dy = (up == index || down == index) ? 1.0f / _dx : gridSize; + int out = _obstacles[index + _slabSize] ? index : index + _slabSize; + int in = _obstacles[index - _slabSize] ? index : index - _slabSize; + float dz = (out == index || in == index) ? 1.0f / _dx : gridSize; + int right = _obstacles[index + 1] ? index : index + 1; + int left = _obstacles[index - 1] ? index : index - 1; + float dx = (right == index || right == index) ? 1.0f / _dx : gridSize; + N[0] = (_vorticity[right] - _vorticity[left]) * dx; + N[1] = (_vorticity[up] - _vorticity[down]) * dy; + N[2] = (_vorticity[out] - _vorticity[in]) * dz; + + float magnitude = sqrtf(N[0] * N[0] + N[1] * N[1] + N[2] * N[2]); + if (magnitude > 0.0f) + { + magnitude = 1.0f / magnitude; + N[0] *= magnitude; + N[1] *= magnitude; + N[2] *= magnitude; + + _xForce[index] += (N[1] * _zVorticity[index] - N[2] * _yVorticity[index]) * _dx * eps; + _yForce[index] -= (N[0] * _zVorticity[index] - N[2] * _xVorticity[index]) * _dx * eps; + _zForce[index] += (N[0] * _yVorticity[index] - N[1] * _xVorticity[index]) * _dx * eps; + } + } + + if (_xVorticity) delete[] _xVorticity; + if (_yVorticity) delete[] _yVorticity; + if (_zVorticity) delete[] _zVorticity; + if (_vorticity) delete[] _vorticity; +} + +////////////////////////////////////////////////////////////////////// +// Advect using the MacCormack method from the Selle paper +////////////////////////////////////////////////////////////////////// +void FLUID_3D::advectMacCormack() +{ + Vec3Int res = Vec3Int(_xRes,_yRes,_zRes); + + if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res); + else setZeroX(_xVelocity, res); + + if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res); + else setZeroY(_yVelocity, res); + + if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res); + else setZeroZ(_zVelocity, res); + + SWAP_POINTERS(_xVelocity, _xVelocityOld); + SWAP_POINTERS(_yVelocity, _yVelocityOld); + SWAP_POINTERS(_zVelocity, _zVelocityOld); + SWAP_POINTERS(_density, _densityOld); + SWAP_POINTERS(_heat, _heatOld); + + const float dt0 = _dt / _dx; + // use force arrays as temp arrays + for (int x = 0; x < _totalCells; x++) + _xForce[x] = _yForce[x] = 0.0; + + float* t1 = _xForce; + float* t2 = _yForce; + + advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _densityOld, _density, t1,t2, res, _obstacles); + advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _heatOld, _heat, t1,t2, res, _obstacles); + advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _xVelocityOld, _xVelocity, t1,t2, res, _obstacles); + advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _yVelocityOld, _yVelocity, t1,t2, res, _obstacles); + advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _zVelocityOld, _zVelocity, t1,t2, res, _obstacles); + + if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res); + else setZeroX(_xVelocity, res); + + if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res); + else setZeroY(_yVelocity, res); + + if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res); + else setZeroZ(_zVelocity, res); + + setZeroBorder(_density, res); + setZeroBorder(_heat, res); + + for (int x = 0; x < _totalCells; x++) + t1[x] = t2[x] = 0.0; +} diff --git a/intern/smoke/intern/FLUID_3D.h b/intern/smoke/intern/FLUID_3D.h new file mode 100644 index 00000000000..a7be7f58335 --- /dev/null +++ b/intern/smoke/intern/FLUID_3D.h @@ -0,0 +1,168 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// FLUID_3D.h: interface for the FLUID_3D class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef FLUID_3D_H +#define FLUID_3D_H + +#include +#include +#include +#include "OBSTACLE.h" +// #include "WTURBULENCE.h" +#include "VEC3.h" + +using namespace std; +using namespace BasicVector; +class WTURBULENCE; + +class FLUID_3D +{ + public: + FLUID_3D(int *res, /* int amplify, */ float *p0, float dt); + FLUID_3D() {}; + virtual ~FLUID_3D(); + + void initBlenderRNA(float *alpha, float *beta); + + // create & allocate vector noise advection + void initVectorNoise(int amplify); + + void addSmokeColumn(); + static void addSmokeTestCase(float* field, Vec3Int res); + + void step(); + void addObstacle(OBSTACLE* obstacle); + + const float* xVelocity() { return _xVelocity; }; + const float* yVelocity() { return _yVelocity; }; + const float* zVelocity() { return _zVelocity; }; + + int xRes() const { return _xRes; }; + int yRes() const { return _yRes; }; + int zRes() const { return _zRes; }; + + public: + // dimensions + int _xRes, _yRes, _zRes, _maxRes; + Vec3Int _res; + size_t _totalCells; + int _slabSize; + float _dx; + float _p0[3]; + float _p1[3]; + float _totalTime; + int _totalSteps; + int _totalImgDumps; + int _totalVelDumps; + + void artificialDamping(float* field); + + // fields + float* _density; + float* _densityOld; + float* _heat; + float* _heatOld; + float* _xVelocity; + float* _yVelocity; + float* _zVelocity; + float* _xVelocityOld; + float* _yVelocityOld; + float* _zVelocityOld; + float* _xForce; + float* _yForce; + float* _zForce; + unsigned char* _obstacles; + + // CG fields + int _iterations; + + // simulation constants + float _dt; + float _vorticityEps; + float _heatDiffusion; + float *_alpha; // for the buoyancy density term <-- as pointer to get blender RNA in here + float *_beta; // was _buoyancy <-- as pointer to get blender RNA in here + float _tempAmb; /* ambient temperature */ + + // WTURBULENCE object, if active + // WTURBULENCE* _wTurbulence; + + // boundary setting functions + void copyBorderAll(float* field); + + // timestepping functions + void wipeBoundaries(); + void addForce(); + void addVorticity(); + void addBuoyancy(float *heat, float *density); + + // solver stuff + void project(); + void diffuseHeat(); + void solvePressure(float* field, float* b, unsigned char* skip); + void solvePressurePre(float* field, float* b, unsigned char* skip); + void solveHeat(float* field, float* b, unsigned char* skip); + + // handle obstacle boundaries + void setObstacleBoundaries(float *_pressure); + void setObstaclePressure(float *_pressure); + + public: + // advection, accessed e.g. by WTURBULENCE class + void advectMacCormack(); + + // boundary setting functions + static void copyBorderX(float* field, Vec3Int res); + static void copyBorderY(float* field, Vec3Int res); + static void copyBorderZ(float* field, Vec3Int res); + static void setNeumannX(float* field, Vec3Int res); + static void setNeumannY(float* field, Vec3Int res); + static void setNeumannZ(float* field, Vec3Int res); + static void setZeroX(float* field, Vec3Int res); + static void setZeroY(float* field, Vec3Int res); + static void setZeroZ(float* field, Vec3Int res); + static void setZeroBorder(float* field, Vec3Int res) { + setZeroX(field, res); + setZeroY(field, res); + setZeroZ(field, res); + }; + + // static advection functions, also used by WTURBULENCE + static void advectFieldSemiLagrange(const float dt, const float* velx, const float* vely, const float* velz, + float* oldField, float* newField, Vec3Int res); + static void advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, + float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles); + + // maccormack helper functions + static void clampExtrema(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, + float* oldField, float* newField, Vec3Int res); + static void clampOutsideRays(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, + float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection); + + // output helper functions + // static void writeImageSliceXY(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale=1.); + // static void writeImageSliceYZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale=1.); + // static void writeImageSliceXZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale=1.); + // static void writeProjectedIntern(const float *field, Vec3Int res, int dir1, int dir2, string prefix, int picCnt, float scale=1.); +}; + +#endif diff --git a/intern/smoke/intern/FLUID_3D_SOLVERS.cpp b/intern/smoke/intern/FLUID_3D_SOLVERS.cpp new file mode 100644 index 00000000000..7d078d86d61 --- /dev/null +++ b/intern/smoke/intern/FLUID_3D_SOLVERS.cpp @@ -0,0 +1,524 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// FLUID_3D.cpp: implementation of the FLUID_3D class. +// +////////////////////////////////////////////////////////////////////// + +#include "FLUID_3D.h" +#include +#define SOLVER_ACCURACY 1e-06 + +void FLUID_3D::solvePressurePre(float* field, float* b, unsigned char* skip) +{ + int x, y, z; + size_t index; + float *_q, *_Precond, *_h, *_residual, *_direction; + + // i = 0 + int i = 0; + + _residual = new float[_totalCells]; // set 0 + _direction = new float[_totalCells]; // set 0 + _q = new float[_totalCells]; // set 0 + _h = new float[_totalCells]; // set 0 + _Precond = new float[_totalCells]; // set 0 + + memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_h, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_Precond, 0, sizeof(float)*_xRes*_yRes*_zRes); + + // r = b - Ax + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if the cell is a variable + float Acenter = 0.0f; + if (!skip[index]) + { + // set the matrix to the Poisson stencil in order + if (!skip[index + 1]) Acenter += 1.; + if (!skip[index - 1]) Acenter += 1.; + if (!skip[index + _xRes]) Acenter += 1.; + if (!skip[index - _xRes]) Acenter += 1.; + if (!skip[index + _slabSize]) Acenter += 1.; + if (!skip[index - _slabSize]) Acenter += 1.; + } + + _residual[index] = b[index] - (Acenter * field[index] + + field[index - 1] * (skip[index - 1] ? 0.0 : -1.0f)+ + field[index + 1] * (skip[index + 1] ? 0.0 : -1.0f)+ + field[index - _xRes] * (skip[index - _xRes] ? 0.0 : -1.0f)+ + field[index + _xRes] * (skip[index + _xRes] ? 0.0 : -1.0f)+ + field[index - _slabSize] * (skip[index - _slabSize] ? 0.0 : -1.0f)+ + field[index + _slabSize] * (skip[index + _slabSize] ? 0.0 : -1.0f) ); + _residual[index] = (skip[index]) ? 0.0f : _residual[index]; + + // P^-1 + if(Acenter < 1.0) + _Precond[index] = 0.0; + else + _Precond[index] = 1.0 / Acenter; + + // p = P^-1 * r + _direction[index] = _residual[index] * _Precond[index]; + } + + // deltaNew = transpose(r) * p + float deltaNew = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + deltaNew += _residual[index] * _direction[index]; + + // delta0 = deltaNew + // float delta0 = deltaNew; + + // While deltaNew > (eps^2) * delta0 + const float eps = SOLVER_ACCURACY; + //while ((i < _iterations) && (deltaNew > eps*delta0)) + float maxR = 2.0f * eps; + // while (i < _iterations) + while ((i < _iterations) && (maxR > 0.001*eps)) + { + // (s) q = Ad (p) + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if the cell is a variable + float Acenter = 0.0f; + if (!skip[index]) + { + // set the matrix to the Poisson stencil in order + if (!skip[index + 1]) Acenter += 1.; + if (!skip[index - 1]) Acenter += 1.; + if (!skip[index + _xRes]) Acenter += 1.; + if (!skip[index - _xRes]) Acenter += 1.; + if (!skip[index + _slabSize]) Acenter += 1.; + if (!skip[index - _slabSize]) Acenter += 1.; + } + + _q[index] = Acenter * _direction[index] + + _direction[index - 1] * (skip[index - 1] ? 0.0 : -1.0f) + + _direction[index + 1] * (skip[index + 1] ? 0.0 : -1.0f) + + _direction[index - _xRes] * (skip[index - _xRes] ? 0.0 : -1.0f) + + _direction[index + _xRes] * (skip[index + _xRes] ? 0.0 : -1.0f)+ + _direction[index - _slabSize] * (skip[index - _slabSize] ? 0.0 : -1.0f) + + _direction[index + _slabSize] * (skip[index + _slabSize] ? 0.0 : -1.0f); + _q[index] = (skip[index]) ? 0.0f : _q[index]; + } + + // alpha = deltaNew / (transpose(d) * q) + float alpha = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + alpha += _direction[index] * _q[index]; + if (fabs(alpha) > 0.0f) + alpha = deltaNew / alpha; + + // x = x + alpha * d + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + field[index] += alpha * _direction[index]; + + // r = r - alpha * q + maxR = 0.0; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + _residual[index] -= alpha * _q[index]; + // maxR = (_residual[index] > maxR) ? _residual[index] : maxR; + } + + // if(maxR <= eps) + // break; + + // h = P^-1 * r + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + _h[index] = _Precond[index] * _residual[index]; + } + + // deltaOld = deltaNew + float deltaOld = deltaNew; + + // deltaNew = transpose(r) * h + deltaNew = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + deltaNew += _residual[index] * _h[index]; + maxR = (_residual[index]* _h[index] > maxR) ? _residual[index]* _h[index] : maxR; + } + + // beta = deltaNew / deltaOld + float beta = deltaNew / deltaOld; + + // d = h + beta * d + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + _direction[index] = _h[index] + beta * _direction[index]; + + // i = i + 1 + i++; + } + // cout << i << " iterations converged to " << sqrt(maxR) << endl; + + if (_h) delete[] _h; + if (_Precond) delete[] _Precond; + if (_residual) delete[] _residual; + if (_direction) delete[] _direction; + if (_q) delete[] _q; +} + +////////////////////////////////////////////////////////////////////// +// solve the poisson equation with CG +////////////////////////////////////////////////////////////////////// +#if 0 +void FLUID_3D::solvePressure(float* field, float* b, unsigned char* skip) +{ + int x, y, z; + size_t index; + + // i = 0 + int i = 0; + + memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes); + + // r = b - Ax + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if the cell is a variable + float Acenter = 0.0f; + if (!skip[index]) + { + // set the matrix to the Poisson stencil in order + if (!skip[index + 1]) Acenter += 1.; + if (!skip[index - 1]) Acenter += 1.; + if (!skip[index + _xRes]) Acenter += 1.; + if (!skip[index - _xRes]) Acenter += 1.; + if (!skip[index + _slabSize]) Acenter += 1.; + if (!skip[index - _slabSize]) Acenter += 1.; + } + + _residual[index] = b[index] - (Acenter * field[index] + + field[index - 1] * (skip[index - 1] ? 0.0 : -1.0f)+ + field[index + 1] * (skip[index + 1] ? 0.0 : -1.0f)+ + field[index - _xRes] * (skip[index - _xRes] ? 0.0 : -1.0f)+ + field[index + _xRes] * (skip[index + _xRes] ? 0.0 : -1.0f)+ + field[index - _slabSize] * (skip[index - _slabSize] ? 0.0 : -1.0f)+ + field[index + _slabSize] * (skip[index + _slabSize] ? 0.0 : -1.0f) ); + _residual[index] = (skip[index]) ? 0.0f : _residual[index]; + } + + + // d = r + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + _direction[index] = _residual[index]; + + // deltaNew = transpose(r) * r + float deltaNew = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + deltaNew += _residual[index] * _residual[index]; + + // delta0 = deltaNew + // float delta0 = deltaNew; + + // While deltaNew > (eps^2) * delta0 + const float eps = SOLVER_ACCURACY; + float maxR = 2.0f * eps; + while ((i < _iterations) && (maxR > eps)) + { + // q = Ad + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if the cell is a variable + float Acenter = 0.0f; + if (!skip[index]) + { + // set the matrix to the Poisson stencil in order + if (!skip[index + 1]) Acenter += 1.; + if (!skip[index - 1]) Acenter += 1.; + if (!skip[index + _xRes]) Acenter += 1.; + if (!skip[index - _xRes]) Acenter += 1.; + if (!skip[index + _slabSize]) Acenter += 1.; + if (!skip[index - _slabSize]) Acenter += 1.; + } + + _q[index] = Acenter * _direction[index] + + _direction[index - 1] * (skip[index - 1] ? 0.0 : -1.0f) + + _direction[index + 1] * (skip[index + 1] ? 0.0 : -1.0f) + + _direction[index - _xRes] * (skip[index - _xRes] ? 0.0 : -1.0f) + + _direction[index + _xRes] * (skip[index + _xRes] ? 0.0 : -1.0f)+ + _direction[index - _slabSize] * (skip[index - _slabSize] ? 0.0 : -1.0f) + + _direction[index + _slabSize] * (skip[index + _slabSize] ? 0.0 : -1.0f); + _q[index] = (skip[index]) ? 0.0f : _q[index]; + } + + // alpha = deltaNew / (transpose(d) * q) + float alpha = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + alpha += _direction[index] * _q[index]; + if (fabs(alpha) > 0.0f) + alpha = deltaNew / alpha; + + // x = x + alpha * d + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + field[index] += alpha * _direction[index]; + + // r = r - alpha * q + maxR = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + _residual[index] -= alpha * _q[index]; + maxR = (_residual[index] > maxR) ? _residual[index] : maxR; + } + + // deltaOld = deltaNew + float deltaOld = deltaNew; + + // deltaNew = transpose(r) * r + deltaNew = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + deltaNew += _residual[index] * _residual[index]; + + // beta = deltaNew / deltaOld + float beta = deltaNew / deltaOld; + + // d = r + beta * d + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + _direction[index] = _residual[index] + beta * _direction[index]; + + // i = i + 1 + i++; + } + // cout << i << " iterations converged to " << maxR << endl; +} +#endif + +////////////////////////////////////////////////////////////////////// +// solve the heat equation with CG +////////////////////////////////////////////////////////////////////// +void FLUID_3D::solveHeat(float* field, float* b, unsigned char* skip) +{ + int x, y, z; + size_t index; + const float heatConst = _dt * _heatDiffusion / (_dx * _dx); + float *_q, *_residual, *_direction; + + // i = 0 + int i = 0; + + _residual = new float[_totalCells]; // set 0 + _direction = new float[_totalCells]; // set 0 + _q = new float[_totalCells]; // set 0 + + memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes); + memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes); + + // r = b - Ax + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if the cell is a variable + float Acenter = 1.0f; + if (!skip[index]) + { + // set the matrix to the Poisson stencil in order + if (!skip[index + 1]) Acenter += heatConst; + if (!skip[index - 1]) Acenter += heatConst; + if (!skip[index + _xRes]) Acenter += heatConst; + if (!skip[index - _xRes]) Acenter += heatConst; + if (!skip[index + _slabSize]) Acenter += heatConst; + if (!skip[index - _slabSize]) Acenter += heatConst; + } + + _residual[index] = b[index] - (Acenter * field[index] + + field[index - 1] * (skip[index - 1] ? 0.0 : -heatConst) + + field[index + 1] * (skip[index + 1] ? 0.0 : -heatConst) + + field[index - _xRes] * (skip[index - _xRes] ? 0.0 : -heatConst) + + field[index + _xRes] * (skip[index + _xRes] ? 0.0 : -heatConst) + + field[index - _slabSize] * (skip[index - _slabSize] ? 0.0 : -heatConst) + + field[index + _slabSize] * (skip[index + _slabSize] ? 0.0 : -heatConst)); + _residual[index] = (skip[index]) ? 0.0f : _residual[index]; + } + + // d = r + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + _direction[index] = _residual[index]; + + // deltaNew = transpose(r) * r + float deltaNew = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + deltaNew += _residual[index] * _residual[index]; + + // delta0 = deltaNew + // float delta0 = deltaNew; + + // While deltaNew > (eps^2) * delta0 + const float eps = SOLVER_ACCURACY; + float maxR = 2.0f * eps; + while ((i < _iterations) && (maxR > eps)) + { + // q = Ad + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + // if the cell is a variable + float Acenter = 1.0f; + if (!skip[index]) + { + // set the matrix to the Poisson stencil in order + if (!skip[index + 1]) Acenter += heatConst; + if (!skip[index - 1]) Acenter += heatConst; + if (!skip[index + _xRes]) Acenter += heatConst; + if (!skip[index - _xRes]) Acenter += heatConst; + if (!skip[index + _slabSize]) Acenter += heatConst; + if (!skip[index - _slabSize]) Acenter += heatConst; + } + + _q[index] = (Acenter * _direction[index] + + _direction[index - 1] * (skip[index - 1] ? 0.0 : -heatConst) + + _direction[index + 1] * (skip[index + 1] ? 0.0 : -heatConst) + + _direction[index - _xRes] * (skip[index - _xRes] ? 0.0 : -heatConst) + + _direction[index + _xRes] * (skip[index + _xRes] ? 0.0 : -heatConst) + + _direction[index - _slabSize] * (skip[index - _slabSize] ? 0.0 : -heatConst) + + _direction[index + _slabSize] * (skip[index + _slabSize] ? 0.0 : -heatConst)); + + _q[index] = (skip[index]) ? 0.0f : _q[index]; + } + + // alpha = deltaNew / (transpose(d) * q) + float alpha = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + alpha += _direction[index] * _q[index]; + if (fabs(alpha) > 0.0f) + alpha = deltaNew / alpha; + + // x = x + alpha * d + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + field[index] += alpha * _direction[index]; + + // r = r - alpha * q + maxR = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + { + _residual[index] -= alpha * _q[index]; + maxR = (_residual[index] > maxR) ? _residual[index] : maxR; + } + + // deltaOld = deltaNew + float deltaOld = deltaNew; + + // deltaNew = transpose(r) * r + deltaNew = 0.0f; + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + deltaNew += _residual[index] * _residual[index]; + + // beta = deltaNew / deltaOld + float beta = deltaNew / deltaOld; + + // d = r + beta * d + index = _slabSize + _xRes + 1; + for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes) + for (y = 1; y < _yRes - 1; y++, index += 2) + for (x = 1; x < _xRes - 1; x++, index++) + _direction[index] = _residual[index] + beta * _direction[index]; + + // i = i + 1 + i++; + } + // cout << i << " iterations converged to " << maxR << endl; + + if (_residual) delete[] _residual; + if (_direction) delete[] _direction; + if (_q) delete[] _q; +} + diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp new file mode 100644 index 00000000000..2d3ec125c2b --- /dev/null +++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp @@ -0,0 +1,612 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// FLUID_3D.cpp: implementation of the static functions of the FLUID_3D class. +// +////////////////////////////////////////////////////////////////////// + +#include +#include "FLUID_3D.h" +#include "IMAGE.h" +#include "WTURBULENCE.h" +#include "INTERPOLATE.h" + +////////////////////////////////////////////////////////////////////// +// add a test cube of density to the center +////////////////////////////////////////////////////////////////////// +/* +void FLUID_3D::addSmokeColumn() { + addSmokeTestCase(_density, _res, 1.0); + // addSmokeTestCase(_zVelocity, _res, 1.0); + addSmokeTestCase(_heat, _res, 1.0); + if (_wTurbulence) { + addSmokeTestCase(_wTurbulence->getDensityBig(), _wTurbulence->getResBig(), 1.0); + } +} +*/ + +////////////////////////////////////////////////////////////////////// +// generic static version, so that it can be applied to the +// WTURBULENCE grid as well +////////////////////////////////////////////////////////////////////// + +void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res) +{ + const int slabSize = res[0]*res[1]; int maxRes = (int)MAX3V(res); + float dx = 1.0f / (float)maxRes; + + float xTotal = dx * res[0]; + float yTotal = dx * res[1]; + float zTotal = dx * res[2]; + + float heighMin = 0.05; + float heighMax = 0.10; + + for (int y = 0; y < res[2]; y++) + for (int z = (int)(heighMin*res[2]); z <= (int)(heighMax * res[2]); z++) + for (int x = 0; x < res[0]; x++) + { + float xLength = x * dx - xTotal * 0.4f; + float yLength = y * dx - yTotal * 0.5f; + float radius = sqrtf(xLength * xLength + yLength * yLength); + + if (radius < 0.075f * xTotal) + { + int index = x + y * res[0] + z * slabSize; + field[index] = 1.0f; + } + } +} + + +////////////////////////////////////////////////////////////////////// +// set x direction to Neumann boundary conditions +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setNeumannX(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + int index; + for (int z = 0; z < res[2]; z++) + for (int y = 0; y < res[1]; y++) + { + // left slab + index = y * res[0] + z * slabSize; + field[index] = field[index + 2]; + + // right slab + index += res[0] - 1; + field[index] = field[index - 2]; + } + + // fix, force top slab to only allow outwards flux + for (int y = 0; y < res[1]; y++) + for (int z = 0; z < res[2]; z++) + { + // top slab + int index = y * res[0] + z * slabSize; + index += res[0] - 1; + if(field[index]<0.) field[index] = 0.; + index -= 1; + if(field[index]<0.) field[index] = 0.; + } + } + +////////////////////////////////////////////////////////////////////// +// set y direction to Neumann boundary conditions +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setNeumannY(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + int index; + for (int z = 0; z < res[2]; z++) + for (int x = 0; x < res[0]; x++) + { + // bottom slab + index = x + z * slabSize; + field[index] = field[index + 2 * res[0]]; + + // top slab + index += slabSize - res[0]; + field[index] = field[index - 2 * res[0]]; + } + + // fix, force top slab to only allow outwards flux + for (int z = 0; z < res[2]; z++) + for (int x = 0; x < res[0]; x++) + { + // top slab + int index = x + z * slabSize; + index += slabSize - res[0]; + if(field[index]<0.) field[index] = 0.; + index -= res[0]; + if(field[index]<0.) field[index] = 0.; + } + +} + +////////////////////////////////////////////////////////////////////// +// set z direction to Neumann boundary conditions +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setNeumannZ(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + const int totalCells = res[0] * res[1] * res[2]; + int index; + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++) + { + // front slab + index = x + y * res[0]; + field[index] = field[index + 2 * slabSize]; + + // back slab + index += totalCells - slabSize; + field[index] = field[index - 2 * slabSize]; + } + + // fix, force top slab to only allow outwards flux + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++) + { + // top slab + int index = x + y * res[0]; + index += totalCells - slabSize; + if(field[index]<0.) field[index] = 0.; + index -= slabSize; + if(field[index]<0.) field[index] = 0.; + } + +} + +////////////////////////////////////////////////////////////////////// +// set x direction to zero +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setZeroX(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + int index; + for (int z = 0; z < res[2]; z++) + for (int y = 0; y < res[1]; y++) + { + // left slab + index = y * res[0] + z * slabSize; + field[index] = 0.0f; + + // right slab + index += res[0] - 1; + field[index] = 0.0f; + } +} + +////////////////////////////////////////////////////////////////////// +// set y direction to zero +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setZeroY(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + int index; + for (int z = 0; z < res[2]; z++) + for (int x = 0; x < res[0]; x++) + { + // bottom slab + index = x + z * slabSize; + field[index] = 0.0f; + + // top slab + index += slabSize - res[0]; + field[index] = 0.0f; + } +} + +////////////////////////////////////////////////////////////////////// +// set z direction to zero +////////////////////////////////////////////////////////////////////// +void FLUID_3D::setZeroZ(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + const int totalCells = res[0] * res[1] * res[2]; + int index; + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++) + { + // front slab + index = x + y * res[0]; + field[index] = 0.0f; + + // back slab + index += totalCells - slabSize; + field[index] = 0.0f; + } + } + +////////////////////////////////////////////////////////////////////// +// copy grid boundary +////////////////////////////////////////////////////////////////////// +void FLUID_3D::copyBorderX(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + int index; + for (int z = 0; z < res[2]; z++) + for (int y = 0; y < res[1]; y++) + { + // left slab + index = y * res[0] + z * slabSize; + field[index] = field[index + 1]; + + // right slab + index += res[0] - 1; + field[index] = field[index - 1]; + } +} +void FLUID_3D::copyBorderY(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + const int totalCells = res[0] * res[1] * res[2]; + int index; + for (int z = 0; z < res[2]; z++) + for (int x = 0; x < res[0]; x++) + { + // bottom slab + index = x + z * slabSize; + field[index] = field[index + res[0]]; + // top slab + index += slabSize - res[0]; + field[index] = field[index - res[0]]; + } +} +void FLUID_3D::copyBorderZ(float* field, Vec3Int res) +{ + const int slabSize = res[0] * res[1]; + const int totalCells = res[0] * res[1] * res[2]; + int index; + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++) + { + // front slab + index = x + y * res[0]; + field[index] = field[index + slabSize]; + // back slab + index += totalCells - slabSize; + field[index] = field[index - slabSize]; + } +} + +///////////////////////////////////////////////////////////////////// +// advect field with the semi lagrangian method +////////////////////////////////////////////////////////////////////// +void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const float* vely, const float* velz, + float* oldField, float* newField, Vec3Int res) +{ + const int xres = res[0]; + const int yres = res[1]; + const int zres = res[2]; + const int slabSize = res[0] * res[1]; + + // scale dt up to grid resolution +#if PARALLEL==1 +#pragma omp parallel +#pragma omp for schedule(static) +#endif + for (int z = 0; z < zres; z++) + for (int y = 0; y < yres; y++) + for (int x = 0; x < xres; x++) + { + const int index = x + y * xres + z * xres*yres; + + // backtrace + float xTrace = x - dt * velx[index]; + float yTrace = y - dt * vely[index]; + float zTrace = z - dt * velz[index]; + + // clamp backtrace to grid boundaries + if (xTrace < 0.5) xTrace = 0.5; + if (xTrace > xres - 1.5) xTrace = xres - 1.5; + if (yTrace < 0.5) yTrace = 0.5; + if (yTrace > yres - 1.5) yTrace = yres - 1.5; + if (zTrace < 0.5) zTrace = 0.5; + if (zTrace > zres - 1.5) zTrace = zres - 1.5; + + // locate neighbors to interpolate + const int x0 = (int)xTrace; + const int x1 = x0 + 1; + const int y0 = (int)yTrace; + const int y1 = y0 + 1; + const int z0 = (int)zTrace; + const int z1 = z0 + 1; + + // get interpolation weights + const float s1 = xTrace - x0; + const float s0 = 1.0f - s1; + const float t1 = yTrace - y0; + const float t0 = 1.0f - t1; + const float u1 = zTrace - z0; + const float u0 = 1.0f - u1; + + const int i000 = x0 + y0 * xres + z0 * slabSize; + const int i010 = x0 + y1 * xres + z0 * slabSize; + const int i100 = x1 + y0 * xres + z0 * slabSize; + const int i110 = x1 + y1 * xres + z0 * slabSize; + const int i001 = x0 + y0 * xres + z1 * slabSize; + const int i011 = x0 + y1 * xres + z1 * slabSize; + const int i101 = x1 + y0 * xres + z1 * slabSize; + const int i111 = x1 + y1 * xres + z1 * slabSize; + + // interpolate + // (indices could be computed once) + newField[index] = u0 * (s0 * (t0 * oldField[i000] + + t1 * oldField[i010]) + + s1 * (t0 * oldField[i100] + + t1 * oldField[i110])) + + u1 * (s0 * (t0 * oldField[i001] + + t1 * oldField[i011]) + + s1 * (t0 * oldField[i101] + + t1 * oldField[i111])); + } +} + +///////////////////////////////////////////////////////////////////// +// advect field with the maccormack method +// +// comments are the pseudocode from selle's paper +////////////////////////////////////////////////////////////////////// +void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, + float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles) +{ + float* phiHatN = temp1; + float* phiHatN1 = temp2; + const int sx= res[0]; + const int sy= res[1]; + const int sz= res[2]; + + for (int x = 0; x < sx * sy * sz; x++) + phiHatN[x] = phiHatN1[x] = oldField[x]; + + float*& phiN = oldField; + float*& phiN1 = newField; + + // phiHatN1 = A(phiN) + advectFieldSemiLagrange( dt, xVelocity, yVelocity, zVelocity, phiN, phiHatN1, res); + + // phiHatN = A^R(phiHatN1) + advectFieldSemiLagrange( -1.0*dt, xVelocity, yVelocity, zVelocity, phiHatN1, phiHatN, res); + + // phiN1 = phiHatN1 + (phiN - phiHatN) / 2 + const int border = 0; + for (int z = border; z < sz-border; z++) + for (int y = border; y < sy-border; y++) + for (int x = border; x < sx-border; x++) { + int index = x + y * sx + z * sx*sy; + phiN1[index] = phiHatN1[index] + (phiN[index] - phiHatN[index]) * 0.50f; + //phiN1[index] = phiHatN1[index]; // debug, correction off + } + copyBorderX(phiN1, res); + copyBorderY(phiN1, res); + copyBorderZ(phiN1, res); + + // clamp any newly created extrema + clampExtrema(dt, xVelocity, yVelocity, zVelocity, oldField, newField, res); + + // if the error estimate was bad, revert to first order + clampOutsideRays(dt, xVelocity, yVelocity, zVelocity, oldField, newField, res, obstacles, phiHatN1); +} + + +////////////////////////////////////////////////////////////////////// +// Clamp the extrema generated by the BFECC error correction +////////////////////////////////////////////////////////////////////// +void FLUID_3D::clampExtrema(const float dt, const float* velx, const float* vely, const float* velz, + float* oldField, float* newField, Vec3Int res) +{ + const int xres= res[0]; + const int yres= res[1]; + const int zres= res[2]; + const int slabSize = res[0] * res[1]; + for (int z = 1; z < zres-1; z++) + for (int y = 1; y < yres-1; y++) + for (int x = 1; x < xres-1; x++) + { + const int index = x + y * xres+ z * xres*yres; + // backtrace + float xTrace = x - dt * velx[index]; + float yTrace = y - dt * vely[index]; + float zTrace = z - dt * velz[index]; + + // clamp backtrace to grid boundaries + if (xTrace < 0.5) xTrace = 0.5; + if (xTrace > xres - 1.5) xTrace = xres - 1.5; + if (yTrace < 0.5) yTrace = 0.5; + if (yTrace > yres - 1.5) yTrace = yres - 1.5; + if (zTrace < 0.5) zTrace = 0.5; + if (zTrace > zres - 1.5) zTrace = zres - 1.5; + + // locate neighbors to interpolate + const int x0 = (int)xTrace; + const int x1 = x0 + 1; + const int y0 = (int)yTrace; + const int y1 = y0 + 1; + const int z0 = (int)zTrace; + const int z1 = z0 + 1; + + const int i000 = x0 + y0 * xres + z0 * slabSize; + const int i010 = x0 + y1 * xres + z0 * slabSize; + const int i100 = x1 + y0 * xres + z0 * slabSize; + const int i110 = x1 + y1 * xres + z0 * slabSize; + const int i001 = x0 + y0 * xres + z1 * slabSize; + const int i011 = x0 + y1 * xres + z1 * slabSize; + const int i101 = x1 + y0 * xres + z1 * slabSize; + const int i111 = x1 + y1 * xres + z1 * slabSize; + + float minField = oldField[i000]; + float maxField = oldField[i000]; + + minField = (oldField[i010] < minField) ? oldField[i010] : minField; + maxField = (oldField[i010] > maxField) ? oldField[i010] : maxField; + + minField = (oldField[i100] < minField) ? oldField[i100] : minField; + maxField = (oldField[i100] > maxField) ? oldField[i100] : maxField; + + minField = (oldField[i110] < minField) ? oldField[i110] : minField; + maxField = (oldField[i110] > maxField) ? oldField[i110] : maxField; + + minField = (oldField[i001] < minField) ? oldField[i001] : minField; + maxField = (oldField[i001] > maxField) ? oldField[i001] : maxField; + + minField = (oldField[i011] < minField) ? oldField[i011] : minField; + maxField = (oldField[i011] > maxField) ? oldField[i011] : maxField; + + minField = (oldField[i101] < minField) ? oldField[i101] : minField; + maxField = (oldField[i101] > maxField) ? oldField[i101] : maxField; + + minField = (oldField[i111] < minField) ? oldField[i111] : minField; + maxField = (oldField[i111] > maxField) ? oldField[i111] : maxField; + + newField[index] = (newField[index] > maxField) ? maxField : newField[index]; + newField[index] = (newField[index] < minField) ? minField : newField[index]; + } +} + +////////////////////////////////////////////////////////////////////// +// Reverts any backtraces that go into boundaries back to first +// order -- in this case the error correction term was totally +// incorrect +////////////////////////////////////////////////////////////////////// +void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz, + float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection) +{ + const int sx= res[0]; + const int sy= res[1]; + const int sz= res[2]; + const int slabSize = res[0] * res[1]; + + for (int z = 1; z < sz-1; z++) + for (int y = 1; y < sy-1; y++) + for (int x = 1; x < sx-1; x++) + { + const int index = x + y * sx+ z * slabSize; + // backtrace + float xBackward = x + dt * velx[index]; + float yBackward = y + dt * vely[index]; + float zBackward = z + dt * velz[index]; + float xTrace = x - dt * velx[index]; + float yTrace = y - dt * vely[index]; + float zTrace = z - dt * velz[index]; + + // see if it goes outside the boundaries + bool hasObstacle = + (zTrace < 1.0f) || (zTrace > sz - 2.0f) || + (yTrace < 1.0f) || (yTrace > sy - 2.0f) || + (xTrace < 1.0f) || (xTrace > sx - 2.0f) || + (zBackward < 1.0f) || (zBackward > sz - 2.0f) || + (yBackward < 1.0f) || (yBackward > sy - 2.0f) || + (xBackward < 1.0f) || (xBackward > sx - 2.0f); + // reuse old advection instead of doing another one... + if(hasObstacle) { newField[index] = oldAdvection[index]; continue; } + + // clamp to prevent an out of bounds access when looking into + // the _obstacles array + zTrace = (zTrace < 0.5f) ? 0.5f : zTrace; + zTrace = (zTrace > sz - 1.5f) ? sz - 1.5f : zTrace; + yTrace = (yTrace < 0.5f) ? 0.5f : yTrace; + yTrace = (yTrace > sy - 1.5f) ? sy - 1.5f : yTrace; + xTrace = (xTrace < 0.5f) ? 0.5f : xTrace; + xTrace = (xTrace > sx - 1.5f) ? sx - 1.5f : xTrace; + + // locate neighbors to interpolate, + // do backward first since we will use the forward indices if a + // reversion is actually necessary + zBackward = (zBackward < 0.5f) ? 0.5f : zBackward; + zBackward = (zBackward > sz - 1.5f) ? sz - 1.5f : zBackward; + yBackward = (yBackward < 0.5f) ? 0.5f : yBackward; + yBackward = (yBackward > sy - 1.5f) ? sy - 1.5f : yBackward; + xBackward = (xBackward < 0.5f) ? 0.5f : xBackward; + xBackward = (xBackward > sx - 1.5f) ? sx - 1.5f : xBackward; + + int x0 = (int)xBackward; + int x1 = x0 + 1; + int y0 = (int)yBackward; + int y1 = y0 + 1; + int z0 = (int)zBackward; + int z1 = z0 + 1; + if(obstacles && !hasObstacle) { + hasObstacle = hasObstacle || + obstacles[x0 + y0 * sx + z0*slabSize] || + obstacles[x0 + y1 * sx + z0*slabSize] || + obstacles[x1 + y0 * sx + z0*slabSize] || + obstacles[x1 + y1 * sx + z0*slabSize] || + obstacles[x0 + y0 * sx + z1*slabSize] || + obstacles[x0 + y1 * sx + z1*slabSize] || + obstacles[x1 + y0 * sx + z1*slabSize] || + obstacles[x1 + y1 * sx + z1*slabSize] ; + } + // reuse old advection instead of doing another one... + if(hasObstacle) { newField[index] = oldAdvection[index]; continue; } + + x0 = (int)xTrace; + x1 = x0 + 1; + y0 = (int)yTrace; + y1 = y0 + 1; + z0 = (int)zTrace; + z1 = z0 + 1; + if(obstacles && !hasObstacle) { + hasObstacle = hasObstacle || + obstacles[x0 + y0 * sx + z0*slabSize] || + obstacles[x0 + y1 * sx + z0*slabSize] || + obstacles[x1 + y0 * sx + z0*slabSize] || + obstacles[x1 + y1 * sx + z0*slabSize] || + obstacles[x0 + y0 * sx + z1*slabSize] || + obstacles[x0 + y1 * sx + z1*slabSize] || + obstacles[x1 + y0 * sx + z1*slabSize] || + obstacles[x1 + y1 * sx + z1*slabSize] ; + } // obstacle array + // reuse old advection instead of doing another one... + if(hasObstacle) { newField[index] = oldAdvection[index]; continue; } + + // see if either the forward or backward ray went into + // a boundary + if (hasObstacle) { + // get interpolation weights + float s1 = xTrace - x0; + float s0 = 1.0f - s1; + float t1 = yTrace - y0; + float t0 = 1.0f - t1; + float u1 = zTrace - z0; + float u0 = 1.0f - u1; + + const int i000 = x0 + y0 * sx + z0 * slabSize; + const int i010 = x0 + y1 * sx + z0 * slabSize; + const int i100 = x1 + y0 * sx + z0 * slabSize; + const int i110 = x1 + y1 * sx + z0 * slabSize; + const int i001 = x0 + y0 * sx + z1 * slabSize; + const int i011 = x0 + y1 * sx + z1 * slabSize; + const int i101 = x1 + y0 * sx + z1 * slabSize; + const int i111 = x1 + y1 * sx + z1 * slabSize; + + // interpolate, (indices could be computed once) + newField[index] = u0 * (s0 * ( + t0 * oldField[i000] + + t1 * oldField[i010]) + + s1 * (t0 * oldField[i100] + + t1 * oldField[i110])) + + u1 * (s0 * (t0 * oldField[i001] + + t1 * oldField[i011]) + + s1 * (t0 * oldField[i101] + + t1 * oldField[i111])); + } + } // xyz +} + diff --git a/intern/smoke/intern/IMAGE.h b/intern/smoke/intern/IMAGE.h new file mode 100644 index 00000000000..a57f164509e --- /dev/null +++ b/intern/smoke/intern/IMAGE.h @@ -0,0 +1,277 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +////////////////////////////////////////////////////////////////////// +// +#ifndef IMAGE_H +#define IMAGE_H + +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////// +// NT helper functions +////////////////////////////////////////////////////////////////////// +template < class T > inline T ABS( T a ) { + return (0 < a) ? a : -a ; +} + +template < class T > inline void SWAP_POINTERS( T &a, T &b ) { + T temp = a; + a = b; + b = temp; +} + +template < class T > inline void CLAMP( T &a, T b=0., T c=1.) { + if(ac) { a=c; return; } +} + +template < class T > inline T MIN( T a, T b) { + return (a < b) ? a : b; +} + +template < class T > inline T MAX( T a, T b) { + return (a > b) ? a : b; +} + +template < class T > inline T MAX3( T a, T b, T c) { + T max = (a > b) ? a : b; + max = (max > c) ? max : c; + return max; +} + +template < class T > inline float MAX3V( T vec) { + float max = (vec[0] > vec[1]) ? vec[0] : vec[1]; + max = (max > vec[2]) ? max : vec[2]; + return max; +} + +template < class T > inline float MIN3V( T vec) { + float min = (vec[0] < vec[1]) ? vec[0] : vec[1]; + min = (min < vec[2]) ? min : vec[2]; + return min; +} + +////////////////////////////////////////////////////////////////////// +// PNG, POV-Ray, and PBRT output functions +////////////////////////////////////////////////////////////////////// +#include + +namespace IMAGE { + /* + static int writePng(const char *fileName, unsigned char **rowsp, int w, int h) + { + // defaults + const int colortype = PNG_COLOR_TYPE_RGBA; + const int bitdepth = 8; + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; + png_bytep *rows = rowsp; + + FILE *fp = NULL; + std::string doing = "open for writing"; + if (!(fp = fopen(fileName, "wb"))) goto fail; + + if(!png_ptr) { + doing = "create png write struct"; + if (!(png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL))) goto fail; + } + if(!info_ptr) { + doing = "create png info struct"; + if (!(info_ptr = png_create_info_struct(png_ptr))) goto fail; + } + + if (setjmp(png_jmpbuf(png_ptr))) goto fail; + doing = "init IO"; + png_init_io(png_ptr, fp); + doing = "write header"; + png_set_IHDR(png_ptr, info_ptr, w, h, bitdepth, colortype, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + doing = "write info"; + png_write_info(png_ptr, info_ptr); + doing = "write image"; + png_write_image(png_ptr, rows); + doing = "write end"; + png_write_end(png_ptr, NULL); + doing = "write destroy structs"; + png_destroy_write_struct(&png_ptr, &info_ptr); + + fclose( fp ); + return 0; + + fail: + std::cerr << "writePng: could not "<1.) val=1.; + if(val<0.) val=0.; + pngbuf[(j*xRes+i)*4+0] = (unsigned char)(val*255.); + pngbuf[(j*xRes+i)*4+1] = (unsigned char)(val*255.); + pngbuf[(j*xRes+i)*4+2] = (unsigned char)(val*255.); + pfield++; + pngbuf[(j*xRes+i)*4+3] = 255; + } + rows[j] = &pngbuf[(yRes-j-1)*xRes*4]; + } + std::string filenamePNG = prefix + number + std::string(".png"); + writePng(filenamePNG.c_str(), rows, xRes, yRes, false); + printf("Writing %s\n", filenamePNG.c_str()); + + } +*/ + ///////////////////////////////////////////////////////////////////////////////// + // export pbrt volumegrid geometry object + ///////////////////////////////////////////////////////////////////////////////// + /* + static void dumpPBRT(int counter, std::string prefix, float* fieldOrg, int xRes, int yRes, int zRes) + { + char buffer[256]; + sprintf(buffer,"%04i", counter); + std::string number = std::string(buffer); + + std::string filenamePbrt = prefix + number + std::string(".pbrt.gz"); + printf("Writing PBRT %s\n", filenamePbrt.c_str()); + + float *field = new float[xRes*yRes*zRes]; + // normalize values + float maxDensVal = ABS(fieldOrg[0]); + float targetNorm = 0.5; + for (int i = 0; i < xRes * yRes * zRes; i++) { + if(ABS(fieldOrg[i])>maxDensVal) maxDensVal = ABS(fieldOrg[i]); + field[i] = 0.; + } + if(maxDensVal>0.) { + for (int i = 0; i < xRes * yRes * zRes; i++) { + field[i] = ABS(fieldOrg[i]) / maxDensVal * targetNorm; + } + } + + std::fstream fout; + fout.open(filenamePbrt.c_str(), std::ios::out); + + int maxRes = (xRes > yRes) ? xRes : yRes; + maxRes = (maxRes > zRes) ? maxRes : zRes; + + const float xSize = 1.0 / (float)maxRes * (float)xRes; + const float ySize = 1.0 / (float)maxRes * (float)yRes; + const float zSize = 1.0 / (float)maxRes * (float)zRes; + + gzFile file; + file = gzopen(filenamePbrt.c_str(), "wb1"); + if (file == NULL) { + std::cerr << " Couldn't write file " << filenamePbrt << "!!!" << std::endl; + return; + } + + // dimensions + gzprintf(file, "Volume \"volumegrid\" \n"); + gzprintf(file, " \"integer nx\" %i\n", xRes); + gzprintf(file, " \"integer ny\" %i\n", yRes); + gzprintf(file, " \"integer nz\" %i\n", zRes); + gzprintf(file, " \"point p0\" [ 0.0 0.0 0.0 ] \"point p1\" [%f %f %f ] \n", xSize, ySize, zSize); + gzprintf(file, " \"float density\" [ \n"); + for (int i = 0; i < xRes * yRes * zRes; i++) + gzprintf(file, "%f ", field[i]); + gzprintf(file, "] \n \n"); + + gzclose(file); + delete[] field; + } + */ + + ///////////////////////////////////////////////////////////////////////////////// + // 3D df3 export + ///////////////////////////////////////////////////////////////////////////////// +/* + static void dumpDF3(int counter, std::string prefix, float* fieldOrg, int xRes, int yRes, int zRes) + { + char buffer[256]; + + // do deferred copying to final directory, better for network directories + sprintf(buffer,"%04i", counter); + std::string number = std::string(buffer); + std::string filenameDf3 = prefix + number + std::string(".df3.gz"); + printf("Writing DF3 %s\n", filenameDf3.c_str()); + + gzFile file; + file = gzopen(filenameDf3.c_str(), "wb1"); + if (file == NULL) { + std::cerr << " Couldn't write file " << filenameDf3 << "!!!" << std::endl; + return; + } + + // dimensions + const int byteSize = 2; + const unsigned short int onx=xRes,ony=yRes,onz=zRes; + unsigned short int nx,ny,nz; + nx = onx >> 8; + ny = ony >> 8; + nz = onz >> 8; + nx += (onx << 8); + ny += (ony << 8); + nz += (onz << 8); + gzwrite(file, (void*)&nx, sizeof(short)); + gzwrite(file, (void*)&ny, sizeof(short)); + gzwrite(file, (void*)&nz, sizeof(short)); + const int nitems = onx*ony*onz; + const float mul = (float)( (1<<(8*byteSize))-1); + + unsigned short int *buf = new unsigned short int[nitems]; + for (int k = 0; k < onz; k++) + for (int j = 0; j < ony; j++) + for (int i = 0; i < onx; i++) { + float val = fieldOrg[k*(onx*ony)+j*onx+i] ; + CLAMP(val); + buf[k*(onx*ony)+j*onx+i] = (short int)(val*mul); + } + gzwrite(file, (void*)buf, sizeof(unsigned short int)* nitems); + + gzclose(file); + delete[] buf; + } + */ + +}; + + +#endif + diff --git a/intern/smoke/intern/INTERPOLATE.h b/intern/smoke/intern/INTERPOLATE.h new file mode 100644 index 00000000000..6800c3b84b0 --- /dev/null +++ b/intern/smoke/intern/INTERPOLATE.h @@ -0,0 +1,227 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +////////////////////////////////////////////////////////////////////// +#ifndef INTERPOLATE_H +#define INTERPOLATE_H + +#include +#include + +namespace INTERPOLATE { + +////////////////////////////////////////////////////////////////////// +// linear interpolators +////////////////////////////////////////////////////////////////////// +static inline float lerp(float t, float a, float b) { + return ( a + t * (b - a) ); +} + +static inline float lerp(float* field, float x, float y, int res) { + // clamp backtrace to grid boundaries + if (x < 0.5f) x = 0.5f; + if (x > res - 1.5f) x = res - 1.5f; + if (y < 0.5f) y = 0.5f; + if (y > res - 1.5f) y = res - 1.5f; + + const int x0 = (int)x; + const int y0 = (int)y; + x -= x0; + y -= y0; + float d00, d10, d01, d11; + + // lerp the velocities + d00 = field[x0 + y0 * res]; + d10 = field[(x0 + 1) + y0 * res]; + d01 = field[x0 + (y0 + 1) * res]; + d11 = field[(x0 + 1) + (y0 + 1) * res]; + return lerp(y, lerp(x, d00, d10), + lerp(x, d01, d11)); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// 3d linear interpolation +////////////////////////////////////////////////////////////////////////////////////////// +static inline float lerp3d(float* field, float x, float y, float z, int xres, int yres, int zres) { + // clamp pos to grid boundaries + if (x < 0.5) x = 0.5; + if (x > xres - 1.5) x = xres - 1.5; + if (y < 0.5) y = 0.5; + if (y > yres - 1.5) y = yres - 1.5; + if (z < 0.5) z = 0.5; + if (z > zres - 1.5) z = zres - 1.5; + + // locate neighbors to interpolate + const int x0 = (int)x; + const int x1 = x0 + 1; + const int y0 = (int)y; + const int y1 = y0 + 1; + const int z0 = (int)z; + const int z1 = z0 + 1; + + // get interpolation weights + const float s1 = x - (float)x0; + const float s0 = 1.0f - s1; + const float t1 = y - (float)y0; + const float t0 = 1.0f - t1; + const float u1 = z - (float)z0; + const float u0 = 1.0f - u1; + + const int slabSize = xres*yres; + const int i000 = x0 + y0 * xres + z0 * slabSize; + const int i010 = x0 + y1 * xres + z0 * slabSize; + const int i100 = x1 + y0 * xres + z0 * slabSize; + const int i110 = x1 + y1 * xres + z0 * slabSize; + const int i001 = x0 + y0 * xres + z1 * slabSize; + const int i011 = x0 + y1 * xres + z1 * slabSize; + const int i101 = x1 + y0 * xres + z1 * slabSize; + const int i111 = x1 + y1 * xres + z1 * slabSize; + + // interpolate (indices could be computed once) + return ( u0 * (s0 * (t0 * field[i000] + + t1 * field[i010]) + + s1 * (t0 * field[i100] + + t1 * field[i110])) + + u1 * (s0 * (t0 * field[i001] + + t1 * field[i011]) + + s1 * (t0 * field[i101] + + t1 * field[i111])) ); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// convert field entries of type T to floats, then interpolate +////////////////////////////////////////////////////////////////////////////////////////// +template +static inline float lerp3dToFloat(T* field1, + float x, float y, float z, int xres, int yres, int zres) { + // clamp pos to grid boundaries + if (x < 0.5) x = 0.5; + if (x > xres - 1.5) x = xres - 1.5; + if (y < 0.5) y = 0.5; + if (y > yres - 1.5) y = yres - 1.5; + if (z < 0.5) z = 0.5; + if (z > zres - 1.5) z = zres - 1.5; + + // locate neighbors to interpolate + const int x0 = (int)x; + const int x1 = x0 + 1; + const int y0 = (int)y; + const int y1 = y0 + 1; + const int z0 = (int)z; + const int z1 = z0 + 1; + + // get interpolation weights + const float s1 = x - (float)x0; + const float s0 = 1.0f - s1; + const float t1 = y - (float)y0; + const float t0 = 1.0f - t1; + const float u1 = z - (float)z0; + const float u0 = 1.0f - u1; + + const int slabSize = xres*yres; + const int i000 = x0 + y0 * xres + z0 * slabSize; + const int i010 = x0 + y1 * xres + z0 * slabSize; + const int i100 = x1 + y0 * xres + z0 * slabSize; + const int i110 = x1 + y1 * xres + z0 * slabSize; + const int i001 = x0 + y0 * xres + z1 * slabSize; + const int i011 = x0 + y1 * xres + z1 * slabSize; + const int i101 = x1 + y0 * xres + z1 * slabSize; + const int i111 = x1 + y1 * xres + z1 * slabSize; + + // interpolate (indices could be computed once) + return (float)( + ( u0 * (s0 * (t0 * (float)field1[i000] + + t1 * (float)field1[i010]) + + s1 * (t0 * (float)field1[i100] + + t1 * (float)field1[i110])) + + u1 * (s0 * (t0 * (float)field1[i001] + + t1 * (float)field1[i011]) + + s1 * (t0 * (float)field1[i101] + + t1 * (float)field1[i111])) ) ); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// interpolate a vector from 3 fields +////////////////////////////////////////////////////////////////////////////////////////// +static inline Vec3 lerp3dVec(float* field1, float* field2, float* field3, + float x, float y, float z, int xres, int yres, int zres) { + // clamp pos to grid boundaries + if (x < 0.5) x = 0.5; + if (x > xres - 1.5) x = xres - 1.5; + if (y < 0.5) y = 0.5; + if (y > yres - 1.5) y = yres - 1.5; + if (z < 0.5) z = 0.5; + if (z > zres - 1.5) z = zres - 1.5; + + // locate neighbors to interpolate + const int x0 = (int)x; + const int x1 = x0 + 1; + const int y0 = (int)y; + const int y1 = y0 + 1; + const int z0 = (int)z; + const int z1 = z0 + 1; + + // get interpolation weights + const float s1 = x - (float)x0; + const float s0 = 1.0f - s1; + const float t1 = y - (float)y0; + const float t0 = 1.0f - t1; + const float u1 = z - (float)z0; + const float u0 = 1.0f - u1; + + const int slabSize = xres*yres; + const int i000 = x0 + y0 * xres + z0 * slabSize; + const int i010 = x0 + y1 * xres + z0 * slabSize; + const int i100 = x1 + y0 * xres + z0 * slabSize; + const int i110 = x1 + y1 * xres + z0 * slabSize; + const int i001 = x0 + y0 * xres + z1 * slabSize; + const int i011 = x0 + y1 * xres + z1 * slabSize; + const int i101 = x1 + y0 * xres + z1 * slabSize; + const int i111 = x1 + y1 * xres + z1 * slabSize; + + // interpolate (indices could be computed once) + return Vec3( + ( u0 * (s0 * (t0 * field1[i000] + + t1 * field1[i010]) + + s1 * (t0 * field1[i100] + + t1 * field1[i110])) + + u1 * (s0 * (t0 * field1[i001] + + t1 * field1[i011]) + + s1 * (t0 * field1[i101] + + t1 * field1[i111])) ) , + ( u0 * (s0 * (t0 * field2[i000] + + t1 * field2[i010]) + + s1 * (t0 * field2[i100] + + t1 * field2[i110])) + + u1 * (s0 * (t0 * field2[i001] + + t1 * field2[i011]) + + s1 * (t0 * field2[i101] + + t1 * field2[i111])) ) , + ( u0 * (s0 * (t0 * field3[i000] + + t1 * field3[i010]) + + s1 * (t0 * field3[i100] + + t1 * field3[i110])) + + u1 * (s0 * (t0 * field3[i001] + + t1 * field3[i011]) + + s1 * (t0 * field3[i101] + + t1 * field3[i111])) ) + ); +} + +}; +#endif diff --git a/intern/smoke/intern/LICENSE.txt b/intern/smoke/intern/LICENSE.txt new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/intern/smoke/intern/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/intern/smoke/intern/LU_HELPER.h b/intern/smoke/intern/LU_HELPER.h new file mode 100644 index 00000000000..b3f3c5a1cb4 --- /dev/null +++ b/intern/smoke/intern/LU_HELPER.h @@ -0,0 +1,56 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +////////////////////////////////////////////////////////////////////// + +#ifndef LU_HELPER_H +#define LU_HELPER_H + +////////////////////////////////////////////////////////////////////// +// Helper function, compute eigenvalues of 3x3 matrix +////////////////////////////////////////////////////////////////////// + +#include "tnt/jama_lu.h" + +////////////////////////////////////////////////////////////////////// +// LU decomposition of 3x3 non-symmetric matrix +////////////////////////////////////////////////////////////////////// +JAMA::LU inline computeLU3x3( + float a[3][3]) +{ + TNT::Array2D A = TNT::Array2D(3,3, &a[0][0]); + JAMA::LU jLU= JAMA::LU(A); + return jLU; +} + +////////////////////////////////////////////////////////////////////// +// LU decomposition of 3x3 non-symmetric matrix +////////////////////////////////////////////////////////////////////// +void inline solveLU3x3( + JAMA::LU& A, + float x[3], + float b[3]) +{ + TNT::Array1D jamaB = TNT::Array1D(3, &b[0]); + TNT::Array1D jamaX = A.solve(jamaB); + + x[0] = jamaX[0]; + x[1] = jamaX[1]; + x[2] = jamaX[2]; +} +#endif diff --git a/intern/smoke/intern/MERSENNETWISTER.h b/intern/smoke/intern/MERSENNETWISTER.h new file mode 100644 index 00000000000..8ad00d8b9c2 --- /dev/null +++ b/intern/smoke/intern/MERSENNETWISTER.h @@ -0,0 +1,429 @@ +// MersenneTwister.h +// Mersenne Twister random number generator -- a C++ class MTRand +// Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus +// Richard J. Wagner v1.0 15 May 2003 rjwagner@writeme.com + +// The Mersenne Twister is an algorithm for generating random numbers. It +// was designed with consideration of the flaws in various other generators. +// The period, 2^19937-1, and the order of equidistribution, 623 dimensions, +// are far greater. The generator is also fast; it avoids multiplication and +// division, and it benefits from caches and pipelines. For more information +// see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html + +// Reference +// M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally +// Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on +// Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30. + +// Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, +// Copyright (C) 2000 - 2003, Richard J. Wagner +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. The names of its contributors may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// The original code included the following notice: +// +// When you use this, send an email to: matumoto@math.keio.ac.jp +// with an appropriate reference to your work. +// +// It would be nice to CC: rjwagner@writeme.com and Cokus@math.washington.edu +// when you write. + +#ifndef MERSENNETWISTER_H +#define MERSENNETWISTER_H + +// Not thread safe (unless auto-initialization is avoided and each thread has +// its own MTRand object) + +#include +#include +#include +#include +#include + +class MTRand { +// Data +public: + typedef unsigned long uint32; // unsigned integer type, at least 32 bits + + enum { N = 624 }; // length of state vector + enum { SAVE = N + 1 }; // length of array for save() + +protected: + enum { M = 397 }; // period parameter + + uint32 state[N]; // internal state + uint32 *pNext; // next value to get from state + int left; // number of values left before reload needed + + +//Methods +public: + MTRand( const uint32& oneSeed ); // initialize with a simple uint32 + MTRand( uint32 *const bigSeed, uint32 const seedLength = N ); // or an array + MTRand(); // auto-initialize with /dev/urandom or time() and clock() + + // Do NOT use for CRYPTOGRAPHY without securely hashing several returned + // values together, otherwise the generator state can be learned after + // reading 624 consecutive values. + + // Access to 32-bit random numbers + double rand(); // real number in [0,1] + double rand( const double& n ); // real number in [0,n] + double randExc(); // real number in [0,1) + double randExc( const double& n ); // real number in [0,n) + double randDblExc(); // real number in (0,1) + double randDblExc( const double& n ); // real number in (0,n) + uint32 randInt(); // integer in [0,2^32-1] + uint32 randInt( const uint32& n ); // integer in [0,n] for n < 2^32 + double operator()() { return rand(); } // same as rand() + + // Access to 53-bit random numbers (capacity of IEEE double precision) + double rand53(); // real number in [0,1) + + // Access to nonuniform random number distributions + double randNorm( const double& mean = 0.0, const double& variance = 1.0 ); + + // Re-seeding functions with same behavior as initializers + void seed( const uint32 oneSeed ); + void seed( uint32 *const bigSeed, const uint32 seedLength = N ); + void seed(); + + // Saving and loading generator state + void save( uint32* saveArray ) const; // to array of size SAVE + void load( uint32 *const loadArray ); // from such array + friend std::ostream& operator<<( std::ostream& os, const MTRand& mtrand ); + friend std::istream& operator>>( std::istream& is, MTRand& mtrand ); + +protected: + void initialize( const uint32 oneSeed ); + void reload(); + uint32 hiBit( const uint32& u ) const { return u & 0x80000000UL; } + uint32 loBit( const uint32& u ) const { return u & 0x00000001UL; } + uint32 loBits( const uint32& u ) const { return u & 0x7fffffffUL; } + uint32 mixBits( const uint32& u, const uint32& v ) const + { return hiBit(u) | loBits(v); } + uint32 twist( const uint32& m, const uint32& s0, const uint32& s1 ) const + { return m ^ (mixBits(s0,s1)>>1) ^ (-loBit(s1) & 0x9908b0dfUL); } + static uint32 hash( time_t t, clock_t c ); +}; + + +inline MTRand::MTRand( const uint32& oneSeed ) + { seed(oneSeed); } + +inline MTRand::MTRand( uint32 *const bigSeed, const uint32 seedLength ) + { seed(bigSeed,seedLength); } + +inline MTRand::MTRand() + { seed(); } + +inline double MTRand::rand() + { return double(randInt()) * (1.0/4294967295.0); } + +inline double MTRand::rand( const double& n ) + { return rand() * n; } + +inline double MTRand::randExc() + { return double(randInt()) * (1.0/4294967296.0); } + +inline double MTRand::randExc( const double& n ) + { return randExc() * n; } + +inline double MTRand::randDblExc() + { return ( double(randInt()) + 0.5 ) * (1.0/4294967296.0); } + +inline double MTRand::randDblExc( const double& n ) + { return randDblExc() * n; } + +inline double MTRand::rand53() +{ + uint32 a = randInt() >> 5, b = randInt() >> 6; + return ( a * 67108864.0 + b ) * (1.0/9007199254740992.0); // by Isaku Wada +} + +inline double MTRand::randNorm( const double& mean, const double& variance ) +{ + // Return a real number from a normal (Gaussian) distribution with given + // mean and variance by Box-Muller method + double r = sqrt( -2.0 * log( 1.0-randDblExc()) ) * variance; + double phi = 2.0 * 3.14159265358979323846264338328 * randExc(); + return mean + r * cos(phi); +} + +inline MTRand::uint32 MTRand::randInt() +{ + // Pull a 32-bit integer from the generator state + // Every other access function simply transforms the numbers extracted here + + if( left == 0 ) reload(); + --left; + + register uint32 s1; + s1 = *pNext++; + s1 ^= (s1 >> 11); + s1 ^= (s1 << 7) & 0x9d2c5680UL; + s1 ^= (s1 << 15) & 0xefc60000UL; + return ( s1 ^ (s1 >> 18) ); +} + +inline MTRand::uint32 MTRand::randInt( const uint32& n ) +{ + // Find which bits are used in n + // Optimized by Magnus Jonsson (magnus@smartelectronix.com) + uint32 used = n; + used |= used >> 1; + used |= used >> 2; + used |= used >> 4; + used |= used >> 8; + used |= used >> 16; + + // Draw numbers until one is found in [0,n] + uint32 i; + do + i = randInt() & used; // toss unused bits to shorten search + while( i > n ); + return i; +} + + +inline void MTRand::seed( const uint32 oneSeed ) +{ + // Seed the generator with a simple uint32 + initialize(oneSeed); + reload(); +} + + +inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength ) +{ + // Seed the generator with an array of uint32's + // There are 2^19937-1 possible initial states. This function allows + // all of those to be accessed by providing at least 19937 bits (with a + // default seed length of N = 624 uint32's). Any bits above the lower 32 + // in each element are discarded. + // Just call seed() if you want to get array from /dev/urandom + initialize(19650218UL); + register int i = 1; + register uint32 j = 0; + register int k = ( N > seedLength ? N : seedLength ); + for( ; k; --k ) + { + state[i] = + state[i] ^ ( (state[i-1] ^ (state[i-1] >> 30)) * 1664525UL ); + state[i] += ( bigSeed[j] & 0xffffffffUL ) + j; + state[i] &= 0xffffffffUL; + ++i; ++j; + if( i >= N ) { state[0] = state[N-1]; i = 1; } + if( j >= seedLength ) j = 0; + } + for( k = N - 1; k; --k ) + { + state[i] = + state[i] ^ ( (state[i-1] ^ (state[i-1] >> 30)) * 1566083941UL ); + state[i] -= i; + state[i] &= 0xffffffffUL; + ++i; + if( i >= N ) { state[0] = state[N-1]; i = 1; } + } + state[0] = 0x80000000UL; // MSB is 1, assuring non-zero initial array + reload(); +} + + +inline void MTRand::seed() +{ + // seed deterministically to produce reproducible runs + seed(123456); + + /* + // Seed the generator with an array from /dev/urandom if available + // Otherwise use a hash of time() and clock() values + + // First try getting an array from /dev/urandom + FILE* urandom = fopen( "/dev/urandom", "rb" ); + if( urandom ) + { + uint32 bigSeed[N]; + register uint32 *s = bigSeed; + register int i = N; + register bool success = true; + while( success && i-- ) + success = fread( s++, sizeof(uint32), 1, urandom ); + fclose(urandom); + if( success ) { seed( bigSeed, N ); return; } + } + + // Was not successful, so use time() and clock() instead + seed( hash( time(NULL), clock() ) ); + */ +} + + +inline void MTRand::initialize( const uint32 seed ) +{ + // Initialize generator state with seed + // See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier. + // In previous versions, most significant bits (MSBs) of the seed affect + // only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto. + register uint32 *s = state; + register uint32 *r = state; + register int i = 1; + *s++ = seed & 0xffffffffUL; + for( ; i < N; ++i ) + { + *s++ = ( 1812433253UL * ( *r ^ (*r >> 30) ) + i ) & 0xffffffffUL; + r++; + } +} + + +inline void MTRand::reload() +{ + // Generate N new values in state + // Made clearer and faster by Matthew Bellew (matthew.bellew@home.com) + register uint32 *p = state; + register int i; + for( i = N - M; i--; ++p ) + *p = twist( p[M], p[0], p[1] ); + for( i = M; --i; ++p ) + *p = twist( p[M-N], p[0], p[1] ); + *p = twist( p[M-N], p[0], state[0] ); + + left = N, pNext = state; +} + + +inline MTRand::uint32 MTRand::hash( time_t t, clock_t c ) +{ + // Get a uint32 from t and c + // Better than uint32(x) in case x is floating point in [0,1] + // Based on code by Lawrence Kirby (fred@genesis.demon.co.uk) + + static uint32 differ = 0; // guarantee time-based seeds will change + + uint32 h1 = 0; + unsigned char *p = (unsigned char *) &t; + for( size_t i = 0; i < sizeof(t); ++i ) + { + h1 *= UCHAR_MAX + 2U; + h1 += p[i]; + } + uint32 h2 = 0; + p = (unsigned char *) &c; + for( size_t j = 0; j < sizeof(c); ++j ) + { + h2 *= UCHAR_MAX + 2U; + h2 += p[j]; + } + return ( h1 + differ++ ) ^ h2; +} + + +inline void MTRand::save( uint32* saveArray ) const +{ + register uint32 *sa = saveArray; + register const uint32 *s = state; + register int i = N; + for( ; i--; *sa++ = *s++ ) {} + *sa = left; +} + + +inline void MTRand::load( uint32 *const loadArray ) +{ + register uint32 *s = state; + register uint32 *la = loadArray; + register int i = N; + for( ; i--; *s++ = *la++ ) {} + left = *la; + pNext = &state[N-left]; +} + + +inline std::ostream& operator<<( std::ostream& os, const MTRand& mtrand ) +{ + register const MTRand::uint32 *s = mtrand.state; + register int i = mtrand.N; + for( ; i--; os << *s++ << "\t" ) {} + return os << mtrand.left; +} + + +inline std::istream& operator>>( std::istream& is, MTRand& mtrand ) +{ + register MTRand::uint32 *s = mtrand.state; + register int i = mtrand.N; + for( ; i--; is >> *s++ ) {} + is >> mtrand.left; + mtrand.pNext = &mtrand.state[mtrand.N-mtrand.left]; + return is; +} + +#endif // MERSENNETWISTER_H + +// Change log: +// +// v0.1 - First release on 15 May 2000 +// - Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus +// - Translated from C to C++ +// - Made completely ANSI compliant +// - Designed convenient interface for initialization, seeding, and +// obtaining numbers in default or user-defined ranges +// - Added automatic seeding from /dev/urandom or time() and clock() +// - Provided functions for saving and loading generator state +// +// v0.2 - Fixed bug which reloaded generator one step too late +// +// v0.3 - Switched to clearer, faster reload() code from Matthew Bellew +// +// v0.4 - Removed trailing newline in saved generator format to be consistent +// with output format of built-in types +// +// v0.5 - Improved portability by replacing static const int's with enum's and +// clarifying return values in seed(); suggested by Eric Heimburg +// - Removed MAXINT constant; use 0xffffffffUL instead +// +// v0.6 - Eliminated seed overflow when uint32 is larger than 32 bits +// - Changed integer [0,n] generator to give better uniformity +// +// v0.7 - Fixed operator precedence ambiguity in reload() +// - Added access for real numbers in (0,1) and (0,n) +// +// v0.8 - Included time.h header to properly support time_t and clock_t +// +// v1.0 - Revised seeding to match 26 Jan 2002 update of Nishimura and Matsumoto +// - Allowed for seeding with arrays of any length +// - Added access for real numbers in [0,1) with 53-bit resolution +// - Added access for real numbers from normal (Gaussian) distributions +// - Increased overall speed by optimizing twist() +// - Doubled speed of integer [0,n] generation +// - Fixed out-of-range number generation on 64-bit machines +// - Improved portability by substituting literal constants for long enum's +// - Changed license from GNU LGPL to BSD + diff --git a/intern/smoke/intern/Makefile b/intern/smoke/intern/Makefile new file mode 100644 index 00000000000..2cdd7d3853e --- /dev/null +++ b/intern/smoke/intern/Makefile @@ -0,0 +1,52 @@ +# +# $Id$ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# smoke intern Makefile +# + +LIBNAME = smoke +DIR = $(OCGDIR)/intern/$(LIBNAME) + +include nan_compile.mk + +unexport NAN_QUIET + +CCFLAGS += $(LEVEL_2_CPP_WARNINGS) + +ifeq ($(WITH_BF_OPENMP),true) + CPPFLAGS += -DPARALLEL +endif + +CPPFLAGS += -I. +CPPFLAGS += -I../extern +CPPFLAGS += -I$(NAN_PNG)/include +CPPFLAGS += -I$(NAN_PNG)/include/libpng + +# zlib +ifeq ($(OS),$(findstring $(OS), "solaris windows")) + CPPFLAGS += -I$(NAN_ZLIB)/include +endif diff --git a/intern/smoke/intern/Makefile.FFT b/intern/smoke/intern/Makefile.FFT new file mode 100644 index 00000000000..e45af1df29b --- /dev/null +++ b/intern/smoke/intern/Makefile.FFT @@ -0,0 +1,22 @@ +# common stuff +LDFLAGS_COMMON = -lfftw3 #-lglut -lglu32 -lopengl32 -lz -lpng +CFLAGS_COMMON = -c -Wall -I./ #-I/cygdrive/c/lib/glvu/include -D_WIN32 + +CC = g++ +CFLAGS = ${CFLAGS_COMMON} -O3 -Wno-unused +LDFLAGS = ${LDFLAGS_COMMON} +EXECUTABLE = noiseFFT + +SOURCES = noiseFFT.cpp +OBJECTS = $(SOURCES:.cpp=.o) + +all: $(SOURCES) $(EXECUTABLE) + +$(EXECUTABLE): $(OBJECTS) + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +.cpp.o: + $(CC) $(CFLAGS) $< -o $@ + +clean: + rm -f *.o $(EXECUTABLE_LOADER) $(EXECUTABLE) diff --git a/intern/smoke/intern/Makefile.cygwin b/intern/smoke/intern/Makefile.cygwin new file mode 100644 index 00000000000..c93753a67fe --- /dev/null +++ b/intern/smoke/intern/Makefile.cygwin @@ -0,0 +1,23 @@ +CC = g++ +LDFLAGS = -lz -lpng +CFLAGS = -O3 -Wno-unused -c -Wall -I./ -D_WIN32 +EXECUTABLE = FLUID_3D + +SOURCES = main.cpp FLUID_3D.cpp FLUID_3D_SOLVERS.cpp FLUID_3D_STATIC.cpp SPHERE.cpp WTURBULENCE.cpp +OBJECTS = $(SOURCES:.cpp=.o) + +all: $(SOURCES) $(EXECUTABLE) + +$(EXECUTABLE): $(OBJECTS) + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +.cpp.o: + $(CC) $(CFLAGS) $< -o $@ + +SPHERE.o: SPHERE.h +FLUID_3D.o: FLUID_3D.h FLUID_3D.cpp +FLUID_3D_SOLVERS.o: FLUID_3D.h FLUID_3D_SOLVERS.cpp +main.o: FLUID_3D.h FLUID_3D.cpp FLUID_3D_SOLVERS.cpp + +clean: + rm -f *.o $(EXECUTABLE_LOADER) $(EXECUTABLE) diff --git a/intern/smoke/intern/Makefile.linux b/intern/smoke/intern/Makefile.linux new file mode 100644 index 00000000000..8e71af465dd --- /dev/null +++ b/intern/smoke/intern/Makefile.linux @@ -0,0 +1,23 @@ +CC = g++ +LDFLAGS = -lz -lpng -fopenmp -lgomp +CFLAGS = -c -Wall -I./ -fopenmp -DPARALLEL=1 -O3 -Wno-unused +EXECUTABLE = FLUID_3D + +SOURCES = main.cpp FLUID_3D.cpp FLUID_3D_SOLVERS.cpp FLUID_3D_STATIC.cpp SPHERE.cpp WTURBULENCE.cpp +OBJECTS = $(SOURCES:.cpp=.o) + +all: $(SOURCES) $(EXECUTABLE) + +$(EXECUTABLE): $(OBJECTS) + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +.cpp.o: + $(CC) $(CFLAGS) $< -o $@ + +SPHERE.o: SPHERE.h +FLUID_3D.o: FLUID_3D.h FLUID_3D.cpp +FLUID_3D_SOLVERS.o: FLUID_3D.h FLUID_3D_SOLVERS.cpp +main.o: FLUID_3D.h FLUID_3D.cpp FLUID_3D_SOLVERS.cpp + +clean: + rm -f *.o $(EXECUTABLE_LOADER) $(EXECUTABLE) diff --git a/intern/smoke/intern/Makefile.mac b/intern/smoke/intern/Makefile.mac new file mode 100644 index 00000000000..227aaa10a16 --- /dev/null +++ b/intern/smoke/intern/Makefile.mac @@ -0,0 +1,35 @@ +CC = g++ + +# uncomment the other two OPENMP_... lines, if your gcc supports OpenMP +#OPENMP_FLAGS = -fopenmp -DPARALLEL=1 -I/opt/gcc-4.3/usr/local/include +#OPENMPLD_FLAGS = -fopenmp -lgomp -I/opt/gcc-4.3/usr/local/lib +OPENMP_FLAGS = +OPENMPLD_FLAGS = + +# assumes MacPorts libpng installation +PNG_INCLUDE = -I/opt/local/include +PNG_LIBS = -I/opt/local/lib + +LDFLAGS = $(PNG_LIBS)-lz -lpng $(OPENMPLD_FLAGS) +CFLAGS = -c -Wall -I./ $(PNG_INCLUDE) $(OPENMP_FLAGS) -O3 -Wno-unused +EXECUTABLE = FLUID_3D + +SOURCES = main.cpp FLUID_3D.cpp FLUID_3D_SOLVERS.cpp FLUID_3D_STATIC.cpp SPHERE.cpp WTURBULENCE.cpp +OBJECTS = $(SOURCES:.cpp=.o) + +all: $(SOURCES) $(EXECUTABLE) + +$(EXECUTABLE): $(OBJECTS) + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +.cpp.o: + $(CC) $(CFLAGS) $< -o $@ + +SPHERE.o: SPHERE.h +FLUID_3D.o: FLUID_3D.h FLUID_3D.cpp +FLUID_3D_SOLVERS.o: FLUID_3D.h FLUID_3D_SOLVERS.cpp +main.o: FLUID_3D.h FLUID_3D.cpp FLUID_3D_SOLVERS.cpp + +clean: + rm -f *.o $(EXECUTABLE_LOADER) $(EXECUTABLE) + diff --git a/intern/smoke/intern/OBSTACLE.h b/intern/smoke/intern/OBSTACLE.h new file mode 100644 index 00000000000..54e824d275d --- /dev/null +++ b/intern/smoke/intern/OBSTACLE.h @@ -0,0 +1,41 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// OBSTACLE.h: interface for the OBSTACLE class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef OBSTACLE_H +#define OBSTACLE_H + +enum OBSTACLE_FLAGS { + EMPTY = 0, + MARCHED = 2, + RETIRED = 4 +}; + +class OBSTACLE +{ +public: + OBSTACLE() {}; + virtual ~OBSTACLE() {}; + + virtual bool inside(float x, float y, float z) = 0; +}; + +#endif diff --git a/intern/smoke/intern/SPHERE.cpp b/intern/smoke/intern/SPHERE.cpp new file mode 100644 index 00000000000..4bb18fb81c0 --- /dev/null +++ b/intern/smoke/intern/SPHERE.cpp @@ -0,0 +1,50 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// SPHERE.cpp: implementation of the SPHERE class. +// +////////////////////////////////////////////////////////////////////// + +#include "SPHERE.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +SPHERE::SPHERE(float x, float y, float z, float radius) : + _radius(radius) +{ + _center[0] = x; + _center[1] = y; + _center[2] = z; +} + +SPHERE::~SPHERE() +{ + +} + +bool SPHERE::inside(float x, float y, float z) +{ + float translate[] = {x - _center[0], y - _center[1], z - _center[2]}; + float magnitude = translate[0] * translate[0] + + translate[1] * translate[1] + + translate[2] * translate[2]; + + return (magnitude < _radius * _radius) ? true : false; +} diff --git a/intern/smoke/intern/SPHERE.h b/intern/smoke/intern/SPHERE.h new file mode 100644 index 00000000000..13bd6e9493c --- /dev/null +++ b/intern/smoke/intern/SPHERE.h @@ -0,0 +1,41 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// SPHERE.h: interface for the SPHERE class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef SPHERE_H +#define SPHERE_H + +#include "OBSTACLE.h" + +class SPHERE : public OBSTACLE +{ +public: + SPHERE(float x, float y, float z, float radius); + virtual ~SPHERE(); + + bool inside(float x, float y, float z); + +private: + float _center[3]; + float _radius; +}; + +#endif diff --git a/intern/smoke/intern/VEC3.h b/intern/smoke/intern/VEC3.h new file mode 100644 index 00000000000..98c4555ac5f --- /dev/null +++ b/intern/smoke/intern/VEC3.h @@ -0,0 +1,986 @@ +/****************************************************************************** + * Copyright 2007 Nils Thuerey + * Basic vector class + *****************************************************************************/ +#ifndef BASICVECTOR_H +#define BASICVECTOR_H + +#include +#include +#include +#include +#include + +// use which fp-precision? 1=float, 2=double +#ifndef FLOATINGPOINT_PRECISION +#if DDF_DEBUG==1 +#define FLOATINGPOINT_PRECISION 2 +#else // DDF_DEBUG==1 +#define FLOATINGPOINT_PRECISION 1 +#endif // DDF_DEBUG==1 +#endif + +// VECTOR_EPSILON is the minimal vector length +// In order to be able to discriminate floating point values near zero, and +// to be sure not to fail a comparison because of roundoff errors, use this +// value as a threshold. + +#if FLOATINGPOINT_PRECISION==1 +typedef float Real; +#define FP_REAL_MAX __FLT_MAX__ +#define VECTOR_EPSILON (1e-5f) +#else +typedef double Real; +#define FP_REAL_MAX __DBL_MAX__ +#define VECTOR_EPSILON (1e-10) +#endif + + +// hardcoded limits for now... +// for e.g. MSVC compiler... +// some of these defines can be needed +// for linux systems as well (e.g. FLT_MAX) +#ifndef __FLT_MAX__ +# ifdef FLT_MAX // try to use it instead +# define __FLT_MAX__ FLT_MAX +# else // FLT_MAX +# define __FLT_MAX__ 3.402823466e+38f +# endif // FLT_MAX +#endif // __FLT_MAX__ +#ifndef __DBL_MAX__ +# ifdef DBL_MAX // try to use it instead +# define __DBL_MAX__ DBL_MAX +# else // DBL_MAX +# define __DBL_MAX__ 1.7976931348623158e+308 +# endif // DBL_MAX +#endif // __DBL_MAX__ + +#ifndef FLT_MAX +#define FLT_MAX __FLT_MAX__ +#endif + +#ifndef DBL_MAX +#define DBL_MAX __DBL_MAX__ +#endif + +#ifndef M_PI +# define M_PI 3.1415926536 +# define M_E 2.7182818284 +#endif + + + +namespace BasicVector { + + +// basic inlined vector class +template +class Vector3Dim +{ +public: + // Constructor + inline Vector3Dim(); + // Copy-Constructor + inline Vector3Dim(const Vector3Dim &v ); + inline Vector3Dim(const float *); + inline Vector3Dim(const double *); + // construct a vector from one Scalar + inline Vector3Dim(Scalar); + // construct a vector from three Scalars + inline Vector3Dim(Scalar, Scalar, Scalar); + + // get address of array for OpenGL + Scalar *getAddress() { return value; } + + // Assignment operator + inline const Vector3Dim& operator= (const Vector3Dim& v); + // Assignment operator + inline const Vector3Dim& operator= (Scalar s); + // Assign and add operator + inline const Vector3Dim& operator+= (const Vector3Dim& v); + // Assign and add operator + inline const Vector3Dim& operator+= (Scalar s); + // Assign and sub operator + inline const Vector3Dim& operator-= (const Vector3Dim& v); + // Assign and sub operator + inline const Vector3Dim& operator-= (Scalar s); + // Assign and mult operator + inline const Vector3Dim& operator*= (const Vector3Dim& v); + // Assign and mult operator + inline const Vector3Dim& operator*= (Scalar s); + // Assign and div operator + inline const Vector3Dim& operator/= (const Vector3Dim& v); + // Assign and div operator + inline const Vector3Dim& operator/= (Scalar s); + + + // unary operator + inline Vector3Dim operator- () const; + + // binary operator add + inline Vector3Dim operator+ (const Vector3Dim&) const; + // binary operator add + inline Vector3Dim operator+ (Scalar) const; + // binary operator sub + inline Vector3Dim operator- (const Vector3Dim&) const; + // binary operator sub + inline Vector3Dim operator- (Scalar) const; + // binary operator mult + inline Vector3Dim operator* (const Vector3Dim&) const; + // binary operator mult + inline Vector3Dim operator* (Scalar) const; + // binary operator div + inline Vector3Dim operator/ (const Vector3Dim&) const; + // binary operator div + inline Vector3Dim operator/ (Scalar) const; + + // Projection normal to a vector + inline Vector3Dim getOrthogonalntlVector3Dim() const; + // Project into a plane + inline const Vector3Dim& projectNormalTo(const Vector3Dim &v); + + // minimize + inline const Vector3Dim &minimize(const Vector3Dim &); + // maximize + inline const Vector3Dim &maximize(const Vector3Dim &); + + // access operator + inline Scalar& operator[](unsigned int i); + // access operator + inline const Scalar& operator[](unsigned int i) const; + + //! actual values + union { + struct { + Scalar value[3]; + }; + struct { + Scalar x; + Scalar y; + Scalar z; + }; + struct { + Scalar X; + Scalar Y; + Scalar Z; + }; + }; +protected: + +}; + + + + + +//------------------------------------------------------------------------------ +// VECTOR inline FUNCTIONS +//------------------------------------------------------------------------------ + + + +/************************************************************************* + Constructor. + */ +template +inline Vector3Dim::Vector3Dim( void ) +{ + value[0] = value[1] = value[2] = 0; +} + + + +/************************************************************************* + Copy-Constructor. + */ +template +inline Vector3Dim::Vector3Dim( const Vector3Dim &v ) +{ + value[0] = v.value[0]; + value[1] = v.value[1]; + value[2] = v.value[2]; +} +template +inline Vector3Dim::Vector3Dim( const float *fvalue) +{ + value[0] = (Scalar)fvalue[0]; + value[1] = (Scalar)fvalue[1]; + value[2] = (Scalar)fvalue[2]; +} +template +inline Vector3Dim::Vector3Dim( const double *fvalue) +{ + value[0] = (Scalar)fvalue[0]; + value[1] = (Scalar)fvalue[1]; + value[2] = (Scalar)fvalue[2]; +} + + + +/************************************************************************* + Constructor for a vector from a single Scalar. All components of + the vector get the same value. + \param s The value to set + \return The new vector + */ +template +inline Vector3Dim::Vector3Dim(Scalar s ) +{ + value[0]= s; + value[1]= s; + value[2]= s; +} + + +/************************************************************************* + Constructor for a vector from three Scalars. + \param s1 The value for the first vector component + \param s2 The value for the second vector component + \param s3 The value for the third vector component + \return The new vector + */ +template +inline Vector3Dim::Vector3Dim(Scalar s1, Scalar s2, Scalar s3) +{ + value[0]= s1; + value[1]= s2; + value[2]= s3; +} + + + +/************************************************************************* + Copy a Vector3Dim componentwise. + \param v vector with values to be copied + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator=( const Vector3Dim &v ) +{ + value[0] = v.value[0]; + value[1] = v.value[1]; + value[2] = v.value[2]; + return *this; +} + + +/************************************************************************* + Copy a Scalar to each component. + \param s The value to copy + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator=(Scalar s) +{ + value[0] = s; + value[1] = s; + value[2] = s; + return *this; +} + + +/************************************************************************* + Add another Vector3Dim componentwise. + \param v vector with values to be added + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator+=( const Vector3Dim &v ) +{ + value[0] += v.value[0]; + value[1] += v.value[1]; + value[2] += v.value[2]; + return *this; +} + + +/************************************************************************* + Add a Scalar value to each component. + \param s Value to add + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator+=(Scalar s) +{ + value[0] += s; + value[1] += s; + value[2] += s; + return *this; +} + + +/************************************************************************* + Subtract another vector componentwise. + \param v vector of values to subtract + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator-=( const Vector3Dim &v ) +{ + value[0] -= v.value[0]; + value[1] -= v.value[1]; + value[2] -= v.value[2]; + return *this; +} + + +/************************************************************************* + Subtract a Scalar value from each component. + \param s Value to subtract + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator-=(Scalar s) +{ + value[0]-= s; + value[1]-= s; + value[2]-= s; + return *this; +} + + +/************************************************************************* + Multiply with another vector componentwise. + \param v vector of values to multiply with + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator*=( const Vector3Dim &v ) +{ + value[0] *= v.value[0]; + value[1] *= v.value[1]; + value[2] *= v.value[2]; + return *this; +} + + +/************************************************************************* + Multiply each component with a Scalar value. + \param s Value to multiply with + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator*=(Scalar s) +{ + value[0] *= s; + value[1] *= s; + value[2] *= s; + return *this; +} + + +/************************************************************************* + Divide by another Vector3Dim componentwise. + \param v vector of values to divide by + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator/=( const Vector3Dim &v ) +{ + value[0] /= v.value[0]; + value[1] /= v.value[1]; + value[2] /= v.value[2]; + return *this; +} + + +/************************************************************************* + Divide each component by a Scalar value. + \param s Value to divide by + \return Reference to self + */ +template +inline const Vector3Dim& +Vector3Dim::operator/=(Scalar s) +{ + value[0] /= s; + value[1] /= s; + value[2] /= s; + return *this; +} + + +//------------------------------------------------------------------------------ +// unary operators +//------------------------------------------------------------------------------ + + +/************************************************************************* + Build componentwise the negative this vector. + \return The new (negative) vector + */ +template +inline Vector3Dim +Vector3Dim::operator-() const +{ + return Vector3Dim(-value[0], -value[1], -value[2]); +} + + + +//------------------------------------------------------------------------------ +// binary operators +//------------------------------------------------------------------------------ + + +/************************************************************************* + Build a vector with another vector added componentwise. + \param v The second vector to add + \return The sum vector + */ +template +inline Vector3Dim +Vector3Dim::operator+( const Vector3Dim &v ) const +{ + return Vector3Dim(value[0]+v.value[0], + value[1]+v.value[1], + value[2]+v.value[2]); +} + + +/************************************************************************* + Build a vector with a Scalar value added to each component. + \param s The Scalar value to add + \return The sum vector + */ +template +inline Vector3Dim +Vector3Dim::operator+(Scalar s) const +{ + return Vector3Dim(value[0]+s, + value[1]+s, + value[2]+s); +} + + +/************************************************************************* + Build a vector with another vector subtracted componentwise. + \param v The second vector to subtract + \return The difference vector + */ +template +inline Vector3Dim +Vector3Dim::operator-( const Vector3Dim &v ) const +{ + return Vector3Dim(value[0]-v.value[0], + value[1]-v.value[1], + value[2]-v.value[2]); +} + + +/************************************************************************* + Build a vector with a Scalar value subtracted componentwise. + \param s The Scalar value to subtract + \return The difference vector + */ +template +inline Vector3Dim +Vector3Dim::operator-(Scalar s ) const +{ + return Vector3Dim(value[0]-s, + value[1]-s, + value[2]-s); +} + + + +/************************************************************************* + Build a vector with another vector multiplied by componentwise. + \param v The second vector to muliply with + \return The product vector + */ +template +inline Vector3Dim +Vector3Dim::operator*( const Vector3Dim& v) const +{ + return Vector3Dim(value[0]*v.value[0], + value[1]*v.value[1], + value[2]*v.value[2]); +} + + +/************************************************************************* + Build a Vector3Dim with a Scalar value multiplied to each component. + \param s The Scalar value to multiply with + \return The product vector + */ +template +inline Vector3Dim +Vector3Dim::operator*(Scalar s) const +{ + return Vector3Dim(value[0]*s, value[1]*s, value[2]*s); +} + + +/************************************************************************* + Build a vector divided componentwise by another vector. + \param v The second vector to divide by + \return The ratio vector + */ +template +inline Vector3Dim +Vector3Dim::operator/(const Vector3Dim& v) const +{ + return Vector3Dim(value[0]/v.value[0], + value[1]/v.value[1], + value[2]/v.value[2]); +} + + + +/************************************************************************* + Build a vector divided componentwise by a Scalar value. + \param s The Scalar value to divide by + \return The ratio vector + */ +template +inline Vector3Dim +Vector3Dim::operator/(Scalar s) const +{ + return Vector3Dim(value[0]/s, + value[1]/s, + value[2]/s); +} + + + + + +/************************************************************************* + Get a particular component of the vector. + \param i Number of Scalar to get + \return Reference to the component + */ +template +inline Scalar& +Vector3Dim::operator[]( unsigned int i ) +{ + return value[i]; +} + + +/************************************************************************* + Get a particular component of a constant vector. + \param i Number of Scalar to get + \return Reference to the component + */ +template +inline const Scalar& +Vector3Dim::operator[]( unsigned int i ) const +{ + return value[i]; +} + + + +//------------------------------------------------------------------------------ +// BLITZ compatibility functions +//------------------------------------------------------------------------------ + + + +/************************************************************************* + Compute the scalar product with another vector. + \param v The second vector to work with + \return The value of the scalar product + */ +template +inline Scalar dot(const Vector3Dim &t, const Vector3Dim &v ) +{ + //return t.value[0]*v.value[0] + t.value[1]*v.value[1] + t.value[2]*v.value[2]; + return ((t[0]*v[0]) + (t[1]*v[1]) + (t[2]*v[2])); +} + + +/************************************************************************* + Calculate the cross product of this and another vector + */ +template +inline Vector3Dim cross(const Vector3Dim &t, const Vector3Dim &v) +{ + Vector3Dim cp( + ((t[1]*v[2]) - (t[2]*v[1])), + ((t[2]*v[0]) - (t[0]*v[2])), + ((t[0]*v[1]) - (t[1]*v[0])) ); + return cp; +} + + + + +/************************************************************************* + Compute a vector that is orthonormal to self. Nothing else can be assumed + for the direction of the new vector. + \return The orthonormal vector + */ +template +Vector3Dim +Vector3Dim::getOrthogonalntlVector3Dim() const +{ + // Determine the component with max. absolute value + int max= (fabs(value[0]) > fabs(value[1])) ? 0 : 1; + max= (fabs(value[max]) > fabs(value[2])) ? max : 2; + + /************************************************************************* + Choose another axis than the one with max. component and project + orthogonal to self + */ + Vector3Dim vec(0.0); + vec[(max+1)%3]= 1; + vec.normalize(); + vec.projectNormalTo(this->getNormalized()); + return vec; +} + + +/************************************************************************* + Projects the vector into a plane normal to the given vector, which must + have unit length. Self is modified. + \param v The plane normal + \return The projected vector + */ +template +inline const Vector3Dim& +Vector3Dim::projectNormalTo(const Vector3Dim &v) +{ + Scalar sprod = dot(*this,v); + value[0]= value[0] - v.value[0] * sprod; + value[1]= value[1] - v.value[1] * sprod; + value[2]= value[2] - v.value[2] * sprod; + return *this; +} + + + +//------------------------------------------------------------------------------ +// Other helper functions +//------------------------------------------------------------------------------ + + + +/************************************************************************* + Minimize the vector, i.e. set each entry of the vector to the minimum + of both values. + \param pnt The second vector to compare with + \return Reference to the modified self + */ +template +inline const Vector3Dim & +Vector3Dim::minimize(const Vector3Dim &pnt) +{ + for (unsigned int i = 0; i < 3; i++) + value[i] = MIN(value[i],pnt[i]); + return *this; +} + + + +/************************************************************************* + Maximize the vector, i.e. set each entry of the vector to the maximum + of both values. + \param pnt The second vector to compare with + \return Reference to the modified self + */ +template +inline const Vector3Dim & +Vector3Dim::maximize(const Vector3Dim &pnt) +{ + for (unsigned int i = 0; i < 3; i++) + value[i] = MAX(value[i],pnt[i]); + return *this; +} + + + + + + +/************************************************************************/ +// HELPER FUNCTIONS, independent of implementation +/************************************************************************/ + +#define VECTOR_TYPE Vector3Dim + + +/************************************************************************* + Compute the length (norm) of the vector. + \return The value of the norm + */ +template +inline Scalar norm( const VECTOR_TYPE &v) +{ + Scalar l = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; + return (fabs(l-1.) < VECTOR_EPSILON*VECTOR_EPSILON) ? 1. : sqrt(l); +} + +// for e.g. min max operator +inline Real normHelper(const Vector3Dim &v) { + return norm(v); +} +inline Real normHelper(const Real &v) { + return (0. < v) ? v : -v ; +} +inline Real normHelper(const int &v) { + return (0 < v) ? (Real)(v) : (Real)(-v) ; +} + + +/************************************************************************* + Same as getNorm but doesnt sqrt + */ +template +inline Scalar normNoSqrt( const VECTOR_TYPE &v) +{ + return v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; +} + + +/************************************************************************* + Compute a normalized vector based on this vector. + \return The new normalized vector + */ +template +inline VECTOR_TYPE getNormalized( const VECTOR_TYPE &v) +{ + Scalar l = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; + if (fabs(l-1.) < VECTOR_EPSILON*VECTOR_EPSILON) + return v; /* normalized "enough"... */ + else if (l > VECTOR_EPSILON*VECTOR_EPSILON) + { + Scalar fac = 1./sqrt(l); + return VECTOR_TYPE(v[0]*fac, v[1]*fac, v[2]*fac); + } + else + return VECTOR_TYPE((Scalar)0); +} + + +/************************************************************************* + Compute the norm of the vector and normalize it. + \return The value of the norm + */ +template +inline Scalar normalize( VECTOR_TYPE &v) +{ + Scalar norm; + Scalar l = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; + if (fabs(l-1.) < VECTOR_EPSILON*VECTOR_EPSILON) { + norm = 1.; + } else if (l > VECTOR_EPSILON*VECTOR_EPSILON) { + norm = sqrt(l); + Scalar fac = 1./norm; + v[0] *= fac; + v[1] *= fac; + v[2] *= fac; + } else { + v[0]= v[1]= v[2]= 0; + norm = 0.; + } + return (Scalar)norm; +} + + +/************************************************************************* + Compute a vector, that is self (as an incoming + vector) reflected at a surface with a distinct normal vector. Note + that the normal is reversed, if the scalar product with it is positive. + \param n The surface normal + \return The new reflected vector + */ +template +inline VECTOR_TYPE reflectVector(const VECTOR_TYPE &t, const VECTOR_TYPE &n) +{ + VECTOR_TYPE nn= (dot(t, n) > 0.0) ? (n*-1.0) : n; + return ( t - nn * (2.0 * dot(nn, t)) ); +} + + + +/************************************************************************* + * My own refraction calculation + * Taken from Glassner's book, section 5.2 (Heckberts method) + */ +template +inline VECTOR_TYPE refractVector(const VECTOR_TYPE &t, const VECTOR_TYPE &normal, Scalar nt, Scalar nair, int &refRefl) +{ + Scalar eta = nair / nt; + Scalar n = -dot(t, normal); + Scalar tt = 1.0 + eta*eta* (n*n-1.0); + if(tt<0.0) { + // we have total reflection! + refRefl = 1; + } else { + // normal reflection + tt = eta*n - sqrt(tt); + return( t*eta + normal*tt ); + } + return t; +} + + +/************************************************************************* + Test two ntlVector3Dims for equality based on the equality of their + values within a small threshold. + \param c The second vector to compare + \return TRUE if both are equal + \sa getEpsilon() + */ +template +inline bool equal(const VECTOR_TYPE &v, const VECTOR_TYPE &c) +{ + return (ABS(v[0]-c[0]) + + ABS(v[1]-c[1]) + + ABS(v[2]-c[2]) < VECTOR_EPSILON); +} + + +/************************************************************************* + * Assume this vector is an RGB color, and convert it to HSV + */ +template +inline void rgbToHsv( VECTOR_TYPE &V ) +{ + Scalar h=0,s=0,v=0; + Scalar maxrgb, minrgb, delta; + // convert to hsv... + maxrgb = V[0]; + int maxindex = 1; + if(V[2] > maxrgb){ maxrgb = V[2]; maxindex = 2; } + if(V[1] > maxrgb){ maxrgb = V[1]; maxindex = 3; } + minrgb = V[0]; + if(V[2] < minrgb) minrgb = V[2]; + if(V[1] < minrgb) minrgb = V[1]; + + v = maxrgb; + delta = maxrgb-minrgb; + + if(maxrgb > 0) s = delta/maxrgb; + else s = 0; + + h = 0; + if(s > 0) { + if(maxindex == 1) { + h = ((V[1]-V[2])/delta) + 0.0; } + if(maxindex == 2) { + h = ((V[2]-V[0])/delta) + 2.0; } + if(maxindex == 3) { + h = ((V[0]-V[1])/delta) + 4.0; } + h *= 60.0; + if(h < 0.0) h += 360.0; + } + + V[0] = h; + V[1] = s; + V[2] = v; +} + +/************************************************************************* + * Assume this vector is HSV and convert to RGB + */ +template +inline void hsvToRgb( VECTOR_TYPE &V ) +{ + Scalar h = V[0], s = V[1], v = V[2]; + Scalar r=0,g=0,b=0; + Scalar p,q,t, fracth; + int floorh; + // ...and back to rgb + if(s == 0) { + r = g = b = v; } + else { + h /= 60.0; + floorh = (int)h; + fracth = h - floorh; + p = v * (1.0 - s); + q = v * (1.0 - (s * fracth)); + t = v * (1.0 - (s * (1.0 - fracth))); + switch (floorh) { + case 0: r = v; g = t; b = p; break; + case 1: r = q; g = v; b = p; break; + case 2: r = p; g = v; b = t; break; + case 3: r = p; g = q; b = v; break; + case 4: r = t; g = p; b = v; break; + case 5: r = v; g = p; b = q; break; + } + } + + V[0] = r; + V[1] = g; + V[2] = b; +} + +//------------------------------------------------------------------------------ +// STREAM FUNCTIONS +//------------------------------------------------------------------------------ + + + +//! global string for formatting vector output in utilities.cpp +//extern const char *globVecFormatStr; +#if 0 +static const char *globVecFormatStr = "[%6.4f,%6.4f,%6.4f]"; +#endif + +/************************************************************************* + Outputs the object in human readable form using the format + [x,y,z] + */ +template +std::ostream& +operator<<( std::ostream& os, const BasicVector::Vector3Dim& i ) +{ + char buf[256]; +#if 0 +#if _WIN32 + sprintf(buf,globVecFormatStr, (double)i[0],(double)i[1],(double)i[2]); +#else + snprintf(buf,256,globVecFormatStr, (double)i[0],(double)i[1],(double)i[2]); +#endif + os << std::string(buf); +#endif + return os; +} + + +/************************************************************************* + Reads the contents of the object from a stream using the same format + as the output operator. + */ +template +std::istream& +operator>>( std::istream& is, BasicVector::Vector3Dim& i ) +{ + char c; + char dummy[3]; + is >> c >> i[0] >> dummy >> i[1] >> dummy >> i[2] >> c; + return is; +} + + +/**************************************************************************/ +// typedefs! +/**************************************************************************/ + +/* get minimal vector length value that can be discriminated. */ +inline Real getVecEpsilon() { return (Real)VECTOR_EPSILON; } + +// a 3D integer vector +typedef Vector3Dim Vec3Int; + +// a 3D vector +typedef Vector3Dim Vec3; + + +}; // namespace + + +#endif /* BASICVECTOR_H */ diff --git a/intern/smoke/intern/WAVELET_NOISE.h b/intern/smoke/intern/WAVELET_NOISE.h new file mode 100644 index 00000000000..4c2e7514af7 --- /dev/null +++ b/intern/smoke/intern/WAVELET_NOISE.h @@ -0,0 +1,458 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +////////////////////////////////////////////////////////////////////////////////////////// +// Wavelet noise functions +// +// This code is based on the C code provided in the appendices of: +// +// @article{1073264, +// author = {Robert L. Cook and Tony DeRose}, +// title = {Wavelet noise}, +// journal = {ACM Trans. Graph.}, +// volume = {24}, +// number = {3}, +// year = {2005}, +// issn = {0730-0301}, +// pages = {803--811}, +// doi = {http://doi.acm.org/10.1145/1073204.1073264}, +// publisher = {ACM}, +// address = {New York, NY, USA}, +// } +// +////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef WAVELET_NOISE_H +#define WAVELET_NOISE_H + +#include + +#define NOISE_TILE_SIZE 128 +static const int noiseTileSize = NOISE_TILE_SIZE; + +// warning - noiseTileSize has to be 128^3! +#define modFast128(x) ((x) & 127) +#define modFast64(x) ((x) & 63) +#define DOWNCOEFFS 0.000334f,-0.001528f, 0.000410f, 0.003545f,-0.000938f,-0.008233f, 0.002172f, 0.019120f, \ + -0.005040f,-0.044412f, 0.011655f, 0.103311f,-0.025936f,-0.243780f, 0.033979f, 0.655340f, \ + 0.655340f, 0.033979f,-0.243780f,-0.025936f, 0.103311f, 0.011655f,-0.044412f,-0.005040f, \ + 0.019120f, 0.002172f,-0.008233f,-0.000938f, 0.003546f, 0.000410f,-0.001528f, 0.000334f + +////////////////////////////////////////////////////////////////////////////////////////// +// Wavelet downsampling -- periodic boundary conditions +////////////////////////////////////////////////////////////////////////////////////////// +static void downsampleX(float *from, float *to, int n){ + // if these values are not local incorrect results are generated + float downCoeffs[32] = { DOWNCOEFFS }; + const float *a = &downCoeffs[16]; + for (int i = 0; i < n / 2; i++) { + to[i] = 0; + for (int k = 2 * i - 16; k <= 2 * i + 16; k++) + to[i] += a[k - 2 * i] * from[modFast128(k)]; + } +} +static void downsampleY(float *from, float *to, int n){ + // if these values are not local incorrect results are generated + float downCoeffs[32] = { DOWNCOEFFS }; + const float *a = &downCoeffs[16]; + for (int i = 0; i < n / 2; i++) { + to[i * n] = 0; + for (int k = 2 * i - 16; k <= 2 * i + 16; k++) + to[i * n] += a[k - 2 * i] * from[modFast128(k) * n]; + } +} +static void downsampleZ(float *from, float *to, int n){ + // if these values are not local incorrect results are generated + float downCoeffs[32] = { DOWNCOEFFS }; + const float *a = &downCoeffs[16]; + for (int i = 0; i < n / 2; i++) { + to[i * n * n] = 0; + for (int k = 2 * i - 16; k <= 2 * i + 16; k++) + to[i * n * n] += a[k - 2 * i] * from[modFast128(k) * n * n]; + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +// Wavelet downsampling -- Neumann boundary conditions +////////////////////////////////////////////////////////////////////////////////////////// +static void downsampleNeumann(const float *from, float *to, int n, int stride) +{ + // if these values are not local incorrect results are generated + float downCoeffs[32] = { DOWNCOEFFS }; + static const float *const aCoCenter= &downCoeffs[16]; + for (int i = 0; i < n / 2; i++) { + to[i * stride] = 0; + for (int k = 2 * i - 16; k < 2 * i + 16; k++) { + // handle boundary + float fromval; + if (k < 0) { + fromval = from[0]; + } else if(k > n - 1) { + fromval = from[(n - 1) * stride]; + } else { + fromval = from[k * stride]; + } + to[i * stride] += aCoCenter[k - 2 * i] * fromval; + } + } +} +static void downsampleXNeumann(float* to, const float* from, int sx,int sy, int sz) { + for (int iy = 0; iy < sy; iy++) + for (int iz = 0; iz < sz; iz++) { + const int i = iy * sx + iz*sx*sy; + downsampleNeumann(&from[i], &to[i], sx, 1); + } +} +static void downsampleYNeumann(float* to, const float* from, int sx,int sy, int sz) { + for (int ix = 0; ix < sx; ix++) + for (int iz = 0; iz < sz; iz++) { + const int i = ix + iz*sx*sy; + downsampleNeumann(&from[i], &to[i], sy, sx); + } +} +static void downsampleZNeumann(float* to, const float* from, int sx,int sy, int sz) { + for (int ix = 0; ix < sx; ix++) + for (int iy = 0; iy < sy; iy++) { + const int i = ix + iy*sx; + downsampleNeumann(&from[i], &to[i], sz, sx*sy); + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +// Wavelet upsampling - periodic boundary conditions +////////////////////////////////////////////////////////////////////////////////////////// +static float _upCoeffs[4] = {0.25f, 0.75f, 0.75f, 0.25f}; +static void upsampleX(float *from, float *to, int n) { + const float *p = &_upCoeffs[2]; + + for (int i = 0; i < n; i++) { + to[i] = 0; + for (int k = i / 2; k <= i / 2 + 1; k++) + to[i] += p[i - 2 * k] * from[modFast64(k)]; + } +} +static void upsampleY(float *from, float *to, int n) { + const float *p = &_upCoeffs[2]; + + for (int i = 0; i < n; i++) { + to[i * n] = 0; + for (int k = i / 2; k <= i / 2 + 1; k++) + to[i * n] += p[i - 2 * k] * from[modFast64(k) * n]; + } +} +static void upsampleZ(float *from, float *to, int n) { + const float *p = &_upCoeffs[2]; + + for (int i = 0; i < n; i++) { + to[i * n * n] = 0; + for (int k = i / 2; k <= i / 2 + 1; k++) + to[i * n * n] += p[i - 2 * k] * from[modFast64(k) * n * n]; + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +// Wavelet upsampling - Neumann boundary conditions +////////////////////////////////////////////////////////////////////////////////////////// +static void upsampleNeumann(const float *from, float *to, int n, int stride) { + static const float *const pCoCenter = &_upCoeffs[2]; + for (int i = 0; i < n; i++) { + to[i * stride] = 0; + for (int k = i / 2; k <= i / 2 + 1; k++) { + float fromval; + if(k>n/2) { + fromval = from[(n/2) * stride]; + } else { + fromval = from[k * stride]; + } + to[i * stride] += pCoCenter[i - 2 * k] * fromval; + } + } +} +static void upsampleXNeumann(float* to, const float* from, int sx, int sy, int sz) { + for (int iy = 0; iy < sy; iy++) + for (int iz = 0; iz < sz; iz++) { + const int i = iy * sx + iz*sx*sy; + upsampleNeumann(&from[i], &to[i], sx, 1); + } +} +static void upsampleYNeumann(float* to, const float* from, int sx, int sy, int sz) { + for (int ix = 0; ix < sx; ix++) + for (int iz = 0; iz < sz; iz++) { + const int i = ix + iz*sx*sy; + upsampleNeumann(&from[i], &to[i], sy, sx); + } +} +static void upsampleZNeumann(float* to, const float* from, int sx, int sy, int sz) { + for (int ix = 0; ix < sx; ix++) + for (int iy = 0; iy < sy; iy++) { + const int i = ix + iy*sx; + upsampleNeumann(&from[i], &to[i], sz, sx*sy); + } +} + + +////////////////////////////////////////////////////////////////////////////////////////// +// load in an existing noise tile +////////////////////////////////////////////////////////////////////////////////////////// +static bool loadTile(float* const noiseTileData, std::string filename) +{ + FILE* file; + file = fopen(filename.c_str(), "rb"); + + if (file == NULL) { + printf("loadTile: No noise tile '%s' found.\n", filename.c_str()); + return false; + } + + // dimensions + size_t gridSize = noiseTileSize * noiseTileSize * noiseTileSize; + + // noiseTileData memory is managed by caller + size_t bread = fread((void*)noiseTileData, sizeof(float), gridSize, file); + fclose(file); + printf("Noise tile file '%s' loaded.\n", filename.c_str()); + + if (bread != gridSize) { + printf("loadTile: Noise tile '%s' is wrong size %d.\n", filename.c_str(), (int)bread); + return false; + } + return true; +} + +////////////////////////////////////////////////////////////////////////////////////////// +// write out an existing noise tile +////////////////////////////////////////////////////////////////////////////////////////// +static void saveTile(float* const noiseTileData, std::string filename) +{ + FILE* file; + file = fopen(filename.c_str(), "wb"); + + if (file == NULL) { + printf("saveTile: Noise tile '%s' could not be saved.\n", filename.c_str()); + return; + } + + fwrite((void*)noiseTileData, sizeof(float), noiseTileSize * noiseTileSize * noiseTileSize, file); + fclose(file); + + printf("saveTile: Noise tile file '%s' saved.\n", filename.c_str()); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// create a new noise tile if necessary +////////////////////////////////////////////////////////////////////////////////////////// +static void generateTile_WAVELET(float* const noiseTileData, std::string filename) { + // if a tile already exists, just use that + if (loadTile(noiseTileData, filename)) return; + + const int n = noiseTileSize; + const int n3 = n*n*n; + std::cout <<"Generating new 3d noise tile size="<. +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// WTURBULENCE handling +/////////////////////////////////////////////////////////////////////////////////// + +#include "WTURBULENCE.h" +#include "INTERPOLATE.h" +#include "IMAGE.h" +#include +#include "WAVELET_NOISE.h" +#include "FFT_NOISE.h" +#include "EIGENVALUE_HELPER.h" +#include "LU_HELPER.h" +#include "SPHERE.h" +#include + +// needed to access static advection functions +#include "FLUID_3D.h" + +#if PARALLEL==1 +#include +#endif // PARALLEL + +// 2^ {-5/6} +static const float persistence = 0.56123f; + +////////////////////////////////////////////////////////////////////// +// constructor +////////////////////////////////////////////////////////////////////// +WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int noisetype) +{ + // if noise magnitude is below this threshold, its contribution + // is negilgible, so stop evaluating new octaves + _cullingThreshold = 1e-3; + + // factor by which to increase the simulation resolution + _amplify = amplify; + + // manually adjust the overall amount of turbulence + // DG - RNA-fied _strength = 2.; + + // add the corresponding octaves of noise + _octaves = (int)(log((float)_amplify) / log(2.0f) + 0.5); // XXX DEBUG/ TODO: int casting correct? - dg + + // noise resolution + _xResBig = _amplify * xResSm; + _yResBig = _amplify * yResSm; + _zResBig = _amplify * zResSm; + _resBig = Vec3Int(_xResBig, _yResBig, _zResBig); + _invResBig = Vec3(1./(float)_resBig[0], 1./(float)_resBig[1], 1./(float)_resBig[2]); + _slabSizeBig = _xResBig*_yResBig; + _totalCellsBig = _slabSizeBig * _zResBig; + + // original / small resolution + _xResSm = xResSm; + _yResSm = yResSm; + _zResSm = zResSm; + _resSm = Vec3Int(xResSm, yResSm, zResSm); + _invResSm = Vec3(1./(float)_resSm[0], 1./(float)_resSm[1], 1./(float)_resSm[2] ); + _slabSizeSm = _xResSm*_yResSm; + _totalCellsSm = _slabSizeSm * _zResSm; + + // allocate high resolution density field + _totalStepsBig = 0; + _densityBig = new float[_totalCellsBig]; + _densityBigOld = new float[_totalCellsBig]; + + for(int i = 0; i < _totalCellsBig; i++) { + _densityBig[i] = + _densityBigOld[i] = 0.; + } + + // allocate & init texture coordinates + _tcU = new float[_totalCellsSm]; + _tcV = new float[_totalCellsSm]; + _tcW = new float[_totalCellsSm]; + _tcTemp = new float[_totalCellsSm]; + + // map all + const float dx = 1./(float)(_resSm[0]); + const float dy = 1./(float)(_resSm[1]); + const float dz = 1./(float)(_resSm[2]); + int index = 0; + for (int z = 0; z < _zResSm; z++) + for (int y = 0; y < _yResSm; y++) + for (int x = 0; x < _xResSm; x++, index++) + { + _tcU[index] = x*dx; + _tcV[index] = y*dy; + _tcW[index] = z*dz; + _tcTemp[index] = 0.; + } + + // noise tiles + _noiseTile = new float[noiseTileSize * noiseTileSize * noiseTileSize]; + /* + std::string noiseTileFilename = std::string("noise.wavelets"); + generateTile_WAVELET(_noiseTile, noiseTileFilename); + */ + setNoise(noisetype); + /* + std::string noiseTileFilename = std::string("noise.fft"); + generatTile_FFT(_noiseTile, noiseTileFilename); + */ +} + +////////////////////////////////////////////////////////////////////// +// destructor +////////////////////////////////////////////////////////////////////// +WTURBULENCE::~WTURBULENCE() { + delete[] _densityBig; + delete[] _densityBigOld; + + delete[] _tcU; + delete[] _tcV; + delete[] _tcW; + delete[] _tcTemp; + + delete[] _noiseTile; +} + +////////////////////////////////////////////////////////////////////// +// Change noise type +// +// type (1<<0) = wavelet / 2 +// type (1<<1) = FFT / 4 +// type (1<<2) = curl / 8 +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::setNoise(int type) +{ + if(type == (1<<1)) // FFT + { + // needs fft + #if FFTW3==1 + std::string noiseTileFilename = std::string("noise.fft"); + generatTile_FFT(_noiseTile, noiseTileFilename); + #endif + } + else if(type == (1<<2)) // curl + { + // TODO: not supported yet + } + else // standard - wavelet + { + std::string noiseTileFilename = std::string("noise.wavelets"); + generateTile_WAVELET(_noiseTile, noiseTileFilename); + } +} + +// init direct access functions from blender +void WTURBULENCE::initBlenderRNA(float *strength) +{ + _strength = strength; +} + +////////////////////////////////////////////////////////////////////// +// Get the smallest valid x derivative +// +// Takes the one-sided finite difference in both directions and +// selects the smaller of the two +////////////////////////////////////////////////////////////////////// +static float minDx(int x, int y, int z, float* input, Vec3Int res) +{ + const int index = x + y * res[0] + z * res[0] * res[1]; + const int maxx = res[0]-2; + + // get grid values + float center = input[index]; + float left = (x <= 1) ? FLT_MAX : input[index - 1]; + float right = (x >= maxx) ? FLT_MAX : input[index + 1]; + + const float dx = res[0]; + + // get all the derivative estimates + float dLeft = (x <= 1) ? FLT_MAX : (center - left) * dx; + float dRight = (x >= maxx) ? FLT_MAX : (right - center) * dx; + float dCenter = (x <= 1 || x >= maxx) ? FLT_MAX : (right - left) * dx * 0.5f; + + // if it's on a boundary, only one estimate is valid + if (x <= 1) return dRight; + if (x >= maxx) return dLeft; + + // if it's not on a boundary, get the smallest one + float finalD; + finalD = (fabs(dCenter) < fabs(dRight)) ? dCenter : dRight; + finalD = (fabs(finalD) < fabs(dLeft)) ? finalD : dLeft; + + return finalD; +} + +////////////////////////////////////////////////////////////////////// +// get the smallest valid y derivative +// +// Takes the one-sided finite difference in both directions and +// selects the smaller of the two +////////////////////////////////////////////////////////////////////// +static float minDy(int x, int y, int z, float* input, Vec3Int res) +{ + const int index = x + y * res[0] + z * res[0] * res[1]; + const int maxy = res[1]-2; + + // get grid values + float center = input[index]; + float down = (y <= 1) ? FLT_MAX : input[index - res[0]]; + float up = (y >= maxy) ? FLT_MAX : input[index + res[0]]; + + const float dx = res[1]; // only for square domains + + // get all the derivative estimates + float dDown = (y <= 1) ? FLT_MAX : (center - down) * dx; + float dUp = (y >= maxy) ? FLT_MAX : (up - center) * dx; + float dCenter = (y <= 1 || y >= maxy) ? FLT_MAX : (up - down) * dx * 0.5f; + + // if it's on a boundary, only one estimate is valid + if (y <= 1) return dUp; + if (y >= maxy) return dDown; + + // if it's not on a boundary, get the smallest one + float finalD = (fabs(dCenter) < fabs(dUp)) ? dCenter : dUp; + finalD = (fabs(finalD) < fabs(dDown)) ? finalD : dDown; + + return finalD; +} + +////////////////////////////////////////////////////////////////////// +// get the smallest valid z derivative +// +// Takes the one-sided finite difference in both directions and +// selects the smaller of the two +////////////////////////////////////////////////////////////////////// +static float minDz(int x, int y, int z, float* input, Vec3Int res) +{ + const int slab = res[0]*res[1]; + const int index = x + y * res[0] + z * slab; + const int maxz = res[2]-2; + + // get grid values + float center = input[index]; + float front = (z <= 1) ? FLT_MAX : input[index - slab]; + float back = (z >= maxz) ? FLT_MAX : input[index + slab]; + + const float dx = res[2]; // only for square domains + + // get all the derivative estimates + float dfront = (z <= 1) ? FLT_MAX : (center - front) * dx; + float dback = (z >= maxz) ? FLT_MAX : (back - center) * dx; + float dCenter = (z <= 1 || z >= maxz) ? FLT_MAX : (back - front) * dx * 0.5f; + + // if it's on a boundary, only one estimate is valid + if (z <= 1) return dback; + if (z >= maxz) return dfront; + + // if it's not on a boundary, get the smallest one + float finalD = (fabs(dCenter) < fabs(dback)) ? dCenter : dback; + finalD = (fabs(finalD) < fabs(dfront)) ? finalD : dfront; + + return finalD; +} + +////////////////////////////////////////////////////////////////////// +// handle texture coordinates (advection, reset, eigenvalues), +// Beware -- uses big density maccormack as temporary arrays +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2) { + // advection + SWAP_POINTERS(_tcTemp, _tcU); + FLUID_3D::copyBorderX(_tcTemp, _resSm); + FLUID_3D::copyBorderY(_tcTemp, _resSm); + FLUID_3D::copyBorderZ(_tcTemp, _resSm); + FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel, + _tcTemp, _tcU, tempBig1, tempBig2, _resSm, NULL); + + SWAP_POINTERS(_tcTemp, _tcV); + FLUID_3D::copyBorderX(_tcTemp, _resSm); + FLUID_3D::copyBorderY(_tcTemp, _resSm); + FLUID_3D::copyBorderZ(_tcTemp, _resSm); + FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel, + _tcTemp, _tcV, tempBig1, tempBig2, _resSm, NULL); + + SWAP_POINTERS(_tcTemp, _tcW); + FLUID_3D::copyBorderX(_tcTemp, _resSm); + FLUID_3D::copyBorderY(_tcTemp, _resSm); + FLUID_3D::copyBorderZ(_tcTemp, _resSm); + FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel, + _tcTemp, _tcW, tempBig1, tempBig2, _resSm, NULL); +} + +////////////////////////////////////////////////////////////////////// +// Compute the eigenvalues of the advected texture +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::computeEigenvalues(float *_eigMin, float *_eigMax) { + // stats + float maxeig = -1.; + float mineig = 10.; + + // texture coordinate eigenvalues + for (int z = 1; z < _zResSm-1; z++) { + for (int y = 1; y < _yResSm-1; y++) + for (int x = 1; x < _xResSm-1; x++) + { + const int index = x+ y *_resSm[0] + z*_slabSizeSm; + + // compute jacobian + float jacobian[3][3] = { + { minDx(x, y, z, _tcU, _resSm), minDx(x, y, z, _tcV, _resSm), minDx(x, y, z, _tcW, _resSm) } , + { minDy(x, y, z, _tcU, _resSm), minDy(x, y, z, _tcV, _resSm), minDy(x, y, z, _tcW, _resSm) } , + { minDz(x, y, z, _tcU, _resSm), minDz(x, y, z, _tcV, _resSm), minDz(x, y, z, _tcW, _resSm) } + }; + + // ONLY compute the eigenvalues after checking that the matrix + // is nonsingular + JAMA::LU LU = computeLU3x3(jacobian); + + if (LU.isNonsingular()) + { + // get the analytic eigenvalues, quite slow right now... + Vec3 eigenvalues = Vec3(1.); + computeEigenvalues3x3( &eigenvalues[0], jacobian); + _eigMax[index] = MAX3V(eigenvalues); + _eigMin[index] = MIN3V(eigenvalues); + maxeig = MAX(_eigMax[index],maxeig); + mineig = MIN(_eigMin[index],mineig); + } + else + { + _eigMax[index] = 10.0f; + _eigMin[index] = 0.1; + } + } + } +} + +////////////////////////////////////////////////////////////////////// +// advect & reset texture coordinates based on eigenvalues +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::resetTextureCoordinates(float *_eigMin, float *_eigMax) +{ + // allowed deformation of the textures + const float limit = 2.f; + const float limitInv = 1./limit; + + // standard reset + int resets = 0; + const float dx = 1./(float)(_resSm[0]); + const float dy = 1./(float)(_resSm[1]); + const float dz = 1./(float)(_resSm[2]); + + for (int z = 1; z < _zResSm-1; z++) + for (int y = 1; y < _yResSm-1; y++) + for (int x = 1; x < _xResSm-1; x++) + { + const int index = x+ y *_resSm[0] + z*_slabSizeSm; + if (_eigMax[index] > limit || _eigMin[index] < limitInv) + { + _tcU[index] = (float)x * dx; + _tcV[index] = (float)y * dy; + _tcW[index] = (float)z * dz; + resets++; + } + } +} + +////////////////////////////////////////////////////////////////////// +// Compute the highest frequency component of the wavelet +// decomposition +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy) +{ + // do the decomposition -- the goal here is to have + // the energy with the high frequency component stomped out + // stored in _tcTemp when it is done. _highFreqEnergy is only used + // as an additional temp array + + // downsample input + downsampleXNeumann(_highFreqEnergy, _energy, _xResSm, _yResSm, _zResSm); + downsampleYNeumann(_tcTemp, _highFreqEnergy, _xResSm, _yResSm, _zResSm); + downsampleZNeumann(_highFreqEnergy, _tcTemp, _xResSm, _yResSm, _zResSm); + + // upsample input + upsampleZNeumann(_tcTemp, _highFreqEnergy, _xResSm, _yResSm, _zResSm); + upsampleYNeumann(_highFreqEnergy, _tcTemp, _xResSm, _yResSm, _zResSm); + upsampleXNeumann(_tcTemp, _highFreqEnergy, _xResSm, _yResSm, _zResSm); + + // subtract the down and upsampled field from the original field -- + // what should be left over is solely the high frequency component + int index = 0; + for (int z = 0; z < _zResSm; z++) + for (int y = 0; y < _yResSm; y++) { + for (int x = 0; x < _xResSm; x++, index++) { + // brute force reset of boundaries + if(z >= _zResSm - 1 || x >= _xResSm - 1 || y >= _yResSm - 1 || z <= 0 || y <= 0 || x <= 0) + _highFreqEnergy[index] = 0.; + else + _highFreqEnergy[index] = _energy[index] - _tcTemp[index]; + } + } +} + +////////////////////////////////////////////////////////////////////// +// compute velocity from energies and march into obstacles +// for wavelet decomposition +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles) +{ + // compute everywhere + for (int x = 0; x < _totalCellsSm; x++) + _energy[x] = 0.5f * (xvel[x] * xvel[x] + yvel[x] * yvel[x] + zvel[x] * zvel[x]); + + FLUID_3D::copyBorderX(_energy, _resSm); + FLUID_3D::copyBorderY(_energy, _resSm); + FLUID_3D::copyBorderZ(_energy, _resSm); + + // pseudo-march the values into the obstacles + // the wavelet upsampler only uses a 3x3 support neighborhood, so + // propagating the values in by 4 should be sufficient + int index; + + // iterate + for (int iter = 0; iter < 4; iter++) + { + index = _slabSizeSm + _xResSm + 1; + for (int z = 1; z < _zResSm - 1; z++, index += 2 * _xResSm) + for (int y = 1; y < _yResSm - 1; y++, index += 2) + for (int x = 1; x < _xResSm - 1; x++, index++) + if (obstacles[index] && obstacles[index] != RETIRED) + { + float sum = 0.0f; + int valid = 0; + + if (!obstacles[index + 1] || obstacles[index + 1] == RETIRED) + { + sum += _energy[index + 1]; + valid++; + } + if (!obstacles[index - 1] || obstacles[index - 1] == RETIRED) + { + sum += _energy[index - 1]; + valid++; + } + if (!obstacles[index + _xResSm] || obstacles[index + _xResSm] == RETIRED) + { + sum += _energy[index + _xResSm]; + valid++; + } + if (!obstacles[index - _xResSm] || obstacles[index - _xResSm] == RETIRED) + { + sum += _energy[index - _xResSm]; + valid++; + } + if (!obstacles[index + _slabSizeSm] || obstacles[index + _slabSizeSm] == RETIRED) + { + sum += _energy[index + _slabSizeSm]; + valid++; + } + if (!obstacles[index - _slabSizeSm] || obstacles[index - _slabSizeSm] == RETIRED) + { + sum += _energy[index - _slabSizeSm]; + valid++; + } + if (valid > 0) + { + _energy[index] = sum / (float)valid; + obstacles[index] = MARCHED; + } + } + index = _slabSizeSm + _xResSm + 1; + for (int z = 1; z < _zResSm - 1; z++, index += 2 * _xResSm) + for (int y = 1; y < _yResSm - 1; y++, index += 2) + for (int x = 1; x < _xResSm - 1; x++, index++) + if (obstacles[index] == MARCHED) + obstacles[index] = RETIRED; + } + index = _slabSizeSm + _xResSm + 1; + for (int z = 1; z < _zResSm - 1; z++, index += 2 * _xResSm) + for (int y = 1; y < _yResSm - 1; y++, index += 2) + for (int x = 1; x < _xResSm - 1; x++, index++) + if (obstacles[index]) + obstacles[index] = 1; +} + +////////////////////////////////////////////////////////////////////////////////////////// +// Evaluate derivatives +////////////////////////////////////////////////////////////////////////////////////////// +Vec3 WTURBULENCE::WVelocity(Vec3 orgPos) +{ + // arbitrarily offset evaluation points + const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0); + const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0); + const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0); + + const float f1y = WNoiseDy(p1, _noiseTile); + const float f1z = WNoiseDz(p1, _noiseTile); + + const float f2x = WNoiseDx(p2, _noiseTile); + const float f2z = WNoiseDz(p2, _noiseTile); + + const float f3x = WNoiseDx(p3, _noiseTile); + const float f3y = WNoiseDy(p3, _noiseTile); + + Vec3 ret = Vec3( + f3y - f2z, + f1z - f3x, + f2x - f1y ); + return ret; +} + +////////////////////////////////////////////////////////////////////////////////////////// +// Evaluate derivatives with Jacobian +////////////////////////////////////////////////////////////////////////////////////////// +Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yUnwarped, float* zUnwarped) +{ + // arbitrarily offset evaluation points + const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0); + const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0); + const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0); + + Vec3 final; + final[0] = WNoiseDx(p1, _noiseTile); + final[1] = WNoiseDy(p1, _noiseTile); + final[2] = WNoiseDz(p1, _noiseTile); + // UNUSED const float f1x = xUnwarped[0] * final[0] + xUnwarped[1] * final[1] + xUnwarped[2] * final[2]; + const float f1y = yUnwarped[0] * final[0] + yUnwarped[1] * final[1] + yUnwarped[2] * final[2]; + const float f1z = zUnwarped[0] * final[0] + zUnwarped[1] * final[1] + zUnwarped[2] * final[2]; + + final[0] = WNoiseDx(p2, _noiseTile); + final[1] = WNoiseDy(p2, _noiseTile); + final[2] = WNoiseDz(p2, _noiseTile); + const float f2x = xUnwarped[0] * final[0] + xUnwarped[1] * final[1] + xUnwarped[2] * final[2]; + // UNUSED const float f2y = yUnwarped[0] * final[0] + yUnwarped[1] * final[1] + yUnwarped[2] * final[2]; + const float f2z = zUnwarped[0] * final[0] + zUnwarped[1] * final[1] + zUnwarped[2] * final[2]; + + final[0] = WNoiseDx(p3, _noiseTile); + final[1] = WNoiseDy(p3, _noiseTile); + final[2] = WNoiseDz(p3, _noiseTile); + const float f3x = xUnwarped[0] * final[0] + xUnwarped[1] * final[1] + xUnwarped[2] * final[2]; + const float f3y = yUnwarped[0] * final[0] + yUnwarped[1] * final[1] + yUnwarped[2] * final[2]; + // UNUSED const float f3z = zUnwarped[0] * final[0] + zUnwarped[1] * final[1] + zUnwarped[2] * final[2]; + + Vec3 ret = Vec3( + f3y - f2z, + f1z - f3x, + f2x - f1y ); + return ret; +} + + +////////////////////////////////////////////////////////////////////// +// perform an actual noise advection step +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles) +{ + // enlarge timestep to match grid + const float dt = dtOrg * _amplify; + const float invAmp = 1.0f / _amplify; + float *tempBig1 = new float[_totalCellsBig]; + float *tempBig2 = new float[_totalCellsBig]; + float *bigUx = new float[_totalCellsBig]; + float *bigUy = new float[_totalCellsBig]; + float *bigUz = new float[_totalCellsBig]; + float *_energy = new float[_totalCellsSm]; + float *highFreqEnergy = new float[_totalCellsSm]; + float *eigMin = new float[_totalCellsSm]; + float *eigMax = new float[_totalCellsSm]; + + memset(tempBig1, 0, sizeof(float)*_totalCellsBig); + memset(tempBig2, 0, sizeof(float)*_totalCellsBig); + memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm); + memset(eigMin, 0, sizeof(float)*_totalCellsSm); + memset(eigMax, 0, sizeof(float)*_totalCellsSm); + + // prepare textures + advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2); + + // compute eigenvalues of the texture coordinates + computeEigenvalues(eigMin, eigMax); + + // do wavelet decomposition of energy + computeEnergy(_energy, xvel, yvel, zvel, obstacles); + decomposeEnergy(_energy, highFreqEnergy); + + // zero out coefficients inside of the obstacle + for (int x = 0; x < _totalCellsSm; x++) + if (obstacles[x]) _energy[x] = 0.f; + + float maxVelocity = 0.; + for (int z = 1; z < _zResBig - 1; z++) + for (int y = 1; y < _yResBig - 1; y++) + for (int x = 1; x < _xResBig - 1; x++) + { + // get unit position for both fine and coarse grid + const Vec3 pos = Vec3(x,y,z); + const Vec3 posSm = pos * invAmp; + + // get grid index for both fine and coarse grid + const int index = x + y *_xResBig + z *_slabSizeBig; + const int indexSmall = (int)posSm[0] + (int)posSm[1] * _xResSm + (int)posSm[2] * _slabSizeSm; + + // get a linearly interpolated velocity and texcoords + // from the coarse grid + Vec3 vel = INTERPOLATE::lerp3dVec( xvel,yvel,zvel, + posSm[0], posSm[1], posSm[2], _xResSm,_yResSm,_zResSm); + Vec3 uvw = INTERPOLATE::lerp3dVec( _tcU,_tcV,_tcW, + posSm[0], posSm[1], posSm[2], _xResSm,_yResSm,_zResSm); + + // multiply the texture coordinate by _resSm so that turbulence + // synthesis begins at the first octave that the coarse grid + // cannot capture + Vec3 texCoord = Vec3(uvw[0] * _resSm[0], + uvw[1] * _resSm[1], + uvw[2] * _resSm[2]); + + // retrieve wavelet energy at highest frequency + float energy = INTERPOLATE::lerp3d( + highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm); + + // base amplitude for octave 0 + float coefficient = sqrtf(2.0f * fabs(energy)); + const float amplitude = *_strength * fabs(0.5 * coefficient) * persistence; + + // add noise to velocity, but only if the turbulence is + // sufficiently undeformed, and the energy is large enough + // to make a difference + const bool addNoise = eigMax[indexSmall] < 2. && + eigMin[indexSmall] > 0.5; + if (addNoise && amplitude > _cullingThreshold) { + // base amplitude for octave 0 + float amplitudeScaled = amplitude; + + for (int octave = 0; octave < _octaves; octave++) + { + // multiply the vector noise times the maximum allowed + // noise amplitude at this octave, and add it to the total + vel += WVelocity(texCoord) * amplitudeScaled; + + // scale coefficient for next octave + amplitudeScaled *= persistence; + texCoord *= 2.0f; + } + } + + // Store velocity + turbulence in big grid for maccormack step + // + // If you wanted to save memory, you would instead perform a + // semi-Lagrangian backtrace for the current grid cell here. Then + // you could just throw the velocity away. + bigUx[index] = vel[0]; + bigUy[index] = vel[1]; + bigUz[index] = vel[2]; + + // compute the velocity magnitude for substepping later + const float velMag = bigUx[index] * bigUx[index] + + bigUy[index] * bigUy[index] + + bigUz[index] * bigUz[index]; + if (velMag > maxVelocity) maxVelocity = velMag; + + // zero out velocity inside obstacles + float obsCheck = INTERPOLATE::lerp3dToFloat( + obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm); + if (obsCheck > 0.95) + bigUx[index] = bigUy[index] = bigUz[index] = 0.; + } + + // prepare density for an advection + SWAP_POINTERS(_densityBig, _densityBigOld); + + // based on the maximum velocity present, see if we need to substep, + // but cap the maximum number of substeps to 5 + const int maxSubSteps = 5; + maxVelocity = sqrt(maxVelocity) * dt; + int totalSubsteps = (int)(maxVelocity / (float)maxSubSteps); + totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps; + totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps; + const float dtSubdiv = dt / (float)totalSubsteps; + + // set boundaries of big velocity grid + FLUID_3D::setZeroX(bigUx, _resBig); + FLUID_3D::setZeroY(bigUy, _resBig); + FLUID_3D::setZeroZ(bigUz, _resBig); + + // do the MacCormack advection, with substepping if necessary + for(int substep = 0; substep < totalSubsteps; substep++) + { + FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz, + _densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL); + + if (substep < totalSubsteps - 1) + SWAP_POINTERS(_densityBig, _densityBigOld); + } // substep + + // wipe the density borders + FLUID_3D::setZeroBorder(_densityBig, _resBig); + + // reset texture coordinates now in preparation for next timestep + // Shouldn't do this before generating the noise because then the + // eigenvalues stored do not reflect the underlying texture coordinates + resetTextureCoordinates(eigMin, eigMax); + + delete[] tempBig1; + delete[] tempBig2; + delete[] bigUx; + delete[] bigUy; + delete[] bigUz; + delete[] _energy; + delete[] highFreqEnergy; + + delete[] eigMin; + delete[] eigMax; + + + _totalStepsBig++; +} + +////////////////////////////////////////////////////////////////////// +// perform the full turbulence algorithm, including OpenMP +// if available +////////////////////////////////////////////////////////////////////// +void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles) +{ + // enlarge timestep to match grid + const float dt = dtOrg * _amplify; + const float invAmp = 1.0f / _amplify; + float *tempBig1 = new float[_totalCellsBig]; + float *tempBig2 = new float[_totalCellsBig]; + float *bigUx = new float[_totalCellsBig]; + float *bigUy = new float[_totalCellsBig]; + float *bigUz = new float[_totalCellsBig]; + float *_energy = new float[_totalCellsSm]; + float *highFreqEnergy = new float[_totalCellsSm]; + float *eigMin = new float[_totalCellsSm]; + float *eigMax = new float[_totalCellsSm]; + + memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm); + memset(eigMin, 0, sizeof(float)*_totalCellsSm); + memset(eigMax, 0, sizeof(float)*_totalCellsSm); + + // prepare textures + advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2); + + // do wavelet decomposition of energy + computeEnergy(_energy, xvel, yvel, zvel, obstacles); + + for (int x = 0; x < _totalCellsSm; x++) + if (obstacles[x]) _energy[x] = 0.f; + + decomposeEnergy(_energy, highFreqEnergy); + + // zero out coefficients inside of the obstacle + for (int x = 0; x < _totalCellsSm; x++) + if (obstacles[x]) highFreqEnergy[x] = 0.f; + + Vec3Int ressm(_xResSm, _yResSm, _zResSm); + FLUID_3D::setNeumannX(highFreqEnergy, ressm); + FLUID_3D::setNeumannY(highFreqEnergy, ressm); + FLUID_3D::setNeumannZ(highFreqEnergy, ressm); + + // parallel region setup + float maxVelMagThreads[8] = { -1., -1., -1., -1., -1., -1., -1., -1. }; +#if PARALLEL==1 +#pragma omp parallel +#endif + { float maxVelMag1 = 0.; +#if PARALLEL==1 + const int id = omp_get_thread_num(); /*, num = omp_get_num_threads(); */ +#endif + + // vector noise main loop +#if PARALLEL==1 +#pragma omp for schedule(static) +#endif + for (int zSmall = 0; zSmall < _zResSm; zSmall++) + for (int ySmall = 0; ySmall < _yResSm; ySmall++) + for (int xSmall = 0; xSmall < _xResSm; xSmall++) + { + const int indexSmall = xSmall + ySmall * _xResSm + zSmall * _slabSizeSm; + + // compute jacobian + float jacobian[3][3] = { + { minDx(xSmall, ySmall, zSmall, _tcU, _resSm), minDx(xSmall, ySmall, zSmall, _tcV, _resSm), minDx(xSmall, ySmall, zSmall, _tcW, _resSm) } , + { minDy(xSmall, ySmall, zSmall, _tcU, _resSm), minDy(xSmall, ySmall, zSmall, _tcV, _resSm), minDy(xSmall, ySmall, zSmall, _tcW, _resSm) } , + { minDz(xSmall, ySmall, zSmall, _tcU, _resSm), minDz(xSmall, ySmall, zSmall, _tcV, _resSm), minDz(xSmall, ySmall, zSmall, _tcW, _resSm) } + }; + + // get LU factorization of texture jacobian and apply + // it to unit vectors + JAMA::LU LU = computeLU3x3(jacobian); + float xUnwarped[] = {1.0f, 0.0f, 0.0f}; + float yUnwarped[] = {0.0f, 1.0f, 0.0f}; + float zUnwarped[] = {0.0f, 0.0f, 1.0f}; + float xWarped[] = {1.0f, 0.0f, 0.0f}; + float yWarped[] = {0.0f, 1.0f, 0.0f}; + float zWarped[] = {0.0f, 0.0f, 1.0f}; + bool nonSingular = LU.isNonsingular(); +#if 0 + // UNUSED + float eigMax = 10.0f; + float eigMin = 0.1f; +#endif + if (nonSingular) + { + solveLU3x3(LU, xUnwarped, xWarped); + solveLU3x3(LU, yUnwarped, yWarped); + solveLU3x3(LU, zUnwarped, zWarped); + + // compute the eigenvalues while we have the Jacobian available + Vec3 eigenvalues = Vec3(1.); + computeEigenvalues3x3( &eigenvalues[0], jacobian); + eigMax[indexSmall] = MAX3V(eigenvalues); + eigMin[indexSmall] = MIN3V(eigenvalues); + } + + // make sure to skip one on the beginning and end + int xStart = (xSmall == 0) ? 1 : 0; + int xEnd = (xSmall == _xResSm - 1) ? _amplify - 1 : _amplify; + int yStart = (ySmall == 0) ? 1 : 0; + int yEnd = (ySmall == _yResSm - 1) ? _amplify - 1 : _amplify; + int zStart = (zSmall == 0) ? 1 : 0; + int zEnd = (zSmall == _zResSm - 1) ? _amplify - 1 : _amplify; + + for (int zBig = zStart; zBig < zEnd; zBig++) + for (int yBig = yStart; yBig < yEnd; yBig++) + for (int xBig = xStart; xBig < xEnd; xBig++) + { + const int x = xSmall * _amplify + xBig; + const int y = ySmall * _amplify + yBig; + const int z = zSmall * _amplify + zBig; + + // get unit position for both fine and coarse grid + const Vec3 pos = Vec3(x,y,z); + const Vec3 posSm = pos * invAmp; + + // get grid index for both fine and coarse grid + const int index = x + y *_xResBig + z *_slabSizeBig; + + // get a linearly interpolated velocity and texcoords + // from the coarse grid + Vec3 vel = INTERPOLATE::lerp3dVec( xvel,yvel,zvel, + posSm[0], posSm[1], posSm[2], _xResSm,_yResSm,_zResSm); + Vec3 uvw = INTERPOLATE::lerp3dVec( _tcU,_tcV,_tcW, + posSm[0], posSm[1], posSm[2], _xResSm,_yResSm,_zResSm); + + // multiply the texture coordinate by _resSm so that turbulence + // synthesis begins at the first octave that the coarse grid + // cannot capture + Vec3 texCoord = Vec3(uvw[0] * _resSm[0], + uvw[1] * _resSm[1], + uvw[2] * _resSm[2]); + + // retrieve wavelet energy at highest frequency + float energy = INTERPOLATE::lerp3d( + highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm); + + // base amplitude for octave 0 + float coefficient = sqrtf(2.0f * fabs(energy)); + const float amplitude = *_strength * fabs(0.5 * coefficient) * persistence; + + // add noise to velocity, but only if the turbulence is + // sufficiently undeformed, and the energy is large enough + // to make a difference + const bool addNoise = eigMax[indexSmall] < 2. && + eigMin[indexSmall] > 0.5; + if (addNoise && amplitude > _cullingThreshold) { + // base amplitude for octave 0 + float amplitudeScaled = amplitude; + + for (int octave = 0; octave < _octaves; octave++) + { + // multiply the vector noise times the maximum allowed + // noise amplitude at this octave, and add it to the total + vel += WVelocityWithJacobian(texCoord, &xUnwarped[0], &yUnwarped[0], &zUnwarped[0]) * amplitudeScaled; + + // scale coefficient for next octave + amplitudeScaled *= persistence; + texCoord *= 2.0f; + } + } + + // Store velocity + turbulence in big grid for maccormack step + // + // If you wanted to save memory, you would instead perform a + // semi-Lagrangian backtrace for the current grid cell here. Then + // you could just throw the velocity away. + bigUx[index] = vel[0]; + bigUy[index] = vel[1]; + bigUz[index] = vel[2]; + + // compute the velocity magnitude for substepping later + const float velMag = bigUx[index] * bigUx[index] + + bigUy[index] * bigUy[index] + + bigUz[index] * bigUz[index]; + if (velMag > maxVelMag1) maxVelMag1 = velMag; + + // zero out velocity inside obstacles + float obsCheck = INTERPOLATE::lerp3dToFloat( + obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm); + if (obsCheck > 0.95) + bigUx[index] = bigUy[index] = bigUz[index] = 0.; + } // xyz + +#if PARALLEL==1 + maxVelMagThreads[id] = maxVelMag1; +#else + maxVelMagThreads[0] = maxVelMag1; +#endif + } + } // omp + + // compute maximum over threads + float maxVelMag = maxVelMagThreads[0]; +#if PARALLEL==1 + for (int i = 1; i < 8; i++) + if (maxVelMag < maxVelMagThreads[i]) + maxVelMag = maxVelMagThreads[i]; +#endif + + // prepare density for an advection + SWAP_POINTERS(_densityBig, _densityBigOld); + + // based on the maximum velocity present, see if we need to substep, + // but cap the maximum number of substeps to 5 + const int maxSubSteps = 25; + const int maxVel = 5; + maxVelMag = sqrt(maxVelMag) * dt; + int totalSubsteps = (int)(maxVelMag / (float)maxVel); + totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps; + // printf("totalSubsteps: %d\n", totalSubsteps); + totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps; + const float dtSubdiv = dt / (float)totalSubsteps; + + // set boundaries of big velocity grid + FLUID_3D::setZeroX(bigUx, _resBig); + FLUID_3D::setZeroY(bigUy, _resBig); + FLUID_3D::setZeroZ(bigUz, _resBig); + + // do the MacCormack advection, with substepping if necessary + for(int substep = 0; substep < totalSubsteps; substep++) + { + FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz, + _densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL); + + if (substep < totalSubsteps - 1) + SWAP_POINTERS(_densityBig, _densityBigOld); + } // substep + + delete[] tempBig1; + delete[] tempBig2; + delete[] bigUx; + delete[] bigUy; + delete[] bigUz; + delete[] _energy; + delete[] highFreqEnergy; + + // wipe the density borders + FLUID_3D::setZeroBorder(_densityBig, _resBig); + + // reset texture coordinates now in preparation for next timestep + // Shouldn't do this before generating the noise because then the + // eigenvalues stored do not reflect the underlying texture coordinates + resetTextureCoordinates(eigMin, eigMax); + + delete[] eigMin; + delete[] eigMax; + + // output files + // string prefix = string("./amplified.preview/density_bigxy_"); + // FLUID_3D::writeImageSliceXY(_densityBig, _resBig, _resBig[2]/2, prefix, _totalStepsBig, 1.0f); + //string df3prefix = string("./df3/density_big_"); + //IMAGE::dumpDF3(_totalStepsBig, df3prefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]); + // string pbrtPrefix = string("./pbrt/density_big_"); + // IMAGE::dumpPBRT(_totalStepsBig, pbrtPrefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]); + + _totalStepsBig++; +} + diff --git a/intern/smoke/intern/WTURBULENCE.h b/intern/smoke/intern/WTURBULENCE.h new file mode 100644 index 00000000000..0aa978e9e52 --- /dev/null +++ b/intern/smoke/intern/WTURBULENCE.h @@ -0,0 +1,130 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +// WTURBULENCE handling +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef WTURBULENCE_H +#define WTURBULENCE_H + +#include "VEC3.h" +using namespace BasicVector; +class SIMPLE_PARSER; + +/////////////////////////////////////////////////////////////////////////////// +/// Main WTURBULENCE class, stores large density array etc. +/////////////////////////////////////////////////////////////////////////////// +class WTURBULENCE +{ + public: + // both config files can be NULL, altCfg might override values from noiseCfg + WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int noisetype); + + /// destructor + virtual ~WTURBULENCE(); + + void setNoise(int type); + void initBlenderRNA(float *strength); + + // step more readable version -- no rotation correction + void stepTurbulenceReadable(float dt, float* xvel, float* yvel, float* zvel, unsigned char *obstacles); + + // step more complete version -- include rotation correction + // and use OpenMP if available + void stepTurbulenceFull(float dt, float* xvel, float* yvel, float* zvel, unsigned char *obstacles); + + // texcoord functions + void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2); + void resetTextureCoordinates(float *_eigMin, float *_eigMax); + + void computeEnergy(float *energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles); + + // evaluate wavelet noise function + Vec3 WVelocity(Vec3 p); + Vec3 WVelocityWithJacobian(Vec3 p, float* xUnwarped, float* yUnwarped, float* zUnwarped); + + // access functions + inline float* getDensityBig() { return _densityBig; } + inline float* getArrayTcU() { return _tcU; } + inline float* getArrayTcV() { return _tcV; } + inline float* getArrayTcW() { return _tcW; } + + inline Vec3Int getResSm() { return _resSm; } // small resolution + inline Vec3Int getResBig() { return _resBig; } + inline int getOctaves() { return _octaves; } + + // is accessed on through rna gui + float *_strength; + + // protected: + // enlargement factor from original velocity field / simulation + // _Big = _amplify * _Sm + int _amplify; + int _octaves; + + // noise settings + float _cullingThreshold; + // float _noiseStrength; + // float _noiseSizeScale; + // bool _uvwAdvection; + // bool _uvwReset; + // float _noiseTimeanimSpeed; + // int _dumpInterval; + // nt _noiseControlType; + // debug, scale density for projections output images + // float _outputScale; + + // noise resolution + int _xResBig; + int _yResBig; + int _zResBig; + Vec3Int _resBig; + Vec3 _invResBig; + int _totalCellsBig; + int _slabSizeBig; + // original / small resolution + int _xResSm; + int _yResSm; + int _zResSm; + Vec3Int _resSm; + Vec3 _invResSm; + int _totalCellsSm; + int _slabSizeSm; + + float* _densityBig; + float* _densityBigOld; + + // texture coordinates for noise + float* _tcU; + float* _tcV; + float* _tcW; + float* _tcTemp; + + // noise data + float* _noiseTile; + //float* _noiseTileExt; + + // step counter + int _totalStepsBig; + + void computeEigenvalues(float *_eigMin, float *_eigMax); + void decomposeEnergy(float *energy, float *_highFreqEnergy); +}; + +#endif // WTURBULENCE_H + diff --git a/intern/smoke/intern/smoke_API.cpp b/intern/smoke/intern/smoke_API.cpp new file mode 100644 index 00000000000..67df6e805d8 --- /dev/null +++ b/intern/smoke/intern/smoke_API.cpp @@ -0,0 +1,262 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2009 by Daniel Genrich + * All rights reserved. + * + * Contributor(s): Daniel Genrich + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "FLUID_3D.h" +#include "WTURBULENCE.h" + +#include +#include + +// y in smoke is z in blender +extern "C" FLUID_3D *smoke_init(int *res, float *p0, float dt) +{ + // smoke lib uses y as top-bottom/vertical axis where blender uses z + FLUID_3D *fluid = new FLUID_3D(res, p0, dt); + + // printf("xres: %d, yres: %d, zres: %d\n", res[0], res[1], res[2]); + + return fluid; +} + +extern "C" WTURBULENCE *smoke_turbulence_init(int *res, int amplify, int noisetype) +{ + // initialize wavelet turbulence + if(amplify) + return new WTURBULENCE(res[0],res[1],res[2], amplify, noisetype); + else + return NULL; +} + +extern "C" void smoke_free(FLUID_3D *fluid) +{ + delete fluid; + fluid = NULL; +} + +extern "C" void smoke_turbulence_free(WTURBULENCE *wt) +{ + delete wt; + wt = NULL; +} + +extern "C" size_t smoke_get_index(int x, int max_x, int y, int max_y, int z /*, int max_z */) +{ + // // const int index = x + y * smd->res[0] + z * smd->res[0]*smd->res[1]; + return x + y * max_x + z * max_x*max_y; +} + +extern "C" size_t smoke_get_index2d(int x, int max_x, int y /*, int max_y, int z, int max_z */) +{ + return x + y * max_x; +} + +extern "C" void smoke_step(FLUID_3D *fluid, size_t framenr) +{ + fluid->step(); +} + +extern "C" void smoke_turbulence_step(WTURBULENCE *wt, FLUID_3D *fluid) +{ + wt->stepTurbulenceFull(fluid->_dt/fluid->_dx, fluid->_xVelocity, fluid->_yVelocity, fluid->_zVelocity, fluid->_obstacles); +} + +extern "C" void smoke_initBlenderRNA(FLUID_3D *fluid, float *alpha, float *beta) +{ + fluid->initBlenderRNA(alpha, beta); +} + +extern "C" void smoke_dissolve(FLUID_3D *fluid, int speed, int log) +{ + float *density = fluid->_density; + //float *densityOld = fluid->_densityOld; + float *heat = fluid->_heat; + + if(log) + { + /* max density/speed = dydx */ + float dydx = 1.0 / (float)speed; + size_t size= fluid->_xRes * fluid->_yRes * fluid->_zRes; + + for(size_t i = 0; i < size; i++) + { + density[i] *= (1.0 - dydx); + + if(density[i] < 0.0f) + density[i] = 0.0f; + + heat[i] *= (1.0 - dydx); + + if(heat[i] < 0.0f) + heat[i] = 0.0f; + } + } + else // linear falloff + { + /* max density/speed = dydx */ + float dydx = 1.0 / (float)speed; + size_t size= fluid->_xRes * fluid->_yRes * fluid->_zRes; + + for(size_t i = 0; i < size; i++) + { + density[i] -= dydx; + + if(density[i] < 0.0f) + density[i] = 0.0f; + + heat[i] -= dydx; + + if(heat[i] < 0.0f) + heat[i] = 0.0f; + + } + } +} + +extern "C" void smoke_dissolve_wavelet(WTURBULENCE *wt, int speed, int log) +{ + float *density = wt->getDensityBig(); + Vec3Int r = wt->getResBig(); + + if(log) + { + /* max density/speed = dydx */ + float dydx = 1.0 / (float)speed; + size_t size= r[0] * r[1] * r[2]; + + for(size_t i = 0; i < size; i++) + { + density[i] *= (1.0 - dydx); + + if(density[i] < 0.0f) + density[i] = 0.0f; + } + } + else // linear falloff + { + /* max density/speed = dydx */ + float dydx = 1.0 / (float)speed; + size_t size= r[0] * r[1] * r[2]; + + for(size_t i = 0; i < size; i++) + { + density[i] -= dydx; + + if(density[i] < 0.0f) + density[i] = 0.0f; + } + } +} + +extern "C" void smoke_initWaveletBlenderRNA(WTURBULENCE *wt, float *strength) +{ + wt->initBlenderRNA(strength); +} + +template < class T > inline T ABS( T a ) { + return (0 < a) ? a : -a ; +} + +extern "C" void smoke_export(FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles) +{ + *dens = fluid->_density; + *densold = fluid->_densityOld; + *heat = fluid->_heat; + *heatold = fluid->_heatOld; + *vx = fluid->_xVelocity; + *vy = fluid->_yVelocity; + *vz = fluid->_zVelocity; + *vxold = fluid->_xVelocityOld; + *vyold = fluid->_yVelocityOld; + *vzold = fluid->_zVelocityOld; + *obstacles = fluid->_obstacles; + dt = &(fluid->_dt); + dx = &(fluid->_dx); + +} + +extern "C" void smoke_turbulence_export(WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw) +{ + if(!wt) + return; + + *dens = wt->_densityBig; + *densold = wt->_densityBigOld; + *tcu = wt->_tcU; + *tcv = wt->_tcV; + *tcw = wt->_tcW; +} + +extern "C" float *smoke_get_density(FLUID_3D *fluid) +{ + return fluid->_density; +} + +extern "C" float *smoke_get_heat(FLUID_3D *fluid) +{ + return fluid->_heat; +} + +extern "C" float *smoke_get_velocity_x(FLUID_3D *fluid) +{ + return fluid->_xVelocity; +} + +extern "C" float *smoke_get_velocity_y(FLUID_3D *fluid) +{ + return fluid->_yVelocity; +} + +extern "C" float *smoke_get_velocity_z(FLUID_3D *fluid) +{ + return fluid->_zVelocity; +} + +extern "C" float *smoke_turbulence_get_density(WTURBULENCE *wt) +{ + return wt ? wt->getDensityBig() : NULL; +} + +extern "C" void smoke_turbulence_get_res(WTURBULENCE *wt, int *res) +{ + if(wt) + { + Vec3Int r = wt->getResBig(); + res[0] = r[0]; + res[1] = r[1]; + res[2] = r[2]; + } +} + +extern "C" unsigned char *smoke_get_obstacle(FLUID_3D *fluid) +{ + return fluid->_obstacles; +} + +extern "C" void smoke_turbulence_set_noise(WTURBULENCE *wt, int type) +{ + wt->setNoise(type); +} diff --git a/intern/smoke/intern/tnt/jama_eig.h b/intern/smoke/intern/tnt/jama_eig.h new file mode 100644 index 00000000000..0d833be56de --- /dev/null +++ b/intern/smoke/intern/tnt/jama_eig.h @@ -0,0 +1,1050 @@ +#ifndef JAMA_EIG_H +#define JAMA_EIG_H + + +#include "tnt_array1d.h" +#include "tnt_array2d.h" +#include "tnt_math_utils.h" + +#include +// for min(), max() below + +#include +// for fabs() below + +using namespace TNT; +using namespace std; + +// NT debugging +//static int gEigenDebug=0; +//if(gEigenDebug) std::cerr<<"n="< + If A is symmetric, then A = V*D*V' where the eigenvalue matrix D is + diagonal and the eigenvector matrix V is orthogonal. That is, + the diagonal values of D are the eigenvalues, and + V*V' = I, where I is the identity matrix. The columns of V + represent the eigenvectors in the sense that A*V = V*D. + +

+ If A is not symmetric, then the eigenvalue matrix D is block diagonal + with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, + a + i*b, in 2-by-2 blocks, [a, b; -b, a]. That is, if the complex + eigenvalues look like +

+
+          u + iv     .        .          .      .    .
+            .      u - iv     .          .      .    .
+            .        .      a + ib       .      .    .
+            .        .        .        a - ib   .    .
+            .        .        .          .      x    .
+            .        .        .          .      .    y
+
+ then D looks like +
+
+            u        v        .          .      .    .
+           -v        u        .          .      .    . 
+            .        .        a          b      .    .
+            .        .       -b          a      .    .
+            .        .        .          .      x    .
+            .        .        .          .      .    y
+
+ This keeps V a real matrix in both symmetric and non-symmetric + cases, and A*V = V*D. + + + +

+ The matrix V may be badly + conditioned, or even singular, so the validity of the equation + A = V*D*inverse(V) depends upon the condition number of V. + +

+ (Adapted from JAMA, a Java Matrix Library, developed by jointly + by the Mathworks and NIST; see http://math.nist.gov/javanumerics/jama). +**/ + +template +class Eigenvalue +{ + + + /** Row and column dimension (square matrix). */ + int n; + + int issymmetric; /* boolean*/ + + /** Arrays for internal storage of eigenvalues. */ + + TNT::Array1D d; /* real part */ + TNT::Array1D e; /* img part */ + + /** Array for internal storage of eigenvectors. */ + TNT::Array2D V; + + /** Array for internal storage of nonsymmetric Hessenberg form. + @serial internal storage of nonsymmetric Hessenberg form. + */ + TNT::Array2D H; + + + /** Working storage for nonsymmetric algorithm. + @serial working storage for nonsymmetric algorithm. + */ + TNT::Array1D ort; + + + // Symmetric Householder reduction to tridiagonal form. + + void tred2() { + + // This is derived from the Algol procedures tred2 by + // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for + // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding + // Fortran subroutine in EISPACK. + + for (int j = 0; j < n; j++) { + d[j] = V[n-1][j]; + } + + // Householder reduction to tridiagonal form. + + for (int i = n-1; i > 0; i--) { + + // Scale to avoid under/overflow. + + Real scale = 0.0; + Real h = 0.0; + for (int k = 0; k < i; k++) { + scale = scale + fabs(d[k]); + } + if (scale == 0.0) { + e[i] = d[i-1]; + for (int j = 0; j < i; j++) { + d[j] = V[i-1][j]; + V[i][j] = 0.0; + V[j][i] = 0.0; + } + } else { + + // Generate Householder vector. + + for (int k = 0; k < i; k++) { + d[k] /= scale; + h += d[k] * d[k]; + } + Real f = d[i-1]; + Real g = sqrt(h); + if (f > 0) { + g = -g; + } + e[i] = scale * g; + h = h - f * g; + d[i-1] = f - g; + for (int j = 0; j < i; j++) { + e[j] = 0.0; + } + + // Apply similarity transformation to remaining columns. + + for (int j = 0; j < i; j++) { + f = d[j]; + V[j][i] = f; + g = e[j] + V[j][j] * f; + for (int k = j+1; k <= i-1; k++) { + g += V[k][j] * d[k]; + e[k] += V[k][j] * f; + } + e[j] = g; + } + f = 0.0; + for (int j = 0; j < i; j++) { + e[j] /= h; + f += e[j] * d[j]; + } + Real hh = f / (h + h); + for (int j = 0; j < i; j++) { + e[j] -= hh * d[j]; + } + for (int j = 0; j < i; j++) { + f = d[j]; + g = e[j]; + for (int k = j; k <= i-1; k++) { + V[k][j] -= (f * e[k] + g * d[k]); + } + d[j] = V[i-1][j]; + V[i][j] = 0.0; + } + } + d[i] = h; + } + + // Accumulate transformations. + + for (int i = 0; i < n-1; i++) { + V[n-1][i] = V[i][i]; + V[i][i] = 1.0; + Real h = d[i+1]; + if (h != 0.0) { + for (int k = 0; k <= i; k++) { + d[k] = V[k][i+1] / h; + } + for (int j = 0; j <= i; j++) { + Real g = 0.0; + for (int k = 0; k <= i; k++) { + g += V[k][i+1] * V[k][j]; + } + for (int k = 0; k <= i; k++) { + V[k][j] -= g * d[k]; + } + } + } + for (int k = 0; k <= i; k++) { + V[k][i+1] = 0.0; + } + } + for (int j = 0; j < n; j++) { + d[j] = V[n-1][j]; + V[n-1][j] = 0.0; + } + V[n-1][n-1] = 1.0; + e[0] = 0.0; + } + + // Symmetric tridiagonal QL algorithm. + + void tql2 () { + + // This is derived from the Algol procedures tql2, by + // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for + // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding + // Fortran subroutine in EISPACK. + + for (int i = 1; i < n; i++) { + e[i-1] = e[i]; + } + e[n-1] = 0.0; + + Real f = 0.0; + Real tst1 = 0.0; + Real eps = pow(2.0,-52.0); + for (int l = 0; l < n; l++) { + + // Find small subdiagonal element + + tst1 = max(tst1,fabs(d[l]) + fabs(e[l])); + int m = l; + + // Original while-loop from Java code + while (m < n) { + if (fabs(e[m]) <= eps*tst1) { + break; + } + m++; + } + + + // If m == l, d[l] is an eigenvalue, + // otherwise, iterate. + + if (m > l) { + int iter = 0; + do { + iter = iter + 1; // (Could check iteration count here.) + + // Compute implicit shift + + Real g = d[l]; + Real p = (d[l+1] - g) / (2.0 * e[l]); + Real r = hypot(p,1.0); + if (p < 0) { + r = -r; + } + d[l] = e[l] / (p + r); + d[l+1] = e[l] * (p + r); + Real dl1 = d[l+1]; + Real h = g - d[l]; + for (int i = l+2; i < n; i++) { + d[i] -= h; + } + f = f + h; + + // Implicit QL transformation. + + p = d[m]; + Real c = 1.0; + Real c2 = c; + Real c3 = c; + Real el1 = e[l+1]; + Real s = 0.0; + Real s2 = 0.0; + for (int i = m-1; i >= l; i--) { + c3 = c2; + c2 = c; + s2 = s; + g = c * e[i]; + h = c * p; + r = hypot(p,e[i]); + e[i+1] = s * r; + s = e[i] / r; + c = p / r; + p = c * d[i] - s * g; + d[i+1] = h + s * (c * g + s * d[i]); + + // Accumulate transformation. + + for (int k = 0; k < n; k++) { + h = V[k][i+1]; + V[k][i+1] = s * V[k][i] + c * h; + V[k][i] = c * V[k][i] - s * h; + } + } + p = -s * s2 * c3 * el1 * e[l] / dl1; + e[l] = s * p; + d[l] = c * p; + + // Check for convergence. + + } while (fabs(e[l]) > eps*tst1); + } + d[l] = d[l] + f; + e[l] = 0.0; + } + + // Sort eigenvalues and corresponding vectors. + + for (int i = 0; i < n-1; i++) { + int k = i; + Real p = d[i]; + for (int j = i+1; j < n; j++) { + if (d[j] < p) { + k = j; + p = d[j]; + } + } + if (k != i) { + d[k] = d[i]; + d[i] = p; + for (int j = 0; j < n; j++) { + p = V[j][i]; + V[j][i] = V[j][k]; + V[j][k] = p; + } + } + } + } + + // Nonsymmetric reduction to Hessenberg form. + + void orthes () { + + // This is derived from the Algol procedures orthes and ortran, + // by Martin and Wilkinson, Handbook for Auto. Comp., + // Vol.ii-Linear Algebra, and the corresponding + // Fortran subroutines in EISPACK. + + int low = 0; + int high = n-1; + + for (int m = low+1; m <= high-1; m++) { + + // Scale column. + + Real scale = 0.0; + for (int i = m; i <= high; i++) { + scale = scale + fabs(H[i][m-1]); + } + if (scale != 0.0) { + + // Compute Householder transformation. + + Real h = 0.0; + for (int i = high; i >= m; i--) { + ort[i] = H[i][m-1]/scale; + h += ort[i] * ort[i]; + } + Real g = sqrt(h); + if (ort[m] > 0) { + g = -g; + } + h = h - ort[m] * g; + ort[m] = ort[m] - g; + + // Apply Householder similarity transformation + // H = (I-u*u'/h)*H*(I-u*u')/h) + + for (int j = m; j < n; j++) { + Real f = 0.0; + for (int i = high; i >= m; i--) { + f += ort[i]*H[i][j]; + } + f = f/h; + for (int i = m; i <= high; i++) { + H[i][j] -= f*ort[i]; + } + } + + for (int i = 0; i <= high; i++) { + Real f = 0.0; + for (int j = high; j >= m; j--) { + f += ort[j]*H[i][j]; + } + f = f/h; + for (int j = m; j <= high; j++) { + H[i][j] -= f*ort[j]; + } + } + ort[m] = scale*ort[m]; + H[m][m-1] = scale*g; + } + } + + // Accumulate transformations (Algol's ortran). + + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + V[i][j] = (i == j ? 1.0 : 0.0); + } + } + + for (int m = high-1; m >= low+1; m--) { + if (H[m][m-1] != 0.0) { + for (int i = m+1; i <= high; i++) { + ort[i] = H[i][m-1]; + } + for (int j = m; j <= high; j++) { + Real g = 0.0; + for (int i = m; i <= high; i++) { + g += ort[i] * V[i][j]; + } + // Double division avoids possible underflow + g = (g / ort[m]) / H[m][m-1]; + for (int i = m; i <= high; i++) { + V[i][j] += g * ort[i]; + } + } + } + } + } + + + // Complex scalar division. + + Real cdivr, cdivi; + void cdiv(Real xr, Real xi, Real yr, Real yi) { + Real r,d; + if (fabs(yr) > fabs(yi)) { + r = yi/yr; + d = yr + r*yi; + cdivr = (xr + r*xi)/d; + cdivi = (xi - r*xr)/d; + } else { + r = yr/yi; + d = yi + r*yr; + cdivr = (r*xr + xi)/d; + cdivi = (r*xi - xr)/d; + } + } + + + // Nonsymmetric reduction from Hessenberg to real Schur form. + + void hqr2 () { + + // This is derived from the Algol procedure hqr2, + // by Martin and Wilkinson, Handbook for Auto. Comp., + // Vol.ii-Linear Algebra, and the corresponding + // Fortran subroutine in EISPACK. + + // Initialize + + int nn = this->n; + int n = nn-1; + int low = 0; + int high = nn-1; + Real eps = pow(2.0,-52.0); + Real exshift = 0.0; + Real p=0,q=0,r=0,s=0,z=0,t,w,x,y; + + // Store roots isolated by balanc and compute matrix norm + + Real norm = 0.0; + for (int i = 0; i < nn; i++) { + if ((i < low) || (i > high)) { + d[i] = H[i][i]; + e[i] = 0.0; + } + for (int j = max(i-1,0); j < nn; j++) { + norm = norm + fabs(H[i][j]); + } + } + + // Outer loop over eigenvalue index + + int iter = 0; + int totIter = 0; + while (n >= low) { + + // NT limit no. of iterations + totIter++; + if(totIter>100) { + //if(totIter>15) std::cout<<"!!!!iter ABORT !!!!!!! "< low) { + s = fabs(H[l-1][l-1]) + fabs(H[l][l]); + if (s == 0.0) { + s = norm; + } + if (fabs(H[l][l-1]) < eps * s) { + break; + } + l--; + } + + // Check for convergence + // One root found + + if (l == n) { + H[n][n] = H[n][n] + exshift; + d[n] = H[n][n]; + e[n] = 0.0; + n--; + iter = 0; + + // Two roots found + + } else if (l == n-1) { + w = H[n][n-1] * H[n-1][n]; + p = (H[n-1][n-1] - H[n][n]) / 2.0; + q = p * p + w; + z = sqrt(fabs(q)); + H[n][n] = H[n][n] + exshift; + H[n-1][n-1] = H[n-1][n-1] + exshift; + x = H[n][n]; + + // Real pair + + if (q >= 0) { + if (p >= 0) { + z = p + z; + } else { + z = p - z; + } + d[n-1] = x + z; + d[n] = d[n-1]; + if (z != 0.0) { + d[n] = x - w / z; + } + e[n-1] = 0.0; + e[n] = 0.0; + x = H[n][n-1]; + s = fabs(x) + fabs(z); + p = x / s; + q = z / s; + r = sqrt(p * p+q * q); + p = p / r; + q = q / r; + + // Row modification + + for (int j = n-1; j < nn; j++) { + z = H[n-1][j]; + H[n-1][j] = q * z + p * H[n][j]; + H[n][j] = q * H[n][j] - p * z; + } + + // Column modification + + for (int i = 0; i <= n; i++) { + z = H[i][n-1]; + H[i][n-1] = q * z + p * H[i][n]; + H[i][n] = q * H[i][n] - p * z; + } + + // Accumulate transformations + + for (int i = low; i <= high; i++) { + z = V[i][n-1]; + V[i][n-1] = q * z + p * V[i][n]; + V[i][n] = q * V[i][n] - p * z; + } + + // Complex pair + + } else { + d[n-1] = x + p; + d[n] = x + p; + e[n-1] = z; + e[n] = -z; + } + n = n - 2; + iter = 0; + + // No convergence yet + + } else { + + // Form shift + + x = H[n][n]; + y = 0.0; + w = 0.0; + if (l < n) { + y = H[n-1][n-1]; + w = H[n][n-1] * H[n-1][n]; + } + + // Wilkinson's original ad hoc shift + + if (iter == 10) { + exshift += x; + for (int i = low; i <= n; i++) { + H[i][i] -= x; + } + s = fabs(H[n][n-1]) + fabs(H[n-1][n-2]); + x = y = 0.75 * s; + w = -0.4375 * s * s; + } + + // MATLAB's new ad hoc shift + + if (iter == 30) { + s = (y - x) / 2.0; + s = s * s + w; + if (s > 0) { + s = sqrt(s); + if (y < x) { + s = -s; + } + s = x - w / ((y - x) / 2.0 + s); + for (int i = low; i <= n; i++) { + H[i][i] -= s; + } + exshift += s; + x = y = w = 0.964; + } + } + + iter = iter + 1; // (Could check iteration count here.) + + // Look for two consecutive small sub-diagonal elements + + int m = n-2; + while (m >= l) { + z = H[m][m]; + r = x - z; + s = y - z; + p = (r * s - w) / H[m+1][m] + H[m][m+1]; + q = H[m+1][m+1] - z - r - s; + r = H[m+2][m+1]; + s = fabs(p) + fabs(q) + fabs(r); + p = p / s; + q = q / s; + r = r / s; + if (m == l) { + break; + } + if (fabs(H[m][m-1]) * (fabs(q) + fabs(r)) < + eps * (fabs(p) * (fabs(H[m-1][m-1]) + fabs(z) + + fabs(H[m+1][m+1])))) { + break; + } + m--; + } + + for (int i = m+2; i <= n; i++) { + H[i][i-2] = 0.0; + if (i > m+2) { + H[i][i-3] = 0.0; + } + } + + // Double QR step involving rows l:n and columns m:n + + for (int k = m; k <= n-1; k++) { + int notlast = (k != n-1); + if (k != m) { + p = H[k][k-1]; + q = H[k+1][k-1]; + r = (notlast ? H[k+2][k-1] : 0.0); + x = fabs(p) + fabs(q) + fabs(r); + if (x != 0.0) { + p = p / x; + q = q / x; + r = r / x; + } + } + if (x == 0.0) { + break; + } + s = sqrt(p * p + q * q + r * r); + if (p < 0) { + s = -s; + } + if (s != 0) { + if (k != m) { + H[k][k-1] = -s * x; + } else if (l != m) { + H[k][k-1] = -H[k][k-1]; + } + p = p + s; + x = p / s; + y = q / s; + z = r / s; + q = q / p; + r = r / p; + + // Row modification + + for (int j = k; j < nn; j++) { + p = H[k][j] + q * H[k+1][j]; + if (notlast) { + p = p + r * H[k+2][j]; + H[k+2][j] = H[k+2][j] - p * z; + } + H[k][j] = H[k][j] - p * x; + H[k+1][j] = H[k+1][j] - p * y; + } + + // Column modification + + for (int i = 0; i <= min(n,k+3); i++) { + p = x * H[i][k] + y * H[i][k+1]; + if (notlast) { + p = p + z * H[i][k+2]; + H[i][k+2] = H[i][k+2] - p * r; + } + H[i][k] = H[i][k] - p; + H[i][k+1] = H[i][k+1] - p * q; + } + + // Accumulate transformations + + for (int i = low; i <= high; i++) { + p = x * V[i][k] + y * V[i][k+1]; + if (notlast) { + p = p + z * V[i][k+2]; + V[i][k+2] = V[i][k+2] - p * r; + } + V[i][k] = V[i][k] - p; + V[i][k+1] = V[i][k+1] - p * q; + } + } // (s != 0) + } // k loop + } // check convergence + } // while (n >= low) + //if(totIter>15) std::cout<<"!!!!iter "<= 0; n--) { + p = d[n]; + q = e[n]; + + // Real vector + + if (q == 0) { + int l = n; + H[n][n] = 1.0; + for (int i = n-1; i >= 0; i--) { + w = H[i][i] - p; + r = 0.0; + for (int j = l; j <= n; j++) { + r = r + H[i][j] * H[j][n]; + } + if (e[i] < 0.0) { + z = w; + s = r; + } else { + l = i; + if (e[i] == 0.0) { + if (w != 0.0) { + H[i][n] = -r / w; + } else { + H[i][n] = -r / (eps * norm); + } + + // Solve real equations + + } else { + x = H[i][i+1]; + y = H[i+1][i]; + q = (d[i] - p) * (d[i] - p) + e[i] * e[i]; + t = (x * s - z * r) / q; + H[i][n] = t; + if (fabs(x) > fabs(z)) { + H[i+1][n] = (-r - w * t) / x; + } else { + H[i+1][n] = (-s - y * t) / z; + } + } + + // Overflow control + + t = fabs(H[i][n]); + if ((eps * t) * t > 1) { + for (int j = i; j <= n; j++) { + H[j][n] = H[j][n] / t; + } + } + } + } + + // Complex vector + + } else if (q < 0) { + int l = n-1; + + // Last vector component imaginary so matrix is triangular + + if (fabs(H[n][n-1]) > fabs(H[n-1][n])) { + H[n-1][n-1] = q / H[n][n-1]; + H[n-1][n] = -(H[n][n] - p) / H[n][n-1]; + } else { + cdiv(0.0,-H[n-1][n],H[n-1][n-1]-p,q); + H[n-1][n-1] = cdivr; + H[n-1][n] = cdivi; + } + H[n][n-1] = 0.0; + H[n][n] = 1.0; + for (int i = n-2; i >= 0; i--) { + Real ra,sa,vr,vi; + ra = 0.0; + sa = 0.0; + for (int j = l; j <= n; j++) { + ra = ra + H[i][j] * H[j][n-1]; + sa = sa + H[i][j] * H[j][n]; + } + w = H[i][i] - p; + + if (e[i] < 0.0) { + z = w; + r = ra; + s = sa; + } else { + l = i; + if (e[i] == 0) { + cdiv(-ra,-sa,w,q); + H[i][n-1] = cdivr; + H[i][n] = cdivi; + } else { + + // Solve complex equations + + x = H[i][i+1]; + y = H[i+1][i]; + vr = (d[i] - p) * (d[i] - p) + e[i] * e[i] - q * q; + vi = (d[i] - p) * 2.0 * q; + if ((vr == 0.0) && (vi == 0.0)) { + vr = eps * norm * (fabs(w) + fabs(q) + + fabs(x) + fabs(y) + fabs(z)); + } + cdiv(x*r-z*ra+q*sa,x*s-z*sa-q*ra,vr,vi); + H[i][n-1] = cdivr; + H[i][n] = cdivi; + if (fabs(x) > (fabs(z) + fabs(q))) { + H[i+1][n-1] = (-ra - w * H[i][n-1] + q * H[i][n]) / x; + H[i+1][n] = (-sa - w * H[i][n] - q * H[i][n-1]) / x; + } else { + cdiv(-r-y*H[i][n-1],-s-y*H[i][n],z,q); + H[i+1][n-1] = cdivr; + H[i+1][n] = cdivi; + } + } + + // Overflow control + + t = max(fabs(H[i][n-1]),fabs(H[i][n])); + if ((eps * t) * t > 1) { + for (int j = i; j <= n; j++) { + H[j][n-1] = H[j][n-1] / t; + H[j][n] = H[j][n] / t; + } + } + } + } + } + } + + // Vectors of isolated roots + + for (int i = 0; i < nn; i++) { + if (i < low || i > high) { + for (int j = i; j < nn; j++) { + V[i][j] = H[i][j]; + } + } + } + + // Back transformation to get eigenvectors of original matrix + + for (int j = nn-1; j >= low; j--) { + for (int i = low; i <= high; i++) { + z = 0.0; + for (int k = low; k <= min(j,high); k++) { + z = z + V[i][k] * H[k][j]; + } + V[i][j] = z; + } + } + } + +public: + + + /** Check for symmetry, then construct the eigenvalue decomposition + @param A Square real (non-complex) matrix + */ + + Eigenvalue(const TNT::Array2D &A) { + n = A.dim2(); + V = Array2D(n,n); + d = Array1D(n); + e = Array1D(n); + + issymmetric = 1; + for (int j = 0; (j < n) && issymmetric; j++) { + for (int i = 0; (i < n) && issymmetric; i++) { + issymmetric = (A[i][j] == A[j][i]); + } + } + + if (issymmetric) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + V[i][j] = A[i][j]; + } + } + + // Tridiagonalize. + tred2(); + + // Diagonalize. + tql2(); + + } else { + H = TNT::Array2D(n,n); + ort = TNT::Array1D(n); + + for (int j = 0; j < n; j++) { + for (int i = 0; i < n; i++) { + H[i][j] = A[i][j]; + } + } + + // Reduce to Hessenberg form. + orthes(); + + // Reduce Hessenberg to real Schur form. + hqr2(); + } + } + + + /** Return the eigenvector matrix + @return V + */ + + void getV (TNT::Array2D &V_) { + V_ = V; + return; + } + + /** Return the real parts of the eigenvalues + @return real(diag(D)) + */ + + void getRealEigenvalues (TNT::Array1D &d_) { + d_ = d; + return ; + } + + /** Return the imaginary parts of the eigenvalues + in parameter e_. + + @pararm e_: new matrix with imaginary parts of the eigenvalues. + */ + void getImagEigenvalues (TNT::Array1D &e_) { + e_ = e; + return; + } + + +/** + Computes the block diagonal eigenvalue matrix. + If the original matrix A is not symmetric, then the eigenvalue + matrix D is block diagonal with the real eigenvalues in 1-by-1 + blocks and any complex eigenvalues, + a + i*b, in 2-by-2 blocks, [a, b; -b, a]. That is, if the complex + eigenvalues look like +

+
+          u + iv     .        .          .      .    .
+            .      u - iv     .          .      .    .
+            .        .      a + ib       .      .    .
+            .        .        .        a - ib   .    .
+            .        .        .          .      x    .
+            .        .        .          .      .    y
+
+ then D looks like +
+
+            u        v        .          .      .    .
+           -v        u        .          .      .    . 
+            .        .        a          b      .    .
+            .        .       -b          a      .    .
+            .        .        .          .      x    .
+            .        .        .          .      .    y
+
+ This keeps V a real matrix in both symmetric and non-symmetric + cases, and A*V = V*D. + + @param D: upon return, the matrix is filled with the block diagonal + eigenvalue matrix. + +*/ + void getD (TNT::Array2D &D) { + D = Array2D(n,n); + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + D[i][j] = 0.0; + } + D[i][i] = d[i]; + if (e[i] > 0) { + D[i][i+1] = e[i]; + } else if (e[i] < 0) { + D[i][i-1] = e[i]; + } + } + } +}; + +} //namespace JAMA + + +#endif +// JAMA_EIG_H diff --git a/intern/smoke/intern/tnt/jama_lu.h b/intern/smoke/intern/tnt/jama_lu.h new file mode 100644 index 00000000000..a4f96b11502 --- /dev/null +++ b/intern/smoke/intern/tnt/jama_lu.h @@ -0,0 +1,319 @@ +#ifndef JAMA_LU_H +#define JAMA_LU_H + +#include "tnt.h" +#include +//for min(), max() below + +using namespace TNT; +using namespace std; + +namespace JAMA +{ + + /** LU Decomposition. +

+ For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n + unit lower triangular matrix L, an n-by-n upper triangular matrix U, + and a permutation vector piv of length m so that A(piv,:) = L*U. + If m < n, then L is m-by-m and U is m-by-n. +

+ The LU decompostion with pivoting always exists, even if the matrix is + singular, so the constructor will never fail. The primary use of the + LU decomposition is in the solution of square systems of simultaneous + linear equations. This will fail if isNonsingular() returns false. + */ +template +class LU +{ + + + + /* Array for internal storage of decomposition. */ + Array2D LU_; + int m, n, pivsign; + Array1D piv; + + + Array2D permute_copy(const Array2D &A, + const Array1D &piv, int j0, int j1) + { + int piv_length = piv.dim(); + + Array2D X(piv_length, j1-j0+1); + + + for (int i = 0; i < piv_length; i++) + for (int j = j0; j <= j1; j++) + X[i][j-j0] = A[piv[i]][j]; + + return X; + } + + Array1D permute_copy(const Array1D &A, + const Array1D &piv) + { + int piv_length = piv.dim(); + if (piv_length != A.dim()) + return Array1D(); + + Array1D x(piv_length); + + + for (int i = 0; i < piv_length; i++) + x[i] = A[piv[i]]; + + return x; + } + + + public : + + /** LU Decomposition + @param A Rectangular matrix + @return LU Decomposition object to access L, U and piv. + */ + + LU (const Array2D &A) : LU_(A.copy()), m(A.dim1()), n(A.dim2()), + piv(A.dim1()) + + { + + // Use a "left-looking", dot-product, Crout/Doolittle algorithm. + + + for (int i = 0; i < m; i++) { + piv[i] = i; + } + pivsign = 1; + Real *LUrowi = 0;; + Array1D LUcolj(m); + + // Outer loop. + + for (int j = 0; j < n; j++) { + + // Make a copy of the j-th column to localize references. + + for (int i = 0; i < m; i++) { + LUcolj[i] = LU_[i][j]; + } + + // Apply previous transformations. + + for (int i = 0; i < m; i++) { + LUrowi = LU_[i]; + + // Most of the time is spent in the following dot product. + + int kmax = min(i,j); + double s = 0.0; + for (int k = 0; k < kmax; k++) { + s += LUrowi[k]*LUcolj[k]; + } + + LUrowi[j] = LUcolj[i] -= s; + } + + // Find pivot and exchange if necessary. + + int p = j; + for (int i = j+1; i < m; i++) { + if (abs(LUcolj[i]) > abs(LUcolj[p])) { + p = i; + } + } + if (p != j) { + int k=0; + for (k = 0; k < n; k++) { + double t = LU_[p][k]; + LU_[p][k] = LU_[j][k]; + LU_[j][k] = t; + } + k = piv[p]; + piv[p] = piv[j]; + piv[j] = k; + pivsign = -pivsign; + } + + // Compute multipliers. + + if ((j < m) && (LU_[j][j] != 0.0)) { + for (int i = j+1; i < m; i++) { + LU_[i][j] /= LU_[j][j]; + } + } + } + } + + + /** Is the matrix nonsingular? + @return 1 (true) if upper triangular factor U (and hence A) + is nonsingular, 0 otherwise. + */ + + int isNonsingular () { + for (int j = 0; j < n; j++) { + if (LU_[j][j] == 0) + return 0; + } + return 1; + } + + /** Return lower triangular factor + @return L + */ + + Array2D getL () { + Array2D L_(m,n); + for (int i = 0; i < m; i++) { + for (int j = 0; j < n; j++) { + if (i > j) { + L_[i][j] = LU_[i][j]; + } else if (i == j) { + L_[i][j] = 1.0; + } else { + L_[i][j] = 0.0; + } + } + } + return L_; + } + + /** Return upper triangular factor + @return U portion of LU factorization. + */ + + Array2D getU () { + Array2D U_(n,n); + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + if (i <= j) { + U_[i][j] = LU_[i][j]; + } else { + U_[i][j] = 0.0; + } + } + } + return U_; + } + + /** Return pivot permutation vector + @return piv + */ + + Array1D getPivot () { + return piv; + } + + + /** Compute determinant using LU factors. + @return determinant of A, or 0 if A is not square. + */ + + Real det () { + if (m != n) { + return Real(0); + } + Real d = Real(pivsign); + for (int j = 0; j < n; j++) { + d *= LU_[j][j]; + } + return d; + } + + /** Solve A*X = B + @param B A Matrix with as many rows as A and any number of columns. + @return X so that L*U*X = B(piv,:), if B is nonconformant, returns + 0x0 (null) array. + */ + + Array2D solve (const Array2D &B) + { + + /* Dimensions: A is mxn, X is nxk, B is mxk */ + + if (B.dim1() != m) { + return Array2D(0,0); + } + if (!isNonsingular()) { + return Array2D(0,0); + } + + // Copy right hand side with pivoting + int nx = B.dim2(); + + + Array2D X = permute_copy(B, piv, 0, nx-1); + + // Solve L*Y = B(piv,:) + for (int k = 0; k < n; k++) { + for (int i = k+1; i < n; i++) { + for (int j = 0; j < nx; j++) { + X[i][j] -= X[k][j]*LU_[i][k]; + } + } + } + // Solve U*X = Y; + for (int k = n-1; k >= 0; k--) { + for (int j = 0; j < nx; j++) { + X[k][j] /= LU_[k][k]; + } + for (int i = 0; i < k; i++) { + for (int j = 0; j < nx; j++) { + X[i][j] -= X[k][j]*LU_[i][k]; + } + } + } + return X; + } + + + /** Solve A*x = b, where x and b are vectors of length equal + to the number of rows in A. + + @param b a vector (Array1D> of length equal to the first dimension + of A. + @return x a vector (Array1D> so that L*U*x = b(piv), if B is nonconformant, + returns 0x0 (null) array. + */ + + Array1D solve (const Array1D &b) + { + + /* Dimensions: A is mxn, X is nxk, B is mxk */ + + if (b.dim1() != m) { + return Array1D(); + } + if (!isNonsingular()) { + return Array1D(); + } + + + Array1D x = permute_copy(b, piv); + + // Solve L*Y = B(piv) + for (int k = 0; k < n; k++) { + for (int i = k+1; i < n; i++) { + x[i] -= x[k]*LU_[i][k]; + } + } + + // Solve U*X = Y; + for (int k = n-1; k >= 0; k--) { + x[k] /= LU_[k][k]; + for (int i = 0; i < k; i++) + x[i] -= x[k]*LU_[i][k]; + } + + + return x; + } + +}; /* class LU */ + +} /* namespace JAMA */ + +#endif +/* JAMA_LU_H */ diff --git a/intern/smoke/intern/tnt/tnt.h b/intern/smoke/intern/tnt/tnt.h new file mode 100644 index 00000000000..92463e08a06 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt.h @@ -0,0 +1,64 @@ +/* +* +* Template Numerical Toolkit (TNT): Linear Algebra Module +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + +#ifndef TNT_H +#define TNT_H + + + +//--------------------------------------------------------------------- +// Define this macro if you want TNT to track some of the out-of-bounds +// indexing. This can encur a small run-time overhead, but is recommended +// while developing code. It can be turned off for production runs. +// +// #define TNT_BOUNDS_CHECK +//--------------------------------------------------------------------- +// + +//#define TNT_BOUNDS_CHECK + + + +#include "tnt_version.h" +#include "tnt_math_utils.h" +#include "tnt_array1d.h" +#include "tnt_array2d.h" +#include "tnt_array3d.h" +#include "tnt_array1d_utils.h" +#include "tnt_array2d_utils.h" +#include "tnt_array3d_utils.h" + +#include "tnt_fortran_array1d.h" +#include "tnt_fortran_array2d.h" +#include "tnt_fortran_array3d.h" +#include "tnt_fortran_array1d_utils.h" +#include "tnt_fortran_array2d_utils.h" +#include "tnt_fortran_array3d_utils.h" + +#include "tnt_sparse_matrix_csr.h" + +#include "tnt_stopwatch.h" +#include "tnt_subscript.h" +#include "tnt_vec.h" +#include "tnt_cmat.h" + + +#endif +// TNT_H diff --git a/intern/smoke/intern/tnt/tnt_array1d.h b/intern/smoke/intern/tnt/tnt_array1d.h new file mode 100644 index 00000000000..858df579863 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_array1d.h @@ -0,0 +1,278 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef TNT_ARRAY1D_H +#define TNT_ARRAY1D_H + +//#include +#include + +#ifdef TNT_BOUNDS_CHECK +#include +#endif + + +#include "tnt_i_refvec.h" + +namespace TNT +{ + +template +class Array1D +{ + + private: + + /* ... */ + i_refvec v_; + int n_; + T* data_; /* this normally points to v_.begin(), but + * could also point to a portion (subvector) + * of v_. + */ + + void copy_(T* p, const T* q, int len) const; + void set_(T* begin, T* end, const T& val); + + + public: + + typedef T value_type; + + + Array1D(); + explicit Array1D(int n); + Array1D(int n, const T &a); + Array1D(int n, T *a); + inline Array1D(const Array1D &A); + inline operator T*(); + inline operator const T*(); + inline Array1D & operator=(const T &a); + inline Array1D & operator=(const Array1D &A); + inline Array1D & ref(const Array1D &A); + Array1D copy() const; + Array1D & inject(const Array1D & A); + inline T& operator[](int i); + inline const T& operator[](int i) const; + inline int dim1() const; + inline int dim() const; + ~Array1D(); + + + /* ... extended interface ... */ + + inline int ref_count() const; + inline Array1D subarray(int i0, int i1); + +}; + + + + +template +Array1D::Array1D() : v_(), n_(0), data_(0) {} + +template +Array1D::Array1D(const Array1D &A) : v_(A.v_), n_(A.n_), + data_(A.data_) +{ +#ifdef TNT_DEBUG + std::cout << "Created Array1D(const Array1D &A) \n"; +#endif + +} + + +template +Array1D::Array1D(int n) : v_(n), n_(n), data_(v_.begin()) +{ +#ifdef TNT_DEBUG + std::cout << "Created Array1D(int n) \n"; +#endif +} + +template +Array1D::Array1D(int n, const T &val) : v_(n), n_(n), data_(v_.begin()) +{ +#ifdef TNT_DEBUG + std::cout << "Created Array1D(int n, const T& val) \n"; +#endif + set_(data_, data_+ n, val); + +} + +template +Array1D::Array1D(int n, T *a) : v_(a), n_(n) , data_(v_.begin()) +{ +#ifdef TNT_DEBUG + std::cout << "Created Array1D(int n, T* a) \n"; +#endif +} + +template +inline Array1D::operator T*() +{ + return &(v_[0]); +} + + +template +inline Array1D::operator const T*() +{ + return &(v_[0]); +} + + + +template +inline T& Array1D::operator[](int i) +{ +#ifdef TNT_BOUNDS_CHECK + assert(i>= 0); + assert(i < n_); +#endif + return data_[i]; +} + +template +inline const T& Array1D::operator[](int i) const +{ +#ifdef TNT_BOUNDS_CHECK + assert(i>= 0); + assert(i < n_); +#endif + return data_[i]; +} + + + + +template +Array1D & Array1D::operator=(const T &a) +{ + set_(data_, data_+n_, a); + return *this; +} + +template +Array1D Array1D::copy() const +{ + Array1D A( n_); + copy_(A.data_, data_, n_); + + return A; +} + + +template +Array1D & Array1D::inject(const Array1D &A) +{ + if (A.n_ == n_) + copy_(data_, A.data_, n_); + + return *this; +} + + + + + +template +Array1D & Array1D::ref(const Array1D &A) +{ + if (this != &A) + { + v_ = A.v_; /* operator= handles the reference counting. */ + n_ = A.n_; + data_ = A.data_; + + } + return *this; +} + +template +Array1D & Array1D::operator=(const Array1D &A) +{ + return ref(A); +} + +template +inline int Array1D::dim1() const { return n_; } + +template +inline int Array1D::dim() const { return n_; } + +template +Array1D::~Array1D() {} + + +/* ............................ exented interface ......................*/ + +template +inline int Array1D::ref_count() const +{ + return v_.ref_count(); +} + +template +inline Array1D Array1D::subarray(int i0, int i1) +{ + if ((i0 > 0) && (i1 < n_) || (i0 <= i1)) + { + Array1D X(*this); /* create a new instance of this array. */ + X.n_ = i1-i0+1; + X.data_ += i0; + + return X; + } + else + { + return Array1D(); + } +} + + +/* private internal functions */ + + +template +void Array1D::set_(T* begin, T* end, const T& a) +{ + for (T* p=begin; p +void Array1D::copy_(T* p, const T* q, int len) const +{ + T *end = p + len; + while (p +#include + +namespace TNT +{ + + +template +std::ostream& operator<<(std::ostream &s, const Array1D &A) +{ + int N=A.dim1(); + +#ifdef TNT_DEBUG + s << "addr: " << (void *) &A[0] << "\n"; +#endif + s << N << "\n"; + for (int j=0; j +std::istream& operator>>(std::istream &s, Array1D &A) +{ + int N; + s >> N; + + Array1D B(N); + for (int i=0; i> B[i]; + A = B; + return s; +} + + + +template +Array1D operator+(const Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Array1D(); + + else + { + Array1D C(n); + + for (int i=0; i +Array1D operator-(const Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Array1D(); + + else + { + Array1D C(n); + + for (int i=0; i +Array1D operator*(const Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Array1D(); + + else + { + Array1D C(n); + + for (int i=0; i +Array1D operator/(const Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Array1D(); + + else + { + Array1D C(n); + + for (int i=0; i +Array1D& operator+=(Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=0; i +Array1D& operator-=(Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=0; i +Array1D& operator*=(Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=0; i +Array1D& operator/=(Array1D &A, const Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=0; i +#include +#ifdef TNT_BOUNDS_CHECK +#include +#endif + +#include "tnt_array1d.h" + +namespace TNT +{ + +template +class Array2D +{ + + + private: + + + + Array1D data_; + Array1D v_; + int m_; + int n_; + + public: + + typedef T value_type; + Array2D(); + Array2D(int m, int n); + Array2D(int m, int n, T *a); + Array2D(int m, int n, const T &a); + inline Array2D(const Array2D &A); + inline operator T**(); + inline operator const T**(); + inline Array2D & operator=(const T &a); + inline Array2D & operator=(const Array2D &A); + inline Array2D & ref(const Array2D &A); + Array2D copy() const; + Array2D & inject(const Array2D & A); + inline T* operator[](int i); + inline const T* operator[](int i) const; + inline int dim1() const; + inline int dim2() const; + ~Array2D(); + + /* extended interface (not part of the standard) */ + + + inline int ref_count(); + inline int ref_count_data(); + inline int ref_count_dim1(); + Array2D subarray(int i0, int i1, int j0, int j1); + +}; + + +template +Array2D::Array2D() : data_(), v_(), m_(0), n_(0) {} + +template +Array2D::Array2D(const Array2D &A) : data_(A.data_), v_(A.v_), + m_(A.m_), n_(A.n_) {} + + + + +template +Array2D::Array2D(int m, int n) : data_(m*n), v_(m), m_(m), n_(n) +{ + if (m>0 && n>0) + { + T* p = &(data_[0]); + for (int i=0; i +Array2D::Array2D(int m, int n, const T &val) : data_(m*n), v_(m), + m_(m), n_(n) +{ + if (m>0 && n>0) + { + data_ = val; + T* p = &(data_[0]); + for (int i=0; i +Array2D::Array2D(int m, int n, T *a) : data_(m*n, a), v_(m), m_(m), n_(n) +{ + if (m>0 && n>0) + { + T* p = &(data_[0]); + + for (int i=0; i +inline T* Array2D::operator[](int i) +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 0); + assert(i < m_); +#endif + +return v_[i]; + +} + + +template +inline const T* Array2D::operator[](int i) const +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 0); + assert(i < m_); +#endif + +return v_[i]; + +} + +template +Array2D & Array2D::operator=(const T &a) +{ + /* non-optimzied, but will work with subarrays in future verions */ + + for (int i=0; i +Array2D Array2D::copy() const +{ + Array2D A(m_, n_); + + for (int i=0; i +Array2D & Array2D::inject(const Array2D &A) +{ + if (A.m_ == m_ && A.n_ == n_) + { + for (int i=0; i +Array2D & Array2D::ref(const Array2D &A) +{ + if (this != &A) + { + v_ = A.v_; + data_ = A.data_; + m_ = A.m_; + n_ = A.n_; + + } + return *this; +} + + + +template +Array2D & Array2D::operator=(const Array2D &A) +{ + return ref(A); +} + +template +inline int Array2D::dim1() const { return m_; } + +template +inline int Array2D::dim2() const { return n_; } + + +template +Array2D::~Array2D() {} + + + + +template +inline Array2D::operator T**() +{ + return &(v_[0]); +} +template +inline Array2D::operator const T**() +{ + return &(v_[0]); +} + +/* ............... extended interface ............... */ +/** + Create a new view to a subarray defined by the boundaries + [i0][i0] and [i1][j1]. The size of the subarray is + (i1-i0) by (j1-j0). If either of these lengths are zero + or negative, the subarray view is null. + +*/ +template +Array2D Array2D::subarray(int i0, int i1, int j0, int j1) +{ + Array2D A; + int m = i1-i0+1; + int n = j1-j0+1; + + /* if either length is zero or negative, this is an invalide + subarray. return a null view. + */ + if (m<1 || n<1) + return A; + + A.data_ = data_; + A.m_ = m; + A.n_ = n; + A.v_ = Array1D(m); + T* p = &(data_[0]) + i0 * n_ + j0; + for (int i=0; i +inline int Array2D::ref_count() +{ + return ref_count_data(); +} + + + +template +inline int Array2D::ref_count_data() +{ + return data_.ref_count(); +} + +template +inline int Array2D::ref_count_dim1() +{ + return v_.ref_count(); +} + + + + +} /* namespace TNT */ + +#endif +/* TNT_ARRAY2D_H */ + diff --git a/intern/smoke/intern/tnt/tnt_array2d_utils.h b/intern/smoke/intern/tnt/tnt_array2d_utils.h new file mode 100644 index 00000000000..7041ed37857 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_array2d_utils.h @@ -0,0 +1,287 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + +#ifndef TNT_ARRAY2D_UTILS_H +#define TNT_ARRAY2D_UTILS_H + +#include +#include + +namespace TNT +{ + + +template +std::ostream& operator<<(std::ostream &s, const Array2D &A) +{ + int M=A.dim1(); + int N=A.dim2(); + + s << M << " " << N << "\n"; + + for (int i=0; i +std::istream& operator>>(std::istream &s, Array2D &A) +{ + + int M, N; + + s >> M >> N; + + Array2D B(M,N); + + for (int i=0; i> B[i][j]; + } + + A = B; + return s; +} + + +template +Array2D operator+(const Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Array2D(); + + else + { + Array2D C(m,n); + + for (int i=0; i +Array2D operator-(const Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Array2D(); + + else + { + Array2D C(m,n); + + for (int i=0; i +Array2D operator*(const Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Array2D(); + + else + { + Array2D C(m,n); + + for (int i=0; i +Array2D operator/(const Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Array2D(); + + else + { + Array2D C(m,n); + + for (int i=0; i +Array2D& operator+=(Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=0; i +Array2D& operator-=(Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=0; i +Array2D& operator*=(Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=0; i +Array2D& operator/=(Array2D &A, const Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=0; i +Array2D matmult(const Array2D &A, const Array2D &B) +{ + if (A.dim2() != B.dim1()) + return Array2D(); + + int M = A.dim1(); + int N = A.dim2(); + int K = B.dim2(); + + Array2D C(M,K); + + for (int i=0; i +#include +#ifdef TNT_BOUNDS_CHECK +#include +#endif + +#include "tnt_array1d.h" +#include "tnt_array2d.h" + +namespace TNT +{ + +template +class Array3D +{ + + + private: + Array1D data_; + Array2D v_; + int m_; + int n_; + int g_; + + + public: + + typedef T value_type; + + Array3D(); + Array3D(int m, int n, int g); + Array3D(int m, int n, int g, T val); + Array3D(int m, int n, int g, T *a); + + inline operator T***(); + inline operator const T***(); + inline Array3D(const Array3D &A); + inline Array3D & operator=(const T &a); + inline Array3D & operator=(const Array3D &A); + inline Array3D & ref(const Array3D &A); + Array3D copy() const; + Array3D & inject(const Array3D & A); + + inline T** operator[](int i); + inline const T* const * operator[](int i) const; + inline int dim1() const; + inline int dim2() const; + inline int dim3() const; + ~Array3D(); + + /* extended interface */ + + inline int ref_count(){ return data_.ref_count(); } + Array3D subarray(int i0, int i1, int j0, int j1, + int k0, int k1); +}; + +template +Array3D::Array3D() : data_(), v_(), m_(0), n_(0) {} + +template +Array3D::Array3D(const Array3D &A) : data_(A.data_), + v_(A.v_), m_(A.m_), n_(A.n_), g_(A.g_) +{ +} + + + +template +Array3D::Array3D(int m, int n, int g) : data_(m*n*g), v_(m,n), + m_(m), n_(n), g_(g) +{ + + if (m>0 && n>0 && g>0) + { + T* p = & (data_[0]); + int ng = n_*g_; + + for (int i=0; i +Array3D::Array3D(int m, int n, int g, T val) : data_(m*n*g, val), + v_(m,n), m_(m), n_(n), g_(g) +{ + if (m>0 && n>0 && g>0) + { + + T* p = & (data_[0]); + int ng = n_*g_; + + for (int i=0; i +Array3D::Array3D(int m, int n, int g, T* a) : + data_(m*n*g, a), v_(m,n), m_(m), n_(n), g_(g) +{ + + if (m>0 && n>0 && g>0) + { + T* p = & (data_[0]); + int ng = n_*g_; + + for (int i=0; i +inline T** Array3D::operator[](int i) +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 0); + assert(i < m_); +#endif + +return v_[i]; + +} + +template +inline const T* const * Array3D::operator[](int i) const +{ return v_[i]; } + +template +Array3D & Array3D::operator=(const T &a) +{ + for (int i=0; i +Array3D Array3D::copy() const +{ + Array3D A(m_, n_, g_); + for (int i=0; i +Array3D & Array3D::inject(const Array3D &A) +{ + if (A.m_ == m_ && A.n_ == n_ && A.g_ == g_) + + for (int i=0; i +Array3D & Array3D::ref(const Array3D &A) +{ + if (this != &A) + { + m_ = A.m_; + n_ = A.n_; + g_ = A.g_; + v_ = A.v_; + data_ = A.data_; + } + return *this; +} + +template +Array3D & Array3D::operator=(const Array3D &A) +{ + return ref(A); +} + + +template +inline int Array3D::dim1() const { return m_; } + +template +inline int Array3D::dim2() const { return n_; } + +template +inline int Array3D::dim3() const { return g_; } + + + +template +Array3D::~Array3D() {} + +template +inline Array3D::operator T***() +{ + return v_; +} + + +template +inline Array3D::operator const T***() +{ + return v_; +} + +/* extended interface */ +template +Array3D Array3D::subarray(int i0, int i1, int j0, + int j1, int k0, int k1) +{ + + /* check that ranges are valid. */ + if (!( 0 <= i0 && i0 <= i1 && i1 < m_ && + 0 <= j0 && j0 <= j1 && j1 < n_ && + 0 <= k0 && k0 <= k1 && k1 < g_)) + return Array3D(); /* null array */ + + + Array3D A; + A.data_ = data_; + A.m_ = i1-i0+1; + A.n_ = j1-j0+1; + A.g_ = k1-k0+1; + A.v_ = Array2D(A.m_,A.n_); + T* p = &(data_[0]) + i0*n_*g_ + j0*g_ + k0; + + for (int i=0; i +#include + +namespace TNT +{ + + +template +std::ostream& operator<<(std::ostream &s, const Array3D &A) +{ + int M=A.dim1(); + int N=A.dim2(); + int K=A.dim3(); + + s << M << " " << N << " " << K << "\n"; + + for (int i=0; i +std::istream& operator>>(std::istream &s, Array3D &A) +{ + + int M, N, K; + + s >> M >> N >> K; + + Array3D B(M,N,K); + + for (int i=0; i> B[i][j][k]; + + A = B; + return s; +} + + + +template +Array3D operator+(const Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Array3D(); + + else + { + Array3D C(m,n,p); + + for (int i=0; i +Array3D operator-(const Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Array3D(); + + else + { + Array3D C(m,n,p); + + for (int i=0; i +Array3D operator*(const Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Array3D(); + + else + { + Array3D C(m,n,p); + + for (int i=0; i +Array3D operator/(const Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Array3D(); + + else + { + Array3D C(m,n,p); + + for (int i=0; i +Array3D& operator+=(Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=0; i +Array3D& operator-=(Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=0; i +Array3D& operator*=(Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=0; i +Array3D& operator/=(Array3D &A, const Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=0; i +#include +#include +#include + +namespace TNT +{ + + +template +class Matrix +{ + + + public: + + typedef Subscript size_type; + typedef T value_type; + typedef T element_type; + typedef T* pointer; + typedef T* iterator; + typedef T& reference; + typedef const T* const_iterator; + typedef const T& const_reference; + + Subscript lbound() const { return 1;} + + protected: + Subscript m_; + Subscript n_; + Subscript mn_; // total size + T* v_; + T** row_; + T* vm1_ ; // these point to the same data, but are 1-based + T** rowm1_; + + // internal helper function to create the array + // of row pointers + + void initialize(Subscript M, Subscript N) + { + mn_ = M*N; + m_ = M; + n_ = N; + + v_ = new T[mn_]; + row_ = new T*[M]; + rowm1_ = new T*[M]; + + assert(v_ != NULL); + assert(row_ != NULL); + assert(rowm1_ != NULL); + + T* p = v_; + vm1_ = v_ - 1; + for (Subscript i=0; i &A) + { + initialize(A.m_, A.n_); + copy(A.v_); + } + + Matrix(Subscript M, Subscript N, const T& value = T()) + { + initialize(M,N); + set(value); + } + + Matrix(Subscript M, Subscript N, const T* v) + { + initialize(M,N); + copy(v); + } + + Matrix(Subscript M, Subscript N, const char *s) + { + initialize(M,N); + //std::istrstream ins(s); + std::istringstream ins(s); + + Subscript i, j; + + for (i=0; i> row_[i][j]; + } + + // destructor + // + ~Matrix() + { + destroy(); + } + + + // reallocating + // + Matrix& newsize(Subscript M, Subscript N) + { + if (num_rows() == M && num_cols() == N) + return *this; + + destroy(); + initialize(M,N); + + return *this; + } + + + + + // assignments + // + Matrix& operator=(const Matrix &A) + { + if (v_ == A.v_) + return *this; + + if (m_ == A.m_ && n_ == A.n_) // no need to re-alloc + copy(A.v_); + + else + { + destroy(); + initialize(A.m_, A.n_); + copy(A.v_); + } + + return *this; + } + + Matrix& operator=(const T& scalar) + { + set(scalar); + return *this; + } + + + Subscript dim(Subscript d) const + { +#ifdef TNT_BOUNDS_CHECK + assert( d >= 1); + assert( d <= 2); +#endif + return (d==1) ? m_ : ((d==2) ? n_ : 0); + } + + Subscript num_rows() const { return m_; } + Subscript num_cols() const { return n_; } + + + + + inline T* operator[](Subscript i) + { +#ifdef TNT_BOUNDS_CHECK + assert(0<=i); + assert(i < m_) ; +#endif + return row_[i]; + } + + inline const T* operator[](Subscript i) const + { +#ifdef TNT_BOUNDS_CHECK + assert(0<=i); + assert(i < m_) ; +#endif + return row_[i]; + } + + inline reference operator()(Subscript i) + { +#ifdef TNT_BOUNDS_CHECK + assert(1<=i); + assert(i <= mn_) ; +#endif + return vm1_[i]; + } + + inline const_reference operator()(Subscript i) const + { +#ifdef TNT_BOUNDS_CHECK + assert(1<=i); + assert(i <= mn_) ; +#endif + return vm1_[i]; + } + + + + inline reference operator()(Subscript i, Subscript j) + { +#ifdef TNT_BOUNDS_CHECK + assert(1<=i); + assert(i <= m_) ; + assert(1<=j); + assert(j <= n_); +#endif + return rowm1_[i][j]; + } + + + + inline const_reference operator() (Subscript i, Subscript j) const + { +#ifdef TNT_BOUNDS_CHECK + assert(1<=i); + assert(i <= m_) ; + assert(1<=j); + assert(j <= n_); +#endif + return rowm1_[i][j]; + } + + + + +}; + + +/* *************************** I/O ********************************/ + +template +std::ostream& operator<<(std::ostream &s, const Matrix &A) +{ + Subscript M=A.num_rows(); + Subscript N=A.num_cols(); + + s << M << " " << N << "\n"; + + for (Subscript i=0; i +std::istream& operator>>(std::istream &s, Matrix &A) +{ + + Subscript M, N; + + s >> M >> N; + + if ( !(M == A.num_rows() && N == A.num_cols() )) + { + A.newsize(M,N); + } + + + for (Subscript i=0; i> A[i][j]; + } + + + return s; +} + +// *******************[ basic matrix algorithms ]*************************** + + +template +Matrix operator+(const Matrix &A, + const Matrix &B) +{ + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + + assert(M==B.num_rows()); + assert(N==B.num_cols()); + + Matrix tmp(M,N); + Subscript i,j; + + for (i=0; i +Matrix operator-(const Matrix &A, + const Matrix &B) +{ + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + + assert(M==B.num_rows()); + assert(N==B.num_cols()); + + Matrix tmp(M,N); + Subscript i,j; + + for (i=0; i +Matrix mult_element(const Matrix &A, + const Matrix &B) +{ + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + + assert(M==B.num_rows()); + assert(N==B.num_cols()); + + Matrix tmp(M,N); + Subscript i,j; + + for (i=0; i +Matrix transpose(const Matrix &A) +{ + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + + Matrix S(N,M); + Subscript i, j; + + for (i=0; i +inline Matrix matmult(const Matrix &A, + const Matrix &B) +{ + +#ifdef TNT_BOUNDS_CHECK + assert(A.num_cols() == B.num_rows()); +#endif + + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + Subscript K = B.num_cols(); + + Matrix tmp(M,K); + T sum; + + for (Subscript i=0; i +inline Matrix operator*(const Matrix &A, + const Matrix &B) +{ + return matmult(A,B); +} + +template +inline int matmult(Matrix& C, const Matrix &A, + const Matrix &B) +{ + + assert(A.num_cols() == B.num_rows()); + + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + Subscript K = B.num_cols(); + + C.newsize(M,K); + + T sum; + + const T* row_i; + const T* col_k; + + for (Subscript i=0; i +Vector matmult(const Matrix &A, const Vector &x) +{ + +#ifdef TNT_BOUNDS_CHECK + assert(A.num_cols() == x.dim()); +#endif + + Subscript M = A.num_rows(); + Subscript N = A.num_cols(); + + Vector tmp(M); + T sum; + + for (Subscript i=0; i +inline Vector operator*(const Matrix &A, const Vector &x) +{ + return matmult(A,x); +} + +} // namespace TNT + +#endif +// CMAT_H diff --git a/intern/smoke/intern/tnt/tnt_fortran_array1d.h b/intern/smoke/intern/tnt/tnt_fortran_array1d.h new file mode 100644 index 00000000000..ad3bba0c0a7 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_fortran_array1d.h @@ -0,0 +1,267 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef TNT_FORTRAN_ARRAY1D_H +#define TNT_FORTRAN_ARRAY1D_H + +#include +#include + +#ifdef TNT_BOUNDS_CHECK +#include +#endif + + +#include "tnt_i_refvec.h" + +namespace TNT +{ + +template +class Fortran_Array1D +{ + + private: + + i_refvec v_; + int n_; + T* data_; /* this normally points to v_.begin(), but + * could also point to a portion (subvector) + * of v_. + */ + + void initialize_(int n); + void copy_(T* p, const T* q, int len) const; + void set_(T* begin, T* end, const T& val); + + + public: + + typedef T value_type; + + + Fortran_Array1D(); + explicit Fortran_Array1D(int n); + Fortran_Array1D(int n, const T &a); + Fortran_Array1D(int n, T *a); + inline Fortran_Array1D(const Fortran_Array1D &A); + inline Fortran_Array1D & operator=(const T &a); + inline Fortran_Array1D & operator=(const Fortran_Array1D &A); + inline Fortran_Array1D & ref(const Fortran_Array1D &A); + Fortran_Array1D copy() const; + Fortran_Array1D & inject(const Fortran_Array1D & A); + inline T& operator()(int i); + inline const T& operator()(int i) const; + inline int dim1() const; + inline int dim() const; + ~Fortran_Array1D(); + + + /* ... extended interface ... */ + + inline int ref_count() const; + inline Fortran_Array1D subarray(int i0, int i1); + +}; + + + + +template +Fortran_Array1D::Fortran_Array1D() : v_(), n_(0), data_(0) {} + +template +Fortran_Array1D::Fortran_Array1D(const Fortran_Array1D &A) : v_(A.v_), n_(A.n_), + data_(A.data_) +{ +#ifdef TNT_DEBUG + std::cout << "Created Fortran_Array1D(const Fortran_Array1D &A) \n"; +#endif + +} + + +template +Fortran_Array1D::Fortran_Array1D(int n) : v_(n), n_(n), data_(v_.begin()) +{ +#ifdef TNT_DEBUG + std::cout << "Created Fortran_Array1D(int n) \n"; +#endif +} + +template +Fortran_Array1D::Fortran_Array1D(int n, const T &val) : v_(n), n_(n), data_(v_.begin()) +{ +#ifdef TNT_DEBUG + std::cout << "Created Fortran_Array1D(int n, const T& val) \n"; +#endif + set_(data_, data_+ n, val); + +} + +template +Fortran_Array1D::Fortran_Array1D(int n, T *a) : v_(a), n_(n) , data_(v_.begin()) +{ +#ifdef TNT_DEBUG + std::cout << "Created Fortran_Array1D(int n, T* a) \n"; +#endif +} + +template +inline T& Fortran_Array1D::operator()(int i) +{ +#ifdef TNT_BOUNDS_CHECK + assert(i>= 1); + assert(i <= n_); +#endif + return data_[i-1]; +} + +template +inline const T& Fortran_Array1D::operator()(int i) const +{ +#ifdef TNT_BOUNDS_CHECK + assert(i>= 1); + assert(i <= n_); +#endif + return data_[i-1]; +} + + + + +template +Fortran_Array1D & Fortran_Array1D::operator=(const T &a) +{ + set_(data_, data_+n_, a); + return *this; +} + +template +Fortran_Array1D Fortran_Array1D::copy() const +{ + Fortran_Array1D A( n_); + copy_(A.data_, data_, n_); + + return A; +} + + +template +Fortran_Array1D & Fortran_Array1D::inject(const Fortran_Array1D &A) +{ + if (A.n_ == n_) + copy_(data_, A.data_, n_); + + return *this; +} + + + + + +template +Fortran_Array1D & Fortran_Array1D::ref(const Fortran_Array1D &A) +{ + if (this != &A) + { + v_ = A.v_; /* operator= handles the reference counting. */ + n_ = A.n_; + data_ = A.data_; + + } + return *this; +} + +template +Fortran_Array1D & Fortran_Array1D::operator=(const Fortran_Array1D &A) +{ + return ref(A); +} + +template +inline int Fortran_Array1D::dim1() const { return n_; } + +template +inline int Fortran_Array1D::dim() const { return n_; } + +template +Fortran_Array1D::~Fortran_Array1D() {} + + +/* ............................ exented interface ......................*/ + +template +inline int Fortran_Array1D::ref_count() const +{ + return v_.ref_count(); +} + +template +inline Fortran_Array1D Fortran_Array1D::subarray(int i0, int i1) +{ +#ifdef TNT_DEBUG + std::cout << "entered subarray. \n"; +#endif + if ((i0 > 0) && (i1 < n_) || (i0 <= i1)) + { + Fortran_Array1D X(*this); /* create a new instance of this array. */ + X.n_ = i1-i0+1; + X.data_ += i0; + + return X; + } + else + { +#ifdef TNT_DEBUG + std::cout << "subarray: null return.\n"; +#endif + return Fortran_Array1D(); + } +} + + +/* private internal functions */ + + +template +void Fortran_Array1D::set_(T* begin, T* end, const T& a) +{ + for (T* p=begin; p +void Fortran_Array1D::copy_(T* p, const T* q, int len) const +{ + T *end = p + len; + while (p + +namespace TNT +{ + + +/** + Write an array to a character outstream. Output format is one that can + be read back in via the in-stream operator: one integer + denoting the array dimension (n), followed by n elements, + one per line. + +*/ +template +std::ostream& operator<<(std::ostream &s, const Fortran_Array1D &A) +{ + int N=A.dim1(); + + s << N << "\n"; + for (int j=1; j<=N; j++) + { + s << A(j) << "\n"; + } + s << "\n"; + + return s; +} + +/** + Read an array from a character stream. Input format + is one integer, denoting the dimension (n), followed + by n whitespace-separated elments. Newlines are ignored + +

+ Note: the array being read into references new memory + storage. If the intent is to fill an existing conformant + array, use cin >> B; A.inject(B) ); + instead or read the elements in one-a-time by hand. + + @param s the charater to read from (typically std::in) + @param A the array to read into. +*/ +template +std::istream& operator>>(std::istream &s, Fortran_Array1D &A) +{ + int N; + s >> N; + + Fortran_Array1D B(N); + for (int i=1; i<=N; i++) + s >> B(i); + A = B; + return s; +} + + +template +Fortran_Array1D operator+(const Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Fortran_Array1D(); + + else + { + Fortran_Array1D C(n); + + for (int i=1; i<=n; i++) + { + C(i) = A(i) + B(i); + } + return C; + } +} + + + +template +Fortran_Array1D operator-(const Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Fortran_Array1D(); + + else + { + Fortran_Array1D C(n); + + for (int i=1; i<=n; i++) + { + C(i) = A(i) - B(i); + } + return C; + } +} + + +template +Fortran_Array1D operator*(const Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Fortran_Array1D(); + + else + { + Fortran_Array1D C(n); + + for (int i=1; i<=n; i++) + { + C(i) = A(i) * B(i); + } + return C; + } +} + + +template +Fortran_Array1D operator/(const Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() != n ) + return Fortran_Array1D(); + + else + { + Fortran_Array1D C(n); + + for (int i=1; i<=n; i++) + { + C(i) = A(i) / B(i); + } + return C; + } +} + + + + + + + + + +template +Fortran_Array1D& operator+=(Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=1; i<=n; i++) + { + A(i) += B(i); + } + } + return A; +} + + + + +template +Fortran_Array1D& operator-=(Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=1; i<=n; i++) + { + A(i) -= B(i); + } + } + return A; +} + + + +template +Fortran_Array1D& operator*=(Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=1; i<=n; i++) + { + A(i) *= B(i); + } + } + return A; +} + + + + +template +Fortran_Array1D& operator/=(Fortran_Array1D &A, const Fortran_Array1D &B) +{ + int n = A.dim1(); + + if (B.dim1() == n) + { + for (int i=1; i<=n; i++) + { + A(i) /= B(i); + } + } + return A; +} + + +} // namespace TNT + +#endif diff --git a/intern/smoke/intern/tnt/tnt_fortran_array2d.h b/intern/smoke/intern/tnt/tnt_fortran_array2d.h new file mode 100644 index 00000000000..f3075366d37 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_fortran_array2d.h @@ -0,0 +1,225 @@ +/* +* +* Template Numerical Toolkit (TNT): Two-dimensional Fortran numerical array +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef TNT_FORTRAN_ARRAY2D_H +#define TNT_FORTRAN_ARRAY2D_H + +#include +#include + +#ifdef TNT_BOUNDS_CHECK +#include +#endif + +#include "tnt_i_refvec.h" + +namespace TNT +{ + +template +class Fortran_Array2D +{ + + + private: + i_refvec v_; + int m_; + int n_; + T* data_; + + + void initialize_(int n); + void copy_(T* p, const T* q, int len); + void set_(T* begin, T* end, const T& val); + + public: + + typedef T value_type; + + Fortran_Array2D(); + Fortran_Array2D(int m, int n); + Fortran_Array2D(int m, int n, T *a); + Fortran_Array2D(int m, int n, const T &a); + inline Fortran_Array2D(const Fortran_Array2D &A); + inline Fortran_Array2D & operator=(const T &a); + inline Fortran_Array2D & operator=(const Fortran_Array2D &A); + inline Fortran_Array2D & ref(const Fortran_Array2D &A); + Fortran_Array2D copy() const; + Fortran_Array2D & inject(const Fortran_Array2D & A); + inline T& operator()(int i, int j); + inline const T& operator()(int i, int j) const ; + inline int dim1() const; + inline int dim2() const; + ~Fortran_Array2D(); + + /* extended interface */ + + inline int ref_count() const; + +}; + +template +Fortran_Array2D::Fortran_Array2D() : v_(), m_(0), n_(0), data_(0) {} + + +template +Fortran_Array2D::Fortran_Array2D(const Fortran_Array2D &A) : v_(A.v_), + m_(A.m_), n_(A.n_), data_(A.data_) {} + + + +template +Fortran_Array2D::Fortran_Array2D(int m, int n) : v_(m*n), m_(m), n_(n), + data_(v_.begin()) {} + +template +Fortran_Array2D::Fortran_Array2D(int m, int n, const T &val) : + v_(m*n), m_(m), n_(n), data_(v_.begin()) +{ + set_(data_, data_+m*n, val); +} + + +template +Fortran_Array2D::Fortran_Array2D(int m, int n, T *a) : v_(a), + m_(m), n_(n), data_(v_.begin()) {} + + + + +template +inline T& Fortran_Array2D::operator()(int i, int j) +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 1); + assert(i <= m_); + assert(j >= 1); + assert(j <= n_); +#endif + + return v_[ (j-1)*m_ + (i-1) ]; + +} + +template +inline const T& Fortran_Array2D::operator()(int i, int j) const +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 1); + assert(i <= m_); + assert(j >= 1); + assert(j <= n_); +#endif + + return v_[ (j-1)*m_ + (i-1) ]; + +} + + +template +Fortran_Array2D & Fortran_Array2D::operator=(const T &a) +{ + set_(data_, data_+m_*n_, a); + return *this; +} + +template +Fortran_Array2D Fortran_Array2D::copy() const +{ + + Fortran_Array2D B(m_,n_); + + B.inject(*this); + return B; +} + + +template +Fortran_Array2D & Fortran_Array2D::inject(const Fortran_Array2D &A) +{ + if (m_ == A.m_ && n_ == A.n_) + copy_(data_, A.data_, m_*n_); + + return *this; +} + + + +template +Fortran_Array2D & Fortran_Array2D::ref(const Fortran_Array2D &A) +{ + if (this != &A) + { + v_ = A.v_; + m_ = A.m_; + n_ = A.n_; + data_ = A.data_; + } + return *this; +} + +template +Fortran_Array2D & Fortran_Array2D::operator=(const Fortran_Array2D &A) +{ + return ref(A); +} + +template +inline int Fortran_Array2D::dim1() const { return m_; } + +template +inline int Fortran_Array2D::dim2() const { return n_; } + + +template +Fortran_Array2D::~Fortran_Array2D() +{ +} + +template +inline int Fortran_Array2D::ref_count() const { return v_.ref_count(); } + + + + +template +void Fortran_Array2D::set_(T* begin, T* end, const T& a) +{ + for (T* p=begin; p +void Fortran_Array2D::copy_(T* p, const T* q, int len) +{ + T *end = p + len; + while (p + +namespace TNT +{ + + +template +std::ostream& operator<<(std::ostream &s, const Fortran_Array2D &A) +{ + int M=A.dim1(); + int N=A.dim2(); + + s << M << " " << N << "\n"; + + for (int i=1; i<=M; i++) + { + for (int j=1; j<=N; j++) + { + s << A(i,j) << " "; + } + s << "\n"; + } + + + return s; +} + +template +std::istream& operator>>(std::istream &s, Fortran_Array2D &A) +{ + + int M, N; + + s >> M >> N; + + Fortran_Array2D B(M,N); + + for (int i=1; i<=M; i++) + for (int j=1; j<=N; j++) + { + s >> B(i,j); + } + + A = B; + return s; +} + + + + +template +Fortran_Array2D operator+(const Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Fortran_Array2D(); + + else + { + Fortran_Array2D C(m,n); + + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + C(i,j) = A(i,j) + B(i,j); + } + return C; + } +} + +template +Fortran_Array2D operator-(const Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Fortran_Array2D(); + + else + { + Fortran_Array2D C(m,n); + + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + C(i,j) = A(i,j) - B(i,j); + } + return C; + } +} + + +template +Fortran_Array2D operator*(const Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Fortran_Array2D(); + + else + { + Fortran_Array2D C(m,n); + + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + C(i,j) = A(i,j) * B(i,j); + } + return C; + } +} + + +template +Fortran_Array2D operator/(const Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() != m || B.dim2() != n ) + return Fortran_Array2D(); + + else + { + Fortran_Array2D C(m,n); + + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + C(i,j) = A(i,j) / B(i,j); + } + return C; + } +} + + + +template +Fortran_Array2D& operator+=(Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + A(i,j) += B(i,j); + } + } + return A; +} + +template +Fortran_Array2D& operator-=(Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + A(i,j) -= B(i,j); + } + } + return A; +} + +template +Fortran_Array2D& operator*=(Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + A(i,j) *= B(i,j); + } + } + return A; +} + +template +Fortran_Array2D& operator/=(Fortran_Array2D &A, const Fortran_Array2D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + + if (B.dim1() == m || B.dim2() == n ) + { + for (int i=1; i<=m; i++) + { + for (int j=1; j<=n; j++) + A(i,j) /= B(i,j); + } + } + return A; +} + +} // namespace TNT + +#endif diff --git a/intern/smoke/intern/tnt/tnt_fortran_array3d.h b/intern/smoke/intern/tnt/tnt_fortran_array3d.h new file mode 100644 index 00000000000..e51affba4ea --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_fortran_array3d.h @@ -0,0 +1,223 @@ +/* +* +* Template Numerical Toolkit (TNT): Three-dimensional Fortran numerical array +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef TNT_FORTRAN_ARRAY3D_H +#define TNT_FORTRAN_ARRAY3D_H + +#include +#include +#ifdef TNT_BOUNDS_CHECK +#include +#endif +#include "tnt_i_refvec.h" + +namespace TNT +{ + +template +class Fortran_Array3D +{ + + + private: + + + i_refvec v_; + int m_; + int n_; + int k_; + T* data_; + + public: + + typedef T value_type; + + Fortran_Array3D(); + Fortran_Array3D(int m, int n, int k); + Fortran_Array3D(int m, int n, int k, T *a); + Fortran_Array3D(int m, int n, int k, const T &a); + inline Fortran_Array3D(const Fortran_Array3D &A); + inline Fortran_Array3D & operator=(const T &a); + inline Fortran_Array3D & operator=(const Fortran_Array3D &A); + inline Fortran_Array3D & ref(const Fortran_Array3D &A); + Fortran_Array3D copy() const; + Fortran_Array3D & inject(const Fortran_Array3D & A); + inline T& operator()(int i, int j, int k); + inline const T& operator()(int i, int j, int k) const ; + inline int dim1() const; + inline int dim2() const; + inline int dim3() const; + inline int ref_count() const; + ~Fortran_Array3D(); + + +}; + +template +Fortran_Array3D::Fortran_Array3D() : v_(), m_(0), n_(0), k_(0), data_(0) {} + + +template +Fortran_Array3D::Fortran_Array3D(const Fortran_Array3D &A) : + v_(A.v_), m_(A.m_), n_(A.n_), k_(A.k_), data_(A.data_) {} + + + +template +Fortran_Array3D::Fortran_Array3D(int m, int n, int k) : + v_(m*n*k), m_(m), n_(n), k_(k), data_(v_.begin()) {} + + + +template +Fortran_Array3D::Fortran_Array3D(int m, int n, int k, const T &val) : + v_(m*n*k), m_(m), n_(n), k_(k), data_(v_.begin()) +{ + for (T* p = data_; p < data_ + m*n*k; p++) + *p = val; +} + +template +Fortran_Array3D::Fortran_Array3D(int m, int n, int k, T *a) : + v_(a), m_(m), n_(n), k_(k), data_(v_.begin()) {} + + + + +template +inline T& Fortran_Array3D::operator()(int i, int j, int k) +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 1); + assert(i <= m_); + assert(j >= 1); + assert(j <= n_); + assert(k >= 1); + assert(k <= k_); +#endif + + return data_[(k-1)*m_*n_ + (j-1) * m_ + i-1]; + +} + +template +inline const T& Fortran_Array3D::operator()(int i, int j, int k) const +{ +#ifdef TNT_BOUNDS_CHECK + assert(i >= 1); + assert(i <= m_); + assert(j >= 1); + assert(j <= n_); + assert(k >= 1); + assert(k <= k_); +#endif + + return data_[(k-1)*m_*n_ + (j-1) * m_ + i-1]; +} + + +template +Fortran_Array3D & Fortran_Array3D::operator=(const T &a) +{ + + T *end = data_ + m_*n_*k_; + + for (T *p=data_; p != end; *p++ = a); + + return *this; +} + +template +Fortran_Array3D Fortran_Array3D::copy() const +{ + + Fortran_Array3D B(m_, n_, k_); + B.inject(*this); + return B; + +} + + +template +Fortran_Array3D & Fortran_Array3D::inject(const Fortran_Array3D &A) +{ + + if (m_ == A.m_ && n_ == A.n_ && k_ == A.k_) + { + T *p = data_; + T *end = data_ + m_*n_*k_; + const T* q = A.data_; + for (; p < end; *p++ = *q++); + } + return *this; +} + + + + +template +Fortran_Array3D & Fortran_Array3D::ref(const Fortran_Array3D &A) +{ + + if (this != &A) + { + v_ = A.v_; + m_ = A.m_; + n_ = A.n_; + k_ = A.k_; + data_ = A.data_; + } + return *this; +} + +template +Fortran_Array3D & Fortran_Array3D::operator=(const Fortran_Array3D &A) +{ + return ref(A); +} + +template +inline int Fortran_Array3D::dim1() const { return m_; } + +template +inline int Fortran_Array3D::dim2() const { return n_; } + +template +inline int Fortran_Array3D::dim3() const { return k_; } + + +template +inline int Fortran_Array3D::ref_count() const +{ + return v_.ref_count(); +} + +template +Fortran_Array3D::~Fortran_Array3D() +{ +} + + +} /* namespace TNT */ + +#endif +/* TNT_FORTRAN_ARRAY3D_H */ + diff --git a/intern/smoke/intern/tnt/tnt_fortran_array3d_utils.h b/intern/smoke/intern/tnt/tnt_fortran_array3d_utils.h new file mode 100644 index 00000000000..a13a275dc0d --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_fortran_array3d_utils.h @@ -0,0 +1,249 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + +#ifndef TNT_FORTRAN_ARRAY3D_UTILS_H +#define TNT_FORTRAN_ARRAY3D_UTILS_H + +#include +#include + +namespace TNT +{ + + +template +std::ostream& operator<<(std::ostream &s, const Fortran_Array3D &A) +{ + int M=A.dim1(); + int N=A.dim2(); + int K=A.dim3(); + + s << M << " " << N << " " << K << "\n"; + + for (int i=1; i<=M; i++) + { + for (int j=1; j<=N; j++) + { + for (int k=1; k<=K; k++) + s << A(i,j,k) << " "; + s << "\n"; + } + s << "\n"; + } + + + return s; +} + +template +std::istream& operator>>(std::istream &s, Fortran_Array3D &A) +{ + + int M, N, K; + + s >> M >> N >> K; + + Fortran_Array3D B(M,N,K); + + for (int i=1; i<=M; i++) + for (int j=1; j<=N; j++) + for (int k=1; k<=K; k++) + s >> B(i,j,k); + + A = B; + return s; +} + + +template +Fortran_Array3D operator+(const Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Fortran_Array3D(); + + else + { + Fortran_Array3D C(m,n,p); + + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + C(i,j,k) = A(i,j,k)+ B(i,j,k); + + return C; + } +} + + +template +Fortran_Array3D operator-(const Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Fortran_Array3D(); + + else + { + Fortran_Array3D C(m,n,p); + + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + C(i,j,k) = A(i,j,k)- B(i,j,k); + + return C; + } +} + + +template +Fortran_Array3D operator*(const Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Fortran_Array3D(); + + else + { + Fortran_Array3D C(m,n,p); + + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + C(i,j,k) = A(i,j,k)* B(i,j,k); + + return C; + } +} + + +template +Fortran_Array3D operator/(const Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() != m || B.dim2() != n || B.dim3() != p ) + return Fortran_Array3D(); + + else + { + Fortran_Array3D C(m,n,p); + + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + C(i,j,k) = A(i,j,k)/ B(i,j,k); + + return C; + } +} + + +template +Fortran_Array3D& operator+=(Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + A(i,j,k) += B(i,j,k); + } + + return A; +} + + +template +Fortran_Array3D& operator-=(Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + A(i,j,k) -= B(i,j,k); + } + + return A; +} + + +template +Fortran_Array3D& operator*=(Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + A(i,j,k) *= B(i,j,k); + } + + return A; +} + + +template +Fortran_Array3D& operator/=(Fortran_Array3D &A, const Fortran_Array3D &B) +{ + int m = A.dim1(); + int n = A.dim2(); + int p = A.dim3(); + + if (B.dim1() == m && B.dim2() == n && B.dim3() == p ) + { + for (int i=1; i<=m; i++) + for (int j=1; j<=n; j++) + for (int k=1; k<=p; k++) + A(i,j,k) /= B(i,j,k); + } + + return A; +} + + +} // namespace TNT + +#endif diff --git a/intern/smoke/intern/tnt/tnt_i_refvec.h b/intern/smoke/intern/tnt/tnt_i_refvec.h new file mode 100644 index 00000000000..5a67eb57896 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_i_refvec.h @@ -0,0 +1,243 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef TNT_I_REFVEC_H +#define TNT_I_REFVEC_H + +#include +#include + +#ifdef TNT_BOUNDS_CHECK +#include +#endif + +#ifndef NULL +#define NULL 0 +#endif + +namespace TNT +{ +/* + Internal representation of ref-counted array. The TNT + arrays all use this building block. + +

+ If an array block is created by TNT, then every time + an assignment is made, the left-hand-side reference + is decreased by one, and the right-hand-side refernce + count is increased by one. If the array block was + external to TNT, the refernce count is a NULL pointer + regardless of how many references are made, since the + memory is not freed by TNT. + + + +*/ +template +class i_refvec +{ + + + private: + T* data_; + int *ref_count_; + + + public: + + i_refvec(); + explicit i_refvec(int n); + inline i_refvec(T* data); + inline i_refvec(const i_refvec &v); + inline T* begin(); + inline const T* begin() const; + inline T& operator[](int i); + inline const T& operator[](int i) const; + inline i_refvec & operator=(const i_refvec &V); + void copy_(T* p, const T* q, const T* e); + void set_(T* p, const T* b, const T* e); + inline int ref_count() const; + inline int is_null() const; + inline void destroy(); + ~i_refvec(); + +}; + +template +void i_refvec::copy_(T* p, const T* q, const T* e) +{ + for (T* t=p; q +i_refvec::i_refvec() : data_(NULL), ref_count_(NULL) {} + +/** + In case n is 0 or negative, it does NOT call new. +*/ +template +i_refvec::i_refvec(int n) : data_(NULL), ref_count_(NULL) +{ + if (n >= 1) + { +#ifdef TNT_DEBUG + std::cout << "new data storage.\n"; +#endif + data_ = new T[n]; + ref_count_ = new int; + *ref_count_ = 1; + } +} + +template +inline i_refvec::i_refvec(const i_refvec &V): data_(V.data_), + ref_count_(V.ref_count_) +{ + if (V.ref_count_ != NULL) + (*(V.ref_count_))++; +} + + +template +i_refvec::i_refvec(T* data) : data_(data), ref_count_(NULL) {} + +template +inline T* i_refvec::begin() +{ + return data_; +} + +template +inline const T& i_refvec::operator[](int i) const +{ + return data_[i]; +} + +template +inline T& i_refvec::operator[](int i) +{ + return data_[i]; +} + + +template +inline const T* i_refvec::begin() const +{ + return data_; +} + + + +template +i_refvec & i_refvec::operator=(const i_refvec &V) +{ + if (this == &V) + return *this; + + + if (ref_count_ != NULL) + { + (*ref_count_) --; + if ((*ref_count_) == 0) + destroy(); + } + + data_ = V.data_; + ref_count_ = V.ref_count_; + + if (V.ref_count_ != NULL) + (*(V.ref_count_))++; + + return *this; +} + +template +void i_refvec::destroy() +{ + if (ref_count_ != NULL) + { +#ifdef TNT_DEBUG + std::cout << "destorying data... \n"; +#endif + delete ref_count_; + +#ifdef TNT_DEBUG + std::cout << "deleted ref_count_ ...\n"; +#endif + if (data_ != NULL) + delete []data_; +#ifdef TNT_DEBUG + std::cout << "deleted data_[] ...\n"; +#endif + data_ = NULL; + } +} + +/* +* return 1 is vector is empty, 0 otherwise +* +* if is_null() is false and ref_count() is 0, then +* +*/ +template +int i_refvec::is_null() const +{ + return (data_ == NULL ? 1 : 0); +} + +/* +* returns -1 if data is external, +* returns 0 if a is NULL array, +* otherwise returns the positive number of vectors sharing +* this data space. +*/ +template +int i_refvec::ref_count() const +{ + if (data_ == NULL) + return 0; + else + return (ref_count_ != NULL ? *ref_count_ : -1) ; +} + +template +i_refvec::~i_refvec() +{ + if (ref_count_ != NULL) + { + (*ref_count_)--; + + if (*ref_count_ == 0) + destroy(); + } +} + + +} /* namespace TNT */ + + + + + +#endif +/* TNT_I_REFVEC_H */ + diff --git a/intern/smoke/intern/tnt/tnt_math_utils.h b/intern/smoke/intern/tnt/tnt_math_utils.h new file mode 100644 index 00000000000..f6aad8eaf38 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_math_utils.h @@ -0,0 +1,36 @@ +#ifndef MATH_UTILS_H +#define MATH_UTILS_H + +/* needed for fabs, sqrt() below */ +#include + +#ifdef _WIN32 +#define hypot _hypot +#endif + +namespace TNT +{ +/** + @returns hypotenuse of real (non-complex) scalars a and b by + avoiding underflow/overflow + using (a * sqrt( 1 + (b/a) * (b/a))), rather than + sqrt(a*a + b*b). +*/ +template +Real hypot(const Real &a, const Real &b) +{ + + if (a== 0) + return fabs(b); + else + { + Real c = b/a; + return fabs(a) * sqrt(1 + c*c); + } +} +} /* TNT namespace */ + + + +#endif +/* MATH_UTILS_H */ diff --git a/intern/smoke/intern/tnt/tnt_sparse_matrix_csr.h b/intern/smoke/intern/tnt/tnt_sparse_matrix_csr.h new file mode 100644 index 00000000000..0d4fde1c207 --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_sparse_matrix_csr.h @@ -0,0 +1,103 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + +#ifndef TNT_SPARSE_MATRIX_CSR_H +#define TNT_SPARSE_MATRIX_CSR_H + +#include "tnt_array1d.h" + +namespace TNT +{ + + +/** + Read-only view of a sparse matrix in compressed-row storage + format. Neither array elements (nonzeros) nor sparsity + structure can be modified. If modifications are required, + create a new view. + +

+ Index values begin at 0. + +

+ Storage requirements: An (m x n) matrix with + nz nonzeros requires no more than ((T+I)*nz + M*I) + bytes, where T is the size of data elements and + I is the size of integers. + + +*/ +template +class Sparse_Matrix_CompRow { + +private: + Array1D val_; // data values (nz_ elements) + Array1D rowptr_; // row_ptr (dim_[0]+1 elements) + Array1D colind_; // col_ind (nz_ elements) + + int dim1_; // number of rows + int dim2_; // number of cols + +public: + + Sparse_Matrix_CompRow(const Sparse_Matrix_CompRow &S); + Sparse_Matrix_CompRow(int M, int N, int nz, const T *val, + const int *r, const int *c); + + + + inline const T& val(int i) const { return val_[i]; } + inline const int& row_ptr(int i) const { return rowptr_[i]; } + inline const int& col_ind(int i) const { return colind_[i];} + + inline int dim1() const {return dim1_;} + inline int dim2() const {return dim2_;} + int NumNonzeros() const {return val_.dim1();} + + + Sparse_Matrix_CompRow& operator=( + const Sparse_Matrix_CompRow &R); + + + +}; + +/** + Construct a read-only view of existing sparse matrix in + compressed-row storage format. + + @param M the number of rows of sparse matrix + @param N the number of columns of sparse matrix + @param nz the number of nonzeros + @param val a contiguous list of nonzero values + @param r row-pointers: r[i] denotes the begining position of row i + (i.e. the ith row begins at val[row[i]]). + @param c column-indices: c[i] denotes the column location of val[i] +*/ +template +Sparse_Matrix_CompRow::Sparse_Matrix_CompRow(int M, int N, int nz, + const T *val, const int *r, const int *c) : val_(nz,val), + rowptr_(M, r), colind_(nz, c), dim1_(M), dim2_(N) {} + + +} +// namespace TNT + +#endif diff --git a/intern/smoke/intern/tnt/tnt_stopwatch.h b/intern/smoke/intern/tnt/tnt_stopwatch.h new file mode 100644 index 00000000000..8dc5d23ac1e --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_stopwatch.h @@ -0,0 +1,95 @@ +/* +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef STOPWATCH_H +#define STOPWATCH_H + +// for clock() and CLOCKS_PER_SEC +#include + + +namespace TNT +{ + +inline static double seconds(void) +{ + const double secs_per_tick = 1.0 / CLOCKS_PER_SEC; + return ( (double) clock() ) * secs_per_tick; +} + +class Stopwatch { + private: + int running_; + double start_time_; + double total_; + + public: + inline Stopwatch(); + inline void start(); + inline double stop(); + inline double read(); + inline void resume(); + inline int running(); +}; + +inline Stopwatch::Stopwatch() : running_(0), start_time_(0.0), total_(0.0) {} + +void Stopwatch::start() +{ + running_ = 1; + total_ = 0.0; + start_time_ = seconds(); +} + +double Stopwatch::stop() +{ + if (running_) + { + total_ += (seconds() - start_time_); + running_ = 0; + } + return total_; +} + +inline void Stopwatch::resume() +{ + if (!running_) + { + start_time_ = seconds(); + running_ = 1; + } +} + + +inline double Stopwatch::read() +{ + if (running_) + { + stop(); + resume(); + } + return total_; +} + + +} /* TNT namespace */ +#endif + + + diff --git a/intern/smoke/intern/tnt/tnt_subscript.h b/intern/smoke/intern/tnt/tnt_subscript.h new file mode 100644 index 00000000000..d8fe1200eeb --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_subscript.h @@ -0,0 +1,54 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + +#ifndef TNT_SUBSCRPT_H +#define TNT_SUBSCRPT_H + + +//--------------------------------------------------------------------- +// This definition describes the default TNT data type used for +// indexing into TNT matrices and vectors. The data type should +// be wide enough to index into large arrays. It defaults to an +// "int", but can be overriden at compile time redefining TNT_SUBSCRIPT_TYPE, +// e.g. +// +// c++ -DTNT_SUBSCRIPT_TYPE='unsigned int' ... +// +//--------------------------------------------------------------------- +// + +#ifndef TNT_SUBSCRIPT_TYPE +#define TNT_SUBSCRIPT_TYPE int +#endif + +namespace TNT +{ + typedef TNT_SUBSCRIPT_TYPE Subscript; +} /* namespace TNT */ + + +// () indexing in TNT means 1-offset, i.e. x(1) and A(1,1) are the +// first elements. This offset is left as a macro for future +// purposes, but should not be changed in the current release. +// +// +#define TNT_BASE_OFFSET (1) + +#endif diff --git a/intern/smoke/intern/tnt/tnt_vec.h b/intern/smoke/intern/tnt/tnt_vec.h new file mode 100644 index 00000000000..a0f614b5cbd --- /dev/null +++ b/intern/smoke/intern/tnt/tnt_vec.h @@ -0,0 +1,404 @@ +/* +* +* Template Numerical Toolkit (TNT) +* +* Mathematical and Computational Sciences Division +* National Institute of Technology, +* Gaithersburg, MD USA +* +* +* This software was developed at the National Institute of Standards and +* Technology (NIST) by employees of the Federal Government in the course +* of their official duties. Pursuant to title 17 Section 105 of the +* United States Code, this software is not subject to copyright protection +* and is in the public domain. NIST assumes no responsibility whatsoever for +* its use by other parties, and makes no guarantees, expressed or implied, +* about its quality, reliability, or any other characteristic. +* +*/ + + + +#ifndef TNT_VEC_H +#define TNT_VEC_H + +#include "tnt_subscript.h" +#include +#include +#include +#include + +namespace TNT +{ + +/** + [Deprecatred] Value-based vector class from pre-1.0 + TNT version. Kept here for backward compatiblity, but should + use the newer TNT::Array1D classes instead. + +*/ + +template +class Vector +{ + + + public: + + typedef Subscript size_type; + typedef T value_type; + typedef T element_type; + typedef T* pointer; + typedef T* iterator; + typedef T& reference; + typedef const T* const_iterator; + typedef const T& const_reference; + + Subscript lbound() const { return 1;} + + protected: + T* v_; + T* vm1_; // pointer adjustment for optimzied 1-offset indexing + Subscript n_; + + // internal helper function to create the array + // of row pointers + + void initialize(Subscript N) + { + // adjust pointers so that they are 1-offset: + // v_[] is the internal contiguous array, it is still 0-offset + // + assert(v_ == NULL); + v_ = new T[N]; + assert(v_ != NULL); + vm1_ = v_-1; + n_ = N; + } + + void copy(const T* v) + { + Subscript N = n_; + Subscript i; + +#ifdef TNT_UNROLL_LOOPS + Subscript Nmod4 = N & 3; + Subscript N4 = N - Nmod4; + + for (i=0; i &A) : v_(0), vm1_(0), n_(0) + { + initialize(A.n_); + copy(A.v_); + } + + Vector(Subscript N, const T& value = T()) : v_(0), vm1_(0), n_(0) + { + initialize(N); + set(value); + } + + Vector(Subscript N, const T* v) : v_(0), vm1_(0), n_(0) + { + initialize(N); + copy(v); + } + + Vector(Subscript N, char *s) : v_(0), vm1_(0), n_(0) + { + initialize(N); + std::istringstream ins(s); + + Subscript i; + + for (i=0; i> v_[i]; + } + + + // methods + // + Vector& newsize(Subscript N) + { + if (n_ == N) return *this; + + destroy(); + initialize(N); + + return *this; + } + + + // assignments + // + Vector& operator=(const Vector &A) + { + if (v_ == A.v_) + return *this; + + if (n_ == A.n_) // no need to re-alloc + copy(A.v_); + + else + { + destroy(); + initialize(A.n_); + copy(A.v_); + } + + return *this; + } + + Vector& operator=(const T& scalar) + { + set(scalar); + return *this; + } + + inline Subscript dim() const + { + return n_; + } + + inline Subscript size() const + { + return n_; + } + + + inline reference operator()(Subscript i) + { +#ifdef TNT_BOUNDS_CHECK + assert(1<=i); + assert(i <= n_) ; +#endif + return vm1_[i]; + } + + inline const_reference operator() (Subscript i) const + { +#ifdef TNT_BOUNDS_CHECK + assert(1<=i); + assert(i <= n_) ; +#endif + return vm1_[i]; + } + + inline reference operator[](Subscript i) + { +#ifdef TNT_BOUNDS_CHECK + assert(0<=i); + assert(i < n_) ; +#endif + return v_[i]; + } + + inline const_reference operator[](Subscript i) const + { +#ifdef TNT_BOUNDS_CHECK + assert(0<=i); + + + + + + + assert(i < n_) ; +#endif + return v_[i]; + } + + + +}; + + +/* *************************** I/O ********************************/ + +template +std::ostream& operator<<(std::ostream &s, const Vector &A) +{ + Subscript N=A.dim(); + + s << N << "\n"; + + for (Subscript i=0; i +std::istream & operator>>(std::istream &s, Vector &A) +{ + + Subscript N; + + s >> N; + + if ( !(N == A.size() )) + { + A.newsize(N); + } + + + for (Subscript i=0; i> A[i]; + + + return s; +} + +// *******************[ basic matrix algorithms ]*************************** + + +template +Vector operator+(const Vector &A, + const Vector &B) +{ + Subscript N = A.dim(); + + assert(N==B.dim()); + + Vector tmp(N); + Subscript i; + + for (i=0; i +Vector operator-(const Vector &A, + const Vector &B) +{ + Subscript N = A.dim(); + + assert(N==B.dim()); + + Vector tmp(N); + Subscript i; + + for (i=0; i +Vector operator*(const Vector &A, + const Vector &B) +{ + Subscript N = A.dim(); + + assert(N==B.dim()); + + Vector tmp(N); + Subscript i; + + for (i=0; i +T dot_prod(const Vector &A, const Vector &B) +{ + Subscript N = A.dim(); + assert(N == B.dim()); + + Subscript i; + T sum = 0; + + for (i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/intern/string/Makefile b/intern/string/Makefile index e885b87babe..7972defd406 100644 --- a/intern/string/Makefile +++ b/intern/string/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # # $Id$ # @@ -22,7 +24,7 @@ # # The Original Code is: all of this file. # -# Contributor(s): Hans Lambermont +# Contributor(s): Hans Lambermont, GSR # # ***** END GPL LICENSE BLOCK ***** # string main makefile. @@ -38,16 +40,13 @@ DIRS = intern include nan_subdirs.mk -install: all debug +install: $(ALL_OR_DEBUG) @[ -d $(NAN_STRING) ] || mkdir $(NAN_STRING) @[ -d $(NAN_STRING)/include ] || mkdir $(NAN_STRING)/include - @[ -d $(NAN_STRING)/lib ] || mkdir $(NAN_STRING)/lib - @[ -d $(NAN_STRING)/lib/debug ] || mkdir $(NAN_STRING)/lib/debug - @../tools/cpifdiff.sh $(DIR)/libstring.a $(NAN_STRING)/lib/ - @../tools/cpifdiff.sh $(DIR)/debug/libstring.a $(NAN_STRING)/lib/debug/ + @[ -d $(NAN_STRING)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_STRING)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libstring.a $(NAN_STRING)/lib/$(DEBUG_DIR) ifeq ($(OS),darwin) - ranlib $(NAN_STRING)/lib/libstring.a - ranlib $(NAN_STRING)/lib/debug/libstring.a + ranlib $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a endif @../tools/cpifdiff.sh *.h $(NAN_STRING)/include/ diff --git a/intern/string/SConscript b/intern/string/SConscript index 7f817f82759..4aca220183c 100644 --- a/intern/string/SConscript +++ b/intern/string/SConscript @@ -4,4 +4,4 @@ Import ('env') sources = env.Glob('intern/*.cpp') incs = '.' -env.BlenderLib ('bf_string', sources, Split(incs), [], libtype=['core', 'player'], priority = [30,10] ) +env.BlenderLib ('bf_string', sources, Split(incs), [], libtype=['intern','player'], priority = [50,10] ) diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h index ec945c80c7c..d8023a06f81 100644 --- a/intern/string/STR_String.h +++ b/intern/string/STR_String.h @@ -50,6 +50,13 @@ using namespace std; +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + +#ifdef _WIN32 +#define stricmp _stricmp +#endif class STR_String; @@ -142,7 +149,7 @@ public: inline operator const char *() const { return pData; } inline char *Ptr() { return pData; } inline const char *ReadPtr() const { return pData; } - inline float ToFloat() const { float x=atof(pData); return x; } + inline float ToFloat() const { float x=(float)(atof(pData)); return x; } inline int ToInt() const { return atoi(pData); } // Operators @@ -191,6 +198,13 @@ protected: char *pData; // -> STR_String data int Len; // Data length int Max; // Space in data buffer + + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "CXX:STR_String"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); } diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp index dcc52e2a3e7..646b1a853dc 100644 --- a/intern/string/intern/STR_String.cpp +++ b/intern/string/intern/STR_String.cpp @@ -559,7 +559,8 @@ STR_String& STR_String::TrimLeft() { int skip; assertd(pData != NULL); - for (skip=0; isSpace(pData[skip]); skip++, Len--); + for (skip=0; isSpace(pData[skip]); skip++, Len--) + {}; memmove(pData, pData+skip, Len+1); return *this; } @@ -598,7 +599,8 @@ STR_String& STR_String::TrimLeft(char *set) { int skip; assertd(pData != NULL); - for (skip=0; Len && strchr(set, pData[skip]); skip++, Len--); + for (skip=0; Len && strchr(set, pData[skip]); skip++, Len--) + {}; memmove(pData, pData+skip, Len+1); return *this; } diff --git a/intern/string/make/msvc_6_0/string.dsp b/intern/string/make/msvc_6_0/string.dsp index c6ac70e193a..38250e44170 100644 --- a/intern/string/make/msvc_6_0/string.dsp +++ b/intern/string/make/msvc_6_0/string.dsp @@ -1,122 +1,122 @@ -# Microsoft Developer Studio Project File - Name="string" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=string - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "string.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "string.mak" CFG="string - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "string - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "string - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "string - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\intern\string" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\string" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\string\libstring.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\string\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\string\*.lib ..\..\..\..\..\lib\windows\string\lib\*.a ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "string - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../../../obj/windows/intern/string/debug" -# PROP Intermediate_Dir "../../../../obj/windows/intern/string/debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/string/debug\libstring.lib" -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\string\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\string\debug\*.lib ..\..\..\..\..\lib\windows\string\lib\debug\*.a ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "string - Win32 Release" -# Name "string - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\intern\STR_String.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "intern" - -# PROP Default_Filter "" -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\STR_HashedString.h -# End Source File -# Begin Source File - -SOURCE=..\..\STR_String.h -# End Source File -# End Group -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="string" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=string - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "string.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "string.mak" CFG="string - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "string - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "string - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "string - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\intern\string" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\intern\string" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\intern\string\libstring.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\string\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\string\*.lib ..\..\..\..\..\lib\windows\string\lib\*.a ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "string - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../../../obj/windows/intern/string/debug" +# PROP Intermediate_Dir "../../../../obj/windows/intern/string/debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"../../../../obj/windows/intern/string/debug\libstring.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying header files XCOPY /Y ..\..\*.h ..\..\..\..\..\lib\windows\string\include\ ECHO Copying lib XCOPY /Y ..\..\..\..\obj\windows\intern\string\debug\*.lib ..\..\..\..\..\lib\windows\string\lib\debug\*.a ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "string - Win32 Release" +# Name "string - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\intern\STR_String.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "intern" + +# PROP Default_Filter "" +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\STR_HashedString.h +# End Source File +# Begin Source File + +SOURCE=..\..\STR_String.h +# End Source File +# End Group +# End Group +# End Target +# End Project diff --git a/intern/string/make/msvc_6_0/string.dsw b/intern/string/make/msvc_6_0/string.dsw index b599b6407c5..23886681438 100644 --- a/intern/string/make/msvc_6_0/string.dsw +++ b/intern/string/make/msvc_6_0/string.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "string"=".\string.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "string"=".\string.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/string/make/msvc_9_0/string.vcproj b/intern/string/make/msvc_9_0/string.vcproj new file mode 100644 index 00000000000..16df974ff9c --- /dev/null +++ b/intern/string/make/msvc_9_0/string.vcproj @@ -0,0 +1,355 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/po/Makefile b/po/Makefile index 4bafba8a6e6..b656a00fb38 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,3 +1,5 @@ +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # $Id$ # # ***** BEGIN GPL LICENSE BLOCK ***** @@ -9,47 +11,53 @@ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # The Original Code is Copyright (C) 2002 by Stichting Blender Foundation, # Amsterdam, the Netherlands. # All rights reserved. # -# The Original Code is: revision 1.1 +# The Original Code is: revision 1.3 # -# Contributor(s): Wouter van Heyst +# Contributor(s): Wouter van Heyst, GSR # # ***** END GPL LICENSE BLOCK ***** # -# po Makefile for blender. Compiles the translations and places them +# po Makefile for blender. Compiles the translations in the place # where release can pick them up. +PO_FILES = $(wildcard *.po) + +LINGUAS = $(basename $(PO_FILES)) + SOURCEDIR = blender/po include nan_definitions.mk -LINGUAS = ar bg ca cs de el es fi fr hr it ja ko nl pl pt_BR ro ru sr sr@Latn sv uk zh_CN - ifeq ($(OS), darwin) -DIR = $(OCGDIR)/bin/blender.app/Contents/Resources/locale/$@/LC_MESSAGES/ + DIR = $(OCGDIR)/bin/blender.app/Contents/Resources/locale/ else -DIR = $(OCGDIR)/bin/.blender/locale/$@/LC_MESSAGES/ + DIR = $(OCGDIR)/bin/.blender/locale/ endif -all debug:: $(LINGUAS) +LINGUAS_DEST= $(foreach LINGUA, $(LINGUAS),$(DIR)$(LINGUA)/LC_MESSAGES/blender.mo) + +$(DIR)%/LC_MESSAGES/blender.mo: %.po + mkdir -p $(@D) + msgfmt -o $@ $< +ifeq ($(BF_VERIFY_MO_FILES), true) + @cmp $@ $(NANBLENDERHOME)/bin/.blender/locale/$(basename $<)/LC_MESSAGES/blender.mo \ + || ( echo Mismatch between generated and commited $(basename $<).mo catalog && \ + rm -f $@ && false ) +endif + +all debug:: $(LINGUAS_DEST) +# Just trigger the deps clean:: -ifeq ($(OS), darwin) - rm -rf $(OCGDIR)/bin/blender.app/Contents/Resources/locale/ -else - rm -rf $(OCGDIR)/bin/.blender/locale/ -endif - -$(LINGUAS): - mkdir -p $(DIR) - msgfmt -o $(DIR)/blender.mo $@.po + rm -rf $(DIR) diff --git a/projectfiles/blender/BLO_readblenfile/BLO_readblenfile.dsp b/projectfiles/blender/BLO_readblenfile/BLO_readblenfile.dsp index 8e478f425d9..2cfb77b61aa 100644 --- a/projectfiles/blender/BLO_readblenfile/BLO_readblenfile.dsp +++ b/projectfiles/blender/BLO_readblenfile/BLO_readblenfile.dsp @@ -1,155 +1,155 @@ -# Microsoft Developer Studio Project File - Name="BLO_readblenfile" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BLO_readblenfile - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BLO_readblenfile.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BLO_readblenfile.mak" CFG="BLO_readblenfile - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BLO_readblenfile - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BLO_readblenfile - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BLO_readblenfile - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BLO_readblenfile - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BLO_readblenfile - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLO_readblenfile - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\blender\readstreamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLO_readblenfile - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "BLO_readblenfile___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "BLO_readblenfile___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLO_readblenfile - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BLO_readblenfile___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "BLO_readblenfile___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\readstreamglue\\" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\source\blender\readstreamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BLO_readblenfile - Win32 Release" -# Name "BLO_readblenfile - Win32 Debug" -# Name "BLO_readblenfile - Win32 MT DLL Release" -# Name "BLO_readblenfile - Win32 MT DLL Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\readblenfile\intern\BLO_readblenfile.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\readblenfile\BLO_readblenfile.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BLO_readblenfile" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BLO_readblenfile - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BLO_readblenfile.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BLO_readblenfile.mak" CFG="BLO_readblenfile - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BLO_readblenfile - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BLO_readblenfile - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BLO_readblenfile - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BLO_readblenfile - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BLO_readblenfile - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLO_readblenfile - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\blender\readstreamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLO_readblenfile - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BLO_readblenfile___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "BLO_readblenfile___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLO_readblenfile - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BLO_readblenfile___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "BLO_readblenfile___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\readblenfile\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\readstreamglue\\" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\source\blender\readstreamglue\\" /I "..\..\..\source\blender\blenloader\\" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readstreamglue" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BLO_readblenfile - Win32 Release" +# Name "BLO_readblenfile - Win32 Debug" +# Name "BLO_readblenfile - Win32 MT DLL Release" +# Name "BLO_readblenfile - Win32 MT DLL Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\readblenfile\intern\BLO_readblenfile.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\readblenfile\BLO_readblenfile.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/BPY_python/BPY_python.dsp b/projectfiles/blender/BPY_python/BPY_python.dsp index e122f0ffe90..2cbb9e05717 100644 --- a/projectfiles/blender/BPY_python/BPY_python.dsp +++ b/projectfiles/blender/BPY_python/BPY_python.dsp @@ -1,588 +1,588 @@ -# Microsoft Developer Studio Project File - Name="BPY_python" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BPY_python - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BPY_python.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BPY_python.mak" CFG="BPY_python - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BPY_python - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BPY_python - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BPY_python - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\bpython" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\bpython" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\img" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /I "..\..\source\blender\python" /I "../../../../lib/windows/bsp/include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\bpython\include" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "..\..\..\source\blender\python" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BPY_python - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\bpython\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\bpython\debug" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /w /W0 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\img" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /I "..\..\source\blender\python" /I "../../../../lib/windows/bsp/include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\bpython\include" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "..\..\..\source\blender\python" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BPY_python - Win32 Release" -# Name "BPY_python - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Armature.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\BezTriple.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\BGL.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Blender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Bone.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\BPY_interface.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\BPY_menus.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Camera.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\charRGBA.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\constant.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Constraint.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\CurNurb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Curve.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Draw.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Effect.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\euler.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\EXPP_interface.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Font.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\gen_utils.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Geometry.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Group.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\IDProp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Image.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Ipo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Ipocurve.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Key.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Lamp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Lattice.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Library.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\logic.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Material.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Mathutils.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\matrix.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Mesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\meshPrimitive.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Metaball.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Modifier.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\MTex.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\NLA.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\NMesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Noise.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Object.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Particle.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\point.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Pose.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\quat.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Registry.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\rgbTuple.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Scene.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\sceneRadio.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\sceneRender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\sceneTimeLine.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Sound.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\SurfNurb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Sys.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Text.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Text3d.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Texture.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Types.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\vector.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Window.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\windowTheme.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\World.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Armature.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\BezTriple.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\BGL.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Blender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Bone.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\BPY_extern.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\BPY_menus.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\bpy_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Camera.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\charRGBA.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\constant.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Constraint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\CurNurb.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Curve.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Draw.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Effect.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\euler.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\EXPP_interface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Font.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\gen_utils.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Geometry.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Group.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Image.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Ipo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Ipocurve.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Key.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Lamp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Lattice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Material.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Mathutils.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\matrix.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Mesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\meshPrimitive.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Metaball.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Modifier.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\modules.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\MTex.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\NLA.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\NMesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Object.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Particle.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\point.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\quat.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Registry.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\rgbTuple.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Scene.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\sceneRadio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\sceneRender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\sceneTimeLine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Sound.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\SurfNurb.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Sys.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Text.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Text3d.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Texture.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\vector.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\Window.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\windowTheme.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\python\api2_2x\World.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BPY_python" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BPY_python - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BPY_python.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BPY_python.mak" CFG="BPY_python - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BPY_python - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BPY_python - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BPY_python - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\bpython" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\bpython" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\img" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /I "..\..\source\blender\python" /I "../../../../lib/windows/bsp/include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\bpython\include" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "..\..\..\source\blender\python" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BPY_python - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\bpython\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\bpython\debug" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /w /W0 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\img" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /I "..\..\source\blender\python" /I "../../../../lib/windows/bsp/include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\bpython\include" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "..\..\..\source\blender\python" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BPY_python - Win32 Release" +# Name "BPY_python - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Armature.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\BezTriple.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\BGL.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Blender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Bone.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\BPY_interface.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\BPY_menus.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Camera.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\charRGBA.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\constant.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Constraint.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\CurNurb.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Curve.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Draw.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Effect.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\euler.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\EXPP_interface.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Font.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\gen_utils.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Geometry.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Group.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\IDProp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Image.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Ipo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Ipocurve.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Key.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Lamp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Lattice.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Library.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\logic.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Material.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Mathutils.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\matrix.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Mesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\meshPrimitive.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Metaball.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Modifier.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\MTex.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\NLA.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\NMesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Noise.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Object.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Particle.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\point.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Pose.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\quat.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Registry.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\rgbTuple.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Scene.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\sceneRadio.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\sceneRender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\sceneTimeLine.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Sound.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\SurfNurb.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Sys.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Text.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Text3d.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Texture.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Types.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\vector.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Window.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\windowTheme.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\World.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Armature.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\BezTriple.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\BGL.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Blender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Bone.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\BPY_extern.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\BPY_menus.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\bpy_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Camera.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\charRGBA.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\constant.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Constraint.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\CurNurb.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Curve.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Draw.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Effect.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\euler.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\EXPP_interface.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Font.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\gen_utils.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Geometry.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Group.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Image.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Ipo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Ipocurve.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Key.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Lamp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Lattice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Material.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Mathutils.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\matrix.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Mesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\meshPrimitive.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Metaball.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Modifier.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\modules.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\MTex.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\NLA.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\NMesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Object.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Particle.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\point.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\quat.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Registry.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\rgbTuple.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Scene.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\sceneRadio.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\sceneRender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\sceneTimeLine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Sound.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\SurfNurb.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Sys.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Text.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Text3d.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Texture.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\vector.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\Window.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\windowTheme.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\python\api2_2x\World.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/avi/BL_avi.dsp b/projectfiles/blender/avi/BL_avi.dsp index 1237ddcec47..4aafde508c0 100644 --- a/projectfiles/blender/avi/BL_avi.dsp +++ b/projectfiles/blender/avi/BL_avi.dsp @@ -1,199 +1,199 @@ -# Microsoft Developer Studio Project File - Name="BL_avi" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BL_avi - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BL_avi.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BL_avi.mak" CFG="BL_avi - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BL_avi - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_avi - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_avi - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_avi - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BL_avi - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\avi" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_avi - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\avi\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_avi - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BL_avi___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "BL_avi___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\avi\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\avi\debug\BL_avi.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_avi - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "BL_avi___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "BL_avi___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\avi\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\avi\BL_avi.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BL_avi - Win32 Release" -# Name "BL_avi - Win32 Debug" -# Name "BL_avi - Win32 MT DLL Debug" -# Name "BL_avi - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\avi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\avirgb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\codecs.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\endian.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\mjpeg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\options.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\rgb32.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\AVI_avi.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\avi_intern.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\avirgb.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\endian.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\mjpeg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\avi\intern\rgb32.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BL_avi" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BL_avi - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BL_avi.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BL_avi.mak" CFG="BL_avi - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BL_avi - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_avi - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_avi - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_avi - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BL_avi - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\avi" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_avi - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\avi\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_avi - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BL_avi___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "BL_avi___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\avi\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\avi\debug\BL_avi.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_avi - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BL_avi___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "BL_avi___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\avi\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\avi\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "DWORDS_LITTLEENDIAN" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\avi\BL_avi.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BL_avi - Win32 Release" +# Name "BL_avi - Win32 Debug" +# Name "BL_avi - Win32 MT DLL Debug" +# Name "BL_avi - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\avi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\avirgb.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\codecs.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\endian.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\mjpeg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\options.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\rgb32.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\AVI_avi.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\avi_intern.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\avirgb.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\endian.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\mjpeg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\avi\intern\rgb32.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/blender.dsp b/projectfiles/blender/blender.dsp index 17cd7022d82..48bc7b4b41e 100644 --- a/projectfiles/blender/blender.dsp +++ b/projectfiles/blender/blender.dsp @@ -1,124 +1,124 @@ -# Microsoft Developer Studio Project File - Name="blender" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=blender - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "blender.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "blender.mak" CFG="blender - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "blender - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "blender - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "blender - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\obj\windows\blender" -# PROP Intermediate_Dir "..\..\obj\windows\blender" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\python" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 solid.lib SDL.lib freetype2ST.lib ftgl_static_ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.a libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.a libbsp.a libbmfont.a libghost.a libstring.a ws2_32.lib dxguid.lib opengl32.lib libjpeg.a glu32.lib user32.lib shell32.lib gdi32.lib vfw32.lib advapi32.lib winmm.lib ole32.lib libdecimation.a libiksolver.a libpng.a zlib.lib libmoto.a blender_ONL.lib blender_elbeem.lib boolop.lib BLI_bullet.lib pthreadVC2.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"msvcprt.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"glut32.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"libcpd.lib" /nodefaultlib:"libcp.lib" /nodefaultlib:"libcmtd.lib" /out:"..\..\bin\blender.exe" /libpath:"..\..\..\lib\windows\sdl\lib" /libpath:"..\..\..\lib\windows\freetype\lib" /libpath:"..\..\..\lib\windows\ftgl\lib" /libpath:"..\..\..\lib\windows\gettext\lib" /libpath:"..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\lib\windows\bsp\lib" /libpath:"..\..\..\lib\windows\moto\lib" /libpath:"..\..\..\lib\windows\bmfont\lib" /libpath:"..\..\..\lib\windows\ghost\lib" /libpath:"..\..\..\lib\windows\python\frozen" /libpath:"..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\lib\windows\string\lib" /libpath:"..\..\..\lib\windows\solid\lib" /libpath:"..\..\..\lib\windows\python\lib" /libpath:"..\..\..\lib\windows\iksolver\lib" /libpath:"..\..\..\lib\windows\decimation\lib" /libpath:"..\..\..\lib\windows\openal\lib" /libpath:"..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\lib\windows\openssl\lib" /libpath:"..\..\obj\windows\intern\soundsystem\dummy" /libpath:"..\..\obj\windows\intern\soundsystem\openal" /libpath:"..\..\..\lib\windows\soundsystem\lib\\" /libpath:"..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\lib\windows\png\lib\\" /libpath:"..\..\..\lib\windows\opennl" /libpath:"..\..\..\lib\windows\elbeem\lib" /libpath:"..\..\..\lib\windows\boolop\lib" /libpath:"..\..\..\lib\windows\bullet\lib" /libpath:"..\..\..\lib\windows\pthreads\lib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying required 3rd party dlls... XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\bin\ XCOPY /Y ..\..\..\lib\windows\sdl\lib\*dll ..\..\bin\ ECHO Done -# End Special Build Tool - -!ELSEIF "$(CFG)" == "blender - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\obj\windows\blender\debug" -# PROP Intermediate_Dir "..\..\obj\windows\blender\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\python" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 solid.lib SDL.lib freetype2ST.lib ftgl_static_ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.a libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.a libbsp.a libbmfont.a libghost.a libstring.a ws2_32.lib dxguid.lib opengl32.lib libjpeg.a glu32.lib user32.lib gdi32.lib shell32.lib vfw32.lib advapi32.lib winmm.lib ole32.lib libdecimation.a libiksolver.a libpng.a zlib.lib libmoto.a blender_ONL.lib blender_elbeem.lib boolop.lib BLI_bullet_d.lib pthreadVC2.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"glut32.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"libcpd.lib" /nodefaultlib:"libcp.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"libcpmtd.lib" /nodefaultlib:"msvcprtd.lib" /out:"..\..\bin\debug\blender.exe" /pdbtype:sept /libpath:"..\..\..\lib\windows\sdl\lib" /libpath:"..\..\..\lib\windows\freetype\lib" /libpath:"..\..\..\lib\windows\ftgl\lib" /libpath:"..\..\..\lib\windows\gettext\lib" /libpath:"..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\lib\windows\bsp\lib\debug" /libpath:"..\..\..\lib\windows\moto\lib\debug" /libpath:"..\..\..\lib\windows\bmfont\lib\debug" /libpath:"..\..\..\lib\windows\ghost\lib\debug" /libpath:"..\..\..\lib\windows\python\frozen" /libpath:"..\..\..\lib\windows\guardedalloc\lib\debug" /libpath:"..\..\..\lib\windows\string\lib\debug" /libpath:"..\..\..\lib\windows\solid\lib\\" /libpath:"..\..\..\lib\windows\python\lib" /libpath:"..\..\..\lib\windows\iksolver\lib\debug" /libpath:"..\..\..\lib\windows\decimation\lib\debug" /libpath:"..\..\..\lib\windows\openal\lib" /libpath:"..\..\obj\windows\intern\soundsystem\dummy\debug" /libpath:"..\..\obj\windows\intern\soundsystem\openal\debug" /libpath:"..\..\..\lib\windows\soundsystem\lib\debug\\" /libpath:"..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\lib\windows\blenkey\lib\debug" /libpath:"..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\lib\windows\png\lib\\" /libpath:"..\..\..\lib\windows\opennl\debug" /libpath:"..\..\..\lib\windows\elbeem\lib\debug" /libpath:"..\..\..\lib\windows\boolop\lib" /libpath:"..\..\..\lib\windows\bullet\lib" /libpath:"..\..\..\lib\windows\elbeem\lib" /libpath:"..\..\..\lib\windows\pthreads\lib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=ECHO Copying required 3rd party dlls... XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\bin\ ECHO Done -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "blender - Win32 Release" -# Name "blender - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\source\creator\creator.c -# End Source File -# Begin Source File - -SOURCE=..\..\source\icons\winblender.rc -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=..\..\source\icons\winblender.ico -# End Source File -# Begin Source File - -SOURCE=..\..\source\icons\winblenderfile.ico -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="blender" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=blender - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "blender.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "blender.mak" CFG="blender - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "blender - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "blender - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "blender - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\obj\windows\blender" +# PROP Intermediate_Dir "..\..\obj\windows\blender" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\python" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 solid.lib SDL.lib freetype2ST.lib ftgl_static_ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.a libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.a libbsp.a libbmfont.a libghost.a libstring.a ws2_32.lib dxguid.lib opengl32.lib libjpeg.a glu32.lib user32.lib shell32.lib gdi32.lib vfw32.lib advapi32.lib winmm.lib ole32.lib libdecimation.a libiksolver.a libpng.a zlib.lib libmoto.a blender_ONL.lib blender_elbeem.lib boolop.lib BLI_bullet.lib pthreadVC2.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"msvcprt.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"glut32.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"libcpd.lib" /nodefaultlib:"libcp.lib" /nodefaultlib:"libcmtd.lib" /out:"..\..\bin\blender.exe" /libpath:"..\..\..\lib\windows\sdl\lib" /libpath:"..\..\..\lib\windows\freetype\lib" /libpath:"..\..\..\lib\windows\ftgl\lib" /libpath:"..\..\..\lib\windows\gettext\lib" /libpath:"..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\lib\windows\bsp\lib" /libpath:"..\..\..\lib\windows\moto\lib" /libpath:"..\..\..\lib\windows\bmfont\lib" /libpath:"..\..\..\lib\windows\ghost\lib" /libpath:"..\..\..\lib\windows\python\frozen" /libpath:"..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\lib\windows\string\lib" /libpath:"..\..\..\lib\windows\solid\lib" /libpath:"..\..\..\lib\windows\python\lib" /libpath:"..\..\..\lib\windows\iksolver\lib" /libpath:"..\..\..\lib\windows\decimation\lib" /libpath:"..\..\..\lib\windows\openal\lib" /libpath:"..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\lib\windows\openssl\lib" /libpath:"..\..\obj\windows\intern\soundsystem\dummy" /libpath:"..\..\obj\windows\intern\soundsystem\openal" /libpath:"..\..\..\lib\windows\soundsystem\lib\\" /libpath:"..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\lib\windows\png\lib\\" /libpath:"..\..\..\lib\windows\opennl" /libpath:"..\..\..\lib\windows\elbeem\lib" /libpath:"..\..\..\lib\windows\boolop\lib" /libpath:"..\..\..\lib\windows\bullet\lib" /libpath:"..\..\..\lib\windows\pthreads\lib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying required 3rd party dlls... XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\bin\ XCOPY /Y ..\..\..\lib\windows\sdl\lib\*dll ..\..\bin\ ECHO Done +# End Special Build Tool + +!ELSEIF "$(CFG)" == "blender - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\obj\windows\blender\debug" +# PROP Intermediate_Dir "..\..\obj\windows\blender\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\python" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 solid.lib SDL.lib freetype2ST.lib ftgl_static_ST.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.a libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.a libbsp.a libbmfont.a libghost.a libstring.a ws2_32.lib dxguid.lib opengl32.lib libjpeg.a glu32.lib user32.lib gdi32.lib shell32.lib vfw32.lib advapi32.lib winmm.lib ole32.lib libdecimation.a libiksolver.a libpng.a zlib.lib libmoto.a blender_ONL.lib blender_elbeem.lib boolop.lib BLI_bullet_d.lib pthreadVC2.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"glut32.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"libcpd.lib" /nodefaultlib:"libcp.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"libcpmtd.lib" /nodefaultlib:"msvcprtd.lib" /out:"..\..\bin\debug\blender.exe" /pdbtype:sept /libpath:"..\..\..\lib\windows\sdl\lib" /libpath:"..\..\..\lib\windows\freetype\lib" /libpath:"..\..\..\lib\windows\ftgl\lib" /libpath:"..\..\..\lib\windows\gettext\lib" /libpath:"..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\lib\windows\bsp\lib\debug" /libpath:"..\..\..\lib\windows\moto\lib\debug" /libpath:"..\..\..\lib\windows\bmfont\lib\debug" /libpath:"..\..\..\lib\windows\ghost\lib\debug" /libpath:"..\..\..\lib\windows\python\frozen" /libpath:"..\..\..\lib\windows\guardedalloc\lib\debug" /libpath:"..\..\..\lib\windows\string\lib\debug" /libpath:"..\..\..\lib\windows\solid\lib\\" /libpath:"..\..\..\lib\windows\python\lib" /libpath:"..\..\..\lib\windows\iksolver\lib\debug" /libpath:"..\..\..\lib\windows\decimation\lib\debug" /libpath:"..\..\..\lib\windows\openal\lib" /libpath:"..\..\obj\windows\intern\soundsystem\dummy\debug" /libpath:"..\..\obj\windows\intern\soundsystem\openal\debug" /libpath:"..\..\..\lib\windows\soundsystem\lib\debug\\" /libpath:"..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\lib\windows\blenkey\lib\debug" /libpath:"..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\lib\windows\png\lib\\" /libpath:"..\..\..\lib\windows\opennl\debug" /libpath:"..\..\..\lib\windows\elbeem\lib\debug" /libpath:"..\..\..\lib\windows\boolop\lib" /libpath:"..\..\..\lib\windows\bullet\lib" /libpath:"..\..\..\lib\windows\elbeem\lib" /libpath:"..\..\..\lib\windows\pthreads\lib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=ECHO Copying required 3rd party dlls... XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\bin\ ECHO Done +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "blender - Win32 Release" +# Name "blender - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\source\creator\creator.c +# End Source File +# Begin Source File + +SOURCE=..\..\source\icons\winblender.rc +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\source\icons\winblender.ico +# End Source File +# Begin Source File + +SOURCE=..\..\source\icons\winblenderfile.ico +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/blender.dsw b/projectfiles/blender/blender.dsw index 3a69055807e..c7369f9df6c 100644 --- a/projectfiles/blender/blender.dsw +++ b/projectfiles/blender/blender.dsw @@ -1,743 +1,743 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "BKE_blenkernel"=.\blenkernel\BKE_blenkernel.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BLI_blenlib"=.\blenlib\BLI_blenlib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BLO_loader"=.\loader\BLO_loader.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BLO_readblenfile"=.\BLO_readblenfile\BLO_readblenfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BL_avi"=.\avi\BL_avi.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BL_imbuf"=.\imbuf\BL_imbuf.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BL_src"=.\src\BL_src.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BL_src_cre"=.\src\BL_src_cre.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BPY_python"=.\BPY_python\BPY_python.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BRA_radiosity"=.\radiosity\BRA_radiosity.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BRE_render"=.\render\BRE_render.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name BRE_yafray - End Project Dependency -}}} - -############################################################################### - -Project: "BRE_renderconverter"=.\renderconverter\BRE_renderconverter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BRE_yafray"=.\yafray\BRE_yafray.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Bullet"=..\..\extern\bullet\Bullet\BLI_Bullet.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "BulletDynamics"=..\..\extern\bullet\BulletDynamics\BLI_BulletDynamics.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "DNA_makesdna"=.\makesdna\DNA_makesdna.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "EXP_expressions"=..\gameengine\expression\EXP_expressions.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "FTF_ftfont"=.\ftfont\FTF_ftfont.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "GP_axctl"=..\gameengine\gameplayer\axctl\GP_axctl.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name KX_converter - End Project Dependency - Begin Project Dependency - Project_Dep_Name EXP_expressions - End Project Dependency - Begin Project Dependency - Project_Dep_Name SCA_GameLogic - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_ketsji - End Project Dependency - Begin Project Dependency - Project_Dep_Name SG_SceneGraph - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_openglrasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_rasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name SYS_system - End Project Dependency - Begin Project Dependency - Project_Dep_Name GP_common - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_loopbacknetwork - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name DNA_makesdna - End Project Dependency - Begin Project Dependency - Project_Dep_Name gen_messaging - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_verify - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_decrypt - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_loader - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_readblenfile - End Project Dependency - Begin Project Dependency - Project_Dep_Name BKE_blenkernel - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_avi - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_imbuf - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLI_blenlib - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_OpenAL - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Physics - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Ode - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Dummy - End Project Dependency -}}} - -############################################################################### - -Project: "GP_common"=..\gameengine\gameplayer\common\GP_common.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "GP_ghost"=..\gameengine\gameplayer\ghost\GP_ghost.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name BKE_blenkernel - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_avi - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_imbuf - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLI_blenlib - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_loader - End Project Dependency - Begin Project Dependency - Project_Dep_Name DNA_makesdna - End Project Dependency - Begin Project Dependency - Project_Dep_Name EXP_expressions - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_converter - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_ketsji - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_loopbacknetwork - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_openglrasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_rasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name SCA_GameLogic - End Project Dependency - Begin Project Dependency - Project_Dep_Name SG_SceneGraph - End Project Dependency - Begin Project Dependency - Project_Dep_Name SYS_system - End Project Dependency - Begin Project Dependency - Project_Dep_Name gen_messaging - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_readblenfile - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_decrypt - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_verify - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_OpenAL - End Project Dependency - Begin Project Dependency - Project_Dep_Name GP_common - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Physics - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Dummy - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Sumo - End Project Dependency -}}} - -############################################################################### - -Project: "KX_blenderhook"=..\gameengine\blenderhook\KX_blenderhook.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "KX_converter"=..\gameengine\converter\KX_converter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "KX_ketsji"=..\gameengine\ketsji\KX_ketsji.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "KX_network"=..\gameengine\ketsji\network\KX_network.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "NG_loopbacknetwork"=..\gameengine\network\loopbacknetwork\NG_loopbacknetwork.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "NG_network"=..\gameengine\network\network\NG_network.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "PHY_Dummy"=..\GAMEENGINE\PHYSICS\PHY_PHYSICS\PHY_Dummy\PHY_Dummy.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "PHY_Ode"=..\gameengine\physics\PHY_Physics\PHY_Ode\PHY_Ode.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "PHY_Physics"=..\gameengine\physics\PHY_Physics\PHY_Physics.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "PHY_Sumo"=..\gameengine\physics\PHY_Physics\PHY_Sumo\PHY_Sumo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "RAS_openglrasterizer"=..\gameengine\rasterizer\openglrasterizer\RAS_openglrasterizer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "RAS_rasterizer"=..\gameengine\rasterizer\RAS_rasterizer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SCA_GameLogic"=..\gameengine\gamelogic\SCA_GameLogic.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SG_SceneGraph"=..\gameengine\scenegraph\SG_SceneGraph.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SYS_system"=..\kernel\system\SYS_system.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "blender"=.\blender.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name BKE_blenkernel - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_avi - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_imbuf - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLI_blenlib - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_decrypt - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_encrypt - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_loader - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_sign - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_verify - End Project Dependency - Begin Project Dependency - Project_Dep_Name BRA_radiosity - End Project Dependency - Begin Project Dependency - Project_Dep_Name BRE_render - End Project Dependency - Begin Project Dependency - Project_Dep_Name DNA_makesdna - End Project Dependency - Begin Project Dependency - Project_Dep_Name EXP_expressions - End Project Dependency - Begin Project Dependency - Project_Dep_Name gen_messaging - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_loopbacknetwork - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_openglrasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_rasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name SCA_GameLogic - End Project Dependency - Begin Project Dependency - Project_Dep_Name SG_SceneGraph - End Project Dependency - Begin Project Dependency - Project_Dep_Name SYS_system - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_src_pub - End Project Dependency - Begin Project Dependency - Project_Dep_Name blenpluginapi - End Project Dependency - Begin Project Dependency - Project_Dep_Name BL_src - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_OpenAL - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Dummy - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Physics - End Project Dependency - Begin Project Dependency - Project_Dep_Name FTF_ftfont - End Project Dependency - Begin Project Dependency - Project_Dep_Name BPY_python - End Project Dependency - Begin Project Dependency - Project_Dep_Name PHY_Sumo - End Project Dependency - Begin Project Dependency - Project_Dep_Name BLO_readblenfile - End Project Dependency - Begin Project Dependency - Project_Dep_Name Bullet - End Project Dependency - Begin Project Dependency - Project_Dep_Name BulletDynamics - End Project Dependency -}}} - -############################################################################### - -Project: "blenpluginapi"=.\blenpluginapi\blenpluginapi\blenpluginapi.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "gen_messaging"=..\KERNEL\gen_messaging\gen_messaging.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BKE_blenkernel"=.\blenkernel\BKE_blenkernel.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BLI_blenlib"=.\blenlib\BLI_blenlib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BLO_loader"=.\loader\BLO_loader.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BLO_readblenfile"=.\BLO_readblenfile\BLO_readblenfile.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BL_avi"=.\avi\BL_avi.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BL_imbuf"=.\imbuf\BL_imbuf.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BL_src"=.\src\BL_src.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BL_src_cre"=.\src\BL_src_cre.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BPY_python"=.\BPY_python\BPY_python.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BRA_radiosity"=.\radiosity\BRA_radiosity.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BRE_render"=.\render\BRE_render.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name BRE_yafray + End Project Dependency +}}} + +############################################################################### + +Project: "BRE_renderconverter"=.\renderconverter\BRE_renderconverter.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BRE_yafray"=.\yafray\BRE_yafray.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Bullet"=..\..\extern\bullet\Bullet\BLI_Bullet.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "BulletDynamics"=..\..\extern\bullet\BulletDynamics\BLI_BulletDynamics.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DNA_makesdna"=.\makesdna\DNA_makesdna.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "EXP_expressions"=..\gameengine\expression\EXP_expressions.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FTF_ftfont"=.\ftfont\FTF_ftfont.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "GP_axctl"=..\gameengine\gameplayer\axctl\GP_axctl.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name KX_converter + End Project Dependency + Begin Project Dependency + Project_Dep_Name EXP_expressions + End Project Dependency + Begin Project Dependency + Project_Dep_Name SCA_GameLogic + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_ketsji + End Project Dependency + Begin Project Dependency + Project_Dep_Name SG_SceneGraph + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_openglrasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_rasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name SYS_system + End Project Dependency + Begin Project Dependency + Project_Dep_Name GP_common + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_loopbacknetwork + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name DNA_makesdna + End Project Dependency + Begin Project Dependency + Project_Dep_Name gen_messaging + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_verify + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_decrypt + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_loader + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_readblenfile + End Project Dependency + Begin Project Dependency + Project_Dep_Name BKE_blenkernel + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_avi + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_imbuf + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLI_blenlib + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_OpenAL + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Physics + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Ode + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Dummy + End Project Dependency +}}} + +############################################################################### + +Project: "GP_common"=..\gameengine\gameplayer\common\GP_common.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "GP_ghost"=..\gameengine\gameplayer\ghost\GP_ghost.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name BKE_blenkernel + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_avi + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_imbuf + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLI_blenlib + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_loader + End Project Dependency + Begin Project Dependency + Project_Dep_Name DNA_makesdna + End Project Dependency + Begin Project Dependency + Project_Dep_Name EXP_expressions + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_converter + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_ketsji + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_loopbacknetwork + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_openglrasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_rasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name SCA_GameLogic + End Project Dependency + Begin Project Dependency + Project_Dep_Name SG_SceneGraph + End Project Dependency + Begin Project Dependency + Project_Dep_Name SYS_system + End Project Dependency + Begin Project Dependency + Project_Dep_Name gen_messaging + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_readblenfile + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_decrypt + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_verify + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_OpenAL + End Project Dependency + Begin Project Dependency + Project_Dep_Name GP_common + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Physics + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Dummy + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Sumo + End Project Dependency +}}} + +############################################################################### + +Project: "KX_blenderhook"=..\gameengine\blenderhook\KX_blenderhook.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "KX_converter"=..\gameengine\converter\KX_converter.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "KX_ketsji"=..\gameengine\ketsji\KX_ketsji.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "KX_network"=..\gameengine\ketsji\network\KX_network.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NG_loopbacknetwork"=..\gameengine\network\loopbacknetwork\NG_loopbacknetwork.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NG_network"=..\gameengine\network\network\NG_network.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PHY_Dummy"=..\GAMEENGINE\PHYSICS\PHY_PHYSICS\PHY_Dummy\PHY_Dummy.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PHY_Ode"=..\gameengine\physics\PHY_Physics\PHY_Ode\PHY_Ode.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PHY_Physics"=..\gameengine\physics\PHY_Physics\PHY_Physics.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PHY_Sumo"=..\gameengine\physics\PHY_Physics\PHY_Sumo\PHY_Sumo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RAS_openglrasterizer"=..\gameengine\rasterizer\openglrasterizer\RAS_openglrasterizer.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RAS_rasterizer"=..\gameengine\rasterizer\RAS_rasterizer.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SCA_GameLogic"=..\gameengine\gamelogic\SCA_GameLogic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SG_SceneGraph"=..\gameengine\scenegraph\SG_SceneGraph.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SYS_system"=..\kernel\system\SYS_system.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "blender"=.\blender.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name BKE_blenkernel + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_avi + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_imbuf + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLI_blenlib + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_decrypt + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_encrypt + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_loader + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_sign + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_verify + End Project Dependency + Begin Project Dependency + Project_Dep_Name BRA_radiosity + End Project Dependency + Begin Project Dependency + Project_Dep_Name BRE_render + End Project Dependency + Begin Project Dependency + Project_Dep_Name DNA_makesdna + End Project Dependency + Begin Project Dependency + Project_Dep_Name EXP_expressions + End Project Dependency + Begin Project Dependency + Project_Dep_Name gen_messaging + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_loopbacknetwork + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_openglrasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_rasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name SCA_GameLogic + End Project Dependency + Begin Project Dependency + Project_Dep_Name SG_SceneGraph + End Project Dependency + Begin Project Dependency + Project_Dep_Name SYS_system + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_src_pub + End Project Dependency + Begin Project Dependency + Project_Dep_Name blenpluginapi + End Project Dependency + Begin Project Dependency + Project_Dep_Name BL_src + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_OpenAL + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Dummy + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Physics + End Project Dependency + Begin Project Dependency + Project_Dep_Name FTF_ftfont + End Project Dependency + Begin Project Dependency + Project_Dep_Name BPY_python + End Project Dependency + Begin Project Dependency + Project_Dep_Name PHY_Sumo + End Project Dependency + Begin Project Dependency + Project_Dep_Name BLO_readblenfile + End Project Dependency + Begin Project Dependency + Project_Dep_Name Bullet + End Project Dependency + Begin Project Dependency + Project_Dep_Name BulletDynamics + End Project Dependency +}}} + +############################################################################### + +Project: "blenpluginapi"=.\blenpluginapi\blenpluginapi\blenpluginapi.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "gen_messaging"=..\KERNEL\gen_messaging\gen_messaging.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/projectfiles/blender/blenkernel/BKE_blenkernel.dsp b/projectfiles/blender/blenkernel/BKE_blenkernel.dsp index 171bfab7dad..d430498d44d 100644 --- a/projectfiles/blender/blenkernel/BKE_blenkernel.dsp +++ b/projectfiles/blender/blenkernel/BKE_blenkernel.dsp @@ -1,564 +1,564 @@ -# Microsoft Developer Studio Project File - Name="BKE_blenkernel" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BKE_blenkernel - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BKE_blenkernel.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BKE_blenkernel.mak" CFG="BKE_blenkernel - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BKE_blenkernel - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BKE_blenkernel - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BKE_blenkernel - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BKE_blenkernel - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BKE_blenkernel - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\decimation\include" /I "../../../../lib/windows/zlib/include" /I "..\..\..\intern\elbeem\extern" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /D "USE_CCGSUBSURFLIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BKE_blenkernel - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel\debug" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\decimation\include" /I "../../../../lib/windows/zlib/include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /I "..\..\..\intern\elbeem\extern" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BKE_blenkernel - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BKE_blenkernel___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "BKE_blenkernel___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll_debug" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT BASE CPP /WX -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\blenloader" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /I "..\..\..\intern\elbeem\extern" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /WX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenkernel\debug\BKE_blenkernel.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BKE_blenkernel - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "BKE_blenkernel___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "BKE_blenkernel___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /I "..\..\..\intern\elbeem\extern" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenkernel\BKE_blenkernel.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BKE_blenkernel - Win32 Release" -# Name "BKE_blenkernel - Win32 Debug" -# Name "BKE_blenkernel - Win32 MT DLL Debug" -# Name "BKE_blenkernel - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\action.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\idprop.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\anim.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\armature.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\blender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\bmfont.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\brush.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\CCGSubSurf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\cdderivedmesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\colortools.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\constraint.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\curve.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\customdata.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\deform.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\depsgraph.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\DerivedMesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\displist.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\effect.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\exotic.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\font.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\group.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\icons.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\image.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\ipo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\key.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\lattice.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\library.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\material.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\mball.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\mesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\modifier.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\nla.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\node.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\node_composite.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\node_shaders.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\object.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\packedFile.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\property.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\sca.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\scene.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\screen.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\script.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\softbody.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\sound.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\subsurf_ccg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\text.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\texture.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\world.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\writeavi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\writeframeserver.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_action.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_anim.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_armature.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_bad_level_calls.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_blender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_bmfont.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_bmfont_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_booleanops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_booleanops_mesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_brush.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_cdderivedmesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_constraint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_curve.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_customdata.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_deform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_depsgraph.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_DerivedMesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_displist.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_effect.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_endian.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_exotic.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_font.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_global.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_group.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_image.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_ipo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_key.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_lattice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_library.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_main.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_material.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_mball.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_mesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_modifier.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_nla.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_object.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_packedFile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_plugin_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_property.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_sca.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_scene.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_screen.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_script.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_softbody.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_sound.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_subsurf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_text.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_texture.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_utildefines.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_world.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\BKE_writeavi.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\intern\CCGSubSurf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenkernel\depsgraph_private.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BKE_blenkernel" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BKE_blenkernel - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BKE_blenkernel.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BKE_blenkernel.mak" CFG="BKE_blenkernel - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BKE_blenkernel - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BKE_blenkernel - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BKE_blenkernel - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BKE_blenkernel - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BKE_blenkernel - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\decimation\include" /I "../../../../lib/windows/zlib/include" /I "..\..\..\intern\elbeem\extern" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /D "USE_CCGSUBSURFLIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BKE_blenkernel - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel\debug" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\decimation\include" /I "../../../../lib/windows/zlib/include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /I "..\..\..\intern\elbeem\extern" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BKE_blenkernel - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BKE_blenkernel___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "BKE_blenkernel___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll_debug" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT BASE CPP /WX +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\blenloader" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /I "..\..\..\intern\elbeem\extern" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /WX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenkernel\debug\BKE_blenkernel.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BKE_blenkernel - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BKE_blenkernel___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "BKE_blenkernel___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenkernel\mtdll" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenlib" /I "../../../source/gameengine\SoundSystem\\" /I "../../../../lib/windows/iksolver/include" /I "../../../../lib/windows/bsp/include" /I "..\..\..\intern\elbeem\extern" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenkernel\BKE_blenkernel.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BKE_blenkernel - Win32 Release" +# Name "BKE_blenkernel - Win32 Debug" +# Name "BKE_blenkernel - Win32 MT DLL Debug" +# Name "BKE_blenkernel - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\action.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\idprop.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\anim.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\armature.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\blender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\bmfont.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\brush.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\CCGSubSurf.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\cdderivedmesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\colortools.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\constraint.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\curve.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\customdata.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\deform.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\depsgraph.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\DerivedMesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\displist.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\effect.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\exotic.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\font.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\group.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\icons.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\image.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\ipo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\key.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\lattice.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\library.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\material.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\mball.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\mesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\modifier.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\nla.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\node.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\node_composite.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\node_shaders.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\object.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\packedFile.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\property.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\sca.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\scene.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\screen.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\script.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\softbody.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\sound.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\subsurf_ccg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\text.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\texture.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\world.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\writeavi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\writeframeserver.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_action.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_anim.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_armature.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_bad_level_calls.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_blender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_bmfont.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_bmfont_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_booleanops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_booleanops_mesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_brush.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_cdderivedmesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_constraint.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_curve.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_customdata.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_deform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_depsgraph.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_DerivedMesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_displist.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_effect.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_endian.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_exotic.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_font.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_global.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_group.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_image.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_ipo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_key.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_lattice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_library.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_main.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_material.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_mball.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_mesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_modifier.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_nla.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_object.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_packedFile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_plugin_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_property.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_sca.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_scene.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_screen.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_script.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_softbody.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_sound.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_subsurf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_text.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_texture.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_utildefines.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_world.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\BKE_writeavi.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\intern\CCGSubSurf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenkernel\depsgraph_private.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/blenlib/BLI_blenlib.dsp b/projectfiles/blender/blenlib/BLI_blenlib.dsp index 137725d3f7f..0a5ed2c4d9d 100644 --- a/projectfiles/blender/blenlib/BLI_blenlib.dsp +++ b/projectfiles/blender/blenlib/BLI_blenlib.dsp @@ -1,318 +1,318 @@ -# Microsoft Developer Studio Project File - Name="BLI_blenlib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BLI_blenlib - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BLI_blenlib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BLI_blenlib.mak" CFG="BLI_blenlib - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BLI_blenlib - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BLI_blenlib - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BLI_blenlib - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BLI_blenlib - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BLI_blenlib - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\freetype\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /I "../../../../lib/windows/zlib/include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLI_blenlib - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\freetype\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /I "../../../../lib/windows/zlib/include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLI_blenlib - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BLI_blenlib___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "BLI_blenlib___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenlib\debug\BLI_blenlib.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLI_blenlib - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "BLI_blenlib___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "BLI_blenlib___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenlib\BLI_blenlib.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BLI_blenlib - Win32 Release" -# Name "BLI_blenlib - Win32 Debug" -# Name "BLI_blenlib - Win32 MT DLL Debug" -# Name "BLI_blenlib - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\arithb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_dynstr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_ghash.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_heap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_linklist.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_memarena.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\dynlib.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\edgehash.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\fileops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\freetypefont.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\gsqueue.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\jitter.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\matrixops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\noise.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\psfont.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\rand.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\rct.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\scanfill.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\storage.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\threads.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\time.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\util.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\vectorops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\winstuff.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_arithb.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_blenlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_callbacks.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_edgehash.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_editVert.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_fileops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_ghash.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_linklist.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_memarena.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_scanfill.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_storage.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_storage_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\intern\BLI_util.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\BLI_winstuff.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\MTC_matrixops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\MTC_vectorops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\PIL_dynlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenlib\PIL_time.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BLI_blenlib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BLI_blenlib - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BLI_blenlib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BLI_blenlib.mak" CFG="BLI_blenlib - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BLI_blenlib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BLI_blenlib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BLI_blenlib - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BLI_blenlib - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BLI_blenlib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\freetype\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /I "../../../../lib/windows/zlib/include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLI_blenlib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\freetype\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /I "../../../../lib/windows/zlib/include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_FREETYPE2" /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLI_blenlib - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BLI_blenlib___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "BLI_blenlib___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenlib\debug\BLI_blenlib.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLI_blenlib - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BLI_blenlib___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "BLI_blenlib___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\blenlib\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\blenlib\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\blenlib\BLI_blenlib.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BLI_blenlib - Win32 Release" +# Name "BLI_blenlib - Win32 Debug" +# Name "BLI_blenlib - Win32 MT DLL Debug" +# Name "BLI_blenlib - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\arithb.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_dynstr.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_ghash.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_heap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_linklist.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_memarena.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\dynlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\edgehash.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\fileops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\freetypefont.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\gsqueue.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\jitter.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\matrixops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\noise.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\psfont.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\rand.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\rct.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\scanfill.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\storage.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\threads.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\time.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\util.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\vectorops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\winstuff.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_arithb.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_blenlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_callbacks.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_edgehash.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_editVert.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_fileops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_ghash.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_linklist.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_memarena.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_scanfill.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_storage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_storage_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\intern\BLI_util.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\BLI_winstuff.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\MTC_matrixops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\MTC_vectorops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\PIL_dynlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenlib\PIL_time.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/blenpluginapi/blenpluginapi/blenpluginapi.dsp b/projectfiles/blender/blenpluginapi/blenpluginapi/blenpluginapi.dsp index 6b219ffad19..935335448a4 100644 --- a/projectfiles/blender/blenpluginapi/blenpluginapi/blenpluginapi.dsp +++ b/projectfiles/blender/blenpluginapi/blenpluginapi/blenpluginapi.dsp @@ -1,119 +1,119 @@ -# Microsoft Developer Studio Project File - Name="blenpluginapi" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=blenpluginapi - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "blenpluginapi.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "blenpluginapi.mak" CFG="blenpluginapi - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "blenpluginapi - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "blenpluginapi - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "blenpluginapi - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\blender\blenpluginapi" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\blenpluginapi" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\blender" /I "..\..\..\..\source\blender\blenpluginapi" /I "..\..\..\..\source\blender\blenlib" /I "..\..\..\..\source\blender\imbuf" /I "..\..\..\..\source\blender\makesdna" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\blenpluginapi.lib" - -!ELSEIF "$(CFG)" == "blenpluginapi - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\blender\blenpluginapi\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\blenpluginapi\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\blender" /I "..\..\..\..\source\blender\blenpluginapi" /I "..\..\..\..\source\blender\blenlib" /I "..\..\..\..\source\blender\imbuf" /I "..\..\..\..\source\blender\makesdna" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# SUBTRACT CPP /X -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\debug\blenpluginapi.lib" - -!ENDIF - -# Begin Target - -# Name "blenpluginapi - Win32 Release" -# Name "blenpluginapi - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenpluginapi\intern\pluginapi.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenpluginapi\documentation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenpluginapi\floatpatch.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenpluginapi\iff.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenpluginapi\plugin.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenpluginapi\util.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="blenpluginapi" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=blenpluginapi - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "blenpluginapi.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "blenpluginapi.mak" CFG="blenpluginapi - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "blenpluginapi - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "blenpluginapi - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "blenpluginapi - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\blender\blenpluginapi" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\blenpluginapi" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\blender" /I "..\..\..\..\source\blender\blenpluginapi" /I "..\..\..\..\source\blender\blenlib" /I "..\..\..\..\source\blender\imbuf" /I "..\..\..\..\source\blender\makesdna" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\blenpluginapi.lib" + +!ELSEIF "$(CFG)" == "blenpluginapi - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\blender\blenpluginapi\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\blenpluginapi\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\blender" /I "..\..\..\..\source\blender\blenpluginapi" /I "..\..\..\..\source\blender\blenlib" /I "..\..\..\..\source\blender\imbuf" /I "..\..\..\..\source\blender\makesdna" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT CPP /X +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\debug\blenpluginapi.lib" + +!ENDIF + +# Begin Target + +# Name "blenpluginapi - Win32 Release" +# Name "blenpluginapi - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenpluginapi\intern\pluginapi.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenpluginapi\documentation.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenpluginapi\floatpatch.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenpluginapi\iff.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenpluginapi\plugin.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenpluginapi\util.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/ftfont/FTF_ftfont.dsp b/projectfiles/blender/ftfont/FTF_ftfont.dsp index 7ecd50aa75f..9a90df08483 100644 --- a/projectfiles/blender/ftfont/FTF_ftfont.dsp +++ b/projectfiles/blender/ftfont/FTF_ftfont.dsp @@ -1,118 +1,118 @@ -# Microsoft Developer Studio Project File - Name="FTF_ftfont" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=FTF_ftfont - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "FTF_ftfont.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "FTF_ftfont.mak" CFG="FTF_ftfont - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "FTF_ftfont - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "FTF_ftfont - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "FTF_ftfont - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\ftfont" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\ftfont" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../source\blender\makesdna" /I "../../../source\blender\blenloader" /I "../../../source\blender\blenlib" /I "../../../../lib/windows/ftgl/include" /I "../../../../lib/windows/freetype/include" /I "../../../lib/windows/iconv/include" /I "../../../../lib/windows/gettext/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WCHAR_T16" /D "HAVE_LC_MESSAGES" /YX /FD /c -# ADD BASE RSC /l 0x411 /d "NDEBUG" -# ADD RSC /l 0x411 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "FTF_ftfont - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\ftfont" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\ftfont" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../source\blender\blenlib" /I "../../../source\blender\makesdna" /I "../../../../lib/windows/ftgl/include" /I "../../../../lib/windows/freetype/include" /I "../../../lib/windows/iconv/include" /I "../../../../lib/windows/gettext/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WCHAR_T16" /D "HAVE_LC_MESSAGES" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c -# ADD BASE RSC /l 0x411 /d "_DEBUG" -# ADD RSC /l 0x411 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "FTF_ftfont - Win32 Release" -# Name "FTF_ftfont - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\ftfont\intern\FTF_Api.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\ftfont\intern\FTF_TTFont.cpp -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\blender\ftfont\FTF_Api.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\ftfont\FTF_Settings.h -# End Source File -# End Group -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\blender\ftfont\intern\FTF_TTFont.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="FTF_ftfont" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=FTF_ftfont - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FTF_ftfont.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FTF_ftfont.mak" CFG="FTF_ftfont - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FTF_ftfont - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "FTF_ftfont - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FTF_ftfont - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\ftfont" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\ftfont" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../source\blender\makesdna" /I "../../../source\blender\blenloader" /I "../../../source\blender\blenlib" /I "../../../../lib/windows/ftgl/include" /I "../../../../lib/windows/freetype/include" /I "../../../lib/windows/iconv/include" /I "../../../../lib/windows/gettext/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "WCHAR_T16" /D "HAVE_LC_MESSAGES" /YX /FD /c +# ADD BASE RSC /l 0x411 /d "NDEBUG" +# ADD RSC /l 0x411 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "FTF_ftfont - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\ftfont" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\ftfont" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../source\blender\blenlib" /I "../../../source\blender\makesdna" /I "../../../../lib/windows/ftgl/include" /I "../../../../lib/windows/freetype/include" /I "../../../lib/windows/iconv/include" /I "../../../../lib/windows/gettext/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "WCHAR_T16" /D "HAVE_LC_MESSAGES" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c +# ADD BASE RSC /l 0x411 /d "_DEBUG" +# ADD RSC /l 0x411 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "FTF_ftfont - Win32 Release" +# Name "FTF_ftfont - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\ftfont\intern\FTF_Api.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\ftfont\intern\FTF_TTFont.cpp +# End Source File +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\blender\ftfont\FTF_Api.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\ftfont\FTF_Settings.h +# End Source File +# End Group +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\blender\ftfont\intern\FTF_TTFont.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/glut/BL_glut.dsp b/projectfiles/blender/glut/BL_glut.dsp index 2e351603e67..a4f1573ab38 100644 --- a/projectfiles/blender/glut/BL_glut.dsp +++ b/projectfiles/blender/glut/BL_glut.dsp @@ -1,324 +1,324 @@ -# Microsoft Developer Studio Project File - Name="BL_glut" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BL_glut - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BL_glut.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BL_glut.mak" CFG="BL_glut - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BL_glut - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_glut - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_glut - Win32 Profile" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BL_glut - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\glut" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\source\blender\\" /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\BL_glut.lib" - -!ELSEIF "$(CFG)" == "BL_glut - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\glut\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /I "..\..\..\source\blender\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\debug\BL_glut.lib" - -!ELSEIF "$(CFG)" == "BL_glut - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BL_glut___Win32_Profile" -# PROP BASE Intermediate_Dir "BL_glut___Win32_Profile" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "BL_glut___Win32_Profile" -# PROP Intermediate_Dir "BL_glut___Win32_Profile" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /I "..\..\..\source\blender\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /I "..\..\..\source\blender\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\debug\BL_glut.lib" -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\profile\BL_glut.lib" - -!ENDIF - -# Begin Target - -# Name "BL_glut - Win32 Release" -# Name "BL_glut - Win32 Debug" -# Name "BL_glut - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_8x13.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_9x15.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_bitmap.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_blender.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_bwidth.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_cindex.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_cmap.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_cursor.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_dials.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_draw.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_dstr.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_event.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_ext.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_fullscrn.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_get.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_hel10.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_hel12.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_hel18.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_helb10.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_helb12.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_helb14.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_helb8.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_init.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_input.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_mesa.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_modifier.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_mroman.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_overlay.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_roman.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_scr12.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_scr14.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_scr15.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_shapes.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_space.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_stroke.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_swap.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_swidth.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_tablet.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_teapot.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_tr10.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_tr24.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_util.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_vidresize.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_warp.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_win.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\glut_winmisc.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\win32_glx.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\win32_menu.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\win32_util.c" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\blender\glut-win\win32_x11.c" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\glut\blenderglut.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BL_glut" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BL_glut - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BL_glut.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BL_glut.mak" CFG="BL_glut - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BL_glut - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_glut - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_glut - Win32 Profile" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BL_glut - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\glut" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\source\blender\\" /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\BL_glut.lib" + +!ELSEIF "$(CFG)" == "BL_glut - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\blender\glut\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /I "..\..\..\source\blender\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\debug\BL_glut.lib" + +!ELSEIF "$(CFG)" == "BL_glut - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BL_glut___Win32_Profile" +# PROP BASE Intermediate_Dir "BL_glut___Win32_Profile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "BL_glut___Win32_Profile" +# PROP Intermediate_Dir "BL_glut___Win32_Profile" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /I "..\..\..\source\blender\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\source\blender\glut-win" /I "..\..\..\source\blender\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\debug\BL_glut.lib" +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\blender\glut\profile\BL_glut.lib" + +!ENDIF + +# Begin Target + +# Name "BL_glut - Win32 Release" +# Name "BL_glut - Win32 Debug" +# Name "BL_glut - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_8x13.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_9x15.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_bitmap.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_blender.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_bwidth.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_cindex.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_cmap.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_cursor.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_dials.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_draw.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_dstr.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_event.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_ext.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_fullscrn.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_get.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_hel10.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_hel12.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_hel18.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_helb10.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_helb12.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_helb14.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_helb8.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_init.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_input.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_mesa.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_modifier.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_mroman.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_overlay.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_roman.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_scr12.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_scr14.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_scr15.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_shapes.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_space.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_stroke.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_swap.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_swidth.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_tablet.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_teapot.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_tr10.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_tr24.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_util.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_vidresize.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_warp.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_win.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\glut_winmisc.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\win32_glx.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\win32_menu.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\win32_util.c" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\blender\glut-win\win32_x11.c" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\glut\blenderglut.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/imbuf/BL_imbuf.dsp b/projectfiles/blender/imbuf/BL_imbuf.dsp index 002426124b6..04d81d8229c 100644 --- a/projectfiles/blender/imbuf/BL_imbuf.dsp +++ b/projectfiles/blender/imbuf/BL_imbuf.dsp @@ -1,438 +1,438 @@ -# Microsoft Developer Studio Project File - Name="BL_imbuf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BL_imbuf - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BL_imbuf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BL_imbuf.mak" CFG="BL_imbuf - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BL_imbuf - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_imbuf - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_imbuf - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_imbuf - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BL_imbuf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\imbuf\intern" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\tiff\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_imbuf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\blender\imbuf\intern" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\tiff\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /FD /I /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_imbuf - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BL_imbuf___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "BL_imbuf___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\blender\makesdna..\..\..\lib\windows\\" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\tiff\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\imbuf\debug\BL_imbuf.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_imbuf - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "BL_imbuf___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "BL_imbuf___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\blender\makesdna..\..\..\lib\windows\\" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\tiff\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\imbuf\BL_imbuf.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BL_imbuf - Win32 Release" -# Name "BL_imbuf - Win32 Debug" -# Name "BL_imbuf - Win32 MT DLL Debug" -# Name "BL_imbuf - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\allocimbuf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\amiga.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\anim.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\anim5.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\antialias.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\bitplanes.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\bmp.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineon_dpx.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineonlib.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cmap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cspace.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\data.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\dither.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\divers.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\dpxlib.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\dynlibtiff.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\filter.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\ham.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\hamx.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\iff.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\imageprocess.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\iris.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\jpeg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageCore.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageLib.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logmemfile.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\png.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\quicktime\apple\quicktime_export.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\quicktime\apple\quicktime_import.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\radiance_hdr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\readimage.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\rectop.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\rotate.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\scaling.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\targa.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\tiff.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\util.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\writeimage.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cin_debug_stuff.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineonfile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineonlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\dpxfile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\dpxlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\dynlibtiff.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_allocimbuf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_amiga.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_anim.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_anim5.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_bitplanes.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_bmp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_cmap.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_divers.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_filter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_ham.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_hamx.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_iff.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\IMB_imbuf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\IMB_imbuf_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_iris.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_jpeg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_png.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_radiance_hdr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_targa.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\IMB_tiff.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\imbuf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\imbuf_patch.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageCore.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageLib.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logmemfile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\imbuf\intern\matrix.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\quicktime\quicktime_export.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\quicktime\quicktime_import.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BL_imbuf" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BL_imbuf - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BL_imbuf.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BL_imbuf.mak" CFG="BL_imbuf - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BL_imbuf - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_imbuf - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_imbuf - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_imbuf - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BL_imbuf - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\imbuf\intern" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\tiff\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_imbuf - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\blender\imbuf\intern" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\tiff\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /FD /I /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_imbuf - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BL_imbuf___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "BL_imbuf___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\blender\makesdna..\..\..\lib\windows\\" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\tiff\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\imbuf\debug\BL_imbuf.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_imbuf - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BL_imbuf___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "BL_imbuf___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\imbuf\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\imbuf\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\source\blender\makesdna" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\blender\makesdna..\..\..\lib\windows\\" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\avi" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\include" /I "..\..\..\..\lib\windows\jpeg\include" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\..\lib\windows\png\include" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\tiff\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\imbuf\BL_imbuf.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BL_imbuf - Win32 Release" +# Name "BL_imbuf - Win32 Debug" +# Name "BL_imbuf - Win32 MT DLL Debug" +# Name "BL_imbuf - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\allocimbuf.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\amiga.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\anim.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\anim5.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\antialias.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\bitplanes.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\bmp.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineon_dpx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineonlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cmap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cspace.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\data.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\dither.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\divers.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\dpxlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\dynlibtiff.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\filter.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\ham.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\hamx.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\iff.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\imageprocess.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\iris.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\jpeg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageCore.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageLib.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logmemfile.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\png.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\quicktime\apple\quicktime_export.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\quicktime\apple\quicktime_import.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\radiance_hdr.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\readimage.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\rectop.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\rotate.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\scaling.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\targa.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\tiff.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\util.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\writeimage.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cin_debug_stuff.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineonfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\cineonlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\dpxfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\dpxlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\dynlibtiff.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_allocimbuf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_amiga.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_anim.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_anim5.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_bitplanes.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_bmp.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_cmap.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_divers.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_filter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_ham.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_hamx.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_iff.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\IMB_imbuf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\IMB_imbuf_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_iris.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_jpeg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_png.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_radiance_hdr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_targa.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\IMB_tiff.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\imbuf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\imbuf_patch.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageCore.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logImageLib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\cineon\logmemfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\imbuf\intern\matrix.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\quicktime\quicktime_export.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\quicktime\quicktime_import.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/img/BL_img.dsp b/projectfiles/blender/img/BL_img.dsp index 16f0827fbe9..465db34f4da 100644 --- a/projectfiles/blender/img/BL_img.dsp +++ b/projectfiles/blender/img/BL_img.dsp @@ -1,171 +1,171 @@ -# Microsoft Developer Studio Project File - Name="BL_img" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BL_IMG - WIN32 DEBUG -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BL_img.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BL_img.mak" CFG="BL_IMG - WIN32 DEBUG" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BL_img - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_img - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BL_img - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\img" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\img" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_img - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\img\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\img\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BL_img - Win32 Release" -# Name "BL_img - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Api.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_BrushRGBA32.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_CanvasRGBA32.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Line.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Pixmap.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_PixmapRGBA32.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Rect.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "intern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_BrushRGBA32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_CanvasRGBA32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Color.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Line.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_MemPtr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Pixmap.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_PixmapRGBA32.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Rect.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\img\intern\IMG_Types.h -# End Source File -# End Group -# Begin Group "extern" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\blender\img\IMG_Api.h -# End Source File -# End Group -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BL_img" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BL_IMG - WIN32 DEBUG +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BL_img.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BL_img.mak" CFG="BL_IMG - WIN32 DEBUG" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BL_img - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_img - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BL_img - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\img" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\img" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_img - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\img\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\img\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BL_img - Win32 Release" +# Name "BL_img - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Api.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_BrushRGBA32.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_CanvasRGBA32.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Line.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Pixmap.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_PixmapRGBA32.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Rect.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "intern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_BrushRGBA32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_CanvasRGBA32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Color.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Line.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_MemPtr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Pixmap.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_PixmapRGBA32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Rect.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\img\intern\IMG_Types.h +# End Source File +# End Group +# Begin Group "extern" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\blender\img\IMG_Api.h +# End Source File +# End Group +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/loader/BLO_loader.dsp b/projectfiles/blender/loader/BLO_loader.dsp index 13b32246652..6671f256bc9 100644 --- a/projectfiles/blender/loader/BLO_loader.dsp +++ b/projectfiles/blender/loader/BLO_loader.dsp @@ -1,186 +1,186 @@ -# Microsoft Developer Studio Project File - Name="BLO_loader" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BLO_loader - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BLO_loader.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BLO_loader.mak" CFG="BLO_loader - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BLO_loader - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BLO_loader - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BLO_loader - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "BLO_loader - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BLO_loader - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\loader" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\blenloader" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLO_loader - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\loader\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLO_loader - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BLO_loader___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "BLO_loader___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\loader\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\loader\debug\BLO_loader.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BLO_loader - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "BLO_loader___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "BLO_loader___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\loader\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\loader\BLO_loader.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BLO_loader - Win32 Release" -# Name "BLO_loader - Win32 Debug" -# Name "BLO_loader - Win32 MT DLL Debug" -# Name "BLO_loader - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\intern\genfile.c -# ADD CPP /I "..\..\..\source\blender" -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\intern\readblenentry.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\intern\readfile.c -# ADD CPP /I "..\..\..\source\blender" -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\intern\undofile.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\intern\writefile.c -# ADD CPP /I "..\..\..\source\blender" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\BLO_genfile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\BLO_readfile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\BLO_soundfile.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenloader\BLO_undofile.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BLO_loader" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BLO_loader - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BLO_loader.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BLO_loader.mak" CFG="BLO_loader - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BLO_loader - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BLO_loader - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BLO_loader - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "BLO_loader - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BLO_loader - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\loader" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\blender\blenloader" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLO_loader - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\loader\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLO_loader - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BLO_loader___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "BLO_loader___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\loader\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\loader\debug\BLO_loader.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BLO_loader - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "BLO_loader___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "BLO_loader___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\loader\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\loader\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\streamglue\\" /I "..\..\..\source\blender\readblenfile\\" /I "..\..\..\source\blender\writeblenfile\\" /I "..\..\..\source\blender\deflate\\" /I "..\..\..\source\blender\inflate\\" /I "..\..\..\..\lib\windows\zlib\include" /I "..\..\..\source\blender\readblenfile" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\blender\writestreamglue" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\python" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\blender\loader\BLO_loader.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BLO_loader - Win32 Release" +# Name "BLO_loader - Win32 Debug" +# Name "BLO_loader - Win32 MT DLL Debug" +# Name "BLO_loader - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\intern\genfile.c +# ADD CPP /I "..\..\..\source\blender" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\intern\readblenentry.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\intern\readfile.c +# ADD CPP /I "..\..\..\source\blender" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\intern\undofile.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\intern\writefile.c +# ADD CPP /I "..\..\..\source\blender" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\BLO_genfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\BLO_readfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\BLO_soundfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenloader\BLO_undofile.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/makesdna/DNA_makesdna.dsp b/projectfiles/blender/makesdna/DNA_makesdna.dsp index 993968c2f6d..e08d44ade7c 100644 --- a/projectfiles/blender/makesdna/DNA_makesdna.dsp +++ b/projectfiles/blender/makesdna/DNA_makesdna.dsp @@ -1,373 +1,373 @@ -# Microsoft Developer Studio Project File - Name="DNA_makesdna" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=DNA_makesdna - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "DNA_makesdna.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "DNA_makesdna.mak" CFG="DNA_makesdna - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "DNA_makesdna - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "DNA_makesdna - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "DNA_makesdna - Win32 MT DLL Release" (based on "Win32 (x86) Console Application") -!MESSAGE "DNA_makesdna - Win32 MT DLL Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "DNA_makesdna - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"DNA_makesdna.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libguardedalloc.a BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /machine:I386 /nodefaultlib:"libc.lib" /libpath:"..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\obj\windows\blender\blenlib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Building DNA -PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c -# End Special Build Tool - -!ELSEIF "$(CFG)" == "DNA_makesdna - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"DNA_makesdna.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libguardedalloc.a BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /pdbtype:sept /libpath:"..\..\..\..\lib\windows\guardedalloc\lib\debug" /libpath:"..\..\..\obj\windows\blender\blenlib\debug" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Building DNA -PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c -# End Special Build Tool - -!ELSEIF "$(CFG)" == "DNA_makesdna - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "DNA_makesdna___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "DNA_makesdna___Win32_MT_DLL_Release" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna\mtdll" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo /o"DNA_makesdna.bsc" -# ADD BSC32 /nologo /o"DNA_makesdna.bsc" -LINK32=link.exe -# ADD BASE LINK32 BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /machine:I386 /out:"..\..\..\source\blender\makesdna\intern\DNA_makesdna.exe" /libpath:"..\..\..\..\obj\windows\blender\blenlib" -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 libguardedalloc.a /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /machine:I386 /libpath:"..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\obj\windows\blender\blenlib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c -# End Special Build Tool - -!ELSEIF "$(CFG)" == "DNA_makesdna - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "DNA_makesdna___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "DNA_makesdna___Win32_MT_DLL_Debug" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna\mtdll_debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo /o"DNA_makesdna.bsc" -# ADD BSC32 /nologo /o"DNA_makesdna.bsc" -LINK32=link.exe -# ADD BASE LINK32 BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /debug /machine:I386 /out:"..\..\..\source\blender\makesdna\debug\DNA_makesdna.exe" /pdbtype:sept /libpath:"..\..\..\..\obj\windows\blender\blenlib\debug" -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 libguardedalloc.a /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\windows\guardedalloc\lib" -# SUBTRACT LINK32 /pdb:none -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "DNA_makesdna - Win32 Release" -# Name "DNA_makesdna - Win32 Debug" -# Name "DNA_makesdna - Win32 MT DLL Release" -# Name "DNA_makesdna - Win32 MT DLL Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\intern\makesdna.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_action_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_actuator_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_armature_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_camera_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_constraint_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_controller_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_curve_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_customdata_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_documentation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_effect_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_fileglobal_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_group_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_ID.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_image_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_ipo_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_key_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_lamp_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_lattice_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_listBase.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_material_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_mesh_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_meshdata_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_meta_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_modifier_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_nla_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_object_force.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_object_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_oops_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_packedFile_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_property_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_radio_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_scene_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_screen_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_scriptlink_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_sdna_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_sensor_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_sequence_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_sound_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_space_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_text_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_texture_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_userdef_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_vec_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_vfont_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_view2d_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_view3d_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_wave_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\DNA_world_types.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="DNA_makesdna" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=DNA_makesdna - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DNA_makesdna.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DNA_makesdna.mak" CFG="DNA_makesdna - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DNA_makesdna - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "DNA_makesdna - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "DNA_makesdna - Win32 MT DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "DNA_makesdna - Win32 MT DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DNA_makesdna - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"DNA_makesdna.bsc" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libguardedalloc.a BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /machine:I386 /nodefaultlib:"libc.lib" /libpath:"..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\obj\windows\blender\blenlib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Building DNA +PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c +# End Special Build Tool + +!ELSEIF "$(CFG)" == "DNA_makesdna - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"DNA_makesdna.bsc" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libguardedalloc.a BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /pdbtype:sept /libpath:"..\..\..\..\lib\windows\guardedalloc\lib\debug" /libpath:"..\..\..\obj\windows\blender\blenlib\debug" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Desc=Building DNA +PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c +# End Special Build Tool + +!ELSEIF "$(CFG)" == "DNA_makesdna - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "DNA_makesdna___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "DNA_makesdna___Win32_MT_DLL_Release" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna\mtdll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"DNA_makesdna.bsc" +# ADD BSC32 /nologo /o"DNA_makesdna.bsc" +LINK32=link.exe +# ADD BASE LINK32 BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /machine:I386 /out:"..\..\..\source\blender\makesdna\intern\DNA_makesdna.exe" /libpath:"..\..\..\..\obj\windows\blender\blenlib" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 libguardedalloc.a /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /machine:I386 /libpath:"..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\obj\windows\blender\blenlib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c +# End Special Build Tool + +!ELSEIF "$(CFG)" == "DNA_makesdna - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DNA_makesdna___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "DNA_makesdna___Win32_MT_DLL_Debug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\source\blender\makesdna\intern" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\makesdna\mtdll_debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"DNA_makesdna.bsc" +# ADD BSC32 /nologo /o"DNA_makesdna.bsc" +LINK32=link.exe +# ADD BASE LINK32 BLI_blenlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /debug /machine:I386 /out:"..\..\..\source\blender\makesdna\debug\DNA_makesdna.exe" /pdbtype:sept /libpath:"..\..\..\..\obj\windows\blender\blenlib\debug" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 libguardedalloc.a /nologo /subsystem:console /pdb:"DNA_makesdna.pdb" /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\windows\guardedalloc\lib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=CD ..\..\..\source\blender\makesdna\intern\ DNA_makesdna.exe dna.c +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "DNA_makesdna - Win32 Release" +# Name "DNA_makesdna - Win32 Debug" +# Name "DNA_makesdna - Win32 MT DLL Release" +# Name "DNA_makesdna - Win32 MT DLL Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\intern\makesdna.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_action_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_actuator_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_armature_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_camera_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_constraint_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_controller_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_curve_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_customdata_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_documentation.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_effect_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_fileglobal_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_group_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_ID.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_image_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_ipo_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_key_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_lamp_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_lattice_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_listBase.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_material_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_mesh_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_meshdata_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_meta_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_modifier_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_nla_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_object_force.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_object_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_oops_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_packedFile_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_property_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_radio_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_scene_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_screen_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_scriptlink_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_sdna_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_sensor_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_sequence_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_sound_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_space_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_text_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_texture_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_userdef_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_vec_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_vfont_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_view2d_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_view3d_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_wave_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\DNA_world_types.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/radiosity/BRA_radiosity.dsp b/projectfiles/blender/radiosity/BRA_radiosity.dsp index be9e33e311f..4bae7c4e50f 100644 --- a/projectfiles/blender/radiosity/BRA_radiosity.dsp +++ b/projectfiles/blender/radiosity/BRA_radiosity.dsp @@ -1,133 +1,133 @@ -# Microsoft Developer Studio Project File - Name="BRA_radiosity" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BRA_radiosity - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BRA_radiosity.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BRA_radiosity.mak" CFG="BRA_radiosity - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BRA_radiosity - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BRA_radiosity - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BRA_radiosity - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\radiosity" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\radiosity" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\intern\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BRA_radiosity - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\radiosity\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\radiosity\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\intern\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BRA_radiosity - Win32 Release" -# Name "BRA_radiosity - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\raddisplay.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\radfactors.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\radio.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\radnode.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\radpostprocess.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\radpreprocess.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\intern\source\radrender.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\extern\include\radio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\radiosity\extern\include\radio_types.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BRA_radiosity" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BRA_radiosity - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BRA_radiosity.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BRA_radiosity.mak" CFG="BRA_radiosity - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BRA_radiosity - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BRA_radiosity - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BRA_radiosity - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\radiosity" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\radiosity" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\intern\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BRA_radiosity - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\radiosity\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\radiosity\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\render\intern\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BRA_radiosity - Win32 Release" +# Name "BRA_radiosity - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\raddisplay.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\radfactors.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\radio.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\radnode.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\radpostprocess.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\radpreprocess.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\intern\source\radrender.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\extern\include\radio.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\radiosity\extern\include\radio_types.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/render/BRE_render.dsp b/projectfiles/blender/render/BRE_render.dsp index 7d29bce934c..2e41812071f 100644 --- a/projectfiles/blender/render/BRE_render.dsp +++ b/projectfiles/blender/render/BRE_render.dsp @@ -1,192 +1,192 @@ -# Microsoft Developer Studio Project File - Name="BRE_render" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BRE_render - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BRE_render.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BRE_render.mak" CFG="BRE_render - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BRE_render - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BRE_render - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BRE_render - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\render" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\render" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\kernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\intern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender" /I "..\..\..\source\blender\yafray" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BRE_render - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\render\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\render\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\kernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\intern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender" /I "..\..\..\source\blender\yafray" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BRE_render - Win32 Release" -# Name "BRE_render - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\convertblender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\envmap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\gammaCorrectionTables.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\imagetexture.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\initrender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\pipeline.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\pixelblending.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\pixelshading.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\ray.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\rendercore.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\renderdatabase.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\shadbuf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\texture.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\source\zbuf.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\edgeRender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\envmap.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\gammaCorrectionTables.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\initrender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\pixelblending.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\pixelshading.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\rendercore.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\shadbuf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\texture.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\render\intern\include\zbuf.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BRE_render" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BRE_render - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BRE_render.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BRE_render.mak" CFG="BRE_render - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BRE_render - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BRE_render - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BRE_render - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\render" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\render" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\kernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\intern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender" /I "..\..\..\source\blender\yafray" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BRE_render - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\render\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\render\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\kernel\gen_messaging" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\kernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\intern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender" /I "..\..\..\source\blender\yafray" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "WITH_QUICKTIME" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BRE_render - Win32 Release" +# Name "BRE_render - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\convertblender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\envmap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\gammaCorrectionTables.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\imagetexture.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\initrender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\pipeline.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\pixelblending.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\pixelshading.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\ray.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\rendercore.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\renderdatabase.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\shadbuf.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\texture.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\source\zbuf.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\edgeRender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\envmap.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\gammaCorrectionTables.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\initrender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\pixelblending.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\pixelshading.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\rendercore.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\shadbuf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\texture.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\render\intern\include\zbuf.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/renderconverter/BRE_renderconverter.dsp b/projectfiles/blender/renderconverter/BRE_renderconverter.dsp index 4b3729061a8..6f07a365069 100644 --- a/projectfiles/blender/renderconverter/BRE_renderconverter.dsp +++ b/projectfiles/blender/renderconverter/BRE_renderconverter.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="BRE_renderconverter" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BRE_renderconverter - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BRE_renderconverter.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BRE_renderconverter.mak" CFG="BRE_renderconverter - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BRE_renderconverter - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BRE_renderconverter - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BRE_renderconverter - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\renderconverter" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\renderconverter" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\yafray" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\render\extern\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BRE_renderconverter - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BRE_renderconverter___Win32_Debug" -# PROP BASE Intermediate_Dir "BRE_renderconverter___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\render\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\render\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\yafray" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\render\extern\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\obj\windows\blender\renderconverter\debug\BRE_renderconverter.lib" - -!ENDIF - -# Begin Target - -# Name "BRE_renderconverter - Win32 Release" -# Name "BRE_renderconverter - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\renderconverter\intern\convertBlenderScene.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\renderconverter\RE_renderconverter.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BRE_renderconverter" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BRE_renderconverter - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BRE_renderconverter.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BRE_renderconverter.mak" CFG="BRE_renderconverter - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BRE_renderconverter - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BRE_renderconverter - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BRE_renderconverter - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\renderconverter" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\renderconverter" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\yafray" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\render\extern\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BRE_renderconverter - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BRE_renderconverter___Win32_Debug" +# PROP BASE Intermediate_Dir "BRE_renderconverter___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\render\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\render\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\yafray" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\render\extern\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\obj\windows\blender\renderconverter\debug\BRE_renderconverter.lib" + +!ENDIF + +# Begin Target + +# Name "BRE_renderconverter - Win32 Release" +# Name "BRE_renderconverter - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\renderconverter\intern\convertBlenderScene.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\renderconverter\RE_renderconverter.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/src/BL_src.dsp b/projectfiles/blender/src/BL_src.dsp index d6a1c3945e9..82bc14bc0a8 100644 --- a/projectfiles/blender/src/BL_src.dsp +++ b/projectfiles/blender/src/BL_src.dsp @@ -1,1040 +1,1040 @@ -# Microsoft Developer Studio Project File - Name="BL_src" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BL_SRC - WIN32 DEBUG -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BL_src.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BL_src.mak" CFG="BL_SRC - WIN32 DEBUG" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BL_src - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_src - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BL_src - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\src" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\sdl\include\\" /I "..\..\..\source\blender\img" /I "..\..\..\source\blender\renderui" /I "..\..\..\..\lib\windows\soundsystem\include\\" /I "..\..\..\..\lib\windows\python\include\python2.0\\" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\blender\ftfont" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\ghost\include" /I "..\..\..\..\lib\windows\bsp\include" /I "..\..\..\..\lib\windows\opennl\include" /I "..\..\..\intern\elbeem\extern" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "xGAMEBLENDER" /D "WITH_QUICKTIME" /D "INTERNATIONAL" /FR /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "BL_src - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\src\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\sdl\include\\" /I "..\..\..\source\blender\img" /I "..\..\..\source\blender\renderui" /I "..\..\..\..\lib\windows\soundsystem\include\\" /I "..\..\..\..\lib\windows\python\include\python2.0\\" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\blender\ftfont" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\ghost\include" /I "..\..\..\..\lib\windows\bsp\include" /I "..\..\..\..\lib\windows\opennl\include" /I "..\..\..\intern\elbeem\extern" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "xGAMEBLENDER" /D "WITH_QUICKTIME" /D "INTERNATIONAL" /U "_DEBUG" /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "BL_src - Win32 Release" -# Name "BL_src - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\src\B.blend.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\Bfont.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\bfont.ttf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\blenderbuttons.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\booleanops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\booleanops_mesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\butspace.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\buttons_editing.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\buttons_logic.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\buttons_object.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\buttons_scene.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\buttons_script.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\buttons_shading.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\cmap.tga.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\cmovie.tga.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\cursors.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\makesdna\intern\dna.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawaction.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawarmature.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawdeps.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawimage.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawimasel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawipo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawmesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawnla.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawnode.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawobject.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawoops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawscene.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawscript.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawseq.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawsound.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawtext.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawtime.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\drawview.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\edit.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editaction.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editarmature.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editconstraint.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editcurve.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editdeform.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editface.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editfont.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editgroup.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editimasel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editipo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editipo_lib.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editipo_mods.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editkey.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editlattice.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmball.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmesh.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmesh_add.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmesh_lib.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmesh_loop.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmesh_mods.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmesh_tools.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editmode_undo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editnla.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editnode.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editobject.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editoops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editscreen.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editseq.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editsima.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editsound.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\edittime.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\editview.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\eventdebug.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\filesel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\fluidsim.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\ghostwinlay.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\glutil.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\hddaudio.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_action.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_buttonswin.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_filesel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_image.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_imasel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_info.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_ipo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_nla.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_node.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_oops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_script.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_seq.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_sound.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_text.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_time.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\header_view3d.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\headerbuttons.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\imagepaint.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\imasel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\interface.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\interface_draw.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\interface_icons.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\interface_panel.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\keyval.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\language.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\lorem.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\mainqueue.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\meshtools.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\multires.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\mywindow.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\oops.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\outliner.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\parametrizer.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\playanim.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\blenpluginapi\intern\pluginapi.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\poseobject.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\preview.blend.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\previewrender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\renderwin.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\resources.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\retopo.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\scrarea.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\screendump.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\sculptmode.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\seqaudio.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\seqeffects.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\seqscopes.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\sequence.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\space.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\spacetypes.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\splash.jpg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\swapbuffers.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\toets.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\toolbox.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform_constraints.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform_conversions.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform_generics.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform_manipulator.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform_numinput.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\transform_snap.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\unwrapper.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\usiblender.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\view.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\vpaint.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\writeavicodec.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\writeimage.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\writemovie.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_drawaction.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_drawmesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_drawobject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_editcurve.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_editface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_editmball.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_editobject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_sculptmode.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_unwrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BDR_vpaint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_butspace.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_cursors.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_drawimage.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_drawoops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_drawscene.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_drawscript.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_drawseq.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_drawtext.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editaction.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editarmature.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editconstraint.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editdeform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editfont.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editgroup.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editkey.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editlattice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editmesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editmode_undo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editnla.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editoops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editsca.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editseq.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editsima.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editsound.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_editview.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_fsmenu.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_gl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_glutil.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_graphics.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_imasel.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_interface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_keyval.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_language.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_mainqueue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_meshtools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_mywindow.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_oops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_outliner.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_poseobject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_previewrender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_renderwin.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_resources.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_retopo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_scrarea.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_screen.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_space.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_spacetypes.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_tbcallback.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_toets.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_toolbox.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_transform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_usiblender.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_writeavicodec.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_writeimage.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BIF_writemovie.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\blendef.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BPI_script.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_buttons.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_drawimasel.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_drawipo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_drawnla.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_drawoops.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_drawview.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_edit.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_editaction.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_editaction_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_editipo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_editipo_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_editnla_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_filesel.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_headerbuttons.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_seqaudio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_sequence.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_time.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_trans_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\BSE_view.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\butspace.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\editmesh.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\multires.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\parametrizer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\parametrizer_intern.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\include\transform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\winlay.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BL_src" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BL_SRC - WIN32 DEBUG +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BL_src.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BL_src.mak" CFG="BL_SRC - WIN32 DEBUG" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BL_src - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_src - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BL_src - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\src" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\sdl\include\\" /I "..\..\..\source\blender\img" /I "..\..\..\source\blender\renderui" /I "..\..\..\..\lib\windows\soundsystem\include\\" /I "..\..\..\..\lib\windows\python\include\python2.0\\" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\blender\ftfont" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\ghost\include" /I "..\..\..\..\lib\windows\bsp\include" /I "..\..\..\..\lib\windows\opennl\include" /I "..\..\..\intern\elbeem\extern" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "xGAMEBLENDER" /D "WITH_QUICKTIME" /D "INTERNATIONAL" /FR /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "BL_src - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\src\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\sdl\include\\" /I "..\..\..\source\blender\img" /I "..\..\..\source\blender\renderui" /I "..\..\..\..\lib\windows\soundsystem\include\\" /I "..\..\..\..\lib\windows\python\include\python2.0\\" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\blender\ftfont" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\blender\quicktime" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\ghost\include" /I "..\..\..\..\lib\windows\bsp\include" /I "..\..\..\..\lib\windows\opennl\include" /I "..\..\..\intern\elbeem\extern" /I "..\..\..\..\lib\windows\memutil\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "xGAMEBLENDER" /D "WITH_QUICKTIME" /D "INTERNATIONAL" /U "_DEBUG" /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "BL_src - Win32 Release" +# Name "BL_src - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\src\B.blend.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\Bfont.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\bfont.ttf.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\blenderbuttons.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\booleanops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\booleanops_mesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\butspace.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\buttons_editing.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\buttons_logic.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\buttons_object.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\buttons_scene.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\buttons_script.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\buttons_shading.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\cmap.tga.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\cmovie.tga.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\cursors.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\makesdna\intern\dna.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawaction.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawarmature.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawdeps.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawimage.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawimasel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawipo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawmesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawnla.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawnode.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawobject.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawoops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawscene.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawscript.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawseq.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawsound.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawtext.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawtime.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\drawview.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\edit.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editaction.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editarmature.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editconstraint.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editcurve.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editdeform.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editface.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editfont.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editgroup.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editimasel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editipo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editipo_lib.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editipo_mods.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editkey.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editlattice.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmball.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmesh.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmesh_add.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmesh_lib.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmesh_loop.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmesh_mods.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmesh_tools.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editmode_undo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editnla.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editnode.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editobject.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editoops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editscreen.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editseq.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editsima.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editsound.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\edittime.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\editview.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\eventdebug.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\filesel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\fluidsim.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\ghostwinlay.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\glutil.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\hddaudio.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_action.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_buttonswin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_filesel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_image.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_imasel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_info.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_ipo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_nla.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_node.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_oops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_script.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_seq.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_sound.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_text.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_time.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\header_view3d.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\headerbuttons.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\imagepaint.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\imasel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\interface.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\interface_draw.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\interface_icons.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\interface_panel.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\keyval.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\language.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\lorem.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\mainqueue.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\meshtools.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\multires.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\mywindow.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\oops.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\outliner.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\parametrizer.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\playanim.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\blenpluginapi\intern\pluginapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\poseobject.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\preview.blend.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\previewrender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\renderwin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\resources.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\retopo.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\scrarea.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\screendump.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\sculptmode.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\seqaudio.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\seqeffects.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\seqscopes.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\sequence.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\space.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\spacetypes.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\splash.jpg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\swapbuffers.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\toets.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\toolbox.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform_constraints.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform_conversions.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform_generics.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform_manipulator.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform_numinput.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\transform_snap.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\unwrapper.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\usiblender.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\view.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\vpaint.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\writeavicodec.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\writeimage.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\writemovie.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_drawaction.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_drawmesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_drawobject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_editcurve.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_editface.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_editmball.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_editobject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_sculptmode.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_unwrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BDR_vpaint.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_butspace.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_cursors.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_drawimage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_drawoops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_drawscene.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_drawscript.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_drawseq.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_drawtext.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editaction.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editarmature.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editconstraint.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editdeform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editfont.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editgroup.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editkey.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editlattice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editmesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editmode_undo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editnla.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editoops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editsca.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editseq.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editsima.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editsound.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_editview.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_fsmenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_gl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_glutil.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_graphics.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_imasel.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_interface.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_keyval.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_language.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_mainqueue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_meshtools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_mywindow.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_oops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_outliner.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_poseobject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_previewrender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_renderwin.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_resources.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_retopo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_scrarea.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_screen.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_space.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_spacetypes.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_tbcallback.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_toets.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_toolbox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_transform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_usiblender.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_writeavicodec.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_writeimage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BIF_writemovie.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\blendef.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BPI_script.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_buttons.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_drawimasel.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_drawipo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_drawnla.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_drawoops.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_drawview.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_edit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_editaction.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_editaction_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_editipo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_editipo_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_editnla_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_filesel.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_headerbuttons.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_seqaudio.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_sequence.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_time.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_trans_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_types.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\BSE_view.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\butspace.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\editmesh.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\multires.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\parametrizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\parametrizer_intern.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\include\transform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\winlay.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/blender/src/BL_src_cre.dsp b/projectfiles/blender/src/BL_src_cre.dsp index 1705b45a96f..448f0962dcf 100644 --- a/projectfiles/blender/src/BL_src_cre.dsp +++ b/projectfiles/blender/src/BL_src_cre.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="BL_src_cre" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=BL_src_cre - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BL_src_cre.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BL_src_cre.mak" CFG="BL_src_cre - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BL_src_cre - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "BL_src_cre - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BL_src_cre - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\blender\src_cre" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src_cre" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderui" /I "..\..\..\source\gameengine\soundsystem\\" /I "..\..\..\..\lib\windows\python\include\python2.2\\" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "NAN_GAME" /D "GAME" /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\obj\windows\blender\src\BL_src_cre.lib" - -!ELSEIF "$(CFG)" == "BL_src_cre - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\blender\src_cre\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src_cre\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderui" /I "..\..\..\source\gameengine\soundsystem\\" /I "..\..\..\..\lib\windows\python\include\python2.2\\" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "NAN_GAME" /D "GAME" /U "_DEBUG" /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\obj\windows\blender\src\debug\BL_src_cre.lib" - -!ENDIF - -# Begin Target - -# Name "BL_src_cre - Win32 Release" -# Name "BL_src_cre - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\blender\src\cre\license.jpeg.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\blender\src\cre\license_key.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BL_src_cre" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=BL_src_cre - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BL_src_cre.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BL_src_cre.mak" CFG="BL_src_cre - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BL_src_cre - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "BL_src_cre - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BL_src_cre - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\blender\src_cre" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src_cre" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderui" /I "..\..\..\source\gameengine\soundsystem\\" /I "..\..\..\..\lib\windows\python\include\python2.2\\" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "NAN_GAME" /D "GAME" /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\obj\windows\blender\src\BL_src_cre.lib" + +!ELSEIF "$(CFG)" == "BL_src_cre - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\blender\src_cre\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\blender\src_cre\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\renderui" /I "..\..\..\source\gameengine\soundsystem\\" /I "..\..\..\..\lib\windows\python\include\python2.2\\" /I "..\..\..\source\blender\renderconverter" /I "..\..\..\source\blender\verify" /I "..\..\..\source\blender\readstreamglue" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\blender\blenloader" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\radiosity\extern\include" /I "..\..\..\source\blender\render\extern\include" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\..\lib\windows\decimation\include" /I "..\..\..\source\blender\blenpluginapi\\" /I "..\..\..\..\lib\windows\blenkey\include" /I "..\..\..\..\lib\windows\pthreads\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_CONSOLE" /D "NAN_GAME" /D "GAME" /U "_DEBUG" /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\obj\windows\blender\src\debug\BL_src_cre.lib" + +!ENDIF + +# Begin Target + +# Name "BL_src_cre - Win32 Release" +# Name "BL_src_cre - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\blender\src\cre\license.jpeg.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\blender\src\cre\license_key.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# End Target +# End Project diff --git a/projectfiles/datatoc/datatoc.dsp b/projectfiles/datatoc/datatoc.dsp index 4e55182bb2c..f5dd5348fda 100644 --- a/projectfiles/datatoc/datatoc.dsp +++ b/projectfiles/datatoc/datatoc.dsp @@ -1,100 +1,100 @@ -# Microsoft Developer Studio Project File - Name="datatoc" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=datatoc - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "datatoc.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "datatoc.mak" CFG="datatoc - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "datatoc - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "datatoc - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "datatoc - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "datatoc - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "datatoc - Win32 Release" -# Name "datatoc - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\release\datafiles\datatoc.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="datatoc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=datatoc - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "datatoc.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "datatoc.mak" CFG="datatoc - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "datatoc - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "datatoc - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "datatoc - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "datatoc - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "datatoc - Win32 Release" +# Name "datatoc - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\release\datafiles\datatoc.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/blenderhook/KX_blenderhook.dsp b/projectfiles/gameengine/blenderhook/KX_blenderhook.dsp index c3657ed30c5..f43db4bf02b 100644 --- a/projectfiles/gameengine/blenderhook/KX_blenderhook.dsp +++ b/projectfiles/gameengine/blenderhook/KX_blenderhook.dsp @@ -1,161 +1,161 @@ -# Microsoft Developer Studio Project File - Name="KX_blenderhook" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=KX_blenderhook - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "KX_blenderhook.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "KX_blenderhook.mak" CFG="KX_blenderhook - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "KX_blenderhook - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_blenderhook - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "KX_blenderhook - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\blenderhook" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\blenderhook" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\extern\solid" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\gameengine\Converter\\" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\gameengine\ketsji" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\blenloader" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_blenderhook - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\blenderhook\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\blenderhook\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\extern\solid" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\gameengine\Converter\\" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\gameengine\ketsji" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\blenloader" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "KX_blenderhook - Win32 Release" -# Name "KX_blenderhook - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\BL_KetsjiEmbedStart.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderCanvas.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderGL.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderInputDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderKeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderMouseDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderPolyMaterial.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderRenderTools.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderSystem.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderCanvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderGL.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderKeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderMouseDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderPolyMaterial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderRenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderSystem.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="KX_blenderhook" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=KX_blenderhook - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "KX_blenderhook.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "KX_blenderhook.mak" CFG="KX_blenderhook - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "KX_blenderhook - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_blenderhook - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "KX_blenderhook - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\blenderhook" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\blenderhook" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\extern\solid" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\gameengine\Converter\\" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\gameengine\ketsji" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\blenloader" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_blenderhook - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\blenderhook\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\blenderhook\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\extern\solid" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\source\gameengine\Converter\\" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\gameengine\ketsji" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\blender\misc" /I "..\..\..\source\blender\blenloader" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "KX_blenderhook - Win32 Release" +# Name "KX_blenderhook - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\BL_KetsjiEmbedStart.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderCanvas.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderGL.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderInputDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderKeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderMouseDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderPolyMaterial.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderRenderTools.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderSystem.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderCanvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderGL.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderKeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderMouseDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderPolyMaterial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderRenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\BlenderRoutines\KX_BlenderSystem.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/converter/KX_converter.dsp b/projectfiles/gameengine/converter/KX_converter.dsp index 96826d3004b..5eb80f58305 100644 --- a/projectfiles/gameengine/converter/KX_converter.dsp +++ b/projectfiles/gameengine/converter/KX_converter.dsp @@ -1,278 +1,278 @@ -# Microsoft Developer Studio Project File - Name="KX_converter" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=KX_converter - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "KX_converter.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "KX_converter.mak" CFG="KX_converter - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "KX_converter - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_converter - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_converter - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_converter - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "KX_converter - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\source\gameengine\physics\Dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\\gameengine\physics\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SUMO_SOLID" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_converter - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter\debug" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\source\gameengine\physics\Dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\\gameengine\physics\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SUMO_SOLID" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_converter - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "KX_converter___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "KX_converter___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter\mtdll_debug" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\converter\debug\KX_converter.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_converter - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "KX_converter___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "KX_converter___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter\mtdll" -# PROP Target_Dir "" -MTL=midl.exe -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\converter\KX_converter.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "KX_converter - Win32 Release" -# Name "KX_converter - Win32 Debug" -# Name "KX_converter - Win32 MT DLL Debug" -# Name "KX_converter - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_ActionActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_ArmatureObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_BlenderDataConversion.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_DeformableGameObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_MeshDeformer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_SkinDeformer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_SkinMeshObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BlenderWorldInfo.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Bullet\CcdPhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Bullet\CcdPhysicsEnvironment.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderScalarInterpolator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderSceneConverter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertActuators.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertControllers.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertProperties.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertSensors.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_IpoConvert.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_ActionActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_ArmatureObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_BlenderDataConversion.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_DeformableGameObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_MeshDeformer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_SkinDeformer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BL_SkinMeshObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\BlenderWorldInfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderScalarInterpolator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderSceneConverter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertActuators.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertControllers.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertProperties.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertSensors.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Converter\KX_IpoConvert.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="KX_converter" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=KX_converter - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "KX_converter.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "KX_converter.mak" CFG="KX_converter - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "KX_converter - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_converter - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_converter - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_converter - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "KX_converter - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\source\gameengine\physics\Dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\\gameengine\physics\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SUMO_SOLID" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_converter - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter\debug" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\source\gameengine\physics\Dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\\gameengine\physics\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /D "WIN32" /D "_MBCS" /D "_LIB" /D "USE_SUMO_SOLID" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_converter - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "KX_converter___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "KX_converter___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter\mtdll_debug" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\converter\debug\KX_converter.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_converter - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "KX_converter___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "KX_converter___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\converter\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\converter\mtdll" +# PROP Target_Dir "" +MTL=midl.exe +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\ode" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\gameengine\BlenderRoutines" /I "..\..\..\source\sumo\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\source\gameengine\Ketsji" /I "..\..\..\source\gameengine\SceneGraph" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\source\gameengine\soundsystem\snd_blenderwavecache" /I "..\..\..\source\blender\blenlib" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\BlOde" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\converter\KX_converter.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "KX_converter - Win32 Release" +# Name "KX_converter - Win32 Debug" +# Name "KX_converter - Win32 MT DLL Debug" +# Name "KX_converter - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_ActionActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_ArmatureObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_BlenderDataConversion.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_DeformableGameObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_MeshDeformer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_SkinDeformer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_SkinMeshObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BlenderWorldInfo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Bullet\CcdPhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Bullet\CcdPhysicsEnvironment.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderScalarInterpolator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderSceneConverter.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertActuators.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertControllers.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertProperties.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertSensors.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_IpoConvert.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_ActionActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_ArmatureObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_BlenderDataConversion.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_DeformableGameObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_MeshDeformer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_SkinDeformer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BL_SkinMeshObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\BlenderWorldInfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderScalarInterpolator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_BlenderSceneConverter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertActuators.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertControllers.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertProperties.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_ConvertSensors.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Converter\KX_IpoConvert.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/expression/EXP_expressions.dsp b/projectfiles/gameengine/expression/EXP_expressions.dsp index 94ded903d41..7fa6e9da45e 100644 --- a/projectfiles/gameengine/expression/EXP_expressions.dsp +++ b/projectfiles/gameengine/expression/EXP_expressions.dsp @@ -1,302 +1,302 @@ -# Microsoft Developer Studio Project File - Name="EXP_expressions" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=EXP_expressions - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "EXP_expressions.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "EXP_expressions.mak" CFG="EXP_expressions - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "EXP_expressions - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "EXP_expressions - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "EXP_expressions - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "EXP_expressions - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "EXP_expressions - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\intern\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "EXP_expressions - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\intern\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "EXP_expressions - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "EXP_expressions___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "EXP_expressions___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\expressions\debug\EXP_expressions.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "EXP_expressions - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "EXP_expressions___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "EXP_expressions___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\expressions\EXP_expressions.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "EXP_expressions - Win32 Release" -# Name "EXP_expressions - Win32 Debug" -# Name "EXP_expressions - Win32 MT DLL Debug" -# Name "EXP_expressions - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\BoolValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\ConstExpr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\EmptyValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\ErrorValue.cpp -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Expressions\EXP_C-Api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Expression.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\FloatValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\IdentifierExpr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\IfExpr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\InputParser.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\IntValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\KX_HashedPtr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\ListValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Operator1Expr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Operator2Expr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\PyObjectPlus.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\StringValue.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Value.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\VectorValue.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\BoolValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\ConstExpr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\EmptyValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\ErrorValue.h -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Expressions\EXP_C-Api.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Expression.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\FloatValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\IdentifierExpr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\IfExpr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\InputParser.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\IntValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\KX_HashedPtr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\ListValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Operator1Expr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Operator2Expr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\PyObjectPlus.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\StringValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\Value.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\VectorValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Expressions\VoidValue.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="EXP_expressions" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=EXP_expressions - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "EXP_expressions.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "EXP_expressions.mak" CFG="EXP_expressions - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "EXP_expressions - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "EXP_expressions - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "EXP_expressions - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "EXP_expressions - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "EXP_expressions - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\intern\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "EXP_expressions - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\intern\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "EXP_expressions - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "EXP_expressions___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "EXP_expressions___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\expressions\debug\EXP_expressions.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "EXP_expressions - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "EXP_expressions___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "EXP_expressions___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\expressions\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\expressions\EXP_expressions.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "EXP_expressions - Win32 Release" +# Name "EXP_expressions - Win32 Debug" +# Name "EXP_expressions - Win32 MT DLL Debug" +# Name "EXP_expressions - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\BoolValue.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\ConstExpr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\EmptyValue.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\ErrorValue.cpp +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Expressions\EXP_C-Api.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Expression.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\FloatValue.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\IdentifierExpr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\IfExpr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\InputParser.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\IntValue.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\KX_HashedPtr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\ListValue.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Operator1Expr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Operator2Expr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\PyObjectPlus.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\StringValue.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Value.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\VectorValue.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\BoolValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\ConstExpr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\EmptyValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\ErrorValue.h +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Expressions\EXP_C-Api.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Expression.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\FloatValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\IdentifierExpr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\IfExpr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\InputParser.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\IntValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\KX_HashedPtr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\ListValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Operator1Expr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Operator2Expr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\PyObjectPlus.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\StringValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\Value.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\VectorValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Expressions\VoidValue.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/gamelogic/SCA_gamelogic.dsp b/projectfiles/gameengine/gamelogic/SCA_gamelogic.dsp index 45be1cf2772..fcdbf33a80c 100644 --- a/projectfiles/gameengine/gamelogic/SCA_gamelogic.dsp +++ b/projectfiles/gameengine/gamelogic/SCA_gamelogic.dsp @@ -1,406 +1,406 @@ -# Microsoft Developer Studio Project File - Name="SCA_GameLogic" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SCA_GameLogic - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SCA_GameLogic.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SCA_GameLogic.mak" CFG="SCA_GameLogic - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SCA_GameLogic - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SCA_GameLogic - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SCA_GameLogic - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SCA_GameLogic - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SCA_GameLogic - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SCA_GameLogic - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SCA_GameLogic___Win32_Debug" -# PROP BASE Intermediate_Dir "SCA_GameLogic___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SCA_GameLogic - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SCA_GameLogic___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SCA_GameLogic___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gamelogic\debug\SCA_GameLogic.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SCA_GameLogic - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SCA_GameLogic___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SCA_GameLogic___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gamelogic\SCA_GameLogic.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "SCA_GameLogic - Win32 Release" -# Name "SCA_GameLogic - Win32 Debug" -# Name "SCA_GameLogic - Win32 MT DLL Debug" -# Name "SCA_GameLogic - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Group "JoystickImp" - -# PROP Default_Filter "cpp" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_Joystick.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_JoystickEvents.cpp -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysEventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ANDController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_EventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ExpressionController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IScene.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ISensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_LogicManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ORController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyEventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertySensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PythonController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomEventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomNumberGenerator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_TimeEventManager.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "Joystick" - -# PROP Default_Filter "h" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_Joystick.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_JoystickDefines.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_JoystickPrivate.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysEventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ANDController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_EventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ExpressionController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IScene.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ISensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_LogicManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ORController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyEventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertySensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PythonController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomEventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomNumberGenerator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\GameLogic\SCA_TimeEventManager.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SCA_GameLogic" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SCA_GameLogic - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SCA_GameLogic.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SCA_GameLogic.mak" CFG="SCA_GameLogic - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SCA_GameLogic - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SCA_GameLogic - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SCA_GameLogic - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SCA_GameLogic - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SCA_GameLogic - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SCA_GameLogic - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SCA_GameLogic___Win32_Debug" +# PROP BASE Intermediate_Dir "SCA_GameLogic___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SCA_GameLogic - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SCA_GameLogic___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SCA_GameLogic___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gamelogic\debug\SCA_GameLogic.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SCA_GameLogic - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SCA_GameLogic___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SCA_GameLogic___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\gamelogic\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\sdl\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gamelogic\SCA_GameLogic.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "SCA_GameLogic - Win32 Release" +# Name "SCA_GameLogic - Win32 Debug" +# Name "SCA_GameLogic - Win32 MT DLL Debug" +# Name "SCA_GameLogic - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "JoystickImp" + +# PROP Default_Filter "cpp" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_Joystick.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_JoystickEvents.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysEventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ANDController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_EventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ExpressionController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IScene.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ISensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_LogicManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ORController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyEventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertySensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PythonController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomEventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomNumberGenerator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_TimeEventManager.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "Joystick" + +# PROP Default_Filter "h" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_Joystick.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_JoystickDefines.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\Joystick\SCA_JoystickPrivate.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysEventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_AlwaysSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ANDController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_EventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ExpressionController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_IScene.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ISensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_JoystickSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_KeyboardSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_LogicManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_MouseSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_ORController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertyEventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PropertySensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_PythonController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomEventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomNumberGenerator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_RandomSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\GameLogic\SCA_TimeEventManager.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/axctl/GP_axctl.dsp b/projectfiles/gameengine/gameplayer/axctl/GP_axctl.dsp index 99b6798bf59..56ba052b32d 100644 --- a/projectfiles/gameengine/gameplayer/axctl/GP_axctl.dsp +++ b/projectfiles/gameengine/gameplayer/axctl/GP_axctl.dsp @@ -1,253 +1,253 @@ -# Microsoft Developer Studio Project File - Name="GP_axctl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GP_axctl - Win32 MT DLL Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_axctl.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_axctl.mak" CFG="GP_axctl - Win32 MT DLL Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_axctl - Win32 MT DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "GP_axctl - Win32 MT DLL Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_axctl - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 2 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_axctl___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "GP_axctl___Win32_MT_DLL_Debug" -# PROP BASE Target_Ext "ocx" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 2 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll_debug" -# PROP Target_Ext "ocx" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /FR /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\GamePlayer\common" /I "..\..\..\..\source\gameengine\GamePlayer\common\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /U "_DEBUG" /YX /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" -# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 opengl32.lib glu32.lib glaux.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/ActiveXgp.ocx" /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" -# SUBTRACT BASE LINK32 /nodefaultlib -# ADD LINK32 openal_static.lib libmoto.a libguardedalloc.a libbmfont.a libstring.a ws2_32.lib opengl32.lib glu32.lib glaux.lib dxguid.lib ole32.lib vfw32.lib libblenkey.a libeay32.lib libz.a libpng.a libjpeg.a odelib.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrt.lib" /out:"..\..\..\..\obj\windows\debug\Blender3DPlugin.ocx" /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\ode\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\openal\lib" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib" /libpath:"../../../../../lib/windows/bmfont/lib" /libpath:"../../../../../lib/windows/string/lib" /libpath:"../../../../../lib/windows/python/lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont/lib" /libpath:"..\..\..\..\..\lib\windows\string\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib\\" /libpath:"..\..\..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "GP_axctl - Win32 MT DLL Release" - -# PROP BASE Use_MFC 2 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "GP_axctl___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "GP_axctl___Win32_MT_DLL_Release" -# PROP BASE Target_Ext "ocx" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 2 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll" -# PROP Target_Ext "ocx" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\GamePlayer\common" /I "..\..\..\..\source\gameengine\GamePlayer\common\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" -# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 opengl32.lib glu32.lib glaux.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release/ActiveXgp.ocx" -# ADD LINK32 openal_static.lib libmoto.a libguardedalloc.a libbmfont.a libstring.a ws2_32.lib opengl32.lib glu32.lib glaux.lib dxguid.lib ole32.lib vfw32.lib libblenkey.a libeay32.lib libz.a libpng.a libjpeg.a odelib.lib /nologo /subsystem:windows /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrtd.lib" /out:"..\..\..\..\obj\windows\Blender3DPlugin.ocx" /libpath:"..\..\..\..\..\lib\windows\ode\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\openal\lib" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont/lib" /libpath:"..\..\..\..\..\lib\windows\string\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "GP_axctl - Win32 MT DLL Debug" -# Name "GP_axctl - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderDataPathProperty.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.def -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.odl -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.rc -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerCtl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerPpg.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\CControlRefresher.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\MemoryResource.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\RawImageRsrc.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\SafeControl.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\StdAfx.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderDataPathProperty.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerCtl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerPpg.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\CControlRefresher.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\MemoryResource.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\RawImageRsrc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\Resource.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\SafeControl.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.ico -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerCtl.bmp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\splash.bmp -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\ActiveXandNetscapeTest.html -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.html -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerDuo.html -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\load.blend -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\logo_blender.raw -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\logo_blender3d.raw -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\logo_nan.raw -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\ReadMe.txt -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\ReadMeBuilding.txt -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_axctl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GP_axctl - Win32 MT DLL Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_axctl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_axctl.mak" CFG="GP_axctl - Win32 MT DLL Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_axctl - Win32 MT DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "GP_axctl - Win32 MT DLL Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_axctl - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_axctl___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "GP_axctl___Win32_MT_DLL_Debug" +# PROP BASE Target_Ext "ocx" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll_debug" +# PROP Target_Ext "ocx" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\GamePlayer\common" /I "..\..\..\..\source\gameengine\GamePlayer\common\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /U "_DEBUG" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 opengl32.lib glu32.lib glaux.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/ActiveXgp.ocx" /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" +# SUBTRACT BASE LINK32 /nodefaultlib +# ADD LINK32 openal_static.lib libmoto.a libguardedalloc.a libbmfont.a libstring.a ws2_32.lib opengl32.lib glu32.lib glaux.lib dxguid.lib ole32.lib vfw32.lib libblenkey.a libeay32.lib libz.a libpng.a libjpeg.a odelib.lib /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrt.lib" /out:"..\..\..\..\obj\windows\debug\Blender3DPlugin.ocx" /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\ode\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\openal\lib" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib" /libpath:"../../../../../lib/windows/bmfont/lib" /libpath:"../../../../../lib/windows/string/lib" /libpath:"../../../../../lib/windows/python/lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont/lib" /libpath:"..\..\..\..\..\lib\windows\string\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib\\" /libpath:"..\..\..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "GP_axctl - Win32 MT DLL Release" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "GP_axctl___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "GP_axctl___Win32_MT_DLL_Release" +# PROP BASE Target_Ext "ocx" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\axctl\mtdll" +# PROP Target_Ext "ocx" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\GamePlayer\common" /I "..\..\..\..\source\gameengine\GamePlayer\common\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 opengl32.lib glu32.lib glaux.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release/ActiveXgp.ocx" +# ADD LINK32 openal_static.lib libmoto.a libguardedalloc.a libbmfont.a libstring.a ws2_32.lib opengl32.lib glu32.lib glaux.lib dxguid.lib ole32.lib vfw32.lib libblenkey.a libeay32.lib libz.a libpng.a libjpeg.a odelib.lib /nologo /subsystem:windows /dll /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrtd.lib" /out:"..\..\..\..\obj\windows\Blender3DPlugin.ocx" /libpath:"..\..\..\..\..\lib\windows\ode\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\openal\lib" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont/lib" /libpath:"..\..\..\..\..\lib\windows\string\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib\mt_dll" /libpath:"..\..\..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "GP_axctl - Win32 MT DLL Debug" +# Name "GP_axctl - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderDataPathProperty.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.def +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.odl +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.rc +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerCtl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerPpg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\CControlRefresher.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\MemoryResource.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\RawImageRsrc.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\SafeControl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\StdAfx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderDataPathProperty.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerCtl.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerPpg.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\CControlRefresher.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\MemoryResource.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\RawImageRsrc.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\Resource.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\SafeControl.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.ico +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerCtl.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\splash.bmp +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\ActiveXandNetscapeTest.html +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayer.html +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\BlenderPlayerDuo.html +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\load.blend +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\logo_blender.raw +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\logo_blender3d.raw +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\logo_nan.raw +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ActiveX\ReadMeBuilding.txt +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/common/GP_common.dsp b/projectfiles/gameengine/gameplayer/common/GP_common.dsp index c1509608731..d3103c4f88a 100644 --- a/projectfiles/gameengine/gameplayer/common/GP_common.dsp +++ b/projectfiles/gameengine/gameplayer/common/GP_common.dsp @@ -1,255 +1,255 @@ -# Microsoft Developer Studio Project File - Name="GP_common" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=GP_common - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_common.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_common.mak" CFG="GP_common - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_common - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "GP_common - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "GP_common - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "GP_common - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_common - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "GP_common - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /FD /GZ /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "GP_common - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_common___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "GP_common___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gameplayer\common\debug\GP_common.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "GP_common - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "GP_common___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "GP_common___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gameplayer\common\GP_common.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "GP_common - Win32 Release" -# Name "GP_common - Win32 Debug" -# Name "GP_common - Win32 MT DLL Debug" -# Name "GP_common - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\bmfont.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Canvas.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Engine.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_KeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_MouseDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_PolygonMaterial.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RawImage.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RawLoadDotBlendArray.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RawLogoArrays.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RenderTools.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_System.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Canvas.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Engine.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_KeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_System.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Canvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Engine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_KeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_MouseDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_PolygonMaterial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_System.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Canvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Engine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_KeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_System.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\Makefile -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_common" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=GP_common - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_common.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_common.mak" CFG="GP_common - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_common - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "GP_common - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "GP_common - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "GP_common - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_common - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "GP_common - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /FD /GZ /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "GP_common - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_common___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "GP_common___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gameplayer\common\debug\GP_common.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "GP_common - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "GP_common___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "GP_common___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\common\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\..\source\gameengine\Converter" /I "..\..\..\..\source\gameengine\soundsystem\snd_dummy" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\GamePlayer\common\\" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\gameplayer\common\GP_common.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "GP_common - Win32 Release" +# Name "GP_common - Win32 Debug" +# Name "GP_common - Win32 MT DLL Debug" +# Name "GP_common - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\bmfont.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Canvas.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Engine.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_KeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_MouseDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_PolygonMaterial.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RawImage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RawLoadDotBlendArray.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RawLogoArrays.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RenderTools.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_System.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Canvas.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Engine.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_KeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_System.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Canvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_Engine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_KeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_MouseDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_PolygonMaterial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_RenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\GPC_System.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Canvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_Engine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_KeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\windows\GPW_System.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\common\Makefile +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/ghost/GP_ghost.dsp b/projectfiles/gameengine/gameplayer/ghost/GP_ghost.dsp index d569d6fceac..63ce23d2647 100644 --- a/projectfiles/gameengine/gameplayer/ghost/GP_ghost.dsp +++ b/projectfiles/gameengine/gameplayer/ghost/GP_ghost.dsp @@ -1,156 +1,156 @@ -# Microsoft Developer Studio Project File - Name="GP_ghost" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=GP_ghost - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_ghost.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_ghost.mak" CFG="GP_ghost - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_ghost - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_ghost - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_ghost - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ghost\" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\gameengine\Physics\Ode" /I "..\..\..\..\source\gameengine\Physics" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/readblenfile" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\ghost\include" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libguardedalloc.a libstring.a libghost.a odelib.lib fmodvc.lib libbmfont.a ws2_32.lib kernel32.lib user32.lib gdi32.lib vfw32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.a opengl32.lib glu32.lib openal_static.lib dxguid.lib libblenkey.a libeay32.lib libpng.a libz.a libmoto.a /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"msvcrtd.lib" /nodefaultlib:"msvcprt.lib" /out:"..\..\..\..\obj\windows\blenderplayer.exe" /libpath:"..\..\..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont\lib" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\string\lib" /libpath:"..\..\..\..\..\lib\windows\ghost\lib" /libpath:"..\..\..\..\..\lib\windows\jpeg/lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib" /libpath:"..\..\..\..\..\lib\windows\zlib\lib" /libpath:"..\..\..\..\..\lib\windows\ode-0.03\lib" /libpath:"../../../../../lib/windows/fmod/lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "GP_ghost - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ghost\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Physics\Ode" /I "..\..\..\..\source\gameengine\Physics" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/readblenfile" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\ghost\include" /I "../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "dSINGLE" /U "_DEBUG" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libguardedalloc.a libstring.a libghost.a odelib.lib fmodvc.lib libbmfont.a ws2_32.lib kernel32.lib user32.lib gdi32.lib vfw32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.a dxguid.lib libblenkey.a libeay32.lib libpng.a libz.a libmoto.a /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"msvcrtd.lib" /nodefaultlib:"msvcprtd.lib" /out:"..\..\..\..\obj\windows\debug\blenderplayer.exe" /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont\lib\\" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\string\lib\\" /libpath:"..\..\..\..\..\lib\windows\ghost\lib\\" /libpath:"..\..\..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib\\" /libpath:"..\..\..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib\\" /libpath:"..\..\..\..\..\lib\windows\ode-0.03\lib" /libpath:"../../../../../lib/windows/fmod/lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "GP_ghost - Win32 Release" -# Name "GP_ghost - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Application.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Canvas.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_ghost.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_KeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_System.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\icons\winplayer.rc -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Application.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Canvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_KeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_System.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=..\..\..\..\source\icons\winplayer.ico -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\Makefile -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_ghost" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=GP_ghost - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_ghost.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_ghost.mak" CFG="GP_ghost - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_ghost - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_ghost - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_ghost - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ghost\" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\gameengine\Physics\Ode" /I "..\..\..\..\source\gameengine\Physics" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/readblenfile" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\ghost\include" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libguardedalloc.a libstring.a libghost.a odelib.lib fmodvc.lib libbmfont.a ws2_32.lib kernel32.lib user32.lib gdi32.lib vfw32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.a opengl32.lib glu32.lib openal_static.lib dxguid.lib libblenkey.a libeay32.lib libpng.a libz.a libmoto.a /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"msvcrtd.lib" /nodefaultlib:"msvcprt.lib" /out:"..\..\..\..\obj\windows\blenderplayer.exe" /libpath:"..\..\..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont\lib" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\string\lib" /libpath:"..\..\..\..\..\lib\windows\ghost\lib" /libpath:"..\..\..\..\..\lib\windows\jpeg/lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib" /libpath:"..\..\..\..\..\lib\windows\zlib\lib" /libpath:"..\..\..\..\..\lib\windows\ode-0.03\lib" /libpath:"../../../../../lib/windows/fmod/lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "GP_ghost - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ghost\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Physics\Ode" /I "..\..\..\..\source\gameengine\Physics" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\bmfont\include" /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/readblenfile" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\ghost\include" /I "../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "dSINGLE" /U "_DEBUG" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 libguardedalloc.a libstring.a libghost.a odelib.lib fmodvc.lib libbmfont.a ws2_32.lib kernel32.lib user32.lib gdi32.lib vfw32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.a dxguid.lib libblenkey.a libeay32.lib libpng.a libz.a libmoto.a /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"msvcrtd.lib" /nodefaultlib:"msvcprtd.lib" /out:"..\..\..\..\obj\windows\debug\blenderplayer.exe" /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\ode\lib" /libpath:"..\..\..\..\..\lib\windows\bmfont\lib\\" /libpath:"..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"..\..\..\..\..\lib\windows\string\lib\\" /libpath:"..\..\..\..\..\lib\windows\ghost\lib\\" /libpath:"..\..\..\..\..\lib\windows\jpeg\lib" /libpath:"..\..\..\..\..\lib\windows\moto\lib\\" /libpath:"..\..\..\..\..\lib\windows\zlib\lib\\" /libpath:"..\..\..\..\..\lib\windows\png\lib\\" /libpath:"..\..\..\..\..\lib\windows\ode-0.03\lib" /libpath:"../../../../../lib/windows/fmod/lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib\\" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "GP_ghost - Win32 Release" +# Name "GP_ghost - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Application.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Canvas.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_ghost.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_KeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_System.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\icons\winplayer.rc +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Application.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_Canvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_KeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\GPG_System.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\..\..\source\icons\winplayer.ico +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\ghost\Makefile +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/glut/GP_glut.dsp b/projectfiles/gameengine/gameplayer/glut/GP_glut.dsp index 64315293ac6..7e3a2060f92 100644 --- a/projectfiles/gameengine/gameplayer/glut/GP_glut.dsp +++ b/projectfiles/gameengine/gameplayer/glut/GP_glut.dsp @@ -1,205 +1,205 @@ -# Microsoft Developer Studio Project File - Name="GP_glut" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=GP_glut - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_glut.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_glut.mak" CFG="GP_glut - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_glut - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_glut - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_glut - Win32 Profile" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_glut - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\glut" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\source\gameengine\SoundSystem" /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" - -!ELSEIF "$(CFG)" == "GP_glut - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\glut\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\source\gameengine\SoundSystem" /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" - -!ELSEIF "$(CFG)" == "GP_glut - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_glut___Win32_Profile" -# PROP BASE Intermediate_Dir "GP_glut___Win32_Profile" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "GP_glut___Win32_Profile" -# PROP Intermediate_Dir "GP_glut___Win32_Profile" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\source\gameengine\SoundSystem" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\source\gameengine\SoundSystem" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" -# ADD LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" - -!ENDIF - -# Begin Target - -# Name "GP_glut - Win32 Release" -# Name "GP_glut - Win32 Debug" -# Name "GP_glut - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutGamePlayer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutKeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutSystem.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutCanvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutKeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutPolygonMaterial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutRenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutSystem.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\alc\ALc.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\alu\ALu.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\alut\ALut.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alBuffer.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alEax.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alError.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alExtension.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alListener.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alSource.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alState.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\OpenAL32.obj -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_glut" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=GP_glut - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_glut.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_glut.mak" CFG="GP_glut - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_glut - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_glut - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_glut - Win32 Profile" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_glut - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\glut" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\source\gameengine\SoundSystem" /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" + +!ELSEIF "$(CFG)" == "GP_glut - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\glut\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\source\gameengine\SoundSystem" /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" + +!ELSEIF "$(CFG)" == "GP_glut - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_glut___Win32_Profile" +# PROP BASE Intermediate_Dir "GP_glut___Win32_Profile" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "GP_glut___Win32_Profile" +# PROP Intermediate_Dir "GP_glut___Win32_Profile" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\source\gameengine\SoundSystem" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\glut-3.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\source\gameengine\SoundSystem" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" +# ADD LINK32 glu32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\glut-3.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" + +!ENDIF + +# Begin Target + +# Name "GP_glut - Win32 Release" +# Name "GP_glut - Win32 Debug" +# Name "GP_glut - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutGamePlayer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutKeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutSystem.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutCanvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutKeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutPolygonMaterial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutRenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Glut\GlutSystem.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\alc\ALc.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\alu\ALu.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\alut\ALut.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alBuffer.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alEax.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alError.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alExtension.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alListener.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alSource.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alState.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\OpenAL32.obj +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/loader/BlenderLoader/BlenderLoader.dsp b/projectfiles/gameengine/gameplayer/loader/BlenderLoader/BlenderLoader.dsp index 1af82b0644f..eb16fea9fd2 100644 --- a/projectfiles/gameengine/gameplayer/loader/BlenderLoader/BlenderLoader.dsp +++ b/projectfiles/gameengine/gameplayer/loader/BlenderLoader/BlenderLoader.dsp @@ -1,206 +1,206 @@ -# Microsoft Developer Studio Project File - Name="BlenderLoader" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=BlenderLoader - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BlenderLoader.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BlenderLoader.mak" CFG="BlenderLoader - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BlenderLoader - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "BlenderLoader - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "BlenderLoader - Win32 Profile" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BlenderLoader - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader" -# PROP Intermediate_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../../../../../lib/windows/python/include/python2.0" /I "../../../../../source/blender/encrypt" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /I "../../../../../source/gameengine/SoundSystem/SND_Dummy" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libguardedalloc.a libmoto.a sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\..\..\..\obj\windows\BlenderLoader.exe" /libpath:"../../../../../../lib/windows/moto/lib" /libpath:"..\..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" - -!ELSEIF "$(CFG)" == "BlenderLoader - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader\debug" -# PROP Intermediate_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "../../../../../../lib/windows/python/include/python1.5" /I "../../../../../source/blender/encrypt" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fr /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 sdldebug.lib libguardedalloc.a libmoto.a sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\..\..\..\obj\windows\debug\BlenderLoader.exe" /pdbtype:sept /libpath:"..\..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" - -!ELSEIF "$(CFG)" == "BlenderLoader - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "BlenderLoader___Win32_Profile" -# PROP BASE Intermediate_Dir "BlenderLoader___Win32_Profile" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "BlenderLoader___Win32_Profile" -# PROP Intermediate_Dir "BlenderLoader___Win32_Profile" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../../../../lib/windows/python/include/python1.5" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# SUBTRACT BASE CPP /Fr -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "../../../../../../lib/windows/python/include/python1.5" /I "../../../../../source/blender/encrypt" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 sdldebug.lib sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\..\..\..\obj\windows\debug\BlenderLoader.exe" /pdbtype:sept /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" -# ADD LINK32 sdldebug.lib libguardedalloc.a libmoto.a sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\..\..\..\obj\windows\profile\BlenderLoader.exe" /pdbtype:sept /libpath:"..\..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" - -!ENDIF - -# Begin Target - -# Name "BlenderLoader - Win32 Release" -# Name "BlenderLoader - Win32 Debug" -# Name "BlenderLoader - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\source\blender\makesdna\intern\dna.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\loader.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLKeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLSystem.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLCanvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLKeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLSystem.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\alc\ALc.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\alu\ALu.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\alut\ALut.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alBuffer.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alEax.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alError.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alExtension.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alListener.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alSource.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alState.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\OpenAL32.obj -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BlenderLoader" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=BlenderLoader - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BlenderLoader.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BlenderLoader.mak" CFG="BlenderLoader - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BlenderLoader - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "BlenderLoader - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "BlenderLoader - Win32 Profile" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BlenderLoader - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader" +# PROP Intermediate_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../../../../../lib/windows/python/include/python2.0" /I "../../../../../source/blender/encrypt" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /I "../../../../../source/gameengine/SoundSystem/SND_Dummy" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 libguardedalloc.a libmoto.a sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\..\..\..\obj\windows\BlenderLoader.exe" /libpath:"../../../../../../lib/windows/moto/lib" /libpath:"..\..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" + +!ELSEIF "$(CFG)" == "BlenderLoader - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader\debug" +# PROP Intermediate_Dir "..\..\..\..\..\..\obj\windows\gameengine\gameplayer\BlenderLoader\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "../../../../../../lib/windows/python/include/python1.5" /I "../../../../../source/blender/encrypt" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fr /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 sdldebug.lib libguardedalloc.a libmoto.a sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\..\..\..\obj\windows\debug\BlenderLoader.exe" /pdbtype:sept /libpath:"..\..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" + +!ELSEIF "$(CFG)" == "BlenderLoader - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "BlenderLoader___Win32_Profile" +# PROP BASE Intermediate_Dir "BlenderLoader___Win32_Profile" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "BlenderLoader___Win32_Profile" +# PROP Intermediate_Dir "BlenderLoader___Win32_Profile" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../../../../lib/windows/python/include/python1.5" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "../../../../../../lib/windows/python/include/python1.5" /I "../../../../../source/blender/encrypt" /I "../../../../../source/blender/blenkernel" /I "../../../../../source/blender/makesdna" /I "../../../../../source/blender/blenlib" /I "../../../../../source/blender/blenloader" /I "../../../../../source/blender/render/extern/include" /I "../../../../../source/gameengine/Rasterizer" /I "../../../../../../lib\windows\sdl\SDL-1.1.7\include" /I "../../../../../source/gameengine/GameLogic" /I "..\..\..\..\..\source\sumo\include" /I "..\..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\source\kernel\gen_system" /I "../../../../../source/blender/imbuf" /I "../../../../../source/gameengine/SoundSystem" /I "../../../../../source/gameengine/SoundSystem/SND_OpenAL" /I "../../../../../source/gameengine/Ketsji" /I "../../../../../source/gameengine/Expressions" /I "../../../../../source/gameengine/SceneGraph" /I "../../../../../source/gameengine/ketsji/kxnetwork" /I "../../../../../source/gameengine/network" /I "../../../../../source/gameengine/network/loopbacknetwork" /I "../../../../../source/gameengine/GamePlayer/common" /I "../../../../../../lib/windows/iksolver/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 sdldebug.lib sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\..\..\..\obj\windows\debug\BlenderLoader.exe" /pdbtype:sept /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" +# ADD LINK32 sdldebug.lib libguardedalloc.a libmoto.a sdlmain.lib sdl.lib dxguid.lib ole32.lib libjpeg.lib glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\..\..\..\..\..\obj\windows\profile\BlenderLoader.exe" /pdbtype:sept /libpath:"..\..\..\..\..\..\lib\windows\guardedalloc\lib" /libpath:"../../../../../../lib/windows/python/lib" /libpath:"../../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../../lib/windows/sdl/SDL-1.1.7\Lib" + +!ENDIF + +# Begin Target + +# Name "BlenderLoader - Win32 Release" +# Name "BlenderLoader - Win32 Debug" +# Name "BlenderLoader - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\..\source\blender\makesdna\intern\dna.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\loader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLKeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLSystem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLCanvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLKeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\GamePlayer\Loaders\Blender\SDLSystem.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\alc\ALc.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\alu\ALu.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\alut\ALut.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alBuffer.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alEax.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alError.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alExtension.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alListener.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alSource.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alState.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\..\lib\windows\openal\lib\OpenAL32\OpenAL32.obj +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/netscape/GP_netscape.dsp b/projectfiles/gameengine/gameplayer/netscape/GP_netscape.dsp index 60dc29e4918..e3145b14931 100644 --- a/projectfiles/gameengine/gameplayer/netscape/GP_netscape.dsp +++ b/projectfiles/gameengine/gameplayer/netscape/GP_netscape.dsp @@ -1,173 +1,173 @@ -# Microsoft Developer Studio Project File - Name="GP_netscape" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GP_netscape - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_netscape.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_netscape.mak" CFG="GP_netscape - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_netscape - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "GP_netscape - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "GP_netscape - Win32 Profile" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_netscape - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\Release" -# PROP BASE Intermediate_Dir ".\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" -# PROP Intermediate_Dir ".\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\..\lib\windows\iksolver\include" /I "../../../../../lib/windows/moto/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib libblenkey.a libz.a /nologo /subsystem:windows /dll /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\iksolver\lib\\" - -!ELSEIF "$(CFG)" == "GP_netscape - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir ".\Debug" -# PROP BASE Intermediate_Dir ".\Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" -# PROP Intermediate_Dir ".\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /I "../../../../../lib/windows/moto/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib libblenkey.a libz.a kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib python15.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\iksolver\lib\\" - -!ELSEIF "$(CFG)" == "GP_netscape - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_netscape___Win32_Profile" -# PROP BASE Intermediate_Dir "GP_netscape___Win32_Profile" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "GP_netscape___Win32_Profile" -# PROP Intermediate_Dir "GP_netscape___Win32_Profile" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" - -!ENDIF - -# Begin Target - -# Name "GP_netscape - Win32 Release" -# Name "GP_netscape - Win32 Debug" -# Name "GP_netscape - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\BlenderPlayer.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\netscape_plugin_Plugin.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\npblender.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\npblender.def -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\npblender.rc -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\npwin.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\NSPlugin\autodownload.html -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\Testing\NetscapeExample.html -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_netscape" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GP_netscape - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_netscape.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_netscape.mak" CFG="GP_netscape - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_netscape - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "GP_netscape - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "GP_netscape - Win32 Profile" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_netscape - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\..\lib\windows\iksolver\include" /I "../../../../../lib/windows/moto/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib libblenkey.a libz.a /nologo /subsystem:windows /dll /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\iksolver\lib\\" + +!ELSEIF "$(CFG)" == "GP_netscape - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /I "../../../../../lib/windows/moto/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib libblenkey.a libz.a kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib python15.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\iksolver\lib\\" + +!ELSEIF "$(CFG)" == "GP_netscape - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_netscape___Win32_Profile" +# PROP BASE Intermediate_Dir "GP_netscape___Win32_Profile" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "GP_netscape___Win32_Profile" +# PROP Intermediate_Dir "GP_netscape___Win32_Profile" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" + +!ENDIF + +# Begin Target + +# Name "GP_netscape - Win32 Release" +# Name "GP_netscape - Win32 Debug" +# Name "GP_netscape - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\BlenderPlayer.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\netscape_plugin_Plugin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\npblender.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\npblender.def +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\npblender.rc +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\windows\npwin.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\NSPlugin\autodownload.html +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\Testing\NetscapeExample.html +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/netscape2/GP_netscape.dsp b/projectfiles/gameengine/gameplayer/netscape2/GP_netscape.dsp index e065ac280b7..5ebdc5c9b7d 100644 --- a/projectfiles/gameengine/gameplayer/netscape2/GP_netscape.dsp +++ b/projectfiles/gameengine/gameplayer/netscape2/GP_netscape.dsp @@ -1,181 +1,181 @@ -# Microsoft Developer Studio Project File - Name="GP_netscape2" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GP_netscape2 - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_netscape.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_netscape.mak" CFG="GP_netscape2 - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_netscape2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "GP_netscape2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "GP_netscape2 - Win32 Profile" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_netscape2 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\Release" -# PROP BASE Intermediate_Dir ".\Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" -# PROP Intermediate_Dir ".\Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\gameplayer\Netscape2\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 libblenkey.a libeay32.lib libz.a ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\npBlender3DPlugin.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\iksolver\lib\\" /libpath:"../../../../../lib/windows/openal/lib" - -!ELSEIF "$(CFG)" == "GP_netscape2 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir ".\Debug" -# PROP BASE Intermediate_Dir ".\Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" -# PROP Intermediate_Dir ".\Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\gameplayer\Netscape2\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 -# ADD LINK32 libblenkey.a libeay32.lib libz.a ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\npBlender3DPlugin.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\lib\windows\iksolver\lib\\" - -!ELSEIF "$(CFG)" == "GP_netscape2 - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_netscape2___Win32_Profile" -# PROP BASE Intermediate_Dir "GP_netscape2___Win32_Profile" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "GP_netscape2___Win32_Profile" -# PROP Intermediate_Dir "GP_netscape2___Win32_Profile" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\gameplayer\Netscape2\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -# SUBTRACT CPP /Fr -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" -# ADD LINK32 libblenkey.a libeay32.lib libz.a ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\npBlender3DPlugin.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" - -!ENDIF - -# Begin Target - -# Name "GP_netscape2 - Win32 Release" -# Name "GP_netscape2 - Win32 Debug" -# Name "GP_netscape2 - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\Blender3DPlugin.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\netscape_plugin_Plugin.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\npblender.def -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\npblender.rc -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\npshell.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\npwin.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\plgwnd.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\plgwnd.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\NSPlugin\autodownload.html -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\Testing\NetscapeExample.html -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_netscape2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GP_netscape2 - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_netscape.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_netscape.mak" CFG="GP_netscape2 - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_netscape2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "GP_netscape2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "GP_netscape2 - Win32 Profile" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_netscape2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir ".\Release" +# PROP BASE Intermediate_Dir ".\Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" +# PROP Intermediate_Dir ".\Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\gameplayer\Netscape2\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 libblenkey.a libeay32.lib libz.a ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\npBlender3DPlugin.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\..\..\lib\windows\iksolver\lib\\" /libpath:"../../../../../lib/windows/openal/lib" + +!ELSEIF "$(CFG)" == "GP_netscape2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir ".\Debug" +# PROP BASE Intermediate_Dir ".\Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "C:\Program Files\Netscape\Communicator\Program\Plugins" +# PROP Intermediate_Dir ".\Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\gameplayer\Netscape2\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 +# ADD LINK32 libblenkey.a libeay32.lib libz.a ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\npBlender3DPlugin.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" /libpath:"../../../../../lib/windows/zlib/lib/" /libpath:"..\..\..\..\..\lib\windows\blenkey\lib" /libpath:"..\..\..\lib\windows\openssl\lib" /libpath:"..\..\..\lib\windows\iksolver\lib\\" + +!ELSEIF "$(CFG)" == "GP_netscape2 - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_netscape2___Win32_Profile" +# PROP BASE Intermediate_Dir "GP_netscape2___Win32_Profile" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "GP_netscape2___Win32_Profile" +# PROP Intermediate_Dir "GP_netscape2___Win32_Profile" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_messaging" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\rasterizer\ras_openglrasterizer" /I "..\..\..\..\source\gameengine\scenegraph" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\soundsystem" /I "..\..\..\..\source\gameengine\soundsystem\snd_openal" /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows_sdk" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\..\lib\windows\openal\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "../../../../source/blender/blenkernel" /I "../../../../source/blender/makesdna" /I "../../../../source/blender/blenlib" /I "../../../../source/blender/blenloader" /I "../../../../source/blender/render/extern/include" /I "../../../../source/blender/imbuf" /I "..\..\..\..\source\gameengine\converter" /I "..\..\..\..\source\gameengine\gameplayer\common\windows" /I "..\..\..\..\source\gameengine\gameplayer\Netscape2\windows" /I "..\..\..\..\..\lib\windows\iksolver\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\NPBlender.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" +# ADD LINK32 libblenkey.a libeay32.lib libz.a ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libjpeg.lib opengl32.lib glu32.lib openal_static.lib dxguid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"C:\Program Files\Netscape\Communicator\Program\Plugins\npBlender3DPlugin.dll" /libpath:"../../../../../lib/windows/python/lib" /libpath:"../../../../../lib/windows/jpeg/lib" /libpath:"../../../../../lib/windows/openal/lib" + +!ENDIF + +# Begin Target + +# Name "GP_netscape2 - Win32 Release" +# Name "GP_netscape2 - Win32 Debug" +# Name "GP_netscape2 - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\Blender3DPlugin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\makesdna\intern\dna.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\netscape_plugin_Plugin.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\npblender.def +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\npblender.rc +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\npshell.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\npwin.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape2\windows\plgwnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\blender\blenkernel\bad_level_call_stubs\stubs.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\plgwnd.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\NSPlugin\autodownload.html +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Netscape\Testing\NetscapeExample.html +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/ps2/GP_ps2.dsp b/projectfiles/gameengine/gameplayer/ps2/GP_ps2.dsp index 84aa94ef1a5..6fc1d06c3f1 100644 --- a/projectfiles/gameengine/gameplayer/ps2/GP_ps2.dsp +++ b/projectfiles/gameengine/gameplayer/ps2/GP_ps2.dsp @@ -1,182 +1,182 @@ -# Microsoft Developer Studio Project File - Name="GP_ps2" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=GP_ps2 - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_ps2.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_ps2.mak" CFG="GP_ps2 - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_ps2 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_ps2 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_ps2 - Win32 Profile" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_ps2 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ps2" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "GP_ps2 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ps2\debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "GP_ps2 - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_ps2___Win32_Profile" -# PROP BASE Intermediate_Dir "GP_ps2___Win32_Profile" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "GP_ps2___Win32_Profile" -# PROP Intermediate_Dir "GP_ps2___Win32_Profile" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "GP_ps2 - Win32 Release" -# Name "GP_ps2 - Win32 Debug" -# Name "GP_ps2 - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\DebugActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\GPC_Init.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2DualShockDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2GamePlayer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2System.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\DebugActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\ExampleEngine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\GPC_Init.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2Canvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2DualShockDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2InputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2Rasterizer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2RenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2System.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\SamplePolygonMaterial.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_ps2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=GP_ps2 - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_ps2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_ps2.mak" CFG="GP_ps2 - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_ps2 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_ps2 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_ps2 - Win32 Profile" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_ps2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ps2" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "GP_ps2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\ps2\debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "GP_ps2 - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_ps2___Win32_Profile" +# PROP BASE Intermediate_Dir "GP_ps2___Win32_Profile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "GP_ps2___Win32_Profile" +# PROP Intermediate_Dir "GP_ps2___Win32_Profile" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\rasterizer" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "GP_ps2 - Win32 Release" +# Name "GP_ps2 - Win32 Debug" +# Name "GP_ps2 - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\DebugActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\GPC_Init.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2DualShockDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2GamePlayer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2System.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\DebugActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\ExampleEngine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\GPC_Init.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2Canvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2DualShockDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2InputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2Rasterizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2RenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\PS2System.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\PS2\SamplePolygonMaterial.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/qt/gp.dsp b/projectfiles/gameengine/gameplayer/qt/gp.dsp index 512c5b69de6..9f3e82b6cd6 100644 --- a/projectfiles/gameengine/gameplayer/qt/gp.dsp +++ b/projectfiles/gameengine/gameplayer/qt/gp.dsp @@ -1,164 +1,164 @@ -# Microsoft Developer Studio Project File - Name="gp" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=gp - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gp.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gp.mak" CFG="gp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gp - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "gp - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gp - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qt.lib h:\qtwin\lib\qnp.lib python20.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\..\..\..\obj\windows\gp.exe" /libpath:"..\..\..\..\..\lib\windows\python\lib\\" - -!ELSEIF "$(CFG)" == "gp - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp\debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /GX /Od /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qt.lib python15_d.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\..\..\..\..\obj\windows\debug\gp.exe" /libpath:"..\..\..\..\..\lib\windows\python\lib\\" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "gp - Win32 Release" -# Name "gp - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\DebugActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\SamplePolygonMaterial.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="gp" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=gp - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "gp.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "gp.mak" CFG="gp - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "gp - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "gp - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "gp - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qt.lib h:\qtwin\lib\qnp.lib python20.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\..\..\..\obj\windows\gp.exe" /libpath:"..\..\..\..\..\lib\windows\python\lib\\" + +!ELSEIF "$(CFG)" == "gp - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp\debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gp\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /GX /Od /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 opengl32.lib glu32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qt.lib python15_d.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\..\..\..\..\obj\windows\debug\gp.exe" /libpath:"..\..\..\..\..\lib\windows\python\lib\\" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "gp - Win32 Release" +# Name "gp - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\DebugActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\SamplePolygonMaterial.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/qt/gpplugin.dsp b/projectfiles/gameengine/gameplayer/qt/gpplugin.dsp index 180f147c79a..65148dd706d 100644 --- a/projectfiles/gameengine/gameplayer/qt/gpplugin.dsp +++ b/projectfiles/gameengine/gameplayer/qt/gpplugin.dsp @@ -1,824 +1,824 @@ -# Microsoft Developer Studio Project File - Name="gpplugin" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=gpplugin - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gpplugin.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gpplugin.mak" CFG="gpplugin - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gpplugin - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "gpplugin - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gpplugin - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPPLUGIN_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPPLUGIN_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qnp.lib h:\qtwin\lib\qt.lib opengl32.lib glu32.lib python20.lib /nologo /dll /machine:I386 /out:"..\..\..\..\..\obj\windows\npWebGP.dll" /libpath:"..\..\..\..\..\lib\windows\python\lib\\" - -!ELSEIF "$(CFG)" == "gpplugin - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin\debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPPLUGIN_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "WIN32" /D "PLUGIN" /D "_DEBUG" -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x409 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qnp.lib h:\qtwin\lib\qt.lib opengl32.lib glu32.lib python15_d.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:"..\..\..\..\source\gameengine\GamePlayer\Qt\GP.def" /out:"..\..\..\..\..\obj\windows\debug\npWebGP.dll" /libpath:"..\..\..\..\..\lib\windows\python\lib" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "gpplugin - Win32 Release" -# Name "gpplugin - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP.cpp -DEP_CPP_GP_CP=\ - "..\..\..\..\..\qtwin\include\qapplication.h"\ - "..\..\..\..\..\qtwin\include\qarray.h"\ - "..\..\..\..\..\qtwin\include\qasciidict.h"\ - "..\..\..\..\..\qtwin\include\qbrush.h"\ - "..\..\..\..\..\qtwin\include\qcollection.h"\ - "..\..\..\..\..\qtwin\include\qcolor.h"\ - "..\..\..\..\..\qtwin\include\qconfig-large.h"\ - "..\..\..\..\..\qtwin\include\qconfig-medium.h"\ - "..\..\..\..\..\qtwin\include\qconfig-minimal.h"\ - "..\..\..\..\..\qtwin\include\qconfig-small.h"\ - "..\..\..\..\..\qtwin\include\qconfig.h"\ - "..\..\..\..\..\qtwin\include\qcstring.h"\ - "..\..\..\..\..\qtwin\include\qcursor.h"\ - "..\..\..\..\..\qtwin\include\qdatastream.h"\ - "..\..\..\..\..\qtwin\include\qdialog.h"\ - "..\..\..\..\..\qtwin\include\qevent.h"\ - "..\..\..\..\..\qtwin\include\qfeatures.h"\ - "..\..\..\..\..\qtwin\include\qfont.h"\ - "..\..\..\..\..\qtwin\include\qfontinfo.h"\ - "..\..\..\..\..\qtwin\include\qfontmetrics.h"\ - "..\..\..\..\..\qtwin\include\qframe.h"\ - "..\..\..\..\..\qtwin\include\qgarray.h"\ - "..\..\..\..\..\qtwin\include\qgdict.h"\ - "..\..\..\..\..\qtwin\include\qgl.h"\ - "..\..\..\..\..\qtwin\include\qglist.h"\ - "..\..\..\..\..\qtwin\include\qglobal.h"\ - "..\..\..\..\..\qtwin\include\qiconset.h"\ - "..\..\..\..\..\qtwin\include\qimage.h"\ - "..\..\..\..\..\qtwin\include\qintdict.h"\ - "..\..\..\..\..\qtwin\include\qiodevice.h"\ - "..\..\..\..\..\qtwin\include\qlist.h"\ - "..\..\..\..\..\qtwin\include\qmenudata.h"\ - "..\..\..\..\..\qtwin\include\qmessagebox.h"\ - "..\..\..\..\..\qtwin\include\qmime.h"\ - "..\..\..\..\..\qtwin\include\qnamespace.h"\ - "..\..\..\..\..\qtwin\include\qnp.h"\ - "..\..\..\..\..\qtwin\include\qobject.h"\ - "..\..\..\..\..\qtwin\include\qobjectdefs.h"\ - "..\..\..\..\..\qtwin\include\qpaintdevice.h"\ - "..\..\..\..\..\qtwin\include\qpainter.h"\ - "..\..\..\..\..\qtwin\include\qpalette.h"\ - "..\..\..\..\..\qtwin\include\qpen.h"\ - "..\..\..\..\..\qtwin\include\qpixmap.h"\ - "..\..\..\..\..\qtwin\include\qpngio.h"\ - "..\..\..\..\..\qtwin\include\qpoint.h"\ - "..\..\..\..\..\qtwin\include\qpointarray.h"\ - "..\..\..\..\..\qtwin\include\qpopupmenu.h"\ - "..\..\..\..\..\qtwin\include\qrect.h"\ - "..\..\..\..\..\qtwin\include\qregexp.h"\ - "..\..\..\..\..\qtwin\include\qregion.h"\ - "..\..\..\..\..\qtwin\include\qshared.h"\ - "..\..\..\..\..\qtwin\include\qsignal.h"\ - "..\..\..\..\..\qtwin\include\qsize.h"\ - "..\..\..\..\..\qtwin\include\qsizepolicy.h"\ - "..\..\..\..\..\qtwin\include\qstring.h"\ - "..\..\..\..\..\qtwin\include\qstringlist.h"\ - "..\..\..\..\..\qtwin\include\qstrlist.h"\ - "..\..\..\..\..\qtwin\include\qstyle.h"\ - "..\..\..\..\..\qtwin\include\qt_windows.h"\ - "..\..\..\..\..\qtwin\include\qtranslator.h"\ - "..\..\..\..\..\qtwin\include\qvaluelist.h"\ - "..\..\..\..\..\qtwin\include\qwidget.h"\ - "..\..\..\..\..\qtwin\include\qwindowdefs.h"\ - "..\..\..\..\..\qtwin\include\qwindowdefs_win.h"\ - "..\..\..\..\..\qtwin\include\qwmatrix.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h"\ - "..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ - "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ - -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.cpp -DEP_CPP_GP_IN=\ - "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ - "..\..\..\..\source\gameengine\Expressions\BoolValue.h"\ - "..\..\..\..\source\gameengine\Expressions\ListValue.h"\ - "..\..\..\..\source\gameengine\Expressions\PyObjectPlus.h"\ - "..\..\..\..\source\gameengine\Expressions\Value.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_AlwaysEventManager.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_AlwaysSensor.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ANDController.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_EventManager.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IActuator.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IController.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IObject.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ISensor.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_KeyboardManager.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_KeyboardSensor.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_LogicManager.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_PythonController.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\DebugActuator.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\SamplePolygonMaterial.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_GameObject.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_PythonInit.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_SoundActuator.h"\ - "..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkEventManager.h"\ - "..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_OpenGLRasterizer.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_Polygon.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ - "..\..\..\..\source\gameengine\SceneGraph\SG_IObject.h"\ - "..\..\..\..\source\gameengine\SceneGraph\SG_Node.h"\ - "..\..\..\..\source\gameengine\SceneGraph\SG_Spatial.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedPtr.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ - "..\..\..\..\source\sumo\include\solid.h"\ - "..\..\..\..\source\sumo\include\solid_types.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ - "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ - -NODEP_CPP_GP_IN=\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\GPC_OpenALWaveCache.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\OpenALScene.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\SND_SoundObject.h"\ - -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.cpp -DEP_CPP_QTEXA=\ - "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ - "..\..\..\..\source\gameengine\Expressions\BoolValue.h"\ - "..\..\..\..\source\gameengine\Expressions\IntValue.h"\ - "..\..\..\..\source\gameengine\Expressions\ListValue.h"\ - "..\..\..\..\source\gameengine\Expressions\PyObjectPlus.h"\ - "..\..\..\..\source\gameengine\Expressions\Value.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IActuator.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IObject.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_LogicManager.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_Camera.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_GameObject.h"\ - "..\..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_CameraData.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_Polygon.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ - "..\..\..\..\source\gameengine\SceneGraph\SG_IObject.h"\ - "..\..\..\..\source\gameengine\SceneGraph\SG_Node.h"\ - "..\..\..\..\source\gameengine\SceneGraph\SG_Spatial.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedPtr.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ - "..\..\..\..\source\sumo\Fuzzics\include\SM_Scene.h"\ - "..\..\..\..\source\sumo\include\solid.h"\ - "..\..\..\..\source\sumo\include\solid_types.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ - "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ - -NODEP_CPP_QTEXA=\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\OpenALScene.h"\ - -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.cpp -DEP_CPP_QTKEY=\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ - -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.cpp -DEP_CPP_QTOPE=\ - "..\..\..\..\..\qtwin\include\qapplication.h"\ - "..\..\..\..\..\qtwin\include\qarray.h"\ - "..\..\..\..\..\qtwin\include\qasciidict.h"\ - "..\..\..\..\..\qtwin\include\qbrush.h"\ - "..\..\..\..\..\qtwin\include\qcollection.h"\ - "..\..\..\..\..\qtwin\include\qcolor.h"\ - "..\..\..\..\..\qtwin\include\qconfig-large.h"\ - "..\..\..\..\..\qtwin\include\qconfig-medium.h"\ - "..\..\..\..\..\qtwin\include\qconfig-minimal.h"\ - "..\..\..\..\..\qtwin\include\qconfig-small.h"\ - "..\..\..\..\..\qtwin\include\qconfig.h"\ - "..\..\..\..\..\qtwin\include\qcstring.h"\ - "..\..\..\..\..\qtwin\include\qcursor.h"\ - "..\..\..\..\..\qtwin\include\qdatastream.h"\ - "..\..\..\..\..\qtwin\include\qevent.h"\ - "..\..\..\..\..\qtwin\include\qfeatures.h"\ - "..\..\..\..\..\qtwin\include\qfont.h"\ - "..\..\..\..\..\qtwin\include\qfontinfo.h"\ - "..\..\..\..\..\qtwin\include\qfontmetrics.h"\ - "..\..\..\..\..\qtwin\include\qframe.h"\ - "..\..\..\..\..\qtwin\include\qgarray.h"\ - "..\..\..\..\..\qtwin\include\qgdict.h"\ - "..\..\..\..\..\qtwin\include\qgl.h"\ - "..\..\..\..\..\qtwin\include\qglist.h"\ - "..\..\..\..\..\qtwin\include\qglobal.h"\ - "..\..\..\..\..\qtwin\include\qiconset.h"\ - "..\..\..\..\..\qtwin\include\qintdict.h"\ - "..\..\..\..\..\qtwin\include\qiodevice.h"\ - "..\..\..\..\..\qtwin\include\qlist.h"\ - "..\..\..\..\..\qtwin\include\qmenudata.h"\ - "..\..\..\..\..\qtwin\include\qmime.h"\ - "..\..\..\..\..\qtwin\include\qnamespace.h"\ - "..\..\..\..\..\qtwin\include\qobject.h"\ - "..\..\..\..\..\qtwin\include\qobjectdefs.h"\ - "..\..\..\..\..\qtwin\include\qpaintdevice.h"\ - "..\..\..\..\..\qtwin\include\qpalette.h"\ - "..\..\..\..\..\qtwin\include\qpixmap.h"\ - "..\..\..\..\..\qtwin\include\qpoint.h"\ - "..\..\..\..\..\qtwin\include\qpopupmenu.h"\ - "..\..\..\..\..\qtwin\include\qrect.h"\ - "..\..\..\..\..\qtwin\include\qregexp.h"\ - "..\..\..\..\..\qtwin\include\qregion.h"\ - "..\..\..\..\..\qtwin\include\qshared.h"\ - "..\..\..\..\..\qtwin\include\qsignal.h"\ - "..\..\..\..\..\qtwin\include\qsize.h"\ - "..\..\..\..\..\qtwin\include\qsizepolicy.h"\ - "..\..\..\..\..\qtwin\include\qstring.h"\ - "..\..\..\..\..\qtwin\include\qstringlist.h"\ - "..\..\..\..\..\qtwin\include\qstyle.h"\ - "..\..\..\..\..\qtwin\include\qt_windows.h"\ - "..\..\..\..\..\qtwin\include\qtranslator.h"\ - "..\..\..\..\..\qtwin\include\qvaluelist.h"\ - "..\..\..\..\..\qtwin\include\qwidget.h"\ - "..\..\..\..\..\qtwin\include\qwindowdefs.h"\ - "..\..\..\..\..\qtwin\include\qwindowdefs_win.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ - "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ - -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.cpp -DEP_CPP_QTSYS=\ - "..\..\..\..\..\qtwin\include\qapplication.h"\ - "..\..\..\..\..\qtwin\include\qarray.h"\ - "..\..\..\..\..\qtwin\include\qasciidict.h"\ - "..\..\..\..\..\qtwin\include\qbrush.h"\ - "..\..\..\..\..\qtwin\include\qcollection.h"\ - "..\..\..\..\..\qtwin\include\qcolor.h"\ - "..\..\..\..\..\qtwin\include\qconfig-large.h"\ - "..\..\..\..\..\qtwin\include\qconfig-medium.h"\ - "..\..\..\..\..\qtwin\include\qconfig-minimal.h"\ - "..\..\..\..\..\qtwin\include\qconfig-small.h"\ - "..\..\..\..\..\qtwin\include\qconfig.h"\ - "..\..\..\..\..\qtwin\include\qcstring.h"\ - "..\..\..\..\..\qtwin\include\qcursor.h"\ - "..\..\..\..\..\qtwin\include\qdatastream.h"\ - "..\..\..\..\..\qtwin\include\qevent.h"\ - "..\..\..\..\..\qtwin\include\qfeatures.h"\ - "..\..\..\..\..\qtwin\include\qfont.h"\ - "..\..\..\..\..\qtwin\include\qfontinfo.h"\ - "..\..\..\..\..\qtwin\include\qfontmetrics.h"\ - "..\..\..\..\..\qtwin\include\qframe.h"\ - "..\..\..\..\..\qtwin\include\qgarray.h"\ - "..\..\..\..\..\qtwin\include\qgdict.h"\ - "..\..\..\..\..\qtwin\include\qgl.h"\ - "..\..\..\..\..\qtwin\include\qglist.h"\ - "..\..\..\..\..\qtwin\include\qglobal.h"\ - "..\..\..\..\..\qtwin\include\qiconset.h"\ - "..\..\..\..\..\qtwin\include\qintdict.h"\ - "..\..\..\..\..\qtwin\include\qiodevice.h"\ - "..\..\..\..\..\qtwin\include\qlist.h"\ - "..\..\..\..\..\qtwin\include\qmenudata.h"\ - "..\..\..\..\..\qtwin\include\qmime.h"\ - "..\..\..\..\..\qtwin\include\qnamespace.h"\ - "..\..\..\..\..\qtwin\include\qobject.h"\ - "..\..\..\..\..\qtwin\include\qobjectdefs.h"\ - "..\..\..\..\..\qtwin\include\qpaintdevice.h"\ - "..\..\..\..\..\qtwin\include\qpalette.h"\ - "..\..\..\..\..\qtwin\include\qpixmap.h"\ - "..\..\..\..\..\qtwin\include\qpoint.h"\ - "..\..\..\..\..\qtwin\include\qpopupmenu.h"\ - "..\..\..\..\..\qtwin\include\qrect.h"\ - "..\..\..\..\..\qtwin\include\qregexp.h"\ - "..\..\..\..\..\qtwin\include\qregion.h"\ - "..\..\..\..\..\qtwin\include\qshared.h"\ - "..\..\..\..\..\qtwin\include\qsignal.h"\ - "..\..\..\..\..\qtwin\include\qsize.h"\ - "..\..\..\..\..\qtwin\include\qsizepolicy.h"\ - "..\..\..\..\..\qtwin\include\qstring.h"\ - "..\..\..\..\..\qtwin\include\qstringlist.h"\ - "..\..\..\..\..\qtwin\include\qstyle.h"\ - "..\..\..\..\..\qtwin\include\qt_windows.h"\ - "..\..\..\..\..\qtwin\include\qtranslator.h"\ - "..\..\..\..\..\qtwin\include\qvaluelist.h"\ - "..\..\..\..\..\qtwin\include\qwidget.h"\ - "..\..\..\..\..\qtwin\include\qwindowdefs.h"\ - "..\..\..\..\..\qtwin\include\qwindowdefs_win.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ - "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ - "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h"\ - "..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h"\ - "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ - "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ - "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ - "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ - "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ - "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ - -NODEP_CPP_QTSYS=\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\BKE_bad_level_calls.h"\ - "..\..\..\..\source\gameengine\GamePlayer\Qt\BLO_readfile.h"\ - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\DebugActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\resource.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\SamplePolygonMaterial.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP.rc -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="gpplugin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=gpplugin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "gpplugin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "gpplugin.mak" CFG="gpplugin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "gpplugin - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "gpplugin - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "gpplugin - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPPLUGIN_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPPLUGIN_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qnp.lib h:\qtwin\lib\qt.lib opengl32.lib glu32.lib python20.lib /nologo /dll /machine:I386 /out:"..\..\..\..\..\obj\windows\npWebGP.dll" /libpath:"..\..\..\..\..\lib\windows\python\lib\\" + +!ELSEIF "$(CFG)" == "gpplugin - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin\debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\gameplayer\qt\gpplugin\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPPLUGIN_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I "h:\qtwin\include" /I "..\..\..\..\source\gameengine\Expressions" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\Ketsji" /I "..\..\..\..\source\gameengine\Ketsji\KXNetwork" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\source\gameengine\Network\LoopBackNetwork" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\..\source\gameengine\SceneGraph" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "WIN32" /D "PLUGIN" /D "_DEBUG" +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib h:\qtwin\lib\qnp.lib h:\qtwin\lib\qt.lib opengl32.lib glu32.lib python15_d.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:"..\..\..\..\source\gameengine\GamePlayer\Qt\GP.def" /out:"..\..\..\..\..\obj\windows\debug\npWebGP.dll" /libpath:"..\..\..\..\..\lib\windows\python\lib" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "gpplugin - Win32 Release" +# Name "gpplugin - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP.cpp +DEP_CPP_GP_CP=\ + "..\..\..\..\..\qtwin\include\qapplication.h"\ + "..\..\..\..\..\qtwin\include\qarray.h"\ + "..\..\..\..\..\qtwin\include\qasciidict.h"\ + "..\..\..\..\..\qtwin\include\qbrush.h"\ + "..\..\..\..\..\qtwin\include\qcollection.h"\ + "..\..\..\..\..\qtwin\include\qcolor.h"\ + "..\..\..\..\..\qtwin\include\qconfig-large.h"\ + "..\..\..\..\..\qtwin\include\qconfig-medium.h"\ + "..\..\..\..\..\qtwin\include\qconfig-minimal.h"\ + "..\..\..\..\..\qtwin\include\qconfig-small.h"\ + "..\..\..\..\..\qtwin\include\qconfig.h"\ + "..\..\..\..\..\qtwin\include\qcstring.h"\ + "..\..\..\..\..\qtwin\include\qcursor.h"\ + "..\..\..\..\..\qtwin\include\qdatastream.h"\ + "..\..\..\..\..\qtwin\include\qdialog.h"\ + "..\..\..\..\..\qtwin\include\qevent.h"\ + "..\..\..\..\..\qtwin\include\qfeatures.h"\ + "..\..\..\..\..\qtwin\include\qfont.h"\ + "..\..\..\..\..\qtwin\include\qfontinfo.h"\ + "..\..\..\..\..\qtwin\include\qfontmetrics.h"\ + "..\..\..\..\..\qtwin\include\qframe.h"\ + "..\..\..\..\..\qtwin\include\qgarray.h"\ + "..\..\..\..\..\qtwin\include\qgdict.h"\ + "..\..\..\..\..\qtwin\include\qgl.h"\ + "..\..\..\..\..\qtwin\include\qglist.h"\ + "..\..\..\..\..\qtwin\include\qglobal.h"\ + "..\..\..\..\..\qtwin\include\qiconset.h"\ + "..\..\..\..\..\qtwin\include\qimage.h"\ + "..\..\..\..\..\qtwin\include\qintdict.h"\ + "..\..\..\..\..\qtwin\include\qiodevice.h"\ + "..\..\..\..\..\qtwin\include\qlist.h"\ + "..\..\..\..\..\qtwin\include\qmenudata.h"\ + "..\..\..\..\..\qtwin\include\qmessagebox.h"\ + "..\..\..\..\..\qtwin\include\qmime.h"\ + "..\..\..\..\..\qtwin\include\qnamespace.h"\ + "..\..\..\..\..\qtwin\include\qnp.h"\ + "..\..\..\..\..\qtwin\include\qobject.h"\ + "..\..\..\..\..\qtwin\include\qobjectdefs.h"\ + "..\..\..\..\..\qtwin\include\qpaintdevice.h"\ + "..\..\..\..\..\qtwin\include\qpainter.h"\ + "..\..\..\..\..\qtwin\include\qpalette.h"\ + "..\..\..\..\..\qtwin\include\qpen.h"\ + "..\..\..\..\..\qtwin\include\qpixmap.h"\ + "..\..\..\..\..\qtwin\include\qpngio.h"\ + "..\..\..\..\..\qtwin\include\qpoint.h"\ + "..\..\..\..\..\qtwin\include\qpointarray.h"\ + "..\..\..\..\..\qtwin\include\qpopupmenu.h"\ + "..\..\..\..\..\qtwin\include\qrect.h"\ + "..\..\..\..\..\qtwin\include\qregexp.h"\ + "..\..\..\..\..\qtwin\include\qregion.h"\ + "..\..\..\..\..\qtwin\include\qshared.h"\ + "..\..\..\..\..\qtwin\include\qsignal.h"\ + "..\..\..\..\..\qtwin\include\qsize.h"\ + "..\..\..\..\..\qtwin\include\qsizepolicy.h"\ + "..\..\..\..\..\qtwin\include\qstring.h"\ + "..\..\..\..\..\qtwin\include\qstringlist.h"\ + "..\..\..\..\..\qtwin\include\qstrlist.h"\ + "..\..\..\..\..\qtwin\include\qstyle.h"\ + "..\..\..\..\..\qtwin\include\qt_windows.h"\ + "..\..\..\..\..\qtwin\include\qtranslator.h"\ + "..\..\..\..\..\qtwin\include\qvaluelist.h"\ + "..\..\..\..\..\qtwin\include\qwidget.h"\ + "..\..\..\..\..\qtwin\include\qwindowdefs.h"\ + "..\..\..\..\..\qtwin\include\qwindowdefs_win.h"\ + "..\..\..\..\..\qtwin\include\qwmatrix.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h"\ + "..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ + "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.cpp +DEP_CPP_GP_IN=\ + "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ + "..\..\..\..\source\gameengine\Expressions\BoolValue.h"\ + "..\..\..\..\source\gameengine\Expressions\ListValue.h"\ + "..\..\..\..\source\gameengine\Expressions\PyObjectPlus.h"\ + "..\..\..\..\source\gameengine\Expressions\Value.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_AlwaysEventManager.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_AlwaysSensor.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ANDController.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_EventManager.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IActuator.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IController.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IObject.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ISensor.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_KeyboardManager.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_KeyboardSensor.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_LogicManager.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_PythonController.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\DebugActuator.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\SamplePolygonMaterial.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_GameObject.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_PythonInit.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_SoundActuator.h"\ + "..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkEventManager.h"\ + "..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_OpenGLRasterizer.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_Polygon.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ + "..\..\..\..\source\gameengine\SceneGraph\SG_IObject.h"\ + "..\..\..\..\source\gameengine\SceneGraph\SG_Node.h"\ + "..\..\..\..\source\gameengine\SceneGraph\SG_Spatial.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedPtr.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ + "..\..\..\..\source\sumo\include\solid.h"\ + "..\..\..\..\source\sumo\include\solid_types.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ + "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ + +NODEP_CPP_GP_IN=\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\GPC_OpenALWaveCache.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\OpenALScene.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\SND_SoundObject.h"\ + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.cpp +DEP_CPP_QTEXA=\ + "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ + "..\..\..\..\source\gameengine\Expressions\BoolValue.h"\ + "..\..\..\..\source\gameengine\Expressions\IntValue.h"\ + "..\..\..\..\source\gameengine\Expressions\ListValue.h"\ + "..\..\..\..\source\gameengine\Expressions\PyObjectPlus.h"\ + "..\..\..\..\source\gameengine\Expressions\Value.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IActuator.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ILogicBrick.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IObject.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_LogicManager.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_Camera.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_GameObject.h"\ + "..\..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_CameraData.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_Polygon.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ + "..\..\..\..\source\gameengine\SceneGraph\SG_IObject.h"\ + "..\..\..\..\source\gameengine\SceneGraph\SG_Node.h"\ + "..\..\..\..\source\gameengine\SceneGraph\SG_Spatial.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedPtr.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ + "..\..\..\..\source\sumo\Fuzzics\include\SM_Scene.h"\ + "..\..\..\..\source\sumo\include\solid.h"\ + "..\..\..\..\source\sumo\include\solid_types.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ + "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ + +NODEP_CPP_QTEXA=\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\OpenALScene.h"\ + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.cpp +DEP_CPP_QTKEY=\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.cpp +DEP_CPP_QTOPE=\ + "..\..\..\..\..\qtwin\include\qapplication.h"\ + "..\..\..\..\..\qtwin\include\qarray.h"\ + "..\..\..\..\..\qtwin\include\qasciidict.h"\ + "..\..\..\..\..\qtwin\include\qbrush.h"\ + "..\..\..\..\..\qtwin\include\qcollection.h"\ + "..\..\..\..\..\qtwin\include\qcolor.h"\ + "..\..\..\..\..\qtwin\include\qconfig-large.h"\ + "..\..\..\..\..\qtwin\include\qconfig-medium.h"\ + "..\..\..\..\..\qtwin\include\qconfig-minimal.h"\ + "..\..\..\..\..\qtwin\include\qconfig-small.h"\ + "..\..\..\..\..\qtwin\include\qconfig.h"\ + "..\..\..\..\..\qtwin\include\qcstring.h"\ + "..\..\..\..\..\qtwin\include\qcursor.h"\ + "..\..\..\..\..\qtwin\include\qdatastream.h"\ + "..\..\..\..\..\qtwin\include\qevent.h"\ + "..\..\..\..\..\qtwin\include\qfeatures.h"\ + "..\..\..\..\..\qtwin\include\qfont.h"\ + "..\..\..\..\..\qtwin\include\qfontinfo.h"\ + "..\..\..\..\..\qtwin\include\qfontmetrics.h"\ + "..\..\..\..\..\qtwin\include\qframe.h"\ + "..\..\..\..\..\qtwin\include\qgarray.h"\ + "..\..\..\..\..\qtwin\include\qgdict.h"\ + "..\..\..\..\..\qtwin\include\qgl.h"\ + "..\..\..\..\..\qtwin\include\qglist.h"\ + "..\..\..\..\..\qtwin\include\qglobal.h"\ + "..\..\..\..\..\qtwin\include\qiconset.h"\ + "..\..\..\..\..\qtwin\include\qintdict.h"\ + "..\..\..\..\..\qtwin\include\qiodevice.h"\ + "..\..\..\..\..\qtwin\include\qlist.h"\ + "..\..\..\..\..\qtwin\include\qmenudata.h"\ + "..\..\..\..\..\qtwin\include\qmime.h"\ + "..\..\..\..\..\qtwin\include\qnamespace.h"\ + "..\..\..\..\..\qtwin\include\qobject.h"\ + "..\..\..\..\..\qtwin\include\qobjectdefs.h"\ + "..\..\..\..\..\qtwin\include\qpaintdevice.h"\ + "..\..\..\..\..\qtwin\include\qpalette.h"\ + "..\..\..\..\..\qtwin\include\qpixmap.h"\ + "..\..\..\..\..\qtwin\include\qpoint.h"\ + "..\..\..\..\..\qtwin\include\qpopupmenu.h"\ + "..\..\..\..\..\qtwin\include\qrect.h"\ + "..\..\..\..\..\qtwin\include\qregexp.h"\ + "..\..\..\..\..\qtwin\include\qregion.h"\ + "..\..\..\..\..\qtwin\include\qshared.h"\ + "..\..\..\..\..\qtwin\include\qsignal.h"\ + "..\..\..\..\..\qtwin\include\qsize.h"\ + "..\..\..\..\..\qtwin\include\qsizepolicy.h"\ + "..\..\..\..\..\qtwin\include\qstring.h"\ + "..\..\..\..\..\qtwin\include\qstringlist.h"\ + "..\..\..\..\..\qtwin\include\qstyle.h"\ + "..\..\..\..\..\qtwin\include\qt_windows.h"\ + "..\..\..\..\..\qtwin\include\qtranslator.h"\ + "..\..\..\..\..\qtwin\include\qvaluelist.h"\ + "..\..\..\..\..\qtwin\include\qwidget.h"\ + "..\..\..\..\..\qtwin\include\qwindowdefs.h"\ + "..\..\..\..\..\qtwin\include\qwindowdefs_win.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ + "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.cpp +DEP_CPP_QTSYS=\ + "..\..\..\..\..\qtwin\include\qapplication.h"\ + "..\..\..\..\..\qtwin\include\qarray.h"\ + "..\..\..\..\..\qtwin\include\qasciidict.h"\ + "..\..\..\..\..\qtwin\include\qbrush.h"\ + "..\..\..\..\..\qtwin\include\qcollection.h"\ + "..\..\..\..\..\qtwin\include\qcolor.h"\ + "..\..\..\..\..\qtwin\include\qconfig-large.h"\ + "..\..\..\..\..\qtwin\include\qconfig-medium.h"\ + "..\..\..\..\..\qtwin\include\qconfig-minimal.h"\ + "..\..\..\..\..\qtwin\include\qconfig-small.h"\ + "..\..\..\..\..\qtwin\include\qconfig.h"\ + "..\..\..\..\..\qtwin\include\qcstring.h"\ + "..\..\..\..\..\qtwin\include\qcursor.h"\ + "..\..\..\..\..\qtwin\include\qdatastream.h"\ + "..\..\..\..\..\qtwin\include\qevent.h"\ + "..\..\..\..\..\qtwin\include\qfeatures.h"\ + "..\..\..\..\..\qtwin\include\qfont.h"\ + "..\..\..\..\..\qtwin\include\qfontinfo.h"\ + "..\..\..\..\..\qtwin\include\qfontmetrics.h"\ + "..\..\..\..\..\qtwin\include\qframe.h"\ + "..\..\..\..\..\qtwin\include\qgarray.h"\ + "..\..\..\..\..\qtwin\include\qgdict.h"\ + "..\..\..\..\..\qtwin\include\qgl.h"\ + "..\..\..\..\..\qtwin\include\qglist.h"\ + "..\..\..\..\..\qtwin\include\qglobal.h"\ + "..\..\..\..\..\qtwin\include\qiconset.h"\ + "..\..\..\..\..\qtwin\include\qintdict.h"\ + "..\..\..\..\..\qtwin\include\qiodevice.h"\ + "..\..\..\..\..\qtwin\include\qlist.h"\ + "..\..\..\..\..\qtwin\include\qmenudata.h"\ + "..\..\..\..\..\qtwin\include\qmime.h"\ + "..\..\..\..\..\qtwin\include\qnamespace.h"\ + "..\..\..\..\..\qtwin\include\qobject.h"\ + "..\..\..\..\..\qtwin\include\qobjectdefs.h"\ + "..\..\..\..\..\qtwin\include\qpaintdevice.h"\ + "..\..\..\..\..\qtwin\include\qpalette.h"\ + "..\..\..\..\..\qtwin\include\qpixmap.h"\ + "..\..\..\..\..\qtwin\include\qpoint.h"\ + "..\..\..\..\..\qtwin\include\qpopupmenu.h"\ + "..\..\..\..\..\qtwin\include\qrect.h"\ + "..\..\..\..\..\qtwin\include\qregexp.h"\ + "..\..\..\..\..\qtwin\include\qregion.h"\ + "..\..\..\..\..\qtwin\include\qshared.h"\ + "..\..\..\..\..\qtwin\include\qsignal.h"\ + "..\..\..\..\..\qtwin\include\qsize.h"\ + "..\..\..\..\..\qtwin\include\qsizepolicy.h"\ + "..\..\..\..\..\qtwin\include\qstring.h"\ + "..\..\..\..\..\qtwin\include\qstringlist.h"\ + "..\..\..\..\..\qtwin\include\qstyle.h"\ + "..\..\..\..\..\qtwin\include\qt_windows.h"\ + "..\..\..\..\..\qtwin\include\qtranslator.h"\ + "..\..\..\..\..\qtwin\include\qvaluelist.h"\ + "..\..\..\..\..\qtwin\include\qwidget.h"\ + "..\..\..\..\..\qtwin\include\qwindowdefs.h"\ + "..\..\..\..\..\qtwin\include\qwindowdefs_win.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\abstract.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\bufferobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\ceval.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\classobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\cobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\complexobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\config.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\dictobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\fileobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\floatobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\funcobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\import.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\intrcheck.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\listobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\longobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\methodobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\modsupport.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\moduleobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\mymalloc.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\myproto.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\object.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\objimpl.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\patchlevel.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pydebug.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyerrors.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pyfpe.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pystate.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\Python.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\pythonrun.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\rangeobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sliceobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\stringobject.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\sysmodule.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\traceback.h"\ + "..\..\..\..\..\lib\windows\python\include\python1.5\tupleobject.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_IInputDevice.h"\ + "..\..\..\..\source\gameengine\GameLogic\SCA_ISystem.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h"\ + "..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h"\ + "..\..\..\..\source\gameengine\Network\NG_NetworkScene.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h"\ + "..\..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_HashedString.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_Matrix4x4.h"\ + "..\..\..\..\source\kernel\gen_system\GEN_StdString.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Map.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_MinMax.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Optimize.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_random.h"\ + "..\..\..\..\..\lib\windows\moto\include\GEN_Stream.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_assert.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Matrix3x3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Point3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Quaternion.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Scalar.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Transform.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Tuple4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector2.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector3.inl"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.h"\ + "..\..\..\..\..\lib\windows\moto\include\MT_Vector4.inl"\ + "..\..\..\..\..\lib\windows\moto\include\NM_Scalar.h"\ + +NODEP_CPP_QTSYS=\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\BKE_bad_level_calls.h"\ + "..\..\..\..\source\gameengine\GamePlayer\Qt\BLO_readfile.h"\ + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\DebugActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP_Init.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtExampleEngine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtKeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtOpenGLWidget.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtRenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\QtSystem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\resource.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\SamplePolygonMaterial.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\Qt\GP.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/gameplayer/qt/qtgp.dsw b/projectfiles/gameengine/gameplayer/qt/qtgp.dsw index 22d9c5db23c..aac0b0f2423 100644 --- a/projectfiles/gameengine/gameplayer/qt/qtgp.dsw +++ b/projectfiles/gameengine/gameplayer/qt/qtgp.dsw @@ -1,323 +1,323 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "BLO_loader"=..\..\..\blender\loader\BLO_loader.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "EXP_expressions"=..\..\expression\EXP_expressions.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SCA_GameLogic"=..\..\gamelogic\SCA_GameLogic.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "KX_ketsji"=..\..\ketsji\KX_ketsji.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "KX_network"=..\..\ketsji\network\KX_network.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SG_SceneGraph"=..\..\scenegraph\SG_SceneGraph.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "NG_loopbacknetwork"=..\..\network\loopbacknetwork\NG_loopbacknetwork.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "NG_network"=..\..\network\network\NG_network.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "RAS_openglrasterizer"=..\..\rasterizer\openglrasterizer\RAS_openglrasterizer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "RAS_rasterizer"=..\..\rasterizer\RAS_rasterizer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SM_fuzzics"=..\..\..\sumo\fuzzics\SM_fuzzics.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SM_moto"=..\..\..\sumo\moto\SM_moto.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SM_solid"=..\..\..\sumo\solid\SM_solid.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SND_openal"=..\..\sound\openal\SND_openal.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SND_sound"=..\..\sound\SND_sound.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "SYS_system"=..\..\..\kernel\system\SYS_system.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "gp"=.\gp.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name EXP_expressions - End Project Dependency - Begin Project Dependency - Project_Dep_Name SCA_GameLogic - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_ketsji - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name SG_SceneGraph - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_loopbacknetwork - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_openglrasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_rasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name SM_fuzzics - End Project Dependency - Begin Project Dependency - Project_Dep_Name SM_moto - End Project Dependency - Begin Project Dependency - Project_Dep_Name SM_solid - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_openal - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_sound - End Project Dependency - Begin Project Dependency - Project_Dep_Name SYS_system - End Project Dependency -}}} - -############################################################################### - -Project: "gpplugin"=.\gpplugin.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name EXP_expressions - End Project Dependency - Begin Project Dependency - Project_Dep_Name SCA_GameLogic - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_ketsji - End Project Dependency - Begin Project Dependency - Project_Dep_Name KX_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name SG_SceneGraph - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_loopbacknetwork - End Project Dependency - Begin Project Dependency - Project_Dep_Name NG_network - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_openglrasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name RAS_rasterizer - End Project Dependency - Begin Project Dependency - Project_Dep_Name SM_fuzzics - End Project Dependency - Begin Project Dependency - Project_Dep_Name SM_moto - End Project Dependency - Begin Project Dependency - Project_Dep_Name SM_solid - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_openal - End Project Dependency - Begin Project Dependency - Project_Dep_Name SND_sound - End Project Dependency - Begin Project Dependency - Project_Dep_Name SYS_system - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BLO_loader"=..\..\..\blender\loader\BLO_loader.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "EXP_expressions"=..\..\expression\EXP_expressions.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SCA_GameLogic"=..\..\gamelogic\SCA_GameLogic.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "KX_ketsji"=..\..\ketsji\KX_ketsji.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "KX_network"=..\..\ketsji\network\KX_network.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SG_SceneGraph"=..\..\scenegraph\SG_SceneGraph.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NG_loopbacknetwork"=..\..\network\loopbacknetwork\NG_loopbacknetwork.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NG_network"=..\..\network\network\NG_network.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RAS_openglrasterizer"=..\..\rasterizer\openglrasterizer\RAS_openglrasterizer.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RAS_rasterizer"=..\..\rasterizer\RAS_rasterizer.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SM_fuzzics"=..\..\..\sumo\fuzzics\SM_fuzzics.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SM_moto"=..\..\..\sumo\moto\SM_moto.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SM_solid"=..\..\..\sumo\solid\SM_solid.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SND_openal"=..\..\sound\openal\SND_openal.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SND_sound"=..\..\sound\SND_sound.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SYS_system"=..\..\..\kernel\system\SYS_system.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "gp"=.\gp.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name EXP_expressions + End Project Dependency + Begin Project Dependency + Project_Dep_Name SCA_GameLogic + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_ketsji + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name SG_SceneGraph + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_loopbacknetwork + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_openglrasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_rasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name SM_fuzzics + End Project Dependency + Begin Project Dependency + Project_Dep_Name SM_moto + End Project Dependency + Begin Project Dependency + Project_Dep_Name SM_solid + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_openal + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_sound + End Project Dependency + Begin Project Dependency + Project_Dep_Name SYS_system + End Project Dependency +}}} + +############################################################################### + +Project: "gpplugin"=.\gpplugin.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name EXP_expressions + End Project Dependency + Begin Project Dependency + Project_Dep_Name SCA_GameLogic + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_ketsji + End Project Dependency + Begin Project Dependency + Project_Dep_Name KX_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name SG_SceneGraph + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_loopbacknetwork + End Project Dependency + Begin Project Dependency + Project_Dep_Name NG_network + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_openglrasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name RAS_rasterizer + End Project Dependency + Begin Project Dependency + Project_Dep_Name SM_fuzzics + End Project Dependency + Begin Project Dependency + Project_Dep_Name SM_moto + End Project Dependency + Begin Project Dependency + Project_Dep_Name SM_solid + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_openal + End Project Dependency + Begin Project Dependency + Project_Dep_Name SND_sound + End Project Dependency + Begin Project Dependency + Project_Dep_Name SYS_system + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/projectfiles/gameengine/gameplayer/sdl/GP_sdl.dsp b/projectfiles/gameengine/gameplayer/sdl/GP_sdl.dsp index 56c758de7e9..a3a1c226d61 100644 --- a/projectfiles/gameengine/gameplayer/sdl/GP_sdl.dsp +++ b/projectfiles/gameengine/gameplayer/sdl/GP_sdl.dsp @@ -1,205 +1,205 @@ -# Microsoft Developer Studio Project File - Name="GP_sdl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=GP_sdl - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GP_sdl.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GP_sdl.mak" CFG="GP_sdl - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GP_sdl - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_sdl - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "GP_sdl - Win32 Profile" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GP_sdl - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\sdl" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 sdl.lib sdlmain.lib kernel32.lib winspool.lib comdlg32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" - -!ELSEIF "$(CFG)" == "GP_sdl - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\sdl\debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib sdlmaindebug.lib sdldebug.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" - -!ELSEIF "$(CFG)" == "GP_sdl - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "GP_sdl___Win32_Profile" -# PROP BASE Intermediate_Dir "GP_sdl___Win32_Profile" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "GP_sdl___Win32_Profile" -# PROP Intermediate_Dir "GP_sdl___Win32_Profile" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 glu32.lib sdlmaindebug.lib sdldebug.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" -# ADD LINK32 glu32.lib sdlmaindebug.lib sdldebug.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" - -!ENDIF - -# Begin Target - -# Name "GP_sdl - Win32 Release" -# Name "GP_sdl - Win32 Debug" -# Name "GP_sdl - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\main.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLKeyboardDevice.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLRenderTools.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLSystem.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLCanvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLInputDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLKeyboardDevice.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLRenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLSystem.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\alc\ALc.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\alu\ALu.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\alut\ALut.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alBuffer.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alEax.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alError.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alExtension.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alListener.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alSource.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alState.obj -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\OpenAL32.obj -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GP_sdl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=GP_sdl - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GP_sdl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GP_sdl.mak" CFG="GP_sdl - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GP_sdl - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_sdl - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "GP_sdl - Win32 Profile" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GP_sdl - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\sdl" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 sdl.lib sdlmain.lib kernel32.lib winspool.lib comdlg32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" + +!ELSEIF "$(CFG)" == "GP_sdl - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\gameplayer\sdl\debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glu32.lib sdlmaindebug.lib sdldebug.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" + +!ELSEIF "$(CFG)" == "GP_sdl - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "GP_sdl___Win32_Profile" +# PROP BASE Intermediate_Dir "GP_sdl___Win32_Profile" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "GP_sdl___Win32_Profile" +# PROP Intermediate_Dir "GP_sdl___Win32_Profile" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\gameengine\network\loopbacknetwork" /I "..\..\..\..\source\gameengine\gameplayer\common" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\gamelogic" /I "..\..\..\..\source\gameengine\Rasterizer" /I "..\..\..\..\source\sumo\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\sumo\Fuzzics\include" /I "..\..\..\..\..\lib\windows\sdl\SDL-1.1.7\include" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 glu32.lib sdlmaindebug.lib sdldebug.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" +# ADD LINK32 glu32.lib sdlmaindebug.lib sdldebug.lib opengl32.lib user32.lib gdi32.lib advapi32.lib dxguid.lib ole32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\..\lib\windows\sdl\sdl-1.1.7\lib" /libpath:"..\..\..\..\..\lib\windows\python\lib" /libpath:"..\..\..\..\..\lib\windows\openal\lib\lib_release" + +!ENDIF + +# Begin Target + +# Name "GP_sdl - Win32 Release" +# Name "GP_sdl - Win32 Debug" +# Name "GP_sdl - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\main.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLKeyboardDevice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLRenderTools.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLSystem.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLCanvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLInputDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLKeyboardDevice.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLRenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\GamePlayer\SDL\SDLSystem.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\alc\ALc.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\alu\ALu.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\alut\ALut.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alBuffer.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alEax.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alError.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alExtension.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alListener.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alSource.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\alState.obj +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\lib\windows\openal\lib\OpenAL32\OpenAL32.obj +# End Source File +# End Target +# End Project diff --git a/projectfiles/gameengine/ketsji/KX_ketsji.dsp b/projectfiles/gameengine/ketsji/KX_ketsji.dsp index b7139d01bc3..8c4370d9c9a 100644 --- a/projectfiles/gameengine/ketsji/KX_ketsji.dsp +++ b/projectfiles/gameengine/ketsji/KX_ketsji.dsp @@ -1,690 +1,690 @@ -# Microsoft Developer Studio Project File - Name="KX_ketsji" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=KX_ketsji - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "KX_ketsji.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "KX_ketsji.mak" CFG="KX_ketsji - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "KX_ketsji - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_ketsji - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_ketsji - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_ketsji - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "KX_ketsji - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\Converter" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /I "..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\source\blender\blenlib" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /D "USE_SUMO_SOLID" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_ketsji - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\Converter" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /I "..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\source\blender\blenlib" /D "JANCODEPANCO" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /D "USE_SUMO_SOLID" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_ketsji - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "KX_ketsji___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "KX_ketsji___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\ketsji\debug\KX_ketsji.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_ketsji - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "KX_ketsji___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "KX_ketsji___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\ketsji\KX_ketsji.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "KX_ketsji - Win32 Release" -# Name "KX_ketsji - Win32 Debug" -# Name "KX_ketsji - Win32 MT DLL Debug" -# Name "KX_ketsji - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Group "ActuatorsImp" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_CDActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IpoActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_AddObjectActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_EndObjectActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_ReplaceMeshActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SceneActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SoundActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TrackToActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_VisibilityActuator.cpp -# End Source File -# End Group -# Begin Group "SG_ControllersImp" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraIpoSGController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPO_SGController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_LightIpoSGController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObColorIpoSGController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldIpoController.cpp -# End Source File -# End Group -# Begin Group "SensorsImp" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MouseFocusSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_NearSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RadarSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RaySensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchSensor.cpp -# End Source File -# End Group -# Begin Group "IposImp" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_OrientationInterpolator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PositionInterpolator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalarInterpolator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalingInterpolator.cpp -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\BL_Material.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\BL_Shader.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\BL_Texture.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_BlenderMaterial.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_BulletPhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_Camera.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_EmptyObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_KetsjiEngine.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_Light.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MaterialIpoController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MeshProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MotionState.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_OdePhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PhysicsObjectWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PolygonMaterial.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyConstraintBinding.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyMath.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PythonInit.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayCast.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayEventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_Scene.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_BoneParentNodeRelationship.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_NodeRelationships.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SumoPhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeCategoryLogger.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeLogger.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchEventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_VehicleWrapper.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_VertexProxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldInfo.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "Actuators" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_CDActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IpoActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_AddObjectActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_EndObjectActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_ReplaceMeshActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SceneActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SoundActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TrackToActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_VisibilityActuator.h -# End Source File -# End Group -# Begin Group "SG_Controllers" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraIpoSGController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPO_SGController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_LightIpoSGController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObColorIpoSGController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldIpoController.h -# End Source File -# End Group -# Begin Group "Sensors" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MouseFocusSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_NearSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RadarSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RaySensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchSensor.h -# End Source File -# End Group -# Begin Group "Ipos" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IInterpolator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IScalarInterpolator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_OrientationInterpolator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PositionInterpolator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalarInterpolator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalingInterpolator.h -# End Source File -# End Group -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\BL_Material.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\BL_Shader.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\BL_Texture.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_BlenderMaterial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_BulletPhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_Camera.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintWrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConvertPhysicsObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_EmptyObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPOTransform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ISceneConverter.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_ISystem.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_KetsjiEngine.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_Light.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MaterialIpoController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MeshProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_MotionState.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_OdePhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PhysicsObjectWrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PolygonMaterial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyConstraintBinding.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyMath.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_PythonInit.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayCast.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayEventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_Scene.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_BoneParentNodeRelationship.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_NodeRelationships.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_SumoPhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeCategoryLogger.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeLogger.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchEventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_VehicleWrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_VertexProxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldInfo.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="KX_ketsji" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=KX_ketsji - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "KX_ketsji.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "KX_ketsji.mak" CFG="KX_ketsji - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "KX_ketsji - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_ketsji - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_ketsji - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_ketsji - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "KX_ketsji - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\Converter" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /I "..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\source\blender\blenlib" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /D "USE_SUMO_SOLID" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_ketsji - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\extern\solid" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\..\lib\windows\soundsystem\include" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\Converter" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\blender\python" /I "..\..\..\source\blender\blenkernel" /I "..\..\..\source\blender\makesdna" /I "..\..\..\source\blender\include" /I "..\..\..\source\blender\imbuf" /I "..\..\..\..\lib\windows\guardedalloc\include" /I "..\..\..\source\gameengine\physics\bullet" /I "..\..\..\extern\bullet\linearmath" /I "..\..\..\extern\bullet\Bulletdynamics" /I "..\..\..\extern\bullet\Bullet" /I "..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer" /I "..\..\..\source\blender\blenlib" /D "JANCODEPANCO" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /D "USE_SUMO_SOLID" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_ketsji - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "KX_ketsji___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "KX_ketsji___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\ketsji\debug\KX_ketsji.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_ketsji - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "KX_ketsji___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "KX_ketsji___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\ketsji\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\source\gameengine\physics\common\dummy" /I "..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\..\lib\windows\moto\include" /I "..\..\..\source\kernel\gen_system" /I "..\..\..\source\gameengine\soundsystem" /I "..\..\..\source\gameengine\rasterizer" /I "..\..\..\source\gameengine\scenegraph" /I "..\..\..\source\gameengine\gamelogic" /I "..\..\..\source\gameengine\expressions" /I "..\..\..\source\sumo\include" /I "..\..\..\source\sumo\fuzzics\include" /I "..\..\..\source\gameengine\network" /I "..\..\..\source\gameengine\ketsji\kxnetwork" /I "..\..\..\source\gameengine\physics" /I "..\..\..\source\gameengine\physics\common" /I "..\..\..\source\gameengine\physics\dummy" /I "..\..\..\source\gameengine\physics\sumo" /I "..\..\..\source\gameengine\physics\sumo\fuzzics\include" /I "..\..\..\source\gameengine\physics\sumo\include" /I "..\..\..\source\gameengine\physics\BlOde" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "EXP_PYTHON_EMBEDDING" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\ketsji\KX_ketsji.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "KX_ketsji - Win32 Release" +# Name "KX_ketsji - Win32 Debug" +# Name "KX_ketsji - Win32 MT DLL Debug" +# Name "KX_ketsji - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "ActuatorsImp" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_CDActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IpoActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_AddObjectActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_EndObjectActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_ReplaceMeshActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SceneActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SoundActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TrackToActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_VisibilityActuator.cpp +# End Source File +# End Group +# Begin Group "SG_ControllersImp" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraIpoSGController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPO_SGController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_LightIpoSGController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObColorIpoSGController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldIpoController.cpp +# End Source File +# End Group +# Begin Group "SensorsImp" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MouseFocusSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_NearSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RadarSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RaySensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchSensor.cpp +# End Source File +# End Group +# Begin Group "IposImp" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_OrientationInterpolator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PositionInterpolator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalarInterpolator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalingInterpolator.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\BL_Material.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\BL_Shader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\BL_Texture.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_BlenderMaterial.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_BulletPhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_Camera.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_EmptyObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_KetsjiEngine.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_Light.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MaterialIpoController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MeshProxy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MotionState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_OdePhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PhysicsObjectWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PolygonMaterial.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyConstraintBinding.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyMath.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PythonInit.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayCast.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayEventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_Scene.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_BoneParentNodeRelationship.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_NodeRelationships.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SumoPhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeCategoryLogger.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeLogger.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchEventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_VehicleWrapper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_VertexProxy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldInfo.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "Actuators" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_CDActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IpoActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObjectActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_AddObjectActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_EndObjectActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SCA_ReplaceMeshActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SceneActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SoundActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TrackToActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_VisibilityActuator.h +# End Source File +# End Group +# Begin Group "SG_Controllers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_CameraIpoSGController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPO_SGController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_LightIpoSGController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ObColorIpoSGController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldIpoController.h +# End Source File +# End Group +# Begin Group "Sensors" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MouseFocusSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_NearSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RadarSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RaySensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchSensor.h +# End Source File +# End Group +# Begin Group "Ipos" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IInterpolator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IScalarInterpolator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_OrientationInterpolator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PositionInterpolator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalarInterpolator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ScalingInterpolator.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\BL_Material.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\BL_Shader.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\BL_Texture.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_BlenderMaterial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_BulletPhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_Camera.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConstraintWrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ConvertPhysicsObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_EmptyObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_GameObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_IPOTransform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ISceneConverter.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_ISystem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_KetsjiEngine.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_Light.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MaterialIpoController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MeshProxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_MotionState.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_OdePhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PhysicsObjectWrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PolygonMaterial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyConstraintBinding.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PyMath.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_PythonInit.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayCast.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_RayEventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_Scene.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_BoneParentNodeRelationship.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SG_NodeRelationships.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_SumoPhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeCategoryLogger.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TimeLogger.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_TouchEventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_VehicleWrapper.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_VertexProxy.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Ketsji\KX_WorldInfo.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/ketsji/network/KX_network.dsp b/projectfiles/gameengine/ketsji/network/KX_network.dsp index 0c265e9dd56..7a67a825988 100644 --- a/projectfiles/gameengine/ketsji/network/KX_network.dsp +++ b/projectfiles/gameengine/ketsji/network/KX_network.dsp @@ -1,186 +1,186 @@ -# Microsoft Developer Studio Project File - Name="KX_network" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=KX_network - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "KX_network.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "KX_network.mak" CFG="KX_network - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "KX_network - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_network - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_network - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "KX_network - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "KX_network - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_network - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_network - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "KX_network___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "KX_network___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\ketsji\network\debug\KX_network.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "KX_network - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "KX_network___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "KX_network___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\ketsji\network\KX_network.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "KX_network - Win32 Release" -# Name "KX_network - Win32 Debug" -# Name "KX_network - Win32 MT DLL Debug" -# Name "KX_network - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkEventManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageSensor.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectActuator.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectSensor.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkEventManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageSensor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectActuator.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectSensor.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="KX_network" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=KX_network - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "KX_network.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "KX_network.mak" CFG="KX_network - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "KX_network - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_network - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_network - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "KX_network - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "KX_network - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_network - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\python\include\python2.4" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_network - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "KX_network___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "KX_network___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\..\lib\windows\python\include\python1.5" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "WIN32" /D "_MBCS" /D "_LIB" /U "_DEBUG" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\ketsji\network\debug\KX_network.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "KX_network - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "KX_network___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "KX_network___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\ketsji\network\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /I "..\..\..\..\..\lib\windows\python\include\python2.0" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\python\include\python2.0" /I "..\..\..\..\..\lib\windows\python\include\python2.2" /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\gameengine\ketsji" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\GameLogic" /I "..\..\..\..\source\gameengine\expressions" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\ketsji\network\KX_network.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "KX_network - Win32 Release" +# Name "KX_network - Win32 Debug" +# Name "KX_network - Win32 MT DLL Debug" +# Name "KX_network - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkEventManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageSensor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectActuator.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectSensor.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkEventManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkMessageSensor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectActuator.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Ketsji\KXNetwork\KX_NetworkObjectSensor.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/network/loopbacknetwork/NG_loopbacknetwork.dsp b/projectfiles/gameengine/network/loopbacknetwork/NG_loopbacknetwork.dsp index 08bd4a1326d..30c08933fad 100644 --- a/projectfiles/gameengine/network/loopbacknetwork/NG_loopbacknetwork.dsp +++ b/projectfiles/gameengine/network/loopbacknetwork/NG_loopbacknetwork.dsp @@ -1,155 +1,155 @@ -# Microsoft Developer Studio Project File - Name="NG_loopbacknetwork" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=NG_loopbacknetwork - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "NG_loopbacknetwork.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "NG_loopbacknetwork.mak" CFG="NG_loopbacknetwork - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "NG_loopbacknetwork - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_loopbacknetwork - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_loopbacknetwork - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_loopbacknetwork - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "NG_loopbacknetwork - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_loopbacknetwork - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_loopbacknetwork - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "NG_loopbacknetwork___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "NG_loopbacknetwork___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\debug\NG_loopbacknetwork.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_loopbacknetwork - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "NG_loopbacknetwork___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "NG_loopbacknetwork___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\NG_loopbacknetwork.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "NG_loopbacknetwork - Win32 Release" -# Name "NG_loopbacknetwork - Win32 Debug" -# Name "NG_loopbacknetwork - Win32 MT DLL Debug" -# Name "NG_loopbacknetwork - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="NG_loopbacknetwork" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=NG_loopbacknetwork - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NG_loopbacknetwork.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NG_loopbacknetwork.mak" CFG="NG_loopbacknetwork - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NG_loopbacknetwork - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_loopbacknetwork - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_loopbacknetwork - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_loopbacknetwork - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NG_loopbacknetwork - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_loopbacknetwork - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_loopbacknetwork - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "NG_loopbacknetwork___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "NG_loopbacknetwork___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\debug\NG_loopbacknetwork.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_loopbacknetwork - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NG_loopbacknetwork___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "NG_loopbacknetwork___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\source\gameengine\Network" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\loopbacknetwork\NG_loopbacknetwork.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "NG_loopbacknetwork - Win32 Release" +# Name "NG_loopbacknetwork - Win32 Debug" +# Name "NG_loopbacknetwork - Win32 MT DLL Debug" +# Name "NG_loopbacknetwork - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\LoopBackNetwork\NG_LoopBackNetworkDeviceInterface.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/network/network/NG_network.dsp b/projectfiles/gameengine/network/network/NG_network.dsp index 8c13c01f7e7..ca67963500c 100644 --- a/projectfiles/gameengine/network/network/NG_network.dsp +++ b/projectfiles/gameengine/network/network/NG_network.dsp @@ -1,174 +1,174 @@ -# Microsoft Developer Studio Project File - Name="NG_network" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=NG_network - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "NG_network.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "NG_network.mak" CFG="NG_network - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "NG_network - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_network - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_network - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_network - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "NG_network - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_network - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_network - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "NG_network___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "NG_network___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\network\debug\NG_network.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_network - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "NG_network___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "NG_network___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\network\NG_network.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "NG_network - Win32 Release" -# Name "NG_network - Win32 Debug" -# Name "NG_network - Win32 MT DLL Debug" -# Name "NG_network - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkMessage.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkScene.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkMessage.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkScene.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="NG_network" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=NG_network - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NG_network.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NG_network.mak" CFG="NG_network - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NG_network - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_network - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_network - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_network - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NG_network - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_network - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\..\lib\windows\moto\include" /I "..\..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_network - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "NG_network___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "NG_network___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\network\debug\NG_network.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_network - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NG_network___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "NG_network___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\network\network\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\network\NG_network.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "NG_network - Win32 Release" +# Name "NG_network - Win32 Debug" +# Name "NG_network - Win32 MT DLL Debug" +# Name "NG_network - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkMessage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkScene.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkDeviceInterface.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkMessage.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\NG_NetworkScene.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/network/terraplaynetwork/NG_terraplaynetwork.dsp b/projectfiles/gameengine/network/terraplaynetwork/NG_terraplaynetwork.dsp index ce407eda0f7..6653783bcae 100644 --- a/projectfiles/gameengine/network/terraplaynetwork/NG_terraplaynetwork.dsp +++ b/projectfiles/gameengine/network/terraplaynetwork/NG_terraplaynetwork.dsp @@ -1,180 +1,180 @@ -# Microsoft Developer Studio Project File - Name="NG_terraplaynetwork" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=NG_terraplaynetwork - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "NG_terraplaynetwork.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "NG_terraplaynetwork.mak" CFG="NG_terraplaynetwork - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "NG_terraplaynetwork - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_terraplaynetwork - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_terraplaynetwork - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_terraplaynetwork - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "NG_terraplaynetwork - Win32 Profile" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "NG_terraplaynetwork - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\NG_terraplaynetwork.lib" - -!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug\NG_terraplaynetwork.lib" - -!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "NG_terraplaynetwork___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "NG_terraplaynetwork___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug\NG_terraplaynetwork.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "NG_terraplaynetwork___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "NG_terraplaynetwork___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\NG_terraplaynetwork.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "NG_terraplaynetwork___Win32_Profile" -# PROP BASE Intermediate_Dir "NG_terraplaynetwork___Win32_Profile" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "NG_terraplaynetwork___Win32_Profile" -# PROP Intermediate_Dir "NG_terraplaynetwork___Win32_Profile" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug\NG_terraplaynetwork.lib" -# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\profile\NG_terraplaynetwork.lib" - -!ENDIF - -# Begin Target - -# Name "NG_terraplaynetwork - Win32 Release" -# Name "NG_terraplaynetwork - Win32 Debug" -# Name "NG_terraplaynetwork - Win32 MT DLL Debug" -# Name "NG_terraplaynetwork - Win32 MT DLL Release" -# Name "NG_terraplaynetwork - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\TerraplayNetwork\NG_TerraplayNetworkDeviceInterface.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Network\TerraplayNetwork\NG_TerraplayNetworkDeviceInterface.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="NG_terraplaynetwork" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=NG_terraplaynetwork - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NG_terraplaynetwork.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NG_terraplaynetwork.mak" CFG="NG_terraplaynetwork - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NG_terraplaynetwork - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_terraplaynetwork - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_terraplaynetwork - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_terraplaynetwork - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "NG_terraplaynetwork - Win32 Profile" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NG_terraplaynetwork - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\NG_terraplaynetwork.lib" + +!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug\NG_terraplaynetwork.lib" + +!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "NG_terraplaynetwork___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "NG_terraplaynetwork___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug\NG_terraplaynetwork.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "NG_terraplaynetwork___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "NG_terraplaynetwork___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\NG_terraplaynetwork.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "NG_terraplaynetwork - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "NG_terraplaynetwork___Win32_Profile" +# PROP BASE Intermediate_Dir "NG_terraplaynetwork___Win32_Profile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "NG_terraplaynetwork___Win32_Profile" +# PROP Intermediate_Dir "NG_terraplaynetwork___Win32_Profile" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\..\source\gameengine\network" /I "..\..\..\..\source\kernel\gen_system" /I "..\..\..\..\..\lib\windows\terraplay\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\debug\NG_terraplaynetwork.lib" +# ADD LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\network\terraplaynetwork\profile\NG_terraplaynetwork.lib" + +!ENDIF + +# Begin Target + +# Name "NG_terraplaynetwork - Win32 Release" +# Name "NG_terraplaynetwork - Win32 Debug" +# Name "NG_terraplaynetwork - Win32 MT DLL Debug" +# Name "NG_terraplaynetwork - Win32 MT DLL Release" +# Name "NG_terraplaynetwork - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\TerraplayNetwork\NG_TerraplayNetworkDeviceInterface.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Network\TerraplayNetwork\NG_TerraplayNetworkDeviceInterface.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.dsp b/projectfiles/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.dsp index 0cc26260fd0..0620baa5d03 100644 --- a/projectfiles/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.dsp +++ b/projectfiles/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.dsp @@ -1,154 +1,154 @@ -# Microsoft Developer Studio Project File - Name="PHY_Dummy" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=PHY_Dummy - Win32 MT DLL Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "PHY_Dummy.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "PHY_Dummy.mak" CFG="PHY_Dummy - Win32 MT DLL Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "PHY_Dummy - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Dummy - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Dummy - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Dummy - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "PHY_Dummy - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Dummy - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Dummy - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "PHY_Dummy___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "PHY_Dummy___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Dummy - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "PHY_Dummy___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "PHY_Dummy___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "PHY_Dummy - Win32 Release" -# Name "PHY_Dummy - Win32 Debug" -# Name "PHY_Dummy - Win32 MT DLL Debug" -# Name "PHY_Dummy - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Dummy\DummyPhysicsEnvironment.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Dummy\DummyPhysicsEnvironment.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="PHY_Dummy" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=PHY_Dummy - Win32 MT DLL Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PHY_Dummy.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PHY_Dummy.mak" CFG="PHY_Dummy - Win32 MT DLL Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PHY_Dummy - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Dummy - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Dummy - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Dummy - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PHY_Dummy - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Dummy - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Dummy - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "PHY_Dummy___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "PHY_Dummy___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Dummy - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "PHY_Dummy___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "PHY_Dummy___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\dummy\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "PHY_Dummy - Win32 Release" +# Name "PHY_Dummy - Win32 Debug" +# Name "PHY_Dummy - Win32 MT DLL Debug" +# Name "PHY_Dummy - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Dummy\DummyPhysicsEnvironment.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Dummy\DummyPhysicsEnvironment.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.dsp b/projectfiles/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.dsp index fef5dbf63f5..9d607db809c 100644 --- a/projectfiles/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.dsp +++ b/projectfiles/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.dsp @@ -1,162 +1,162 @@ -# Microsoft Developer Studio Project File - Name="PHY_Ode" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=PHY_Ode - Win32 MT DLL Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "PHY_Ode.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "PHY_Ode.mak" CFG="PHY_Ode - Win32 MT DLL Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "PHY_Ode - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Ode - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Ode - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Ode - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "PHY_Ode - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Ode - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Ode - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "PHY_Ode___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "PHY_Ode___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../../../../source/ode/include" /I "..\..\..\..\..\..\lib\windows\ode\include" /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "dSINGLE" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Ode - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "PHY_Ode___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "PHY_Ode___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../../lib/windows/ode/include" /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "dSINGLE" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "PHY_Ode - Win32 Release" -# Name "PHY_Ode - Win32 Debug" -# Name "PHY_Ode - Win32 MT DLL Release" -# Name "PHY_Ode - Win32 MT DLL Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsEnvironment.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsEnvironment.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="PHY_Ode" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=PHY_Ode - Win32 MT DLL Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PHY_Ode.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PHY_Ode.mak" CFG="PHY_Ode - Win32 MT DLL Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PHY_Ode - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Ode - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Ode - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Ode - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PHY_Ode - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Ode - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Ode - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "PHY_Ode___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "PHY_Ode___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../../../../source/ode/include" /I "..\..\..\..\..\..\lib\windows\ode\include" /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "dSINGLE" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Ode - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "PHY_Ode___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "PHY_Ode___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\..\obj\windows\gameengine\physics\ode\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../../lib/windows/ode/include" /I "../../../../../source/gameengine/physics/common" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "dSINGLE" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\..\lib\windows\ode\include" /I "..\..\..\..\..\source\gameengine\physics\common" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "PHY_Ode - Win32 Release" +# Name "PHY_Ode - Win32 Debug" +# Name "PHY_Ode - Win32 MT DLL Release" +# Name "PHY_Ode - Win32 MT DLL Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsEnvironment.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\BlOde\OdePhysicsEnvironment.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/physics/PHY_Physics/PHY_Physics.dsp b/projectfiles/gameengine/physics/PHY_Physics/PHY_Physics.dsp index f54875c2c18..bdf4e0f5db5 100644 --- a/projectfiles/gameengine/physics/PHY_Physics/PHY_Physics.dsp +++ b/projectfiles/gameengine/physics/PHY_Physics/PHY_Physics.dsp @@ -1,178 +1,178 @@ -# Microsoft Developer Studio Project File - Name="PHY_Physics" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=PHY_Physics - Win32 MT DLL Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "PHY_Physics.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "PHY_Physics.mak" CFG="PHY_Physics - Win32 MT DLL Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "PHY_Physics - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Physics - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Physics - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Physics - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "PHY_Physics - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GR /GX /O2 /I "common" /I "dummy" /I "../../../../extern/solid/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Physics - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "common" /I "dummy" /I "../../../../extern/solid/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Physics - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "PHY_Physics___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "PHY_Physics___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "common" /I "dummy" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "common" /I "dummy" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "PHY_Physics - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "PHY_Physics___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "PHY_Physics___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /I "common" /I "dummy" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "common" /I "dummy" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "PHY_Physics - Win32 Release" -# Name "PHY_Physics - Win32 Debug" -# Name "PHY_Physics - Win32 MT DLL Debug" -# Name "PHY_Physics - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IMotionState.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsEnvironment.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_DynamicTypes.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IMotionState.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsEnvironment.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_Pro.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="PHY_Physics" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=PHY_Physics - Win32 MT DLL Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PHY_Physics.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PHY_Physics.mak" CFG="PHY_Physics - Win32 MT DLL Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PHY_Physics - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Physics - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Physics - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Physics - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PHY_Physics - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GR /GX /O2 /I "common" /I "dummy" /I "../../../../extern/solid/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Physics - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "common" /I "dummy" /I "../../../../extern/solid/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Physics - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "PHY_Physics___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "PHY_Physics___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "common" /I "dummy" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "common" /I "dummy" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "PHY_Physics - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "PHY_Physics___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "PHY_Physics___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\physics\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /I "common" /I "dummy" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "common" /I "dummy" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "PHY_Physics - Win32 Release" +# Name "PHY_Physics - Win32 Debug" +# Name "PHY_Physics - Win32 MT DLL Debug" +# Name "PHY_Physics - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IMotionState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsEnvironment.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_DynamicTypes.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IMotionState.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_IPhysicsEnvironment.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Physics\common\PHY_Pro.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.dsp b/projectfiles/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.dsp index 8f148363add..1a9f6e98201 100644 --- a/projectfiles/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.dsp +++ b/projectfiles/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.dsp @@ -1,162 +1,162 @@ -# Microsoft Developer Studio Project File - Name="PHY_Sumo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=PHY_Sumo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "PHY_Sumo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "PHY_Sumo.mak" CFG="PHY_Sumo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "PHY_Sumo - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "PHY_Sumo - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "PHY_Sumo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "../../../../../extern/solid" /I "../../../../../source/gameengine/physics" /I "../../../../../source/gameengine/physics/common" /I "../../../../../source/gameengine/physics/sumo" /I "../../../../../source/gameengine/physics/sumo/include" /I "../../../../../source/gameengine/physics/sumo/fuzzics/include" /I "../../../../../../lib/windows/Moto/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\gameengine\physics\sumo\PHY_Sumo.lib" - -!ELSEIF "$(CFG)" == "PHY_Sumo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../../../../../extern/solid" /I "../../../../../source/gameengine/physics" /I "../../../../../source/gameengine/physics/common" /I "../../../../../source/gameengine/physics/sumo" /I "../../../../../source/gameengine/physics/sumo/include" /I "../../../../../source/gameengine/physics/sumo/fuzzics/include" /I "../../../../../../lib/windows/Moto/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\gameengine\physics\sumo\debug\PHY_Sumo.lib" - -!ENDIF - -# Begin Target - -# Name "PHY_Sumo - Win32 Release" -# Name "PHY_Sumo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_FhObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_MotionState.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Object.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Scene.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPHYCallbackBridge.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsController.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsEnvironment.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Callback.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_ClientObjectInfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_FhObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_MotionState.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Object.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Props.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Scene.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPHYCallbackBridge.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsController.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsEnvironment.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="PHY_Sumo" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=PHY_Sumo - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PHY_Sumo.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PHY_Sumo.mak" CFG="PHY_Sumo - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PHY_Sumo - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "PHY_Sumo - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PHY_Sumo - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "../../../../../extern/solid" /I "../../../../../source/gameengine/physics" /I "../../../../../source/gameengine/physics/common" /I "../../../../../source/gameengine/physics/sumo" /I "../../../../../source/gameengine/physics/sumo/include" /I "../../../../../source/gameengine/physics/sumo/fuzzics/include" /I "../../../../../../lib/windows/Moto/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\gameengine\physics\sumo\PHY_Sumo.lib" + +!ELSEIF "$(CFG)" == "PHY_Sumo - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../../../../../extern/solid" /I "../../../../../source/gameengine/physics" /I "../../../../../source/gameengine/physics/common" /I "../../../../../source/gameengine/physics/sumo" /I "../../../../../source/gameengine/physics/sumo/include" /I "../../../../../source/gameengine/physics/sumo/fuzzics/include" /I "../../../../../../lib/windows/Moto/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\gameengine\physics\sumo\debug\PHY_Sumo.lib" + +!ENDIF + +# Begin Target + +# Name "PHY_Sumo - Win32 Release" +# Name "PHY_Sumo - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_FhObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_MotionState.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Object.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Scene.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPHYCallbackBridge.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsController.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsEnvironment.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Callback.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_ClientObjectInfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_FhObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_MotionState.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Object.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Props.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Scene.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPHYCallbackBridge.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsController.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\source\gameengine\Physics\Sumo\SumoPhysicsEnvironment.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/rasterizer/RAS_rasterizer.dsp b/projectfiles/gameengine/rasterizer/RAS_rasterizer.dsp index c764823632e..bb960e95969 100644 --- a/projectfiles/gameengine/rasterizer/RAS_rasterizer.dsp +++ b/projectfiles/gameengine/rasterizer/RAS_rasterizer.dsp @@ -1,243 +1,243 @@ -# Microsoft Developer Studio Project File - Name="RAS_rasterizer" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=RAS_rasterizer - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "RAS_rasterizer.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "RAS_rasterizer.mak" CFG="RAS_rasterizer - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "RAS_rasterizer - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "RAS_rasterizer - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "RAS_rasterizer - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "RAS_rasterizer - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "RAS_rasterizer - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "RAS_rasterizer - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "RAS_rasterizer - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "RAS_rasterizer___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "RAS_rasterizer___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "../../../../lib/windows/moto/include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\rasterizer\debug\RAS_rasterizer.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "RAS_rasterizer - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "RAS_rasterizer___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "RAS_rasterizer___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "../../../../lib/windows/moto/include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\rasterizer\RAS_rasterizer.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "RAS_rasterizer - Win32 Release" -# Name "RAS_rasterizer - Win32 Debug" -# Name "RAS_rasterizer - Win32 MT DLL Debug" -# Name "RAS_rasterizer - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_FramingManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_Polygon.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_texmatrix.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_TexVert.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_CameraData.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_Deformer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_FramingManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_LightObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_ObjectColor.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_Polygon.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_TexMatrix.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="RAS_rasterizer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=RAS_rasterizer - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RAS_rasterizer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RAS_rasterizer.mak" CFG="RAS_rasterizer - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RAS_rasterizer - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "RAS_rasterizer - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "RAS_rasterizer - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "RAS_rasterizer - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RAS_rasterizer - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "RAS_rasterizer - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\lib\windows\moto\include\\" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "RAS_rasterizer - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "RAS_rasterizer___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "RAS_rasterizer___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "../../../../lib/windows/moto/include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\rasterizer\debug\RAS_rasterizer.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "RAS_rasterizer - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RAS_rasterizer___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "RAS_rasterizer___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\rasterizer\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "../../../../lib/windows/moto/include" /I "..\..\..\..\lib\windows\string\include" /I "..\..\..\source\kernel\gen_system" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\rasterizer\RAS_rasterizer.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "RAS_rasterizer - Win32 Release" +# Name "RAS_rasterizer - Win32 Debug" +# Name "RAS_rasterizer - Win32 MT DLL Debug" +# Name "RAS_rasterizer - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_FramingManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_Polygon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_texmatrix.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_TexVert.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_BucketManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_CameraData.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_Deformer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_FramingManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_ICanvas.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IPolygonMaterial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IRasterizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_IRenderTools.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_LightObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MaterialBucket.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_MeshObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_ObjectColor.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_Polygon.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_TexMatrix.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Rasterizer\RAS_TexVert.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.dsp b/projectfiles/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.dsp index 1f1b95291ed..8b4cce618d1 100644 --- a/projectfiles/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.dsp +++ b/projectfiles/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.dsp @@ -1,183 +1,183 @@ -# Microsoft Developer Studio Project File - Name="RAS_openglrasterizer" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=RAS_openglrasterizer - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "RAS_openglrasterizer.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "RAS_openglrasterizer.mak" CFG="RAS_openglrasterizer - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "RAS_openglrasterizer - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "RAS_openglrasterizer - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "RAS_openglrasterizer - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "RAS_openglrasterizer - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "RAS_openglrasterizer - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "RAS_openglrasterizer - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "RAS_openglrasterizer - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "RAS_openglrasterizer___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "RAS_openglrasterizer___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\debug\RAS_openglrasterizer.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "RAS_openglrasterizer - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "RAS_openglrasterizer___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "RAS_openglrasterizer___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -MTL=midl.exe -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I ".../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\RAS_openglrasterizer.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "RAS_openglrasterizer - Win32 Release" -# Name "RAS_openglrasterizer - Win32 Debug" -# Name "RAS_openglrasterizer - Win32 MT DLL Debug" -# Name "RAS_openglrasterizer - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_GLExtensionManager.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_ListRasterizer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_OpenGLRasterizer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_VAOpenGLRasterizer.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_GLExtensionManager.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_ListRasterizer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_OpenGLRasterizer.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_VAOpenGLRasterizer.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="RAS_openglrasterizer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=RAS_openglrasterizer - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RAS_openglrasterizer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RAS_openglrasterizer.mak" CFG="RAS_openglrasterizer - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RAS_openglrasterizer - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "RAS_openglrasterizer - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "RAS_openglrasterizer - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "RAS_openglrasterizer - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RAS_openglrasterizer - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "RAS_openglrasterizer - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "RAS_openglrasterizer - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "RAS_openglrasterizer___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "RAS_openglrasterizer___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\debug\RAS_openglrasterizer.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "RAS_openglrasterizer - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "RAS_openglrasterizer___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "RAS_openglrasterizer___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +MTL=midl.exe +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\..\source\kernel\gen_system" /I ".../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\..\lib\windows\string\include" /I "..\..\..\..\source\kernel\gen_system" /I "../../../../../lib/windows/moto/include" /I "..\..\..\..\source\gameengine\Rasterizer" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\..\obj\windows\gameengine\rasterizer\openglrasterizer\RAS_openglrasterizer.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "RAS_openglrasterizer - Win32 Release" +# Name "RAS_openglrasterizer - Win32 Debug" +# Name "RAS_openglrasterizer - Win32 MT DLL Debug" +# Name "RAS_openglrasterizer - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_GLExtensionManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_ListRasterizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_OpenGLRasterizer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_VAOpenGLRasterizer.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_GLExtensionManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_ListRasterizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_OpenGLRasterizer.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer\RAS_VAOpenGLRasterizer.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/gameengine/scenegraph/SG_scenegraph.dsp b/projectfiles/gameengine/scenegraph/SG_scenegraph.dsp index 5a2b4c8cba3..72777059b50 100644 --- a/projectfiles/gameengine/scenegraph/SG_scenegraph.dsp +++ b/projectfiles/gameengine/scenegraph/SG_scenegraph.dsp @@ -1,199 +1,199 @@ -# Microsoft Developer Studio Project File - Name="SG_SceneGraph" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SG_SceneGraph - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SG_SceneGraph.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SG_SceneGraph.mak" CFG="SG_SceneGraph - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SG_SceneGraph - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SG_SceneGraph - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SG_SceneGraph - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SG_SceneGraph - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SG_SceneGraph - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SG_SceneGraph - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SG_SceneGraph - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SG_SceneGraph___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SG_SceneGraph___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\scenegraph\debug\SG_SceneGraph.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SG_SceneGraph - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SG_SceneGraph___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SG_SceneGraph___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\scenegraph\SG_SceneGraph.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "SG_SceneGraph - Win32 Release" -# Name "SG_SceneGraph - Win32 Debug" -# Name "SG_SceneGraph - Win32 MT DLL Debug" -# Name "SG_SceneGraph - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_BBox.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Controller.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_IObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Node.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Spatial.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Tree.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_BBox.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Controller.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_IObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Node.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_ParentRelation.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Spatial.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Tree.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SG_SceneGraph" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SG_SceneGraph - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SG_SceneGraph.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SG_SceneGraph.mak" CFG="SG_SceneGraph - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SG_SceneGraph - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SG_SceneGraph - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SG_SceneGraph - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SG_SceneGraph - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SG_SceneGraph - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SG_SceneGraph - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SG_SceneGraph - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SG_SceneGraph___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SG_SceneGraph___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\scenegraph\debug\SG_SceneGraph.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SG_SceneGraph - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SG_SceneGraph___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SG_SceneGraph___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\scenegraph\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\scenegraph\SG_SceneGraph.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "SG_SceneGraph - Win32 Release" +# Name "SG_SceneGraph - Win32 Debug" +# Name "SG_SceneGraph - Win32 MT DLL Debug" +# Name "SG_SceneGraph - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_BBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Controller.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_IObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Node.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Spatial.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Tree.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_BBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Controller.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_IObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Node.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_ParentRelation.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Spatial.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\SceneGraph\SG_Tree.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/kernel/gen_messaging/gen_messaging.dsp b/projectfiles/kernel/gen_messaging/gen_messaging.dsp index 578f8971122..8aebbedecde 100644 --- a/projectfiles/kernel/gen_messaging/gen_messaging.dsp +++ b/projectfiles/kernel/gen_messaging/gen_messaging.dsp @@ -1,155 +1,155 @@ -# Microsoft Developer Studio Project File - Name="gen_messaging" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=gen_messaging - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gen_messaging.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gen_messaging.mak" CFG="gen_messaging - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gen_messaging - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "gen_messaging - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "gen_messaging - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "gen_messaging - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gen_messaging - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging" -# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "gen_messaging - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "gen_messaging - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "gen_messaging___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "gen_messaging___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "gen_messaging - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "gen_messaging___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "gen_messaging___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "gen_messaging - Win32 Release" -# Name "gen_messaging - Win32 Debug" -# Name "gen_messaging - Win32 MT DLL Release" -# Name "gen_messaging - Win32 MT DLL Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_messaging\intern\messaging.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_messaging\GEN_messaging.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="gen_messaging" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=gen_messaging - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "gen_messaging.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "gen_messaging.mak" CFG="gen_messaging - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "gen_messaging - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "gen_messaging - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "gen_messaging - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "gen_messaging - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "gen_messaging - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging" +# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "gen_messaging - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "gen_messaging - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "gen_messaging___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "gen_messaging___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "gen_messaging - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "gen_messaging___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "gen_messaging___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\kernel\gen_messaging\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\source\kernel\gen_messaging" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "gen_messaging - Win32 Release" +# Name "gen_messaging - Win32 Debug" +# Name "gen_messaging - Win32 MT DLL Release" +# Name "gen_messaging - Win32 MT DLL Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_messaging\intern\messaging.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_messaging\GEN_messaging.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/kernel/system/SYS_system.dsp b/projectfiles/kernel/system/SYS_system.dsp index b424839e4ba..c5b66202f9c 100644 --- a/projectfiles/kernel/system/SYS_system.dsp +++ b/projectfiles/kernel/system/SYS_system.dsp @@ -1,183 +1,183 @@ -# Microsoft Developer Studio Project File - Name="SYS_system" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SYS_system - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SYS_system.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SYS_system.mak" CFG="SYS_system - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SYS_system - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SYS_system - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SYS_system - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SYS_system - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SYS_system - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SYS_system - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SYS_system - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SYS_system___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SYS_system___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /MDd /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\kernel\gen_system\debug\SYS_system.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SYS_system - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SYS_system___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SYS_system___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\kernel\gen_system\SYS_system.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "SYS_system - Win32 Release" -# Name "SYS_system - Win32 Debug" -# Name "SYS_system - Win32 MT DLL Debug" -# Name "SYS_system - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\GEN_HashedPtr.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\SYS_SingletonSystem.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\SYS_System.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\GEN_DataCache.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\GEN_HashedPtr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\GEN_Map.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\GEN_SmartPtr.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\SYS_SingletonSystem.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\kernel\gen_system\SYS_System.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SYS_system" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SYS_system - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SYS_system.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SYS_system.mak" CFG="SYS_system - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SYS_system - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SYS_system - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SYS_system - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SYS_system - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SYS_system - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SYS_system - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SYS_system - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SYS_system___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SYS_system___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /MDd /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\kernel\gen_system\debug\SYS_system.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SYS_system - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SYS_system___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SYS_system___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\gameengine\kernel\gen_system\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\..\lib\windows\string\include" /I "../../../../../lib/windows/moto/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\gameengine\kernel\gen_system\SYS_system.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "SYS_system - Win32 Release" +# Name "SYS_system - Win32 Debug" +# Name "SYS_system - Win32 MT DLL Debug" +# Name "SYS_system - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\GEN_HashedPtr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\SYS_SingletonSystem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\SYS_System.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\GEN_DataCache.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\GEN_HashedPtr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\GEN_Map.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\GEN_SmartPtr.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\SYS_SingletonSystem.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\kernel\gen_system\SYS_System.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/sumo/fuzzics/SM_fuzzics.dsp b/projectfiles/sumo/fuzzics/SM_fuzzics.dsp index c415810d2c9..8804fdcb796 100644 --- a/projectfiles/sumo/fuzzics/SM_fuzzics.dsp +++ b/projectfiles/sumo/fuzzics/SM_fuzzics.dsp @@ -1,216 +1,216 @@ -# Microsoft Developer Studio Project File - Name="SM_fuzzics" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SM_fuzzics - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SM_fuzzics.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SM_fuzzics.mak" CFG="SM_fuzzics - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SM_fuzzics - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_fuzzics - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_fuzzics - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_fuzzics - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_fuzzics - Win32 Profile" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SM_fuzzics - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\sumo\fuzzics" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\fuzzics" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "../../../extern/solid" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\sumo\fuzzics\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\fuzzics\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\source\gameengine\physics\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "../../../extern/solid" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_fuzzics___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SM_fuzzics___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\fuzzics\debug\SM_fuzzics.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SM_fuzzics___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SM_fuzzics___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\fuzzics\SM_fuzzics.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_fuzzics___Win32_Profile" -# PROP BASE Intermediate_Dir "SM_fuzzics___Win32_Profile" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "SM_fuzzics___Win32_Profile" -# PROP Intermediate_Dir "SM_fuzzics___Win32_Profile" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\fuzzics\debug\SM_fuzzics.lib" -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\fuzzics\profile\SM_fuzzics.lib" - -!ENDIF - -# Begin Target - -# Name "SM_fuzzics - Win32 Release" -# Name "SM_fuzzics - Win32 Debug" -# Name "SM_fuzzics - Win32 MT DLL Debug" -# Name "SM_fuzzics - Win32 MT DLL Release" -# Name "SM_fuzzics - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_FhObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Object.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Scene.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Callback.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_ClientObjectInfo.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Debug.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_FhObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_MotionState.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Object.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Props.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Scene.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SM_fuzzics" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SM_fuzzics - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SM_fuzzics.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SM_fuzzics.mak" CFG="SM_fuzzics - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SM_fuzzics - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_fuzzics - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_fuzzics - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_fuzzics - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_fuzzics - Win32 Profile" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SM_fuzzics - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\sumo\fuzzics" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\fuzzics" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "../../../extern/solid" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\sumo\fuzzics\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\fuzzics\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /Zi /Od /I "..\..\..\source\gameengine\physics\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "../../../extern/solid" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_fuzzics___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SM_fuzzics___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\fuzzics\debug\SM_fuzzics.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SM_fuzzics___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SM_fuzzics___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\fuzzics\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\fuzzics\SM_fuzzics.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_fuzzics - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_fuzzics___Win32_Profile" +# PROP BASE Intermediate_Dir "SM_fuzzics___Win32_Profile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "SM_fuzzics___Win32_Profile" +# PROP Intermediate_Dir "SM_fuzzics___Win32_Profile" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\Fuzzics\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\fuzzics\debug\SM_fuzzics.lib" +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\fuzzics\profile\SM_fuzzics.lib" + +!ENDIF + +# Begin Target + +# Name "SM_fuzzics - Win32 Release" +# Name "SM_fuzzics - Win32 Debug" +# Name "SM_fuzzics - Win32 MT DLL Debug" +# Name "SM_fuzzics - Win32 MT DLL Release" +# Name "SM_fuzzics - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_FhObject.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Object.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\src\SM_Scene.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Callback.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_ClientObjectInfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Debug.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_FhObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_MotionState.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Object.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Props.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\gameengine\Physics\Sumo\Fuzzics\include\SM_Scene.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/sumo/moto/SM_moto.dsp b/projectfiles/sumo/moto/SM_moto.dsp index 3fd627ce60d..0a27fad5a0d 100644 --- a/projectfiles/sumo/moto/SM_moto.dsp +++ b/projectfiles/sumo/moto/SM_moto.dsp @@ -1,332 +1,332 @@ -# Microsoft Developer Studio Project File - Name="SM_moto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SM_moto - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SM_moto.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SM_moto.mak" CFG="SM_moto - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SM_moto - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 Profile" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SM_moto - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" - -!ELSEIF "$(CFG)" == "SM_moto - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" - -!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_moto - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_moto___Win32_Profile" -# PROP BASE Intermediate_Dir "SM_moto___Win32_Profile" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "SM_moto___Win32_Profile" -# PROP Intermediate_Dir "SM_moto___Win32_Profile" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\profile\SM_moto.lib" - -!ENDIF - -# Begin Target - -# Name "SM_moto - Win32 Release" -# Name "SM_moto - Win32 Debug" -# Name "SM_moto - Win32 MT DLL Debug" -# Name "SM_moto - Win32 MT DLL Release" -# Name "SM_moto - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_CmMatrix4x4.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix3x3.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix4x4.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Point3.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Quaternion.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_random.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Transform.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector2.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector3.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector4.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\GEN_List.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\GEN_Map.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_assert.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_CmMatrix4x4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_MinMax.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Optimize.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_random.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Scalar.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Stream.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Transform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\NM_Scalar.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SM_moto" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SM_moto - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SM_moto.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SM_moto.mak" CFG="SM_moto - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SM_moto - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 Profile" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SM_moto - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" + +!ELSEIF "$(CFG)" == "SM_moto - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" + +!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_moto - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_moto___Win32_Profile" +# PROP BASE Intermediate_Dir "SM_moto___Win32_Profile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "SM_moto___Win32_Profile" +# PROP Intermediate_Dir "SM_moto___Win32_Profile" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\profile\SM_moto.lib" + +!ENDIF + +# Begin Target + +# Name "SM_moto - Win32 Release" +# Name "SM_moto - Win32 Debug" +# Name "SM_moto - Win32 MT DLL Debug" +# Name "SM_moto - Win32 MT DLL Release" +# Name "SM_moto - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_CmMatrix4x4.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix3x3.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix4x4.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Point3.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Quaternion.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_random.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Transform.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector2.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector3.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector4.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\GEN_List.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\GEN_Map.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_assert.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_CmMatrix4x4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_MinMax.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Optimize.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_random.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Scalar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Stream.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Transform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\NM_Scalar.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles/sumo/solid/SM_solid.dsp b/projectfiles/sumo/solid/SM_solid.dsp index dfaa85c35d8..221a72f67ef 100644 --- a/projectfiles/sumo/solid/SM_solid.dsp +++ b/projectfiles/sumo/solid/SM_solid.dsp @@ -1,340 +1,340 @@ -# Microsoft Developer Studio Project File - Name="SM_solid" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SM_solid - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SM_solid.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SM_solid.mak" CFG="SM_solid - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SM_solid - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_solid - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_solid - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_solid - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SM_solid - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /J /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_solid - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\debug\SM_solid.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\SM_solid.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "SM_solid - Win32 Release" -# Name "SM_solid - Win32 Debug" -# Name "SM_solid - Win32 MT DLL Debug" -# Name "SM_solid - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\BBoxTree.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Box.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Complex.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cone.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Convex.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cylinder.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Endpoint.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Proxy.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Scene.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_DoubleBase.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Encounter.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_FloatBase.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_LineSegment.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Object.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_RespTable.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Scene.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polyhedron.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polytope.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Sphere.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\AlgoTable.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\BBoxTree.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Box.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Complex.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cone.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Convex.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cylinder.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_AABBox.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BBox.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Endpoint.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Proxy.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Scene.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_DoubleBase.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Encounter.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_FloatBase.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_LineSegment.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Object.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Response.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_RespTable.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Scene.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBase.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBased.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\IndexArray.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polyhedron.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polytope.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Shape.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Sphere.h" -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SM_solid" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SM_solid - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SM_solid.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SM_solid.mak" CFG="SM_solid - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SM_solid - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_solid - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_solid - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_solid - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SM_solid - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /J /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_solid - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\debug\SM_solid.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\SM_solid.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "SM_solid - Win32 Release" +# Name "SM_solid - Win32 Debug" +# Name "SM_solid - Win32 MT DLL Debug" +# Name "SM_solid - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\BBoxTree.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Box.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Complex.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cone.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Convex.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cylinder.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_C-api.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Endpoint.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Proxy.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Scene.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_C-api.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_DoubleBase.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Encounter.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_FloatBase.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_LineSegment.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Object.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_RespTable.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Scene.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polyhedron.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polytope.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Sphere.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\AlgoTable.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\BBoxTree.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Box.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Complex.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cone.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Convex.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cylinder.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_AABBox.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BBox.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Endpoint.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Proxy.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Scene.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_DoubleBase.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Encounter.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_FloatBase.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_LineSegment.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Object.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Response.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_RespTable.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Scene.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBase.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBased.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\IndexArray.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polyhedron.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polytope.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Shape.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Sphere.h" +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles_vc7/blender/blender.sln b/projectfiles_vc7/blender/blender.sln index eb235531984..c1628614642 100644 --- a/projectfiles_vc7/blender/blender.sln +++ b/projectfiles_vc7/blender/blender.sln @@ -17,6 +17,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj", {138DD16C-CC78-4F6C-A898-C8DA68D89067} = {138DD16C-CC78-4F6C-A898-C8DA68D89067} {415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292} {106AE171-0083-41D6-A949-20DB0E8DC251} = {106AE171-0083-41D6-A949-20DB0E8DC251} + {670EC17A-0548-4BBF-A27B-636C7C188139} = {670EC17A-0548-4BBF-A27B-636C7C188139} {4C3AB78A-52CA-4276-A041-39776E52D8C8} = {4C3AB78A-52CA-4276-A041-39776E52D8C8} {6B801390-5F95-4F07-81A7-97FBA046AACC} = {6B801390-5F95-4F07-81A7-97FBA046AACC} {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} @@ -239,6 +240,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_gpu", "gpu\BL_gpu.vcproj ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TEX_Video", "..\gameengine\videotexture\TEX_Video.vcproj", "{670EC17A-0548-4BBF-A27B-636C7C188139}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution 3D Plugin Debug = 3D Plugin Debug @@ -815,6 +820,18 @@ Global {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Debug.Build.0 = BlenderPlayer Debug|Win32 {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Release.ActiveCfg = BlenderPlayer Release|Win32 {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Release.Build.0 = BlenderPlayer Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3D Plugin Debug.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3D Plugin Release.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Debug.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Debug.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Release.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Release.Build.0 = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Debug.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Debug.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Release.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Release.Build.0 = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Debug.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Release.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/projectfiles_vc7/blender/blender.vcproj b/projectfiles_vc7/blender/blender.vcproj index 26cb3fb79e1..ef6900b7b75 100644 --- a/projectfiles_vc7/blender/blender.vcproj +++ b/projectfiles_vc7/blender/blender.vcproj @@ -124,7 +124,7 @@ ECHO Done Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 " - AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.lib libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25_d.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib Imath.lib IlmImf.lib IlmThread.lib avcodec-51.lib avformat-52.lib avutil-49.lib swscale-0.lib glew.lib" + AdditionalDependencies="SDL.lib freetype2ST.lib ftgl_static.lib gnu_gettext.lib qtmlClient.lib openal_static.lib libsoundsystem.lib libopenalsoundsystem.lib libdummysoundsystem.lib libguardedalloc.lib libbsp.lib libbmfont.lib libghost.lib libstring.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libdecimation.lib libiksolver.lib libpng_st.lib zlib.lib libmoto.lib solid.lib qhull.lib libopennl.lib Bullet.lib python25_d.lib libelbeem.lib libboolop.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib broad.lib complex.lib convex.lib memutil.lib verse.lib Half.lib Iex.lib Imath.lib IlmImf.lib IlmThread.lib avcodec-51.lib avformat-52.lib avdevice-52.lib avutil-49.lib swscale-0.lib glew.lib" ShowProgress="0" OutputFile="..\..\bin\debug\blender.exe" LinkIncremental="2" diff --git a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj index 0dfbcaa5577..aadef58f84a 100644 --- a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj +++ b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj @@ -382,6 +382,9 @@ + + @@ -458,6 +461,9 @@ + + diff --git a/projectfiles_vc7/blender/src/BL_src.vcproj b/projectfiles_vc7/blender/src/BL_src.vcproj index 80694690107..d6e436635cb 100644 --- a/projectfiles_vc7/blender/src/BL_src.vcproj +++ b/projectfiles_vc7/blender/src/BL_src.vcproj @@ -121,6 +121,9 @@ + + diff --git a/projectfiles_vc7/gameengine/videotexture/TEX_Video.vcproj b/projectfiles_vc7/gameengine/videotexture/TEX_Video.vcproj new file mode 100644 index 00000000000..0c35bc62e99 --- /dev/null +++ b/projectfiles_vc7/gameengine/videotexture/TEX_Video.vcproj @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc7/sumo/moto/SM_moto.dsp b/projectfiles_vc7/sumo/moto/SM_moto.dsp index 3fd627ce60d..0a27fad5a0d 100644 --- a/projectfiles_vc7/sumo/moto/SM_moto.dsp +++ b/projectfiles_vc7/sumo/moto/SM_moto.dsp @@ -1,332 +1,332 @@ -# Microsoft Developer Studio Project File - Name="SM_moto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SM_moto - Win32 Profile -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SM_moto.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SM_moto.mak" CFG="SM_moto - Win32 Profile" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SM_moto - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_moto - Win32 Profile" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SM_moto - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" - -!ELSEIF "$(CFG)" == "SM_moto - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" - -!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" -# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_moto - Win32 Profile" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_moto___Win32_Profile" -# PROP BASE Intermediate_Dir "SM_moto___Win32_Profile" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "SM_moto___Win32_Profile" -# PROP Intermediate_Dir "SM_moto___Win32_Profile" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" -# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\profile\SM_moto.lib" - -!ENDIF - -# Begin Target - -# Name "SM_moto - Win32 Release" -# Name "SM_moto - Win32 Debug" -# Name "SM_moto - Win32 MT DLL Debug" -# Name "SM_moto - Win32 MT DLL Release" -# Name "SM_moto - Win32 Profile" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_CmMatrix4x4.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix3x3.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix4x4.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Point3.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Quaternion.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_random.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Transform.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector2.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector3.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector4.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\GEN_List.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\GEN_Map.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_assert.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_CmMatrix4x4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_MinMax.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Optimize.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_random.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Scalar.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Stream.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Transform.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.inl -# End Source File -# Begin Source File - -SOURCE=..\..\..\source\sumo\MoTo\include\NM_Scalar.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SM_moto" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SM_moto - Win32 Profile +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SM_moto.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SM_moto.mak" CFG="SM_moto - Win32 Profile" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SM_moto - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_moto - Win32 Profile" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SM_moto - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\lib\windows\moto\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" + +!ELSEIF "$(CFG)" == "SM_moto - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" + +!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_moto - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SM_moto___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SM_moto___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" +# PROP Intermediate_Dir "..\..\..\..\obj\windows\sumo\moto\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\sumo\MoTo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\moto\SM_moto.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_moto - Win32 Profile" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_moto___Win32_Profile" +# PROP BASE Intermediate_Dir "SM_moto___Win32_Profile" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "SM_moto___Win32_Profile" +# PROP Intermediate_Dir "SM_moto___Win32_Profile" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /O2 /I "..\..\..\source\sumo\MoTo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\debug\SM_moto.lib" +# ADD LIB32 /nologo /out:"..\..\..\..\obj\windows\sumo\moto\profile\SM_moto.lib" + +!ENDIF + +# Begin Target + +# Name "SM_moto - Win32 Release" +# Name "SM_moto - Win32 Debug" +# Name "SM_moto - Win32 MT DLL Debug" +# Name "SM_moto - Win32 MT DLL Release" +# Name "SM_moto - Win32 Profile" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_CmMatrix4x4.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix3x3.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Matrix4x4.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Point3.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Quaternion.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_random.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Transform.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector2.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector3.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\src\MT_Vector4.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\GEN_List.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\GEN_Map.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_assert.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_CmMatrix4x4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix3x3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Matrix4x4.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_MinMax.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Optimize.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point2.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Point3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Quaternion.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_random.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Scalar.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Stream.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Transform.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Tuple4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector2.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector3.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\MT_Vector4.inl +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\sumo\MoTo\include\NM_Scalar.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles_vc7/sumo/solid/SM_solid.dsp b/projectfiles_vc7/sumo/solid/SM_solid.dsp index dfaa85c35d8..221a72f67ef 100644 --- a/projectfiles_vc7/sumo/solid/SM_solid.dsp +++ b/projectfiles_vc7/sumo/solid/SM_solid.dsp @@ -1,340 +1,340 @@ -# Microsoft Developer Studio Project File - Name="SM_solid" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=SM_solid - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "SM_solid.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "SM_solid.mak" CFG="SM_solid - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "SM_solid - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_solid - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_solid - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "SM_solid - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "SM_solid - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /J /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_solid - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# SUBTRACT CPP /Fr -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Debug" -# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\debug\SM_solid.lib" -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Release" -# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll" -# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll" -# PROP Target_Dir "" -LINK32=link.exe -lib -# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\SM_solid.lib" -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "SM_solid - Win32 Release" -# Name "SM_solid - Win32 Debug" -# Name "SM_solid - Win32 MT DLL Debug" -# Name "SM_solid - Win32 MT DLL Release" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\BBoxTree.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Box.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Complex.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cone.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Convex.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cylinder.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Endpoint.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Proxy.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Scene.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_DoubleBase.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Encounter.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_FloatBase.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_LineSegment.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Object.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_RespTable.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Scene.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polyhedron.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polytope.cpp" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Sphere.cpp" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\AlgoTable.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\BBoxTree.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Box.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Complex.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cone.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Convex.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cylinder.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_AABBox.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BBox.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Endpoint.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Proxy.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Scene.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_DoubleBase.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Encounter.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_FloatBase.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_LineSegment.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Object.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Response.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_RespTable.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Scene.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBase.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBased.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\IndexArray.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polyhedron.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polytope.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Shape.h" -# End Source File -# Begin Source File - -SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Sphere.h" -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="SM_solid" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SM_solid - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SM_solid.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SM_solid.mak" CFG="SM_solid - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SM_solid - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_solid - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_solid - Win32 MT DLL Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "SM_solid - Win32 MT DLL Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SM_solid - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /J /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_solid - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Debug" +# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll_debug" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /Gm /GX /ZI /Od /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD CPP /nologo /MDd /Gm /GX /ZI /Od /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\debug\SM_solid.lib" +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "SM_solid - Win32 MT DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SM_solid___Win32_MT_DLL_Release" +# PROP BASE Intermediate_Dir "SM_solid___Win32_MT_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "..\..\..\obj\windows\sumo\solid\mtdll" +# PROP Intermediate_Dir "..\..\..\obj\windows\sumo\solid\mtdll" +# PROP Target_Dir "" +LINK32=link.exe -lib +# ADD BASE CPP /nologo /GX /O2 /I "..\..\..\source\sumo\SOLID-3.0\include" /I "../../../../../lib/windows/moto/include" /I "..\..\..\source\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD CPP /nologo /MD /GX /O2 /I "..\..\..\source\gameengine\physics\sumo\SOLID-3.0\include" /I "../../../../lib/windows/moto/include" /I "..\..\..\source\gameengine\physics\sumo\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /J /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\..\..\obj\windows\sumo\solid\SM_solid.lib" +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "SM_solid - Win32 Release" +# Name "SM_solid - Win32 Debug" +# Name "SM_solid - Win32 MT DLL Debug" +# Name "SM_solid - Win32 MT DLL Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\BBoxTree.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Box.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Complex.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cone.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Convex.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Cylinder.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_C-api.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Endpoint.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Proxy.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_BP_Scene.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_C-api.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_DoubleBase.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Encounter.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_FloatBase.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_LineSegment.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Object.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_RespTable.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\DT_Scene.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polyhedron.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Polytope.cpp" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\src\Sphere.cpp" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\AlgoTable.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\BBoxTree.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Box.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Complex.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cone.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Convex.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Cylinder.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_AABBox.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BBox.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Endpoint.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Proxy.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_BP_Scene.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_DoubleBase.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Encounter.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_FloatBase.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_LineSegment.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Object.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Response.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_RespTable.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_Scene.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBase.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\DT_VertexBased.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\IndexArray.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polyhedron.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Polytope.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Shape.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\source\gameengine\Physics\Sumo\SOLID-3.0\include\Sphere.h" +# End Source File +# End Group +# End Target +# End Project diff --git a/projectfiles_vc9/blender/BLO_readblenfile/BLO_readblenfile.vcproj b/projectfiles_vc9/blender/BLO_readblenfile/BLO_readblenfile.vcproj new file mode 100644 index 00000000000..07afe8c5b30 --- /dev/null +++ b/projectfiles_vc9/blender/BLO_readblenfile/BLO_readblenfile.vcproj @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj b/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj new file mode 100644 index 00000000000..7f1eff21e6f --- /dev/null +++ b/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/avi/BL_avi.vcproj b/projectfiles_vc9/blender/avi/BL_avi.vcproj new file mode 100644 index 00000000000..f9700ab85c2 --- /dev/null +++ b/projectfiles_vc9/blender/avi/BL_avi.vcproj @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/blender.sln b/projectfiles_vc9/blender/blender.sln new file mode 100644 index 00000000000..1bd132ea223 --- /dev/null +++ b/projectfiles_vc9/blender/blender.sln @@ -0,0 +1,1503 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj", "{F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}" + ProjectSection(ProjectDependencies) = postProject + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} = {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} + {6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B} + {A90C4918-4B21-4277-93BD-AF65F30951D9} = {A90C4918-4B21-4277-93BD-AF65F30951D9} + {FB88301F-F725-401B-ACD7-D2ABBF333B71} = {FB88301F-F725-401B-ACD7-D2ABBF333B71} + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} + {D1A9312F-4557-4982-A0F4-4D08508235F4} = {D1A9312F-4557-4982-A0F4-4D08508235F4} + {884D8731-654C-4C7F-9A75-8F37A305BE1E} = {884D8731-654C-4C7F-9A75-8F37A305BE1E} + {79D0B232-208C-F208-DA71-79B4AC088602} = {79D0B232-208C-F208-DA71-79B4AC088602} + {E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018} + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} + {51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E} + {FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400} + {31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718} + {EADC3C5A-6C51-4F03-8038-1553E7D7F740} = {EADC3C5A-6C51-4F03-8038-1553E7D7F740} + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E} = {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E} + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D} = {DB6BE55D-B6D9-494D-856A-8764FF7BA91D} + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} = {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} + {09222F5E-1625-4FF3-A89A-384D16875EE5} = {09222F5E-1625-4FF3-A89A-384D16875EE5} + {138DD16C-CC78-4F6C-A898-C8DA68D89067} = {138DD16C-CC78-4F6C-A898-C8DA68D89067} + {415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292} + {106AE171-0083-41D6-A949-20DB0E8DC251} = {106AE171-0083-41D6-A949-20DB0E8DC251} + {670EC17A-0548-4BBF-A27B-636C7C188139} = {670EC17A-0548-4BBF-A27B-636C7C188139} + {8BFA4082-773B-D100-BC24-659083BA023F} = {8BFA4082-773B-D100-BC24-659083BA023F} + {4C3AB78A-52CA-4276-A041-39776E52D8C8} = {4C3AB78A-52CA-4276-A041-39776E52D8C8} + {6B801390-5F95-4F07-81A7-97FBA046AACC} = {6B801390-5F95-4F07-81A7-97FBA046AACC} + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} + {76D90B92-ECC7-409C-9F98-A8814B90F3C0} = {76D90B92-ECC7-409C-9F98-A8814B90F3C0} + {9C71A793-C177-4CAB-8EC5-923D500B39F8} = {9C71A793-C177-4CAB-8EC5-923D500B39F8} + {F90BD995-FFA4-4B18-81E8-FA4322C939E8} = {F90BD995-FFA4-4B18-81E8-FA4322C939E8} + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} = {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} + {8154A59A-CAED-403D-AB94-BC4E7C032666} = {8154A59A-CAED-403D-AB94-BC4E7C032666} + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7} = {3648FB9A-C36F-43AB-AED0-1F1361E67FC7} + {542A9FA1-B7FF-441C-AE15-054DB31D3488} = {542A9FA1-B7FF-441C-AE15-054DB31D3488} + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} = {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA} = {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA} + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} + {E8904FB3-F8F7-BC21-87A6-029A57B901F4} = {E8904FB3-F8F7-BC21-87A6-029A57B901F4} + {E90C7BC2-CF30-4A60-A8F2-0050D592E358} = {E90C7BC2-CF30-4A60-A8F2-0050D592E358} + {8B8D4FC3-3234-4E54-8376-5AB83D00D164} = {8B8D4FC3-3234-4E54-8376-5AB83D00D164} + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} = {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} + {87032FD2-9BA0-6B43-BE33-8902BA8F9172} = {87032FD2-9BA0-6B43-BE33-8902BA8F9172} + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9} = {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9} + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA} = {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA} + {E86B7BDE-C33C-4E55-9433-E74C141D7538} = {E86B7BDE-C33C-4E55-9433-E74C141D7538} + {32CC75E2-EE85-45E6-8E3D-513F58464F43} = {32CC75E2-EE85-45E6-8E3D-513F58464F43} + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359} = {DFE7F3E3-E62A-4677-B666-DF0DDF70C359} + {9A307EE5-CD77-47BC-BD87-62508C7E19D8} = {9A307EE5-CD77-47BC-BD87-62508C7E19D8} + {AB590CED-F71F-4A17-A89B-18583ECD633D} = {AB590CED-F71F-4A17-A89B-18583ECD633D} + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} + {B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BKE_blenkernel", "blenkernel\BKE_blenkernel.vcproj", "{CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}" + ProjectSection(ProjectDependencies) = postProject + {02110D03-59DB-4571-8787-72B3C03B2F2D} = {02110D03-59DB-4571-8787-72B3C03B2F2D} + {9C71A793-C177-4CAB-8EC5-923D500B39F8} = {9C71A793-C177-4CAB-8EC5-923D500B39F8} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BLI_blenlib", "blenlib\BLI_blenlib.vcproj", "{31628053-825D-4C06-8A21-D13883489718}" + ProjectSection(ProjectDependencies) = postProject + {02110D03-59DB-4571-8787-72B3C03B2F2D} = {02110D03-59DB-4571-8787-72B3C03B2F2D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BLO_loader", "loader\BLO_loader.vcproj", "{E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BLO_readblenfile", "BLO_readblenfile\BLO_readblenfile.vcproj", "{DB6BE55D-B6D9-494D-856A-8764FF7BA91D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_avi", "avi\BL_avi.vcproj", "{9A307EE5-CD77-47BC-BD87-62508C7E19D8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_imbuf", "imbuf\BL_imbuf.vcproj", "{415BFD6E-64CF-422B-AF88-C07F040A7292}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BPY_python", "BPY_python\BPY_python.vcproj", "{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}" + ProjectSection(ProjectDependencies) = postProject + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} + {31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718} + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BRE_render", "render\BRE_render.vcproj", "{106AE171-0083-41D6-A949-20DB0E8DC251}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DNA_makesdna", "makesdna\DNA_makesdna.vcproj", "{E013786A-9575-4F34-81B2-33290357EE87}" + ProjectSection(ProjectDependencies) = postProject + {31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718} + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXP_expressions", "..\gameengine\expression\EXP_expressions.vcproj", "{EADC3C5A-6C51-4F03-8038-1553E7D7F740}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GP_axctl", "..\gameengine\gameplayer\axctl\GP_axctl.vcproj", "{DF25E6F2-780C-438B-8AAD-D10CF8B3820A}" + ProjectSection(ProjectDependencies) = postProject + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} = {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} + {6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B} + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} + {E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018} + {51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E} + {31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718} + {EADC3C5A-6C51-4F03-8038-1553E7D7F740} = {EADC3C5A-6C51-4F03-8038-1553E7D7F740} + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D} = {DB6BE55D-B6D9-494D-856A-8764FF7BA91D} + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} = {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} + {09222F5E-1625-4FF3-A89A-384D16875EE5} = {09222F5E-1625-4FF3-A89A-384D16875EE5} + {E013786A-9575-4F34-81B2-33290357EE87} = {E013786A-9575-4F34-81B2-33290357EE87} + {415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292} + {4C3AB78A-52CA-4276-A041-39776E52D8C8} = {4C3AB78A-52CA-4276-A041-39776E52D8C8} + {6B801390-5F95-4F07-81A7-97FBA046AACC} = {6B801390-5F95-4F07-81A7-97FBA046AACC} + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} + {F90BD995-FFA4-4B18-81E8-FA4322C939E8} = {F90BD995-FFA4-4B18-81E8-FA4322C939E8} + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} = {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7} = {3648FB9A-C36F-43AB-AED0-1F1361E67FC7} + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0} = {D8ABD6A5-1B36-4D62-934E-B5C6801130B0} + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} = {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA} = {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA} + {E90C7BC2-CF30-4A60-A8F2-0050D592E358} = {E90C7BC2-CF30-4A60-A8F2-0050D592E358} + {32CC75E2-EE85-45E6-8E3D-513F58464F43} = {32CC75E2-EE85-45E6-8E3D-513F58464F43} + {9A307EE5-CD77-47BC-BD87-62508C7E19D8} = {9A307EE5-CD77-47BC-BD87-62508C7E19D8} + {AB590CED-F71F-4A17-A89B-18583ECD633D} = {AB590CED-F71F-4A17-A89B-18583ECD633D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GP_common", "..\gameengine\gameplayer\common\GP_common.vcproj", "{D8ABD6A5-1B36-4D62-934E-B5C6801130B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenderplayer", "..\gameengine\gameplayer\ghost\GP_ghost.vcproj", "{3D310C60-6771-48E4-BCCA-D2718CDED898}" + ProjectSection(ProjectDependencies) = postProject + {02110D03-59DB-4571-8787-72B3C03B2F2D} = {02110D03-59DB-4571-8787-72B3C03B2F2D} + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} = {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} + {6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B} + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} + {D1A9312F-4557-4982-A0F4-4D08508235F4} = {D1A9312F-4557-4982-A0F4-4D08508235F4} + {E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018} + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} + {51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E} + {FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400} + {31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718} + {EADC3C5A-6C51-4F03-8038-1553E7D7F740} = {EADC3C5A-6C51-4F03-8038-1553E7D7F740} + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D} = {DB6BE55D-B6D9-494D-856A-8764FF7BA91D} + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} = {0A73055E-4DED-40CD-9F72-9093ED3EEC7E} + {09222F5E-1625-4FF3-A89A-384D16875EE5} = {09222F5E-1625-4FF3-A89A-384D16875EE5} + {E013786A-9575-4F34-81B2-33290357EE87} = {E013786A-9575-4F34-81B2-33290357EE87} + {138DD16C-CC78-4F6C-A898-C8DA68D89067} = {138DD16C-CC78-4F6C-A898-C8DA68D89067} + {415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292} + {670EC17A-0548-4BBF-A27B-636C7C188139} = {670EC17A-0548-4BBF-A27B-636C7C188139} + {4C3AB78A-52CA-4276-A041-39776E52D8C8} = {4C3AB78A-52CA-4276-A041-39776E52D8C8} + {6B801390-5F95-4F07-81A7-97FBA046AACC} = {6B801390-5F95-4F07-81A7-97FBA046AACC} + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} + {76D90B92-ECC7-409C-9F98-A8814B90F3C0} = {76D90B92-ECC7-409C-9F98-A8814B90F3C0} + {9C71A793-C177-4CAB-8EC5-923D500B39F8} = {9C71A793-C177-4CAB-8EC5-923D500B39F8} + {F90BD995-FFA4-4B18-81E8-FA4322C939E8} = {F90BD995-FFA4-4B18-81E8-FA4322C939E8} + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} = {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23} + {8154A59A-CAED-403D-AB94-BC4E7C032666} = {8154A59A-CAED-403D-AB94-BC4E7C032666} + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7} = {3648FB9A-C36F-43AB-AED0-1F1361E67FC7} + {542A9FA1-B7FF-441C-AE15-054DB31D3488} = {542A9FA1-B7FF-441C-AE15-054DB31D3488} + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0} = {D8ABD6A5-1B36-4D62-934E-B5C6801130B0} + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} = {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B} + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA} = {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA} + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} + {E90C7BC2-CF30-4A60-A8F2-0050D592E358} = {E90C7BC2-CF30-4A60-A8F2-0050D592E358} + {8B8D4FC3-3234-4E54-8376-5AB83D00D164} = {8B8D4FC3-3234-4E54-8376-5AB83D00D164} + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} = {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} + {87032FD2-9BA0-6B43-BE33-8902BA8F9172} = {87032FD2-9BA0-6B43-BE33-8902BA8F9172} + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA} = {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA} + {E86B7BDE-C33C-4E55-9433-E74C141D7538} = {E86B7BDE-C33C-4E55-9433-E74C141D7538} + {32CC75E2-EE85-45E6-8E3D-513F58464F43} = {32CC75E2-EE85-45E6-8E3D-513F58464F43} + {9A307EE5-CD77-47BC-BD87-62508C7E19D8} = {9A307EE5-CD77-47BC-BD87-62508C7E19D8} + {AB590CED-F71F-4A17-A89B-18583ECD633D} = {AB590CED-F71F-4A17-A89B-18583ECD633D} + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} + {B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KX_blenderhook", "..\gameengine\blenderhook\KX_blenderhook.vcproj", "{8154A59A-CAED-403D-AB94-BC4E7C032666}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KX_converter", "..\gameengine\converter\KX_converter.vcproj", "{F90BD995-FFA4-4B18-81E8-FA4322C939E8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KX_ketsji", "..\gameengine\ketsji\KX_ketsji.vcproj", "{E645CC32-4823-463E-82F0-46ADDE664018}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KX_network", "..\gameengine\ketsji\network\KX_network.vcproj", "{6E24BF09-9653-4166-A871-F65CC9E98A9B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NG_loopbacknetwork", "..\gameengine\network\loopbacknetwork\NG_loopbacknetwork.vcproj", "{6B801390-5F95-4F07-81A7-97FBA046AACC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NG_network", "..\gameengine\network\network\NG_network.vcproj", "{0A73055E-4DED-40CD-9F72-9093ED3EEC7E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PHY_Dummy", "..\GAMEENGINE\physics\PHY_PHYSICS\PHY_Dummy\PHY_Dummy.vcproj", "{3648FB9A-C36F-43AB-AED0-1F1361E67FC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PHY_Ode", "..\gameengine\physics\PHY_Physics\PHY_Ode\PHY_Ode.vcproj", "{EC405272-28E3-4840-AAC2-53D6DE4E163D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PHY_Physics", "..\gameengine\physics\PHY_Physics\PHY_Physics.vcproj", "{E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RAS_openglrasterizer", "..\gameengine\rasterizer\openglrasterizer\RAS_openglrasterizer.vcproj", "{AB590CED-F71F-4A17-A89B-18583ECD633D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RAS_rasterizer", "..\gameengine\rasterizer\RAS_rasterizer.vcproj", "{51FB3D48-2467-4BFA-A321-D848252B437E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SCA_GameLogic", "..\gameengine\gamelogic\SCA_GameLogic.vcproj", "{32CC75E2-EE85-45E6-8E3D-513F58464F43}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SG_SceneGraph", "..\gameengine\scenegraph\SG_SceneGraph.vcproj", "{09222F5E-1625-4FF3-A89A-384D16875EE5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SYS_system", "..\kernel\system\SYS_system.vcproj", "{BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blenpluginapi", "blenpluginapi\blenpluginapi\blenpluginapi.vcproj", "{BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_messaging", "..\kernel\gen_messaging\gen_messaging.vcproj", "{727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PHY_Bullet", "..\gameengine\physics\PHY_Physics\PHY_Bullet\PHY_Bullet.vcproj", "{E90C7BC2-CF30-4A60-A8F2-0050D592E358}" + ProjectSection(ProjectDependencies) = postProject + {FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_nodes", "nodes\nodes.vcproj", "{4C3AB78A-52CA-4276-A041-39776E52D8C8}" + ProjectSection(ProjectDependencies) = postProject + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359} = {DFE7F3E3-E62A-4677-B666-DF0DDF70C359} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_gpu", "gpu\BL_gpu.vcproj", "{138DD16C-CC78-4F6C-A898-C8DA68D89067}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TEX_Video", "..\gameengine\videotexture\TEX_Video.vcproj", "{670EC17A-0548-4BBF-A27B-636C7C188139}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_bullet2", "..\..\extern\bullet2\make\msvc_9_0\Bullet.vcproj", "{FFD3C64A-30E2-4BC7-BC8F-51818C320400}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_glew", "..\..\extern\glew\make\msvc_9_0\glew.vcproj", "{BAC615B0-F1AF-418B-8D23-A10FD8870D6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_build_install_all", "..\..\extern\make\msvc_9_0\build_install_all.vcproj", "{9C71A793-C177-4CAB-8EC5-923D500B39F8}" + ProjectSection(ProjectDependencies) = postProject + {79D0B232-208C-F208-DA71-79B4AC088602} = {79D0B232-208C-F208-DA71-79B4AC088602} + {FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400} + {8BFA4082-773B-D100-BC24-659083BA023F} = {8BFA4082-773B-D100-BC24-659083BA023F} + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_boolop", "..\..\intern\boolop\make\msvc_9_0\boolop.vcproj", "{EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}" + ProjectSection(ProjectDependencies) = postProject + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} = {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} + {E86B7BDE-C33C-4E55-9433-E74C141D7538} = {E86B7BDE-C33C-4E55-9433-E74C141D7538} + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_bsplib", "..\..\intern\bsp\make\msvc_9_0\bsplib.vcproj", "{B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}" + ProjectSection(ProjectDependencies) = postProject + {51A348C1-8684-4D67-B980-97B1FC74159B} = {51A348C1-8684-4D67-B980-97B1FC74159B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_container", "..\..\intern\container\make\msvc_9_0\container.vcproj", "{51A348C1-8684-4D67-B980-97B1FC74159B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_decimation", "..\..\intern\decimation\make\msvc_9_0\decimation.vcproj", "{C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_elbeem", "..\..\intern\elbeem\make\msvc_9_0\elbeem.vcproj", "{A90C4918-4B21-4277-93BD-AF65F30951D9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_ghost", "..\..\intern\ghost\make\msvc_9_0\ghost.vcproj", "{76D90B92-ECC7-409C-9F98-A8814B90F3C0}" + ProjectSection(ProjectDependencies) = postProject + {B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_guardedalloc", "..\..\intern\guardedalloc\make\msvc_9_0\guardedalloc.vcproj", "{1CC733F1-6AB5-4904-8F63-C08C46B79DD9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_iksolver", "..\..\intern\iksolver\make\msvc_9_0\iksolver.vcproj", "{542A9FA1-B7FF-441C-AE15-054DB31D3488}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_memutil", "..\..\intern\memutil\make\msvc_9_0\memutil.vcproj", "{E86B7BDE-C33C-4E55-9433-E74C141D7538}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_MoTo", "..\..\intern\moto\make\msvc_9_0\moto.vcproj", "{4B6AFCC5-968C-424A-8F20-76E41B3BEF74}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_opennl", "..\..\intern\opennl\make\msvc_9_0\opennl.vcproj", "{8B8D4FC3-3234-4E54-8376-5AB83D00D164}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_string", "..\..\intern\string\make\msvc_9_0\string.vcproj", "{B789C2F3-279E-4A85-8F0A-7F7AC068E598}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_build_install_all", "..\..\intern\make\msvc_9_0\INT_build_install_all.vcproj", "{02110D03-59DB-4571-8787-72B3C03B2F2D}" + ProjectSection(ProjectDependencies) = postProject + {A90C4918-4B21-4277-93BD-AF65F30951D9} = {A90C4918-4B21-4277-93BD-AF65F30951D9} + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E} = {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E} + {76D90B92-ECC7-409C-9F98-A8814B90F3C0} = {76D90B92-ECC7-409C-9F98-A8814B90F3C0} + {542A9FA1-B7FF-441C-AE15-054DB31D3488} = {542A9FA1-B7FF-441C-AE15-054DB31D3488} + {E8904FB3-F8F7-BC21-87A6-029A57B901F4} = {E8904FB3-F8F7-BC21-87A6-029A57B901F4} + {51A348C1-8684-4D67-B980-97B1FC74159B} = {51A348C1-8684-4D67-B980-97B1FC74159B} + {8B8D4FC3-3234-4E54-8376-5AB83D00D164} = {8B8D4FC3-3234-4E54-8376-5AB83D00D164} + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} = {4B6AFCC5-968C-424A-8F20-76E41B3BEF74} + {87032FD2-9BA0-6B43-BE33-8902BA8F9172} = {87032FD2-9BA0-6B43-BE33-8902BA8F9172} + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9} = {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9} + {E86B7BDE-C33C-4E55-9433-E74C141D7538} = {E86B7BDE-C33C-4E55-9433-E74C141D7538} + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} + {B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WM_windowmanager", "windowmanager\windowmanager.vcproj", "{884D8731-654C-4C7F-9A75-8F37A305BE1E}" + ProjectSection(ProjectDependencies) = postProject + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359} = {DFE7F3E3-E62A-4677-B666-DF0DDF70C359} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ED_editors", "editors\ED_editors.vcproj", "{FB88301F-F725-401B-ACD7-D2ABBF333B71}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RNA_makesrna", "makesrna\RNA_makesrna.vcproj", "{8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}" + ProjectSection(ProjectDependencies) = postProject + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RNA_rna", "makesrna\RNA_rna.vcproj", "{DFE7F3E3-E62A-4677-B666-DF0DDF70C359}" + ProjectSection(ProjectDependencies) = postProject + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6} = {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DNA_dna", "makesdna\DNA_dna.vcproj", "{7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}" + ProjectSection(ProjectDependencies) = postProject + {E013786A-9575-4F34-81B2-33290357EE87} = {E013786A-9575-4F34-81B2-33290357EE87} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BLF_blenfont", "blenfont\BLF_blenfont.vcproj", "{D1A9312F-4557-4982-A0F4-4D08508235F4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_smoke", "..\..\intern\smoke\make\msvc_9_0\smoke.vcproj", "{E8904FB3-F8F7-BC21-87A6-029A57B901F4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_audaspace", "..\..\intern\audaspace\make\msvc_9_0\audaspace.vcproj", "{87032FD2-9BA0-6B43-BE33-8902BA8F9172}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_lzma", "..\..\extern\lzma\make\msvc_9_0\lzma.vcproj", "{79D0B232-208C-F208-DA71-79B4AC088602}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_lzo", "..\..\extern\lzo\make\msvc_9_0\lzo.vcproj", "{8BFA4082-773B-D100-BC24-659083BA023F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + 3D Plugin Debug|Win32 = 3D Plugin Debug|Win32 + 3D Plugin Release|Win32 = 3D Plugin Release|Win32 + 3DPlugin Debug|Win32 = 3DPlugin Debug|Win32 + 3DPlugin Release|Win32 = 3DPlugin Release|Win32 + Blender Debug|Win32 = Blender Debug|Win32 + Blender Release|Win32 = Blender Release|Win32 + BlenderPlayer Debug|Win32 = BlenderPlayer Debug|Win32 + BlenderPlayer Release|Win32 = BlenderPlayer Release|Win32 + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3D Plugin Release|Win32.Build.0 = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3DPlugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3DPlugin Debug|Win32.Build.0 = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3DPlugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.3DPlugin Release|Win32.Build.0 = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Debug|Win32.Build.0 = Blender Debug|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Release|Win32.ActiveCfg = Blender Release|Win32 + {F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}.Release|Win32.Build.0 = Blender Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {31628053-825D-4C06-8A21-D13883489718}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {DB6BE55D-B6D9-494D-856A-8764FF7BA91D}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {9A307EE5-CD77-47BC-BD87-62508C7E19D8}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {415BFD6E-64CF-422B-AF88-C07F040A7292}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3D Plugin Debug|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3D Plugin Debug|Win32.Build.0 = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3D Plugin Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3D Plugin Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3DPlugin Debug|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3DPlugin Debug|Win32.Build.0 = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3DPlugin Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.3DPlugin Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3D Plugin Release|Win32.Build.0 = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3DPlugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3DPlugin Debug|Win32.Build.0 = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3DPlugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.3DPlugin Release|Win32.Build.0 = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Debug|Win32.Build.0 = Blender Debug|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Release|Win32.ActiveCfg = Blender Release|Win32 + {106AE171-0083-41D6-A949-20DB0E8DC251}.Release|Win32.Build.0 = Blender Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E013786A-9575-4F34-81B2-33290357EE87}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {EADC3C5A-6C51-4F03-8038-1553E7D7F740}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.Blender Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.Blender Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.BlenderPlayer Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.BlenderPlayer Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {DF25E6F2-780C-438B-8AAD-D10CF8B3820A}.Release|Win32.Build.0 = 3D Plugin Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.Blender Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.Blender Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {D8ABD6A5-1B36-4D62-934E-B5C6801130B0}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3D Plugin Debug|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3D Plugin Debug|Win32.Build.0 = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3D Plugin Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3D Plugin Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3DPlugin Debug|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3DPlugin Debug|Win32.Build.0 = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3DPlugin Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.3DPlugin Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.Blender Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.Blender Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3D310C60-6771-48E4-BCCA-D2718CDED898}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Debug|Win32.Build.0 = Blender Debug|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Release|Win32.ActiveCfg = Blender Release|Win32 + {8154A59A-CAED-403D-AB94-BC4E7C032666}.Release|Win32.Build.0 = Blender Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {F90BD995-FFA4-4B18-81E8-FA4322C939E8}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E645CC32-4823-463E-82F0-46ADDE664018}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {6E24BF09-9653-4166-A871-F65CC9E98A9B}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {6B801390-5F95-4F07-81A7-97FBA046AACC}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {0A73055E-4DED-40CD-9F72-9093ED3EEC7E}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {3648FB9A-C36F-43AB-AED0-1F1361E67FC7}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.Blender Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.Blender Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {EC405272-28E3-4840-AAC2-53D6DE4E163D}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E109F1A5-FDD3-4F56-A1C4-96867EEA4C5B}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {AB590CED-F71F-4A17-A89B-18583ECD633D}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {51FB3D48-2467-4BFA-A321-D848252B437E}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {32CC75E2-EE85-45E6-8E3D-513F58464F43}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {09222F5E-1625-4FF3-A89A-384D16875EE5}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {BB6AA598-B336-4F8B-9DF9-8CAE7BE71C23}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {727F90AC-ABE6-40BF-8937-C2F2F1D13DEA}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {E90C7BC2-CF30-4A60-A8F2-0050D592E358}.Release|Win32.Build.0 = 3D Plugin Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Debug|Win32.Build.0 = Blender Debug|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Release|Win32.ActiveCfg = Blender Release|Win32 + {4C3AB78A-52CA-4276-A041-39776E52D8C8}.Release|Win32.Build.0 = Blender Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {138DD16C-CC78-4F6C-A898-C8DA68D89067}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3D Plugin Debug|Win32.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3D Plugin Debug|Win32.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3D Plugin Release|Win32.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3D Plugin Release|Win32.Build.0 = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3DPlugin Debug|Win32.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3DPlugin Debug|Win32.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3DPlugin Release|Win32.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.3DPlugin Release|Win32.Build.0 = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Debug|Win32.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Debug|Win32.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Release|Win32.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Blender Release|Win32.Build.0 = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Debug|Win32.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Debug|Win32.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Release|Win32.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.BlenderPlayer Release|Win32.Build.0 = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Debug|Win32.ActiveCfg = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Debug|Win32.Build.0 = Debug|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Release|Win32.ActiveCfg = Release|Win32 + {670EC17A-0548-4BBF-A27B-636C7C188139}.Release|Win32.Build.0 = Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Release|Win32.Build.0 = 3D Plugin Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Debug|Win32.Build.0 = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Release|Win32.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Release|Win32.Build.0 = Blender Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3DPlugin Release|Win32.Build.0 = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Release|Win32.Build.0 = 3D Plugin Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {B093415D-C0F6-4E76-8F5A-6BC1917BCE9E}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {51A348C1-8684-4D67-B980-97B1FC74159B}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3D Plugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {A90C4918-4B21-4277-93BD-AF65F30951D9}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {76D90B92-ECC7-409C-9F98-A8814B90F3C0}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {542A9FA1-B7FF-441C-AE15-054DB31D3488}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {E86B7BDE-C33C-4E55-9433-E74C141D7538}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {4B6AFCC5-968C-424A-8F20-76E41B3BEF74}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {8B8D4FC3-3234-4E54-8376-5AB83D00D164}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {B789C2F3-279E-4A85-8F0A-7F7AC068E598}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {02110D03-59DB-4571-8787-72B3C03B2F2D}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Debug|Win32.Build.0 = Blender Debug|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Release|Win32.ActiveCfg = Blender Release|Win32 + {884D8731-654C-4C7F-9A75-8F37A305BE1E}.Release|Win32.Build.0 = Blender Release|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3D Plugin Release|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3DPlugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3DPlugin Debug|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3DPlugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.3DPlugin Release|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.BlenderPlayer Release|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.BlenderPlayer Release|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Debug|Win32.Build.0 = Blender Debug|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Release|Win32.ActiveCfg = Blender Release|Win32 + {FB88301F-F725-401B-ACD7-D2ABBF333B71}.Release|Win32.Build.0 = Blender Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Debug|Win32.Build.0 = BlenderPlayer Debug|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Release|Win32.ActiveCfg = BlenderPlayer Release|Win32 + {8C2BCCF8-4D9E-46D3-BABF-C1545A332CE6}.Release|Win32.Build.0 = BlenderPlayer Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Debug|Win32.Build.0 = Blender Debug|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Release|Win32.ActiveCfg = Blender Release|Win32 + {DFE7F3E3-E62A-4677-B666-DF0DDF70C359}.Release|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Debug|Win32.Build.0 = Blender Debug|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Release|Win32.ActiveCfg = Blender Release|Win32 + {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}.Release|Win32.Build.0 = Blender Release|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Release|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Debug|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Debug|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Release|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Release|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Release|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Release|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Debug|Win32.ActiveCfg = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Debug|Win32.Build.0 = Blender Debug|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Release|Win32.ActiveCfg = Blender Release|Win32 + {D1A9312F-4557-4982-A0F4-4D08508235F4}.Release|Win32.Build.0 = Blender Release|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.BlenderPlayer Release|Win32.ActiveCfg = Blender Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.BlenderPlayer Release|Win32.Build.0 = Blender Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {E8904FB3-F8F7-BC21-87A6-029A57B901F4}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3D Plugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3D Plugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3D Plugin Release|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3D Plugin Release|Win32.Build.0 = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3DPlugin Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3DPlugin Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3DPlugin Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.3DPlugin Release|Win32.Build.0 = 3DPlugin Release|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.BlenderPlayer Release|Win32.ActiveCfg = Blender Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.BlenderPlayer Release|Win32.Build.0 = Blender Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Debug|Win32.ActiveCfg = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32 + {87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Release|Win32.Build.0 = 3DPlugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {79D0B232-208C-F208-DA71-79B4AC088602}.Release|Win32.Build.0 = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Debug|Win32.Build.0 = Blender Debug|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Release|Win32.ActiveCfg = Blender Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Release|Win32.Build.0 = Blender Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32 + {8BFA4082-773B-D100-BC24-659083BA023F}.Release|Win32.Build.0 = 3D Plugin Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projectfiles_vc9/blender/blender.vcproj b/projectfiles_vc9/blender/blender.vcproj new file mode 100644 index 00000000000..e6a5c483f7a --- /dev/null +++ b/projectfiles_vc9/blender/blender.vcproj @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/blenfont/BLF_blenfont.vcproj b/projectfiles_vc9/blender/blenfont/BLF_blenfont.vcproj new file mode 100644 index 00000000000..7b92276d4b8 --- /dev/null +++ b/projectfiles_vc9/blender/blenfont/BLF_blenfont.vcproj @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj b/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj new file mode 100644 index 00000000000..87f10346726 --- /dev/null +++ b/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj @@ -0,0 +1,1157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj new file mode 100644 index 00000000000..a6630c81aca --- /dev/null +++ b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj @@ -0,0 +1,742 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj b/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj new file mode 100644 index 00000000000..02ea370e34a --- /dev/null +++ b/projectfiles_vc9/blender/blenpluginapi/blenpluginapi/blenpluginapi.vcproj @@ -0,0 +1,513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/editors/ED_editors.vcproj b/projectfiles_vc9/blender/editors/ED_editors.vcproj new file mode 100644 index 00000000000..948a26c49b5 --- /dev/null +++ b/projectfiles_vc9/blender/editors/ED_editors.vcproj @@ -0,0 +1,1549 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/ftfont/FTF_ftfont.vcproj b/projectfiles_vc9/blender/ftfont/FTF_ftfont.vcproj new file mode 100644 index 00000000000..0ffc2ce2a41 --- /dev/null +++ b/projectfiles_vc9/blender/ftfont/FTF_ftfont.vcproj @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/gpu/BL_gpu.vcproj b/projectfiles_vc9/blender/gpu/BL_gpu.vcproj new file mode 100644 index 00000000000..1daf345f638 --- /dev/null +++ b/projectfiles_vc9/blender/gpu/BL_gpu.vcproj @@ -0,0 +1,525 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj b/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj new file mode 100644 index 00000000000..0e25b26831b --- /dev/null +++ b/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj @@ -0,0 +1,897 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/img/BL_img.vcproj b/projectfiles_vc9/blender/img/BL_img.vcproj new file mode 100644 index 00000000000..b4c4d1179b0 --- /dev/null +++ b/projectfiles_vc9/blender/img/BL_img.vcproj @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/loader/BLO_loader.vcproj b/projectfiles_vc9/blender/loader/BLO_loader.vcproj new file mode 100644 index 00000000000..e8b155875d0 --- /dev/null +++ b/projectfiles_vc9/blender/loader/BLO_loader.vcproj @@ -0,0 +1,613 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/makesdna/DNA_dna.vcproj b/projectfiles_vc9/blender/makesdna/DNA_dna.vcproj new file mode 100644 index 00000000000..c92c053f5bc --- /dev/null +++ b/projectfiles_vc9/blender/makesdna/DNA_dna.vcproj @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/makesdna/DNA_makesdna.vcproj b/projectfiles_vc9/blender/makesdna/DNA_makesdna.vcproj new file mode 100644 index 00000000000..77fbe72dede --- /dev/null +++ b/projectfiles_vc9/blender/makesdna/DNA_makesdna.vcproj @@ -0,0 +1,841 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj new file mode 100644 index 00000000000..a9d78d8b69a --- /dev/null +++ b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj @@ -0,0 +1,867 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj new file mode 100644 index 00000000000..84359390f41 --- /dev/null +++ b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/nodes/nodes.vcproj b/projectfiles_vc9/blender/nodes/nodes.vcproj new file mode 100644 index 00000000000..ca997306f04 --- /dev/null +++ b/projectfiles_vc9/blender/nodes/nodes.vcproj @@ -0,0 +1,754 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/radiosity/BRA_radiosity.vcproj b/projectfiles_vc9/blender/radiosity/BRA_radiosity.vcproj new file mode 100644 index 00000000000..bdecacc131e --- /dev/null +++ b/projectfiles_vc9/blender/radiosity/BRA_radiosity.vcproj @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/render/BRE_render.vcproj b/projectfiles_vc9/blender/render/BRE_render.vcproj new file mode 100644 index 00000000000..4e354c6dde3 --- /dev/null +++ b/projectfiles_vc9/blender/render/BRE_render.vcproj @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/renderconverter/BRE_renderconverter.vcproj b/projectfiles_vc9/blender/renderconverter/BRE_renderconverter.vcproj new file mode 100644 index 00000000000..d4be79e1d46 --- /dev/null +++ b/projectfiles_vc9/blender/renderconverter/BRE_renderconverter.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj b/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj new file mode 100644 index 00000000000..a074f66327d --- /dev/null +++ b/projectfiles_vc9/blender/windowmanager/windowmanager.vcproj @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/blender/yafray/BRE_yafray.vcproj b/projectfiles_vc9/blender/yafray/BRE_yafray.vcproj new file mode 100644 index 00000000000..92e1bd2595a --- /dev/null +++ b/projectfiles_vc9/blender/yafray/BRE_yafray.vcproj @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj b/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj new file mode 100644 index 00000000000..ea387c4e976 --- /dev/null +++ b/projectfiles_vc9/gameengine/blenderhook/KX_blenderhook.vcproj @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/converter/KX_converter.vcproj b/projectfiles_vc9/gameengine/converter/KX_converter.vcproj new file mode 100644 index 00000000000..d179fe03dc7 --- /dev/null +++ b/projectfiles_vc9/gameengine/converter/KX_converter.vcproj @@ -0,0 +1,632 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj b/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj new file mode 100644 index 00000000000..9aeb9584b35 --- /dev/null +++ b/projectfiles_vc9/gameengine/expression/EXP_expressions.vcproj @@ -0,0 +1,641 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj b/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj new file mode 100644 index 00000000000..61e589213c0 --- /dev/null +++ b/projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj @@ -0,0 +1,801 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj b/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj new file mode 100644 index 00000000000..ed2dad65374 --- /dev/null +++ b/projectfiles_vc9/gameengine/gameplayer/axctl/GP_axctl.vcproj @@ -0,0 +1,429 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj b/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj new file mode 100644 index 00000000000..87d9683a25e --- /dev/null +++ b/projectfiles_vc9/gameengine/gameplayer/common/GP_common.vcproj @@ -0,0 +1,441 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj b/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj new file mode 100644 index 00000000000..e29a65264e9 --- /dev/null +++ b/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj b/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj new file mode 100644 index 00000000000..f709e0b7d29 --- /dev/null +++ b/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj @@ -0,0 +1,1082 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj b/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj new file mode 100644 index 00000000000..36c8218b803 --- /dev/null +++ b/projectfiles_vc9/gameengine/ketsji/network/KX_network.vcproj @@ -0,0 +1,525 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/network/loopbacknetwork/NG_loopbacknetwork.vcproj b/projectfiles_vc9/gameengine/network/loopbacknetwork/NG_loopbacknetwork.vcproj new file mode 100644 index 00000000000..bbb8cc5ec25 --- /dev/null +++ b/projectfiles_vc9/gameengine/network/loopbacknetwork/NG_loopbacknetwork.vcproj @@ -0,0 +1,492 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/network/network/NG_network.vcproj b/projectfiles_vc9/gameengine/network/network/NG_network.vcproj new file mode 100644 index 00000000000..a9e0ce1acd2 --- /dev/null +++ b/projectfiles_vc9/gameengine/network/network/NG_network.vcproj @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj new file mode 100644 index 00000000000..d4e29e0774a --- /dev/null +++ b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.vcproj b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.vcproj new file mode 100644 index 00000000000..5c0159d5aa9 --- /dev/null +++ b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Dummy/PHY_Dummy.vcproj @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.vcproj b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.vcproj new file mode 100644 index 00000000000..e9773ecf683 --- /dev/null +++ b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Ode/PHY_Ode.vcproj @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Physics.vcproj b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Physics.vcproj new file mode 100644 index 00000000000..5441c5bd4f1 --- /dev/null +++ b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Physics.vcproj @@ -0,0 +1,538 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.vcproj b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.vcproj new file mode 100644 index 00000000000..793c8fe554b --- /dev/null +++ b/projectfiles_vc9/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.vcproj @@ -0,0 +1,544 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj b/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj new file mode 100644 index 00000000000..43c8d4100bf --- /dev/null +++ b/projectfiles_vc9/gameengine/rasterizer/RAS_rasterizer.vcproj @@ -0,0 +1,589 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.vcproj b/projectfiles_vc9/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.vcproj new file mode 100644 index 00000000000..09b87f41ddf --- /dev/null +++ b/projectfiles_vc9/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.vcproj @@ -0,0 +1,561 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/scenegraph/SG_SceneGraph.vcproj b/projectfiles_vc9/gameengine/scenegraph/SG_SceneGraph.vcproj new file mode 100644 index 00000000000..95e61cc4af8 --- /dev/null +++ b/projectfiles_vc9/gameengine/scenegraph/SG_SceneGraph.vcproj @@ -0,0 +1,545 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj b/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj new file mode 100644 index 00000000000..94e09303a1b --- /dev/null +++ b/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/kernel/gen_messaging/gen_messaging.vcproj b/projectfiles_vc9/kernel/gen_messaging/gen_messaging.vcproj new file mode 100644 index 00000000000..ac958a10f54 --- /dev/null +++ b/projectfiles_vc9/kernel/gen_messaging/gen_messaging.vcproj @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projectfiles_vc9/kernel/system/SYS_system.vcproj b/projectfiles_vc9/kernel/system/SYS_system.vcproj new file mode 100644 index 00000000000..c667a6050e8 --- /dev/null +++ b/projectfiles_vc9/kernel/system/SYS_system.vcproj @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/release/Makefile b/release/Makefile index f440e2dface..94bb902646d 100644 --- a/release/Makefile +++ b/release/Makefile @@ -1,4 +1,5 @@ -# +# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- +# vim: tabstop=8 # $Id$ # # ***** BEGIN GPL LICENSE BLOCK ***** @@ -34,16 +35,6 @@ BLENDNAME=blender-$(VERSION)-$(CONFIG_GUESS)-py$(NAN_PYTHON_VERSION)$(TYPE) export DISTDIR=$(NAN_OBJDIR)/$(BLENDNAME) export CONFDIR=$(DISTDIR)/.blender -ifeq ($(OS),beos) - TAR="zip" - TARFLAGS="-ry9" - EXT0="" - EXT1=".zip" - COMPRESS="" - EXT2="" - NOPLUGINS?=true -endif - ifeq ($(OS),$(findstring $(OS), "freebsd irix linux openbsd solaris")) TAR="tar" TARFLAGS="cf" @@ -57,6 +48,12 @@ ifeq ($(OS),$(findstring $(OS), "freebsd irix linux openbsd solaris")) NOPLUGINS?=true endif endif + # don"t build plugins on irix if using gcc + ifeq ($(OS), irix) + ifeq ($(IRIX_USE_GCC), true) + NOPLUGINS?=true + endif + endif endif ifeq ($(OS),windows) @@ -157,6 +154,15 @@ endif @echo "----> Copy python infrastructure" @[ ! -d scripts ] || cp -r scripts $(CONFDIR)/scripts + @echo "----> Copy python UI files" + @[ ! -d ui ] || cp -r ui $(CONFDIR)/ui + + ifeq ($(OS),darwin) + @echo "----> Copy python modules" + @mkdir $(CONFDIR)/python/ + @unzip -q $(LCGDIR)/release/python.zip -d $(CONFDIR)/python/ + endif + ifeq ($(OS),darwin) @echo "----> Move .blender to .app/Contents/MacOS/" @rm -fr $(DISTDIR)/blender$(EXT0)/Contents/MacOS/.blender @@ -170,7 +176,7 @@ endif else @strip -x $(DISTDIR)/blender$(EXT0) @if [ -f $(DISTDIR)/blenderplayer$(EXTO) ]; then \ - strip -x $(DISTDIR)/blender$(EXT0) ; \ + strip -x $(DISTDIR)/blenderplayer$(EXT0) ; \ fi endif endif @@ -191,16 +197,16 @@ pkg: install @$(COMPRESS) $(COMPRESSFLAGS) $(NAN_OBJDIR)/$(VERSION)/$(BLENDNAME)$(EXT1) endif @#echo "****> Clean up temporary distribution directory" - @rm -fr $(DISTDIR) + @#rm -fr $(DISTDIR) @echo "****> $(NAN_OBJDIR)/$(VERSION)/$(BLENDNAME)$(EXT1)$(EXT2) is ready" version: FORCE @echo "*---> Create $(BLENDNAME) package" makedirs: FORCE - @#echo "****> Create package directory $(VERSION) if necessary" + @echo "****> Create package directory $(VERSION) if necessary" @[ -d $(NAN_OBJDIR)/$(VERSION) ] || mkdir $(NAN_OBJDIR)/$(VERSION) - @#echo "****> Prepare temporary distribution directory" + @echo "****> Remove and recreate temporary distribution directory" @rm -fr $(DISTDIR) @mkdir $(DISTDIR) diff --git a/release/VERSION b/release/VERSION index 1c593e17dae..8821853a13d 100644 --- a/release/VERSION +++ b/release/VERSION @@ -1 +1 @@ -2.48 +2.5-devel diff --git a/release/beos-4.5-i386/specific.sh b/release/beos-4.5-i386/specific.sh deleted file mode 100644 index 9ce063b27a9..00000000000 --- a/release/beos-4.5-i386/specific.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# OS specific stuff for the package, only to be executed by ../Makefile - -# Add Python .so to package -cp -f $NAN_PYTHON/lib/libpython$NAN_PYTHON_VERSION.so $DISTDIR/ - -# And create a drag'n'drop symlink for it -cd $DISTDIR && ln -s /boot/home/config/lib Drag_libpython$NAN_PYTHON_VERSION.so_here diff --git a/release/beos-5.0-i386/specific.sh b/release/beos-5.0-i386/specific.sh deleted file mode 100644 index 9ce063b27a9..00000000000 --- a/release/beos-5.0-i386/specific.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# OS specific stuff for the package, only to be executed by ../Makefile - -# Add Python .so to package -cp -f $NAN_PYTHON/lib/libpython$NAN_PYTHON_VERSION.so $DISTDIR/ - -# And create a drag'n'drop symlink for it -cd $DISTDIR && ln -s /boot/home/config/lib Drag_libpython$NAN_PYTHON_VERSION.so_here diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons index 6993840e51f..79d6138e3f0 100644 Binary files a/release/datafiles/blenderbuttons and b/release/datafiles/blenderbuttons differ diff --git a/release/datafiles/bmonofont.ttf b/release/datafiles/bmonofont.ttf new file mode 100644 index 00000000000..e95786a49e4 Binary files /dev/null and b/release/datafiles/bmonofont.ttf differ diff --git a/release/datafiles/datatoc.c b/release/datafiles/datatoc.c deleted file mode 100644 index 46b935c7fd6..00000000000 --- a/release/datafiles/datatoc.c +++ /dev/null @@ -1,102 +0,0 @@ -/** - * $Id$ - * - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#include -#include -#include - -int main(int argc, char**argv) { - FILE *fpin, *fpout; - char cname[256]; - char sizest[256]; - size_t size; - int i; - - if (argc<1) { - printf ("Usage: datatoc \n"); - exit(1); - } - - fpin= fopen(argv[1], "rb"); - if (!fpin) { - printf ("Unable to open input <%s>\n", argv[1]); - exit(1); - } - - fseek (fpin, 0L, SEEK_END); - size= ftell(fpin); - fseek (fpin, 0L, SEEK_SET); - - if (argv[1][0]=='.') argv[1]++; - - sprintf(cname, "%s.c", argv[1]); - printf ("Making C file <%s>\n", cname); - - for (i=0; i < (int)strlen(argv[1]); i++) - if (argv[1][i]=='.') argv[1][i]='_'; - - sprintf(sizest, "%d", (int)size); - printf ("Input filesize is %ld, Output size should be %ld\n", size, ((int)size)*4 + strlen("/* DataToC output of file <> */\n\n") + strlen("char datatoc_[]= {\"") + strlen ("\"};\n") + (strlen(argv[1])*3) + strlen(sizest) + strlen("int datatoc__size= ;\n") +(((int)(size/256)+1)*5)); - - fpout= fopen(cname, "w"); - if (!fpout) { - printf ("Unable to open output <%s>\n", cname); - exit(1); - } - - fprintf (fpout, "/* DataToC output of file <%s> */\n\n",argv[1]); - fprintf (fpout, "int datatoc_%s_size= %s;\n", argv[1], sizest); - /* - fprintf (fpout, "char datatoc_%s[]= {\"", argv[1]); - - while (size--) { - if(size%256==0) - fprintf(fpout, "\" \\\n\""); - - fprintf (fpout, "\\x%02x", getc(fpin)); - } - - fprintf (fpout, "\"};\n"); - */ - - fprintf (fpout, "char datatoc_%s[]= {\n", argv[1]); - while (size--) { - if(size%32==31) - fprintf(fpout, "\n"); - - /* fprintf (fpout, "\\x%02x", getc(fpin)); */ - fprintf (fpout, "%3d,", getc(fpin)); - } - /* null terminate for the case it is a string */ - fprintf (fpout, "\n 0};\n\n"); - - fclose(fpin); - fclose(fpout); - return 0; -} diff --git a/release/datafiles/datatoc.py b/release/datafiles/datatoc.py new file mode 100755 index 00000000000..362d4ddc126 --- /dev/null +++ b/release/datafiles/datatoc.py @@ -0,0 +1,75 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2009 Blender Foundation. +# All rights reserved. +# +# Contributor(s): Jörg Müller +# +# ***** END GPL LICENCE BLOCK ***** + +import sys, os + +if len(sys.argv) < 2: + sys.stdout.write("Usage: datatoc \n") + sys.exit(1) + +filename = sys.argv[1] + +try: + fpin = open(filename, "rb"); +except: + sys.stdout.write("Unable to open input %s\n" % sys.argv[1]) + sys.exit(1) + +fpin.seek(0, os.SEEK_END) +size = fpin.tell() +fpin.seek(0) + +if filename[0] == ".": + filename = filename[1:] + +cname = filename + ".c" +sys.stdout.write("Making C file <%s>\n" % cname) + +filename = filename.replace(".", "_") +sys.stdout.write(str(size)) +sys.stdout.write("\n") +try: + fpout = open(cname, "w") +except: + sys.stdout.write("Unable to open output %s\n" % cname) + sys.exit(1) + +fpout.write("/* DataToC output of file <%s> */\n\n" % filename) +fpout.write("int datatoc_%s_size= %d;\n" % (filename, size)) + +fpout.write("char datatoc_%s[]= {\n" % filename) + +while size > 0: + size -= 1 + if size % 32 == 31: + fpout.write("\n") + + fpout.write("%3d," % ord(fpin.read(1))) + +fpout.write("\n 0};\n\n") + +fpin.close() +fpout.close() diff --git a/release/datafiles/preview.blend b/release/datafiles/preview.blend index 78ced06bba9..807d1b08c4d 100644 Binary files a/release/datafiles/preview.blend and b/release/datafiles/preview.blend differ diff --git a/release/datafiles/prvicons b/release/datafiles/prvicons index de3980f9676..2f715172209 100644 Binary files a/release/datafiles/prvicons and b/release/datafiles/prvicons differ diff --git a/release/datafiles/splash.jpg b/release/datafiles/splash.jpg deleted file mode 100644 index c65b2f37e87..00000000000 Binary files a/release/datafiles/splash.jpg and /dev/null differ diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png new file mode 100644 index 00000000000..e35a26a2c23 Binary files /dev/null and b/release/datafiles/splash.png differ diff --git a/release/freedesktop/blender.desktop b/release/freedesktop/blender.desktop new file mode 100644 index 00000000000..39e0e3afe8e --- /dev/null +++ b/release/freedesktop/blender.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Blender +Comment=3D modeling, animation, rendering and post-production +Exec=blender +Icon=blender.png +Terminal=false +Type=Application +Categories=Graphics;3DGraphics; +MimeType=application/x-blender; diff --git a/release/getversion.py b/release/getversion.py index a64a6189b6f..fd52129bf4a 100755 --- a/release/getversion.py +++ b/release/getversion.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# -*- mode: python; tab-width: 4; indent-tabs-mode: t; -*- +# vim: tabstop=4 +# $Id# # ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or @@ -18,9 +21,9 @@ # The Original Code is Copyright (C) 2008 by the Blender Foundation # All rights reserved. # -# The Original Code is: all of this file. +# The Original Code is: see repository. # -# Contributor(s): none yet. +# Contributor(s): see repository. # import sys, os, re @@ -49,7 +52,11 @@ for line in infile.readlines(): infile.close() +# Major was changed to float, but minor is still a string if minor and major: - print str(major)+"."+minor + if minor == "0": + print "%.2f" % major + else: + print "%.2f.%s" % (major, minor) else: print "unknownversion" diff --git a/release/io/engine_render_pov.py b/release/io/engine_render_pov.py new file mode 100644 index 00000000000..c1cd84c8978 --- /dev/null +++ b/release/io/engine_render_pov.py @@ -0,0 +1,928 @@ +import bpy + +from math import atan, pi, degrees +import subprocess +import os +import sys +import time + +import platform as pltfrm + +if pltfrm.architecture()[0] == '64bit': + bitness = 64 +else: + bitness = 32 + +def write_pov(filename, scene=None, info_callback = None): + file = open(filename, 'w') + + # Only for testing + if not scene: + scene = bpy.data.scenes[0] + + render = scene.render_data + world = scene.world + + # --- taken from fbx exporter + ## This was used to make V, but faster not to do all that + ##valid = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_,.()[]{}' + ##v = range(255) + ##for c in valid: v.remove(ord(c)) + v = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,42,43,46,47,58,59,60,61,62,63,64,92,94,96,124,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254] + invalid = ''.join([chr(i) for i in v]) + def cleanName(name): + for ch in invalid: name = name.replace(ch, '_') + return name + del v + + # --- done with clean name. + + def uniqueName(name, nameSeq): + + if name not in nameSeq: + return name + + name_orig = name + i = 1 + while name in nameSeq: + name = '%s_%.3d' % (name_orig, i) + i+=1 + + return name + + + def writeMatrix(matrix): + file.write('\tmatrix <%.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f>\n' %\ + (matrix[0][0], matrix[0][1], matrix[0][2], matrix[1][0], matrix[1][1], matrix[1][2], matrix[2][0], matrix[2][1], matrix[2][2], matrix[3][0], matrix[3][1], matrix[3][2]) ) + + def writeObjectMaterial(material): + if material and material.transparency_method=='RAYTRACE': + file.write('\tinterior { ior %.6f }\n' % material.raytrace_transparency.ior) + + # Other interior args + # fade_distance 2 + # fade_power [Value] + # fade_color + + # dispersion + # dispersion_samples + + materialNames = {} + DEF_MAT_NAME = 'Default' + def writeMaterial(material): + # Assumes only called once on each material + + if material: + name_orig = material.name + else: + name_orig = DEF_MAT_NAME + + name = materialNames[name_orig] = uniqueName(cleanName(name_orig), materialNames) + + file.write('#declare %s = finish {\n' % name) + + if material: + file.write('\tdiffuse %.3g\n' % material.diffuse_intensity) + file.write('\tspecular %.3g\n' % material.specular_intensity) + + file.write('\tambient %.3g\n' % material.ambient) + #file.write('\tambient rgb <%.3g, %.3g, %.3g>\n' % tuple([c*material.ambient for c in world.ambient_color])) # povray blends the global value + + # map hardness between 0.0 and 1.0 + roughness = ((1.0 - ((material.specular_hardness-1.0)/510.0))) + # scale from 0.0 to 0.1 + roughness *= 0.1 + # add a small value because 0.0 is invalid + roughness += (1/511.0) + + file.write('\troughness %.3g\n' % roughness) + + # 'phong 70.0 ' + + if material.raytrace_mirror.enabled: + raytrace_mirror= material.raytrace_mirror + if raytrace_mirror.reflect_factor: + file.write('\treflection {\n') + file.write('\t\trgb <%.3g, %.3g, %.3g>' % tuple(material.mirror_color)) + file.write('\t\tfresnel 1 falloff %.3g exponent %.3g metallic %.3g} ' % (raytrace_mirror.fresnel, raytrace_mirror.fresnel_factor, raytrace_mirror.reflect_factor)) + + else: + file.write('\tdiffuse 0.8\n') + file.write('\tspecular 0.2\n') + + + + # This is written into the object + ''' + if material and material.transparency_method=='RAYTRACE': + 'interior { ior %.3g} ' % material.raytrace_transparency.ior + ''' + + #file.write('\t\t\tcrand 1.0\n') # Sand granyness + #file.write('\t\t\tmetallic %.6f\n' % material.spec) + #file.write('\t\t\tphong %.6f\n' % material.spec) + #file.write('\t\t\tphong_size %.6f\n' % material.spec) + #file.write('\t\t\tbrilliance %.6f ' % (material.specular_hardness/256.0) # Like hardness + + file.write('}\n') + + def exportCamera(): + camera = scene.camera + matrix = camera.matrix + + # compute resolution + Qsize=float(render.resolution_x)/float(render.resolution_y) + + file.write('camera {\n') + file.write('\tlocation <0, 0, 0>\n') + file.write('\tlook_at <0, 0, -1>\n') + file.write('\tright <%s, 0, 0>\n' % -Qsize) + file.write('\tup <0, 1, 0>\n') + file.write('\tangle %f \n' % (360.0*atan(16.0/camera.data.lens)/pi)) + + file.write('\trotate <%.6f, %.6f, %.6f>\n' % tuple([degrees(e) for e in matrix.rotationPart().toEuler()])) + file.write('\ttranslate <%.6f, %.6f, %.6f>\n' % (matrix[3][0], matrix[3][1], matrix[3][2])) + file.write('}\n') + + + + def exportLamps(lamps): + # Get all lamps + for ob in lamps: + lamp = ob.data + + matrix = ob.matrix + + color = tuple([c * lamp.energy for c in lamp.color]) # Colour is modified by energy + + file.write('light_source {\n') + file.write('\t< 0,0,0 >\n') + file.write('\tcolor rgb<%.3g, %.3g, %.3g>\n' % color) + + if lamp.type == 'POINT': # Point Lamp + pass + elif lamp.type == 'SPOT': # Spot + file.write('\tspotlight\n') + + # Falloff is the main radius from the centre line + file.write('\tfalloff %.2f\n' % (lamp.spot_size/2.0) ) # 1 TO 179 FOR BOTH + file.write('\tradius %.6f\n' % ((lamp.spot_size/2.0) * (1-lamp.spot_blend)) ) + + # Blender does not have a tightness equivilent, 0 is most like blender default. + file.write('\ttightness 0\n') # 0:10f + + file.write('\tpoint_at <0, 0, -1>\n') + elif lamp.type == 'SUN': + file.write('\tparallel\n') + file.write('\tpoint_at <0, 0, -1>\n') # *must* be after 'parallel' + + elif lamp.type == 'AREA': + + size_x = lamp.size + samples_x = lamp.shadow_ray_samples_x + if lamp.shape == 'SQUARE': + size_y = size_x + samples_y = samples_x + else: + size_y = lamp.size_y + samples_y = lamp.shadow_ray_samples_y + + + + file.write('\tarea_light <%d,0,0>,<0,0,%d> %d, %d\n' % (size_x, size_y, samples_x, samples_y)) + if lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED': + if lamp.jitter: + file.write('\tjitter\n') + else: + file.write('\tadaptive 1\n') + file.write('\tjitter\n') + + if lamp.shadow_method == 'NOSHADOW': + file.write('\tshadowless\n') + + file.write('\tfade_distance %.6f\n' % lamp.distance) + file.write('\tfade_power %d\n' % 1) # Could use blenders lamp quad? + writeMatrix(matrix) + + file.write('}\n') + + def exportMeta(metas): + + # TODO - blenders 'motherball' naming is not supported. + + for ob in metas: + meta = ob.data + + file.write('blob {\n') + file.write('\t\tthreshold %.4g\n' % meta.threshold) + + try: + material= meta.materials[0] # lame! - blender cant do enything else. + except: + material= None + + for elem in meta.elements: + + if elem.type not in ('BALL', 'ELLIPSOID'): + continue # Not supported + + loc = elem.location + + stiffness= elem.stiffness + if elem.negative: + stiffness = -stiffness + + if elem.type == 'BALL': + + file.write('\tsphere { <%.6g, %.6g, %.6g>, %.4g, %.4g ' % (loc.x, loc.y, loc.z, elem.radius, stiffness)) + + # After this wecould do something simple like... + # "pigment {Blue} }" + # except we'll write the color + + elif elem.type == 'ELLIPSOID': + # location is modified by scale + file.write('\tsphere { <%.6g, %.6g, %.6g>, %.4g, %.4g ' % (loc.x/elem.size_x, loc.y/elem.size_y, loc.z/elem.size_z, elem.radius, stiffness)) + file.write( 'scale <%.6g, %.6g, %.6g> ' % (elem.size_x, elem.size_y, elem.size_z)) + + if material: + diffuse_color = material.diffuse_color + + if material.transparency and material.transparency_method=='RAYTRACE': trans = 1-material.raytrace_transparency.filter + else: trans = 0.0 + + file.write( + 'pigment {rgbft<%.3g, %.3g, %.3g, %.3g, %.3g>} finish {%s} }\n' % \ + (diffuse_color[0], diffuse_color[1], diffuse_color[2], 1-material.alpha, trans, materialNames[material.name]) + ) + + else: + file.write('pigment {rgb<1 1 1>} finish {%s} }\n' % DEF_MAT_NAME) # Write the finish last. + + writeObjectMaterial(material) + + writeMatrix(ob.matrix) + + file.write('}\n') + + + + + def exportMeshs(sel): + + ob_num = 0 + + for ob in sel: + ob_num+= 1 + + if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META'): + continue + + me = ob.data + me_materials= me.materials + + me = ob.create_render_mesh(scene) + + if not me: + continue + + if info_callback: + info_callback('Object %2.d of %2.d (%s)' % (ob_num, len(sel), ob.name)) + + #if ob.type!='MESH': + # continue + # me = ob.data + + matrix = ob.matrix + try: uv_layer = me.active_uv_texture.data + except:uv_layer = None + + try: vcol_layer = me.active_vertex_color.data + except:vcol_layer = None + + faces_verts = [f.verts for f in me.faces] + faces_normals = [tuple(f.normal) for f in me.faces] + verts_normals = [tuple(v.normal) for v in me.verts] + + # quads incur an extra face + quadCount = len([f for f in faces_verts if len(f)==4]) + + file.write('mesh2 {\n') + file.write('\tvertex_vectors {\n') + file.write('\t\t%s' % (len(me.verts))) # vert count + for v in me.verts: + file.write(',\n\t\t<%.6f, %.6f, %.6f>' % tuple(v.co)) # vert count + file.write('\n }\n') + + + # Build unique Normal list + uniqueNormals = {} + for fi, f in enumerate(me.faces): + fv = faces_verts[fi] + # [-1] is a dummy index, use a list so we can modify in place + if f.smooth: # Use vertex normals + for v in fv: + key = verts_normals[v] + uniqueNormals[key] = [-1] + else: # Use face normal + key = faces_normals[fi] + uniqueNormals[key] = [-1] + + file.write('\tnormal_vectors {\n') + file.write('\t\t%d' % len(uniqueNormals)) # vert count + idx = 0 + for no, index in uniqueNormals.items(): + file.write(',\n\t\t<%.6f, %.6f, %.6f>' % no) # vert count + index[0] = idx + idx +=1 + file.write('\n }\n') + + + # Vertex colours + vertCols = {} # Use for material colours also. + + if uv_layer: + # Generate unique UV's + uniqueUVs = {} + + for fi, uv in enumerate(uv_layer): + + if len(faces_verts[fi])==4: + uvs = uv.uv1, uv.uv2, uv.uv3, uv.uv4 + else: + uvs = uv.uv1, uv.uv2, uv.uv3 + + for uv in uvs: + uniqueUVs[tuple(uv)] = [-1] + + file.write('\tuv_vectors {\n') + #print unique_uvs + file.write('\t\t%s' % (len(uniqueUVs))) # vert count + idx = 0 + for uv, index in uniqueUVs.items(): + file.write(',\n\t\t<%.6f, %.6f>' % uv) + index[0] = idx + idx +=1 + ''' + else: + # Just add 1 dummy vector, no real UV's + file.write('\t\t1') # vert count + file.write(',\n\t\t<0.0, 0.0>') + ''' + file.write('\n }\n') + + + if me.vertex_colors: + + for fi, f in enumerate(me.faces): + material_index = f.material_index + material = me_materials[material_index] + + if material and material.vertex_color_paint: + + col = vcol_layer[fi] + + if len(faces_verts[fi])==4: + cols = col.color1, col.color2, col.color3, col.color4 + else: + cols = col.color1, col.color2, col.color3 + + for col in cols: + key = col[0], col[1], col[2], material_index # Material index! + vertCols[key] = [-1] + + else: + if material: + diffuse_color = tuple(material.diffuse_color) + key = diffuse_color[0], diffuse_color[1], diffuse_color[2], material_index + vertCols[key] = [-1] + + + else: + # No vertex colours, so write material colours as vertex colours + for i, material in enumerate(me_materials): + + if material: + diffuse_color = tuple(material.diffuse_color) + key = diffuse_color[0], diffuse_color[1], diffuse_color[2], i # i == f.mat + vertCols[key] = [-1] + + + # Vert Colours + file.write('\ttexture_list {\n') + file.write('\t\t%s' % (len(vertCols))) # vert count + idx=0 + for col, index in vertCols.items(): + + if me_materials: + material = me_materials[col[3]] + material_finish = materialNames[material.name] + + if material.transparency and material.transparency_method=='RAYTRACE': trans = 1-material.raytrace_transparency.filter + else: trans = 0.0 + + else: + material_finish = DEF_MAT_NAME # not working properly, + trans = 0.0 + + #print material.apl + file.write( ',\n\t\ttexture { pigment {rgbft<%.3g, %.3g, %.3g, %.3g, %.3g>} finish {%s}}' % + (col[0], col[1], col[2], 1-material.alpha, trans, material_finish) ) + + index[0] = idx + idx+=1 + + file.write( '\n }\n' ) + + # Face indicies + file.write('\tface_indices {\n') + file.write('\t\t%d' % (len(me.faces) + quadCount)) # faces count + for fi, f in enumerate(me.faces): + fv = faces_verts[fi] + material_index= f.material_index + if len(fv) == 4: indicies = (0,1,2), (0,2,3) + else: indicies = ((0,1,2),) + + if vcol_layer: + col = vcol_layer[fi] + + if len(fv) == 4: + cols = col.color1, col.color2, col.color3, col.color4 + else: + cols = col.color1, col.color2, col.color3 + + + if not me_materials or me_materials[material_index] == None: # No materials + for i1, i2, i3 in indicies: + file.write(',\n\t\t<%d,%d,%d>' % (fv[i1], fv[i2], fv[i3])) # vert count + else: + material = me_materials[material_index] + for i1, i2, i3 in indicies: + if me.vertex_colors and material.vertex_color_paint: + # Colour per vertex - vertex colour + + col1 = cols[i1] + col2 = cols[i2] + col3 = cols[i3] + + ci1 = vertCols[col1[0], col1[1], col1[2], material_index][0] + ci2 = vertCols[col2[0], col2[1], col2[2], material_index][0] + ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0] + else: + # Colour per material - flat material colour + diffuse_color= material.diffuse_color + ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], diffuse_color[2], f.material_index][0] + + file.write(',\n\t\t<%d,%d,%d>, %d,%d,%d' % (fv[i1], fv[i2], fv[i3], ci1, ci2, ci3)) # vert count + + + + file.write('\n }\n') + + # normal_indices indicies + file.write('\tnormal_indices {\n') + file.write('\t\t%d' % (len(me.faces) + quadCount)) # faces count + for fi, fv in enumerate(faces_verts): + + if len(fv) == 4: indicies = (0,1,2), (0,2,3) + else: indicies = ((0,1,2),) + + for i1, i2, i3 in indicies: + if f.smooth: + file.write(',\n\t\t<%d,%d,%d>' %\ + (uniqueNormals[verts_normals[fv[i1]]][0],\ + uniqueNormals[verts_normals[fv[i2]]][0],\ + uniqueNormals[verts_normals[fv[i3]]][0])) # vert count + else: + idx = uniqueNormals[faces_normals[fi]][0] + file.write(',\n\t\t<%d,%d,%d>' % (idx, idx, idx)) # vert count + + file.write('\n }\n') + + if uv_layer: + file.write('\tuv_indices {\n') + file.write('\t\t%d' % (len(me.faces) + quadCount)) # faces count + for fi, fv in enumerate(faces_verts): + + if len(fv) == 4: indicies = (0,1,2), (0,2,3) + else: indicies = ((0,1,2),) + + uv = uv_layer[fi] + if len(faces_verts[fi])==4: + uvs = tuple(uv.uv1), tuple(uv.uv2), tuple(uv.uv3), tuple(uv.uv4) + else: + uvs = tuple(uv.uv1), tuple(uv.uv2), tuple(uv.uv3) + + for i1, i2, i3 in indicies: + file.write(',\n\t\t<%d,%d,%d>' %\ + (uniqueUVs[uvs[i1]][0],\ + uniqueUVs[uvs[i2]][0],\ + uniqueUVs[uvs[i2]][0])) # vert count + file.write('\n }\n') + + if me.materials: + material = me.materials[0] # dodgy + writeObjectMaterial(material) + + writeMatrix(matrix) + file.write('}\n') + + bpy.data.remove_mesh(me) + + def exportWorld(world): + if not world: + return + + mist = world.mist + + if mist.enabled: + file.write('fog {\n') + file.write('\tdistance %.6f\n' % mist.depth) + file.write('\tcolor rgbt<%.3g, %.3g, %.3g, %.3g>\n' % (tuple(world.horizon_color) + (1-mist.intensity,))) + #file.write('\tfog_offset %.6f\n' % mist.start) + #file.write('\tfog_alt 5\n') + #file.write('\tturbulence 0.2\n') + #file.write('\tturb_depth 0.3\n') + file.write('\tfog_type 1\n') + file.write('}\n') + + def exportGlobalSettings(scene): + + file.write('global_settings {\n') + + if scene.pov_radio_enable: + file.write('\tradiosity {\n') + file.write("\t\tadc_bailout %.4g\n" % scene.pov_radio_adc_bailout) + file.write("\t\talways_sample %d\n" % scene.pov_radio_always_sample) + file.write("\t\tbrightness %.4g\n" % scene.pov_radio_brightness) + file.write("\t\tcount %d\n" % scene.pov_radio_count) + file.write("\t\terror_bound %.4g\n" % scene.pov_radio_error_bound) + file.write("\t\tgray_threshold %.4g\n" % scene.pov_radio_gray_threshold) + file.write("\t\tlow_error_factor %.4g\n" % scene.pov_radio_low_error_factor) + file.write("\t\tmedia %d\n" % scene.pov_radio_media) + file.write("\t\tminimum_reuse %.4g\n" % scene.pov_radio_minimum_reuse) + file.write("\t\tnearest_count %d\n" % scene.pov_radio_nearest_count) + file.write("\t\tnormal %d\n" % scene.pov_radio_normal) + file.write("\t\trecursion_limit %d\n" % scene.pov_radio_recursion_limit) + file.write('\t}\n') + + if world: + file.write("\tambient_light rgb<%.3g, %.3g, %.3g>\n" % tuple(world.ambient_color)) + + file.write('}\n') + + + # Convert all materials to strings we can access directly per vertex. + writeMaterial(None) # default material + + for material in bpy.data.materials: + writeMaterial(material) + + exportCamera() + #exportMaterials() + sel = scene.objects + exportLamps([l for l in sel if l.type == 'LAMP']) + exportMeta([l for l in sel if l.type == 'META']) + exportMeshs(sel) + exportWorld(scene.world) + exportGlobalSettings(scene) + + file.close() + + +def write_pov_ini(filename_ini, filename_pov, filename_image): + scene = bpy.data.scenes[0] + render = scene.render_data + + x= int(render.resolution_x*render.resolution_percentage*0.01) + y= int(render.resolution_y*render.resolution_percentage*0.01) + + file = open(filename_ini, 'w') + + file.write('Input_File_Name="%s"\n' % filename_pov) + file.write('Output_File_Name="%s"\n' % filename_image) + + file.write('Width=%d\n' % x) + file.write('Height=%d\n' % y) + + # Needed for border render. + ''' + file.write('Start_Column=%d\n' % part.x) + file.write('End_Column=%d\n' % (part.x+part.w)) + + file.write('Start_Row=%d\n' % (part.y)) + file.write('End_Row=%d\n' % (part.y+part.h)) + ''' + + file.write('Display=0\n') + file.write('Pause_When_Done=0\n') + file.write('Output_File_Type=T\n') # TGA, best progressive loading + file.write('Output_Alpha=1\n') + + if render.antialiasing: + aa_mapping = {'OVERSAMPLE_5':2, 'OVERSAMPLE_8':3, 'OVERSAMPLE_11':4, 'OVERSAMPLE_16':5} # method 1 assumed + file.write('Antialias=1\n') + file.write('Antialias_Depth=%d\n' % aa_mapping[render.antialiasing_samples]) + else: + file.write('Antialias=0\n') + + file.close() + +# Radiosity panel, use in the scene for now. +FloatProperty= bpy.types.Scene.FloatProperty +IntProperty= bpy.types.Scene.IntProperty +BoolProperty= bpy.types.Scene.BoolProperty + +# Not a real pov option, just to know if we should write +BoolProperty( attr="pov_radio_enable", + name="Enable Radiosity", + description="Enable povrays radiosity calculation.", + default= False) +BoolProperty( attr="pov_radio_display_advanced", + name="Advanced Options", + description="Show advanced options.", + default= False) + +# Real pov options +FloatProperty( attr="pov_radio_adc_bailout", + name="ADC Bailout", + description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results.", + min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default= 0.01) + +BoolProperty( attr="pov_radio_always_sample", + name="Always Sample", + description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass..", + default= True) + +FloatProperty( attr="pov_radio_brightness", + name="Brightness", + description="Ammount objects are brightened before being returned upwards to the rest of the system.", + min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default= 1.0) + +IntProperty( attr="pov_radio_count", + name="Ray Count", + description="number of rays that are sent out whenever a new radiosity value has to be calculated.", + min=1, max=1600, default= 35) + +FloatProperty( attr="pov_radio_error_bound", + name="Error Bound", + description="one of the two main speed/quality tuning values, lower values are more accurate.", + min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default= 1.8) + +FloatProperty( attr="pov_radio_gray_threshold", + name="Gray Threshold", + description="one of the two main speed/quality tuning values, lower values are more accurate.", + min=0.0, max=1.0, soft_min=0, soft_max=1, default= 0.0) + +FloatProperty( attr="pov_radio_low_error_factor", + name="Low Error Factor", + description="If you calculate just enough samples, but no more, you will get an image which has slightly blotchy lighting.", + min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default= 0.5) + +# max_sample - not available yet +BoolProperty( attr="pov_radio_media", + name="Media", + description="Radiosity estimation can be affected by media.", + default= False) + +FloatProperty( attr="pov_radio_minimum_reuse", + name="Minimum Reuse", + description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors).", + min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default= 0.015) + +IntProperty( attr="pov_radio_nearest_count", + name="Nearest Count", + description="Number of old ambient values blended together to create a new interpolated value.", + min=1, max=20, default= 5) + +BoolProperty( attr="pov_radio_normal", + name="Normals", + description="Radiosity estimation can be affected by normals.", + default= False) + +IntProperty( attr="pov_radio_recursion_limit", + name="Recursion Limit", + description="how many recursion levels are used to calculate the diffuse inter-reflection.", + min=1, max=20, default= 3) + + +class PovrayRender(bpy.types.RenderEngine): + __idname__ = 'POVRAY_RENDER' + __label__ = "Povray" + DELAY = 0.02 + + def _export(self, scene): + import tempfile + + self.temp_file_in = tempfile.mktemp(suffix='.pov') + self.temp_file_out = tempfile.mktemp(suffix='.tga') + self.temp_file_ini = tempfile.mktemp(suffix='.ini') + ''' + self.temp_file_in = '/test.pov' + self.temp_file_out = '/test.tga' + self.temp_file_ini = '/test.ini' + ''' + + def info_callback(txt): + self.update_stats("", "POVRAY: " + txt) + + write_pov(self.temp_file_in, scene, info_callback) + + def _render(self): + + try: os.remove(self.temp_file_out) # so as not to load the old file + except: pass + + write_pov_ini(self.temp_file_ini, self.temp_file_in, self.temp_file_out) + + print ("***-STARTING-***") + + pov_binary = "povray" + + if sys.platform=='win32': + import winreg + regKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\POV-Ray\\v3.6\\Windows') + + if bitness == 64: + pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine64' + else: + pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine' + + if 1: + self.process = subprocess.Popen([pov_binary, self.temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE + else: + # This works too but means we have to wait until its done + os.system('%s %s' % (pov_binary, self.temp_file_ini)) + + print ("***-DONE-***") + + def _cleanup(self): + for f in (self.temp_file_in, self.temp_file_ini, self.temp_file_out): + try: os.remove(f) + except: pass + + self.update_stats("", "") + + def render(self, scene): + + self.update_stats("", "POVRAY: Exporting data from Blender") + self._export(scene) + self.update_stats("", "POVRAY: Parsing File") + self._render() + + r = scene.render_data + + # compute resolution + x= int(r.resolution_x*r.resolution_percentage*0.01) + y= int(r.resolution_y*r.resolution_percentage*0.01) + + + + # Wait for the file to be created + while not os.path.exists(self.temp_file_out): + if self.test_break(): + try: self.process.terminate() + except: pass + break + + if self.process.poll() != None: + self.update_stats("", "POVRAY: Failed") + break + + time.sleep(self.DELAY) + + if os.path.exists(self.temp_file_out): + + self.update_stats("", "POVRAY: Rendering") + + prev_size = -1 + + def update_image(): + result = self.begin_result(0, 0, x, y) + lay = result.layers[0] + # possible the image wont load early on. + try: lay.load_from_file(self.temp_file_out) + except: pass + self.end_result(result) + + # Update while povray renders + while True: + + # test if povray exists + if self.process.poll() != None: + update_image(); + break + + # user exit + if self.test_break(): + try: self.process.terminate() + except: pass + + break + + # Would be nice to redirect the output + # stdout_value, stderr_value = self.process.communicate() # locks + + + # check if the file updated + new_size = os.path.getsize(self.temp_file_out) + + if new_size != prev_size: + update_image() + prev_size = new_size + + time.sleep(self.DELAY) + + self._cleanup() + +bpy.types.register(PovrayRender) + +# Use some of the existing buttons. +import buttons_scene +buttons_scene.SCENE_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER') +buttons_scene.SCENE_PT_dimensions.COMPAT_ENGINES.add('POVRAY_RENDER') +buttons_scene.SCENE_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER') +buttons_scene.SCENE_PT_output.COMPAT_ENGINES.add('POVRAY_RENDER') +del buttons_scene + +# Use only a subset of the world panels +import buttons_world +buttons_world.WORLD_PT_preview.COMPAT_ENGINES.add('POVRAY_RENDER') +buttons_world.WORLD_PT_context_world.COMPAT_ENGINES.add('POVRAY_RENDER') +buttons_world.WORLD_PT_world.COMPAT_ENGINES.add('POVRAY_RENDER') +buttons_world.WORLD_PT_mist.COMPAT_ENGINES.add('POVRAY_RENDER') +del buttons_world + +# Example of wrapping every class 'as is' +import buttons_material +for member in dir(buttons_material): + subclass = getattr(buttons_material, member) + try: subclass.COMPAT_ENGINES.add('POVRAY_RENDER') + except: pass +del buttons_material + +class RenderButtonsPanel(bpy.types.Panel): + __space_type__ = 'PROPERTIES' + __region_type__ = 'WINDOW' + __context__ = "scene" + # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here + + def poll(self, context): + rd = context.scene.render_data + return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES) + +class SCENE_PT_povray_radiosity(RenderButtonsPanel): + __label__ = "Radiosity" + COMPAT_ENGINES = set(['POVRAY_RENDER']) + + def draw_header(self, context): + layout = self.layout + scene = context.scene + layout.itemR(scene, "pov_radio_enable", text="") + + def draw(self, context): + layout = self.layout + scene = context.scene + rd = scene.render_data + + layout.active = scene.pov_radio_enable + + split = layout.split() + + col = split.column() + + col.itemR(scene, "pov_radio_count", text="Rays") + col.itemR(scene, "pov_radio_recursion_limit", text="Recursions") + col = split.column() + col.itemR(scene, "pov_radio_error_bound", text="Error") + + layout.itemR(scene, "pov_radio_display_advanced") + + if scene.pov_radio_display_advanced: + split = layout.split() + + col = split.column() + col.itemR(scene, "pov_radio_adc_bailout", slider=True) + col.itemR(scene, "pov_radio_gray_threshold", slider=True) + col.itemR(scene, "pov_radio_low_error_factor", slider=True) + + + + col = split.column() + col.itemR(scene, "pov_radio_brightness") + col.itemR(scene, "pov_radio_minimum_reuse", text="Min Reuse") + col.itemR(scene, "pov_radio_nearest_count") + + + split = layout.split() + + col = split.column() + col.itemL(text="Estimation Influence:") + col.itemR(scene, "pov_radio_media") + col.itemR(scene, "pov_radio_normal") + + col = split.column() + col.itemR(scene, "pov_radio_always_sample") + + +bpy.types.register(SCENE_PT_povray_radiosity) diff --git a/release/io/export_ply.py b/release/io/export_ply.py new file mode 100644 index 00000000000..b8fbe56f01c --- /dev/null +++ b/release/io/export_ply.py @@ -0,0 +1,281 @@ +import bpy + +__author__ = "Bruce Merry" +__version__ = "0.93" +__bpydoc__ = """\ +This script exports Stanford PLY files from Blender. It supports normals, +colours, and texture coordinates per face or per vertex. +Only one mesh can be exported at a time. +""" + +# Copyright (C) 2004, 2005: Bruce Merry, bmerry@cs.uct.ac.za +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Vector rounding se we can use as keys +# +# Updated on Aug 11, 2008 by Campbell Barton +# - added 'comment' prefix to comments - Needed to comply with the PLY spec. +# +# Updated on Jan 1, 2007 by Gabe Ghearing +# - fixed normals so they are correctly smooth/flat +# - fixed crash when the model doesn't have uv coords or vertex colors +# - fixed crash when the model has vertex colors but doesn't have uv coords +# - changed float32 to float and uint8 to uchar for compatibility +# Errata/Notes as of Jan 1, 2007 +# - script exports texture coords if they exist even if TexFace isn't selected (not a big deal to me) +# - ST(R) should probably be renamed UV(T) like in most PLY files (importer needs to be updated to take either) +# +# Updated on Jan 3, 2007 by Gabe Ghearing +# - fixed "sticky" vertex UV exporting +# - added pupmenu to enable/disable exporting normals, uv coords, and colors +# Errata/Notes as of Jan 3, 2007 +# - ST(R) coords should probably be renamed UV(T) like in most PLY files (importer needs to be updated to take either) +# - edges should be exported since PLY files support them +# - code is getting spaghettish, it should be refactored... +# + + +def rvec3d(v): return round(v[0], 6), round(v[1], 6), round(v[2], 6) +def rvec2d(v): return round(v[0], 6), round(v[1], 6) + +def write(filename, scene, ob, \ + EXPORT_APPLY_MODIFIERS= True,\ + EXPORT_NORMALS= True,\ + EXPORT_UV= True,\ + EXPORT_COLORS= True\ + ): + + if not filename.lower().endswith('.ply'): + filename += '.ply' + + if not ob: + raise Exception("Error, Select 1 active object") + return + + file = open(filename, 'w') + + + #EXPORT_EDGES = Draw.Create(0) + """ + is_editmode = Blender.Window.EditMode() + if is_editmode: + Blender.Window.EditMode(0, '', 0) + + Window.WaitCursor(1) + """ + + #mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) # XXX + if EXPORT_APPLY_MODIFIERS: + mesh = ob.create_render_mesh(scene) + else: + mesh = ob.data + + if not mesh: + raise ("Error, could not get mesh data from active object") + return + + # mesh.transform(ob.matrixWorld) # XXX + + faceUV = len(mesh.uv_textures) > 0 + vertexUV = len(mesh.sticky) > 0 + vertexColors = len(mesh.vertex_colors) > 0 + + if (not faceUV) and (not vertexUV): EXPORT_UV = False + if not vertexColors: EXPORT_COLORS = False + + if not EXPORT_UV: faceUV = vertexUV = False + if not EXPORT_COLORS: vertexColors = False + + if faceUV: + active_uv_layer = None + for lay in mesh.uv_textures: + if lay.active: + active_uv_layer= lay.data + break + if not active_uv_layer: + EXPORT_UV = False + faceUV = None + + if vertexColors: + active_col_layer = None + for lay in mesh.vertex_colors: + if lay.active: + active_col_layer= lay.data + if not active_col_layer: + EXPORT_COLORS = False + vertexColors = None + + # incase + color = uvcoord = uvcoord_key = normal = normal_key = None + + mesh_verts = mesh.verts # save a lookup + ply_verts = [] # list of dictionaries + # vdict = {} # (index, normal, uv) -> new index + vdict = [{} for i in range(len(mesh_verts))] + ply_faces = [[] for f in range(len(mesh.faces))] + vert_count = 0 + for i, f in enumerate(mesh.faces): + + + smooth = f.smooth + if not smooth: + normal = tuple(f.normal) + normal_key = rvec3d(normal) + + if faceUV: + uv = active_uv_layer[i] + uv = uv.uv1, uv.uv2, uv.uv3, uv.uv4 # XXX - crufty :/ + if vertexColors: + col = active_col_layer[i] + col = col.color1, col.color2, col.color3, col.color4 + + f_verts= f.verts + + pf= ply_faces[i] + for j, vidx in enumerate(f_verts): + v = mesh_verts[vidx] + + if smooth: + normal= tuple(v.normal) + normal_key = rvec3d(normal) + + if faceUV: + uvcoord= uv[j][0], 1.0-uv[j][1] + uvcoord_key = rvec2d(uvcoord) + elif vertexUV: + uvcoord= v.uvco[0], 1.0-v.uvco[1] + uvcoord_key = rvec2d(uvcoord) + + if vertexColors: + color= col[j] + color= int(color[0]*255.0), int(color[1]*255.0), int(color[2]*255.0) + + + key = normal_key, uvcoord_key, color + + vdict_local = vdict[vidx] + pf_vidx = vdict_local.get(key) # Will be None initially + + if pf_vidx == None: # same as vdict_local.has_key(key) + pf_vidx = vdict_local[key] = vert_count; + ply_verts.append((vidx, normal, uvcoord, color)) + vert_count += 1 + + pf.append(pf_vidx) + + file.write('ply\n') + file.write('format ascii 1.0\n') + version = "2.5" # Blender.Get('version') + file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (version, bpy.data.filename.split('/')[-1].split('\\')[-1] )) + + file.write('element vertex %d\n' % len(ply_verts)) + + file.write('property float x\n') + file.write('property float y\n') + file.write('property float z\n') + + # XXX + """ + if EXPORT_NORMALS: + file.write('property float nx\n') + file.write('property float ny\n') + file.write('property float nz\n') + """ + if EXPORT_UV: + file.write('property float s\n') + file.write('property float t\n') + if EXPORT_COLORS: + file.write('property uchar red\n') + file.write('property uchar green\n') + file.write('property uchar blue\n') + + file.write('element face %d\n' % len(mesh.faces)) + file.write('property list uchar uint vertex_indices\n') + file.write('end_header\n') + + for i, v in enumerate(ply_verts): + file.write('%.6f %.6f %.6f ' % tuple(mesh_verts[v[0]].co)) # co + """ + if EXPORT_NORMALS: + file.write('%.6f %.6f %.6f ' % v[1]) # no + """ + if EXPORT_UV: file.write('%.6f %.6f ' % v[2]) # uv + if EXPORT_COLORS: file.write('%u %u %u' % v[3]) # col + file.write('\n') + + for pf in ply_faces: + if len(pf)==3: file.write('3 %d %d %d\n' % tuple(pf)) + else: file.write('4 %d %d %d %d\n' % tuple(pf)) + + file.close() + print("writing", filename, "done") + + if EXPORT_APPLY_MODIFIERS: + bpy.data.remove_mesh(mesh) + + # XXX + """ + if is_editmode: + Blender.Window.EditMode(1, '', 0) + """ + +class EXPORT_OT_ply(bpy.types.Operator): + ''' + Operator documentatuon text, will be used for the operator tooltip and python docs. + ''' + __idname__ = "export.ply" + __label__ = "Export PLY" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [ + bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= ""), + bpy.props.BoolProperty(attr="use_modifiers", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True), + bpy.props.BoolProperty(attr="use_normals", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True), + bpy.props.BoolProperty(attr="use_uvs", name="Export UVs", description="Exort the active UV layer", default= True), + bpy.props.BoolProperty(attr="use_colors", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True) + ] + + def poll(self, context): + return context.active_object != None + + def execute(self, context): + # print("Selected: " + context.active_object.name) + + if not self.path: + raise Exception("filename not set") + + write(self.path, context.scene, context.active_object,\ + EXPORT_APPLY_MODIFIERS = self.use_modifiers, + EXPORT_NORMALS = self.use_normals, + EXPORT_UV = self.use_uvs, + EXPORT_COLORS = self.use_colors, + ) + + return ('FINISHED',) + + def invoke(self, context, event): + wm = context.manager + wm.add_fileselect(self.__operator__) + return ('RUNNING_MODAL',) + + +bpy.ops.add(EXPORT_OT_ply) + +if __name__ == "__main__": + bpy.ops.EXPORT_OT_ply(path="/tmp/test.ply") + + diff --git a/release/io/netrender/__init__.py b/release/io/netrender/__init__.py new file mode 100644 index 00000000000..1eb91abb938 --- /dev/null +++ b/release/io/netrender/__init__.py @@ -0,0 +1,17 @@ +# This directory is a Python package. + +import model +import operators +import client +import slave +import master +import utils +import ui + +# store temp data in bpy module + +import bpy + +bpy.data.netrender_jobs = [] +bpy.data.netrender_slaves = [] +bpy.data.netrender_blacklist = [] \ No newline at end of file diff --git a/release/io/netrender/client.py b/release/io/netrender/client.py new file mode 100644 index 00000000000..a6cfb4e020d --- /dev/null +++ b/release/io/netrender/client.py @@ -0,0 +1,204 @@ +import bpy +import sys, os +import http, http.client, http.server, urllib +import subprocess, shutil, time, hashlib + +import netrender.slave as slave +import netrender.master as master +from netrender.utils import * + + +def clientSendJob(conn, scene, anim = False, chunks = 5): + netsettings = scene.network_render + job = netrender.model.RenderJob() + + if anim: + for f in range(scene.start_frame, scene.end_frame + 1): + job.addFrame(f) + else: + job.addFrame(scene.current_frame) + + filename = bpy.data.filename + job.addFile(filename) + + job_name = netsettings.job_name + path, name = os.path.split(filename) + if job_name == "[default]": + job_name = name + + ########################### + # LIBRARIES + ########################### + for lib in bpy.data.libraries: + lib_path = lib.filename + + if lib_path.startswith("//"): + lib_path = path + os.sep + lib_path[2:] + + job.addFile(lib_path) + + ########################### + # POINT CACHES + ########################### + + root, ext = os.path.splitext(name) + cache_path = path + os.sep + "blendcache_" + root + os.sep # need an API call for that + + if os.path.exists(cache_path): + caches = {} + pattern = re.compile("([a-zA-Z0-9]+)_([0-9]+)_[0-9]+\.bphys") + for cache_file in sorted(os.listdir(cache_path)): + match = pattern.match(cache_file) + + if match: + cache_id = match.groups()[0] + cache_frame = int(match.groups()[1]) + + cache_files = caches.get(cache_id, []) + cache_files.append((cache_frame, cache_file)) + caches[cache_id] = cache_files + + for cache in caches.values(): + cache.sort() + + if len(cache) == 1: + cache_frame, cache_file = cache[0] + job.addFile(cache_path + cache_file, cache_frame, cache_frame) + else: + for i in range(len(cache)): + current_item = cache[i] + next_item = cache[i+1] if i + 1 < len(cache) else None + previous_item = cache[i - 1] if i > 0 else None + + current_frame, current_file = current_item + + if not next_item and not previous_item: + job.addFile(cache_path + current_file, current_frame, current_frame) + elif next_item and not previous_item: + next_frame = next_item[0] + job.addFile(cache_path + current_file, current_frame, next_frame - 1) + elif not next_item and previous_item: + previous_frame = previous_item[0] + job.addFile(cache_path + current_file, previous_frame + 1, current_frame) + else: + next_frame = next_item[0] + previous_frame = previous_item[0] + job.addFile(cache_path + current_file, previous_frame + 1, next_frame - 1) + + ########################### + # IMAGES + ########################### + for image in bpy.data.images: + if image.source == "FILE" and not image.packed_file: + job.addFile(image.filename) + + # print(job.files) + + job.name = job_name + + for slave in scene.network_render.slaves_blacklist: + job.blacklist.append(slave.id) + + job.chunks = netsettings.chunks + job.priority = netsettings.priority + + # try to send path first + conn.request("POST", "job", repr(job.serialize())) + response = conn.getresponse() + + job_id = response.getheader("job-id") + + # if not ACCEPTED (but not processed), send files + if response.status == http.client.ACCEPTED: + for filepath, start, end in job.files: + f = open(filepath, "rb") + conn.request("PUT", "file", f, headers={"job-id": job_id, "job-file": filepath}) + f.close() + response = conn.getresponse() + + # server will reply with NOT_FOUD until all files are found + + return job_id + +def requestResult(conn, job_id, frame): + conn.request("GET", "render", headers={"job-id": job_id, "job-frame":str(frame)}) + +@rnaType +class NetworkRenderEngine(bpy.types.RenderEngine): + __idname__ = 'NET_RENDER' + __label__ = "Network Render" + def render(self, scene): + if scene.network_render.mode == "RENDER_CLIENT": + self.render_client(scene) + elif scene.network_render.mode == "RENDER_SLAVE": + self.render_slave(scene) + elif scene.network_render.mode == "RENDER_MASTER": + self.render_master(scene) + else: + print("UNKNOWN OPERATION MODE") + + def render_master(self, scene): + netsettings = scene.network_render + + address = "" if netsettings.server_address == "[default]" else netsettings.server_address + + master.runMaster((address, netsettings.server_port), netsettings.server_broadcast, netsettings.path, self.update_stats, self.test_break) + + + def render_slave(self, scene): + slave.render_slave(self, scene) + + def render_client(self, scene): + netsettings = scene.network_render + self.update_stats("", "Network render client initiation") + + + conn = clientConnection(scene) + + if conn: + # Sending file + + self.update_stats("", "Network render exporting") + + job_id = netsettings.job_id + + # reading back result + + self.update_stats("", "Network render waiting for results") + + requestResult(conn, job_id, scene.current_frame) + response = conn.getresponse() + + if response.status == http.client.NO_CONTENT: + netsettings.job_id = clientSendJob(conn, scene) + requestResult(conn, job_id, scene.current_frame) + + while response.status == http.client.ACCEPTED and not self.test_break(): + print("waiting") + time.sleep(1) + requestResult(conn, job_id, scene.current_frame) + response = conn.getresponse() + + if response.status != http.client.OK: + conn.close() + return + + r = scene.render_data + x= int(r.resolution_x*r.resolution_percentage*0.01) + y= int(r.resolution_y*r.resolution_percentage*0.01) + + f = open(netsettings.path + "output.exr", "wb") + buf = response.read(1024) + + while buf: + f.write(buf) + buf = response.read(1024) + + f.close() + + result = self.begin_result(0, 0, x, y) + result.load_from_file(netsettings.path + "output.exr", 0, 0) + self.end_result(result) + + conn.close() + diff --git a/release/io/netrender/master.py b/release/io/netrender/master.py new file mode 100644 index 00000000000..58af47d6240 --- /dev/null +++ b/release/io/netrender/master.py @@ -0,0 +1,671 @@ +import sys, os +import http, http.client, http.server, urllib, socket +import subprocess, shutil, time, hashlib + +from netrender.utils import * +import netrender.model + +JOB_WAITING = 0 # before all data has been entered +JOB_PAUSED = 1 # paused by user +JOB_QUEUED = 2 # ready to be dispatched + +class MRenderFile: + def __init__(self, filepath, start, end): + self.filepath = filepath + self.start = start + self.end = end + self.found = False + + def test(self): + self.found = os.path.exists(self.filepath) + return self.found + + +class MRenderSlave(netrender.model.RenderSlave): + def __init__(self, name, address, stats): + super().__init__() + self.id = hashlib.md5(bytes(repr(name) + repr(address), encoding='utf8')).hexdigest() + self.name = name + self.address = address + self.stats = stats + self.last_seen = time.time() + + self.job = None + self.frame = None + + netrender.model.RenderSlave._slave_map[self.id] = self + + def seen(self): + self.last_seen = time.time() + +# sorting key for jobs +def groupKey(job): + return (job.status, job.framesLeft() > 0, job.priority, job.credits) + +class MRenderJob(netrender.model.RenderJob): + def __init__(self, job_id, name, files, chunks = 1, priority = 1, credits = 100.0, blacklist = []): + super().__init__() + self.id = job_id + self.name = name + self.files = files + self.frames = [] + self.chunks = chunks + self.priority = priority + self.credits = credits + self.blacklist = blacklist + self.last_dispatched = time.time() + + # special server properties + self.save_path = "" + self.files_map = {path: MRenderFile(path, start, end) for path, start, end in files} + self.status = JOB_WAITING + + def save(self): + if self.save_path: + f = open(self.save_path + "job.txt", "w") + f.write(repr(self.serialize())) + f.close() + + def testStart(self): + for f in self.files_map.values(): + if not f.test(): + return False + + self.start() + return True + + def start(self): + self.status = JOB_QUEUED + + def update(self): + self.credits -= 5 # cost of one frame + self.credits += (time.time() - self.last_dispatched) / 60 + self.last_dispatched = time.time() + + def addLog(self, frames): + log_name = "_".join(("%04d" % f for f in frames)) + ".log" + log_path = self.save_path + log_name + + for number in frames: + frame = self[number] + if frame: + frame.log_path = log_path + + def addFrame(self, frame_number): + frame = MRenderFrame(frame_number) + self.frames.append(frame) + return frame + + def framesLeft(self): + total = 0 + for j in self.frames: + if j.status == QUEUED: + total += 1 + + return total + + def reset(self, all): + for f in self.frames: + f.reset(all) + + def getFrames(self): + frames = [] + for f in self.frames: + if f.status == QUEUED: + self.update() + frames.append(f) + if len(frames) >= self.chunks: + break + + return frames + +class MRenderFrame(netrender.model.RenderFrame): + def __init__(self, frame): + super().__init__() + self.number = frame + self.slave = None + self.time = 0 + self.status = QUEUED + self.log_path = None + + def reset(self, all): + if all or self.status == ERROR: + self.slave = None + self.time = 0 + self.status = QUEUED + + +# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +class RenderHandler(http.server.BaseHTTPRequestHandler): + def send_head(self, code = http.client.OK, headers = {}): + self.send_response(code) + self.send_header("Content-type", "application/octet-stream") + + for key, value in headers.items(): + self.send_header(key, value) + + self.end_headers() + + def do_HEAD(self): + print(self.path) + + if self.path == "status": + job_id = self.headers.get('job-id', "") + job_frame = int(self.headers.get('job-frame', -1)) + + if job_id: + print("status:", job_id, "\n") + + job = self.server.getJobByID(job_id) + if job: + if job_frame != -1: + frame = job[frame] + + if not frame: + # no such frame + self.send_heat(http.client.NO_CONTENT) + return + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + return + + self.send_head() + + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + def do_GET(self): + print(self.path) + + if self.path == "version": + self.send_head() + self.server.stats("", "New client connection") + self.wfile.write(VERSION) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "render": + job_id = self.headers['job-id'] + job_frame = int(self.headers['job-frame']) + print("render:", job_id, job_frame) + + job = self.server.getJobByID(job_id) + + if job: + frame = job[job_frame] + + if frame: + if frame.status in (QUEUED, DISPATCHED): + self.send_head(http.client.ACCEPTED) + elif frame.status == DONE: + self.server.stats("", "Sending result back to client") + f = open(job.save_path + "%04d" % job_frame + ".exr", 'rb') + + self.send_head() + + shutil.copyfileobj(f, self.wfile) + + f.close() + elif frame.status == ERROR: + self.send_head(http.client.PARTIAL_CONTENT) + else: + # no such frame + self.send_head(http.client.NO_CONTENT) + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "log": + job_id = self.headers['job-id'] + job_frame = int(self.headers['job-frame']) + print("log:", job_id, job_frame) + + job = self.server.getJobByID(job_id) + + if job: + frame = job[job_frame] + + if frame: + if not frame.log_path or frame.status in (QUEUED, DISPATCHED): + self.send_head(http.client.PROCESSING) + else: + self.server.stats("", "Sending log back to client") + f = open(frame.log_path, 'rb') + + self.send_head() + + shutil.copyfileobj(f, self.wfile) + + f.close() + else: + # no such frame + self.send_head(http.client.NO_CONTENT) + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "status": + job_id = self.headers.get('job-id', "") + job_frame = int(self.headers.get('job-frame', -1)) + + if job_id: + print("status:", job_id, "\n") + + job = self.server.getJobByID(job_id) + if job: + if job_frame != -1: + frame = job[frame] + + if frame: + message = frame.serialize() + else: + # no such frame + self.send_heat(http.client.NO_CONTENT) + return + else: + message = job.serialize() + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + return + else: # status of all jobs + message = [] + + for job in self.server: + message.append(job.serialize()) + + self.send_head() + self.wfile.write(bytes(repr(message), encoding='utf8')) + + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "job": + self.server.update() + + slave_id = self.headers['slave-id'] + + print("slave-id", slave_id) + + slave = self.server.updateSlave(slave_id) + + if slave: # only if slave id is valid + job, frames = self.server.getNewJob(slave_id) + + if job and frames: + for f in frames: + print("dispatch", f.number) + f.status = DISPATCHED + f.slave = slave + + self.send_head(headers={"job-id": job.id}) + + message = job.serialize(frames) + + self.wfile.write(bytes(repr(message), encoding='utf8')) + + self.server.stats("", "Sending job frame to render node") + else: + # no job available, return error code + self.send_head(http.client.ACCEPTED) + else: # invalid slave id + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "file": + slave_id = self.headers['slave-id'] + + slave = self.server.updateSlave(slave_id) + + if slave: # only if slave id is valid + job_id = self.headers['job-id'] + job_file = self.headers['job-file'] + print("job:", job_id, "\n") + print("file:", job_file, "\n") + + job = self.server.getJobByID(job_id) + + if job: + render_file = job.files_map.get(job_file, None) + + if render_file: + self.server.stats("", "Sending file to render node") + f = open(render_file.filepath, 'rb') + + self.send_head() + shutil.copyfileobj(f, self.wfile) + + f.close() + else: + # no such file + self.send_head(http.client.NO_CONTENT) + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + else: # invalid slave id + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "slave": + message = [] + + for slave in self.server.slaves: + message.append(slave.serialize()) + + self.send_head() + + self.wfile.write(bytes(repr(message), encoding='utf8')) + + + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + def do_POST(self): + print(self.path) + + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + if self.path == "job": + print("posting job info") + self.server.stats("", "Receiving job") + + length = int(self.headers['content-length']) + + job_info = netrender.model.RenderJob.materialize(eval(str(self.rfile.read(length), encoding='utf8'))) + + job_id = self.server.nextJobID() + + print(job_info.files) + + job = MRenderJob(job_id, job_info.name, job_info.files, chunks = job_info.chunks, priority = job_info.priority, blacklist = job_info.blacklist) + + for frame in job_info.frames: + frame = job.addFrame(frame.number) + + self.server.addJob(job) + + headers={"job-id": job_id} + + if job.testStart(): + self.send_head(headers=headers) + else: + self.send_head(http.client.ACCEPTED, headers=headers) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "cancel": + job_id = self.headers.get('job-id', "") + if job_id: + print("cancel:", job_id, "\n") + self.server.removeJob(job_id) + else: # cancel all jobs + self.server.clear() + + self.send_head() + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "reset": + job_id = self.headers.get('job-id', "") + job_frame = int(self.headers.get('job-frame', "-1")) + all = bool(self.headers.get('reset-all', "False")) + + job = self.server.getJobByID(job_id) + + if job: + if job_frame != -1: + job[job_frame].reset(all) + else: + job.reset(all) + + self.send_head() + else: # job not found + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "slave": + length = int(self.headers['content-length']) + job_frame_string = self.headers['job-frame'] + + slave_info = netrender.model.RenderSlave.materialize(eval(str(self.rfile.read(length), encoding='utf8'))) + + slave_id = self.server.addSlave(slave_info.name, self.client_address, slave_info.stats) + + self.send_head(headers = {"slave-id": slave_id}) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "log": + slave_id = self.headers['slave-id'] + + slave = self.server.updateSlave(slave_id) + + if slave: # only if slave id is valid + length = int(self.headers['content-length']) + + log_info = netrender.model.LogFile.materialize(eval(str(self.rfile.read(length), encoding='utf8'))) + + job = self.server.getJobByID(log_info.job_id) + + if job: + job.addLog(log_info.frames) + self.send_head(http.client.OK) + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + else: # invalid slave id + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + def do_PUT(self): + print(self.path) + + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + if self.path == "file": + print("writing blend file") + self.server.stats("", "Receiving job") + + length = int(self.headers['content-length']) + job_id = self.headers['job-id'] + job_file = self.headers['job-file'] + + job = self.server.getJobByID(job_id) + + if job: + + render_file = job.files_map.get(job_file, None) + + if render_file: + main_file = job.files[0][0] # filename of the first file + + main_path, main_name = os.path.split(main_file) + + if job_file != main_file: + file_path = prefixPath(job.save_path, job_file, main_path) + else: + file_path = job.save_path + main_name + + buf = self.rfile.read(length) + + # add same temp file + renames as slave + + f = open(file_path, "wb") + f.write(buf) + f.close() + del buf + + render_file.filepath = file_path # set the new path + + if job.testStart(): + self.send_head(http.client.OK) + else: + self.send_head(http.client.ACCEPTED) + else: # invalid file + self.send_head(http.client.NO_CONTENT) + else: # job not found + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "render": + print("writing result file") + self.server.stats("", "Receiving render result") + + slave_id = self.headers['slave-id'] + + slave = self.server.updateSlave(slave_id) + + if slave: # only if slave id is valid + job_id = self.headers['job-id'] + + job = self.server.getJobByID(job_id) + + if job: + job_frame = int(self.headers['job-frame']) + job_result = int(self.headers['job-result']) + job_time = float(self.headers['job-time']) + + frame = job[job_frame] + + if job_result == DONE: + length = int(self.headers['content-length']) + buf = self.rfile.read(length) + f = open(job.save_path + "%04d" % job_frame + ".exr", 'wb') + f.write(buf) + f.close() + + del buf + elif job_result == ERROR: + # blacklist slave on this job on error + job.blacklist.append(slave.id) + + frame.status = job_result + frame.time = job_time + + self.server.updateSlave(self.headers['slave-id']) + + self.send_head() + else: # job not found + self.send_head(http.client.NO_CONTENT) + else: # invalid slave id + self.send_head(http.client.NO_CONTENT) + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == "log": + print("writing log file") + self.server.stats("", "Receiving log file") + + job_id = self.headers['job-id'] + + job = self.server.getJobByID(job_id) + + if job: + job_frame = int(self.headers['job-frame']) + + frame = job[job_frame] + + if frame and frame.log_path: + length = int(self.headers['content-length']) + buf = self.rfile.read(length) + f = open(frame.log_path, 'ab') + f.write(buf) + f.close() + + del buf + + self.server.updateSlave(self.headers['slave-id']) + + self.send_head() + else: # frame not found + self.send_head(http.client.NO_CONTENT) + else: # job not found + self.send_head(http.client.NO_CONTENT) + +class RenderMasterServer(http.server.HTTPServer): + def __init__(self, address, handler_class, path): + super().__init__(address, handler_class) + self.jobs = [] + self.jobs_map = {} + self.slaves = [] + self.slaves_map = {} + self.job_id = 0 + self.path = path + "master_" + str(os.getpid()) + os.sep + + if not os.path.exists(self.path): + os.mkdir(self.path) + + def nextJobID(self): + self.job_id += 1 + return str(self.job_id) + + def addSlave(self, name, address, stats): + slave = MRenderSlave(name, address, stats) + self.slaves.append(slave) + self.slaves_map[slave.id] = slave + + return slave.id + + def getSlave(self, slave_id): + return self.slaves_map.get(slave_id, None) + + def updateSlave(self, slave_id): + slave = self.getSlave(slave_id) + if slave: + slave.seen() + + return slave + + def clear(self): + self.jobs_map = {} + self.jobs = [] + + def update(self): + self.jobs.sort(key = groupKey) + + def removeJob(self, id): + job = self.jobs_map.pop(id) + + if job: + self.jobs.remove(job) + + def addJob(self, job): + self.jobs.append(job) + self.jobs_map[job.id] = job + + # create job directory + job.save_path = self.path + "job_" + job.id + os.sep + if not os.path.exists(job.save_path): + os.mkdir(job.save_path) + + job.save() + + def getJobByID(self, id): + return self.jobs_map.get(id, None) + + def __iter__(self): + for job in self.jobs: + yield job + + def getNewJob(self, slave_id): + if self.jobs: + for job in reversed(self.jobs): + if job.status == JOB_QUEUED and job.framesLeft() > 0 and slave_id not in job.blacklist: + return job, job.getFrames() + + return None, None + +def runMaster(address, broadcast, path, update_stats, test_break): + httpd = RenderMasterServer(address, RenderHandler, path) + httpd.timeout = 1 + httpd.stats = update_stats + + if broadcast: + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) + + start_time = time.time() + + while not test_break(): + httpd.handle_request() + + if broadcast: + if time.time() - start_time >= 10: # need constant here + print("broadcasting address") + s.sendto(bytes("%i" % address[1], encoding='utf8'), 0, ('', 8000)) + start_time = time.time() diff --git a/release/io/netrender/model.py b/release/io/netrender/model.py new file mode 100644 index 00000000000..924493fd34a --- /dev/null +++ b/release/io/netrender/model.py @@ -0,0 +1,184 @@ +import sys, os +import http, http.client, http.server, urllib +import subprocess, shutil, time, hashlib + +from netrender.utils import * + +class LogFile: + def __init__(self, job_id = 0, frames = []): + self.job_id = job_id + self.frames = frames + + def serialize(self): + return { + "job_id": self.job_id, + "frames": self.frames + } + + @staticmethod + def materialize(data): + if not data: + return None + + logfile = LogFile() + logfile.job_id = data["job_id"] + logfile.frames = data["frames"] + + return logfile + +class RenderSlave: + _slave_map = {} + + def __init__(self): + self.id = "" + self.name = "" + self.address = (0,0) + self.stats = "" + self.total_done = 0 + self.total_error = 0 + self.last_seen = 0.0 + + def serialize(self): + return { + "id": self.id, + "name": self.name, + "address": self.address, + "stats": self.stats, + "total_done": self.total_done, + "total_error": self.total_error, + "last_seen": self.last_seen + } + + @staticmethod + def materialize(data): + if not data: + return None + + slave_id = data["id"] + + if slave_id in RenderSlave._slave_map: + return RenderSlave._slave_map[slave_id] + else: + slave = RenderSlave() + slave.id = slave_id + slave.name = data["name"] + slave.address = data["address"] + slave.stats = data["stats"] + slave.total_done = data["total_done"] + slave.total_error = data["total_error"] + slave.last_seen = data["last_seen"] + + RenderSlave._slave_map[slave_id] = slave + + return slave + +class RenderJob: + def __init__(self): + self.id = "" + self.name = "" + self.files = [] + self.frames = [] + self.chunks = 0 + self.priority = 0 + self.credits = 0 + self.blacklist = [] + self.last_dispatched = 0.0 + + def addFile(self, file_path, start=-1, end=-1): + self.files.append((file_path, start, end)) + + def addFrame(self, frame_number): + frame = RenderFrame(frame_number) + self.frames.append(frame) + return frame + + def __len__(self): + return len(self.frames) + + def framesStatus(self): + results = { + QUEUED: 0, + DISPATCHED: 0, + DONE: 0, + ERROR: 0 + } + + for frame in self.frames: + results[frame.status] += 1 + + return results + + def __contains__(self, frame_number): + for f in self.frames: + if f.number == frame_number: + return True + else: + return False + + def __getitem__(self, frame_number): + for f in self.frames: + if f.number == frame_number: + return f + else: + return None + + def serialize(self, frames = None): + min_frame = min((f.number for f in frames)) if frames else -1 + max_frame = max((f.number for f in frames)) if frames else -1 + return { + "id": self.id, + "name": self.name, + "files": [f for f in self.files if f[1] == -1 or not frames or (f[1] <= min_frame <= f[2] or f[1] <= max_frame <= f[2])], + "frames": [f.serialize() for f in self.frames if not frames or f in frames], + "chunks": self.chunks, + "priority": self.priority, + "credits": self.credits, + "blacklist": self.blacklist, + "last_dispatched": self.last_dispatched + } + + @staticmethod + def materialize(data): + if not data: + return None + + job = RenderJob() + job.id = data["id"] + job.name = data["name"] + job.files = data["files"] + job.frames = [RenderFrame.materialize(f) for f in data["frames"]] + job.chunks = data["chunks"] + job.priority = data["priority"] + job.credits = data["credits"] + job.blacklist = data["blacklist"] + job.last_dispatched = data["last_dispatched"] + + return job + +class RenderFrame: + def __init__(self, number = 0): + self.number = number + self.time = 0 + self.status = QUEUED + self.slave = None + + def serialize(self): + return { + "number": self.number, + "time": self.time, + "status": self.status, + "slave": None if not self.slave else self.slave.serialize() + } + + @staticmethod + def materialize(data): + if not data: + return None + + frame = RenderFrame() + frame.number = data["number"] + frame.time = data["time"] + frame.status = data["status"] + frame.slave = RenderSlave.materialize(data["slave"]) + + return frame diff --git a/release/io/netrender/operators.py b/release/io/netrender/operators.py new file mode 100644 index 00000000000..e6888731437 --- /dev/null +++ b/release/io/netrender/operators.py @@ -0,0 +1,357 @@ +import bpy +import sys, os +import http, http.client, http.server, urllib, socket + +from netrender.utils import * +import netrender.client as client +import netrender.model + +@rnaOperator +class RENDER_OT_netclientanim(bpy.types.Operator): + ''' + Operator documentation text, will be used for the operator tooltip and python docs. + ''' + __idname__ = "render.netclientanim" + __label__ = "Net Render Client Anim" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + scene = context.scene + + conn = clientConnection(scene) + + if conn: + # Sending file + scene.network_render.job_id = client.clientSendJob(conn, scene, True) + conn.close() + + bpy.ops.screen.render('INVOKE_AREA', animation=True) + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class RENDER_OT_netclientsend(bpy.types.Operator): + ''' + Operator documentation text, will be used for the operator tooltip and python docs. + ''' + __idname__ = "render.netclientsend" + __label__ = "Net Render Client Send" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + scene = context.scene + + conn = clientConnection(scene) + + if conn: + # Sending file + scene.network_render.job_id = client.clientSendJob(conn, scene, True) + conn.close() + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class RENDER_OT_netclientstatus(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientstatus" + __label__ = "Net Render Client Status" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + netsettings = context.scene.network_render + conn = clientConnection(context.scene) + + if conn: + conn.request("GET", "status") + + response = conn.getresponse() + print( response.status, response.reason ) + + jobs = (netrender.model.RenderJob.materialize(j) for j in eval(str(response.read(), encoding='utf8'))) + + while(len(netsettings.jobs) > 0): + netsettings.jobs.remove(0) + + bpy.data.netrender_jobs = [] + + for j in jobs: + bpy.data.netrender_jobs.append(j) + netsettings.jobs.add() + job = netsettings.jobs[-1] + + j.results = j.framesStatus() # cache frame status + + job.name = j.name + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class RENDER_OT_netclientblacklistslave(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientblacklistslave" + __label__ = "Net Render Client Blacklist Slave" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + netsettings = context.scene.network_render + + if netsettings.active_slave_index >= 0: + + # deal with data + slave = bpy.data.netrender_slaves.pop(netsettings.active_slave_index) + bpy.data.netrender_blacklist.append(slave) + + # deal with rna + netsettings.slaves_blacklist.add() + netsettings.slaves_blacklist[-1].name = slave.name + + netsettings.slaves.remove(netsettings.active_slave_index) + netsettings.active_slave_index = -1 + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class RENDER_OT_netclientwhitelistslave(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientwhitelistslave" + __label__ = "Net Render Client Whitelist Slave" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + netsettings = context.scene.network_render + + if netsettings.active_blacklisted_slave_index >= 0: + + # deal with data + slave = bpy.data.netrender_blacklist.pop(netsettings.active_blacklisted_slave_index) + bpy.data.netrender_slaves.append(slave) + + # deal with rna + netsettings.slaves.add() + netsettings.slaves[-1].name = slave.name + + netsettings.slaves_blacklist.remove(netsettings.active_blacklisted_slave_index) + netsettings.active_blacklisted_slave_index = -1 + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + + +@rnaOperator +class RENDER_OT_netclientslaves(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientslaves" + __label__ = "Net Render Client Slaves" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + netsettings = context.scene.network_render + conn = clientConnection(context.scene) + + if conn: + conn.request("GET", "slave") + + response = conn.getresponse() + print( response.status, response.reason ) + + slaves = (netrender.model.RenderSlave.materialize(s) for s in eval(str(response.read(), encoding='utf8'))) + + while(len(netsettings.slaves) > 0): + netsettings.slaves.remove(0) + + bpy.data.netrender_slaves = [] + + for s in slaves: + for i in range(len(bpy.data.netrender_blacklist)): + slave = bpy.data.netrender_blacklist[i] + if slave.id == s.id: + bpy.data.netrender_blacklist[i] = s + netsettings.slaves_blacklist[i].name = s.name + break + else: + bpy.data.netrender_slaves.append(s) + + netsettings.slaves.add() + slave = netsettings.slaves[-1] + slave.name = s.name + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class RENDER_OT_netclientcancel(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientcancel" + __label__ = "Net Render Client Cancel" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + netsettings = context.scene.network_render + return netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0 + + def execute(self, context): + netsettings = context.scene.network_render + conn = clientConnection(context.scene) + + if conn: + job = bpy.data.netrender_jobs[netsettings.active_job_index] + + conn.request("POST", "cancel", headers={"job-id":job.id}) + + response = conn.getresponse() + print( response.status, response.reason ) + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class netclientdownload(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientdownload" + __label__ = "Net Render Client Download" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + netsettings = context.scene.network_render + return netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0 + + def execute(self, context): + netsettings = context.scene.network_render + rd = context.scene.render_data + + conn = clientConnection(context.scene) + + if conn: + job = bpy.data.netrender_jobs[netsettings.active_job_index] + + for frame in job.frames: + client.requestResult(conn, job.id, frame.number) + response = conn.getresponse() + + if response.status != http.client.OK: + print("missing", frame.number) + continue + + print("got back", frame.number) + + f = open(netsettings.path + "%06d" % frame.number + ".exr", "wb") + buf = response.read(1024) + + while buf: + f.write(buf) + buf = response.read(1024) + + f.close() + + conn.close() + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) + +@rnaOperator +class netclientscan(bpy.types.Operator): + '''Operator documentation text, will be used for the operator tooltip and python docs.''' + __idname__ = "render.netclientscan" + __label__ = "Net Render Client Scan" + + # List of operator properties, the attributes will be assigned + # to the class instance from the operator settings before calling. + + __props__ = [] + + def poll(self, context): + return True + + def execute(self, context): + netsettings = context.scene.network_render + + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) + s.settimeout(30) + + s.bind(('', 8000)) + + try: + buf, address = s.recvfrom(64) + + print("received:", buf) + + netsettings.server_address = address[0] + netsettings.server_port = int(str(buf, encoding='utf8')) + except socket.timeout: + print("no server info") + + return ('FINISHED',) + + def invoke(self, context, event): + return self.execute(context) diff --git a/release/io/netrender/slave.py b/release/io/netrender/slave.py new file mode 100644 index 00000000000..ecdbf69591a --- /dev/null +++ b/release/io/netrender/slave.py @@ -0,0 +1,207 @@ +import sys, os, platform +import http, http.client, http.server, urllib +import subprocess, time + +from netrender.utils import * +import netrender.model + +CANCEL_POLL_SPEED = 2 +MAX_TIMEOUT = 10 +INCREMENT_TIMEOUT = 1 + +if platform.system() == 'Windows' and platform.version() >= '5': # Error mode is only available on Win2k or higher, that's version 5 + import ctypes + def SetErrorMode(): + val = ctypes.windll.kernel32.SetErrorMode(0x0002) + ctypes.windll.kernel32.SetErrorMode(val | 0x0002) + return val + + def RestoreErrorMode(val): + ctypes.windll.kernel32.SetErrorMode(val) +else: + def SetErrorMode(): + return 0 + + def RestoreErrorMode(val): + pass + +def slave_Info(): + sysname, nodename, release, version, machine, processor = platform.uname() + slave = netrender.model.RenderSlave() + slave.name = nodename + slave.stats = sysname + " " + release + " " + machine + " " + processor + return slave + +def testCancel(conn, job_id): + conn.request("HEAD", "status", headers={"job-id":job_id}) + response = conn.getresponse() + + # cancelled if job isn't found anymore + if response.status == http.client.NO_CONTENT: + return True + else: + return False + +def testFile(conn, job_id, slave_id, JOB_PREFIX, file_path, main_path = None): + job_full_path = prefixPath(JOB_PREFIX, file_path, main_path) + + if not os.path.exists(job_full_path): + temp_path = JOB_PREFIX + "slave.temp.blend" + conn.request("GET", "file", headers={"job-id": job_id, "slave-id":slave_id, "job-file":file_path}) + response = conn.getresponse() + + if response.status != http.client.OK: + return None # file for job not returned by server, need to return an error code to server + + f = open(temp_path, "wb") + buf = response.read(1024) + + while buf: + f.write(buf) + buf = response.read(1024) + + f.close() + + os.renames(temp_path, job_full_path) + + return job_full_path + + +def render_slave(engine, scene): + netsettings = scene.network_render + timeout = 1 + + engine.update_stats("", "Network render node initiation") + + conn = clientConnection(scene) + + if conn: + conn.request("POST", "slave", repr(slave_Info().serialize())) + response = conn.getresponse() + + slave_id = response.getheader("slave-id") + + NODE_PREFIX = netsettings.path + "slave_" + slave_id + os.sep + if not os.path.exists(NODE_PREFIX): + os.mkdir(NODE_PREFIX) + + while not engine.test_break(): + + conn.request("GET", "job", headers={"slave-id":slave_id}) + response = conn.getresponse() + + if response.status == http.client.OK: + timeout = 1 # reset timeout on new job + + job = netrender.model.RenderJob.materialize(eval(str(response.read(), encoding='utf8'))) + + JOB_PREFIX = NODE_PREFIX + "job_" + job.id + os.sep + if not os.path.exists(JOB_PREFIX): + os.mkdir(JOB_PREFIX) + + job_path = job.files[0][0] # data in files have format (path, start, end) + main_path, main_file = os.path.split(job_path) + + job_full_path = testFile(conn, job.id, slave_id, JOB_PREFIX, job_path) + print("Fullpath", job_full_path) + print("File:", main_file, "and %i other files" % (len(job.files) - 1,)) + engine.update_stats("", "Render File", main_file, "for job", job.id) + + for file_path, start, end in job.files[1:]: + print("\t", file_path) + testFile(conn, job.id, slave_id, JOB_PREFIX, file_path, main_path) + + frame_args = [] + + for frame in job.frames: + print("frame", frame.number) + frame_args += ["-f", str(frame.number)] + + # announce log to master + logfile = netrender.model.LogFile(job.id, [frame.number for frame in job.frames]) + conn.request("POST", "log", bytes(repr(logfile.serialize()), encoding='utf8'), headers={"slave-id":slave_id}) + response = conn.getresponse() + + first_frame = job.frames[0].number + + # start render + start_t = time.time() + + val = SetErrorMode() + process = subprocess.Popen([sys.argv[0], "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + RestoreErrorMode(val) + + headers = {"job-id":job.id, "slave-id":slave_id} + + cancelled = False + stdout = bytes() + run_t = time.time() + while process.poll() == None and not cancelled: + stdout += process.stdout.read(32) + current_t = time.time() + cancelled = engine.test_break() + if current_t - run_t > CANCEL_POLL_SPEED: + + # update logs if needed + if stdout: + # (only need to update on one frame, they are linked + headers["job-frame"] = str(first_frame) + conn.request("PUT", "log", stdout, headers=headers) + response = conn.getresponse() + + stdout = bytes() + + run_t = current_t + if testCancel(conn, job.id): + cancelled = True + + if cancelled: + # kill process if needed + if process.poll() == None: + process.terminate() + continue # to next frame + + total_t = time.time() - start_t + + avg_t = total_t / len(job.frames) + + status = process.returncode + + print("status", status) + + # flush the rest of the logs + if stdout: + # (only need to update on one frame, they are linked + headers["job-frame"] = str(first_frame) + conn.request("PUT", "log", stdout, headers=headers) + response = conn.getresponse() + + headers = {"job-id":job.id, "slave-id":slave_id, "job-time":str(avg_t)} + + if status == 0: # non zero status is error + headers["job-result"] = str(DONE) + for frame in job.frames: + headers["job-frame"] = str(frame.number) + # send result back to server + f = open(JOB_PREFIX + "%06d" % frame.number + ".exr", 'rb') + conn.request("PUT", "render", f, headers=headers) + f.close() + response = conn.getresponse() + else: + headers["job-result"] = str(ERROR) + for frame in job.frames: + headers["job-frame"] = str(frame.number) + # send error result back to server + conn.request("PUT", "render", headers=headers) + response = conn.getresponse() + else: + if timeout < MAX_TIMEOUT: + timeout += INCREMENT_TIMEOUT + + for i in range(timeout): + time.sleep(1) + if engine.test_break(): + conn.close() + return + + conn.close() diff --git a/release/io/netrender/ui.py b/release/io/netrender/ui.py new file mode 100644 index 00000000000..2ec0b62de4a --- /dev/null +++ b/release/io/netrender/ui.py @@ -0,0 +1,300 @@ +import bpy +import sys, os +import http, http.client, http.server, urllib +import subprocess, shutil, time, hashlib + +import netrender.slave as slave +import netrender.master as master + +from netrender.utils import * + +VERSION = b"0.3" + +PATH_PREFIX = "/tmp/" + +QUEUED = 0 +DISPATCHED = 1 +DONE = 2 +ERROR = 3 + +class RenderButtonsPanel(bpy.types.Panel): + __space_type__ = "PROPERTIES" + __region_type__ = "WINDOW" + __context__ = "scene" + # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here + + def poll(self, context): + rd = context.scene.render_data + return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES) + +# Setting panel, use in the scene for now. +@rnaType +class SCENE_PT_network_settings(RenderButtonsPanel): + __label__ = "Network Settings" + COMPAT_ENGINES = set(['NET_RENDER']) + + def draw_header(self, context): + layout = self.layout + scene = context.scene + + def draw(self, context): + layout = self.layout + scene = context.scene + rd = scene.render_data + + layout.active = True + + split = layout.split() + + col = split.column() + + if scene.network_render.mode == "RENDER_CLIENT": + col.itemO("render.netclientanim", icon='ICON_RENDER_ANIMATION', text="Animaton on network") + + col.itemR(scene.network_render, "mode") + col.itemR(scene.network_render, "path") + col.itemR(scene.network_render, "server_address") + col.itemR(scene.network_render, "server_port") + + if scene.network_render.mode == "RENDER_MASTER": + col.itemR(scene.network_render, "server_broadcast") + else: + col.itemO("render.netclientscan", icon="ICON_FILE_REFRESH", text="") + + if scene.network_render.mode == "RENDER_CLIENT": + col.itemO("render.netclientsend", text="send job to server") + col.itemR(scene.network_render, "job_name") + col.itemR(scene.network_render, "priority") + col.itemR(scene.network_render, "chunks") + +@rnaType +class SCENE_PT_network_slaves(RenderButtonsPanel): + __label__ = "Slaves Status" + COMPAT_ENGINES = set(['NET_RENDER']) + + def poll(self, context): + scene = context.scene + return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" + + def draw(self, context): + layout = self.layout + + scene = context.scene + netsettings = scene.network_render + + row = layout.row() + row.template_list(netsettings, "slaves", netsettings, "active_slave_index", rows=2) + + col = row.column() + + subcol = col.column(align=True) + subcol.itemO("render.netclientslaves", icon="ICON_FILE_REFRESH", text="") + subcol.itemO("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="") + + if len(bpy.data.netrender_slaves) == 0 and len(netsettings.slaves) > 0: + while(len(netsettings.slaves) > 0): + netsettings.slaves.remove(0) + + if netsettings.active_slave_index >= 0 and len(netsettings.slaves) > 0: + layout.itemS() + + slave = bpy.data.netrender_slaves[netsettings.active_slave_index] + + layout.itemL(text="Name: " + slave.name) + layout.itemL(text="Address: " + slave.address[0]) + layout.itemL(text="Seen: " + time.ctime(slave.last_seen)) + layout.itemL(text="Stats: " + slave.stats) + +@rnaType +class SCENE_PT_network_slaves_blacklist(RenderButtonsPanel): + __label__ = "Slaves Blacklist" + COMPAT_ENGINES = set(['NET_RENDER']) + + def poll(self, context): + scene = context.scene + return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" + + def draw(self, context): + layout = self.layout + + scene = context.scene + netsettings = scene.network_render + + row = layout.row() + row.template_list(netsettings, "slaves_blacklist", netsettings, "active_blacklisted_slave_index", rows=2) + + col = row.column() + + subcol = col.column(align=True) + subcol.itemO("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="") + + if len(bpy.data.netrender_blacklist) == 0 and len(netsettings.slaves_blacklist) > 0: + while(len(netsettings.slaves_blacklist) > 0): + netsettings.slaves_blacklist.remove(0) + + if netsettings.active_blacklisted_slave_index >= 0 and len(netsettings.slaves_blacklist) > 0: + layout.itemS() + + slave = bpy.data.netrender_blacklist[netsettings.active_blacklisted_slave_index] + + layout.itemL(text="Name: " + slave.name) + layout.itemL(text="Address: " + slave.address[0]) + layout.itemL(text="Seen: " + slave.last_seen) + layout.itemL(text="Stats: " + time.ctime(slave.stats)) + +@rnaType +class SCENE_PT_network_jobs(RenderButtonsPanel): + __label__ = "Jobs" + COMPAT_ENGINES = set(['NET_RENDER']) + + def poll(self, context): + scene = context.scene + return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" + + def draw(self, context): + layout = self.layout + + scene = context.scene + netsettings = scene.network_render + + row = layout.row() + row.template_list(netsettings, "jobs", netsettings, "active_job_index", rows=2) + + col = row.column() + + subcol = col.column(align=True) + subcol.itemO("render.netclientstatus", icon="ICON_FILE_REFRESH", text="") + subcol.itemO("render.netclientcancel", icon="ICON_ZOOMOUT", text="") + subcol.itemO("render.netclientdownload", icon='ICON_RENDER_ANIMATION', text="") + + if len(bpy.data.netrender_jobs) == 0 and len(netsettings.jobs) > 0: + while(len(netsettings.jobs) > 0): + netsettings.jobs.remove(0) + + if netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0: + layout.itemS() + + job = bpy.data.netrender_jobs[netsettings.active_job_index] + + layout.itemL(text="Name: %s" % job.name) + layout.itemL(text="Length: %04i" % len(job)) + layout.itemL(text="Done: %04i" % job.results[DONE]) + layout.itemL(text="Error: %04i" % job.results[ERROR]) + +@rnaType +class NetRenderSettings(bpy.types.IDPropertyGroup): + pass + +@rnaType +class NetRenderSlave(bpy.types.IDPropertyGroup): + pass + +@rnaType +class NetRenderJob(bpy.types.IDPropertyGroup): + pass + +bpy.types.Scene.PointerProperty(attr="network_render", type=NetRenderSettings, name="Network Render", description="Network Render Settings") + +NetRenderSettings.StringProperty( attr="server_address", + name="Server address", + description="IP or name of the master render server", + maxlen = 128, + default = "[default]") + +NetRenderSettings.IntProperty( attr="server_port", + name="Server port", + description="port of the master render server", + default = 8000, + min=1, + max=65535) + +NetRenderSettings.BoolProperty( attr="server_broadcast", + name="Broadcast server address", + description="broadcast server address on local network", + default = True) + +if os.name == 'nt': + NetRenderSettings.StringProperty( attr="path", + name="Path", + description="Path for temporary files", + maxlen = 128, + default = "C:/tmp/") +else: + NetRenderSettings.StringProperty( attr="path", + name="Path", + description="Path for temporary files", + maxlen = 128, + default = "/tmp/") + +NetRenderSettings.StringProperty( attr="job_name", + name="Job name", + description="Name of the job", + maxlen = 128, + default = "[default]") + +NetRenderSettings.IntProperty( attr="chunks", + name="Chunks", + description="Number of frame to dispatch to each slave in one chunk", + default = 5, + min=1, + max=65535) + +NetRenderSettings.IntProperty( attr="priority", + name="Priority", + description="Priority of the job", + default = 1, + min=1, + max=10) + +NetRenderSettings.StringProperty( attr="job_id", + name="Network job id", + description="id of the last sent render job", + maxlen = 64, + default = "") + +NetRenderSettings.IntProperty( attr="active_slave_index", + name="Index of the active slave", + description="", + default = -1, + min= -1, + max=65535) + +NetRenderSettings.IntProperty( attr="active_blacklisted_slave_index", + name="Index of the active slave", + description="", + default = -1, + min= -1, + max=65535) + +NetRenderSettings.IntProperty( attr="active_job_index", + name="Index of the active job", + description="", + default = -1, + min= -1, + max=65535) + +NetRenderSettings.EnumProperty(attr="mode", + items=( + ("RENDER_CLIENT", "Client", "Act as render client"), + ("RENDER_MASTER", "Master", "Act as render master"), + ("RENDER_SLAVE", "Slave", "Act as render slave"), + ), + name="network mode", + description="mode of operation of this instance", + default="RENDER_CLIENT") + +NetRenderSettings.CollectionProperty(attr="slaves", type=NetRenderSlave, name="Slaves", description="") +NetRenderSettings.CollectionProperty(attr="slaves_blacklist", type=NetRenderSlave, name="Slaves Blacklist", description="") +NetRenderSettings.CollectionProperty(attr="jobs", type=NetRenderJob, name="Job List", description="") + +NetRenderSlave.StringProperty( attr="name", + name="Name of the slave", + description="", + maxlen = 64, + default = "") + +NetRenderJob.StringProperty( attr="name", + name="Name of the job", + description="", + maxlen = 128, + default = "") diff --git a/release/io/netrender/utils.py b/release/io/netrender/utils.py new file mode 100644 index 00000000000..46c2011b188 --- /dev/null +++ b/release/io/netrender/utils.py @@ -0,0 +1,72 @@ +import bpy +import sys, os +import re +import http, http.client, http.server, urllib +import subprocess, shutil, time, hashlib + +import netrender.model + +VERSION = b"0.5" + +QUEUED = 0 +DISPATCHED = 1 +DONE = 2 +ERROR = 3 + +def rnaType(rna_type): + bpy.types.register(rna_type) + return rna_type + +def rnaOperator(rna_op): + bpy.ops.add(rna_op) + return rna_op + +def clientConnection(scene): + netsettings = scene.network_render + + if netsettings.server_address == "[default]": + bpy.ops.render.netclientscan() + + conn = http.client.HTTPConnection(netsettings.server_address, netsettings.server_port) + + if clientVerifyVersion(conn): + return conn + else: + conn.close() + return None + +def clientVerifyVersion(conn): + conn.request("GET", "version") + response = conn.getresponse() + + if response.status != http.client.OK: + conn.close() + return False + + server_version = response.read() + + if server_version != VERSION: + print("Incorrect server version!") + print("expected", VERSION, "received", server_version) + return False + + return True + +def prefixPath(prefix_directory, file_path, prefix_path): + if os.path.isabs(file_path): + # if an absolute path, make sure path exists, if it doesn't, use relative local path + full_path = file_path + if not os.path.exists(full_path): + p, n = os.path.split(full_path) + + if prefix_path and p.startswith(prefix_path): + directory = prefix_directory + p[len(prefix_path):] + full_path = directory + n + if not os.path.exists(directory): + os.mkdir(directory) + else: + full_path = prefix_directory + n + else: + full_path = prefix_directory + file_path + + return full_path \ No newline at end of file diff --git a/release/scripts/3ds_export.py b/release/scripts/3ds_export.py index 54e1ea3db33..87680bce1b0 100644 --- a/release/scripts/3ds_export.py +++ b/release/scripts/3ds_export.py @@ -7,7 +7,7 @@ Group: 'Export' Tooltip: 'Export to 3DS file format (.3ds).' """ -__author__ = ["Campbell Barton", "Bob Holcomb", "Richard Lärkäng", "Damien McGinnes", "Mark Stijnman"] +__author__ = ["Campbell Barton", "Bob Holcomb", "Richard Lärkäng", "Damien McGinnes", "Mark Stijnman"] __url__ = ("blenderartists.org", "www.blender.org", "www.gametutorials.com", "lib3ds.sourceforge.net/") __version__ = "0.90a" __bpydoc__ = """\ @@ -50,7 +50,10 @@ import Blender import bpy from BPyMesh import getMeshFromObject from BPyObject import getDerivedObjects -import struct +try: + import struct +except: + struct = None # So 3ds max can open files, limit names to 12 in length # this is verry annoying for filenames! @@ -1009,5 +1012,8 @@ def save_3ds(filename): if __name__=='__main__': - Blender.Window.FileSelector(save_3ds, "Export 3DS", Blender.sys.makename(ext='.3ds')) + if struct: + Blender.Window.FileSelector(save_3ds, "Export 3DS", Blender.sys.makename(ext='.3ds')) + else: + Blender.Draw.PupMenu("Error%t|This script requires a full python installation") # save_3ds('/test_b.3ds') diff --git a/release/scripts/3ds_import.py b/release/scripts/3ds_import.py index 028b9633606..bcde82c4869 100644 --- a/release/scripts/3ds_import.py +++ b/release/scripts/3ds_import.py @@ -133,10 +133,12 @@ import BPyImage import BPyMessages -import struct -from struct import calcsize, unpack +try: + from struct import calcsize, unpack +except: + calcsize= unpack= None + -import os # If python version is less than 2.4, try to get set stuff from module try: @@ -844,11 +846,13 @@ def load_3ds(filename, PREF_UI= True): # IMPORT_AS_INSTANCE= Blender.Draw.Create(0) IMPORT_CONSTRAIN_BOUNDS= Blender.Draw.Create(10.0) IMAGE_SEARCH= Blender.Draw.Create(1) + APPLY_MATRIX= Blender.Draw.Create(0) # Get USER Options pup_block= [\ ('Size Constraint:', IMPORT_CONSTRAIN_BOUNDS, 0.0, 1000.0, 'Scale the model by 10 until it reacehs the size constraint. Zero Disables.'),\ ('Image Search', IMAGE_SEARCH, 'Search subdirs for any assosiated images (Warning, may be slow)'),\ + ('Transform Fix', APPLY_MATRIX, 'Workaround for object transformations importing incorrectly'),\ #('Group Instance', IMPORT_AS_INSTANCE, 'Import objects into a new scene and group, creating an instance in the current scene.'),\ ] @@ -861,6 +865,7 @@ def load_3ds(filename, PREF_UI= True): IMPORT_CONSTRAIN_BOUNDS= IMPORT_CONSTRAIN_BOUNDS.val # IMPORT_AS_INSTANCE= IMPORT_AS_INSTANCE.val IMAGE_SEARCH = IMAGE_SEARCH.val + APPLY_MATRIX = APPLY_MATRIX.val if IMPORT_CONSTRAIN_BOUNDS: BOUNDS_3DS[:]= [1<<30, 1<<30, 1<<30, -1<<30, -1<<30, -1<<30] @@ -887,6 +892,8 @@ def load_3ds(filename, PREF_UI= True): if ob.type=='Mesh': me= ob.getData(mesh=1) me.verts.delete([me.verts[0],]) + if not APPLY_MATRIX: + me.transform(ob.matrixWorld.copy().invert()) # Done DUMMYVERT """ @@ -953,7 +960,10 @@ def load_3ds(filename, PREF_UI= True): DEBUG= False if __name__=='__main__' and not DEBUG: - Blender.Window.FileSelector(load_3ds, 'Import 3DS', '*.3ds') + if calcsize==None: + Blender.Draw.PupMenu('Error%t|a full python installation not found') + else: + Blender.Window.FileSelector(load_3ds, 'Import 3DS', '*.3ds') # For testing compatibility #load_3ds('/metavr/convert/vehicle/truck_002/TruckTanker1.3DS', False) @@ -961,6 +971,7 @@ if __name__=='__main__' and not DEBUG: ''' else: + import os # DEBUG ONLY TIME= Blender.sys.time() import os diff --git a/release/scripts/DirectX8Exporter.py b/release/scripts/DirectX8Exporter.py index b8bdae4de2b..8a0ecaf0eb7 100644 --- a/release/scripts/DirectX8Exporter.py +++ b/release/scripts/DirectX8Exporter.py @@ -45,7 +45,8 @@ from Blender import Types, Object, NMesh, Material,Armature,Mesh from Blender.Mathutils import * from Blender import Draw, BGL from Blender.BGL import * -import math +try: import math +except: math = None global mat_flip,index_list,space,bone_list,mat_dict global anim,flip_norm,swap_zy,flip_z,speed,ticks,no_light,recalc_norm,Bl_norm diff --git a/release/scripts/ac3d_import.py b/release/scripts/ac3d_import.py index 6a2b290e010..2f5512e7150 100644 --- a/release/scripts/ac3d_import.py +++ b/release/scripts/ac3d_import.py @@ -10,7 +10,7 @@ Tip: 'Import an AC3D (.ac) file.' __author__ = "Willian P. Germano" __url__ = ("blender", "blenderartists.org", "AC3D's homepage, http://www.ac3d.org", "PLib 3d gaming lib, http://plib.sf.net") -__version__ = "2.43.1 2007-02-21" +__version__ = "2.48.1 2009-01-11" __bpydoc__ = """\ This script imports AC3D models into Blender. @@ -31,6 +31,7 @@ Known issues:
Config Options:
- display transp (toggle): if "on", objects that have materials with alpha < 1.0 are shown with translucency (transparency) in the 3D View.
- subdiv (toggle): if "on", ac3d objects meant to be subdivided receive a SUBSURF modifier in Blender.
+ - emis as mircol: store the emissive rgb color from AC3D as mirror color in Blender -- this is a hack to preserve the values and be able to export them using the equivalent option in the exporter.
- textures dir (string): if non blank, when imported texture paths are wrong in the .ac file, Blender will also look for them at this dir. @@ -50,11 +51,12 @@ users can configure (see config options above). # -------------------------------------------------------------------------- # Thanks: Melchior Franz for extensive bug testing and reporting, making this # version cope much better with old or bad .ac files, among other improvements; -# Stewart Andreason for reporting a serious crash. +# Stewart Andreason for reporting a serious crash; Francesco Brisa for the +# emis as mircol functionality (w/ patch). # -------------------------------------------------------------------------- # ***** BEGIN GPL LICENSE BLOCK ***** # -# Copyright (C) 2004-2007: Willian P. Germano, wgermano _at_ ig.com.br +# Copyright (C) 2004-2009: Willian P. Germano, wgermano _at_ ig.com.br # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -89,15 +91,19 @@ DISPLAY_TRANSP = True SUBDIV = True +EMIS_AS_MIRCOL = False + + tooltips = { 'DISPLAY_TRANSP': 'Turn transparency on in the 3d View for objects using materials with alpha < 1.0.', 'SUBDIV': 'Apply a SUBSURF modifier to objects meant to appear subdivided.', - 'TEXTURES_DIR': 'Additional folder to look for missing textures.' + 'TEXTURES_DIR': 'Additional folder to look for missing textures.', + 'EMIS_AS_MIRCOL': 'Store emis color as mirror color in Blender.' } def update_registry(): - global TEXTURES_DIR, DISPLAY_TRANSP - rd = dict([('tooltips', tooltips), ('TEXTURES_DIR', TEXTURES_DIR), ('DISPLAY_TRANSP', DISPLAY_TRANSP), ('SUBDIV', SUBDIV)]) + global TEXTURES_DIR, DISPLAY_TRANSP, EMIS_AS_MIRCOL + rd = dict([('tooltips', tooltips), ('TEXTURES_DIR', TEXTURES_DIR), ('DISPLAY_TRANSP', DISPLAY_TRANSP), ('SUBDIV', SUBDIV), ('EMIS_AS_MIRCOL', EMIS_AS_MIRCOL)]) Registry.SetKey('ac3d_import', rd, True) rd = Registry.GetKey('ac3d_import', True) @@ -109,6 +115,7 @@ if rd: TEXTURES_DIR = rd['TEXTURES_DIR'] DISPLAY_TRANSP = rd['DISPLAY_TRANSP'] SUBDIV = rd['SUBDIV'] + EMIS_AS_MIRCOL = rd['EMIS_AS_MIRCOL'] except: update_registry() else: update_registry() @@ -299,7 +306,7 @@ class AC3DImport: lines = self.lines line = lines[i].split() mat_name = '' - mat_col = mat_amb = mat_emit = mat_spec_col = [0,0,0] + mat_col = mat_amb = mat_emit = mat_spec_col = mat_mir_col = [0,0,0] mat_alpha = 1 mat_spec = 1.0 @@ -310,11 +317,15 @@ class AC3DImport: mat_amb = (v[0]+v[1]+v[2]) / 3.0 v = map(float,[line[11],line[12],line[13]]) mat_emit = (v[0]+v[1]+v[2]) / 3.0 + if EMIS_AS_MIRCOL: + mat_emit = 0 + mat_mir_col = map(float,[line[11],line[12],line[13]]) + mat_spec_col = map(float,[line[15],line[16],line[17]]) mat_spec = float(line[19]) / 64.0 mat_alpha = float(line[-1]) mat_alpha = 1 - mat_alpha - self.mlist.append([mat_name, mat_col, mat_amb, mat_emit, mat_spec_col, mat_spec, mat_alpha]) + self.mlist.append([mat_name, mat_col, mat_amb, mat_emit, mat_spec_col, mat_spec, mat_mir_col, mat_alpha]) i += 1 line = lines[i].split() @@ -590,7 +601,8 @@ class AC3DImport: m.emit = mat[3] m.specCol = (mat[4][0], mat[4][1], mat[4][2]) m.spec = mat[5] - m.alpha = mat[6] + m.mirCol = (mat[6][0], mat[6][1], mat[6][2]) + m.alpha = mat[7] if m.alpha < 1.0: m.mode |= MAT_MODE_ZTRANSP has_transp_mats = True diff --git a/release/scripts/add_mesh_torus.py b/release/scripts/add_mesh_torus.py index 4f759256497..2941c56420e 100644 --- a/release/scripts/add_mesh_torus.py +++ b/release/scripts/add_mesh_torus.py @@ -6,7 +6,8 @@ Group: 'AddMesh' """ import BPyAddMesh import Blender -from math import cos, sin, pi +try: from math import cos, sin, pi +except: math = None def add_torus(PREF_MAJOR_RAD, PREF_MINOR_RAD, PREF_MAJOR_SEG, PREF_MINOR_SEG): Vector = Blender.Mathutils.Vector @@ -61,5 +62,8 @@ def main(): BPyAddMesh.add_mesh_simple('Torus', verts, [], faces) -main() +if cos and sin and pi: + main() +else: + Blender.Draw.PupMenu("Error%t|This script requires a full python installation") diff --git a/release/scripts/animation_bake_constraints.py b/release/scripts/animation_bake_constraints.py index 58e9e2b1d02..16855828460 100644 --- a/release/scripts/animation_bake_constraints.py +++ b/release/scripts/animation_bake_constraints.py @@ -155,7 +155,7 @@ usrObjectNamePrefix= "" # if that armature had bones (spine, neck, arm) and the bone prefix was "a." # the bones and IPO curves will be (a.spine, a.neck, a.arm) -R2D = 18/3.1415 # radian to grad +R2D = 18/3.141592653589793 # radian to grad BLENDER_VERSION = Blender.Get('version') # Gets the current scene, there can be many scenes in 1 blend file. diff --git a/release/scripts/animation_clean.py b/release/scripts/animation_clean.py new file mode 100644 index 00000000000..fc44f264ac1 --- /dev/null +++ b/release/scripts/animation_clean.py @@ -0,0 +1,192 @@ +#!BPY + +""" +Name: 'Clean Animation Curves' +Blender: 249 +Group: 'Animation' +Tooltip: 'Remove unused keyframes for ipo curves' +""" + +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# Copyright (C) 2008-2009: Blender Foundation +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# -------------------------------------------------------------------------- + +import bpy +from Blender import IpoCurve, Draw, Window + +def clean_ipos(ipos): + eul = 0.001 + + def isflat(vec): + prev_y = vec[0][1] + mid_y = vec[1][1] + next_y = vec[2][1] + + # flat status for prev and next + return abs(mid_y-prev_y) < eul, abs(mid_y-next_y) < eul + + + + X=0 + Y=1 + PREV=0 + MID=1 + NEXT=2 + + LEFT = 0 + RIGHT = 1 + + TOT = 0 + TOTBEZ = 0 + # for ipo in bpy.data.ipos: + for ipo in ipos: + if ipo.lib: + continue + # print ipo + for icu in ipo: + interp = icu.interpolation + extend = icu.extend + + bezierPoints = icu.bezierPoints + bezierVecs = [bez.vec for bez in bezierPoints] + + l = len(bezierPoints) + + TOTBEZ += l + + # our aim is to simplify this ipo as much as possible! + if interp == IpoCurve.InterpTypes.BEZIER or interp == interp == IpoCurve.InterpTypes.LINEAR: + #print "Not yet supported" + + if interp == IpoCurve.InterpTypes.BEZIER: + flats = [isflat(bez) for bez in bezierVecs] + else: + # A bit of a waste but fake the locations for these so they will always be flats + # IS better then too much duplicate code. + flats = [(True, True)] * l + for v in bezierVecs: + v[PREV][Y] = v[NEXT][Y] = v[MID][Y] + + + # remove middle points + if l>2: + done_nothing = False + + while not done_nothing and len(bezierVecs) > 2: + done_nothing = True + i = l-2 + + while i > 0: + #print i + #print i, len(bezierVecs) + if flats[i]==(True,True) and flats[i-1][RIGHT] and flats[i+1][LEFT]: + + if abs(bezierVecs[i][MID][Y] - bezierVecs[i-1][MID][Y]) < eul and abs(bezierVecs[i][MID][Y] - bezierVecs[i+1][MID][Y]) < eul: + done_nothing = False + + del flats[i] + del bezierVecs[i] + icu.delBezier(i) + TOT += 1 + l-=1 + i-=1 + + # remove endpoints + if extend == IpoCurve.ExtendTypes.CONST and len(bezierVecs) > 1: + #print l, len(bezierVecs) + # start + + while l > 2 and (flats[0][RIGHT] and flats[1][LEFT] and (abs(bezierVecs[0][MID][Y] - bezierVecs[1][MID][Y]) < eul)): + print "\tremoving 1 point from start of the curve" + del flats[0] + del bezierVecs[0] + icu.delBezier(0) + TOT += 1 + l-=1 + + + # End + while l > 2 and flats[-2][RIGHT] and flats[-1][LEFT] and (abs(bezierVecs[-2][MID][Y] - bezierVecs[-1][MID][Y]) < eul): + print "\tremoving 1 point from end of the curve", l + del flats[l-1] + del bezierVecs[l-1] + icu.delBezier(l-1) + TOT += 1 + l-=1 + + + + if l==2: + if isflat( bezierVecs[0] )[RIGHT] and isflat( bezierVecs[1] )[LEFT] and abs(bezierVecs[0][MID][Y] - bezierVecs[1][MID][Y]) < eul: + # remove the second point + print "\tremoving 1 point from 2 point bez curve" + # remove the second point + del flats[1] + del bezierVecs[1] + icu.delBezier(1) + TOT+=1 + l-=1 + + # Change to linear for faster evaluation + ''' + if l==1: + print 'Linear' + icu.interpolation = IpoCurve.InterpTypes.LINEAR + ''' + + + + + if interp== IpoCurve.InterpTypes.CONST: + print "Not yet supported" + + print 'total', TOT, TOTBEZ + return TOT, TOTBEZ + +def main(): + ret = Draw.PupMenu('Clean Selected Objects Ipos%t|Object IPO%x1|Object Action%x2|%l|All IPOs (be careful!)%x3') + + sce = bpy.data.scenes.active + ipos = [] + + if ret == 3: + ipos.extend(list(bpy.data.ipos)) + else: + for ob in sce.objects.context: + if ret == 1: + ipo = ob.ipo + if ipo: + ipos.append(ipo) + + elif ret == 2: + action = ob.action + if action: + ipos.extend([ipo for ipo in action.getAllChannelIpos().values() if ipo]) + + + + if not ipos: + Draw.PupMenu('Error%t|No ipos found') + else: + total_removed, total = clean_ipos(ipos) + Draw.PupMenu('Done!%t|Removed ' + str(total_removed) + ' of ' + str(total) + ' points') + + Window.RedrawAll() + + +if __name__ == '__main__': + main() diff --git a/release/scripts/bevel_center.py b/release/scripts/bevel_center.py index 063c6380483..637ed08127f 100644 --- a/release/scripts/bevel_center.py +++ b/release/scripts/bevel_center.py @@ -1,5 +1,5 @@ #!BPY -# coding: utf-8 +# -*- coding: utf-8 -*- """ Registration info for Blender menus Name: 'Bevel Center' Blender: 243 diff --git a/release/scripts/bpymodules/BPyImage.py b/release/scripts/bpymodules/BPyImage.py index 2c342ddec39..504e4ee29ba 100644 --- a/release/scripts/bpymodules/BPyImage.py +++ b/release/scripts/bpymodules/BPyImage.py @@ -79,7 +79,7 @@ def addSlash(path): return path + sys.sep -def comprehensiveImageLoad(imagePath, filePath, PLACE_HOLDER= True, RECURSIVE=True, VERBOSE=False): +def comprehensiveImageLoad(imagePath, filePath, PLACE_HOLDER= True, RECURSIVE=True, VERBOSE=False, CONVERT_CALLBACK=None): ''' imagePath: The image filename If a path precedes it, this will be searched as well. @@ -93,13 +93,30 @@ def comprehensiveImageLoad(imagePath, filePath, PLACE_HOLDER= True, RECURSIVE=Tr RECURSIVE: If True, directories will be recursivly searched. Be carefull with this if you have files in your root directory because it may take a long time. + + CASE_INSENSITIVE: for non win32 systems, find the correct case for the file. + + CONVERT_CALLBACK: a function that takes an existing path and returns a new one. + Use this when loading image formats blender may not support, the CONVERT_CALLBACK + can take the path for a GIF (for example), convert it to a PNG and return the PNG's path. + For formats blender can read, simply return the path that is given. ''' + # VERBOSE = True + if VERBOSE: print 'img:', imagePath, 'file:', filePath + + if os == None and CASE_INSENSITIVE: + CASE_INSENSITIVE = True + # When we have the file load it with this. try/except niceness. def imageLoad(path): #if path.endswith('\\') or path.endswith('/'): # raise 'INVALID PATH' + + if CONVERT_CALLBACK: + path = CONVERT_CALLBACK(path) + try: img = bpy.data.images.new(filename=path) if VERBOSE: print '\t\tImage loaded "%s"' % path diff --git a/release/scripts/bpymodules/BPyMathutils.py b/release/scripts/bpymodules/BPyMathutils.py index 27736b4169e..4882e9aaf21 100644 --- a/release/scripts/bpymodules/BPyMathutils.py +++ b/release/scripts/bpymodules/BPyMathutils.py @@ -132,7 +132,6 @@ modified for Blender/Mathutils by Campell Barton ###################################################################### # Public interface ###################################################################### -from Blender.Mathutils import DotVecs def convexHull(point_list_2d): """Calculate the convex hull of a set of vectors The vectors can be 3 or 4d but only the Xand Y are used. @@ -197,7 +196,7 @@ def plane2mat(plane, normalize= False): up= cent - ((plane[0]+plane[1])/2.0) right= cent - ((plane[1]+plane[2])/2.0) - z= CrossVecs(up, right) + z= up.cross(right) if normalize: up.normalize() @@ -225,15 +224,5 @@ from math import pi, sin, cos, sqrt def angleToLength(angle): # Alredy accounted for - if angle < 0.000001: - return 1.0 - - angle = 2*pi*angle/360 - x,y = cos(angle), sin(angle) - # print "YX", x,y - # 0 d is hoz to the right. - # 90d is vert upward. - fac=1/x - x=x*fac - y=y*fac - return sqrt((x*x)+(y*y)) + if angle < 0.000001: return 1.0 + else: return abs(1.0 / cos(pi*angle/180)); diff --git a/release/scripts/bpymodules/BPyMesh.py b/release/scripts/bpymodules/BPyMesh.py index 415c2a12c69..292f7a4b91e 100644 --- a/release/scripts/bpymodules/BPyMesh.py +++ b/release/scripts/bpymodules/BPyMesh.py @@ -479,7 +479,7 @@ def pickMeshRayFaceWeight(me, orig, rdir): w0 = (l1+l2) w1 = (l0+l2) - w2 = (l1+l2) + w2 = (l1+l0) totw= w0 + w1 + w2 w0=w0/totw @@ -569,12 +569,11 @@ def face_edges(me): def facesPlanerIslands(me): - DotVecs= Blender.Mathutils.DotVecs def roundvec(v): return round(v[0], 4), round(v[1], 4), round(v[2], 4) - face_props= [(cent, no, roundvec(no), DotVecs(cent, no)) for f in me.faces for no, cent in ((f.no, f.cent),)] + face_props= [(cent, no, roundvec(no), cent.dot(no)) for f in me.faces for no, cent in ((f.no, f.cent),)] face_edge_users= face_edges(me) islands= [] @@ -607,7 +606,7 @@ def facesPlanerIslands(me): face_prop2= face_props[fidx2] # normals are the same? if face_prop1[2]==face_prop2[2]: - if abs(face_prop1[3] - DotVecs(face_prop1[1], face_prop2[0])) < 0.000001: + if abs(face_prop1[3] - face_prop1[1].dot(face_prop2[0])) < 0.000001: used_faces[fidx2]= 1 island.append(fidx2) islands.append([me.faces[i] for i in island]) @@ -616,7 +615,6 @@ def facesPlanerIslands(me): def facesUvIslands(me, PREF_IMAGE_DELIMIT=True): - DotVecs= Blender.Mathutils.DotVecs def roundvec(v): return round(v[0], 4), round(v[1], 4) diff --git a/release/scripts/bpymodules/BPyMesh_octree.py b/release/scripts/bpymodules/BPyMesh_octree.py deleted file mode 100644 index 368a33496eb..00000000000 --- a/release/scripts/bpymodules/BPyMesh_octree.py +++ /dev/null @@ -1,332 +0,0 @@ -from Blender import * - -try: - import psyco - psyco.full() -except: - print 'no psyco for you!' - -DotVecs= Mathutils.DotVecs -#======================================================== -# SPACIAL TREE - Seperate Class - use if you want to -# USed for getting vert is a proximity -LEAF_SIZE = 128 -class octreeNode: - def __init__(self, verts, parent): - - # Assunme we are a leaf node, until split is run. - self.verts = verts - self.children = [] - - if parent == None: # ROOT NODE, else set bounds when making children, - # BOUNDS - v= verts[0] - maxx,maxy,maxz= v.co - minx,miny,minz= maxx,maxy,maxz - - for v in verts: - x,y,z= v.co - if x>maxx: maxx= x - if y>maxy: maxy= y - if z>maxz: maxz= z - - if x LEAF_SIZE: - self.makeChildren() # 8 new children, - self.verts = None - # Alredy assumed a leaf not so dont do anything here. - - def makeChildren(self): - verts= self.verts - # Devide into 8 children. - axisDividedVerts = [[],[],[],[],[],[],[],[]] # Verts Only - - - divx = (self.maxx + self.minx) / 2 - divy = (self.maxy + self.miny) / 2 - divz = (self.maxz + self.minz) / 2 - - # Sort into 8 - for v in verts: - x,y,z = v.co - - if x > divx: - if y > divy: - if z > divz: - axisDividedVerts[0].append(v) - else: - axisDividedVerts[1].append(v) - else: - if z > divz: - axisDividedVerts[2].append(v) - else: - axisDividedVerts[3].append(v) - else: - if y > divy: - if z > divz: - axisDividedVerts[4].append(v) - else: - axisDividedVerts[5].append(v) - else: - if z > divz: - axisDividedVerts[6].append(v) - else: - axisDividedVerts[7].append(v) - - # populate self.children - for i in xrange(8): - octNode = octreeNode(axisDividedVerts[i], self) - # Set bounds manually - if i == 0: - octNode.minx = divx - octNode.maxx = self.maxx - octNode.miny = divy - octNode.maxy = self.maxy - octNode.minz = divz - octNode.maxz = self.maxz - elif i == 1: - octNode.minx = divx - octNode.maxx = self.maxx - octNode.miny = divy - octNode.maxy = self.maxy - octNode.minz = self.minz # - octNode.maxz = divz # - elif i == 2: - octNode.minx = divx - octNode.maxx = self.maxx - octNode.miny = self.miny # - octNode.maxy = divy # - octNode.minz = divz - octNode.maxz = self.maxz - elif i == 3: - octNode.minx = divx - octNode.maxx = self.maxx - octNode.miny = self.miny # - octNode.maxy = divy # - octNode.minz = self.minz # - octNode.maxz = divz # - elif i == 4: - octNode.minx = self.minx # - octNode.maxx = divx # - octNode.miny = divy - octNode.maxy = self.maxy - octNode.minz = divz - octNode.maxz = self.maxz - elif i == 5: - octNode.minx = self.minx # - octNode.maxx = divx # - octNode.miny = divy - octNode.maxy = self.maxy - octNode.minz = self.minz # - octNode.maxz = divz # - elif i == 6: - octNode.minx = self.minx # - octNode.maxx = divx # - octNode.miny = self.miny # - octNode.maxy = divy # - octNode.minz = divz - octNode.maxz = self.maxz - elif i == 7: - octNode.minx = self.minx # - octNode.maxx = divx # - octNode.miny = self.miny # - octNode.maxy = divy # - octNode.minz = self.minz # - octNode.maxz = divz # - #octNode.setCornerPoints() - octNode.splitNode() # Splits the node if it can. - self.children.append(octNode) - - # GETS VERTS IN A Distance RANGE- - def getVertsInRange(self, loc, normal, range_val, vertList): - #loc= Mathutils.Vector(loc) # MUST BE VECTORS - #normal= Mathutils.Vector(normal) - - ''' - loc: Vector of the location to search from - normal: None or Vector - if a vector- will only get verts on this side of the vector - range_val: maximum distance. A negative value will fill the list with teh closest vert only. - vertList: starts as an empty list - list that this function fills with verts that match - ''' - xloc,yloc,zloc= loc - - if range_val<0: - range_val= -range_val - FIND_CLOSEST= True - vertList.append(None) # just update the 1 vertex - else: - FIND_CLOSEST= False - - if self.children: - # Check if the bounds are in range_val, - for childNode in self.children: - # First test if we are surrounding the point. - if\ - childNode.minx - range_val < xloc and\ - childNode.maxx + range_val > xloc and\ - childNode.miny - range_val < yloc and\ - childNode.maxy + range_val > yloc and\ - childNode.minz - range_val < zloc and\ - childNode.maxz + range_val > zloc: - # Recurse down or get virts. - childNode.getVertsInRange(loc, normal, range_val, vertList) - #continue # Next please - - else: # we are a leaf node. Test vert locations. - if not normal: - # Length only check - for v in self.verts: - length = (loc - v.co).length - if length < range_val: - if FIND_CLOSEST: - # Just update the 1 vert - vertList[0]= (v, length) - range_val= length # Shink the length so we only get verts from their. - else: - vertList.append((v, length)) - else: - # Lengh and am I infront of the vert. - for v in self.verts: - length = (loc - v.co).length - if length < range_val: - # Check if the points in front - dot= DotVecs(normal, loc) - DotVecs(normal, v.co) - if dot<0: - vertList.append((v, length)) - -# END TREE - - - - -# EXAMPLE RADIO IN PYTHON USING THE ABOVE FUNCTION -""" -import BPyMesh -# Radio bake -def bake(): - - _AngleBetweenVecs_= Mathutils.AngleBetweenVecs - def AngleBetweenVecs(a1,a2): - try: - return _AngleBetweenVecs_(a1,a2) - except: - return 180 - - - - scn = Scene.GetCurrent() - ob = scn.getActiveObject() - me = ob.getData(mesh=1) - - dist= Draw.PupFloatInput('MaxDist:', 2.0, 0.1, 20.0, 0.1, 3) - if dist==None: - return - - # Make nice normals - BPyMesh.meshCalcNormals(me) - - - len_verts= len(me.verts) - #me.sel= False - meshOctTree = octreeNode(me.verts, None) - - - - # Store face areas - vertex_areas= [0.0] * len_verts - - # Get vertex areas - all areas of face users - for f in me.faces: - a= f.area - for v in f.v: - vertex_areas[v.index] += a - - - - bias= 0.001 - - t= sys.time() - - # Tone for the verts - vert_tones= [0.0] * len_verts - maxtone= 0.0 - mintone= 100000000 - for i, v in enumerate(me.verts): - if not i%10: - print 'verts to go', len_verts-i - v_co= v.co - v_no= v.no - verts_in_range= [] - meshOctTree.getVertsInRange(v_co, v_no, dist, verts_in_range) - - tone= 0.0 - # These are verts in our range - for test_v, length in verts_in_range: - if bias 90: # were facing this vert - #if 1: - # Current value us between zz90 and 180 - # make between 0 and 90 - # so 0 is right angles and 90 is direct opposite vertex normal - normal_diff= (normal_diff-90) - - # Vertex area needs to be taken into account so we dont have small faces over influencing. - vertex_area= vertex_areas[test_v.index] - - # Get the angle the vertex is in location from the location and normal of the vert. - above_diff= AngleBetweenVecs(test_v.co-v.co, v_no) - ## Result will be between 0 :above and 90: horizon.. invert this so horizon has littel effect - above_diff= 90-above_diff - # dist-length or 1.0/length both work well - tone= (dist-length) * vertex_area * above_diff * normal_diff - vert_tones[i] += tone - - if maxtonevert_tones[i]: - mintone= vert_tones[i] - - - if not maxtone: - Draw.PupMenu('No verts in range, use a larger range') - return - - # Apply tones - for f in me.faces: - f_col= f.col - for i, v in enumerate(f.v): - c= f_col[i] - v_index= v.index - tone= int(((maxtone - vert_tones[v.index]) / maxtone) * 255 ) - #print tone - c.r= c.g= c.b= tone - - print 'time', sys.time()-t - - -if __name__=="__main__": - bake() -""" \ No newline at end of file diff --git a/release/scripts/bpymodules/BPyMesh_redux.py b/release/scripts/bpymodules/BPyMesh_redux.py index 1bcc6e9f7c8..5955d696fbd 100644 --- a/release/scripts/bpymodules/BPyMesh_redux.py +++ b/release/scripts/bpymodules/BPyMesh_redux.py @@ -25,7 +25,6 @@ import Blender import bpy Vector= Blender.Mathutils.Vector Ang= Blender.Mathutils.AngleBetweenVecs -CrossVecs= Blender.Mathutils.CrossVecs MidpointVecs= Blender.Mathutils.MidpointVecs import BPyMesh @@ -198,8 +197,8 @@ def redux(ob, REDUX=0.5, BOUNDRY_WEIGHT=2.0, REMOVE_DOUBLES=False, FACE_AREA_WEI # the point of collapsing. # Enlarge so we know they intersect: self.length*2 - cv1= CrossVecs(v1no, CrossVecs(v1no, v1co-v2co)) - cv2= CrossVecs(v2no, CrossVecs(v2no, v2co-v1co)) + cv1= v1no.cross(v1no.cross(v1co-v2co)) + cv2= v2no.cross(v2no.cross(v2co-v1co)) # Scale to be less then the edge lengths. cv2.length = cv1.length = 1 diff --git a/release/scripts/bpymodules/BPySys.py b/release/scripts/bpymodules/BPySys.py index 594264fad84..a2d2120ebff 100644 --- a/release/scripts/bpymodules/BPySys.py +++ b/release/scripts/bpymodules/BPySys.py @@ -12,3 +12,63 @@ def cleanName(name): for ch in invalid: name = name.replace(ch, '_') return name +def caseInsensitivePath(path, RET_FOUND=False): + ''' + Get a case insensitive path on a case sensitive system + + RET_FOUND is for internal use only, to avoid too many calls to os.path.exists + # Example usage + getCaseInsensitivePath('/hOmE/mE/sOmEpAtH.tXt') + ''' + import os # todo, what happens with no os? + + if os==None: + if RET_FOUND: ret = path, True + else: ret = path + return ret + + if path=='' or os.path.exists(path): + if RET_FOUND: ret = path, True + else: ret = path + return ret + + f = os.path.basename(path) # f may be a directory or a file + d = os.path.dirname(path) + + suffix = '' + if not f: # dir ends with a slash? + if len(d) < len(path): + suffix = path[:len(path)-len(d)] + + f = os.path.basename(d) + d = os.path.dirname(d) + + if not os.path.exists(d): + d, found = caseInsensitivePath(d, True) + + if not found: + if RET_FOUND: ret = path, False + else: ret = path + return ret + + # at this point, the directory exists but not the file + + try: # we are expecting 'd' to be a directory, but it could be a file + files = os.listdir(d) + except: + if RET_FOUND: ret = path, False + else: ret = path + + f_low = f.lower() + + try: f_nocase = [fl for fl in files if fl.lower() == f_low][0] + except: f_nocase = None + + if f_nocase: + if RET_FOUND: ret = os.path.join(d, f_nocase) + suffix, True + else: ret = os.path.join(d, f_nocase) + suffix + return ret + else: + if RET_FOUND: ret = path, False + else: ret = path + return ret # cant find the right one, just return the path as is. \ No newline at end of file diff --git a/release/scripts/bpymodules/BPyWindow.py b/release/scripts/bpymodules/BPyWindow.py index f48f5dfc0ad..d3fd4fa88b5 100644 --- a/release/scripts/bpymodules/BPyWindow.py +++ b/release/scripts/bpymodules/BPyWindow.py @@ -1,6 +1,6 @@ import Blender from Blender import Mathutils, Window, Scene, Draw, Mesh -from Blender.Mathutils import CrossVecs, Matrix, Vector, Intersect +from Blender.Mathutils import Matrix, Vector, Intersect # DESCRIPTION: # screen_x, screen_y the origin point of the pick ray diff --git a/release/scripts/bpymodules/dxfLibrary.py b/release/scripts/bpymodules/dxfLibrary.py index 5c63e7f5bf5..ccd8ef9b625 100644 --- a/release/scripts/bpymodules/dxfLibrary.py +++ b/release/scripts/bpymodules/dxfLibrary.py @@ -1,10 +1,10 @@ #dxfLibrary.py : provides functions for generating DXF files # -------------------------------------------------------------------------- -__version__ = "v1.27beta - 2008.10.05" -__author__ = "Stani Michiels(Stani), Remigiusz Fiedler(migius)" +__version__ = "v1.33 - 2009.06.16" +__author__ = "Stani Michiels(Stani), Remigiusz Fiedler(migius)" __license__ = "GPL" -__url__ = "http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_dxf" -__bpydoc__ ="""The script exports geometry data to DXF format r12 version. +__url__ = "http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_dxf" +__bpydoc__ ="""The library to export geometry data to DXF format r12 version. Copyright %s Version %s @@ -12,33 +12,51 @@ License %s Homepage %s See the homepage for documentation. -url: +Dedicated thread on BlenderArtists: http://blenderartists.org/forum/showthread.php?t=136439 IDEAs: - - + TODO: -- +- add support for DXFr14 (needs extended file header) +- add support for SPLINEs (possible first in DXFr14 version) +- add user preset for floating point precision (3-16?) History +v1.33 - 2009.06.16 by migius + - modif _point(): converts all coords to floats + - modif LineType class: implement elements + - added VPORT class, incl. defaults + - fix Insert class +v1.32 - 2009.06.06 by migius + - modif Style class: changed defaults to widthFactor=1.0, obliqueAngle=0.0 + - modif Text class: alignment parameter reactivated +v1.31 - 2009.06.02 by migius + - modif _Entity class: added paperspace,elevation +v1.30 - 2009.05.28 by migius + - bugfix 3dPOLYLINE/POLYFACE: VERTEX needs x,y,z coordinates, index starts with 1 not 0 +v1.29 - 2008.12.28 by Yorik + - modif POLYLINE to support bulge segments +v1.28 - 2008.12.13 by Steeve/BlenderArtists + - bugfix for EXTMIN/EXTMAX to suit Cycas-CAD v1.27 - 2008.10.07 by migius -- beautifying output code: keys whitespace prefix -- refactoring DXF-strings format: NewLine moved to the end of + - beautifying output code: keys whitespace prefix + - refactoring DXF-strings format: NewLine moved to the end of v1.26 - 2008.10.05 by migius -- modif POLYLINE to support POLYFACE + - modif POLYLINE to support POLYFACE v1.25 - 2008.09.28 by migius -- modif FACE class for r12 + - modif FACE class for r12 v1.24 - 2008.09.27 by migius -- modif POLYLINE class for r12 -- changing output format from r9 to r12(AC1009) + - modif POLYLINE class for r12 + - changing output format from r9 to r12(AC1009) v1.1 (20/6/2005) by www.stani.be/python/sdxf -- Python library to generate dxf drawings + - Python library to generate dxf drawings ______________________________________________________________ """ % (__author__,__version__,__license__,__url__) # -------------------------------------------------------------------------- # DXF Library: copyright (C) 2005 by Stani Michiels (AKA Stani) -# 2008 modif by Remigiusz Fiedler (AKA migius) +# 2008/2009 modif by Remigiusz Fiedler (AKA migius) # -------------------------------------------------------------------------- # ***** BEGIN GPL LICENSE BLOCK ***** # @@ -76,12 +94,11 @@ _HEADER_POINTS=['insbase','extmin','extmax'] def _point(x,index=0): """Convert tuple to a dxf point""" #print 'deb: _point=', x #------------- - return '\n'.join([' %s\n%s'%((i+1)*10+index,x[i]) for i in range(len(x))]) + return '\n'.join([' %s\n%s'%((i+1)*10+index,float(x[i])) for i in range(len(x))]) def _points(plist): """Convert a list of tuples to dxf points""" out = '\n'.join([_point(plist[i],i)for i in range(len(plist))]) - #print 'deb: points=\n', out #------------------- return out #---base classes---------------------------------------- @@ -100,17 +117,21 @@ class _Call: #------------------------------------------------------- class _Entity(_Call): """Base class for _common group codes for entities.""" - def __init__(self,color=None,extrusion=None,layer='0', + def __init__(self,paperspace=None,color=None,layer='0', lineType=None,lineTypeScale=None,lineWeight=None, - thickness=None,parent=None): + extrusion=None,elevation=None,thickness=None, + parent=None): """None values will be omitted.""" + self.paperspace = paperspace self.color = color - self.extrusion = extrusion self.layer = layer self.lineType = lineType self.lineTypeScale = lineTypeScale self.lineWeight = lineWeight + self.extrusion = extrusion + self.elevation = elevation self.thickness = thickness + #self.visible = visible self.parent = parent def _common(self): @@ -118,13 +139,16 @@ class _Entity(_Call): if self.parent:parent=self.parent else:parent=self result ='' + if parent.paperspace==1: result+=' 67\n1\n' if parent.layer!=None: result+=' 8\n%s\n'%parent.layer if parent.color!=None: result+=' 62\n%s\n'%parent.color - if parent.extrusion!=None: result+='%s\n'%_point(parent.extrusion,200) if parent.lineType!=None: result+=' 6\n%s\n'%parent.lineType - #TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight + # TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight + # TODO: if parent.visible!=None: result+='60\n%s\n'%parent.visible if parent.lineTypeScale!=None: result+=' 48\n%s\n'%parent.lineTypeScale + if parent.elevation!=None: result+=' 38\n%s\n'%parent.elevation if parent.thickness!=None: result+=' 39\n%s\n'%parent.thickness + if parent.extrusion!=None: result+='%s\n'%_point(parent.extrusion,200) return result #-------------------------- @@ -154,56 +178,56 @@ BYBLOCK=0 BYLAYER=256 #---block-type flags (bit coded values, may be combined): -ANONYMOUS =1 # This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application +ANONYMOUS =1 # This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application NON_CONSTANT_ATTRIBUTES =2 # This block has non-constant attribute definitions (this bit is not set if the block has any attribute definitions that are constant, or has no attribute definitions at all) -XREF =4 # This block is an external reference (xref) -XREF_OVERLAY =8 # This block is an xref overlay -EXTERNAL =16 # This block is externally dependent -RESOLVED =32 # This is a resolved external reference, or dependent of an external reference (ignored on input) -REFERENCED =64 # This definition is a referenced external reference (ignored on input) +XREF =4 # This block is an external reference (xref) +XREF_OVERLAY =8 # This block is an xref overlay +EXTERNAL =16 # This block is externally dependent +RESOLVED =32 # This is a resolved external reference, or dependent of an external reference (ignored on input) +REFERENCED =64 # This definition is a referenced external reference (ignored on input) #---mtext flags #attachment point -TOP_LEFT = 1 -TOP_CENTER = 2 -TOP_RIGHT = 3 -MIDDLE_LEFT = 4 -MIDDLE_CENTER = 5 +TOP_LEFT = 1 +TOP_CENTER = 2 +TOP_RIGHT = 3 +MIDDLE_LEFT = 4 +MIDDLE_CENTER = 5 MIDDLE_RIGHT = 6 -BOTTOM_LEFT = 7 -BOTTOM_CENTER = 8 -BOTTOM_RIGHT = 9 +BOTTOM_LEFT = 7 +BOTTOM_CENTER = 8 +BOTTOM_RIGHT = 9 #drawing direction -LEFT_RIGHT = 1 -TOP_BOTTOM = 3 -BY_STYLE = 5 #the flow direction is inherited from the associated text style +LEFT_RIGHT = 1 +TOP_BOTTOM = 3 +BY_STYLE = 5 #the flow direction is inherited from the associated text style #line spacing style (optional): -AT_LEAST = 1 #taller characters will override -EXACT = 2 #taller characters will not override +AT_LEAST = 1 #taller characters will override +EXACT = 2 #taller characters will not override #---polyline flags -CLOSED =1 # This is a closed polyline (or a polygon mesh closed in the M direction) -CURVE_FIT =2 # Curve-fit vertices have been added -SPLINE_FIT =4 # Spline-fit vertices have been added -POLYLINE_3D =8 # This is a 3D polyline -POLYGON_MESH =16 # This is a 3D polygon mesh -CLOSED_N =32 # The polygon mesh is closed in the N direction -POLYFACE_MESH =64 # The polyline is a polyface mesh -CONTINOUS_LINETYPE_PATTERN =128 # The linetype pattern is generated continuously around the vertices of this polyline +CLOSED =1 # This is a closed polyline (or a polygon mesh closed in the M direction) +CURVE_FIT =2 # Curve-fit vertices have been added +SPLINE_FIT =4 # Spline-fit vertices have been added +POLYLINE_3D =8 # This is a 3D polyline +POLYGON_MESH =16 # This is a 3D polygon mesh +CLOSED_N =32 # The polygon mesh is closed in the N direction +POLYFACE_MESH =64 # The polyline is a polyface mesh +CONTINOUS_LINETYPE_PATTERN =128 # The linetype pattern is generated continuously around the vertices of this polyline #---text flags #horizontal -LEFT = 0 -CENTER = 1 -RIGHT = 2 -ALIGNED = 3 #if vertical alignment = 0 -MIDDLE = 4 #if vertical alignment = 0 -FIT = 5 #if vertical alignment = 0 +LEFT = 0 +CENTER = 1 +RIGHT = 2 +ALIGNED = 3 #if vertical alignment = 0 +MIDDLE = 4 #if vertical alignment = 0 +FIT = 5 #if vertical alignment = 0 #vertical -BASELINE = 0 -BOTTOM = 1 -MIDDLE = 2 -TOP = 3 +BASELINE = 0 +BOTTOM = 1 +MIDDLE = 2 +TOP = 3 ####3) Classes #---entitities ----------------------------------------------- @@ -239,7 +263,7 @@ class Face(_Entity): """3dface""" def __init__(self,points,**common): _Entity.__init__(self,**common) - if len(points)<4: #fix for r12 format + while len(points)<4: #fix for r12 format points.append(points[-1]) self.points=points @@ -269,7 +293,7 @@ class Insert(_Entity): self.rotation=rotation def __str__(self): - result=' 0\nINSERT\n 2\n%s\n%s\n%s\n'%\ + result=' 0\nINSERT\n 2\n%s\n%s%s\n'%\ (self.name,self._common(),_point(self.point)) if self.xscale!=None:result+=' 41\n%s\n'%self.xscale if self.yscale!=None:result+=' 42\n%s\n'%self.yscale @@ -295,51 +319,80 @@ class Line(_Entity): #----------------------------------------------- class PolyLine(_Entity): def __init__(self,points,org_point=[0,0,0],flag=0,width=None,**common): + #width = number, or width = list [width_start=None, width_end=None] + #for 2d-polyline: points = [ [x, y, z, width_start=None, width_end=None, bulge=0 or None], ...] + #for 3d-polyline: points = [ [x, y, z], ...] + #for polyface: points = [points_list, faces_list] _Entity.__init__(self,**common) self.points=points self.org_point=org_point self.flag=flag - if self.flag==64: + self.polyface = False + self.polyline2d = False + self.faces = [] # dummy value + self.width= None # dummy value + if self.flag & POLYFACE_MESH: + self.polyface=True self.points=points[0] self.faces=points[1] self.p_count=len(self.points) self.f_count=len(self.faces) - self.width=width + elif not self.flag & POLYLINE_3D: + self.polyline2d = True + if width: + if type(width)!='list': + width=[width,width] + self.width=width def __str__(self): result= ' 0\nPOLYLINE\n%s 70\n%s\n' %(self._common(),self.flag) - #print 'deb: self._common()', self._common() #---------- result+=' 66\n1\n' result+='%s\n' %_point(self.org_point) - if self.flag==64: + if self.polyface: result+=' 71\n%s\n' %self.p_count result+=' 72\n%s\n' %self.f_count + elif self.polyline2d: + if self.width!=None: result+=' 40\n%s\n 41\n%s\n' %(self.width[0],self.width[1]) for point in self.points: result+=' 0\nVERTEX\n' result+=' 8\n%s\n' %self.layer - result+='%s\n' %_point(point) - if self.flag==64: result+=' 70\n192\n' - if self.width: result+=' 40\n%s\n 41\n%s\n' %(self.width,self.width) - if self.flag==64: - for face in self.faces: - result+=' 0\nVERTEX\n' - result+=' 8\n%s\n' %self.layer - result+='%s\n' %_point(self.org_point) - result+=' 70\n128\n' - result+=' 71\n%s\n' %face[0] - result+=' 72\n%s\n' %face[1] - result+=' 73\n%s\n' %face[2] - if len(face)==4: result+=' 74\n%s\n' %face[3] + if self.polyface: + result+='%s\n' %_point(point[0:3]) + result+=' 70\n192\n' + elif self.polyline2d: + result+='%s\n' %_point(point[0:2]) + if len(point)>4: + width1, width2 = point[3], point[4] + if width1!=None: result+=' 40\n%s\n' %width1 + if width2!=None: result+=' 41\n%s\n' %width2 + if len(point)==6: + bulge = point[5] + if bulge: result+=' 42\n%s\n' %bulge + else: + result+='%s\n' %_point(point[0:3]) + for face in self.faces: + result+=' 0\nVERTEX\n' + result+=' 8\n%s\n' %self.layer + result+='%s\n' %_point(self.org_point) + result+=' 70\n128\n' + result+=' 71\n%s\n' %face[0] + result+=' 72\n%s\n' %face[1] + result+=' 73\n%s\n' %face[2] + if len(face)==4: result+=' 74\n%s\n' %face[3] result+=' 0\nSEQEND\n' result+=' 8\n%s\n' %self.layer return result #----------------------------------------------- class Point(_Entity): - """Colored solid fill.""" + """Point.""" def __init__(self,points=None,**common): _Entity.__init__(self,**common) self.points=points + def __str__(self): # TODO: + return ' 0\nPOINT\n%s%s\n' %(self._common(), + _points(self.points) + ) #----------------------------------------------- class Solid(_Entity): @@ -380,7 +433,7 @@ class Text(_Entity): if self.style: result+=' 7\n%s\n'%self.style if self.flag: result+=' 71\n%s\n'%self.flag if self.justifyhor: result+=' 72\n%s\n'%self.justifyhor - #TODO: if self.alignment: result+='%s\n'%_point(self.alignment,1) + if self.alignment: result+='%s\n'%_point(self.alignment,1) if self.justifyver: result+=' 73\n%s\n'%self.justifyver return result @@ -468,7 +521,7 @@ class Block(_Collection): self.name=name self.flag=0 self.base=base - def __str__(self): + def __str__(self): # TODO: e=''.join([str(x)for x in self.entities]) return ' 0\nBLOCK\n 8\n%s\n 2\n%s\n 70\n%s\n%s\n 3\n%s\n%s 0\nENDBLK\n'%\ (self.layer,self.name.upper(),self.flag,_point(self.base),self.name.upper(),e) @@ -488,20 +541,27 @@ class Layer(_Call): #----------------------------------------------- class LineType(_Call): """Custom linetype""" - def __init__(self,name='continuous',description='Solid line',elements=[],flag=64): - # TODO: Implement lineType elements + def __init__(self,name='CONTINUOUS',description='Solid line',elements=[0.0],flag=0): self.name=name self.description=description self.elements=copy.copy(elements) self.flag=flag def __str__(self): - return ' 0\nLTYPE\n 2\n%s\n 70\n%s\n 3\n%s\n 72\n65\n 73\n%s\n 40\n0.0\n'%\ - (self.name.upper(),self.flag,self.description,len(self.elements)) + result = ' 0\nLTYPE\n 2\n%s\n 70\n%s\n 3\n%s\n 72\n65\n'%\ + (self.name.upper(),self.flag,self.description) + if self.elements: + elements = ' 73\n%s\n' %(len(self.elements)-1) + elements += ' 40\n%s\n' %(self.elements[0]) + for e in self.elements[1:]: + elements += ' 49\n%s\n' %e + result += elements + return result + #----------------------------------------------- class Style(_Call): """Text style""" - def __init__(self,name='standard',flag=0,height=0,widthFactor=40,obliqueAngle=50, + def __init__(self,name='standard',flag=0,height=0,widthFactor=1.0,obliqueAngle=0.0, mirror=0,lastHeight=1,font='arial.ttf',bigFont=''): self.name=name self.flag=flag @@ -519,27 +579,137 @@ class Style(_Call): self.font.upper(),self.bigFont.upper()) #----------------------------------------------- -class View(_Call): - def __init__(self,name,flag=0,width=1,height=1,center=(0.5,0.5), - direction=(0,0,1),target=(0,0,0),lens=50, - frontClipping=0,backClipping=0,twist=0,mode=0): +class VPort(_Call): + def __init__(self,name,flag=0, + leftBottom=(0.0,0.0), + rightTop=(1.0,1.0), + center=(0.5,0.5), + snap_base=(0.0,0.0), + snap_spacing=(0.1,0.1), + grid_spacing=(0.1,0.1), + direction=(0.0,0.0,1.0), + target=(0.0,0.0,0.0), + height=1.0, + ratio=1.0, + lens=50, + frontClipping=0, + backClipping=0, + snap_rotation=0, + twist=0, + mode=0, + circle_zoom=100, + fast_zoom=1, + ucsicon=1, + snap_on=0, + grid_on=0, + snap_style=0, + snap_isopair=0 + ): self.name=name self.flag=flag - self.width=width - self.height=height + self.leftBottom=leftBottom + self.rightTop=rightTop + self.center=center + self.snap_base=snap_base + self.snap_spacing=snap_spacing + self.grid_spacing=grid_spacing + self.direction=direction + self.target=target + self.height=float(height) + self.ratio=float(ratio) + self.lens=float(lens) + self.frontClipping=float(frontClipping) + self.backClipping=float(backClipping) + self.snap_rotation=float(snap_rotation) + self.twist=float(twist) + self.mode=mode + self.circle_zoom=circle_zoom + self.fast_zoom=fast_zoom + self.ucsicon=ucsicon + self.snap_on=snap_on + self.grid_on=grid_on + self.snap_style=snap_style + self.snap_isopair=snap_isopair + def __str__(self): + output = [' 0', 'VPORT', + ' 2', self.name, + ' 70', self.flag, + _point(self.leftBottom), + _point(self.rightTop,1), + _point(self.center,2), # View center point (in DCS) + _point(self.snap_base,3), + _point(self.snap_spacing,4), + _point(self.grid_spacing,5), + _point(self.direction,6), #view direction from target (in WCS) + _point(self.target,7), + ' 40', self.height, + ' 41', self.ratio, + ' 42', self.lens, + ' 43', self.frontClipping, + ' 44', self.backClipping, + ' 50', self.snap_rotation, + ' 51', self.twist, + ' 71', self.mode, + ' 72', self.circle_zoom, + ' 73', self.fast_zoom, + ' 74', self.ucsicon, + ' 75', self.snap_on, + ' 76', self.grid_on, + ' 77', self.snap_style, + ' 78', self.snap_isopair + ] + + output_str = '' + for s in output: + output_str += '%s\n' %s + return output_str + + + +#----------------------------------------------- +class View(_Call): + def __init__(self,name,flag=0, + width=1, + height=1, + center=(0.5,0.5), + direction=(0,0,1), + target=(0,0,0), + lens=50, + frontClipping=0, + backClipping=0, + twist=0,mode=0 + ): + self.name=name + self.flag=flag + self.width=float(width) + self.height=float(height) self.center=center self.direction=direction self.target=target - self.lens=lens - self.frontClipping=frontClipping - self.backClipping=backClipping - self.twist=twist + self.lens=float(lens) + self.frontClipping=float(frontClipping) + self.backClipping=float(backClipping) + self.twist=float(twist) self.mode=mode def __str__(self): - return ' 0\nVIEW\n 2\n%s\n 70\n%s\n 40\n%s\n%s\n 41\n%s\n%s\n%s\n 42\n%s\n 43\n%s\n 44\n%s\n 50\n%s\n 71\n%s\n'%\ - (self.name,self.flag,self.height,_point(self.center),self.width, - _point(self.direction,1),_point(self.target,2),self.lens, - self.frontClipping,self.backClipping,self.twist,self.mode) + output = [' 0', 'VIEW', + ' 2', self.name, + ' 70', self.flag, + ' 40', self.height, + _point(self.center), + ' 41', self.width, + _point(self.direction,1), + _point(self.target,2), + ' 42', self.lens, + ' 43', self.frontClipping, + ' 44', self.backClipping, + ' 50', self.twist, + ' 71', self.mode + ] + output_str = '' + for s in output: + output_str += '%s\n' %s + return output_str #----------------------------------------------- def ViewByWindow(name,leftBottom=(0,0),rightTop=(1,1),**options): @@ -552,11 +722,12 @@ def ViewByWindow(name,leftBottom=(0,0),rightTop=(1,1),**options): #----------------------------------------------- class Drawing(_Collection): """Dxf drawing. Use append or any other list methods to add objects.""" - def __init__(self,insbase=(0.0,0.0,0.0),extmin=(0.0,0.0),extmax=(0.0,0.0), + def __init__(self,insbase=(0.0,0.0,0.0),extmin=(0.0,0.0,0.0),extmax=(0.0,0.0,0.0), layers=[Layer()],linetypes=[LineType()],styles=[Style()],blocks=[], - views=[],entities=None,fileName='test.dxf'): + views=[],vports=[],entities=None,fileName='test.dxf'): # TODO: replace list with None,arial - if not entities:entities=[] + if not entities: + entities=[] _Collection.__init__(self,entities) self.insbase=insbase self.extmin=extmin @@ -565,6 +736,7 @@ class Drawing(_Collection): self.linetypes=copy.copy(linetypes) self.styles=copy.copy(styles) self.views=copy.copy(views) + self.vports=copy.copy(vports) self.blocks=copy.copy(blocks) self.fileName=fileName #private @@ -608,7 +780,8 @@ class Drawing(_Collection): header=[self.acadver]+[self._point(attr,getattr(self,attr))+'\n' for attr in _HEADER_POINTS] header=self._section('header',header) - tables=[self._table('ltype',[str(x) for x in self.linetypes]), + tables=[self._table('vport',[str(x) for x in self.vports]), + self._table('ltype',[str(x) for x in self.linetypes]), self._table('layer',[str(x) for x in self.layers]), self._table('style',[str(x) for x in self.styles]), self._table('view',[str(x) for x in self.views]), @@ -680,9 +853,9 @@ def test(): #Drawing d=Drawing() #tables - d.blocks.append(b) #table blocks - d.styles.append(Style()) #table styles - d.views.append(View('Normal')) #table view + d.blocks.append(b) #table blocks + d.styles.append(Style()) #table styles + d.views.append(View('Normal')) #table view d.views.append(ViewByWindow('Window',leftBottom=(1,0),rightTop=(2,1))) #idem #entities @@ -692,17 +865,16 @@ def test(): d.append(Line(points=[(0,0,0),(1,1,1)])) d.append(Mtext('Click on Ads\nmultiple lines with mtext',point=(1,1,1),color=5,rotation=90)) d.append(Text('Please donate!',point=(3,0,1))) - d.append(Rectangle(point=(2,2,2),width=4,height=3,color=6,solid=Solid(color=2))) + #d.append(Rectangle(point=(2,2,2),width=4,height=3,color=6,solid=Solid(color=2))) d.append(Solid(points=[(4,4,0),(5,4,0),(7,8,0),(9,9,0)],color=3)) - d.append(PolyLine(points=[(1,1,1),(2,1,1),(2,2,1),(1,2,1)],closed=1,color=1)) + #d.append(PolyLine(points=[(1,1,1),(2,1,1),(2,2,1),(1,2,1)],flag=1,color=1)) #d.saveas('c:\\test.dxf') d.saveas('test.dxf') - #----------------------------------------------------- if __name__=='__main__': if not copy: Draw.PupMenu('Error%t|This script requires a full python install') - main() + else: test() \ No newline at end of file diff --git a/release/scripts/bpymodules/mesh_gradient.py b/release/scripts/bpymodules/mesh_gradient.py index 936f4958467..e582a30152b 100644 --- a/release/scripts/bpymodules/mesh_gradient.py +++ b/release/scripts/bpymodules/mesh_gradient.py @@ -6,7 +6,7 @@ import BPyWindow mouseViewRay= BPyWindow.mouseViewRay from Blender import Mathutils, Window, Scene, Draw, sys -from Blender.Mathutils import CrossVecs, Vector, Intersect, LineIntersect, AngleBetweenVecs +from Blender.Mathutils import Vector, Intersect, LineIntersect, AngleBetweenVecs LMB= Window.MButs['L'] def mouseup(): @@ -101,11 +101,11 @@ def vertexGradientPick(ob, MODE): # make a line 90d to the grad in screenspace. if (OriginA-OriginB).length <= eps: # Persp view. same origin different direction - cross_grad= CrossVecs(DirectionA, DirectionB) + cross_grad= DirectionA.cross(DirectionB) ORTHO= False else: # Ortho - Same direction, different origin - cross_grad= CrossVecs(DirectionA, OriginA-OriginB) + cross_grad= DirectionA.cross(OriginA-OriginB) ORTHO= True cross_grad.normalize() diff --git a/release/scripts/bpymodules/paths_svg2obj.py b/release/scripts/bpymodules/paths_svg2obj.py index de40bea3191..6bab6dcbfd8 100644 --- a/release/scripts/bpymodules/paths_svg2obj.py +++ b/release/scripts/bpymodules/paths_svg2obj.py @@ -1,7 +1,7 @@ # -*- coding: latin-1 -*- """ -SVG 2 OBJ translater, 0.5.9h -Copyright (c) jm soler juillet/novembre 2004-april 2007, +SVG 2 OBJ translater, 0.5.9o +Copyright (c) jm soler juillet/novembre 2004-april 2009, # --------------------------------------------------------------- released under GNU Licence for the Blender 2.42 Python Scripts Bundle. @@ -20,7 +20,6 @@ en m Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis. - This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -35,7 +34,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # --------------------------------------------------------------- - +# #--------------------------------------------------------------------------- # Page officielle : # http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_import_svg.htm @@ -253,15 +252,29 @@ Changelog: 0.5.9h : - 2007/5/2 - script was updated with the modifs by cambo - - removed all debug statements + - removed all debug statements - correction of a zero division error in the calc_arc function. + 0.5.9f: - 2007/15/7 + - Correction de plusieurs bugs sur l'attributions des couleurs et le nommage + des courbes + + 0.5.9i : - ??/??/?? + - Patch externe réalisé sur blender.org project. + + 0.5.9j : - 08/11/2008 + 0.5.9k : - 14/01/2009 + 0.5.9l : - 31/01/2009 + 0.5.9n : - 01/02/2009 + 0.5.9o : - 04/04/2009, remove pattern if it made with path. + + ================================================================================== ==================================================================================""" SHARP_IMPORT=0 SCALE=1 scale_=1 -DEBUG = 0#print +DEBUG = 0 DEVELOPPEMENT=0 TESTCOLOR=0 @@ -269,6 +282,7 @@ LAST_ID='' LAST_COLOR=[0.0,0.0,0.0,0.0] SEPARATE_CURVES=0 USE_COLORS=0 +PATTERN=0 SVGCOLORNAMELIST={ 'aliceblue':[240, 248, 255] ,'antiquewhite':[250, 235, 215] ,'aqua':[ 0, 255, 255], 'aquamarine':[127, 255, 212] @@ -533,7 +547,7 @@ def createCURVES(curves, name): scene.objects.selected = [] if not SEPARATE_CURVES: - c = Curve.New() + c = Curve.New() c.setResolu(24) MATNAME=[] @@ -709,7 +723,6 @@ def circle(prp): else : cx =float(prp['cx']) if 'cy' not in prp: cy=0.0 else : cy =float(prp['cy']) - #print prp.keys() r = float(prp['r']) D=['M',str(cx),str(cy+r), 'C',str(cx-r), str(cy+r*0.552),str(cx-0.552*r),str(cy+r), str(cx),str(cy+r), @@ -777,6 +790,7 @@ def polygon(prp): D.append('Z') return D + #-------------------- # 0.5.8, to remove exec #-------------------- @@ -852,7 +866,7 @@ def calc_arc (cpx,cpy, rx, ry, ang, fa , fs , x, y) : #-------------------- # 0.3.9 #-------------------- -def curve_to_a(c,D,n0,CP): #A,a +def curve_to_a(curves, c,D,n0,CP): #A,a global SCALE l=[float(D[c[1]+1]),float(D[c[1]+2]),float(D[c[1]+3]), int(D[c[1]+4]),int(D[c[1]+5]),float(D[c[1]+6]),float(D[c[1]+7])] @@ -866,8 +880,7 @@ def curve_to_a(c,D,n0,CP): #A,a POINTS= calc_arc (CP[0],CP[1], l[0], l[1], l[2]*(PI / 180.0), l[3], l[4], - l[5], l[6] ) - #if DEBUG == 1 : print POINTS + l[5], l[6] ) for p in POINTS : B=Bez() B.co=[ p[2][0],p[2][1], p[0][0],p[0][1], p[1][0],p[1][1]] @@ -881,16 +894,23 @@ def curve_to_a(c,D,n0,CP): #A,a BP.co[2]=BP.co[0] BP.co[3]=BP.co[1] CP=[l[5], l[6]] + #---------- 059m------------ + if len(D)>c[1]+7 and D[c[1]+8] not in TAGcourbe : + c[1]+=7 + curves,n0,CP=curve_to_a(curves, c, D, n0,CP) + #---------- 059m------------ return curves,n0,CP -def move_to(c, D, n0,CP, proprietes): +def move_to(curves, c, D, n0,CP, proprietes): global DEBUG,TAGcourbe, LAST_ID global USE_COLORS l=[float(D[c[1]+1]),float(D[c[1]+2])] + if c[0]=='m': l=[l[0]+CP[0], l[1] + CP[1]] + if n0 in curves.ITEM: n0+=1 CP=[l[0],l[1]] @@ -917,14 +937,12 @@ def move_to(c, D, n0,CP, proprietes): B.co=[CP[0],CP[1],CP[0],CP[1],CP[0],CP[1]] B.ha=['L','C'] B.tag=c[0] - curves.ITEM[n0].beziers_knot.append(B) - #if DEBUG==1: print curves.ITEM[n0], CP + curves.ITEM[n0].beziers_knot.append(B) return curves,n0,CP -def close_z(c,D,n0,CP): #Z,z +def close_z(curves, c,D,n0,CP): #Z,z curves.ITEM[n0].flagUV[0]=1 if len(curves.ITEM[n0].beziers_knot)>1: - #print len(curves.ITEM[n0].beziers_knot) BP=curves.ITEM[n0].beziers_knot[-1] BP0=curves.ITEM[n0].beziers_knot[0] if BP.tag in ['c','C','s','S',]: @@ -936,7 +954,7 @@ def close_z(c,D,n0,CP): #Z,z n0-=1 return curves,n0,CP -def curve_to_q(c,D,n0,CP): #Q,q +def curve_to_q(curves, c,D,n0,CP): #Q,q l=[float(D[c[1]+1]),float(D[c[1]+2]),float(D[c[1]+3]),float(D[c[1]+4])] if c[0]=='q': l=[l[0]+CP[0], l[1]+CP[1], l[2]+CP[0], l[3]+CP[1]] @@ -948,15 +966,14 @@ def curve_to_q(c,D,n0,CP): #Q,q BP.co[2]=BP.co[0] BP.co[3]=BP.co[1] curves.ITEM[n0].beziers_knot.append(B) - #if DEBUG==1: print B.co,BP.co CP=[l[2],l[3]] #if DEBUG==1: pass if len(D)>c[1]+5 and D[c[1]+5] not in TAGcourbe : c[1]+=4 - curve_to_q(c, D, n0,CP) + curves,n0,CP=curve_to_q(curves, c, D, n0,CP) return curves,n0,CP -def curve_to_t(c,D,n0,CP): #T,t +def curve_to_t(curves, c,D,n0,CP): #T,t l=[float(D[c[1]+1]),float(D[c[1]+2])] if c[0]=='t': l=[l[0]+CP[0], l[1]+CP[1]] @@ -970,11 +987,10 @@ def curve_to_t(c,D,n0,CP): #T,t BP.co[2]=l0[2] BP.co[3]=l0[3] curves.ITEM[n0].beziers_knot.append(B) - #if DEBUG==1: print B.co,BP.co CP=[l[0],l[1]] if len(D)>c[1]+3 and D[c[1]+3] not in TAGcourbe : c[1]+=4 - curve_to_t(c, D, n0,CP) + curves,n0,CP=curve_to_t(curves, c, D, n0,CP) return curves,n0,CP #-------------------- @@ -985,7 +1001,7 @@ def build_SYMETRIC(l): Y=l[3]-(l[1]-l[3]) return X,Y -def curve_to_s(c,D,n0,CP): #S,s +def curve_to_s(curves, c,D,n0,CP): #S,s l=[float(D[c[1]+1]), float(D[c[1]+2]), float(D[c[1]+3]), @@ -1003,17 +1019,16 @@ def curve_to_s(c,D,n0,CP): #S,s #-------------------- BP.co[2],BP.co[3]=build_SYMETRIC([BP.co[4],BP.co[5],BP.co[0],BP.co[1]]) curves.ITEM[n0].beziers_knot.append(B) - #if DEBUG==1: print B.co,BP.co #-------------------- # 0.4.3 #-------------------- CP=[l[2],l[3]] if len(D)>c[1]+5 and D[c[1]+5] not in TAGcourbe : c[1]+=4 - curve_to_c(c, D, n0,CP) + curves,n0,CP=curve_to_c(curves, c, D, n0,CP) return curves,n0,CP -def curve_to_c(c, D, n0,CP): #c,C +def curve_to_c(curves, c, D, n0,CP): #c,C l=[float(D[c[1]+1]),float(D[c[1]+2]),float(D[c[1]+3]), float(D[c[1]+4]),float(D[c[1]+5]),float(D[c[1]+6])] if c[0]=='c': @@ -1030,6 +1045,8 @@ def curve_to_c(c, D, n0,CP): #c,C l[5], l[2], l[3]] #plus toucher au 2-3 + + B.ha=['C','C'] B.tag=c[0] BP=curves.ITEM[n0].beziers_knot[-1] @@ -1037,32 +1054,38 @@ def curve_to_c(c, D, n0,CP): #c,C BP.co[3]=l[1] BP.ha[1]='C' curves.ITEM[n0].beziers_knot.append(B) - #if DEBUG==1: print B.co,BP.co CP=[l[4],l[5]] if len(D)>c[1]+7 and D[c[1]+7] not in TAGcourbe : - c[1]+=6 - curve_to_c(c, D, n0,CP) + c[1]+=6 + curves,n0,CP=curve_to_c(curves, c, D, n0,CP) return curves,n0,CP -def draw_line_l(c, D, n0,CP): #L,l - l=[float(D[c[1]+1]),float(D[c[1]+2])] +def draw_line_l(curves, c, D, n0,CP): #L,l + + l=[float(D[c[1]+1]),float(D[c[1]+2])] if c[0]=='l': l=[l[0]+CP[0], - l[1]+CP[1]] + l[1]+CP[1]] B=Bez() - B.co=[l[0],l[1],l[0],l[1],l[0],l[1]] + B.co=[l[0],l[1], + l[0],l[1], + l[0],l[1]] + B.ha=['L','L'] B.tag=c[0] BP=curves.ITEM[n0].beziers_knot[-1] BP.ha[1]='L' + curves.ITEM[n0].beziers_knot.append(B) - CP=[B.co[0],B.co[1]] + CP=[B.co[4],B.co[5]] + if len(D)>c[1]+3 and D[c[1]+3] not in TAGcourbe : c[1]+=2 - draw_line_l(c, D, n0,CP) #L + curves,n0,CP=draw_line_l(curves, c, D, n0,CP) #L + return curves,n0,CP -def draw_line_h(c,D,n0,CP): #H,h +def draw_line_h(curves, c,D,n0,CP): #H,h if c[0]=='h': l=[float(D[c[1]+1])+float(CP[0]),CP[1]] else: @@ -1077,7 +1100,7 @@ def draw_line_h(c,D,n0,CP): #H,h CP=[l[0],l[1]] return curves,n0,CP -def draw_line_v(c,D,n0,CP): #V, v +def draw_line_v(curves, c,D,n0,CP): #V, v if c[0]=='v': l=[CP[0], float(D[c[1]+1])+CP[1]] else: @@ -1121,17 +1144,31 @@ TAGtransform=['M','L','C','S','H','V','T','Q'] tagTRANSFORM=0 def wash_DATA(ndata): - if ndata: - #if DEBUG==1: print ndata + if ndata: ndata = ndata.strip() + if ndata[0]==',':ndata=ndata[1:] if ndata[-1]==',':ndata=ndata[:-1] + #-------------------- # 0.4.0 : 'e' #-------------------- - i = ndata.find('-') - if i != -1 and ndata[i-1] not in ' ,e': - ndata=ndata.replace('-',',-') + ni=0 + i = ndata.find('-',ni) + if i != -1: + while i>-1 : + i = ndata.find('-',ni) + # 059l ------ + if i>0 : + if ndata[i-1] not in [' ',',','e']: + ndata=ndata[:i]+','+ndata[i:] + ni=i+2 + else: + ni=i+1 + elif i>-1: + ni=1 + # 059l ------ + ndata=ndata.replace(',,',',') ndata=ndata.replace(' ',',') ndata=ndata.split(',') @@ -1153,7 +1190,7 @@ def list_DATA(DATA): # borner les differents segments qui devront etre # traites # pour cela construire une liste avec chaque - # la position de chaqe emplacement tag de type + # position de chaque emplacement tag de type # commande path... # ---------------------------------------- tagplace=[] @@ -1169,8 +1206,10 @@ def list_DATA(DATA): # d'apparition des tags #------------------------------------------ tagplace.sort() - + tpn=range(len(tagplace)) + + #-------------------- # 0.3.5 :: short data, only one tag #-------------------- @@ -1179,14 +1218,18 @@ def list_DATA(DATA): for t in tpn[:-1]: DATA2.append(DATA[tagplace[t]:tagplace[t]+1]) ndata=DATA[tagplace[t]+1:tagplace[t+1]] + if DATA2[-1] not in ['z','Z'] : ndata=wash_DATA(ndata) DATA2.extend(ndata) + DATA2.append(DATA[tagplace[t+1]:tagplace[t+1]+1]) + if DATA2[-1] not in ['z','Z'] and len(DATA)-1>=tagplace[t+1]+1: ndata=DATA[tagplace[t+1]+1:] ndata=wash_DATA(ndata) DATA2.extend(ndata) #059a + else: #-------------------- # 0.3.5 : short data,only one tag @@ -1276,15 +1319,13 @@ def control_CONTAINT(txt): nt0=txt[t0:t1+1] t2=nt0[nt0.find('(')+1:-1] val=nt0[:nt0.find('(')] + while t2.find(' ')!=-1: t2=t2.replace(' ',' ') - t2=t2.replace(' ',',') + while t2.find(', ')!=-1: #059l + t2=t2.replace(', ',',') #059l - """ - t2=t2.split(',') - for index, t in enumerate(t2): - t2[index]=float(t) - """ + t2=t2.replace(' ',',') t2=[float(t) for t in t2.split(',')] if val=='rotate' : @@ -1314,12 +1355,24 @@ def curve_FILL(Courbe,proprietes): i= i+6 Courbe[n].color=[int(pr[i:i+2],16),int(pr[i+2:i+4],16),int(pr[i+4:i+6],16)] Courbe[n].mat=1 - elif ';fill-opacity' in pr: - i= pr.find('fill:')+5 - i2= pr.find(';',i) - COLORNAME= pr[i:i2] - Courbe[n].color=SVGCOLORNAMELIST[COLORNAME] - Courbe[n].mat=1 + elif ';fill-opacity' in pr: + if pr.find('fill:url')==-1: + i= pr.find('fill:')+5 + i2= pr.find(';',i) + COLORNAME= pr[i:i2] + Courbe[n].color=SVGCOLORNAMELIST[COLORNAME] + Courbe[n].mat=1 + elif 'color:' in pr: + i= pr.find('color:')+6 + i2= pr.find(';',i) + COLORNAME= pr[i:i2] + Courbe[n].color=SVGCOLORNAMELIST[COLORNAME] + Courbe[n].mat=1 + else : + COLORNAME= 'white' + Courbe[n].color=SVGCOLORNAMELIST[COLORNAME] + Courbe[n].mat=1 + #---------------------------------------------- # 0.4.1 : apply transform stack #---------------------------------------------- @@ -1367,9 +1420,8 @@ def filter(d): def get_BOUNDBOX(BOUNDINGBOX,SVG): if 'viewbox' not in SVG: h=float(filter(SVG['height'])) - #if DEBUG==1 : print 'h : ',h + w=float(filter(SVG['width'])) - #if DEBUG==1 : print 'w :',w BOUNDINGBOX['rec']=[0.0,0.0,w,h] r=BOUNDINGBOX['rec'] BOUNDINGBOX['coef']=w/h @@ -1414,13 +1466,13 @@ def collect_ATTRIBUTS(data): # -------------------------------------------- def build_HIERARCHY(t): global CP, curves, SCALE, DEBUG, BOUNDINGBOX, scale_, tagTRANSFORM - global LAST_ID + global LAST_ID, PATTERN TRANSFORM=0 t=t.replace('\t',' ') while t.find(' ')!=-1: t=t.replace(' ',' ') n0=0 t0=t1=0 - baliste=[] + #baliste=[] balisetype=['?','?','/','/','!','!'] BALISES=['D', #DECL_TEXTE', 'D', #DECL_TEXTE', @@ -1442,35 +1494,41 @@ def build_HIERARCHY(t): if t0>-1 and t1>-1: if t[t0+1] in balisetype: b=balisetype.index(t[t0+1]) + if t[t0+2]=='-': b=balisetype.index(t[t0+1])+1 - #print t[t0:t1] + balise=BALISES[b] + if b==2: parent=STACK.pop(-1) if parent!=None and TRANSFORM>0: TRANSFORM-=1 + elif t[t1-1] in balisetype: balise=BALISES[balisetype.index(t[t1-1])+1] + else: t2=t.find(' ',t0) if t2>t1: t2=t1 ouvrante=1 NOM=t[t0+1:t2] + + if '-1: balise=BALISES[-1] + if NOM=='pattern' and not PATTERN: + t1=t.find('',t0)+len('') + balise=BALISES[-3] else: balise=BALISES[-2] if balise=='E' or balise=='O': + proprietes=collect_ATTRIBUTS(t[t0:t1+ouvrante]) - #print proprietes if 'id' in proprietes: LAST_ID=proprietes['id'] - #print LAST_ID - - if balise=='O' and 'transform' in proprietes: STACK.append(proprietes['transform']) @@ -1490,19 +1548,24 @@ def build_HIERARCHY(t): #-------------------- D=OTHERSSHAPES[proprietes['TYPE']](proprietes) + #elif proprietes['TYPE'] in ['pattern']: + # print 'pattern' + # D='' + + CP=[0.0,0.0] if len(D)>0: cursor=0 proprietes['n']=[] for cell in D: - #if DEBUG==2 : print 'cell : ',cell ,' --' + if len(cell)>=1 and cell[0] in TAGcourbe: #-------------------- # 0.5.8, to remove exec #-------------------- if cell[0] in ['m','M']: - curves,n0,CP=Actions[cell]([cell,cursor], D, n0,CP,proprietes) + curves,n0,CP=Actions[cell](curves, [cell,cursor], D, n0,CP,proprietes) else: - curves,n0,CP=Actions[cell]([cell,cursor], D, n0,CP) + curves,n0,CP=Actions[cell](curves, [cell,cursor], D, n0,CP) cursor+=1 if TRANSFORM>0 or 'transform' in proprietes : @@ -1513,7 +1576,6 @@ def build_HIERARCHY(t): elif proprietes['TYPE'] == 'svg': - #print 'proprietes.keys()',proprietes.keys() BOUNDINGBOX = get_BOUNDBOX(BOUNDINGBOX,proprietes) else: #-------------------- @@ -1525,7 +1587,7 @@ def build_HIERARCHY(t): def scan_FILE(nom): global CP, curves, SCALE, DEBUG, BOUNDINGBOX, scale_, tagTRANSFORM - global SEPARATE_CURVES, USE_COLORS + global SEPARATE_CURVES, USE_COLORS, PATTERN dir,name=split(nom) name=name.split('.') @@ -1541,13 +1603,14 @@ def scan_FILE(nom): togAS = Blender.Draw.Create(0) togSP = Blender.Draw.Create(0) togCOL = Blender.Draw.Create(0) + Pattern= Blender.Draw.Create(0) block=[\ ("Clamp Width 1", togW, "Rescale the import with a Width of one unit"),\ ("Clamp Height 1", togH, "Rescale the import with a Heightof one unit"),\ ("No Rescaling", togAS, "No rescaling, the result can be very large"),\ ("Separate Curves", togSP, "Create an object for each curve, Slower. May manage colors"),\ - ("Import Colors", togCOL, "try to import color if the path is set as 'fill'. Only With separate option")] - + ("Import Colors", togCOL, "try to import color if the path is set as 'fill'. Only With separate option"),\ + ("Import Patterns", Pattern, "import pattern content if it is made with paths.")] retval = Blender.Draw.PupBlock("Import Options", block) if togW.val: scale_=1 elif togH.val: scale_=2 @@ -1556,6 +1619,8 @@ def scan_FILE(nom): if togSP.val: SEPARATE_CURVES=1 if togCOL.val and SEPARATE_CURVES : USE_COLORS=1 + + if Pattern.val : PATTERN =1 t1=Blender.sys.time() # 0.4.1 : to avoid to use sax and the xml @@ -1583,4 +1648,4 @@ def functionSELECT(nom): if __name__=='__main__': - Blender.Window.FileSelector (functionSELECT, 'SELECT an .SVG FILE', '*.svg') + Blender.Window.FileSelector (functionSELECT, 'SELECT an .SVG FILE', '*.svg') \ No newline at end of file diff --git a/release/scripts/bvh_import.py b/release/scripts/bvh_import.py index 5cdd8a71231..4134503c511 100644 --- a/release/scripts/bvh_import.py +++ b/release/scripts/bvh_import.py @@ -277,12 +277,17 @@ def read_bvh(file_path, GLOBAL_SCALE=1.0): for bvh_node in bvh_nodes.itervalues(): if not bvh_node.rest_tail_world: - if len(bvh_node.children)==1: + if len(bvh_node.children)==0: + # could just fail here, but rare BVH files have childless nodes + bvh_node.rest_tail_world = Vector(bvh_node.rest_head_world) + bvh_node.rest_tail_local = Vector(bvh_node.rest_head_local) + elif len(bvh_node.children)==1: bvh_node.rest_tail_world= Vector(bvh_node.children[0].rest_head_world) bvh_node.rest_tail_local= Vector(bvh_node.children[0].rest_head_local) else: - if not bvh_node.children: - raise 'error, bvh node has no end and no children. bad file' + # allow this, see above + #if not bvh_node.children: + # raise 'error, bvh node has no end and no children. bad file' # Removed temp for now rest_tail_world= Vector(0,0,0) diff --git a/release/scripts/c3d_import.py b/release/scripts/c3d_import.py index bfe691c394c..98f643cbab9 100644 --- a/release/scripts/c3d_import.py +++ b/release/scripts/c3d_import.py @@ -527,9 +527,10 @@ def setupAnim(StartFrame, EndFrame, VideoFrameRate): if VideoFrameRate>120: VideoFrameRate=120 # set up anim panel for them context=scn.getRenderingContext() - context.startFrame(StartFrame) - context.endFrame(EndFrame) - context.framesPerSec(int(VideoFrameRate)) + context.sFrame=StartFrame + context.eFrame=EndFrame + context.fps=int(VideoFrameRate) + Blender.Set("curframe",StartFrame) Blender.Redraw() return diff --git a/release/scripts/console.py b/release/scripts/console.py index 0e46f41f581..c6ae22a86f5 100644 --- a/release/scripts/console.py +++ b/release/scripts/console.py @@ -708,20 +708,23 @@ def draw_gui(): # Fixed margin. use a margin since 0 margin can be hard to seewhen close to a crt's edge. margin = 4 + # Convenience + FNT_NAME, FNT_HEIGHT = __FONT_SIZES__[__FONT_SIZE__] + # Draw cursor location colour if __CONSOLE_LINE_OFFSET__ == 0: - cmd2curWidth = Draw.GetStringWidth(cmdBuffer[-1].cmd[:cursor], __FONT_SIZES__[__FONT_SIZE__][0]) + cmd2curWidth = Draw.GetStringWidth(cmdBuffer[-1].cmd[:cursor], FNT_NAME) BGL.glColor3f(0.8, 0.2, 0.2) if cmd2curWidth == 0: - BGL.glRecti(margin,2,margin+2, __FONT_SIZES__[__FONT_SIZE__][1]+2) + BGL.glRecti(margin,2,margin+2, FNT_HEIGHT+2) else: - BGL.glRecti(margin + cmd2curWidth-2,2, margin+cmd2curWidth, __FONT_SIZES__[__FONT_SIZE__][1]+2) + BGL.glRecti(margin + cmd2curWidth-2,2, margin+cmd2curWidth, FNT_HEIGHT+2) BGL.glColor3f(1,1,1) # Draw the set of cammands to the buffer consoleLineIdx = __CONSOLE_LINE_OFFSET__ + 1 wrapLineIndex = 0 - while consoleLineIdx < len(cmdBuffer) and __CONSOLE_RECT__[3] > (consoleLineIdx - __CONSOLE_LINE_OFFSET__) * __FONT_SIZES__[__FONT_SIZE__][1]: + while consoleLineIdx < len(cmdBuffer) and __CONSOLE_RECT__[3] > (consoleLineIdx - __CONSOLE_LINE_OFFSET__) * FNT_HEIGHT: if cmdBuffer[-consoleLineIdx].type == 0: BGL.glColor3f(1, 1, 1) elif cmdBuffer[-consoleLineIdx].type == 1: @@ -734,53 +737,41 @@ def draw_gui(): BGL.glColor3f(1, 1, 0) if consoleLineIdx == 1: # user input - BGL.glRasterPos2i(margin, (__FONT_SIZES__[__FONT_SIZE__][1] * (consoleLineIdx-__CONSOLE_LINE_OFFSET__)) - 8) - Draw.Text(cmdBuffer[-consoleLineIdx].cmd, __FONT_SIZES__[__FONT_SIZE__][0]) - else: - BGL.glRasterPos2i(margin, (__FONT_SIZES__[__FONT_SIZE__][1] * ((consoleLineIdx-__CONSOLE_LINE_OFFSET__)+wrapLineIndex)) - 8) - Draw.Text(cmdBuffer[-consoleLineIdx].cmd, __FONT_SIZES__[__FONT_SIZE__][0]) - - # Wrapping is totally slow, can even hang blender - dont do it! - ''' - if consoleLineIdx == 1: # NEVER WRAP THE USER INPUT - BGL.glRasterPos2i(margin, (__FONT_SIZES__[__FONT_SIZE__][1] * (consoleLineIdx-__CONSOLE_LINE_OFFSET__)) - 8) - # BUG, LARGE TEXT DOSENT DISPLAY - Draw.Text(cmdBuffer[-consoleLineIdx].cmd, __FONT_SIZES__[__FONT_SIZE__][0]) - - - else: # WRAP? - # LINE WRAP - if Draw.GetStringWidth(cmdBuffer[-consoleLineIdx].cmd, __FONT_SIZES__[__FONT_SIZE__][0]) > __CONSOLE_RECT__[2]: + BGL.glRasterPos2i(margin, (FNT_HEIGHT * (consoleLineIdx-__CONSOLE_LINE_OFFSET__)) - 8) + Draw.Text(cmdBuffer[-consoleLineIdx].cmd, FNT_NAME) + else: # WRAP + lwid = Draw.GetStringWidth(cmdBuffer[-consoleLineIdx].cmd, FNT_NAME) + if margin + lwid > __CONSOLE_RECT__[2]: wrapLineList = [] - copyCmd = [cmdBuffer[-consoleLineIdx].cmd, ''] - while copyCmd != ['','']: - while margin + Draw.GetStringWidth(copyCmd[0], __FONT_SIZES__[__FONT_SIZE__][0]) > __CONSOLE_RECT__[2]: - #print copyCmd - copyCmd[1] = '%s%s'% (copyCmd[0][-1], copyCmd[1]) # Add the char on the end - copyCmd[0] = copyCmd[0][:-1]# remove last chat - - # Now we have copyCmd[0] at a good length we can print it. - if copyCmd[0] != '': - wrapLineList.append(copyCmd[0]) - - copyCmd[0]='' - copyCmd = [copyCmd[1], copyCmd[0]] - + wtext = cmdBuffer[-consoleLineIdx].cmd + wlimit = len(wtext) + chunksz = int(( __CONSOLE_RECT__[2] - margin ) / (lwid / len(wtext))) + lstart = 0 + fsize = FNT_NAME + while lstart < wlimit: + lend = min(lstart+chunksz,wlimit) + ttext = wtext[lstart:lend] + while lend < wlimit and Draw.GetStringWidth(ttext, fsize) + margin < __CONSOLE_RECT__[2]: + lend += 1 + ttext = wtext[lstart:lend] + while lend > lstart+1 and Draw.GetStringWidth(ttext, fsize) + margin > __CONSOLE_RECT__[2]: + lend -= 1 + ttext = wtext[lstart:lend] + wrapLineList.append(ttext) + lstart = lend # Now we have a list of lines, draw them (OpenGLs reverse ordering requires this odd change) wrapLineList.reverse() for wline in wrapLineList: - BGL.glRasterPos2i(margin, (__FONT_SIZES__[__FONT_SIZE__][1]*((consoleLineIdx-__CONSOLE_LINE_OFFSET__) + wrapLineIndex)) - 8) - Draw.Text(wline, __FONT_SIZES__[__FONT_SIZE__][0]) + BGL.glRasterPos2i(margin, (FNT_HEIGHT*((consoleLineIdx-__CONSOLE_LINE_OFFSET__) + wrapLineIndex)) - 8) + Draw.Text(wline, FNT_NAME) wrapLineIndex += 1 - wrapLineIndex-=1 # otherwise we get a silly extra line. + wrapLineIndex-=1 # otherwise we get a silly extra line. else: # no wrapping. - BGL.glRasterPos2i(margin, (__FONT_SIZES__[__FONT_SIZE__][1] * ((consoleLineIdx-__CONSOLE_LINE_OFFSET__)+wrapLineIndex)) - 8) - Draw.Text(cmdBuffer[-consoleLineIdx].cmd, __FONT_SIZES__[__FONT_SIZE__][0]) - ''' + BGL.glRasterPos2i(margin, (FNT_HEIGHT * ((consoleLineIdx-__CONSOLE_LINE_OFFSET__)+wrapLineIndex)) - 8) + Draw.Text(cmdBuffer[-consoleLineIdx].cmd, FNT_NAME) consoleLineIdx += 1 - # This recieves the event index, call a function from here depending on the event. def handle_button_event(evt): diff --git a/release/scripts/envelope_symmetry.py b/release/scripts/envelope_symmetry.py index a52e622a65b..a72e8c060b4 100644 --- a/release/scripts/envelope_symmetry.py +++ b/release/scripts/envelope_symmetry.py @@ -4,7 +4,7 @@ Name: 'Envelope Symmetry' Blender: 234 Group: 'Animation' -Tooltip: 'Make envelope symetrical' +Tooltip: 'Make envelope symmetrical' """ __author__ = "Jonas Petersen" diff --git a/release/scripts/export_dxf.py b/release/scripts/export_dxf.py index 061e29b81c7..17f2132fbe8 100644 --- a/release/scripts/export_dxf.py +++ b/release/scripts/export_dxf.py @@ -1,41 +1,97 @@ #!BPY """ - Name: 'Autodesk DXF (.dxf)' - Blender: 247 + Name: 'Autodesk DXF (.dxf/dwg)' + Blender: 249 Group: 'Export' - Tooltip: 'Export geometry to DXF-r12 (Drawing eXchange Format).' + Tooltip: 'Export geometry to DXF/DWG-r12 (Drawing eXchange Format).' """ -__version__ = "v1.27beta - 2008.10.07" +__version__ = "1.35 - 2009.06.18" __author__ = "Remigiusz Fiedler (AKA migius)" __license__ = "GPL" -__url__ = "http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_dxf" +__url__ = "http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_dxf" __bpydoc__ ="""The script exports Blender geometry to DXF format r12 version. Version %s Copyright %s License %s -extern dependances: dxfLibrary.py +extern dependances: dxfLibrary.py, dxfColorMap.py (optionaly: DConvertCon.exe) + +CONTRIBUTORS: +Remigiusz Fiedler (AKA migius) +Alexandros Sigalas (AKA alxarch) +Stani Michiels (AKA stani) See the homepage for documentation. url: %s IDEAs: - - correct normals for POLYLINE-POLYFACE via proper point-order - - HPGL output for 2d and flattened 3d content +- HPGL output, usefull for correct scaled printing of 2d drawings TODO: -- optimize back-faces removal (probably needs matrix transform) +- export dupligroups and dupliverts as blocks (as option) - optimize POLYFACE routine: remove double-vertices -- optimize POLYFACE routine: remove unused vertices +- fix support for X,Y-rotated curves(to POLYLINEs): fix blender negative-matrix.invert() - support hierarchies: groups, instances, parented structures -- support 210-code (3d orientation vector) -- presets for architectural scales -- write drawing extends for automatic view positioning in CAD +- support n/f-gons as POLYFACEs with invisible edges +- mapping materials to DXF-styles +- ProgressBar +- export rotation of Camera to VIEW/VPORT +- export parented Cameras to VIEW/VPORT +- wip: write drawing extends for automatic view positioning in CAD +- wip: fix text-objects in persp-projection +- wip: translate current 3D-View to *ACTIVE-VPORT +- wip: fix support Include-Duplis, cause not conform with INSERT-method History +v1.35 - 2009.06.18 by migius +- export multiple-instances of Curve-Objects as BLOCK/INSERTs +- added export Cameras (ortho and persp) to VPORTs, incl. clipping +- added export Cameras (ortho and persp) to VIEWs, incl. clipping +- export multiple-instances of Mesh-Objects as BLOCK/INSERTs +- on start prints dxfLibrary version +v1.34 - 2009.06.08 by migius +- export Lamps and Cameras as POINTs +- export passepartout for perspective projection +- added option for export objects only from visible layers +- optimized POLYFACE output: remove loose vertices in back-faces-mode +- cleaning code +- fix nasty bug in getExtrusion() +- support text-objects, also in ortho/persp-projection +- support XYmirrored 2d-curves to 2dPOLYLINEs +- support thickness and elevation for curve-objects +- fix extrusion 210-code (3d orientation vector) +- fix POLYFACE export, synchronized also dxfLibrary.py +- changed to the new 2.49 method Vector.cross() +- output style manager (first try) +v1.33 - 2009.05.25 by migius +- bugfix flipping normals in mirrored mesh-objects +- added UI-Button for future Shadow Generator +- support curve objects in projection-2d mode +- UI stuff: camera selector/manager +v1.32 - 2009.05.22 by migius +- debug mode for curve-objects: output redirect to Blender +- wip support 210-code(extrusion) calculation +- default settings for 2D and 3D export +v1.31 - 2009.05.18 by migius +- globals translated to GUI_A/B dictionary +- optimizing back-faces removal for "hidden-lines" mode +- presets for global location and scale (architecture) +- UI layout: scrollbars, pan with MMB/WHEEL, dynamic width +- new GUI with Draw.Register() from DXF-importer.py +v1.30 - 2008.12.14 by migius +- started work on GUI with Draw.Register() +v1.29 - 2009.04.11 by stani +- added DWG support, Stani Michiels idea for binding an extern DXF-DWG-converter +v1.28 - 2009.02.05 by Alexandros Sigalas (alxarch) +- added option to apply modifiers on exported meshes +- added option to also export duplicates (from dupliverts etc) +v1.28 - 2008.10.22 by migius +- workaround for PVert-bug on ubuntu (reported by Yorik) +- add support for FGons - ignore invisible_tagged edges +- add support for camera: ortho and perspective v1.27 - 2008.10.07 by migius - exclude Stani's DXF-Library to extern module v1.26 - 2008.10.05 by migius @@ -86,322 +142,2900 @@ ______________________________________________________________ import Blender -from Blender import Mathutils, Window, Scene, sys, Draw -import BPyMessages +from Blender import Mathutils, Window, Scene, Draw, Camera, BezTriple +from Blender import Registry, Object, Mesh, Curve +import os +import subprocess -#import dxfLibrary -#reload(dxfLibrary) -from dxfLibrary import * +try: + import dxfLibrary as DXF + #reload(DXF) + #reload(dxfLibrary) + #from dxfLibrary import * +except: + DXF=None + print "DXF-Exporter: error! found no dxfLibrary.py module in Blender script folder" + Draw.PupMenu("Error%t|found no dxfLibrary.py module in script folder") + +import math +from math import atan, atan2, log10, sin, cos + +#pi = math.pi +#pi = 3.14159265359 +r2d = 180.0 / math.pi +d2r = math.pi / 180.0 +#note: d2r * angle == math.radians(angle) +#note: r2d * angle == math.degrees(angle) + + +#DEBUG = True #activates debug mode + + +#----globals------------------------------------------ +ONLYSELECTED = 1 # 0/1 = False/True +ONLYVISIBLE = 1 # ignore objects on invisible layers +POLYLINES = 1 # prefer POLYLINEs not LINEs +POLYFACES = 1 # prefer POLYFACEs not 3DFACEs +PROJECTION = 0 # output geometry will be projected to XYplane with Z=0.0 +HIDDEN_LINES = 0 #filter out hidden geometry +SHADOWS = 0 # sun/shadows simulation +CAMERA = 1 # selected camera index +PERSPECTIVE = 0 # projection (camera) type: perspective, opposite to orthographic +CAMERAVIEW = 0 # use camera for projection, opposite is 3d-view +INSTANCES = 1 # Export instances of Mesh/Curve as BLOCK/INSERTs on/off +APPLY_MODIFIERS = 1 +INCLUDE_DUPLIS = 0 +OUTPUT_DWG = 0 #optional save to DWG with extern converter + +G_SCALE = 1.0 #(0.0001-1000) global scaling factor for output dxf data +G_ORIGIN = [0.0,0.0,0.0] #global translation-vector (x,y,z) in Blender units +ELEVATION = 0.0 #standard elevation = coordinate Z value in Blender units + +BYBLOCK = 0 #DXF-attribute: assign property to BLOCK defaults +BYLAYER = None #256 #DXF-attribute: assign property to LAYER defaults +PREFIX = 'BF_' #used as prefix for DXF names +LAYERNAME_DEF = '' #default layer name +LAYERCOLOR_DEF = 7 #default layer color index +LAYERLTYPE_DEF = 0 #'CONTINUOUS' - default layer lineType +ENTITYLAYER_DEF = LAYERNAME_DEF #default entity color index +ENTITYCOLOR_DEF = BYLAYER #default entity color index +ENTITYLTYPE_DEF = BYLAYER #default entity lineType + +E_M = 0 +LAB = "scroll MMB/WHEEL . wip .. todo" #"*) parts under construction" +M_OBJ = 0 + +FILENAME_MAX = 180 #max length of path+file_name string (FILE_MAXDIR + FILE_MAXFILE) +NAMELENGTH_MAX = 80 #max_obnamelength in DXF, (limited to 256? ) +INIFILE_DEFAULT_NAME = 'exportDXF' +INIFILE_EXTENSION = '.ini' +INIFILE_HEADER = '#ExportDXF.py ver.1.0 config data' +INFFILE_HEADER = '#ExportDXF.py ver.1.0 analyze of DXF-data' + +BLOCKREGISTRY = {} # registry and map for BLOCKs +SCENE = None +WORLDX = Mathutils.Vector((1,0,0)) +WORLDY = Mathutils.Vector((0,1,0)) +WORLDZ = Mathutils.Vector((0,0,1)) + +AUTO = BezTriple.HandleTypes.AUTO +FREE = BezTriple.HandleTypes.FREE +VECT = BezTriple.HandleTypes.VECT +ALIGN = BezTriple.HandleTypes.ALIGN + + +#-------- DWG support ------------------------------------------ +extCONV_OK = True +extCONV = 'DConvertCon.exe' +extCONV_PATH = os.path.join(Blender.Get('scriptsdir'),extCONV) +if not os.path.isfile(extCONV_PATH): + extCONV_OK = False + extCONV_TEXT = 'DWG-Exporter: Abort, nothing done!|\ +Copy first %s into Blender script directory.|\ +More details in online Help.' %extCONV +else: + if not os.sys.platform.startswith('win'): + # check if Wine installed: + if subprocess.Popen(('which', 'winepath'), stdout=subprocess.PIPE).stdout.read().strip(): + extCONV_PATH = 'wine %s'%extCONV_PATH + else: + extCONV_OK = False + extCONV_TEXT = 'DWG-Exporter: Abort, nothing done!|\ +The external DWG-converter (%s) needs Wine installed on your system.|\ +More details in online Help.' %extCONV +#print 'extCONV_PATH = ', extCONV_PATH + + +#---------------------------------------------- +def updateMenuCAMERA(): + global CAMERAS + global MenuCAMERA + global MenuLIGHT + + scn = Scene.GetCurrent() + objs = scn.getChildren() + currcam = scn.getCurrentCamera() + if currcam: currcam = currcam.getName() + maincams = [] + MenuCAMERA = "Select Camera%t" + for cam in objs: + if cam.getType() == 'Camera': + if cam.getName()[0:4] != "Temp": + maincams.append(cam.getName()) + maincams.sort() + maincams.reverse() + CAMERAS = maincams + for i, cam in enumerate(CAMERAS): + if cam==currcam: + MenuCAMERA += "|* " + cam + else: MenuCAMERA += "| " + cam + MenuCAMERA += "|current 3d-View" + MenuLIGHT = "Select Sun%t| *todo" + + +#---------------------------------------------- +def updateCAMERA(): + global CAMERA, GUI_A + #CAMERA = 1 + scn = Scene.GetCurrent() + currcam = scn.getCurrentCamera() + if currcam: currcam = currcam.getName() + if currcam in CAMERAS: + CAMERA = CAMERAS.index(currcam)+1 + GUI_A['camera_selected'].val = CAMERA + +#---------------------------------------------- +def gotoCAMERA(): + cam = Object.Get(CAMERAS[CAMERA-1]) + #print 'deb: CAMERA, cam',CAMERA, cam + if cam.getType() != 'Camera': + sure = Draw.PupMenu("Info: %t| It is not a Camera Object.") + else: + scn = Scene.getCurrent() + scn.setCurrentCamera(cam) + Window.CameraView(0) + Window.Redraw() + updateMenuCAMERA() + + +#------- Duplicates support ---------------------------------------------- +def dupTest(object): + """ + Checks objects for duplicates enabled (any type) + object: Blender Object. + Returns: Boolean - True if object has any kind of duplicates enabled. + """ + if (object.enableDupFrames or \ + object.enableDupGroup or \ + object.enableDupVerts): + return True + else: + return False + +def getObjectsAndDuplis(oblist,MATRICES=False,HACK=False): + """ + Return a list of real objects and duplicates and optionally their matrices + oblist: List of Blender Objects + MATRICES: Boolean - Check to also get the objects matrices, default=False + HACK: Boolean - See note, default=False + Returns: List of objects or + List of tuples of the form:(ob,matrix) if MATRICES is set to True + NOTE: There is an ugly hack here that excludes all objects whose name + starts with "dpl_" to exclude objects that are parented to a duplicating + object, User must name objects properly if hack is used. + """ + + result = [] + for ob in oblist: + if INCLUDE_DUPLIS and dupTest(ob): + dup_obs=ob.DupObjects + if len(dup_obs): + for dup_ob, dup_mx in dup_obs: + if MATRICES: + result.append((dup_ob,dup_mx)) + else: + result.append(dup_ob) + else: + if HACK: + if ob.getName()[0:4] != "dpl_": + if MATRICES: + mx = ob.mat + result.append((ob,mx)) + else: + result.append(ob) + else: + if MATRICES: + mx = ob.mat + result.append((ob,mx)) + else: + result.append(ob) + return result #----------------------------------------------------- -def hidden_status(faces, mx_n): - #print 'HIDDEN_MODE: caution! not full implemented yet' - ok_faces = [] - ok_edges = [] - #sort out back-faces = with normals pointed away from camera +def hidden_status(faces, mx, mx_n): + # sort out back-faces = with normals pointed away from camera + #print 'HIDDEN_LINES: caution! not full implemented yet' + front_faces = [] + front_edges = [] for f in faces: #print 'deb: face=', f #--------- + #print 'deb: dir(face)=', dir(f) #--------- # get its normal-vector in localCS vec_normal = f.no.copy() #print 'deb: vec_normal=', vec_normal #------------------ - #must be transfered to camera/view-CS + # must be transfered to camera/view-CS vec_normal *= mx_n #vec_normal *= mb.rotationPart() #print 'deb:2vec_normal=', vec_normal #------------------ #vec_normal *= mw0.rotationPart() #print 'deb:3vec_normal=', vec_normal, '\n' #------------------ - # normal must point the Z direction-hemisphere - if vec_normal[2] > 0.0 : - ok_faces.append(f.index) + + frontFace = False + if not PERSPECTIVE: #for ortho mode ---------- + # normal must point the Z direction-hemisphere + if vec_normal[2] > 0.00001: + frontFace = True + else: + v = f.verts[0] + vert = Mathutils.Vector(v.co) * mx + if Mathutils.DotVecs(vert, vec_normal) < 0.00001: + frontFace = True + + if frontFace: + front_faces.append(f.index) for key in f.edge_keys: #this test can be done faster with set() - if key not in ok_edges: - ok_edges.append(key) - #print 'deb: amount of visible faces=', len(ok_faces) #--------- - #print 'deb: visible faces=', ok_faces #--------- - #print 'deb: amount of visible edges=', len(ok_edges) #--------- - #print 'deb: visible edges=', ok_edges #--------- - return ok_faces, ok_edges + if key not in front_edges: + front_edges.append(key) + + #print 'deb: amount of visible faces=', len(front_faces) #--------- + #print 'deb: visible faces=', front_faces #--------- + #print 'deb: amount of visible edges=', len(front_edges) #--------- + #print 'deb: visible edges=', front_edges #--------- + return front_faces, front_edges + + +#---- migration to 2.49------------------------------------------------- +if 'cross' in dir(Mathutils.Vector()): + #Draw.PupMenu('DXF exporter: Abort%t|This script version works for Blender up 2.49 only!') + def M_CrossVecs(v1,v2): + return v1.cross(v2) #for up2.49 + def M_DotVecs(v1,v2): + return v1.dot(v2) #for up2.49 +else: + def M_CrossVecs(v1,v2): + return Mathutils.CrossVecs(v1,v2) #for pre2.49 + def M_DotVecs(v1,v2): + return Mathutils.DotVecs(v1,v2) #for pre2.49 + + +#----------------------------------------------------- +def getExtrusion(matrix): + """calculates DXF-Extrusion = Arbitrary Xaxis and Zaxis vectors + + """ + AZaxis = matrix[2].copy().resize3D().normalize() # = ArbitraryZvector + Extrusion = [AZaxis[0],AZaxis[1],AZaxis[2]] + if AZaxis[2]==1.0: + Extrusion = None + AXaxis = matrix[0].copy().resize3D() # = ArbitraryXvector + else: + threshold = 1.0 / 64.0 + if abs(AZaxis[0]) < threshold and abs(AZaxis[1]) < threshold: + # AXaxis is the intersection WorldPlane and ExtrusionPlane + AXaxis = M_CrossVecs(WORLDY,AZaxis) + else: + AXaxis = M_CrossVecs(WORLDZ,AZaxis) + #print 'deb:\n' #------------- + #print 'deb:getExtrusion() Extrusion=', Extrusion #--------- + return Extrusion, AXaxis.normalize() #----------------------------------------------------- -def projected_co(vec, mw): - # convert the world coordinates of vector to screen coordinates - #co = vec.co.copy().resize4D() - co = vec.copy().resize4D() - co[3] = 1.0 - sc = co * mw - #print 'deb: viewprojection=', sc #--------- - return [sc[0],sc[1],0.0] +def getZRotation(AXaxis, rot_matrix_invert): + """calculates ZRotation = angle between ArbitraryXvector and obj.matrix.Xaxis + + """ + # this works: Xaxis is the obj.matrix-Xaxis vector + # but not correct for all orientations + #Xaxis = matrix[0].copy().resize3D() # = ArbitraryXvector + ##Xaxis.normalize() # = ArbitraryXvector + #ZRotation = - Mathutils.AngleBetweenVecs(Xaxis,AXaxis) #output in radians + + # this works for all orientations, maybe a bit faster + # transform AXaxis into OCS:Object-Coord-System + #rot_matrix = normalizeMat(matrix.rotationPart()) + #rot_matrix_invert = rot_matrix.invert() + vec = AXaxis * rot_matrix_invert + ##vec = AXaxis * matrix.copy().invert() + ##vec.normalize() # not needed for atan2() + #print '\ndeb:getExtrusion() vec=', vec #--------- + ZRotation = - atan2(vec[1],vec[0]) #output in radians + + #print 'deb:ZRotation() ZRotation=', ZRotation*r2d #--------- + return ZRotation -#--------not used--------------------------------------------- -def flatten(points, mw): - for i,v in enumerate(points): - v = projected_co(v, mw) - points[i]=v - #print 'deb: flatten points=', points #--------- +#------------------------------------------ +def normalizeMat(matrix): + mat12 = matrix.copy() + mat12 = [Mathutils.Vector(v).normalize() for v in mat12] + if len(mat12)>3: + matr12 = Mathutils.Matrix(mat12[0],mat12[1],mat12[2],mat12[3]) + else: + matr12 = Mathutils.Matrix(mat12[0],mat12[1],mat12[2]) + return matr12 + + +#----------------------------------------------------- +def projected_co(verts, matrix): + """ converts coordinates of points from OCS to WCS->ScreenCS + needs matrix: a projection matrix + needs verts: a list of vectors[x,y,z] + returns a list of [x,y,z] + """ + #print 'deb:projected_co() verts=', verts #--------- + temp_verts = [Mathutils.Vector(v)*matrix for v in verts] + #print 'deb:projected_co() temp_verts=', temp_verts #--------- + + if GUI_A['Z_force_on'].val: locZ = GUI_A['Z_elev'].val + else: locZ = 0.0 + + if PROJECTION: + if PERSPECTIVE: + clipStart = 10.0 + for v in temp_verts: + coef = - clipStart / v[2] + v[0] *= coef + v[1] *= coef + v[2] = locZ + for v in temp_verts: + v[2] = locZ + temp_verts = [v[:3] for v in temp_verts] + #print 'deb:projected_co() out_verts=', temp_verts #--------- + return temp_verts + + +#----------------------------------------------------- +def isLeftHand(matrix): + #Is the matrix a left-hand-system, or not? + ma = matrix.rotationPart() + crossXY = M_CrossVecs(ma[0], ma[1]) + check = M_DotVecs(ma[2], crossXY) + if check < 0.00001: return 1 + return 0 + + +#----------------------------------------------------- +def exportMesh(ob, mx, mx_n, me=None, **common): + """converts Mesh-Object to desired projection and representation(DXF-Entity type) + """ + global BLOCKREGISTRY + entities = [] + block = None + #print 'deb:exportMesh() given common=', common #--------- + if me==None: + me = ob.getData(mesh=1) + else: + me.getFromObject(ob) + # idea: me.transform(mx); get verts data; me.transform(mx_inv)= back to the origin state + # the .transform-method is fast, but bad, cause invasive: + # it manipulates original geometry and by retransformation lefts back rounding-errors + # we dont want to manipulate original data! + #temp_verts = me.verts[:] #doesn't work on ubuntu(Yorik), bug? + if me.verts: + #print 'deb:exportMesh() started' #--------- + + #print 'deb:exportMesh() ob.name=', ob.name #--------- + #print 'deb:exportMesh() me.name=', me.name #--------- + #print 'deb:exportMesh() me.users=', me.users #--------- + # check if there are more instances of this mesh (if used by other objects), then write to BLOCK/INSERT + if GUI_A['instances_on'].val and me.users>1 and not PROJECTION: + if me.name in BLOCKREGISTRY.keys(): + insert_name = BLOCKREGISTRY[me.name] + # write INSERT to entities + entities = exportInsert(ob, mx,insert_name, **common) + else: + # generate geom_output in ObjectCS + allpoints = [v.co for v in me.verts] + identity_matrix = Mathutils.Matrix().identity() + allpoints = projected_co(allpoints, identity_matrix) + #allpoints = toGlobalOrigin(allpoints) + faces=[] + edges=[] + for e in me.edges: edges.append(e.key) + faces = [[v.index for v in f.verts] for f in me.faces] + entities = writeMeshEntities(allpoints, edges, faces, **common) + if entities: # if not empty block + # write BLOCK definition and INSERT entity + # BLOCKREGISTRY = dictionary 'blender_name':'dxf_name'.append(me.name) + BLOCKREGISTRY[me.name]=validDXFr12name(('ME_'+ me.name)) + insert_name = BLOCKREGISTRY[me.name] + block = DXF.Block(insert_name,flag=0,base=(0,0,0),entities=entities) + # write INSERT as entity + entities = exportInsert(ob, mx, insert_name, **common) + + else: # no other instances, so go the standard way + allpoints = [v.co for v in me.verts] + allpoints = projected_co(allpoints, mx) + allpoints = toGlobalOrigin(allpoints) + faces=[] + edges=[] + if me.faces and PROJECTION and HIDDEN_LINES: + #if DEBUG: print 'deb:exportMesh HIDDEN_LINES mode' #--------- + faces, edges = hidden_status(me.faces, mx, mx_n) + faces = [[v.index for v in me.faces[f_nr].verts] for f_nr in faces] + else: + #if DEBUG: print 'deb:exportMesh STANDARD mode' #--------- + for e in me.edges: edges.append(e.key) + #faces = [f.index for f in me.faces] + faces = [[v.index for v in f.verts] for f in me.faces] + #faces = [[allpoints[v.index] for v in f.verts] for f in me.faces] + #print 'deb: allpoints=\n', allpoints #--------- + #print 'deb: edges=\n', edges #--------- + #print 'deb: faces=\n', faces #--------- + if isLeftHand(mx): # then change vertex-order in every face + for f in faces: + f.reverse() + #f = [f[-1]] + f[:-1] #TODO: might be needed + #print 'deb: faces=\n', faces #--------- + entities = writeMeshEntities(allpoints, edges, faces, **common) + + return entities, block + + +#------------------------------------------------- +def writeMeshEntities(allpoints, edges, faces, **common): + """help routine for exportMesh() + """ + entities = [] + + c = mesh_as_list[GUI_A['mesh_as'].val] + if 'POINTs'==c: # export Mesh as multiple POINTs + for p in allpoints: + dxfPOINT = DXF.Point(points=[p],**common) + entities.append(dxfPOINT) + elif 'LINEs'==c or (not faces): + if edges and allpoints: + if DEBUG: mesh_drawBlender(allpoints, edges, None) #deb: draw to blender scene + for e in edges: + points = [allpoints[e[0]], allpoints[e[1]]] + dxfLINE = DXF.Line(points, **common) + entities.append(dxfLINE) + elif faces: + if c in ('POLYFACE','POLYLINE'): + if allpoints: + #TODO: purge allpoints: left only vertices used by faces + if DEBUG: mesh_drawBlender(allpoints, None, faces) #deb: draw to scene + if not (PROJECTION and HIDDEN_LINES): + faces = [[v+1 for v in f] for f in faces] + else: + # for back-Faces-mode remove face-free verts + map=verts_state= [0]*len(allpoints) + for f in faces: + for v in f: + verts_state[v]=1 + if 0 in verts_state: # if dirty state + i,newverts=0,[] + for used_i,used in enumerate(verts_state): + if used: + newverts.append(allpoints[used_i]) + map[used_i]=i + i+=1 + allpoints = newverts + faces = [[map[v]+1 for v in f] for f in faces] + dxfPOLYFACE = DXF.PolyLine([allpoints, faces], flag=64, **common) + #print '\n deb: dxfPOLYFACE=',dxfPOLYFACE #------------- + entities.append(dxfPOLYFACE) + elif '3DFACEs'==c: + if DEBUG: mesh_drawBlender(allpoints, None, faces) #deb: draw to scene + for f in faces: + #print 'deb: face=', f #--------- + points = [allpoints[key] for key in f] + #points = [p.co[:3] for p in points] + #print 'deb: pointsXX=\n', points #--------- + dxfFACE = DXF.Face(points, **common) + entities.append(dxfFACE) + + return entities + + +#----------------------------------------------------- +def mesh_drawBlender(vertList, edgeList, faceList, name="dxfMesh", flatten=False, AT_CUR=True, link=True): + #print 'deb:mesh_drawBlender started XXXXXXXXXXXXXXXXXX' #--------- + ob = Object.New("Mesh",name) + me = Mesh.New(name) + #print 'deb: vertList=\n', vertList #--------- + #print 'deb: edgeList=\n', edgeList #--------- + #print 'deb: faceList=\n', faceList #--------- + me.verts.extend(vertList) + if edgeList: me.edges.extend(edgeList) + if faceList: me.faces.extend(faceList) + if flatten: + for v in me.verts: v.co.z = 0.0 + ob.link(me) + if link: + sce = Scene.getCurrent() + sce.objects.link(ob) + #me.triangleToQuad() + if AT_CUR: + cur_loc = Window.GetCursorPos() + ob.setLocation(cur_loc) + Blender.Redraw() + #return ob + +#----------------------------------------------------- +def curve_drawBlender(vertList, org_point=[0.0,0.0,0.0], closed=0, name="dxfCurve", flatten=False, AT_CUR=True, link=True): + #print 'deb:curve_drawBlender started XXXXXXXXXXXXXXXXXX' #--------- + ob = Object.New("Curve",name) + cu = Curve.New(name) + #print 'deb: vertList=\n', vertList #--------- + curve = cu.appendNurb(BezTriple.New(vertList[0])) + for p in vertList[1:]: + curve.append(BezTriple.New(p)) + for point in curve: + #point.handleTypes = [VECT, VECT] + point.handleTypes = [FREE, FREE] + point.radius = 1.0 + curve.flagU = closed # 0 sets the curve not cyclic=open + cu.setResolu(6) + cu.update() #important for handles calculation + if flatten: + for v in cu.verts: v.co.z = 0.0 + ob.link(cu) + if link: + sce = Scene.getCurrent() + sce.objects.link(ob) + #me.triangleToQuad() + if AT_CUR: + cur_loc = Window.GetCursorPos() + ob.setLocation(cur_loc) + elif org_point: + cur_loc=org_point + ob.setLocation(cur_loc) + Blender.Redraw() + #return ob + + +#----------------------------------------------------- +def toGlobalOrigin(points): + """relocates points to the new location + needs a list of points [x,y,z] + """ + if GUI_A['g_origin_on'].val: + for p in points: + p[0] += G_ORIGIN[0] + p[1] += G_ORIGIN[1] + p[2] += G_ORIGIN[2] return points + #----------------------------------------------------- -def exportMesh(ob, mx, mx_n): +def exportEmpty(ob, mx, mw, **common): + """converts Empty-Object to desired projection and representation(DXF-Entity type) + """ + p = Mathutils.Vector(ob.loc) + [p] = projected_co([p], mx) + [p] = toGlobalOrigin([p]) + entities = [] - me = ob.getData(mesh=1) - #me.transform(mx) - # above is eventualy faster, but bad, cause - # directly transforms origin geometry and write back rounding errors - me_verts = me.verts[:] #we dont want manipulate origin data - #print 'deb: me_verts=', me_verts #--------- - #me.transform(mx_inv) #counterpart to - back to the origin state - for v in me_verts: - v.co *= mx - faces=[] - edges=[] - if HIDDEN_MODE: - ok_faces, ok_edges = hidden_status(me.faces, mx_n) + c = empty_as_list[GUI_A['empty_as'].val] + if c=="POINT": # export Empty as POINT + dxfPOINT = DXF.Point(points=[p],**common) + entities.append(dxfPOINT) + return entities - #if (not FLATTEN) and len(me.faces)>0 and ONLYFACES: - if ONLYFACES: - if POLYFACES: #export 3D as POLYFACEs - allpoints = [] - allfaces = [] - allpoints = [v.co[:3] for v in me_verts] - for f in me.faces: - #print 'deb: face=', f #--------- - if not HIDDEN_MODE or \ - (HIDDEN_MODE and f.index in ok_faces): - if 1: - points = f.verts - face = [p.index+1 for p in points] - #print 'deb: face=', face #--------- - allfaces.append(face) - else: #bad, cause create multiple vertex instances - points = f.verts - points = [ me_verts[p.index].co[:3] for p in points] - #points = [p.co[:3] for p in points] - #print 'deb: points=', points #--------- - index = len(allpoints)+1 - face = [index+i for i in range(len(points))] - allpoints.extend(points) - allfaces.append(face) - if allpoints and allfaces: - #print 'deb: allpoints=', allpoints #--------- - #print 'deb: allfaces=', allfaces #--------- - dxfPOLYFACE = PolyLine([allpoints, allfaces], flag=64) - entities.append(dxfPOLYFACE) - else: #export 3D as 3DFACEs - for f in me.faces: - #print 'deb: face=', f #--------- - if not HIDDEN_MODE or \ - (HIDDEN_MODE and f.index in ok_faces): - points = f.verts - points = [ me_verts[p.index].co[:3] for p in points] - #points = [p.co[:3] for p in points] - #print 'deb: points=', points #--------- - dxfFACE = Face(points) - entities.append(dxfFACE) +#----------------------------------------------------- +def exportCamera(ob, mx, mw, **common): + """converts Camera-Object to desired projection and representation(DXF-Entity type) + """ + location = Mathutils.Vector(ob.loc) + [location] = projected_co([location], mx) + [location] = toGlobalOrigin([location]) + view_name=validDXFr12name(('CAM_'+ ob.name)) + + camera = Camera.Get(ob.getData(name_only=True)) + #print 'deb: camera=', dir(camera) #------------------ + if camera.type=='persp': + mode = 1+2+4+16 + # mode flags: 1=persp, 2=frontclip, 4=backclip,16=FrontZ + elif camera.type=='ortho': + mode = 0+2+4+16 + + leftBottom=(0.0,0.0) # default + rightTop=(1.0,1.0) # default + center=(0.0,0.0) # default + + direction = Mathutils.Vector(0.0,0.0,1.0) * mx.rotationPart() # in W-C-S + direction.normalize() + target=Mathutils.Vector(ob.loc) - direction # in W-C-S + #ratio=1.0 + width=height= camera.scale # for ortho-camera + lens = camera.lens # for persp-camera + frontClipping = -(camera.clipStart - 1.0) + backClipping = -(camera.clipEnd - 1.0) + + entities, vport, view = [], None, None + c = camera_as_list[GUI_A['camera_as'].val] + if c=="POINT": # export as POINT + dxfPOINT = DXF.Point(points=[location],**common) + entities.append(dxfPOINT) + elif c=="VIEW": # export as VIEW + view = DXF.View(name=view_name, + center=center, width=width, height=height, + frontClipping=frontClipping,backClipping=backClipping, + direction=direction,target=target,lens=lens,mode=mode + ) + elif c=="VPORT": # export as VPORT + vport = DXF.VPort(name=view_name, + center=center, ratio=1.0, height=height, + frontClipping=frontClipping,backClipping=backClipping, + direction=direction,target=target,lens=lens,mode=mode + ) + return entities, vport, view + +#----------------------------------------------------- +def exportLamp(ob, mx, mw, **common): + """converts Lamp-Object to desired projection and representation(DXF-Entity type) + """ + p = Mathutils.Vector(ob.loc) + [p] = projected_co([p], mx) + [p] = toGlobalOrigin([p]) + + entities = [] + c = lamp_as_list[GUI_A['lamp_as'].val] + if c=="POINT": # export as POINT + dxfPOINT = DXF.Point(points=[p],**common) + entities.append(dxfPOINT) + return entities + +#----------------------------------------------------- +def exportInsert(ob, mx, insert_name, **common): + """converts Object to DXF-INSERT in given orientation + """ + WCS_loc = ob.loc # WCS_loc is object location in WorldCoordSystem + sizeX = ob.SizeX + sizeY = ob.SizeY + sizeZ = ob.SizeZ + rotX = ob.RotX + rotY = ob.RotY + rotZ = ob.RotZ + #print 'deb: sizeX=%s, sizeY=%s' %(sizeX, sizeY) #--------- + + Thickness,Extrusion,ZRotation,Elevation = None,None,None,None + + AXaxis = mx[0].copy().resize3D() # = ArbitraryXvector + if not PROJECTION: + #Extrusion, ZRotation, Elevation = getExtrusion(mx) + Extrusion, AXaxis = getExtrusion(mx) + + entities = [] + + if 1: + if not PROJECTION: + ZRotation,Zrotmatrix,OCS_origin,ECS_origin = getTargetOrientation(mx,Extrusion,\ + AXaxis,WCS_loc,sizeX,sizeY,sizeZ,rotX,rotY,rotZ) + ZRotation *= r2d + point = ECS_origin + else: #TODO: fails correct location + point1 = Mathutils.Vector(ob.loc) + [point] = projected_co([point1], mx) + if PERSPECTIVE: + clipStart = 10.0 + coef = -clipStart / (point1*mx)[2] + #print 'deb: coef=', coef #-------------- + #TODO: ? sizeX *= coef + #sizeY *= coef + #sizeZ *= coef + + #print 'deb: point=', point #-------------- + [point] = toGlobalOrigin([point]) + + #if DEBUG: text_drawBlender(textstr,points,OCS_origin) #deb: draw to scene + common['extrusion']= Extrusion + #common['elevation']= Elevation + #print 'deb: common=', common #------------------ + if 0: #DEBUG + #linepoints = [[0,0,0], [AXaxis[0],AXaxis[1],AXaxis[2]]] + linepoints = [[0,0,0], point] + dxfLINE = DXF.Line(linepoints,**common) + entities.append(dxfLINE) + + xscale=sizeX + yscale=sizeY + zscale=sizeZ + cols=None + colspacing=None + rows=None + rowspacing=None + + dxfINSERT = DXF.Insert(insert_name,point=point,rotation=ZRotation,\ + xscale=xscale,yscale=yscale,zscale=zscale,\ + cols=cols,colspacing=colspacing,rows=rows,rowspacing=rowspacing,\ + **common) + entities.append(dxfINSERT) - else: #export 3D as LINEs - if HIDDEN_MODE and len(me.faces)!=0: - for e in ok_edges: - points = [ me_verts[key].co[:3] for key in e] - dxfLINE = Line(points) - entities.append(dxfLINE) - - else: - for e in me.edges: - #print 'deb: edge=', e #--------- - points=[] - #points = [e.v1.co*mx, e.v2.co*mx] - points = [ me_verts[key].co[:3] for key in e.key] - #print 'deb: points=', points #--------- - dxfLINE = Line(points) - entities.append(dxfLINE) return entities #----------------------------------------------------- -def exportCurve(ob, mx): +def exportText(ob, mx, mw, **common): + """converts Text-Object to desired projection and representation(DXF-Entity type) + """ + text3d = ob.getData() + textstr = text3d.getText() + WCS_loc = ob.loc # WCS_loc is object location in WorldCoordSystem + sizeX = ob.SizeX + sizeY = ob.SizeY + sizeZ = ob.SizeZ + rotX = ob.RotX + rotY = ob.RotY + rotZ = ob.RotZ + #print 'deb: sizeX=%s, sizeY=%s' %(sizeX, sizeY) #--------- + + Thickness,Extrusion,ZRotation,Elevation = None,None,None,None + + AXaxis = mx[0].copy().resize3D() # = ArbitraryXvector + if not PROJECTION: + #Extrusion, ZRotation, Elevation = getExtrusion(mx) + Extrusion, AXaxis = getExtrusion(mx) + + # no thickness/width for TEXTs converted into ScreenCS + if text3d.getExtrudeDepth(): + Thickness = text3d.getExtrudeDepth() * sizeZ + + #Horizontal text justification type, code 72, (optional, default = 0) + # integer codes (not bit-coded) + #0=left, 1=center, 2=right + #3=aligned, 4=middle, 5=fit + Alignment = None + alignment = text3d.getAlignment().value + if alignment in (1,2): Alignment = alignment + + textHeight = text3d.getSize() / 1.7 + textFlag = 0 + if sizeX < 0.0: textFlag |= 2 # set flag for horizontal mirrored + if sizeZ < 0.0: textFlag |= 4 # vertical mirrored + entities = [] + c = text_as_list[GUI_A['text_as'].val] + + if c=="TEXT": # export text as TEXT + if not PROJECTION: + ZRotation,Zrotmatrix,OCS_origin,ECS_origin = getTargetOrientation(mx,Extrusion,\ + AXaxis,WCS_loc,sizeX,sizeY,sizeZ,rotX,rotY,rotZ) + ZRotation *= r2d + point = ECS_origin + else: #TODO: fails correct location + point1 = Mathutils.Vector(ob.loc) + [point] = projected_co([point1], mx) + if PERSPECTIVE: + clipStart = 10.0 + coef = -clipStart / (point1*mx)[2] + textHeight *= coef + #print 'deb: coef=', coef #-------------- + + #print 'deb: point=', point #-------------- + [point] = toGlobalOrigin([point]) + point2 = point + + #if DEBUG: text_drawBlender(textstr,points,OCS_origin) #deb: draw to scene + common['extrusion']= Extrusion + #common['elevation']= Elevation + common['thickness']= Thickness + #print 'deb: common=', common #------------------ + if 0: #DEBUG + #linepoints = [[0,0,0], [AXaxis[0],AXaxis[1],AXaxis[2]]] + linepoints = [[0,0,0], point] + dxfLINE = DXF.Line(linepoints,**common) + entities.append(dxfLINE) + + dxfTEXT = DXF.Text(text=textstr,point=point,alignment=point2,rotation=ZRotation,\ + flag=textFlag,height=textHeight,justifyhor=Alignment,**common) + entities.append(dxfTEXT) + if Thickness: + common['thickness']= -Thickness + dxfTEXT = DXF.Text(text=textstr,point=point,alignment=point2,rotation=ZRotation,\ + flag=textFlag,height=textHeight,justifyhor=Alignment,**common) + entities.append(dxfTEXT) + return entities + + +#------------------------------------------- +def euler2matrix(rx, ry, rz): + """creates full 3D rotation matrix (optimized) + needs rx, ry, rz angles in radians + """ + #print 'rx, ry, rz: ', rx, ry, rz + A, B = sin(rx), cos(rx) + C, D = sin(ry), cos(ry) + E, F = sin(rz), cos(rz) + AC, BC = A*C, B*C + return Mathutils.Matrix([D*F, D*E, -C], + [AC*F-B*E, AC*E+B*F, A*D], + [BC*F+A*E, BC*E-A*F, B*D]) + + +#----------------------------------------------------- +def getTargetOrientation(mx,Extrusion,AXaxis,WCS_loc,sizeX,sizeY,sizeZ,rotX,rotY,rotZ): + """given + """ + if 1: + rot_matrix = normalizeMat(mx.rotationPart()) + #TODO: workaround for blender negative-matrix.invert() + # partially done: works only for rotX,rotY==0.0 + if sizeX<0.0: rot_matrix[0] *= -1 + if sizeY<0.0: rot_matrix[1] *= -1 + #if sizeZ<0.0: rot_matrix[2] *= -1 + rot_matrix_invert = rot_matrix.invert() + else: #TODO: to check, why below rot_matrix_invert is not equal above one + rot_euler_matrix = euler2matrix(rotX,rotY,rotZ) + rot_matrix_invert = euler2matrix(-rotX,-rotY,-rotZ) + + # OCS_origin is Global_Origin in ObjectCoordSystem + OCS_origin = Mathutils.Vector(WCS_loc) * rot_matrix_invert + #print 'deb: OCS_origin=', OCS_origin #--------- + + ZRotation = rotZ + if Extrusion!=None: + ZRotation = getZRotation(AXaxis,rot_matrix_invert) + #Zrotmatrix = Mathutils.RotationMatrix(-ZRotation, 3, "Z") + rs, rc = sin(ZRotation), cos(ZRotation) + Zrotmatrix = Mathutils.Matrix([rc, rs,0.0],[-rs,rc,0.0],[0.0,0.0,1.0]) + #print 'deb: Zrotmatrix=\n', Zrotmatrix #-------------- + + # ECS_origin is Global_Origin in EntityCoordSystem + ECS_origin = OCS_origin * Zrotmatrix + #print 'deb: ECS_origin=', ECS_origin #--------- + #TODO: it doesnt work yet for negative scaled curve-objects! + return ZRotation,Zrotmatrix,OCS_origin,ECS_origin + + +#----------------------------------------------------- +def exportCurve(ob, mx, mw, **common): + """converts Curve-Object to desired projection and representation(DXF-Entity type) + """ + entities = [] + block = None curve = ob.getData() - for cur in curve: - #print 'deb: START cur=', cur #-------------- - if 1: #not cur.isNurb(): - #print 'deb: START points' #-------------- + #print 'deb: curve=', dir(curve) #--------- + # TODO: should be: if curve.users>1 and not (PERSPECTIVE or (PROJECTION and HIDDEN_MODE): + if GUI_A['instances_on'].val and curve.users>1 and not PROJECTION: + if curve.name in BLOCKREGISTRY.keys(): + insert_name = BLOCKREGISTRY[curve.name] + # write INSERT to entities + entities = exportInsert(ob, mx,insert_name, **common) + else: + # generate geom_output in ObjectCS + imx = Mathutils.Matrix().identity() + WCS_loc = [0,0,0] # WCS_loc is object location in WorldCoordSystem + #print 'deb: WCS_loc=', WCS_loc #--------- + sizeX = sizeY = sizeZ = 1.0 + rotX = rotY = rotZ = 0.0 + Thickness,Extrusion,ZRotation,Elevation = None,None,None,None + ZRotation,Zrotmatrix,OCS_origin,ECS_origin = None,None,None,None + AXaxis = imx[0].copy().resize3D() # = ArbitraryXvector + OCS_origin = [0,0,0] + if not PROJECTION: + #Extrusion, ZRotation, Elevation = getExtrusion(mx) + Extrusion, AXaxis = getExtrusion(imx) + + # no thickness/width for POLYLINEs converted into Screen-C-S + #print 'deb: curve.ext1=', curve.ext1 #--------- + if curve.ext1: Thickness = curve.ext1 * sizeZ + if curve.ext2 and sizeX==sizeY: + Width = curve.ext2 * sizeX + if "POLYLINE"==curve_as_list[GUI_A['curve_as'].val]: # export as POLYLINE + ZRotation,Zrotmatrix,OCS_origin,ECS_origin = getTargetOrientation(imx,Extrusion,\ + AXaxis,WCS_loc,sizeX,sizeY,sizeZ,rotX,rotY,rotZ) + + entities = writeCurveEntities(curve, imx, + Thickness,Extrusion,ZRotation,Elevation,AXaxis,Zrotmatrix, + WCS_loc,OCS_origin,ECS_origin,sizeX,sizeY,sizeZ, + **common) + + if entities: # if not empty block + # write BLOCK definition and INSERT entity + # BLOCKREGISTRY = dictionary 'blender_name':'dxf_name'.append(me.name) + BLOCKREGISTRY[curve.name]=validDXFr12name(('CU_'+ curve.name)) + insert_name = BLOCKREGISTRY[curve.name] + block = DXF.Block(insert_name,flag=0,base=(0,0,0),entities=entities) + # write INSERT as entity + entities = exportInsert(ob, mx, insert_name, **common) + + else: # no other instances, so go the standard way + WCS_loc = ob.loc # WCS_loc is object location in WorldCoordSystem + #print 'deb: WCS_loc=', WCS_loc #--------- + sizeX = ob.SizeX + sizeY = ob.SizeY + sizeZ = ob.SizeZ + rotX = ob.RotX + rotY = ob.RotY + rotZ = ob.RotZ + #print 'deb: sizeX=%s, sizeY=%s' %(sizeX, sizeY) #--------- + + Thickness,Extrusion,ZRotation,Elevation = None,None,None,None + ZRotation,Zrotmatrix,OCS_origin,ECS_origin = None,None,None,None + AXaxis = mx[0].copy().resize3D() # = ArbitraryXvector + OCS_origin = [0,0,0] + if not PROJECTION: + #Extrusion, ZRotation, Elevation = getExtrusion(mx) + Extrusion, AXaxis = getExtrusion(mx) + + # no thickness/width for POLYLINEs converted into Screen-C-S + #print 'deb: curve.ext1=', curve.ext1 #--------- + if curve.ext1: Thickness = curve.ext1 * sizeZ + if curve.ext2 and sizeX==sizeY: + Width = curve.ext2 * sizeX + if "POLYLINE"==curve_as_list[GUI_A['curve_as'].val]: # export as POLYLINE + ZRotation,Zrotmatrix,OCS_origin,ECS_origin = getTargetOrientation(mx,Extrusion,\ + AXaxis,WCS_loc,sizeX,sizeY,sizeZ,rotX,rotY,rotZ) + entities = writeCurveEntities(curve, mx, + Thickness,Extrusion,ZRotation,Elevation,AXaxis,Zrotmatrix, + WCS_loc,OCS_origin,ECS_origin,sizeX,sizeY,sizeZ, + **common) + + return entities, block + + +#------------------------------------------------- +def writeCurveEntities(curve, mx, + Thickness,Extrusion,ZRotation,Elevation,AXaxis,Zrotmatrix, + WCS_loc,OCS_origin,ECS_origin,sizeX,sizeY,sizeZ, + **common): + """help routine for exportCurve() + """ + entities = [] + + if 1: + for cur in curve: + #print 'deb: START cur=', cur #-------------- points = [] - org_point = [0.0,0.0,0.0] - for point in cur: - #print 'deb: point=', point #--------- - if cur.isNurb(): + if cur.isNurb(): + for point in cur: + #print 'deb:isNurb point=', point #--------- vec = point[0:3] - else: - point = point.getTriple() - #print 'deb: point=', point #--------- - vec = point[1] - #print 'deb: vec=', vec #--------- - pkt = Mathutils.Vector(vec) * mx - #print 'deb: pkt=', pkt #--------- - #pkt *= SCALE_FACTOR - if 0: #FLATTEN: - pkt = projected_co(pkt, mw) - points.append(pkt) - if cur.isCyclic(): closed = 1 - else: closed = 0 + #print 'deb: vec=', vec #--------- + pkt = Mathutils.Vector(vec) + #print 'deb: pkt=', pkt #--------- + points.append(pkt) + else: + for point in cur: + #print 'deb:isBezier point=', point.getTriple() #--------- + vec = point.getTriple()[1] + #print 'deb: vec=', vec #--------- + pkt = Mathutils.Vector(vec) + #print 'deb: pkt=', pkt #--------- + points.append(pkt) + + #print 'deb: points', points #-------------- if len(points)>1: - #print 'deb: points', points #-------------- - if POLYLINES: dxfPLINE = PolyLine(points,org_point,closed) - else: dxfPLINE = LineList(points,org_point,closed) - entities.append(dxfPLINE) + c = curve_as_list[GUI_A['curve_as'].val] + + if c=="POLYLINE": # export Curve as POLYLINE + if not PROJECTION: + # recalculate points(2d=X,Y) into Entity-Coords-System + for p in points: # list of vectors + p[0] *= sizeX + p[1] *= sizeY + p2 = p * Zrotmatrix + p2[0] += ECS_origin[0] + p2[1] += ECS_origin[1] + p[0],p[1] = p2[0],p2[1] + else: + points = projected_co(points, mx) + #print 'deb: points', points #-------------- + + if cur.isCyclic(): closed = 1 + else: closed = 0 + points = toGlobalOrigin(points) + + if DEBUG: curve_drawBlender(points,OCS_origin,closed) #deb: draw to scene + + common['extrusion']= Extrusion + ##common['rotation']= ZRotation + ##common['elevation']= Elevation + common['thickness']= Thickness + #print 'deb: common=', common #------------------ + + if 0: #DEBUG + p=AXaxis[:3] + entities.append(DXF.Line([[0,0,0], p],**common)) + p=ECS_origin[:3] + entities.append(DXF.Line([[0,0,0], p],**common)) + common['color']= 5 + p=OCS_origin[:3] + entities.append(DXF.Line([[0,0,0], p],**common)) + #OCS_origin=[0,0,0] #only debug---------------- + dxfPLINE = DXF.PolyLine(points,OCS_origin,closed,**common) + entities.append(dxfPLINE) + + dxfPLINE = DXF.PolyLine(points,OCS_origin,closed,**common) + entities.append(dxfPLINE) + if Thickness: + common['thickness']= -Thickness + dxfPLINE = DXF.PolyLine(points,OCS_origin,closed,**common) + entities.append(dxfPLINE) + + elif c=="LINEs": # export Curve as multiple LINEs + points = projected_co(points, mx) + if cur.isCyclic(): points.append(points[0]) + #print 'deb: points', points #-------------- + points = toGlobalOrigin(points) + + if DEBUG: curve_drawBlender(points,WCS_loc,closed) #deb: draw to scene + common['extrusion']= Extrusion + common['elevation']= Elevation + common['thickness']= Thickness + #print 'deb: common=', common #------------------ + for i in range(len(points)-1): + linepoints = [points[i], points[i+1]] + dxfLINE = DXF.Line(linepoints,**common) + entities.append(dxfLINE) + if Thickness: + common['thickness']= -Thickness + for i in range(len(points)-1): + linepoints = [points[i], points[i+1]] + dxfLINE = DXF.Line(linepoints,**common) + entities.append(dxfLINE) + + elif c=="POINTs": # export Curve as multiple POINTs + points = projected_co(points, mx) + for p in points: + dxfPOINT = DXF.Point(points=[p],**common) + entities.append(dxfPOINT) return entities + #----------------------------------------------------- -def do_export(sel_group, filepath): +def getClipBox(camera): + """calculates Field-of-View-Clipping-Box of given Camera + returns clip_box: a list of vertices + returns matr: translation matrix + """ + sce = Scene.GetCurrent() + context = sce.getRenderingContext() + #print 'deb: context=\n', context #------------------ + sizeX = context.sizeX + sizeY = context.sizeY + ratioXY = sizeX/float(sizeY) + #print 'deb: size X,Y, ratio=', sizeX, sizeY, ratioXY #------------------ + + clip1_Z = - camera.clipStart + clip2_Z = - camera.clipEnd + #print 'deb: clip Start=', camera.clipStart #------------------ + #print 'deb: clip End=', camera.clipEnd #------------------ + + if camera.type=='ortho': + scale = camera.scale + #print 'deb: camscale=', scale #------------------ + clip1shiftX = clip2shiftX = camera.shiftX * scale + clip1shiftY = clip2shiftY = camera.shiftY * scale + clip1_X = scale * 0.5 + clip1_Y = scale * 0.5 + if ratioXY > 1.0: clip1_Y /= ratioXY + else: clip1_X *= ratioXY + clip2_X = clip1_X + clip2_Y = clip1_Y + + near = clip1_Z + far = clip2_Z + right, left = clip1_X, -clip1_X + top, bottom = clip1_Y, -clip1_Y + + scaleX = 2.0/float(right - left) + x3 = -float(right + left)/float(right - left) + scaleY = 2.0/float(top - bottom) + y3 = -float(top + bottom)/float(top - bottom) + scaleZ = 1.0/float(far - near) + z3 = -float(near)/float(far - near) + + matrix = Mathutils.Matrix( [scaleX, 0.0, 0.0, x3], + [0.0, scaleY, 0.0, y3], + [0.0, 0.0, scaleZ, z3], + [0.0, 0.0, 0.0, 1.0]) + + elif camera.type=='persp': + #viewpoint = [0.0, 0.0, 0.0] #camera's coordinate system, hehe + #lens = camera.lens + angle = camera.angle + #print 'deb: cam angle=', angle #------------------ + shiftX = camera.shiftX + shiftY = camera.shiftY + fov_coef = atan(angle * d2r) + fov_coef *= 1.3 #incl. passpartou + clip1_k = clip1_Z * fov_coef + clip2_k = clip2_Z * fov_coef + clip1shiftX = - camera.shiftX * clip1_k + clip2shiftX = - camera.shiftX * clip2_k + clip1shiftY = - camera.shiftY * clip1_k + clip2shiftY = - camera.shiftY * clip2_k + clip1_X = clip1_Y = clip1_k * 0.5 + clip2_X = clip2_Y = clip2_k * 0.5 + if ratioXY > 1.0: + clip1_Y /= ratioXY + clip2_Y /= ratioXY + else: + clip1_X *= ratioXY + clip2_X *= ratioXY + + near = clip1_Z + far = clip2_Z + right, left = clip1_X, -clip1_X + top, bottom = clip1_Y, -clip1_Y + #return Matrix( [scaleX, 0.0, x2, 0.0], + #[0.0, scaleY, y2, 0.0], + #[0.0, 0.0, scaleZ, wZ], + #[0.0, 0.0, -1.0, 0.0]) + matrix = Mathutils.Matrix( [(2.0 * near)/float(right - left), 0.0, float(right + left)/float(right - left), 0.0], + [0.0, (2.0 * near)/float(top - bottom), float(top + bottom)/float(top - bottom), 0.0], + [0.0, 0.0, -float(far + near)/float(far - near), -(2.0 * far * near)/float(far - near)], + [0.0, 0.0, -1.0, 0.0]) + + + clip_box = [ + -clip1_X + clip1shiftX, clip1_X + clip1shiftX, + -clip1_Y + clip1shiftY, clip1_Y + clip1shiftY, + -clip2_X + clip2shiftX, clip2_X + clip2shiftX, + -clip2_Y + clip2shiftY, clip2_Y + clip2shiftY, + clip1_Z, clip2_Z] + #print 'deb: clip_box=\n', clip_box #------------------ + #drawClipBox(clip_box) + return clip_box, matrix + + +#----------------------------------------------------- +def drawClipBox(clip_box): + """debug tool: draws Clipping-Box of a Camera View + """ + min_X1, max_X1, min_Y1, max_Y1,\ + min_X2, max_X2, min_Y2, max_Y2,\ + min_Z, max_Z = clip_box + verts = [] + verts.append([min_X1, min_Y1, min_Z]) + verts.append([max_X1, min_Y1, min_Z]) + verts.append([max_X1, max_Y1, min_Z]) + verts.append([min_X1, max_Y1, min_Z]) + verts.append([min_X2, min_Y2, max_Z]) + verts.append([max_X2, min_Y2, max_Z]) + verts.append([max_X2, max_Y2, max_Z]) + verts.append([min_X2, max_Y2, max_Z]) + faces = [[0,1,2,3],[4,5,6,7]] + newmesh = Mesh.New() + newmesh.verts.extend(verts) + newmesh.faces.extend(faces) + + plan = Object.New('Mesh','clip_box') + plan.link(newmesh) + sce = Scene.GetCurrent() + sce.objects.link(plan) + plan.setMatrix(sce.objects.camera.matrix) + + +#------------------------------------------------- +def getCommons(ob): + """set up common attributes for output style: + color=None + extrusion=None + layer='0', + lineType=None + lineTypeScale=None + lineWeight=None + thickness=None + parent=None + """ + + layers = ob.layers #gives a list e.g.[1,5,19] + if layers: ob_layer_nr = layers[0] + #print 'ob_layer_nr=', ob_layer_nr #-------------- + + materials = ob.getMaterials() + if materials: + ob_material = materials[0] + ob_mat_color = ob_material.rgbCol + else: ob_mat_color, ob_material = None, None + #print 'ob_mat_color, ob_material=', ob_mat_color, ob_material #-------------- + + data = ob.getData() + data_materials = ob.getMaterials() + if data_materials: + data_material = data_materials[0] + data_mat_color = data_material.rgbCol + else: data_mat_color, data_material = None, None + #print 'data_mat_color, data_material=', data_mat_color, data_material #-------------- + + entitylayer = ENTITYLAYER_DEF + c = entitylayer_from_list[GUI_A['entitylayer_from'].val] + #["default_LAYER","obj.name","obj.layer","obj.material","obj.data.name","obj.data.material","..vertexgroup","..group","..map_table"] + if c=="default_LAYER": + entitylayer = LAYERNAME_DEF + elif c=="obj.layer" and ob_layer_nr: + entitylayer = 'LAYER'+ str(ob_layer_nr) + elif c=="obj.material" and ob_material: + entitylayer = ob_material.name + elif c=="obj.name": + entitylayer = ob.name + elif c=="obj.data.material" and ob_material: + entitylayer = data_material.name + elif c=="obj.data.name": + entitylayer = data.name + entitylayer = validDXFr12name(PREFIX+entitylayer) + if entitylayer=="": entitylayer = "BF_0" + + entitycolor = ENTITYCOLOR_DEF + c = entitycolor_from_list[GUI_A['entitycolor_from'].val] + if c=="default_COLOR": + entitycolor = LAYERCOLOR_DEF + elif c=="BYLAYER": + entitycolor = BYLAYER + elif c=="BYBLOCK": + entitycolor = BYBLOCK + elif c=="obj.layer" and ob_layer_nr: + entitycolor = ob_layer_nr + elif c=="obj.color" and ob.color: + entitycolor = col2DXF(ob.color) + elif c=="obj.material" and ob_mat_color: + entitycolor = col2DXF(ob_mat_color) + elif c=="obj.data.material" and data_mat_color: + entitycolor = col2DXF(data_mat_color) + #if entitycolor!=None: layercolor = entitycolor + + entityltype = ENTITYLTYPE_DEF + c = entityltype_from_list[GUI_A['entityltype_from'].val] + if c=="default_LTYPE": + entityltype = LAYERLTYPE_DEF + elif c=="BYLAYER": + entityltype = BYLAYER + elif c=="BYBLOCK": + entityltype = BYBLOCK + elif c: + entityltype = c + + return entitylayer,entitycolor,entityltype + + +#----------------------------------------------------- +def do_export(export_list, filepath): + global PERSPECTIVE, CAMERAVIEW, BLOCKREGISTRY Window.WaitCursor(1) - t = sys.time() + t = Blender.sys.time() - #init Drawing --------------------- - d=Drawing() - #add Tables ----------------- - #d.blocks.append(b) #table blocks - d.styles.append(Style()) #table styles - d.views.append(View('Normal')) #table view - d.views.append(ViewByWindow('Window',leftBottom=(1,0),rightTop=(2,1))) #idem + # init Drawing --------------------- + d=DXF.Drawing() + # add Tables ----------------- + # initialized automatic: d.blocks.append(b) #section BLOCKS + # initialized automatic: d.styles.append(DXF.Style()) #table STYLE - #add Entities -------------------- - something_ready = False - #ViewVector = Mathutils.Vector(Window.GetViewVector()) - #print 'deb: ViewVector=', ViewVector #------------------ - mw0 = Window.GetViewMatrix() - #mw0 = Window.GetPerspMatrix() #TODO: how get it working? - mw = mw0.copy() - if FLATTEN: - m0 = Mathutils.Matrix() - m0[2][2]=0.0 - mw *= m0 #flatten ViewMatrix + #table LTYPE --------------- + #d.linetypes.append(DXF.LineType(name='CONTINUOUS',description='--------',elements=[0.0])) + d.linetypes.append(DXF.LineType(name='DOT',description='. . . . . . .',elements=[0.25, 0.0, -0.25])) + d.linetypes.append(DXF.LineType(name='DASHED',description='__ __ __ __ __',elements=[0.8, 0.5, -0.3])) + d.linetypes.append(DXF.LineType(name='DASHDOT',description='__ . __ . __ .',elements=[1.0, 0.5, -0.25, 0.0, -0.25])) + d.linetypes.append(DXF.LineType(name='DIVIDE',description='____ . . ____ . . ',elements=[1.25, 0.5, -0.25, 0.0, -0.25, 0.0, -0.25])) + d.linetypes.append(DXF.LineType(name='BORDER',description='__ __ . __ __ . ',elements=[1.75, 0.5, -0.25, 0.5, -0.25, 0.0, -0.25])) + d.linetypes.append(DXF.LineType(name='HIDDEN',description='__ __ __ __ __',elements=[0.4, 0.25, -0.25])) + d.linetypes.append(DXF.LineType(name='CENTER',description='____ _ ____ _ __',elements=[2.0, 1.25, -0.25, 0.25, -0.25])) - for ob in sel_group: + #d.vports.append(DXF.VPort('*ACTIVE')) + d.vports.append(DXF.VPort('*ACTIVE',center=(-5.0,1.0),height=10.0)) + #d.vports.append(DXF.VPort('*ACTIVE',leftBottom=(-100.0,-60.0),rightTop=(100.0,60.0))) + #d.views.append(DXF.View('Normal')) #table view + d.views.append(DXF.ViewByWindow('BF_TOPVIEW',leftBottom=(-100,-60),rightTop=(100,60))) #idem + + # add Entities -------------------- + BLOCKREGISTRY = {} # registry and map for BLOCKs + PERSPECTIVE = 0 + something_ready = 0 + selected_len = len(export_list) + sce = Scene.GetCurrent() + + mw = Mathutils.Matrix( [1.0, 0.0, 0.0, 0.0], + [0.0, 1.0, 0.0, 0.0], + [0.0, 0.0, 1.0, 0.0], + [0.0, 0.0, 0.0, 1.0]) + if PROJECTION: + if CAMERA