Merge branch 'develop' of https://bitbucket.org/volumesoffun/polyvox into develop
This commit is contained in:
commit
ed614802fe
@ -26,7 +26,7 @@ PROJECT(PolyVox)
|
||||
|
||||
SET(POLYVOX_VERSION_MAJOR "0")
|
||||
SET(POLYVOX_VERSION_MINOR "2")
|
||||
SET(POLYVOX_VERSION_PATCH "0")
|
||||
SET(POLYVOX_VERSION_PATCH "1")
|
||||
SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}" CACHE STRING "PolyVox version")
|
||||
MARK_AS_ADVANCED(FORCE POLYVOX_VERSION)
|
||||
|
||||
@ -69,7 +69,9 @@ if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||
ADD_DEFINITIONS(-std=c++0x) #Enable C++0x mode
|
||||
endif()
|
||||
|
||||
if(NOT MSVC) #This is causing problems in Visual Studio so disable it for now
|
||||
INCLUDE(cmake/Modules/CheckCXX11Features.cmake)
|
||||
endif()
|
||||
|
||||
ADD_SUBDIRECTORY(library)
|
||||
|
||||
|
@ -20,12 +20,12 @@
|
||||
# 3. This notice may not be removed or altered from any source
|
||||
# distribution.
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
PROJECT(PolyVoxCore)
|
||||
|
||||
if(NOT MSVC)
|
||||
#Set up the C++11 feature header file based on the CheckCXX11Features script
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/PolyVoxCore/Impl/CompilerCapabilities.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/PolyVoxCore/Impl/CompilerCapabilities.h)
|
||||
endif()
|
||||
|
||||
#Projects source files
|
||||
SET(CORE_SRC_FILES
|
||||
|
@ -1,3 +1,11 @@
|
||||
/*
|
||||
* This file provides the default compiler capabilities for for Visual Studio.
|
||||
* On other compilers CMake will detect which features are available and create
|
||||
* a file like this.
|
||||
*
|
||||
* To Enable these features in Visual Studio, define the variables in this file.
|
||||
*/
|
||||
|
||||
#ifndef __PolyVox_CompilerCapabilities_H__
|
||||
#define __PolyVox_CompilerCapabilities_H__
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* This file is an input file for the CMake build system. It is processed and
|
||||
* placed in the build directory by CMake.
|
||||
*/
|
||||
|
||||
#ifndef __PolyVox_CompilerCapabilities_H__
|
||||
#define __PolyVox_CompilerCapabilities_H__
|
||||
|
||||
|
@ -20,8 +20,6 @@
|
||||
# 3. This notice may not be removed or altered from any source
|
||||
# distribution.
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
PROJECT(PolyVoxUtil)
|
||||
|
||||
#Projects source files
|
||||
|
@ -48,6 +48,11 @@ if(ENABLE_BINDINGS)
|
||||
set_target_properties(${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTIES OUTPUT_NAME _PolyVoxCore)
|
||||
#set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTY FOLDER "Bindings")
|
||||
|
||||
swig_add_module(PolyVoxCoreCSharp csharp PolyVoxCore.i)
|
||||
set(SWIG_MODULE_PolyVoxCoreCSharp_EXTRA_FLAGS "-dllimport;PolyVoxCoreCSharp") #This _should_ be inside UseSWIG.cmake - http://www.cmake.org/Bug/view.php?id=13814
|
||||
swig_link_libraries(PolyVoxCoreCSharp PolyVoxCore)
|
||||
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCoreCSharp_REAL_NAME} PROPERTY FOLDER "Bindings")
|
||||
else()
|
||||
set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)
|
||||
endif()
|
||||
|
@ -2,6 +2,8 @@
|
||||
%{
|
||||
#include "Raycast.h"
|
||||
|
||||
#ifdef SWIGPYTHON
|
||||
|
||||
template<typename VolumeType>
|
||||
class PyCallback
|
||||
{
|
||||
@ -43,11 +45,17 @@ PolyVox::RaycastResult raycastWithEndpointsPython(VolumeType* volData, const Pol
|
||||
return PolyVox::raycastWithEndpoints(volData, v3dStart, v3dEnd, newCallback);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%include "Raycast.h"
|
||||
|
||||
#ifdef SWIGPYTHON
|
||||
|
||||
template<typename VolumeType, typename Callback>
|
||||
PolyVox::RaycastResult raycastWithEndpointsPython(VolumeType* volData, const PolyVox::Vector3DFloat& v3dStart, const PolyVox::Vector3DFloat& v3dEnd, PyObject *callback);
|
||||
|
||||
%template(raycastWithEndpointsSimpleVolumeuint8) raycastWithEndpointsPython<PolyVox::SimpleVolume<uint8_t>, PyCallback<PolyVox::SimpleVolume<uint8_t> > >;
|
||||
|
||||
#endif
|
||||
|
@ -34,6 +34,13 @@ PROPERTY(PolyVox::Vector, z, getZ, setZ)
|
||||
STR()
|
||||
};
|
||||
|
||||
%feature("pythonprepend") PolyVox::Vector::operator< %{
|
||||
import warnings
|
||||
warnings.warn("deprecated", DeprecationWarning)
|
||||
%}
|
||||
|
||||
//%csattributes PolyVox::Vector::operator< "[System.Obsolete(\"deprecated\")]"
|
||||
|
||||
%define VECTOR3(StorageType,OperationType,ReducedStorageType)
|
||||
%ignore PolyVox::Vector<3,StorageType,OperationType>::Vector(ReducedStorageType,ReducedStorageType,ReducedStorageType,ReducedStorageType);
|
||||
%ignore PolyVox::Vector<3,StorageType,OperationType>::Vector(ReducedStorageType,ReducedStorageType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user