[Tizen] Backport tizen_7.5 for Scene3D 81/287881/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 26 Oct 2022 13:22:58 +0000 (22:22 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 7 Feb 2023 09:18:30 +0000 (18:18 +0900)
 This is a combination of 6 commits.

Bind OrthographicSize property + Remove OrthographicProjection

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Revert "[Tizen] Bind SceneView.FramebufferMultiSamplingLevel"

Add Skybox in SceneView

Signed-off-by: seungho <sbsh.baek@samsung.com>
Add wrapper code for taking different Skybox types in SceneView

Fix the SkyboxType to EnvironmentMapType

Signed-off-by: seungho baek <sbsh.baek@samsung.com>
Bind SceneView.FramebufferMultiSamplingLevel

Change-Id: Iadd2ccf6b5d31f6604683744443946c3005f4b10
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-csharp-binder/src/dali-wrap.cpp
dali-csharp-binder/src/scene-view-wrap.cpp

index 32d07b0..f7819e8 100755 (executable)
@@ -29496,6 +29496,16 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_CameraActor_Property_INVERT_Y_AXIS_get()
 }
 
 
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_CameraActor_Property_ORTHOGRAPHIC_SIZE_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::DevelCameraActor::Property::ORTHOGRAPHIC_SIZE;
+  jresult = (int)result;
+  return jresult;
+}
+
+
 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_CameraActor_Property_PROJECTION_DIRECTION_get() {
   int jresult ;
   int result;
@@ -29963,31 +29973,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_CameraActor_SetOrthographicProjection__S
 }
 
 
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_CameraActor_SetOrthographicProjection__SWIG_1(void * jarg1, float jarg2, float jarg3, float jarg4, float jarg5, float jarg6, float jarg7) {
-  Dali::CameraActor *arg1 = (Dali::CameraActor *) 0 ;
-  float arg2 ;
-  float arg3 ;
-  float arg4 ;
-  float arg5 ;
-  float arg6 ;
-  float arg7 ;
-
-  arg1 = (Dali::CameraActor *)jarg1;
-  arg2 = (float)jarg2;
-  arg3 = (float)jarg3;
-  arg4 = (float)jarg4;
-  arg5 = (float)jarg5;
-  arg6 = (float)jarg6;
-  arg7 = (float)jarg7;
-  {
-    try {
-      (arg1)->SetOrthographicProjection(arg2,arg3,arg4,arg5,arg6,arg7);
-    } CALL_CATCH_EXCEPTION();
-  }
-
-}
-
-
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_StringValuePair__SWIG_0() {
   void * jresult ;
   std::pair< std::string,Dali::Property::Value > *result = 0 ;
index a4510a1..de7e530 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * 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.
@@ -429,6 +429,134 @@ extern "C"
     return result;
   }
 
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_SetSkybox(void *csSceneView, char *skyboxUrl)
+  {
+    Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+
+    if (!sceneView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+      return;
+    }
+    if (!skyboxUrl)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null string", 0);
+      return;
+    }
+    {
+      try
+      {
+        sceneView->SetSkybox(std::string(skyboxUrl));
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+    return;
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_SetSkyboxEnvironmentMapType(void *csSceneView, int skyboxEnvironmentMapType)
+  {
+    Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+
+    if (!sceneView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+      return;
+    }
+    {
+      try
+      {
+        sceneView->SetSkyboxEnvironmentMapType((Dali::Scene3D::EnvironmentMapType)skyboxEnvironmentMapType);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+    return;
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_SetSkyboxIntensity(void *csSceneView, float intensity)
+  {
+    Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+
+    if (!sceneView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+      return;
+    }
+    {
+      try
+      {
+        sceneView->SetSkyboxIntensity(intensity);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+    return;
+  }
+
+  SWIGEXPORT float SWIGSTDCALL CSharp_Dali_SceneView_GetSkyboxIntensity(void *csSceneView)
+  {
+    Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+    float intensity = 1.0f;
+
+    if (!sceneView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+      return intensity;
+    }
+    {
+      try
+      {
+        intensity = sceneView->GetSkyboxIntensity();
+      }
+      CALL_CATCH_EXCEPTION(0.0f);
+    }
+    return intensity;
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_SetSkyboxOrientation(void *csSceneView, void *csOrientation)
+  {
+    Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+    Dali::Quaternion *orientation = (Dali::Quaternion *)csOrientation;
+
+    if (!sceneView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+      return;
+    }
+    if (!orientation)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Quaternion", 0);
+      return;
+    }
+    {
+      try
+      {
+        sceneView->SetSkyboxOrientation(*orientation);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+    return;
+  }
+
+  SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_SceneView_GetSkyboxOrientation(void *csSceneView)
+  {
+    Dali::Scene3D::SceneView *sceneView = (Dali::Scene3D::SceneView *)csSceneView;
+    Dali::Quaternion orientation;
+
+    if (!sceneView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        orientation = sceneView->GetSkyboxOrientation();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+    Dali::Quaternion *result = new Dali::Quaternion((const Dali::Quaternion &)orientation);
+    return result;
+  }
+
 #ifdef __cplusplus
 }
 #endif