00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __SKYBOXCOMPONENT_H__
00017 #define __SKYBOXCOMPONENT_H__
00018
00019
00020 #include "../../dependencies.h"
00021 #include "SceneComponent.h"
00022
00023
00024
00033 class SkyBoxComponent : public SceneComponent
00034 {
00035 public:
00036
00037
00040 SkyBoxComponent(Entity *parent);
00050 SkyBoxComponent(Entity *parent, ITexture *top, ITexture *bottom, ITexture *left,
00051 ITexture *right, ITexture *front, ITexture *back);
00060 SkyBoxComponent(Entity *parent, const std::string &top, const std::string &bottom,
00061 const std::string &left, const std::string &right, const std::string &front,
00062 const std::string &back);
00064 ~SkyBoxComponent();
00065
00066
00081 void setTextures(const std::string &top, const std::string &bottom, const std::string &left,
00082 const std::string &right, const std::string &front, const std::string &back,
00083 bool ignoreNull = true);
00084
00093 void setTextures(ITexture *top, ITexture *bottom, ITexture *left, ITexture *right,
00094 ITexture *front, ITexture *back, bool ignoreNull = true);
00095
00096
00099 void onTextureSkyBox(void *p);
00100
00101
00104 static bool parseXML(IXMLReader *file, Entity *entity);
00105
00106 private:
00107
00109 void init();
00110
00111
00112 void setTexture(u32 side, const std::string &fileName);
00113 void setTexture(u32 side, ITexture *texture);
00114
00115
00116 std::string mTextureFileNames[6];
00117 };
00118
00119 #endif