PuzzleSDK
SpritePolygonPerformanceTestDynamic类 参考

#include <SpritePolygonTest.h>

+ 类 SpritePolygonPerformanceTestDynamic 继承关系图:
+ SpritePolygonPerformanceTestDynamic 的协作图:

Public 成员函数

 CREATE_FUNC (SpritePolygonPerformanceTestDynamic)
 
 SpritePolygonPerformanceTestDynamic ()
 
- Public 成员函数 继承自 SpritePolygonPerformance
 CREATE_FUNC (SpritePolygonPerformance)
 
 SpritePolygonPerformance ()
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 

Protected 成员函数

cocos2d::Sprite * makeSprite () override
 
virtual void initIncrementStats () override
 
- Protected 成员函数 继承自 SpritePolygonPerformance
void updateLabel ()
 
virtual void update (float dt) override
 
virtual bool init () override
 
void incrementStats ()
 
- Protected 成员函数 继承自 SpritePolygonTestCase
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
virtual void onEnter () override
 
virtual void onExit () override
 
 SpritePolygonTestCase ()
 
 ~SpritePolygonTestCase ()
 
void updateDrawNode ()
 

Protected 属性

cocos2d::PolygonInfo _pinfo
 
- Protected 属性 继承自 SpritePolygonPerformance
int _spriteCount
 
int _vertCount
 
int _triCount
 
int _pixelCount
 
float _elapsedTime
 
cocos2d::Label * _perfLabel
 
int _continuousLowDt
 
float _continuousHighDtTime
 
float _waitingTime
 
int _posX
 
int _posY
 
int _leftX
 
int _rightX
 
bool goRight
 
bool ended
 
float prevDt
 
unsigned int _incVert
 
unsigned int _incTri
 
unsigned int _incPix
 
- Protected 属性 继承自 SpritePolygonTestCase
std::string _title
 
std::string _subtitle
 
bool _isDebugDraw
 
bool _isNeedDebugMenu
 
cocos2d::Vector< cocos2d::DrawNode * > _drawNodes
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 

详细描述

在文件 SpritePolygonTest.h159 行定义.

构造及析构函数说明

◆ SpritePolygonPerformanceTestDynamic()

SpritePolygonPerformanceTestDynamic::SpritePolygonPerformanceTestDynamic ( )

在文件 SpritePolygonTest.cpp633 行定义.

634{
635 _title = "Dynamic SpritePolygon Performance";
636 _subtitle = "Test running, please wait until it ends";
637}

引用了 SpritePolygonTestCase::_subtitle , 以及 SpritePolygonTestCase::_title.

成员函数说明

◆ CREATE_FUNC()

SpritePolygonPerformanceTestDynamic::CREATE_FUNC ( SpritePolygonPerformanceTestDynamic  )

◆ initIncrementStats()

void SpritePolygonPerformanceTestDynamic::initIncrementStats ( )
overrideprotectedvirtual

重载 SpritePolygonPerformance .

在文件 SpritePolygonTest.cpp625 行定义.

626{
627 _pinfo = AutoPolygon::generatePolygon(s_pathGrossini);
628 _incVert = _pinfo.getVertCount();
629 _incTri = _pinfo.getTrianglesCount();
630 _incPix = _pinfo.getArea();
631}
static const char s_pathGrossini[]
Definition: testResource.h:28

引用了 SpritePolygonPerformance::_incPix, SpritePolygonPerformance::_incTri, SpritePolygonPerformance::_incVert, _pinfo , 以及 s_pathGrossini.

◆ makeSprite()

Sprite * SpritePolygonPerformanceTestDynamic::makeSprite ( )
overrideprotectedvirtual

重载 SpritePolygonPerformance .

在文件 SpritePolygonTest.cpp639 行定义.

640{
641 auto ret = Sprite::create(_pinfo);
642 ret->runAction(RepeatForever::create(RotateBy::create(1.0f,360.0f)));
643 return ret;
644}

引用了 _pinfo.

类成员变量说明

◆ _pinfo

cocos2d::PolygonInfo SpritePolygonPerformanceTestDynamic::_pinfo
protected

在文件 SpritePolygonTest.h166 行定义.

被这些函数引用 initIncrementStats() , 以及 makeSprite().


该类的文档由以下文件生成: