PuzzleSDK
SpritePolygonTest3类 参考

#include <SpritePolygonTest.h>

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

Public 成员函数

 CREATE_FUNC (SpritePolygonTest3)
 
 SpritePolygonTest3 ()
 
void initSprites () override
 
- 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
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 成员函数 继承自 SpritePolygonTestSlider
cocos2d::Sprite * makeSprite (const std::string &filename, const cocos2d::Vec2 &pos)
 
virtual bool init () override
 
void initSliders ()
 
void makeSprites (const std::string *list, const int count, const float y)
 
void changeEpsilon (Ref *pSender, cocos2d::ui::Slider::EventType type)
 
void updateLabel (const cocos2d::Sprite *sp, const cocos2d::PolygonInfo &pinfo)
 
- 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 属性 继承自 SpritePolygonTestSlider
cocos2d::Label * _epsilonLabel
 
int _tagIndex
 
- 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
 

详细描述

在文件 SpritePolygonTest.h90 行定义.

构造及析构函数说明

◆ SpritePolygonTest3()

SpritePolygonTest3::SpritePolygonTest3 ( )

在文件 SpritePolygonTest.cpp382 行定义.

383{
384 _title = "Optimization Value (default:2.0)";
385 _subtitle = "";
386 _tagIndex = 100;
387}

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

成员函数说明

◆ CREATE_FUNC()

SpritePolygonTest3::CREATE_FUNC ( SpritePolygonTest3  )

◆ initSprites()

void SpritePolygonTest3::initSprites ( )
overridevirtual

重载 SpritePolygonTestSlider .

在文件 SpritePolygonTest.cpp389 行定义.

390{
391 auto vsize =Director::getInstance()->getVisibleSize();
392 std::string list[] = {
393 "Images/arrows.png",
394 "Images/CyanTriangle.png",
395 s_pathB2,
396 "Images/elephant1_Diffuse.png"
397 };
398 int count = sizeof(list)/sizeof(list[0]);
399 makeSprites(list, count, vsize.height/2);
400}
void makeSprites(const std::string *list, const int count, const float y)
static const char s_pathB2[]
Definition: testResource.h:32

引用了 SpritePolygonTestSlider::makeSprites() , 以及 s_pathB2.

+ 函数调用图:

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