摘要: int theta, phi; float radius=330.0f; int dtheta = 15; int dphi = 15; NumVertices = (int) ((360/dtheta) * (90/dphi) * 4); if(FAILED(m_pDevice->CreateVertexBuffer( NumVertices *sizeof(SkyBoxVertex), D3DUSAGE_WRITEONLY,SkyBoxVertex::FVF,D3DPOOL_MANAGED,&m_pSphereVB,NULL ))) return false; m_pSphe 阅读全文
posted @ 2011-06-10 13:17 Alen_Xu 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 自从VS升级到VS2010后,c++目录变成了在项目里面设置,所以每次打开项目的时候总是要设置C++目录。有一个办法解决以上问题:属性管理器-》在MICROSOFT.CPP.WIN32.USER-》该属性-》VC++目录。在这个里面设置。就可以解决问题 阅读全文
posted @ 2011-05-31 21:07 Alen_Xu 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 入门为我们介绍APE里面的类。这样我们就可以看懂入门一个的代码了。APEAPE,设么是APE呢。APE(Actionscript Physics Engine)是一个ActionScript3写成的物理引擎,用于模拟现实中物体发生的运动和碰撞。它是免费、开源的,遵循MIT协议。看起来特别适用用来做游戏开发,已经有许多很有趣的应用使用这个开发的 。官方网址为:http://www.cove.org/ape/下载地址为:http://www.cove.org/ape/ape_a045.zip(包含两个demo,api,swc文件,和源码)APE中总共才12个类,用起来相当的方便。这12个类的继承关 阅读全文
posted @ 2011-05-26 15:06 Alen_Xu 阅读(259) 评论(0) 推荐(0) 编辑
摘要: This tutorial covers getting APE set up in Flex Builder 2, using an ActionScript project. The process is basically identical for a Flex project. 1. Download and unzip the latest release from this site from the home page. tip:(http://www.cove.org/ape/ape_a045.zip)download this.2. Open Flex Builder 2 阅读全文
posted @ 2011-05-26 14:57 Alen_Xu 阅读(279) 评论(0) 推荐(0) 编辑
摘要: #define PI 3.1415926#define lenth 250 //左边距float ANGLE=PI/180;int R=150;int r=R*sin(18*ANGLE)/cos(36*ANGLE);int x[6],y[6],X[6],Y[6];for(int i=0;iDrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);g_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 4, 2);g_pD3DDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 8, 2 阅读全文
posted @ 2010-11-06 02:35 Alen_Xu 阅读(1814) 评论(0) 推荐(0) 编辑