Skylicht Engine
Loading...
Searching...
No Matches
CAnimationTransformData.h
1/*
2!@
3MIT License
4
5Copyright (c) 2019 Skylicht Technology CO., LTD
6
7Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
8(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
9merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20This file is part of the "Skylicht Engine".
21https://github.com/skylicht-lab/skylicht-engine
22!#
23*/
24
25#pragma once
26
27#include "Entity/IEntityData.h"
28
29#include "Animation/CAnimationTrack.h"
30#include "Transform/CWorldTransformData.h"
31#include "RenderMesh/CJointData.h"
32
33namespace Skylicht
34{
37 class SKYLICHT_API CAnimationTransformData : public IEntityData
38 {
39 public:
41 std::string Name;
42
44 int ID;
45
48
50 int Depth;
51
53 int BoneID;
54
57
59 float Weight;
60
62 core::vector3df DefaultPosition;
63
65 core::vector3df DefaultScale;
66
68 core::quaternion DefaultRotation;
69
71 core::vector3df AnimPosition;
72
74 core::vector3df AnimScale;
75
77 core::quaternion AnimRotation;
78
81
84
85 public:
86 CAnimationTransformData();
87
88 virtual ~CAnimationTransformData();
89
94 };
95
96 DECLARE_PUBLIC_DATA_TYPE_INDEX(CAnimationTransformData);
97}
Handles interpolation and data retrieval for a single animation track.
Definition CAnimationTrack.h:173
ECS data component that holds animation and transform state for an entity within a skeleton.
Definition CAnimationTransformData.h:38
core::quaternion DefaultRotation
Default local rotation when no animation is playing.
Definition CAnimationTransformData.h:68
bool DisableAnimation
If true, animation evaluation is skipped for this entity.
Definition CAnimationTransformData.h:56
int ParentID
ID of the parent entity (-1 for root).
Definition CAnimationTransformData.h:47
int ID
Internal entity ID.
Definition CAnimationTransformData.h:44
core::vector3df DefaultPosition
Default local position when no animation is playing.
Definition CAnimationTransformData.h:62
float Weight
Blending weight for this specific bone.
Definition CAnimationTransformData.h:59
int BoneID
Index of the bone in the hardware skinning buffer.
Definition CAnimationTransformData.h:53
std::string Name
Name of the bone or joint.
Definition CAnimationTransformData.h:41
core::vector3df AnimScale
Calculated local scale from the animation track.
Definition CAnimationTransformData.h:74
void updateTransform()
Updates the relative matrix in WorldTransform using AnimPosition, AnimScale, and AnimRotation.
CAnimationTrack AnimationTrack
The animation track evaluator for this entity.
Definition CAnimationTransformData.h:83
core::vector3df DefaultScale
Default local scale when no animation is playing.
Definition CAnimationTransformData.h:65
CWorldTransformData * WorldTransform
Pointer to the world transform ECS data for this entity.
Definition CAnimationTransformData.h:80
core::quaternion AnimRotation
Calculated local rotation from the animation track.
Definition CAnimationTransformData.h:77
core::vector3df AnimPosition
Calculated local position from the animation track.
Definition CAnimationTransformData.h:71
int Depth
Hierarchy depth (0 for root).
Definition CAnimationTransformData.h:50
Definition CWorldTransformData.h:32
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29