object_graphics.h
上传用户:liujun12jf
上传日期:2022-07-12
资源大小:638k
文件大小:1k
源码类别:

OpenGL

开发平台:

Visual C++

  1. #ifndef _OBJECT_GRAPHICS_H_
  2. #define _OBJECT_GRAPHICS_H_
  3. #include "main.h"
  4. class CParticlesObject : public CSceneNode
  5. {
  6. public:
  7. CParticleSystem *pPSystem;
  8. // void *pPSystem;
  9. CParticlesObject() // only CBlendingRoot should be able to call this (because CBRoot handles all particles)
  10. {
  11. pPSystem = new CParticleSystem;
  12. pPSystem->SampleFlame();
  13. }
  14. void Update(float fTime)
  15. {
  16. pPSystem->SetPosition(pParent->mMatrix.m_posit);
  17. pPSystem->Update(fTime);
  18. }
  19. void Render()
  20. {
  21. glPushMatrix();
  22. pPSystem->Render();
  23. glPopMatrix();
  24. }
  25. SN_RTTI GetType()
  26. { return SN_PARTICLES; }
  27. };
  28. #endif