3#include <Core/Animation/HandleWeight.hpp>
4#include <Core/Animation/Pose.hpp>
5#include <Core/Animation/SkinningData.hpp>
6#include <Core/Asset/HandleData.hpp>
7#include <Core/Geometry/TopologicalMesh.hpp>
8#include <Core/Geometry/TriangleMesh.hpp>
9#include <Core/Math/DualQuaternion.hpp>
10#include <Core/Utils/Index.hpp>
12#include <Engine/Data/Material.hpp>
13#include <Engine/Scene/Component.hpp>
14#include <Engine/Scene/ComponentMessenger.hpp>
57 m_skinningType( type ),
58 m_normalSkinning( APPROX ),
60 m_forceUpdate( false ),
62 m_weightType( STANDARD ),
63 m_showingWeights( false ) {}
65 ~SkinningComponent()
override {}
70 virtual void initialize()
override;
91 void setSkinningType( SkinningType type );
97 void setNormalSkinning( NormalSkinning normalSkinning );
127 void showWeights(
bool on );
130 bool isShowingWeights();
133 void showWeightsType( WeightType type );
136 WeightType getWeightsType();
139 void setWeightBone( uint bone );
153 m_loadedBindMatrices = m;
161 void createWeightMatrix();
164 template <
typename T>
167 template <
typename T>
183 Getter<Core::Animation::Skeleton> m_skeletonGetter;
186 SkinningType m_skinningType;
189 NormalSkinning m_normalSkinning;
198 Getter<Core::Utils::Index> m_renderObjectReader;
201 bool m_meshIsPoly {
false };
204 bool m_meshIsQuad {
false };
207 ReadWrite<Core::Geometry::TriangleMesh> m_triMeshWriter;
210 ReadWrite<Core::Geometry::PolyMesh> m_polyMeshWriter;
213 ReadWrite<Core::Geometry::QuadMesh> m_quadMeshWriter;
235 Core::Vector3Array m_baseUV;
238 Core::Vector3Array m_weightsUV;
244 WeightType m_weightType;
247 bool m_showingWeights;
A component is an element that can be updated by a system. It is also linked to some other components...
An entity is an scene element. It ties together components with a transform.
The SkinningComponent class is responsible for applying Geometric Skinning Methods on an animated obj...
void setPerBoneMatrix(std::map< std::string, Core::Transform > &&m)
SkinningType
The Geometric Skinning Method.
@ COR
Center of Rotation skinning.
@ DQS
Dual Quaternion Skinning.
const Core::Animation::SkinningRefData * getSkinningRefData() const
Returns the reference skinning data.
const Core::Animation::SkinningFrameData * getSkinningFrameData() const
Returns the current Pose data.
void setMeshName(const std::string &name)
SkinningType getSkinningType() const
Returns the current skinning method.
WeightType
The skinning weight type.
NormalSkinning getNormalSkinning() const
Returns the current method used to skin the normal, tangent and binormal vectors.
void setPerBoneWeight(std::map< std::string, std::vector< std::pair< uint, Scalar > > > &&w)
NormalSkinning
How to skin the normal, tangent and binormal vectors.
hepler function to manage enum as underlying types in VariableSet
Skinning data that get set at startup including the "reference state".