PuzzleSDK
TouchPoint类 参考
+ 类 TouchPoint 继承关系图:
+ TouchPoint 的协作图:

Public 成员函数

 TouchPoint (const Vec2 &touchPoint, const Color3B &touchColor)
 

静态 Public 成员函数

static TouchPointtouchPointWithParent (Node *pParent, const Vec2 &touchPoint, const Color3B &touchColor)
 

详细描述

在文件 MultiTouchTest.cpp42 行定义.

构造及析构函数说明

◆ TouchPoint()

TouchPoint::TouchPoint ( const Vec2 &  touchPoint,
const Color3B &  touchColor 
)
inline

在文件 MultiTouchTest.cpp45 行定义.

46 {
47 DrawNode* drawNode = DrawNode::create();
48 auto s = Director::getInstance()->getWinSize();
49 Color4F color(touchColor.r/255.0f, touchColor.g/255.0f, touchColor.b/255.0f, 1.0f);
50 drawNode->drawLine(Vec2(0.0f, touchPoint.y), Vec2(s.width, touchPoint.y), color);
51 drawNode->drawLine(Vec2(touchPoint.x, 0.0f), Vec2(touchPoint.x, s.height), color);
52 drawNode->drawDot(touchPoint, 3, color);
53 addChild(drawNode);
54 }

被这些函数引用 touchPointWithParent().

+ 这是这个函数的调用关系图:

成员函数说明

◆ touchPointWithParent()

static TouchPoint * TouchPoint::touchPointWithParent ( Node *  pParent,
const Vec2 &  touchPoint,
const Color3B &  touchColor 
)
inlinestatic

在文件 MultiTouchTest.cpp56 行定义.

57 {
58 auto pRet = new (std::nothrow) TouchPoint(touchPoint, touchColor);
59 pRet->setContentSize(pParent->getContentSize());
60 pRet->setAnchorPoint(Vec2(0.0f, 0.0f));
61 pRet->autorelease();
62 return pRet;
63 }
TouchPoint(const Vec2 &touchPoint, const Color3B &touchColor)

引用了 TouchPoint().

被这些函数引用 MultiTouchTest::onTouchesBegan() , 以及 MultiTouchTest::onTouchesMoved().

+ 函数调用图:
+ 这是这个函数的调用关系图:

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