[Tizen] Physics2d bindings 22/298822/3
authorDavid Steele <david.steele@samsung.com>
Fri, 25 Aug 2023 17:07:16 +0000 (18:07 +0100)
committersunghyun kim <scholb.kim@samsung.com>
Thu, 14 Sep 2023 04:38:21 +0000 (13:38 +0900)
add some patch for gbs building

Change-Id: I41961fe057103fc66dfa2127a370fa4de0839e88

.gitignore
build/tizen/CMakeLists.txt
build/tizen/dali-physics-2d/CMakeLists.txt [new file with mode: 0644]
build/tizen/dali-physics-3d/CMakeLists.txt [new file with mode: 0644]
build/tizen/dali2-csharp-binder.pc.in
dali-csharp-binder/dali-physics-2d/physics-actor-2d-wrap.cpp [new file with mode: 0644]
dali-csharp-binder/dali-physics-2d/physics-adaptor-2d-wrap.cpp [new file with mode: 0644]
dali-csharp-binder/file.list
packaging/dali-csharp-binder.spec

index a6d8f33..cee11c6 100644 (file)
@@ -41,6 +41,8 @@ install_manifest.txt
 /build/tizen/doc
 /build/tizen/.cov
 /build/desktop
+/build/tizen/*.ninja
+/build/tizen/.ninja*
 /packaging/home*
 compile_commands.json
 .clangd
index f06d08c..06aa555 100644 (file)
@@ -28,6 +28,8 @@ OPTION(ENABLE_PROFILE            "Enable Profile" OFF)
 OPTION(ENABLE_TRACE              "Enable Trace" ON)
 OPTION(ENABLE_PKG_CONFIGURE      "Use pkgconfig" ON)
 OPTION(ENABLE_SCENE3D            "Enable scene3d" ON)
+OPTION(ENABLE_PHYSICS_2D         "Enable 2d physics" ON)
+OPTION(ENABLE_PHYSICS_3D         "Enable 3d physics" OFF)
 OPTION(ENABLE_RIVE_ANIMATION     "Enable rive animation" OFF)
 OPTION(ENABLE_ECORE_WAYLAND2     "Enable ecore wayland2" OFF)
 
@@ -79,6 +81,8 @@ IF( ENABLE_PKG_CONFIGURE )
   PKG_CHECK_MODULES(DALIADAPTOR REQUIRED dali2-adaptor)
   PKG_CHECK_MODULES(DALITOOLKIT REQUIRED dali2-toolkit)
   PKG_CHECK_MODULES(DALISCENE3D REQUIRED dali2-scene3d)
+  PKG_CHECK_MODULES(DALIPHYSICS2D REQUIRED dali2-physics-2d)
+  PKG_CHECK_MODULES(DALIPHYSICS3D REQUIRED dali2-physics-3d)
 ENDIF()
 
 ADD_DEFINITIONS(-DDALI_PROFILE_WINDOWS)
@@ -89,6 +93,8 @@ IF( WIN32 ) # WIN32 includes x64 as well according to the cmake doc.
   FIND_PACKAGE( dali2-adaptor REQUIRED )
   FIND_PACKAGE( dali2-toolkit REQUIRED )
   FIND_PACKAGE( dali2-scene3d REQUIRED )
+  FIND_PACKAGE( dali2-physics-2d REQUIRED )
+  FIND_PACKAGE( dali2-physics-3d REQUIRED )
   FIND_PACKAGE( pthreads REQUIRED )
 ENDIF()
 
@@ -251,6 +257,8 @@ MESSAGE( STATUS "Profile:                       " ${ENABLE_PROFILE} )
 MESSAGE( STATUS "Export all symbols:            " ${ENABLE_EXPORTALL} )
 MESSAGE( STATUS "Trace:                         " ${ENABLE_TRACE} )
 MESSAGE( STATUS "Use pkg configure:             " ${ENABLE_PKG_CONFIGURE} )
+MESSAGE( STATUS "Use 2d physics:                " ${ENABLE_PHYSICS_2D} )
+MESSAGE( STATUS "Use 3d physics:                " ${ENABLE_PHYSICS_3D} )
 MESSAGE( STATUS "Use scene 3d:                  " ${ENABLE_SCENE3D} )
 MESSAGE( STATUS "CXXFLAGS:                      " ${CMAKE_CXX_FLAGS} )
 MESSAGE( STATUS "LDFLAGS:                       " ${CMAKE_SHARED_LINKER_FLAGS_INIT}${CMAKE_SHARED_LINKER_FLAGS} )
@@ -258,3 +266,11 @@ MESSAGE( STATUS "LDFLAGS:                       " ${CMAKE_SHARED_LINKER_FLAGS_IN
 IF( ENABLE_SCENE3D )
   ADD_SUBDIRECTORY( dali-scene3d )
 ENDIF()
+
+IF( ENABLE_PHYSICS_2D )
+  ADD_SUBDIRECTORY( dali-physics-2d )
+ENDIF()
+
+IF( ENABLE_PHYSICS_3D )
+  ADD_SUBDIRECTORY( dali-physics-3d )
+ENDIF()
diff --git a/build/tizen/dali-physics-2d/CMakeLists.txt b/build/tizen/dali-physics-2d/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c02de2f
--- /dev/null
@@ -0,0 +1,27 @@
+SET(PHYSICS_2D_TARGET dali2-csharp-binder-physics-2d)
+
+SET( PHYSICS_2D_SOURCES ${dali_csharp_binder_physics_2d_src_files})
+
+ADD_LIBRARY( ${PHYSICS_2D_TARGET} SHARED ${PHYSICS_2D_SOURCES} )
+
+TARGET_LINK_LIBRARIES( ${PHYSICS_2D_TARGET} PUBLIC
+  ${DLOG_LDFLAGS}
+  ${DALICORE_LDFLAGS}
+  ${DALIADAPTOR_LDFLAGS}
+  ${DALITOOLKIT_LDFLAGS}
+  ${DALIPHYSICS2D_LDFLAGS})
+
+TARGET_COMPILE_OPTIONS( ${PHYSICS_2D_TARGET} PUBLIC
+  ${DLOG_CFLAGS}
+  ${DALICORE_CFLAGS}
+  ${DALIADAPTOR_CFLAGS}
+  ${DALITOOLKIT_CFLAGS}
+  ${DALIPHYSICS2D_CFLAGS}
+  ${DALI_PROFILE_CFLAGS}
+  ${PHYSICS_2D_CFLAGS}
+  ${}
+  -I../../../
+  -Wall
+)
+
+INSTALL( TARGETS ${PHYSICS_2D_TARGET} DESTINATION ${LIB_DIR} )
diff --git a/build/tizen/dali-physics-3d/CMakeLists.txt b/build/tizen/dali-physics-3d/CMakeLists.txt
new file mode 100644 (file)
index 0000000..824fb5e
--- /dev/null
@@ -0,0 +1,27 @@
+SET(PHYSICS_3D_TARGET dali2-csharp-binder-physics-3d)
+
+SET( PHYSICS_3D_SOURCES ${dali_csharp_binder_physics_3d_src_files})
+
+ADD_LIBRARY( ${PHYSICS_3D_TARGET} SHARED ${PHYSICS_3D_SOURCES} )
+
+TARGET_LINK_LIBRARIES( ${PHYSICS_3D_TARGET} PUBLIC
+  ${DLOG_LDFLAGS}
+  ${DALICORE_LDFLAGS}
+  ${DALIADAPTOR_LDFLAGS}
+  ${DALITOOLKIT_LDFLAGS}
+  ${DALIPHYSICS_3D_LDFLAGS})
+
+TARGET_COMPILE_OPTIONS( ${PHYSICS_3D_TARGET} PUBLIC
+  ${DLOG_CFLAGS}
+  ${DALICORE_CFLAGS}
+  ${DALIADAPTOR_CFLAGS}
+  ${DALITOOLKIT_CFLAGS}
+  ${DALIPHYSICS_3D_CFLAGS}
+  ${DALI_PROFILE_CFLAGS}
+  ${PHYSICS_3D_CFLAGS}
+  ${}
+  -I../../../
+  -Wall
+)
+
+INSTALL( TARGETS ${PHYSICS_3D_TARGET} DESTINATION ${LIB_DIR} )
index 6d6b3dc..7162148 100644 (file)
@@ -9,6 +9,6 @@ includedir=@DEV_INCLUDE_PATH@
 Name: DALi C# binder
 Description: DALi C# binder Libaray
 Version: ${apiversion}
-Requires: dali2-core dali2-adaptor dali2-toolkit dali2-scene3d
+Requires: dali2-core dali2-adaptor dali2-toolkit dali2-scene3d dali2-physics-2d dali2-physics-3d
 Libs: -L${libdir} -ldali2-csharp-binder
 Cflags: -I${includedir}/dali-csharp-binder
diff --git a/dali-csharp-binder/dali-physics-2d/physics-actor-2d-wrap.cpp b/dali-csharp-binder/dali-physics-2d/physics-actor-2d-wrap.cpp
new file mode 100644 (file)
index 0000000..4ce7acb
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// EXTERNAL INCLUDES
+#include <dali-physics/public-api/physics-actor.h>
+#include <dali-physics/public-api/physics-adaptor.h>
+#include <chipmunk/chipmunk.h>
+
+// INTERNAL INCLUDES
+#include <dali-csharp-binder/common/common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  using Dali::Toolkit::Physics::PhysicsActor;
+  using Dali::Toolkit::Physics::PhysicsAdaptor;
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_PhysicsActor__SWIG_0()
+  {
+    void*        jresult;
+    PhysicsActor* result = 0;
+
+    {
+      try
+      {
+        result = (PhysicsActor*)new PhysicsActor();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = (void*)result;
+    return jresult;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_New(void* csActor, void* csBody, void* csAdaptor)
+  {
+    PhysicsActor result;
+
+    if(!csActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    if(!csBody)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "cpBody ptr is null", 0);
+      return 0;
+    }
+    if(!csAdaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+
+    {
+      try
+      {
+        // Stack allocate a handle
+        result = PhysicsActor::New(*(Dali::Actor*)(csActor), Dali::Any((cpBody*)csBody), *(PhysicsAdaptor*)csAdaptor);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    // Heap allocate a handle using copy constructor
+    return new PhysicsActor((const PhysicsActor&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_DownCast(void* csHandle)
+  {
+    Dali::BaseHandle* handle = (Dali::BaseHandle*)csHandle;
+    PhysicsActor result;
+
+    if(!handle)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::BaseHandle", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = PhysicsActor::DownCast(*handle);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new PhysicsActor((const PhysicsActor&)result);
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_PhysicsActor(void* csPhysicsActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csPhysicsActor;
+    {
+      try
+      {
+        delete physicsActor;
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_PhysicsActor__SWIG_1(void* csPhysicsActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csPhysicsActor;
+    PhysicsActor* result = 0;
+
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = (PhysicsActor*)new PhysicsActor((PhysicsActor const&)*physicsActor);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    return (void*)result;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_Assign(void* csDest, void* csSrc)
+  {
+    PhysicsActor* dest   = (PhysicsActor*)csDest;
+    PhysicsActor* src    = (PhysicsActor*)csSrc;
+    PhysicsActor* result = 0;
+
+    if(!src)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = (PhysicsActor*)&(dest)->operator=((PhysicsActor const&)*src);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    return (void*)result;
+  }
+
+  SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_PhysicsActor_GetId(void* csActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    unsigned int result=0;
+    {
+      try
+      {
+        result = physicsActor->GetId();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return result;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_GetBody(void* csActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    Dali::Any result;
+    Dali::Any nullResult;
+    {
+      try
+      {
+        result = physicsActor->GetBody();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    // Heap allocate a new Any wrapper
+    return new Dali::Any((const Dali::Any&)result);
+  }
+
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsActor_AsyncSetPhysicsPosition(void* csActor, void* csPosition)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return;
+    }
+    if(!csPosition)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return;
+    }
+    {
+      try
+      {
+        physicsActor->AsyncSetPhysicsPosition(*(Dali::Vector3*)(csPosition));
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsActor_AsyncSetPhysicsRotation(void* csActor, void* csRotation)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return;
+    }
+    if(!csRotation)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0);
+      return;
+    }
+    {
+      try
+      {
+        physicsActor->AsyncSetPhysicsRotation(*(Dali::Quaternion*)(csRotation));
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_GetPhysicsPosition(void* csActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    Dali::Vector3 result;
+    {
+      try
+      {
+        result = physicsActor->GetPhysicsPosition();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Vector3((const Dali::Vector3&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_GetPhysicsRotation(void* csActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    Dali::Quaternion result;
+    {
+      try
+      {
+        result = physicsActor->GetPhysicsRotation();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Quaternion((const Dali::Quaternion&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_GetActorPosition(void* csActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    Dali::Vector3 result;
+    {
+      try
+      {
+        result = physicsActor->GetActorPosition();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Vector3((const Dali::Vector3&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsActor_GetActorRotation(void* csActor)
+  {
+    PhysicsActor* physicsActor = (PhysicsActor*)csActor;
+    if(!physicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return 0;
+    }
+    Dali::Quaternion result;
+    {
+      try
+      {
+        result = physicsActor->GetActorRotation();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Quaternion((const Dali::Quaternion&)result);
+  }
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/dali-csharp-binder/dali-physics-2d/physics-adaptor-2d-wrap.cpp b/dali-csharp-binder/dali-physics-2d/physics-adaptor-2d-wrap.cpp
new file mode 100644 (file)
index 0000000..12308c1
--- /dev/null
@@ -0,0 +1,812 @@
+/*
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <dali-physics/public-api/physics-adaptor.h>
+#include <dali-physics/public-api/physics-actor.h>
+
+#include <dali-physics/integration-api/integ-physics-adaptor.h>
+
+#include <chipmunk/chipmunk.h>
+
+// INTERNAL INCLUDES
+#include <dali-csharp-binder/common/common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  using Dali::Toolkit::Physics::PhysicsActor;
+  using Dali::Toolkit::Physics::PhysicsAdaptor;
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_PhysicsAdaptor__SWIG_0()
+  {
+    void*        jresult;
+    PhysicsAdaptor* result = 0;
+
+    {
+      try
+      {
+        result = (PhysicsAdaptor*)new PhysicsAdaptor();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = (void*)result;
+    return jresult;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_New(void* csMatrix, void* csSize)
+  {
+    void*       jresult;
+    PhysicsAdaptor result;
+
+    Dali::Matrix *matrixPtr = (Dali::Matrix*)csMatrix;
+    if(!matrixPtr)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Matrix const & type is null", 0);
+      return 0;
+    }
+    Dali::Vector2 *sizePtr = (Dali::Vector2*)csSize;
+    if(!sizePtr)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Vector2 const & type is null", 0);
+      return 0;
+    }
+
+    {
+      try
+      {
+        Dali::Uint16Pair size(uint16_t(sizePtr->x), uint16_t(sizePtr->y));
+        // Stack allocate a handle
+        result = PhysicsAdaptor::New(*matrixPtr, size);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    // Heap allocate a handle using copy constructor
+    jresult = new PhysicsAdaptor((const PhysicsAdaptor&)result);
+    return jresult;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_DownCast(void* csHandle)
+  {
+    Dali::BaseHandle* handle = (Dali::BaseHandle*)csHandle;
+    PhysicsAdaptor result;
+
+    if(!handle)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::BaseHandle", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = PhysicsAdaptor::DownCast(*handle);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new PhysicsAdaptor((const PhysicsAdaptor&)result);
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_PhysicsAdaptor(void* csPhysicsAdaptor)
+  {
+    PhysicsAdaptor* physicsAdaptor = (PhysicsAdaptor*)csPhysicsAdaptor;
+    {
+      try
+      {
+        delete physicsAdaptor;
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_PhysicsAdaptor__SWIG_1(void* csPhysicsAdaptor)
+  {
+    PhysicsAdaptor* physicsAdaptor = (PhysicsAdaptor*)csPhysicsAdaptor;
+    PhysicsAdaptor* result = 0;
+
+    if(!physicsAdaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = (PhysicsAdaptor*)new PhysicsAdaptor((PhysicsAdaptor const&)*physicsAdaptor);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    return (void*)result;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_Assign(void* csDest, void* csSrc)
+  {
+    PhysicsAdaptor* dest   = (PhysicsAdaptor*)csDest;
+    PhysicsAdaptor* src    = (PhysicsAdaptor*)csSrc;
+    PhysicsAdaptor* result = 0;
+
+    if(!src)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = (PhysicsAdaptor*)&(dest)->operator=((PhysicsAdaptor const&)*src);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    return (void*)result;
+  }
+
+
+
+// Methods
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_SetTimestep(void* csAdaptor, float timestep)
+  {
+    PhysicsAdaptor* adaptor   = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    {
+      try
+      {
+        adaptor->SetTimestep(timestep);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT float SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_GetTimestep(void* csAdaptor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    float result{0.0f};
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return result;
+    }
+
+    {
+      try
+      {
+        result = adaptor->GetTimestep();
+      }
+      CALL_CATCH_EXCEPTION(0.0f);
+    }
+    return result;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_CreateDebugLayer(void* csAdaptor, void* csWindow)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Layer result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    Dali::Window* window = (Dali::Window*)csWindow;
+    if(!window)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Window const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->CreateDebugLayer(*window);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Layer((const Dali::Layer&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_TranslateToPhysicsSpace_1(void* csAdaptor, Dali::Vector3* csPosition)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Vector3 result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csPosition)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->TranslateToPhysicsSpace(*csPosition);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Vector3((const Dali::Vector3&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_TranslateToPhysicsSpace_2(void* csAdaptor, Dali::Quaternion* csRotation)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Quaternion result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csRotation)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->TranslateToPhysicsSpace(*csRotation);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Quaternion((const Dali::Quaternion&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_TranslateFromPhysicsSpace_1(void* csAdaptor, Dali::Vector3* csPosition)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Vector3 result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csPosition)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->TranslateFromPhysicsSpace(*csPosition);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Vector3((const Dali::Vector3&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_TranslateFromPhysicsSpace_2(void* csAdaptor, Dali::Quaternion* csRotation)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Quaternion result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csRotation)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->TranslateFromPhysicsSpace(*csRotation);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Quaternion((const Dali::Quaternion&)result);
+  }
+
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_ConvertVectorToPhysicsSpace(void* csAdaptor, Dali::Vector3* csVector)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Vector3 result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csVector)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->ConvertVectorToPhysicsSpace(*csVector);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Vector3((const Dali::Vector3&)result);
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_ConvertVectorFromPhysicsSpace(void* csAdaptor, Dali::Vector3* csVector)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    Dali::Vector3 result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csVector)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->ConvertVectorFromPhysicsSpace(*csVector);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Vector3((const Dali::Vector3&)result);
+  }
+
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_SetTransformAndSize(void* csAdaptor, void* csTransform, void* csSize)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    if(!csTransform)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Matrix const & type is null", 0);
+      return;
+    }
+    Dali::Vector2 *sizePtr = (Dali::Vector2*)csSize;
+    if(!sizePtr)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Vector2 const & type is null", 0);
+      return;
+    }
+
+    {
+      try
+      {
+        Dali::Uint16Pair size(uint16_t(sizePtr->x), uint16_t(sizePtr->y));
+        adaptor->SetTransformAndSize((const Dali::Matrix&)(*(Dali::Matrix*)csTransform), size);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_SetIntegrationState(void* csAdaptor, int csIntegrationState)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    {
+      try
+      {
+        adaptor->SetIntegrationState(PhysicsAdaptor::IntegrationState(csIntegrationState));
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_GetIntegrationState(void* csAdaptor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    PhysicsAdaptor::IntegrationState result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->GetIntegrationState();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return(int)result;
+  }
+
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_SetDebugState(void* csAdaptor, int csDebugState)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    {
+      try
+      {
+        adaptor->SetDebugState(PhysicsAdaptor::DebugState(csDebugState));
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_GetDebugState(void* csAdaptor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    PhysicsAdaptor::DebugState result;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = adaptor->GetDebugState();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return(int)result;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_AddActorBody(void* csAdaptor, void* csActor, void* csBody)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Actor const & type is null", 0);
+      return 0;
+    }
+    if(!csBody)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "cpBody ptr is null", 0);
+      return 0;
+    }
+
+    PhysicsActor physicsActor;
+    {
+      try
+      {
+        physicsActor = adaptor->AddActorBody((const Dali::Actor&)*(Dali::Actor*)csActor, Dali::Any((cpBody*)csBody));
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new PhysicsActor((const PhysicsActor&)physicsActor);
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_RemoveActorBody(void* csAdaptor, void* csPhysicsActor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    if(!csPhysicsActor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsActor const & type is null", 0);
+      return;
+    }
+
+    {
+      try
+      {
+        adaptor->RemoveActorBody((const PhysicsActor&)*(PhysicsActor*)csPhysicsActor);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+    return;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_GetPhysicsActor(void* csAdaptor, void* csBody)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csBody)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "cpBody ptr type is null", 0);
+      return 0;
+    }
+
+    PhysicsActor physicsActor;
+    {
+      try
+      {
+        physicsActor = adaptor->GetPhysicsActor((Dali::Any((cpBody*)csBody)));
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new PhysicsActor((const PhysicsActor&)physicsActor);
+  }
+
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_GetRootActor(void* csAdaptor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+
+    Dali::Actor actor;
+    {
+      try
+      {
+        actor = adaptor->GetRootActor();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return new Dali::Actor((const Dali::Actor&)actor);
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_BuildPickingRay(void* csAdaptor,
+                                                                         void* csOrigin,
+                                                                         void* csDirection,
+                                                                         void* csRayFromWorld,
+                                                                         void* csRayToWorld)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    if(!csOrigin)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return;
+    }
+    if(!csDirection)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return;
+    }
+    if(!csRayFromWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return;
+    }
+    if(!csRayToWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return;
+    }
+
+    try
+    {
+      adaptor->BuildPickingRay(*(Dali::Vector3*)(csOrigin),
+                               *(Dali::Vector3*)(csDirection),
+                               *(Dali::Vector3*)(csRayFromWorld),
+                               *(Dali::Vector3*)(csRayToWorld));
+    }
+    CALL_CATCH_EXCEPTION();
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_ProjectPoint(void* csAdaptor,
+                                                                       void* csOrigin,
+                                                                       void* csDirection,
+                                                                       float distance)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+    if(!csOrigin)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return 0;
+    }
+    if(!csDirection)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0);
+      return 0;
+    }
+    Dali::Vector3 point;
+    try
+    {
+      point = adaptor->ProjectPoint(*(Dali::Vector3*)(csOrigin),
+                                    *(Dali::Vector3*)(csDirection),
+                                    distance);
+
+    }
+    CALL_CATCH_EXCEPTION(0);
+    return new Dali::Vector3((const Dali::Vector3&)point);
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_CreateSyncPoint(void* csAdaptor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return;
+    }
+    {
+      try
+      {
+        adaptor->CreateSyncPoint();
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsAdaptor_GetPhysicsWorld(void* csAdaptor)
+  {
+    PhysicsAdaptor* adaptor = (PhysicsAdaptor*)csAdaptor;
+    if(!adaptor)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsAdaptor const & type is null", 0);
+      return 0;
+    }
+
+    Dali::Toolkit::Physics::Integration::PhysicsWorld result{nullptr};
+    {
+      try
+      {
+
+        result = Dali::Toolkit::Physics::Integration::GetPhysicsWorld(*adaptor);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    return result.GetImpl();
+  }
+
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsWorld_Lock(void* csWorld)
+  {
+    if(!csWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsWorld const ref type is null",0);
+      return;
+    }
+    {
+      try
+      {
+        Dali::Toolkit::Physics::Integration::PhysicsWorld world(static_cast<Dali::Toolkit::Physics::Internal::PhysicsWorld*>(csWorld));
+        world.Lock();
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_PhysicsWorld_Unlock(void* csWorld)
+  {
+    if(!csWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsWorld const ref type is null",0);
+      return;
+    }
+    {
+      try
+      {
+        Dali::Toolkit::Physics::Integration::PhysicsWorld world(static_cast<Dali::Toolkit::Physics::Internal::PhysicsWorld*>(csWorld));
+        world.Unlock();
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsWorld_GetNative(void* csWorld)
+  {
+    if(!csWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsWorld const ref type is null",0);
+      return 0;
+    }
+    Dali::Any physicsWorld;
+    {
+      try
+      {
+        Dali::Toolkit::Physics::Integration::PhysicsWorld world(static_cast<Dali::Toolkit::Physics::Internal::PhysicsWorld*>(csWorld));
+        physicsWorld = world.GetNative();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    if(!physicsWorld.Empty())
+    {
+      return physicsWorld.Get<cpSpace*>();
+    }
+    return nullptr;
+  }
+
+  SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_PhysicsWorld_HitTest(void* csWorld, Dali::Vector3* rayFromWorld, Dali::Vector3* rayToWorld, cpShapeFilter nativeFilter, void* localPivot, void* distanceFromCamera)
+  {
+    if(!csWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "PhysicsWorld const ref type is null",0);
+      return 0;
+    }
+    if(!rayFromWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Vector3 const ref type is null",0);
+      return 0;
+    }
+    if(!rayToWorld)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Vector3 const ref type is null",0);
+      return 0;
+    }
+    if(!localPivot)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Vector3 ref type is null",0);
+      return 0;
+    }
+    if(!distanceFromCamera)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "float ref type is null",0);
+      return 0;
+    }
+
+    Dali::Vector3 myLocalPivot;
+    float myDistanceFromCamera;
+    Dali::Any result;
+    {
+      try
+      {
+        Dali::Any shapeFilter(nativeFilter);
+
+        Dali::Toolkit::Physics::Integration::PhysicsWorld world(static_cast<Dali::Toolkit::Physics::Internal::PhysicsWorld*>(csWorld));
+        result = world.HitTest(*rayFromWorld, *rayToWorld, shapeFilter, myLocalPivot, myDistanceFromCamera);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    if(!result.Empty())
+    {
+      if(localPivot != nullptr)
+      {
+        *(static_cast<Dali::Vector3*>(localPivot)) = myLocalPivot;
+      }
+      if(distanceFromCamera != nullptr) // Dodgy af.
+      {
+        *(static_cast<float*>(distanceFromCamera)) = myDistanceFromCamera;
+      }
+      return result.Get<cpBody*>();
+    }
+    return nullptr;
+  }
+
+
+
+  // Lowest priority
+  //void Queue(std::function<void(void)> function);
+
+
+#ifdef __cplusplus
+}
+#endif
index 5ad8652..9b282e4 100755 (executable)
@@ -118,6 +118,18 @@ SET( dali_csharp_binder_scene3d_src_files
   ${dali_csharp_binder_dir}/dali-scene3d/scene-view-wrap.cpp
 )
 
+# module: physics-2d
+SET( dali_csharp_binder_physics_2d_src_files
+  ${dali_csharp_binder_dir}/dali-physics-2d/physics-adaptor-2d-wrap.cpp
+  ${dali_csharp_binder_dir}/dali-physics-2d/physics-actor-2d-wrap.cpp
+)
+
+# module: physics-3d
+SET( dali_csharp_binder_physics_3d_src_files
+  ${dali_csharp_binder_dir}/dali-physics-3d/physics-adaptor-3d-wrap.cpp
+  ${dali_csharp_binder_dir}/dali-physics-3d/physics-actor-3d-wrap.cpp
+)
+
 SET( dali_csharp_binder_header_files
   ${dali_csharp_binder_dir}/common/common.h
 )
index d3a4afa..32aa4bb 100644 (file)
@@ -48,6 +48,8 @@ BuildRequires: pkgconfig(dali2-core)
 BuildRequires: pkgconfig(dali2-adaptor)
 BuildRequires: pkgconfig(dali2-toolkit)
 BuildRequires: pkgconfig(dali2-scene3d)
+BuildRequires: pkgconfig(dali2-physics-2d)
+BuildRequires: pkgconfig(dali2-physics-3d)
 %if "%{_vd_cfg_product_type}" != "AUDIO" && "%{_vd_cfg_product_type}" !="AV"
 %define rive_animation_view 1
 BuildRequires: pkgconfig(dali2-extension-rive-animation-view)
@@ -170,6 +172,15 @@ Requires:   %{name} = %{version}-%{release}
 %description scene3d
 Scene 3D for Dali
 
+##############################
+# Dali Physics2D
+##############################
+%package physics2d
+Summary:    build dali csharp binder physics2d
+Group:      System/Libraries
+Requires:   %{name} = %{version}-%{release}
+%description physics2d
+Physics 2D for Dali
 
 ##############################
 # Preparation
@@ -233,6 +244,7 @@ cmake_flags+=" -DCMAKE_INSTALL_LIBDIR=%{_libdir}"
 cmake_flags+=" -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}"
 cmake_flags+=" -DENABLE_TIZEN_MAJOR_VERSION=%{tizen_version_major}"
 cmake_flags+=" -DENABLE_SCENE3D=ON"
+cmake_flags+=" -DENABLE_PHYSICS_2D=ON"
 
 # Set up the build via Cmake
 #######################################################################
@@ -528,6 +540,13 @@ exit 0
 
 #################################################
 
+%files physics2d
+%manifest dali-csharp-binder.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libdali2-csharp-binder-physics-2d.so*
+
+#################################################
+
 # If the profile is selected, the line below is repquired.
 # if common ||"undefined"
 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"