文件名称:粒子系统简单框架实现
文件大小:219KB
文件格式:RAR
更新时间:2013-05-23 03:29:28
particle 粒子系统
粒子系统的一个简单框架
class CParticleSystem;
class CParticle
{
public:
enum TYPE {
VISTUAL,
PARTICLE_SYSTEM
};
public:
CParticle(VOID);
virtual ~CParticle(VOID);
public:
INT liveFrame; // 生存时间
INT indexFrame; // 贞索引
BOOL isKeepLocal; // 保持本地坐标
// 说明: 相对于发射他的发射器而言
VEC3 scale; // 缩放
VEC3 position; // 位置
QUAT orientation; // 朝向
VEC4 color; // 颜色
VEC2 uvOffset; // 纹理坐标偏移
VEC3 velocity; // 速度
public:
CParticle *pNext; // 链接下一个粒子
public:
CEmitterBase *pEmitter; // 发射器指针
CParticleSystem *pEmitParticleSystem; // 发射的粒子系统
};
class CParticleSystem
{
public:
typedef std::vector
【文件预览】:
GfxDebug.cpp
AffectorLinear.cpp
GLSample.cpp
GfxDebug.h
ParticleSystem.cpp
stdafx.h
AffectorBase.cpp
AffectorBase.h
EmitterPoint.h
Particle.sln
GLSample.rc
targetver.h
ParticleSystem.h
GLSample.ico
math.h
glew32.dll
small.ico
stdafx.cpp
ReadMe.txt
GfxBase.h
Resource.h
glew.h
EmitterBase.h
typedef.h
AffectorLinear.h
EmitterBase.cpp
GfxBase.cpp
Particle.vcproj
GLSample.h
glew32.lib
EmitterPoint.cpp