00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __MESHCOMPONENT_H__
00017 #define __MESHCOMPONENT_H__
00018
00019
00020 #include "../../dependencies.h"
00021 #include "SceneComponent.h"
00022
00023
00024
00026 class MeshComponent : public SceneComponent
00027 {
00028 public:
00029
00030
00033 MeshComponent(Entity *parent);
00039 MeshComponent(Entity *parent, const std::string &fileName,
00040 const vector3df &rotation = vector3df(0, 0, 0),
00041 const vector3df &scale = vector3df(1.0f, 1.0f, 1.0f));
00048 MeshComponent(Entity *parent, IMesh *mesh,
00049 const vector3df &rotation = vector3df(0, 0, 0),
00050 const vector3df &scale = vector3df(1.0f, 1.0f, 1.0f));
00052 ~MeshComponent();
00053
00054
00057 static MeshComponent* refFactory(Entity *parent);
00060 static MeshComponent* refFactory(Entity *parent, const std::string &fileName,
00061 const vector3df &rotation, const vector3df &scale);
00062
00063
00066 IMeshSceneNode* getMeshSceneNode();
00067
00070 IMesh* getMesh();
00071
00074 void setMesh(const std::string &fileName);
00078 void setMesh(IMesh *mesh);
00079
00080 private:
00081
00082
00083 IMeshSceneNode *mMeshSN;
00084 };
00085
00086
00087
00089 extern void bindMeshComponent(asIScriptEngine *engine);
00090
00091 #endif
00092