Generalized interpolation functions. (orientation spectrum not working properly (quaterions...))

This commit is contained in:
Stiffly
2014-04-29 11:51:57 +02:00
parent 0feb983277
commit a13e9d32ec
5 changed files with 61 additions and 49 deletions
+5 -4
View File
@@ -21,6 +21,7 @@ namespace Systems
double SpawnTime;
float Scale;
float AngularVelocity;
glm::vec3 Orientation;
Color color;
};
@@ -34,10 +35,10 @@ public:
private:
void SpawnParticles(EntityID emitterID);
float RandomizeAngle(float spreadAngle);
void ScaleInterpolation(double timeProgress, std::vector<float> scaleSpectrum, glm::vec3 &scale);
void VelocityInterpolation(double timeProgress, std::vector<glm::vec3> velocitySpectrum, glm::vec3 &velocity);
void ColorInterpolation(double timeProgress, std::vector<Color> colorSpectrum, Color &color);
void AngularVelocityInterpolation(double timeProgress, std::vector<float> spectrum, float &angularVelocity);
//void ScaleInterpolation(double timeProgress, std::vector<float> spectrum, glm::vec3 &scale);
void VectorInterpolation(double timeProgress, std::vector<glm::vec3> spectrum, glm::vec3 &velocity);
//void ColorInterpolation(double timeProgress, std::vector<Color> spectrum, Color &color);
void ScalarInterpolation(double timeProgress, std::vector<float> spectrum, float &alpha);
void Billboard();
std::map<EntityID, std::list<ParticleData>> m_ParticleEmitter;
std::map<EntityID, double> m_TimeSinceLastSpawn;