3 * Copyright(c) 2023 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 using System.ComponentModel;
21 using System.Collections.Generic;
24 namespace Tizen.NUI.Scene3D
27 /// Index of Transform feature.
28 /// Each TransformTypes has their own matched MotionValue type.
30 [EditorBrowsable(EditorBrowsableState.Never)]
31 public class MotionTransformIndex : MotionIndex
34 /// The list of component types what this MotionIndex can control.
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names")]
38 public enum TransformTypes
41 /// The position of ModelNode. MotionValue should be Vector3.
43 [EditorBrowsable(EditorBrowsableState.Never)]
47 /// The x position of ModelNode. MotionValue should be float.
49 [EditorBrowsable(EditorBrowsableState.Never)]
53 /// The y position of ModelNode. MotionValue should be float.
55 [EditorBrowsable(EditorBrowsableState.Never)]
59 /// The z position of ModelNode. MotionValue should be float.
61 [EditorBrowsable(EditorBrowsableState.Never)]
65 /// The orientation of ModelNode. MotionValue should be Rotation.
67 [EditorBrowsable(EditorBrowsableState.Never)]
71 /// The scale of ModelNode. MotionValue should be Vector3.
73 [EditorBrowsable(EditorBrowsableState.Never)]
77 /// The x scale of ModelNode. MotionValue should be float.
79 [EditorBrowsable(EditorBrowsableState.Never)]
83 /// The y scale of ModelNode. MotionValue should be float.
85 [EditorBrowsable(EditorBrowsableState.Never)]
89 /// The z scale of ModelNode. MotionValue should be float.
91 [EditorBrowsable(EditorBrowsableState.Never)]
96 /// Create an initialized motion index.
98 [EditorBrowsable(EditorBrowsableState.Never)]
99 public MotionTransformIndex()
104 /// The component type what this MotionIndex want to control.
106 [EditorBrowsable(EditorBrowsableState.Never)]
107 public TransformTypes TransformType { get; set; } = TransformTypes.Position;
110 /// Get uniform name of TransformType.
112 [EditorBrowsable(EditorBrowsableState.Never)]
113 internal override string GetPropertyName(ModelNode node)
115 switch (TransformType)
117 case TransformTypes.Position:
121 case TransformTypes.PositionX:
125 case TransformTypes.PositionY:
129 case TransformTypes.PositionZ:
133 case TransformTypes.Orientation:
135 return "Orientation";
137 case TransformTypes.Scale:
141 case TransformTypes.ScaleX:
145 case TransformTypes.ScaleY:
149 case TransformTypes.ScaleZ: