From 1072a0ca6870cd92ac6832e32ef6176a199ad2a7 Mon Sep 17 00:00:00 2001 From: seungho Date: Thu, 4 Aug 2022 14:00:10 +0900 Subject: [PATCH] [NUI] Change directory of Tizen.NUI.Scene3D ModelView Signed-off-by: seungho --- .../internal}/Interop/Interop.Libraries.cs | 0 .../internal}/Interop/Interop.ModelView.cs | 0 .../src/{ => public/Controls}/ModelView.cs | 30 +++++++++++++++++----- 3 files changed, 23 insertions(+), 7 deletions(-) rename src/Tizen.NUI.Scene3D/{ => src/internal}/Interop/Interop.Libraries.cs (100%) rename src/Tizen.NUI.Scene3D/{ => src/internal}/Interop/Interop.ModelView.cs (100%) rename src/Tizen.NUI.Scene3D/src/{ => public/Controls}/ModelView.cs (91%) diff --git a/src/Tizen.NUI.Scene3D/Interop/Interop.Libraries.cs b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Libraries.cs similarity index 100% rename from src/Tizen.NUI.Scene3D/Interop/Interop.Libraries.cs rename to src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Libraries.cs diff --git a/src/Tizen.NUI.Scene3D/Interop/Interop.ModelView.cs b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.ModelView.cs similarity index 100% rename from src/Tizen.NUI.Scene3D/Interop/Interop.ModelView.cs rename to src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.ModelView.cs diff --git a/src/Tizen.NUI.Scene3D/src/ModelView.cs b/src/Tizen.NUI.Scene3D/src/public/Controls/ModelView.cs similarity index 91% rename from src/Tizen.NUI.Scene3D/src/ModelView.cs rename to src/Tizen.NUI.Scene3D/src/public/Controls/ModelView.cs index 25c45be..ac47301 100755 --- a/src/Tizen.NUI.Scene3D/src/ModelView.cs +++ b/src/Tizen.NUI.Scene3D/src/public/Controls/ModelView.cs @@ -31,9 +31,27 @@ namespace Tizen.NUI.Scene3D /// The Animations defined in the glTF or DLI models are also loaded and can be retrieved by using GetAnimation() method. /// The number of animation is also retrieved by GetAnimationCount() method. /// - /// By default, The loaded model has it's own position and size which are defined in vertex buffer regardless of the Control size. - /// The model can be resized and repositioned to fit to the ModelView Control with UseSizeOfView and UseCenterOfView properties. + /// By default, The loaded model has it's own position and size which are defined in vertex buffer regardless of the View size. + /// The model can be resized and repositioned to fit to the ModelView with UseSizeOfView and UseCenterOfView properties. /// + /// + /// ModelView modelView = new ModelView(modelUrl) + /// { + /// Size = new Size(width, height), + /// PositionUsesPivotPoint = true, + /// PivotPoint = PivotPoint.Center, + /// ParentOrigin = ParentOrigin.Center, + /// UseSizeOfView = true, + /// UseCenterOfView = true, + /// }; + /// modelView.SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor); + /// window.Add(modelView); + /// int animationCount = modelView.GetAnimationCount(); + /// if(animationCount > 0) + /// { + /// modelView.GetAnimation(0).Play(); + /// } + /// // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) [EditorBrowsable(EditorBrowsableState.Never)] public class ModelView : View @@ -110,7 +128,7 @@ namespace Tizen.NUI.Scene3D } /// - /// Moves the model to the center of control. + /// Moves the model to the center of ModelView. /// If this property is true, the model moves so that the center is located at the center of the View by change PivotPoint of ModelRoot. /// // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) @@ -134,9 +152,7 @@ namespace Tizen.NUI.Scene3D /// /// Handle to an object. /// Reference to this. - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] - public ModelView Assign(ModelView modelView) + internal ModelView Assign(ModelView modelView) { ModelView ret = new ModelView(Interop.ModelView.ModelViewAssign(SwigCPtr, ModelView.getCPtr(modelView)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -151,7 +167,7 @@ namespace Tizen.NUI.Scene3D /// Scale factor that controls light source intensity in [0.0f, 1.0f]. Default value is 1.0f. // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) [EditorBrowsable(EditorBrowsableState.Never)] - public void SetImageBasedLightSource(string diffuse, string specular, float scaleFactor) + public void SetImageBasedLightSource(string diffuse, string specular, float scaleFactor = 1.0f) { Interop.ModelView.SetImageBasedLightSource(SwigCPtr, diffuse, specular, scaleFactor); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -- 2.7.4