Make private funcs in C4ParticleValueProvider, well, private

We're not inheriting from C4PVP, and all of these internal functions
really shouldn't be called from outside the class. So private is what
they should be.
alternate-lights
Nicolas Hake 2015-02-22 11:30:12 +01:00
parent 39bbcbb9ee
commit bc6ce0251f
1 changed files with 8 additions and 7 deletions

View File

@ -101,7 +101,7 @@ typedef bool (C4ParticleProperties::*C4ParticleCollisionCallback) (C4Particle*);
// the value providers are used to change the attributes of a particle over the lifetime
class C4ParticleValueProvider
{
protected:
private:
float startValue, endValue;
// used by Random
@ -145,11 +145,6 @@ protected:
int typeOfValueToChange;
public:
void UpdatePointerValue(C4Particle *particle, C4ParticleValueProvider *parent);
void UpdateChildren(C4Particle *particle);
void FloatifyParameterValue(float C4ParticleValueProvider::*value, float denominator, size_t keyFrameIndex = 0);
void SetParameterValue(int type, const C4Value &value, float C4ParticleValueProvider::*floatVal, int C4ParticleValueProvider::*intVal = 0, size_t keyFrameIndex = 0);
bool IsConstant() const { return isConstant; }
bool IsRandom() const { return valueFunction == &C4ParticleValueProvider::Random; }
C4ParticleValueProvider() :
@ -167,12 +162,18 @@ public:
// divides by denominator
void Floatify(float denominator);
void SetType(C4ParticleValueProviderID what = C4PV_Const);
void Set(const C4Value &value);
void Set(const C4ValueArray &fromArray);
void Set(float to); // constant
float GetValue(C4Particle *forParticle);
private:
void UpdatePointerValue(C4Particle *particle, C4ParticleValueProvider *parent);
void UpdateChildren(C4Particle *particle);
void FloatifyParameterValue(float C4ParticleValueProvider::*value, float denominator, size_t keyFrameIndex = 0);
void SetParameterValue(int type, const C4Value &value, float C4ParticleValueProvider::*floatVal, int C4ParticleValueProvider::*intVal = 0, size_t keyFrameIndex = 0);
void SetType(C4ParticleValueProviderID what = C4PV_Const);
float Linear(C4Particle *forParticle);
float Const(C4Particle *forParticle);
float Random(C4Particle *forParticle);