metaforce/Runtime/Particle/CVectorElement.hpp

210 lines
5.6 KiB
C++
Raw Normal View History

2016-02-13 09:02:47 +00:00
#ifndef __PSHAG_CVECTORELEMENT_HPP__
#define __PSHAG_CVECTORELEMENT_HPP__
2016-02-05 08:34:14 +00:00
#include "IElement.hpp"
2016-02-13 09:02:47 +00:00
namespace pshag
{
2016-02-07 00:19:59 +00:00
class CVEKeyframeEmitter : public CVectorElement
{
u32 x4_percent;
u32 x8_unk1;
bool xc_loop;
bool xd_unk2;
u32 x10_loopEnd;
u32 x14_loopStart;
std::vector<Zeus::CVector3f> x18_keys;
public:
CVEKeyframeEmitter(CInputStream& in);
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
2016-02-05 08:34:14 +00:00
class CVECone : public CVectorElement
{
2016-02-07 07:25:34 +00:00
std::unique_ptr<CVectorElement> x4_direction;
std::unique_ptr<CRealElement> x8_magnitude;
Zeus::CVector3f xc_xVec;
Zeus::CVector3f x18_yVec;
2016-02-05 08:34:14 +00:00
public:
2016-02-07 00:19:59 +00:00
CVECone(CVectorElement* a, CRealElement* b);
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVETimeChain : public CVectorElement
{
std::unique_ptr<CVectorElement> x4_a;
std::unique_ptr<CVectorElement> x8_b;
2016-02-07 07:25:34 +00:00
std::unique_ptr<CIntElement> xc_swFrame;
2016-02-05 08:34:14 +00:00
public:
CVETimeChain(CVectorElement* a, CVectorElement* b, CIntElement* c)
2016-02-07 07:25:34 +00:00
: x4_a(a), x8_b(b), xc_swFrame(c) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEAngleCone : public CVectorElement
{
2016-02-07 07:25:34 +00:00
std::unique_ptr<CRealElement> x4_angleXConstant;
std::unique_ptr<CRealElement> x8_angleYConstant;
std::unique_ptr<CRealElement> xc_angleXRange;
std::unique_ptr<CRealElement> x10_angleYRange;
std::unique_ptr<CRealElement> x14_magnitude;
2016-02-05 08:34:14 +00:00
public:
CVEAngleCone(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d, CRealElement* e)
2016-02-07 07:25:34 +00:00
: x4_angleXConstant(a), x8_angleYConstant(b), xc_angleXRange(c), x10_angleYRange(d), x14_magnitude(e) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEAdd : public CVectorElement
{
std::unique_ptr<CVectorElement> x4_a;
std::unique_ptr<CVectorElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CVEAdd(CVectorElement* a, CVectorElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVECircleCluster : public CVectorElement
{
std::unique_ptr<CVectorElement> x4_a;
2016-02-07 23:59:05 +00:00
Zeus::CVector3f x8_xVec;
Zeus::CVector3f x14_yVec;
float x20_deltaAngle;
std::unique_ptr<CRealElement> x24_magnitude;
2016-02-05 08:34:14 +00:00
public:
2016-02-07 23:59:05 +00:00
CVECircleCluster(CVectorElement* a, CVectorElement* b, CIntElement* c, CRealElement* d);
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEConstant : public CVectorElement
{
std::unique_ptr<CRealElement> x4_a;
std::unique_ptr<CRealElement> x8_b;
std::unique_ptr<CRealElement> xc_c;
2016-02-05 08:34:14 +00:00
public:
CVEConstant(CRealElement* a, CRealElement* b, CRealElement* c)
: x4_a(a), x8_b(b), xc_c(c) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEFastConstant : public CVectorElement
{
Zeus::CVector3f x4_val;
2016-02-05 08:34:14 +00:00
public:
CVEFastConstant(float a, float b, float c) : x4_val(a, b, c) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
bool IsFastConstant() const {return true;}
};
class CVECircle : public CVectorElement
{
2016-02-07 23:59:05 +00:00
std::unique_ptr<CVectorElement> x4_direction;
Zeus::CVector3f x8_xVec;
Zeus::CVector3f x14_yVec;
std::unique_ptr<CRealElement> x20_angleConstant;
std::unique_ptr<CRealElement> x24_angleLinear;
std::unique_ptr<CRealElement> x28_magnitude;
2016-02-05 08:34:14 +00:00
public:
2016-02-07 23:59:05 +00:00
CVECircle(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d, CRealElement* e);
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEMultiply : public CVectorElement
{
std::unique_ptr<CVectorElement> x4_a;
std::unique_ptr<CVectorElement> x8_b;
2016-02-05 08:34:14 +00:00
public:
CVEMultiply(CVectorElement* a, CVectorElement* b)
: x4_a(a), x8_b(b) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVERealToVector : public CVectorElement
{
std::unique_ptr<CRealElement> x4_a;
2016-02-05 08:34:14 +00:00
public:
CVERealToVector(CRealElement* a)
: x4_a(a) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPulse : public CVectorElement
{
2016-02-07 00:19:59 +00:00
std::unique_ptr<CIntElement> x4_aDuration;
std::unique_ptr<CIntElement> x8_bDuration;
std::unique_ptr<CVectorElement> xc_aVal;
std::unique_ptr<CVectorElement> x10_bVal;
2016-02-05 08:34:14 +00:00
public:
CVEPulse(CIntElement* a, CIntElement* b, CVectorElement* c, CVectorElement* d)
2016-02-07 00:19:59 +00:00
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
2016-02-05 08:34:14 +00:00
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEParticleVelocity : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPLCO : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPLOC : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
2016-02-12 06:06:17 +00:00
class CVEPSOF : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
class CVEPSOU : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
2016-02-05 08:34:14 +00:00
class CVEPSOR : public CVectorElement
{
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
2016-02-12 06:06:17 +00:00
class CVEPSTR : public CVectorElement
{
2016-02-05 08:34:14 +00:00
public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
2016-02-12 06:06:17 +00:00
class CVESubtract : public CVectorElement
{
std::unique_ptr<CVectorElement> x4_a;
std::unique_ptr<CVectorElement> x8_b;
public:
CVESubtract(CVectorElement* a, CVectorElement* b)
: x4_a(a), x8_b(b)
{}
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
2016-02-17 08:07:32 +00:00
class CVEColorToVector : public CVectorElement
{
std::unique_ptr<CColorElement> x4_a;
public:
CVEColorToVector(CColorElement* a)
: x4_a(a) {}
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
}
2016-02-13 09:02:47 +00:00
#endif // __PSHAG_CVECTORELEMENT_HPP__