iOS Dev (69) 单点触摸时 Cocoa Touch API 坐标转换为 OpenGL 坐标

iOS Dev (69) 单点触摸时 Cocoa Touch API 坐标转换为 OpenGL 坐标

  • 博客:http://blog.csdn.net/prevention
  • 作者:大锐哥
  • 摘自:Learn iPhone and iPad cocos2d Game Development

-

-(CGPoint) locationFromTouches:(NSSet *)touches
{
    UITouch *touch = [touches anyObject];
    CGPoint touchLocation = [touch locationInView: [touch view]];
    return [[CCDirector sharedDirector] convertToGL:touchLocation];
}

-

转载请注明来自:http://blog.csdn.net/prevention

你可能感兴趣的:(iOS Dev (69) 单点触摸时 Cocoa Touch API 坐标转换为 OpenGL 坐标)