Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ActorSkeletalAnimationPlayer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/world/actor/SkeletalHierarchyIndex.h"
8#include "mc/world/actor/animation/ActorAnimationPlayer.h"
9#include "mc/world/actor/animation/ActorAnimationType.h"
10#include "mc/world/actor/animation/ActorSkeletalAnimationPtr.h"
11
12// auto generated forward declare list
13// clang-format off
16class BoneOrientation;
17class ExpressionNode;
18class RenderParams;
19struct AnimationVisitor;
21// clang-format on
22
23class ActorSkeletalAnimationPlayer : public ::ActorAnimationPlayer {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 16, ::ActorSkeletalAnimationPtr> mAnimationData;
28 ::ll::TypedStorage<8, 24, ::std::vector<::BoneAnimationPlayer>> mBoneAnimationPlayers;
29 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SkeletalHierarchyIndex, ::std::vector<int>>> mBoneToPartMapping;
30 ::ll::TypedStorage<8, 8, ::std::unordered_map<::HashedString, ::HashedString> const*> mActorParticleEffectMap;
31 ::ll::TypedStorage<8, 8, ::std::unordered_map<::HashedString, ::std::string> const*> mActorSoundEffectMap;
32 ::ll::TypedStorage<4, 4, float> mAnimTime;
33 ::ll::TypedStorage<4, 4, float> mLastAnimTime;
34 ::ll::TypedStorage<4, 4, float> mStartDelay;
35 // NOLINTEND
36
37#ifdef LL_PLAT_S
38#else // LL_PLAT_C
39public:
40 // prevent constructor by default
41 ActorSkeletalAnimationPlayer();
42
43#endif
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual void applyToPose(
48 ::ApplyAnimationContext const& applyContext,
49 ::RenderParams& renderParams,
50 ::std::unordered_map<::SkeletalHierarchyIndex, ::std::vector<::BoneOrientation>>& destBoneOrientationMap,
51 float blendWeight
52 ) /*override*/;
53
54 virtual void resetAnimation() /*override*/;
55
56 virtual void buildBoneToPartMapping(::AnimationComponent& animationComponent) /*override*/;
57
58 virtual void bindParticleEffects(
59 ::std::unordered_map<::HashedString, ::HashedString> const& actorParticleEffectMap
60 ) /*override*/;
61
62 virtual void
63 bindSoundEffects(::std::unordered_map<::HashedString, ::std::string> const& actorSoundEffectMap) /*override*/;
64
65 virtual bool hasAnimationFinished() const /*override*/;
66
67 virtual ::std::shared_ptr<::ActorAnimationPlayer> findAnimation(::HashedString const&) /*override*/;
68
69 virtual ::ActorAnimationType getAnimationType() const /*override*/;
70
71 virtual ::HashedString const& getRawName() const /*override*/;
72
73 virtual void visit(::AnimationVisitor&& dispatcher) /*override*/;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
79#ifdef LL_PLAT_C
80 MCNAPI ActorSkeletalAnimationPlayer(
81 ::HashedString const& friendlyName,
82 ::ActorSkeletalAnimationPtr animationData,
83 ::AnimationComponent& animationComponent,
84 ::ExpressionNode const& blendExpression
85 );
86
87 MCNAPI void _fireSoundEvents(::RenderParams& renderParams);
88#endif
89
90 MCNAPI void _setDefaultPose(
91 ::RenderParams& renderParams,
92 ::std::unordered_map<::SkeletalHierarchyIndex, ::std::vector<::BoneOrientation>>& destBoneOrientationMap
93 ) const;
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99#ifdef LL_PLAT_C
100 MCNAPI void* $ctor(
101 ::HashedString const& friendlyName,
102 ::ActorSkeletalAnimationPtr animationData,
103 ::AnimationComponent& animationComponent,
104 ::ExpressionNode const& blendExpression
105 );
106#endif
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112 MCNAPI void $applyToPose(
113 ::ApplyAnimationContext const& applyContext,
114 ::RenderParams& renderParams,
115 ::std::unordered_map<::SkeletalHierarchyIndex, ::std::vector<::BoneOrientation>>& destBoneOrientationMap,
116 float blendWeight
117 );
118
119 MCNAPI void $resetAnimation();
120
121 MCNAPI void $buildBoneToPartMapping(::AnimationComponent& animationComponent);
122
123 MCNAPI void
124 $bindParticleEffects(::std::unordered_map<::HashedString, ::HashedString> const& actorParticleEffectMap);
125
126 MCNAPI void $bindSoundEffects(::std::unordered_map<::HashedString, ::std::string> const& actorSoundEffectMap);
127
128 MCNAPI bool $hasAnimationFinished() const;
129
130 MCNAPI ::std::shared_ptr<::ActorAnimationPlayer> $findAnimation(::HashedString const&);
131
132 MCNAPI ::ActorAnimationType $getAnimationType() const;
133
134 MCNAPI ::HashedString const& $getRawName() const;
135
136 MCNAPI void $visit(::AnimationVisitor&& dispatcher);
137
138
139 // NOLINTEND
140};
Definition ActorAnimationPlayer.h:20
MCAPI void $visit(::AnimationVisitor &&dispatcher)
MCAPI::HashedString const & $getRawName() const
MCAPI bool $hasAnimationFinished() const
MCAPI void $buildBoneToPartMapping(::AnimationComponent &animationComponent)
MCAPI::ActorAnimationType $getAnimationType() const
MCAPI void $applyToPose(::ApplyAnimationContext const &applyContext, ::RenderParams &renderParams, ::std::unordered_map<::SkeletalHierarchyIndex, ::std::vector<::BoneOrientation > > &destBoneOrientationMap, float blendWeight)
MCAPI void _setDefaultPose(::RenderParams &renderParams, ::std::unordered_map<::SkeletalHierarchyIndex, ::std::vector<::BoneOrientation > > &destBoneOrientationMap) const
MCAPI void $bindSoundEffects(::std::unordered_map<::HashedString, ::std::string > const &actorSoundEffectMap)
MCAPI ::std::shared_ptr<::ActorAnimationPlayer > $findAnimation(::HashedString const &)
MCAPI void $bindParticleEffects(::std::unordered_map<::HashedString, ::HashedString > const &actorParticleEffectMap)
Definition ActorSkeletalAnimationPtr.h:15
Definition AnimationComponent.h:38
Definition ApplyAnimationContext.h:16
Definition BoneOrientation.h:16
Definition ExpressionNode.h:35
Definition HashedString.h:5
Definition RenderParams.h:29
Definition AnimationVisitor.h:16
Definition BoneAnimationPlayer.h:10