129 for (
const std::pair<int, float> weight : weights) {
130 if (weight.first == -1)
break;
131 transformed += offsets[weight.first].transform(vert) * weight.second;
180 void update(
size_t threadNum,
const Scene& scene,
float deltaTime)
override;
188 void preUpdate(
size_t threadNum,
const Scene& scene,
float deltaTime)
override;
215 const std::vector<Transform>&
getSkeleton(
float deltaTime);
std::enable_if< W==2 &&H==2, Matrix< W, H, T > >::type inverse()
Vector2f transform(Vector2f vert, const std::array< std::pair< int, float >, 4 > &weights, float deltaTime)
Vector2f transformNoRecalc(Vector2f vert, const std::array< std::pair< int, float >, 4 > &weights) const
void update(size_t threadNum, const Scene &scene, float deltaTime) override
void setBase(const Skeleton &skeleton)
std::vector< Transform > skeleton
void recalculateSkeleton(float deltaTime)
const std::vector< Transform > & getSkeletonNoRecalc() const
bool skeletonRecalculated
void preUpdate(size_t threadNum, const Scene &scene, float deltaTime) override
const std::vector< Transform > & getSkeleton(float deltaTime)
static Vector2< float > zero()
Transform inverseWorldToBone
static Vector2f transform(const std::vector< Transform > &offsets, Vector2f vert, const std::array< std::pair< int, float >, 4 > &weights)
std::vector< Bone > bones
static Bone calculateBone(const std::vector< Bone > &bones, int previousBone, float length, float rotation, AngleUnit unit)