Cocos2d-x - 坐标系

一、坐标系

在移动游戏开发中,可能会遇到三种坐标系,

1、UI坐标系

windows / android/ios中 都是以左上角为(0,0),如下图所示

2、Direct3D坐标系

采用左手笛卡尔坐标系

3、Opengl坐标系

采用右手笛卡尔坐标系

二、锚点(Anchor Point)

 sprite->setAnchorPoint(ccp(0, 0));

 sprite->setAnchorPoint(ccp(0.5, 0.5));// 默认的Anchor Point

三、getVisibleSize, getVisibleOrigin vs getWinSize

//回头再看

posted @ 2013-01-17 16:44  jeekun  阅读(323)  评论(0编辑  收藏  举报