[NUI] Add documentation for Scene3D
authorseungho <sbsh.baek@samsung.com>
Tue, 20 Sep 2022 05:59:56 +0000 (14:59 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 21 Sep 2022 05:52:33 +0000 (14:52 +0900)
Signed-off-by: seungho <sbsh.baek@samsung.com>
src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs
src/Tizen.NUI.Scene3D/src/public/Controls/SceneView.cs

index b763fa2..2ff3a0b 100755 (executable)
@@ -35,12 +35,20 @@ namespace Tizen.NUI.Scene3D
     /// The Animations defined in the glTF or DLI are also loaded and can be retrieved by using <see cref="GetAnimation(uint)"/> and <see cref="GetAnimation(string)"/> methods.
     /// The number of animation is also retrieved by GetAnimationCount() method.
     ///
+    /// Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL).
+    /// For the IBL, two cube map textures(diffuse and specular) are required.
+    /// Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts.
+    /// And also, ktx format with cube map is supported.
+    ///
+    /// The model and IBL textures start to be loaded asynchronously when the Model object is on Window.
+    /// ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed.
+    /// If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded.
+    /// <see cref="GetAnimation(uint)"/> and <see cref="GetAnimation(string)"/> methods can be used after the model loading is finished.
+    ///
     /// By default, the loaded mesh has its own size and <see cref="PivotPoint"/> inferred from position of vertices.
+    /// The <see cref="PivotPoint"/> can be modified after model loading is finished.
     /// If user set size property, the mesh will be scaled to the input size.
     /// Default value of <see cref="ParentOrigin"/> of the Model is Center.
-    ///
-    /// The model starts to be loaded synchronously when the Model object is on Window.
-    /// So, <see cref="GetAnimation(uint)"/> and <see cref="GetAnimation(string)"/> methods should be called after the Model object is added on Window.
     /// </remarks>
     ///
     /// <example>
@@ -49,15 +57,20 @@ namespace Tizen.NUI.Scene3D
     /// {
     ///     Size = new Size(width, height),
     /// };
+    /// model.ResourcesLoaded += (s, e) =>
+    /// {
+    ///     model.PivotPoint = new Vector3(0.5f, 0.5f, 0.5f); // Use center as a Pivot.
+    ///
+    ///     int animationCount = model.GetAnimationCount();
+    ///     if(animationCount > 0)
+    ///     {
+    ///         // Play an Animation of index 0.
+    ///         model.GetAnimation(0).Play();
+    ///     }
+    /// };
     /// model.SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor);
     /// window.Add(model);
     ///
-    /// int animationCount = model.GetAnimationCount();
-    /// if(animationCount > 0)
-    /// {
-    ///     // Play an Animation of index 0.
-    ///     model.GetAnimation(0).Play();
-    /// }
     /// </code>
     /// </example>
     /// <since_tizen> 10 </since_tizen>
index d5244dc..4c38608 100755 (executable)
@@ -51,9 +51,15 @@ namespace Tizen.NUI.Scene3D
     /// The Camera's FieldOfView is vertical fov. The horizontal fov is updated internally according to the SceneView size.
     ///
     /// The <see cref="SetImageBasedLightSource(string, string, float)"/> method sets the same IBL to all Model objects added to the SceneView.
+    /// For the IBL, two cube map textures(diffuse and specular) are required.
+    /// SceneView supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts.
+    /// And also, ktx format with cube map is supported.
     /// If a model already has an IBL, it is batch overridden with the IBL of the SceneView.
     /// If the SceneView has IBL, the IBL of newly added models is also overridden.
     ///
+    /// The IBL textures start to be loaded asynchronously when <see cref="SetImageBasedLightSource(string, string, float)"/> method is called.
+    /// ResourcesLoaded signal notifies that the loading of the IBL resources have been completed.
+    ///
     /// SceneView provides an option to use FBO for rendering result with <see cref="UseFramebuffer"/> property.
     /// If it is false, SceneView is always drawn in the form of a rectangle on the default window surface directly.
     /// It improves performance, but the SceneView is always drawn on top of other 2D objects regardless of rendering order.