mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 20:12:40 +02:00
- Added particle support to g3d viewer
This commit is contained in:
@@ -8,8 +8,11 @@
|
||||
|
||||
#include "renderer.h"
|
||||
#include "util.h"
|
||||
#include "particle_type.h"
|
||||
#include "unit_particle_type.h"
|
||||
|
||||
using std::string;
|
||||
using namespace Glest::Game;
|
||||
|
||||
namespace Shared{ namespace G3dViewer{
|
||||
|
||||
@@ -29,6 +32,7 @@ public:
|
||||
|
||||
enum MenuId{
|
||||
miFileLoad,
|
||||
miFileLoadParticleXML,
|
||||
miModeWireframe,
|
||||
miModeNormals,
|
||||
miModeGrid,
|
||||
@@ -53,7 +57,11 @@ private:
|
||||
wxMenu *menuCustomColor;
|
||||
|
||||
Model *model;
|
||||
string modelPath;
|
||||
|
||||
//string modelPath;
|
||||
//string ParticlePath;
|
||||
std::vector<string> modelPathList;
|
||||
std::vector<string> particlePathList;
|
||||
|
||||
float speed;
|
||||
float anim;
|
||||
@@ -61,6 +69,12 @@ private:
|
||||
int lastX, lastY;
|
||||
Renderer::PlayerColor playerColor;
|
||||
|
||||
std::vector<UnitParticleSystemType *> unitParticleSystemTypes;
|
||||
std::vector<UnitParticleSystem *> unitParticleSystems;
|
||||
|
||||
void loadModel(string path);
|
||||
void loadParticle(string path);
|
||||
|
||||
public:
|
||||
MainWindow(const string &modelPath);
|
||||
~MainWindow();
|
||||
@@ -71,6 +85,7 @@ public:
|
||||
void onPaint(wxPaintEvent &event);
|
||||
void onClose(wxCloseEvent &event);
|
||||
void onMenuFileLoad(wxCommandEvent &event);
|
||||
void onMenuFileLoadParticleXML(wxCommandEvent &event);
|
||||
void onMenuModeNormals(wxCommandEvent &event);
|
||||
void onMenuModeWireframe(wxCommandEvent &event);
|
||||
void onMenuModeGrid(wxCommandEvent &event);
|
||||
@@ -83,6 +98,8 @@ public:
|
||||
void onMouseMove(wxMouseEvent &event);
|
||||
void onTimer(wxTimerEvent &event);
|
||||
|
||||
void onKeyDown(wxKeyEvent &e);
|
||||
|
||||
string getModelInfo();
|
||||
};
|
||||
|
||||
@@ -98,7 +115,8 @@ public:
|
||||
GlCanvas(MainWindow *mainWindow);
|
||||
|
||||
void onMouseMove(wxMouseEvent &event);
|
||||
void onPaint(wxPaintEvent &event);
|
||||
void onPaint(wxPaintEvent &event);
|
||||
void onKeyDown(wxKeyEvent &event);
|
||||
|
||||
private:
|
||||
MainWindow *mainWindow;
|
||||
|
Reference in New Issue
Block a user