metaforce/Runtime/Particle/CEmitterElement.hpp

51 lines
1.8 KiB
C++
Raw Normal View History

2016-02-13 09:02:47 +00:00
#ifndef __PSHAG_CEMITTERELEMENT_HPP__
#define __PSHAG_CEMITTERELEMENT_HPP__
2016-02-05 08:34:14 +00:00
#include "IElement.hpp"
2016-02-28 06:55:05 +00:00
/* Documentation at: http://www.metroid2002.com/retromodding/wiki/Particle_Script#Emitter_Elements */
2016-02-13 09:02:47 +00:00
namespace pshag
{
2016-02-05 08:34:14 +00:00
class CEESimpleEmitter : public CEmitterElement
{
std::unique_ptr<CVectorElement> x4_loc;
std::unique_ptr<CVectorElement> x8_vec;
public:
CEESimpleEmitter(CVectorElement* a, CVectorElement* b)
: x4_loc(a), x8_vec(b) {}
2016-02-11 02:36:21 +00:00
bool GetValue(int frame, Zeus::CVector3f& pPos, Zeus::CVector3f& pVel) const;
};
2016-02-05 08:34:14 +00:00
class CVESphere : public CEmitterElement
{
2016-02-29 03:03:11 +00:00
std::unique_ptr<CVectorElement> x4_sphereOrigin;
std::unique_ptr<CRealElement> x8_sphereRadius;
std::unique_ptr<CRealElement> xc_velocityMag;
public:
CVESphere(CVectorElement* a, CRealElement* b, CRealElement* c)
2016-02-29 03:03:11 +00:00
: x4_sphereOrigin(a), x8_sphereRadius(b), xc_velocityMag(c) {}
2016-02-11 02:36:21 +00:00
bool GetValue(int frame, Zeus::CVector3f& pPos, Zeus::CVector3f& pVel) const;
2016-02-05 08:34:14 +00:00
};
class CVEAngleSphere : public CEmitterElement
2016-02-05 08:34:14 +00:00
{
2016-02-29 03:03:11 +00:00
std::unique_ptr<CVectorElement> x4_sphereOrigin;
std::unique_ptr<CRealElement> x8_sphereRadius;
std::unique_ptr<CRealElement> xc_velocityMag;
std::unique_ptr<CRealElement> x10_angleXBias;
std::unique_ptr<CRealElement> x14_angleYBias;
std::unique_ptr<CRealElement> x18_angleXRange;
std::unique_ptr<CRealElement> x1c_angleYRange;
public:
CVEAngleSphere(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d,
CRealElement* e, CRealElement* f, CRealElement* g)
2016-02-29 03:03:11 +00:00
: x4_sphereOrigin(a), x8_sphereRadius(b), xc_velocityMag(c), x10_angleXBias(d), x14_angleYBias(e), x18_angleXRange(f), x1c_angleYRange(g) {}
2016-02-11 02:36:21 +00:00
bool GetValue(int frame, Zeus::CVector3f& pPos, Zeus::CVector3f& pVel) const;
2016-02-05 08:34:14 +00:00
};
}
2016-02-13 09:02:47 +00:00
#endif // __PSHAG_CEMITTERELEMENT_HPP__