2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-05 01:51:25 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/CToken.hpp"
|
|
|
|
#include "Runtime/Character/CPoseAsTransforms.hpp"
|
2022-03-10 06:33:17 +00:00
|
|
|
#include "Runtime/Graphics/CCubeModel.hpp"
|
2019-09-28 02:53:03 +00:00
|
|
|
|
|
|
|
#include <zeus/CUnitVector.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2017-08-21 05:46:59 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-11-05 06:12:53 +00:00
|
|
|
class CRandom16;
|
2019-09-28 02:53:03 +00:00
|
|
|
class CSkinRules;
|
2022-03-10 06:33:17 +00:00
|
|
|
struct SSkinningWorkspace;
|
2016-04-05 01:51:25 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CVertexMorphEffect {
|
2022-03-10 23:56:50 +00:00
|
|
|
zeus::CUnitVector3f x0_dir;
|
|
|
|
zeus::CVector3f xc_pos;
|
|
|
|
float x18_duration;
|
|
|
|
float x1c_elapsed = 0.f;
|
2018-12-08 05:30:43 +00:00
|
|
|
float x20_diagExtent;
|
|
|
|
CRandom16& x24_random;
|
2022-03-10 23:56:50 +00:00
|
|
|
std::vector<u32> x28_indices;
|
|
|
|
std::vector<float> x38_floats;
|
2018-12-08 05:30:43 +00:00
|
|
|
|
2017-08-21 05:46:59 +00:00
|
|
|
public:
|
2022-03-10 23:56:50 +00:00
|
|
|
CVertexMorphEffect(const zeus::CUnitVector3f& dir, const zeus::CVector3f& pos, float duration, float diagExtent,
|
2018-12-08 05:30:43 +00:00
|
|
|
CRandom16& random);
|
2022-03-10 23:56:50 +00:00
|
|
|
void MorphVertices(SSkinningWorkspace& workspace, TConstVectorRef averagedNormals,
|
|
|
|
TLockedToken<CSkinRules>& skinRules, const CPoseAsTransforms& pose, u32 vertexCount);
|
|
|
|
void Reset(const zeus::CVector3f& dir, const zeus::CVector3f& pos, float duration);
|
|
|
|
void Update(float dt);
|
2016-04-05 01:51:25 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|