Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
SkeletalMeshActor.h
Go to the documentation of this file.
1#pragma once
6
7#include <glm/gtc/quaternion.hpp>
8#include <string>
9#include <vector>
10
11namespace Engine::Entities
12{
16 class SkeletalMeshActor : public Actor
17 {
18 public:
20 const SpawnContext & context,
21 Asset::MeshPath meshPath
22 );
23
27 glm::vec3 getBonePosition(const std::string& boneName) const;
28
32 glm::quat getBoneRotation(const std::string& boneName) const;
33
37 glm::vec3 getBoneScale(const std::string& boneName) const;
38
42 void setBonePosition(const std::string& boneName, const glm::vec3& position);
43
47 void setBoneRotation(const std::string& boneName, const glm::quat& rotation);
48
52 void setBoneScale(const std::string& boneName, const glm::vec3& scale);
53
58
63
64 private:
65 int32_t resolveBone(const std::string& boneName) const;
68
70 std::vector<Animation::AnimationEvaluator::JointPose> currentPoses_;
71 bool posesInitialized_ = false;
72 };
73} // namespace EngineCore
Skeleton definition loaded from glTF skin data.
Definition SkinAsset.h:30
A component which can be attached as many times to an actor as one wants. It makes it possible to ren...
Actor(const SpawnContext &context)
void setBonePosition(const std::string &boneName, const glm::vec3 &position)
Setter.
std::vector< Animation::AnimationEvaluator::JointPose > currentPoses_
int32_t resolveBone(const std::string &boneName) const
SkeletalMeshActor(const SpawnContext &context, Asset::MeshPath meshPath)
glm::quat getBoneRotation(const std::string &boneName) const
Getter.
void setBoneScale(const std::string &boneName, const glm::vec3 &scale)
Setter.
Assets::Skin * getSkin() const
void resetPosesToRest()
Resets all bone poses to their rest positions.
void setBoneRotation(const std::string &boneName, const glm::quat &rotation)
Setter.
glm::vec3 getBoneScale(const std::string &boneName) const
Getter.
void applyBoneTransforms()
Applies current poses to the mesh component.
glm::vec3 getBonePosition(const std::string &boneName) const
Getter.
Identifies a named mesh-like asset inside an asset file.
Definition AssetPath.h:40
Scene ownership data passed to actor and component constructors during spawning.