2 * Copyright(c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
20 using Tizen.NUI.Scene3D;
22 namespace Tizen.AIAvatar
24 [EditorBrowsable(EditorBrowsableState.Never)]
25 internal class JointTransformer
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public JointTransformer()
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public void Init(Animation animation)
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 public void Play(IAnimationModuleData data)
42 [EditorBrowsable(EditorBrowsableState.Never)]
47 [EditorBrowsable(EditorBrowsableState.Never)]
52 [EditorBrowsable(EditorBrowsableState.Never)]
57 private void SetJointMotion(AvatarProperties properties, JointType jointType, MotionTransformIndex.TransformTypes type, Rotation rotation)
59 var motionTransform = new AvatarJointTransformIndex(properties.JointMapper, jointType, type);
60 var motionData = new MotionData();
65 //TODO : Tizen_7.0에 pitch, yaw, roll patch 추가하기
66 //PropertyValue = new PropertyValue(new Rotation(new Radian(pitch), new Radian(yaw), new Radian(roll))),
69 //avatar.SetMotionData(motionData);
72 private void SetJointMotion(string keyValue, float pitch, float yaw, float roll)
74 var motionData = new MotionData();
76 new MotionTransformIndex()
78 ModelNodeId = new PropertyKey(keyValue),
79 TransformType = MotionTransformIndex.TransformTypes.Orientation,
83 //TODO : Tizen_7.0에 pitch, yaw, roll patch 추가하기
84 //PropertyValue = new PropertyValue(new Rotation(new Radian(pitch), new Radian(yaw), new Radian(roll))),
87 //avatar.SetMotionData(motionData);
90 private void SetJointMotion(string keyValue, MotionTransformIndex.TransformTypes type, Rotation rotation)
92 var motionData = new MotionData();
94 new MotionTransformIndex()
96 ModelNodeId = new PropertyKey(keyValue),
101 PropertyValue = new PropertyValue(rotation),
104 //avatar.SetMotionData(motionData);