RavEngine
Loading...
Searching...
No Matches
SkinnedMeshComponent.hpp
1#pragma once
2#include "ComponentWithOwner.hpp"
3#include "Queryable.hpp"
4#include "SkeletonAsset.hpp"
5#include "Ref.hpp"
6#include "BuiltinMaterials.hpp"
7
8namespace RavEngine {
9
10 struct MeshCollectionSkinned;
11
12class SkinnedMeshComponent : public ComponentWithOwner, public Queryable<SkinnedMeshComponent>, public Disableable{
13private:
15#if !RVE_SERVER
17#endif
18 Ref<SkeletonAsset> skeleton;
19#if !RVE_SERVER
20 void updateMaterialInWorldRenderData(decltype(mat) newMat);
21#endif
22public:
23
25#if !RVE_SERVER
26 inline void SetMaterial(decltype(mat) newMat){
27 updateMaterialInWorldRenderData(newMat);
28 mat = newMat;
29 }
33 auto GetMaterial() const{
34 return mat;
35 }
36#endif
37
38 MOVE_NO_COPY(SkinnedMeshComponent);
39
40 auto GetMesh() const{
41 return mesh;
42 }
43
44 Ref<SkeletonAsset> GetSkeleton() const {
45 return skeleton;
46 }
47
48 // shadow Disableable::SetEnabled
49 void SetEnabled(bool);
50};
51
52}
Definition ComponentWithOwner.hpp:17
Definition ComponentWithOwner.hpp:6
Definition SkinnedMeshComponent.hpp:12
auto GetMaterial() const
Definition SkinnedMeshComponent.hpp:33
Definition concurrentqueue.h:747
Definition Animation.hpp:6
Definition Entity.hpp:11
Definition Queryable.hpp:21