axmol/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.h

44 lines
1.1 KiB
C
Raw Normal View History

2015-03-19 12:32:53 +08:00
#ifndef __PERFORMANCE_PARTICLE_3D_TEST_H__
#define __PERFORMANCE_PARTICLE_3D_TEST_H__
#include "PerformanceTest.h"
class Particle3DMenuLayer : public PerformBasicLayer
{
public:
2015-03-19 14:43:29 +08:00
Particle3DMenuLayer(bool isControlMenuVisible, int maxCases = 0, int curCase = 0);
2015-03-19 12:32:53 +08:00
virtual void showCurrentTest();
};
class Particle3DMainScene : public cocos2d::Scene
2015-03-19 12:32:53 +08:00
{
public:
virtual void initWithSubTest(int subtest, int particles);
virtual std::string title() const;
void step(float dt);
void createParticleSystem(int idx);
void testNCallback(cocos2d::Ref* sender);
2015-03-19 12:32:53 +08:00
void updateQuantityLabel();
2015-03-19 14:43:29 +08:00
int getSubTestNum() { return _subtestNumber; }
int getParticlesNum() { return _quantityParticles; }
2015-03-19 12:32:53 +08:00
virtual void doTest() = 0;
protected:
2015-03-19 14:43:29 +08:00
int _lastRenderedCount;
int _quantityParticles;
int _subtestNumber;
cocos2d::Label *_particleLab;
2015-03-19 12:32:53 +08:00
};
class Particle3DPerformTest : public Particle3DMainScene
{
public:
virtual std::string title() const override;
virtual void doTest();
};
void runParticle3DTest();
#endif