2012-04-19 14:35:52 +08:00
|
|
|
#ifndef __PERFORMANCE_PARTICLE_TEST_H__
|
|
|
|
#define __PERFORMANCE_PARTICLE_TEST_H__
|
|
|
|
|
|
|
|
#include "PerformanceTest.h"
|
|
|
|
|
|
|
|
class ParticleMenuLayer : public PerformBasicLayer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ParticleMenuLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0);
|
|
|
|
virtual void showCurrentTest();
|
|
|
|
};
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class ParticleMainScene : public Scene
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void initWithSubTest(int subtest, int particles);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-06-08 13:55:28 +08:00
|
|
|
void step(float dt);
|
2012-04-19 14:35:52 +08:00
|
|
|
void createParticleSystem();
|
2014-02-20 10:53:49 +08:00
|
|
|
void testNCallback(Ref* sender);
|
2012-04-19 14:35:52 +08:00
|
|
|
void updateQuantityLabel();
|
|
|
|
int getSubTestNum() { return subtestNumber; }
|
|
|
|
int getParticlesNum() { return quantityParticles; }
|
|
|
|
virtual void doTest() = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int lastRenderedCount;
|
|
|
|
int quantityParticles;
|
|
|
|
int subtestNumber;
|
|
|
|
};
|
|
|
|
|
2011-03-25 13:59:08 +08:00
|
|
|
class ParticlePerformTest1 : public ParticleMainScene
|
|
|
|
{
|
|
|
|
public:
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2011-03-25 13:59:08 +08:00
|
|
|
virtual void doTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
class ParticlePerformTest2 : public ParticleMainScene
|
|
|
|
{
|
|
|
|
public:
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2011-03-25 13:59:08 +08:00
|
|
|
virtual void doTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
class ParticlePerformTest3 : public ParticleMainScene
|
|
|
|
{
|
|
|
|
public:
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2011-03-25 13:59:08 +08:00
|
|
|
virtual void doTest();
|
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class ParticlePerformTest4 : public ParticleMainScene
|
2011-03-25 13:59:08 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2011-03-25 13:59:08 +08:00
|
|
|
virtual void doTest();
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
void runParticleTest();
|
|
|
|
|
|
|
|
#endif
|