From: Eunki, Hong Date: Fri, 4 Aug 2023 06:57:27 +0000 (+0900) Subject: [NUI] Public open MotionData X-Git-Tag: submit/tizen/20230905.134715~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95133e7af4a9e9ced54a7b69a323e835481edb6a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Public open MotionData Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs index b3aff7783..484a7dde8 100755 --- a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs +++ b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs @@ -513,10 +513,9 @@ namespace Tizen.NUI.Scene3D /// Generate animation by MotionData. /// If there is no animatable item for MotionData, return null. /// - /// Inputed list of pair of MotionIndex and MotionValue, and duration. - /// Generated animation by input motion data, or null if there is no animatable item exist about inputed motionData - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] + /// Source motion data. + /// Generated animation from then given motion data, or null if there is no animatable item in + /// 11 public Animation GenerateMotionDataAnimation(MotionData motionData) { global::System.IntPtr cPtr = Interop.Model.GenerateMotionDataAnimation(SwigCPtr, MotionData.getCPtr(motionData)); @@ -546,13 +545,12 @@ namespace Tizen.NUI.Scene3D } /// - /// Prototype of MotionData setter. - /// Note that this API didn't apply KeyFrames animation. + /// Set values from MotionData. + /// Note that this method doesn not apply KeyFrames animation. /// If you want to apply the animation, please use and play the result. /// - /// Inputed list of pair of MotionIndex and MotionValue. - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] + /// Source motion data. + /// 11 public void SetMotionData(MotionData motionData) { Interop.Model.SetMotionData(SwigCPtr, MotionData.getCPtr(motionData)); diff --git a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionData.cs b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionData.cs index 6769d07eb..26f8a4c9a 100644 --- a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionData.cs +++ b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionData.cs @@ -26,8 +26,13 @@ namespace Tizen.NUI.Scene3D /// List of model motion definitions. /// Each motion has pair of and . /// MotionIndex is abstract class that specify the target of motion. - /// MotionValue is target value of motion. It can be KeyFrames. - /// + /// MotionValue is destination value of target for the motion. It can be expressed with or . + /// + /// + /// We don't check duplicated MotionIndex internally. + /// We don't check MotionValue type is matched with MotionIndex. + /// + /// /// We can generate list of motions by MotionIndex and MotionValue classes. /// /// @@ -47,7 +52,8 @@ namespace Tizen.NUI.Scene3D /// // Make MotionIndex with BlendShapeIndex /// motionData.Add(new BlendShapeIndex(new PropertyKey("nodeName"), new PropertyKey("blendShapeName")), motionData.GetValue(1u)); /// - /// + /// + /// /// We can request to load MotionData from file or buffer asynchronously. /// If load completed, event will be invoked. /// If we try to load before LoadCompleted event invoked, previous load request cancel and only latest request loaded. @@ -65,7 +71,8 @@ namespace Tizen.NUI.Scene3D /// /// Do something. /// } /// - /// + /// + /// /// We can generate animation of Scene3D.Model from MotionData class. /// Or, just set values. /// @@ -77,12 +84,8 @@ namespace Tizen.NUI.Scene3D /// // Set values from loaded Model. /// model2.SetMotionData(motionData); /// - /// - /// - /// We don't check duplicated MotionIndex internally. - /// We don't check MotionValue type is matched with MotionIndex. - /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// + /// 11 public class MotionData : BaseHandle { private EventHandler loadCompletedEventHandler; @@ -91,9 +94,9 @@ namespace Tizen.NUI.Scene3D private delegate void LoadCompletedCallbackType(IntPtr motionData); /// - /// Create an initialized motion data. + /// Create an initialized, empty motion data. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionData() : this(Interop.MotionData.MotionDataNew(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -102,9 +105,9 @@ namespace Tizen.NUI.Scene3D /// /// Create an initialized motion data with duration. /// - /// Duration of this motion data when it be generated as Animation in milliseconds. - [EditorBrowsable(EditorBrowsableState.Never)] - public MotionData(int durationMilliSeconds) : this(Interop.MotionData.MotionDataNew(MilliSecondsToSeconds(durationMilliSeconds)), true) + /// Duration of an Animation generated from this motion data, in milliseconds. + /// 11 + public MotionData(int durationMilliseconds) : this(Interop.MotionData.MotionDataNew(MillisecondsToSeconds(durationMilliseconds)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -113,7 +116,7 @@ namespace Tizen.NUI.Scene3D /// Copy constructor. /// /// Source object to copy. - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionData(MotionData motionData) : this(Interop.MotionData.NewMotionData(MotionData.getCPtr(motionData)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -136,26 +139,26 @@ namespace Tizen.NUI.Scene3D } /// - /// Get or set the duration of this motion data in milliseconds. + /// Get or set the duration of this motion data in milliseconds. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public int Duration { get { - return SecondsToMilliSeconds(GetDuration()); + return SecondsToMilliseconds(GetDuration()); } set { - SetDuration(MilliSecondsToSeconds(value)); + SetDuration(MillisecondsToSeconds(value)); } } /// - /// Get the number of MotionIndex / MotionValue pair list what this hold. + /// Get the number of contained MotionIndex / MotionValue pair what this hold. /// - /// The number of motions what this hold. - [EditorBrowsable(EditorBrowsableState.Never)] + /// The number of contained motions. + /// 11 public uint GetMotionCount() { uint ret = Interop.MotionData.GetMotionCount(SwigCPtr); @@ -164,11 +167,11 @@ namespace Tizen.NUI.Scene3D } /// - /// Append pair of MotionIndex and MotionValue end of list. + /// Append pair of MotionIndex and MotionValue to the list. /// /// MotionIndex to be added /// MotionValue to be added - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void Add(MotionIndex index, MotionValue value) { Interop.MotionData.Add(SwigCPtr, MotionIndex.getCPtr(index), MotionValue.getCPtr(value)); @@ -176,11 +179,11 @@ namespace Tizen.NUI.Scene3D } /// - /// Get MotionIndex at index'th. null if invalid index inputed + /// Get MotionIndex at position, or null if invalid index was given. /// /// The index of motion data list - /// The index'th MotionIndex. Or empty handle that doesn't have body - [EditorBrowsable(EditorBrowsableState.Never)] + /// The MotionIndex at position. Or null. + /// 11 public MotionIndex GetIndex(uint index) { IntPtr cPtr = Interop.MotionData.GetIndex(SwigCPtr, index); @@ -198,15 +201,21 @@ namespace Tizen.NUI.Scene3D handle = new HandleRef(null, IntPtr.Zero); } if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + if (!ret.HasBody()) + { + ret.Dispose(); + ret = null; + } return ret; } /// - /// Get MotionValue at index'th. null if invalid index inputed + /// Get MotionValue at position, or null if invalid index was given. /// /// The index of motion data list - /// The index'th MotionValue. Or empty handle that doesn't have body - [EditorBrowsable(EditorBrowsableState.Never)] + /// The MotionValue at position. Or null. + /// 11 public MotionValue GetValue(uint index) { IntPtr cPtr = Interop.MotionData.GetValue(SwigCPtr, index); @@ -224,22 +233,29 @@ namespace Tizen.NUI.Scene3D handle = new HandleRef(null, IntPtr.Zero); } if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + if (!ret.HasBody()) + { + ret.Dispose(); + ret = null; + } return ret; } /// /// Load motion capture animation. - /// Scale is additional scale factor of motion capture animation. It is possible that - /// Model's scale may not matched with motion capture animation scale. - /// If scale is null, default use as Vector3.ONE /// We support bvh format. - /// After load completed, event will be invoked. + /// After load completes, event will be invoked. /// + /// + /// Scale is additional scale factor of motion capture animation. It is possible that + /// Model's scale may not match with motion capture animation scale. + /// If scale is null, default value will be used: + /// /// Name of motion capture format file. /// Scale value of motion capture animation match with model. /// Load synchronously or not. Default is async load. - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void LoadMotionCaptureAnimation(string motionCaptureFilename, Vector3 scale = null, bool synchronousLoad = false) { Interop.MotionData.LoadMotionCaptureAnimation(SwigCPtr, motionCaptureFilename, Vector3.getCPtr(scale), synchronousLoad); @@ -247,18 +263,19 @@ namespace Tizen.NUI.Scene3D } /// - /// Load motion capture animation. - /// Scale is additional scale factor of motion capture animation. It is possible that - /// Model's scale may not matched with motion capture animation scale. - /// If scale is null, default use as Vector3.ONE + /// Load motion capture animation from string. /// We support bvh format. - /// After load completed, event will be invoked. + /// After load completes, event will be invoked. /// - /// Contents of motion capture format file. + /// + /// Scale is additional scale factor of motion capture animation. It is possible that + /// Model's scale may not match with motion capture animation scale. + /// If scale is null, default value will be used: + /// + /// Contents of motion capture format string. /// Scale value of motion capture animation match with model. /// Load synchronously or not. Default is async load. - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void LoadMotionCaptureAnimationFromBuffer(string motionCaptureBuffer, Vector3 scale = null, bool synchronousLoad = false) { Interop.MotionData.LoadMotionCaptureAnimationFromBuffer(SwigCPtr, motionCaptureBuffer, motionCaptureBuffer.Length, Vector3.getCPtr(scale), synchronousLoad); @@ -271,8 +288,7 @@ namespace Tizen.NUI.Scene3D /// /// Name of json format file what we predefined. /// Load synchronously or not. Default is async load. - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void LoadBlendShapeAnimation(string blendShapeFilename, bool synchronousLoad = false) { Interop.MotionData.LoadBlendShapeAnimation(SwigCPtr, blendShapeFilename, synchronousLoad); @@ -285,8 +301,7 @@ namespace Tizen.NUI.Scene3D /// /// Contents of json format file what we predefined. /// Load synchronously or not. Default is async load. - // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API) - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void LoadBlendShapeAnimationFromBuffer(string blendShapeBuffer, bool synchronousLoad = false) { Interop.MotionData.LoadBlendShapeAnimationFromBuffer(SwigCPtr, blendShapeBuffer, blendShapeBuffer.Length, synchronousLoad); @@ -297,7 +312,7 @@ namespace Tizen.NUI.Scene3D /// LoadCompleted event. /// It will be invoked only for latest load request. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public event EventHandler LoadCompleted { add @@ -331,9 +346,9 @@ namespace Tizen.NUI.Scene3D } /// - /// Clear all inputed values. + /// Removes all stored motions. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void Clear() { Interop.MotionData.Clear(SwigCPtr); @@ -353,12 +368,12 @@ namespace Tizen.NUI.Scene3D return ret; } - private static float MilliSecondsToSeconds(int millisec) + private static float MillisecondsToSeconds(int millisec) { return (float)millisec / 1000.0f; } - private static int SecondsToMilliSeconds(float sec) + private static int SecondsToMilliseconds(float sec) { return (int)(sec * 1000); } diff --git a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/BlendShapeIndex.cs b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/BlendShapeIndex.cs index de59586e9..3455953ff 100644 --- a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/BlendShapeIndex.cs +++ b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/BlendShapeIndex.cs @@ -26,9 +26,11 @@ namespace Tizen.NUI.Scene3D /// Specialized to control blend shape. /// We can control the blend shape by index (when we set BlendShapeId as IndexKey), /// or by name (when we set BlendShapeId as StringKey). - /// + /// + /// /// should be float type. - /// + /// + /// /// /// BlendShapeIndex blendShapeIndex0 = new BlendShapeIndex(new PropertyKey("nodeName"), new PropertyKey(0u)); /// BlendShapeIndex blendShapeIndex1 = new BlendShapeIndex(new PropertyKey("nodeName"), new PropertyKey("Target_1")); @@ -38,7 +40,8 @@ namespace Tizen.NUI.Scene3D /// blendShapeIndex2.ModelNodeId = new PropertyKey("nodeName"); /// blendShapeIndex2.BlendShapeId = new PropertyKey("Target_2"); /// - /// + /// + /// /// Specially, if ModelNodeId is invalid and BlendShapeId is StringKey, /// It will control all ModelNode that has the inputed blend shape name. /// @@ -50,42 +53,66 @@ namespace Tizen.NUI.Scene3D /// BlendShapeIndex blendShapeIndex0 = new BlendShapeIndex(new PropertyKey("node0"), new PropertyKey("Smile")); /// BlendShapeIndex blendShapeIndex1 = new BlendShapeIndex(new PropertyKey("node1"), new PropertyKey("Smile")); /// - /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// + /// 11 public class BlendShapeIndex : MotionIndex { /// /// Create an initialized blend shape index. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public BlendShapeIndex() : this(Interop.MotionIndex.BlendShapeIndexNew(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// - /// Create an initialized blend shape index with invalid node id, and input blend shape id. + /// Create an initialized blend shape index with invalid node ID, and given blend shape ID. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// Blend shape ID for this motion index + /// 11 public BlendShapeIndex(PropertyKey blendShapeId) : this(Interop.MotionIndex.BlendShapeIndexNew(PropertyKey.getCPtr(blendShapeId)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// - /// Create an initialized blend shape index with input node id, and input blend shape id. + /// Create an initialized blend shape index with given node ID and blend shape ID. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// Node ID for this motion index + /// Blend shape ID for this motion index + /// 11 public BlendShapeIndex(PropertyKey modelNodeId, PropertyKey blendShapeId) : this(Interop.MotionIndex.BlendShapeIndexNew(PropertyKey.getCPtr(modelNodeId), PropertyKey.getCPtr(blendShapeId)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Create an initialized blend shape index with invalid node ID, and given blend shape string ID. + /// + /// Blend shape string ID for this motion index + /// 11 + public BlendShapeIndex(string blendShapeName) : this(Interop.MotionIndex.BlendShapeIndexNew(PropertyKey.getCPtr(new PropertyKey(blendShapeName))), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Create an initialized blend shape index with given node string ID and blend shape string ID. + /// + /// Node string ID for this motion index + /// Blend shape string ID for this motion index + /// 11 + public BlendShapeIndex(string modelNodeName, string blendShapeName) : this(Interop.MotionIndex.BlendShapeIndexNew(PropertyKey.getCPtr(new PropertyKey(modelNodeName)), PropertyKey.getCPtr(new PropertyKey(blendShapeName))), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Copy constructor. /// /// Source object to copy. - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public BlendShapeIndex(BlendShapeIndex blendShapeIndex) : this(Interop.MotionIndex.NewBlendShapeIndex(BlendShapeIndex.getCPtr(blendShapeIndex)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -110,7 +137,7 @@ namespace Tizen.NUI.Scene3D /// /// The key of blend shape. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public PropertyKey BlendShapeId { get diff --git a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionIndex.cs b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionIndex.cs index 8d02401f9..641a72c44 100644 --- a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionIndex.cs +++ b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionIndex.cs @@ -24,32 +24,31 @@ namespace Tizen.NUI.Scene3D { /// /// Index of motion value. It will be used to specify the target of motion applied. - /// /// There are three kinds of MotionIndex : , and . - /// MotionPropertyIndex will be used for control whole kind of properties. + /// MotionPropertyIndex will be used for control all kind of properties. /// The loaded from files / buffer will have this kind of MotionIndex. - /// /// MotionTransformIndex will be used for control the 's Position / Orientation / Scale, or each components. /// BlendShapeIndex will be used for control some blend shape animation. - /// - /// We can use this class below cases - /// - ModelNodeId (string key) , MotionTransformIndex : Target is ModelNode's transform property - /// - ModelNodeId (int key) , MotionTransformIndex : Target is ModelNode's transform property [not implemented yet] - /// - ModelNodeId (string key) , BlendShapeIndex (int key) : Target is ModelNode's BlendShape - /// - ModelNodeId (string key) , BlendShapeIndex (string key) : Target is ModelNode's BlendShape - /// - ModelNodeId (int key) , BlendShapeIndex (int key) : Target is ModelNode's BlendShape [not implemented yet] - /// - ModelNodeId (int key) , BlendShapeIndex (string key) : Target is ModelNode's BlendShape [not implemented yet] - /// - ModelNodeId (null) , BlendShapeIndex (string key) : Target is all ModelNode's BlendShape - /// All other cases are invalid. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// + /// We can use below cases. + /// + /// + /// + /// + /// + /// + ///
ModelNodeId KeyTypeMotionIndex class Description
KeyType.String MotionTransformIndex Target is ModelNode's transform property
KeyType.String BlendShapeIndex (with BlendShapeId KeyType.Index) Target is ModelNode's BlendShape
KeyType.String BlendShapeIndex (with BlendShapeId KeyType.String)Target is ModelNode's BlendShape
(null) BlendShapeIndex (with BlendShapeId KeyType.String)Target is all ModelNode's BlendShape
+ /// All other cases are invalid. + ///
+ /// 11 public class MotionIndex : BaseHandle { /// /// Copy constructor. /// /// Source object to copy. - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionIndex(MotionIndex motionIndex) : this(Interop.MotionIndex.NewMotionIndex(MotionIndex.getCPtr(motionIndex)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -72,9 +71,9 @@ namespace Tizen.NUI.Scene3D } /// - /// The id of ModelNode. If you want to apply to all ModelNodes who has BlendShape string, let this value as null. + /// The ID of ModelNode. If you want to apply to all ModelNodes who has BlendShape string, assign null. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public PropertyKey ModelNodeId { get diff --git a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionPropertyIndex.cs b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionPropertyIndex.cs index f892c353b..4d30b4ad4 100644 --- a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionPropertyIndex.cs +++ b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionPropertyIndex.cs @@ -23,7 +23,7 @@ using Tizen.NUI; namespace Tizen.NUI.Scene3D { /// - /// Basic to control Dali's Property. + /// Basic to control Property. /// It can control more general case. /// /// @@ -42,32 +42,45 @@ namespace Tizen.NUI.Scene3D /// /// /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public class MotionPropertyIndex : MotionIndex { /// - /// Create an initialized blend shape index. + /// Create an initialized motion property index. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionPropertyIndex() : this(Interop.MotionIndex.MotionPropertyIndexNew(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// - /// Create an initialized blend shape index with input node id, and property id. + /// Create an initialized motion property index with given node ID and property ID. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// Node ID for this motion index + /// Property ID for this motion index + /// 11 public MotionPropertyIndex(PropertyKey modelNodeId, PropertyKey propertyId) : this(Interop.MotionIndex.MotionPropertyIndexNew(PropertyKey.getCPtr(modelNodeId), PropertyKey.getCPtr(propertyId)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Create an initialized motion property index with given node string ID and property string ID. + /// + /// Node string ID for this motion index + /// Property string ID for this motion index + /// 11 + public MotionPropertyIndex(string modelNodeName, string propertyName) : this(Interop.MotionIndex.MotionPropertyIndexNew(PropertyKey.getCPtr(new PropertyKey(modelNodeName)), PropertyKey.getCPtr(new PropertyKey(propertyName))), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Copy constructor. /// /// Source object to copy. - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionPropertyIndex(MotionPropertyIndex motionPropertyIndex) : this(Interop.MotionIndex.NewMotionPropertyIndex(MotionPropertyIndex.getCPtr(motionPropertyIndex)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -92,7 +105,7 @@ namespace Tizen.NUI.Scene3D /// /// The key of property /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public PropertyKey PropertyId { get diff --git a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionTransformIndex.cs b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionTransformIndex.cs index 930df04e7..b9c5a0ddb 100644 --- a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionTransformIndex.cs +++ b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionIndex/MotionTransformIndex.cs @@ -24,11 +24,12 @@ namespace Tizen.NUI.Scene3D { /// /// Specialized to control transform. - /// It will be used when app developer don't care about Property index list, + /// It will be used when app developer doesn't care about Property index list, /// but want to change the transform properties anyway fast enough. - /// - /// Each TransformTypes has their own matched type. /// + /// + /// Each TransformTypes has their own matched type. + /// /// /// /// MotionTransformIndex position = new MotionTransformIndex(new PropertyKey("nodeName"), MotionTransformIndex.TransformTypes.Position); @@ -39,101 +40,113 @@ namespace Tizen.NUI.Scene3D /// orientation.TransformType = MotionTransformIndex.TransformTypes.Orientation; /// /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public class MotionTransformIndex : MotionIndex { /// - /// The list of component types what this MotionIndex can control. + /// The list of transform property types what this MotionTransformIndex can control. /// - [EditorBrowsable(EditorBrowsableState.Never)] - [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names")] + /// 11 public enum TransformTypes { /// /// Invalid type. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 Invalid = -1, /// /// The position of ModelNode. MotionValue should be Vector3. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 Position = 0, /// /// The x position of ModelNode. MotionValue should be float. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 PositionX, /// /// The y position of ModelNode. MotionValue should be float. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 PositionY, /// /// The z position of ModelNode. MotionValue should be float. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 PositionZ, /// /// The orientation of ModelNode. MotionValue should be Rotation. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 Orientation, /// /// The scale of ModelNode. MotionValue should be Vector3. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 Scale, /// /// The x scale of ModelNode. MotionValue should be float. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 ScaleX, /// /// The y scale of ModelNode. MotionValue should be float. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 ScaleY, /// /// The z scale of ModelNode. MotionValue should be float. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 ScaleZ, } /// - /// Create an initialized blend shape index. + /// Create an initialized motion transform index. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionTransformIndex() : this(Interop.MotionIndex.MotionTransformIndexNew(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// - /// Create an initialized blend shape index with input node id, and transform type. + /// Create an initialized motion transform index with given node ID and transform type. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// Node ID for this motion index + /// Transform property type for this motion index + /// 11 public MotionTransformIndex(PropertyKey modelNodeId, TransformTypes transformType) : this(Interop.MotionIndex.MotionTransformIndexNew(PropertyKey.getCPtr(modelNodeId), (int)transformType), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Create an initialized motion transform index with given node string ID, and transform type. + /// + /// Node string ID for this motion index + /// Transform property type for this motion index + /// 11 + public MotionTransformIndex(string modelNodeName, TransformTypes transformType) : this(Interop.MotionIndex.MotionTransformIndexNew(PropertyKey.getCPtr(new PropertyKey(modelNodeName)), (int)transformType), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Copy constructor. /// /// Source object to copy. - [EditorBrowsable(EditorBrowsableState.Never)] - public MotionTransformIndex(BlendShapeIndex motionTransformIndex) : this(Interop.MotionIndex.NewMotionTransformIndex(MotionTransformIndex.getCPtr(motionTransformIndex)), true) + /// 11 + public MotionTransformIndex(MotionTransformIndex motionTransformIndex) : this(Interop.MotionIndex.NewMotionTransformIndex(MotionTransformIndex.getCPtr(motionTransformIndex)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -155,9 +168,9 @@ namespace Tizen.NUI.Scene3D } /// - /// The component type what this MotionIndex want to control. + /// The transform property type what this MotionIndex want to control. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public TransformTypes TransformType { get diff --git a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionValue.cs b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionValue.cs index f9a16275b..45cb8dabe 100644 --- a/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionValue.cs +++ b/src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionValue.cs @@ -24,47 +24,46 @@ using Tizen.NUI; namespace Tizen.NUI.Scene3D { /// - /// This MotionValue be used for target value of each . + /// This MotionValue will be used for target value of each . /// We can get and set MotionValue as 2 types : PropertyValue and KeyFrames. - /// - /// Each types will be cross-converted internally. - /// For example, when we set PropertyValue, we can get KeyFrames with 2 frames, and target value is set. /// /// + /// Each type will be cross-converted internally. + /// For example, when we set PropertyValue, we can get KeyFrames with 2 frames, and target value is set. /// The type of property should be matched with MotionIndex required. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public class MotionValue : BaseHandle { /// /// Determine whether current stored value is PropertyValue, or KeyFrames. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public enum ValueType { /// /// Value is null, or invalid class. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 Invalid = -1, /// /// Value is PropertyValue. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 Property = 0, /// /// Value is KeyFrames. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 KeyFrames, } /// - /// Create an initialized motion value with invalid. + /// Create an initialized invalid motion value. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionValue() : this(Interop.MotionValue.MotionValueNew(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -73,7 +72,8 @@ namespace Tizen.NUI.Scene3D /// /// Create an initialized motion value with PropertyValue. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// PropertyValue for this motion value + /// 11 public MotionValue(PropertyValue propertyValue) : this(Interop.MotionValue.MotionValueNewPropertyValue(PropertyValue.getCPtr(propertyValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -82,7 +82,8 @@ namespace Tizen.NUI.Scene3D /// /// Create an initialized motion value with KeyFrames. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// KeyFrameValue for this motion value + /// 11 public MotionValue(KeyFrames keyFrames) : this(Interop.MotionValue.MotionValueNewKeyFrames(KeyFrames.getCPtr(keyFrames)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -92,7 +93,7 @@ namespace Tizen.NUI.Scene3D /// Copy constructor. /// /// Source object to copy. - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public MotionValue(MotionValue motionValue) : this(Interop.MotionValue.NewMotionValue(MotionValue.getCPtr(motionValue)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -116,10 +117,10 @@ namespace Tizen.NUI.Scene3D /// - /// Get or set the value as PropertyValue type. - /// If ValueType is ValueType.KeyFrames, it will return last value of stored KeyFrames. + /// Get or set the PropertyValue. + /// If Type is ValueType.KeyFrames, getter will return last PropertyValue instance of stored KeyFrames. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public PropertyValue PropertyValue { get @@ -133,10 +134,10 @@ namespace Tizen.NUI.Scene3D } /// - /// Get or set the value as KeyFrames type. - /// If ValueType is ValueType.PropertyValue, it will create new KeyFrames by stored PropertyValue. + /// Get or set the KeyFrames. + /// If Type is ValueType.PropertyValue, getter will create new KeyFrames from stored PropertyValue. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public KeyFrames KeyFramesValue { get @@ -150,9 +151,9 @@ namespace Tizen.NUI.Scene3D } /// - /// Get the type of value what we set. + /// Get the type of value which we set. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public ValueType Type { get @@ -162,9 +163,9 @@ namespace Tizen.NUI.Scene3D } /// - /// Invalidate the value what we set. + /// Invalidate the value which we set. /// - [EditorBrowsable(EditorBrowsableState.Never)] + /// 11 public void Invalidate() { Interop.MotionValue.Clear(SwigCPtr);