diff options
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/bsp_tree.h | 27 | ||||
-rw-r--r-- | core/math/face3.h | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/core/math/bsp_tree.h b/core/math/bsp_tree.h index 2bfc26b51e..6c36d80e3e 100644 --- a/core/math/bsp_tree.h +++ b/core/math/bsp_tree.h @@ -34,8 +34,8 @@ #include "face3.h" #include "vector.h" #include "dvector.h" - #include "variant.h" +#include "method_ptrcall.h" /** @author Juan Linietsky <reduzio@gmail.com> */ @@ -138,4 +138,29 @@ bool BSP_Tree::convex_is_inside(const T& p_convex) const { } +#ifdef PTRCALL_ENABLED + + +template<> +struct PtrToArg<BSP_Tree> { + _FORCE_INLINE_ static BSP_Tree convert(const void* p_ptr) { + BSP_Tree s( Variant( *reinterpret_cast<const Dictionary*>(p_ptr) ) ); + return s; + } + _FORCE_INLINE_ static void encode(BSP_Tree p_val,void* p_ptr) { + Dictionary *d = reinterpret_cast<Dictionary*>(p_ptr); + *d=Variant(p_val); + } +}; + +template<> +struct PtrToArg<const BSP_Tree&> { + _FORCE_INLINE_ static BSP_Tree convert(const void* p_ptr) { + BSP_Tree s( Variant( *reinterpret_cast<const Dictionary*>(p_ptr) ) ); + return s; + } +}; + +#endif + #endif diff --git a/core/math/face3.h b/core/math/face3.h index bc34be9935..3a81da74db 100644 --- a/core/math/face3.h +++ b/core/math/face3.h @@ -264,4 +264,6 @@ bool Face3::intersects_aabb2(const AABB& p_aabb) const { } +//this sucks... + #endif // FACE3_H |