Pave way for C# bindings
This callback implementation is Python-specific and so should be disabled
This commit is contained in:
parent
9e7bb75687
commit
59d415e305
@ -2,6 +2,8 @@
|
|||||||
%{
|
%{
|
||||||
#include "Raycast.h"
|
#include "Raycast.h"
|
||||||
|
|
||||||
|
#ifdef SWIGPYTHON
|
||||||
|
|
||||||
template<typename VolumeType>
|
template<typename VolumeType>
|
||||||
class PyCallback
|
class PyCallback
|
||||||
{
|
{
|
||||||
@ -43,11 +45,17 @@ PolyVox::RaycastResult raycastWithEndpointsPython(VolumeType* volData, const Pol
|
|||||||
return PolyVox::raycastWithEndpoints(volData, v3dStart, v3dEnd, newCallback);
|
return PolyVox::raycastWithEndpoints(volData, v3dStart, v3dEnd, newCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%include "Raycast.h"
|
%include "Raycast.h"
|
||||||
|
|
||||||
|
#ifdef SWIGPYTHON
|
||||||
|
|
||||||
template<typename VolumeType, typename Callback>
|
template<typename VolumeType, typename Callback>
|
||||||
PolyVox::RaycastResult raycastWithEndpointsPython(VolumeType* volData, const PolyVox::Vector3DFloat& v3dStart, const PolyVox::Vector3DFloat& v3dEnd, PyObject *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> > >;
|
%template(raycastWithEndpointsSimpleVolumeuint8) raycastWithEndpointsPython<PolyVox::SimpleVolume<uint8_t>, PyCallback<PolyVox::SimpleVolume<uint8_t> > >;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user