2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-04-04 18:51:25 -07:00
|
|
|
|
2019-09-27 19:53:03 -07:00
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/CToken.hpp"
|
|
|
|
#include "Runtime/Character/CPoseAsTransforms.hpp"
|
2022-03-09 22:33:17 -08:00
|
|
|
#include "Runtime/Graphics/CCubeModel.hpp"
|
2019-09-27 19:53:03 -07:00
|
|
|
|
|
|
|
#include <zeus/CUnitVector.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2017-08-20 22:46:59 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2018-11-04 22:12:53 -08:00
|
|
|
class CRandom16;
|
2019-09-27 19:53:03 -07:00
|
|
|
class CSkinRules;
|
2022-03-09 22:33:17 -08:00
|
|
|
struct SSkinningWorkspace;
|
2016-04-04 18:51:25 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
class CVertexMorphEffect {
|
2022-03-10 15:56:50 -08:00
|
|
|
zeus::CUnitVector3f x0_dir;
|
|
|
|
zeus::CVector3f xc_pos;
|
|
|
|
float x18_duration;
|
|
|
|
float x1c_elapsed = 0.f;
|
2018-12-07 21:30:43 -08:00
|
|
|
float x20_diagExtent;
|
|
|
|
CRandom16& x24_random;
|
2022-03-10 15:56:50 -08:00
|
|
|
std::vector<u32> x28_indices;
|
|
|
|
std::vector<float> x38_floats;
|
2018-12-07 21:30:43 -08:00
|
|
|
|
2017-08-20 22:46:59 -07:00
|
|
|
public:
|
2022-03-10 15:56:50 -08:00
|
|
|
CVertexMorphEffect(const zeus::CUnitVector3f& dir, const zeus::CVector3f& pos, float duration, float diagExtent,
|
2018-12-07 21:30:43 -08:00
|
|
|
CRandom16& random);
|
2022-03-10 15:56:50 -08: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-04 18:51:25 -07:00
|
|
|
};
|
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|