12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #include "base/CCTouch.h"
- #include "base/CCDirector.h"
- NS_CC_BEGIN
- Vec2 Touch::getLocationInView() const
- {
- return _point;
- }
- Vec2 Touch::getPreviousLocationInView() const
- {
- return _prevPoint;
- }
- Vec2 Touch::getStartLocationInView() const
- {
- return _startPoint;
- }
- Vec2 Touch::getLocation() const
- {
- return Director::getInstance()->convertToGL(_point);
- }
- Vec2 Touch::getPreviousLocation() const
- {
- return Director::getInstance()->convertToGL(_prevPoint);
- }
- Vec2 Touch::getStartLocation() const
- {
- return Director::getInstance()->convertToGL(_startPoint);
- }
- Vec2 Touch::getDelta() const
- {
- return getLocation() - getPreviousLocation();
- }
- float Touch::getCurrentForce() const
- {
- return _curForce;
- }
- float Touch::getMaxForce() const
- {
- return _maxForce;
- }
- NS_CC_END
|