Last change
on this file since 6278 was
5511,
checked in by bensch, 19 years ago
|
orxonox/trunk: more cleanup of the WorldEntity (includes rearanged)
|
File size:
1.3 KB
|
Rev | Line | |
---|
[4597] | 1 | /*! |
---|
[5039] | 2 | * @file skybox.h |
---|
[5357] | 3 | * Definition of the SkyBox, that handles the Display of an atmosphere for orxonox. |
---|
| 4 | * |
---|
| 5 | * A SkyBox is always centered at the current working Camera, and will only obey the cameras |
---|
| 6 | * movment but not its rotation. |
---|
[3416] | 7 | */ |
---|
| 8 | |
---|
[3796] | 9 | #ifndef _SKYBOX_H |
---|
| 10 | #define _SKYBOX_H |
---|
[3416] | 11 | |
---|
[3419] | 12 | /* INCLUDES */ |
---|
[3502] | 13 | #include "world_entity.h" |
---|
[3411] | 14 | |
---|
[5405] | 15 | /* FORWARD DECLARATION */ |
---|
[5511] | 16 | class Material; |
---|
[3419] | 17 | |
---|
[3807] | 18 | //! A Class to handle a SkyBox |
---|
[3796] | 19 | class SkyBox : public WorldEntity |
---|
[3411] | 20 | { |
---|
[3416] | 21 | public: |
---|
[4261] | 22 | SkyBox(const char* fileName = NULL); |
---|
| 23 | SkyBox(const TiXmlElement* root); |
---|
[4010] | 24 | |
---|
[3796] | 25 | virtual ~SkyBox(); |
---|
[3419] | 26 | |
---|
[5357] | 27 | void init(); |
---|
[4746] | 28 | void preInit(); |
---|
[4680] | 29 | |
---|
[4261] | 30 | void loadParams(const TiXmlElement* root); |
---|
| 31 | |
---|
[4746] | 32 | void postInit(); |
---|
[4010] | 33 | |
---|
[4012] | 34 | |
---|
[3796] | 35 | void setSize(float size); |
---|
[4998] | 36 | /** assumes jpg as input-format */ |
---|
[5357] | 37 | void setTexture(const char* name) { this->setTextureAndType (name, "jpg"); }; |
---|
[4680] | 38 | |
---|
[4261] | 39 | void setTextureAndType(const char* name, const char* extension); |
---|
[4680] | 40 | void setTextures(const char* top, const char* bottom, const char* left, |
---|
| 41 | const char* right, const char* front, const char* back); |
---|
[3420] | 42 | |
---|
[3801] | 43 | private: |
---|
| 44 | void rebuild(); |
---|
| 45 | |
---|
[4597] | 46 | Material** material; //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back |
---|
| 47 | float size; //!< Size of the SkyBox. This should match the frustum maximum range. |
---|
| 48 | |
---|
[3411] | 49 | }; |
---|
| 50 | |
---|
[3796] | 51 | #endif /* _SKYBOX_H */ |
---|
[3411] | 52 | |
---|
| 53 | |
---|
[3484] | 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.