metaforce/Runtime/Character/CParticleData.hpp

47 lines
1.2 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-04-11 07:10:28 +00:00
#include <string>
#include "Runtime/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp"
#include <zeus/CVector3f.hpp>
2016-04-11 07:10:28 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2016-04-11 07:10:28 +00:00
2018-12-08 05:30:43 +00:00
class CParticleData {
2016-04-11 23:35:37 +00:00
public:
2018-12-08 05:30:43 +00:00
enum class EParentedMode { Initial, ContinuousEmitter, ContinuousSystem };
2016-04-11 23:35:37 +00:00
private:
2018-12-08 05:30:43 +00:00
u32 x0_duration = 0;
SObjectTag x4_particle;
std::string xc_boneName = "root";
float x1c_scale = 1.f;
EParentedMode x20_parentMode = EParentedMode::Initial;
2016-04-11 07:10:28 +00:00
public:
2018-12-08 05:30:43 +00:00
CParticleData() = default;
CParticleData(CInputStream& in);
u32 GetDuration() const { return x0_duration; }
const SObjectTag& GetTag() const { return x4_particle; }
std::string_view GetSegmentName() const { return xc_boneName; }
float GetScale() const { return x1c_scale; }
EParentedMode GetParentedMode() const { return x20_parentMode; }
2017-06-03 06:03:07 +00:00
};
2018-12-08 05:30:43 +00:00
class CAuxiliaryParticleData {
u32 x0_duration = 0;
SObjectTag x4_particle;
zeus::CVector3f xc_translation;
float x18_scale = 1.f;
2017-06-03 06:03:07 +00:00
public:
2018-12-08 05:30:43 +00:00
u32 GetDuration() const { return x0_duration; }
const SObjectTag& GetTag() const { return x4_particle; }
const zeus::CVector3f& GetTranslation() const { return xc_translation; }
float GetScale() const { return x18_scale; }
2016-04-11 07:10:28 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde