Last change
on this file since 4391 was
4261,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged the levelLoader-branche back into the trunk, because it seems to be stable.
merged with command:
svn merge -r 4230:HEAD levelLoader ../trunk
no conflicts of any interesst
|
File size:
1.4 KB
|
Rev | Line | |
---|
[3416] | 1 | /*! |
---|
[3796] | 2 | \file skybox.h |
---|
| 3 | \brief Definition of the SkyBox, that handles the Display of an atmosphere for orxonox. |
---|
[3416] | 4 | |
---|
[3796] | 5 | A SkyBox is always centered at the current working Camera, and will only obey the cameras |
---|
[3416] | 6 | movment but not its rotation. |
---|
| 7 | */ |
---|
| 8 | |
---|
[3796] | 9 | #ifndef _SKYBOX_H |
---|
| 10 | #define _SKYBOX_H |
---|
[3416] | 11 | |
---|
[3419] | 12 | /* INCLUDES */ |
---|
[3502] | 13 | #include "world_entity.h" |
---|
[3411] | 14 | |
---|
[3419] | 15 | /* FORWARD DEFINITION */ |
---|
| 16 | class Material; |
---|
| 17 | class Vector; |
---|
| 18 | |
---|
[3807] | 19 | //! A Class to handle a SkyBox |
---|
[3796] | 20 | class SkyBox : public WorldEntity |
---|
[3411] | 21 | { |
---|
[3416] | 22 | public: |
---|
[4261] | 23 | SkyBox(const char* fileName = NULL); |
---|
| 24 | SkyBox(const TiXmlElement* root); |
---|
[4010] | 25 | |
---|
[3796] | 26 | virtual ~SkyBox(); |
---|
[3419] | 27 | |
---|
[4261] | 28 | void loadParams(const TiXmlElement* root); |
---|
| 29 | |
---|
[4012] | 30 | void preInit(void); |
---|
| 31 | void postInit(void); |
---|
[4010] | 32 | |
---|
[4012] | 33 | |
---|
[3796] | 34 | void setSize(float size); |
---|
[4261] | 35 | /** \brief assumes jpg as input-format */ |
---|
| 36 | void setTexture(const char* name) { setTextureAndType (name, "jpg");}; |
---|
| 37 | void setTextureAndType(const char* name, const char* extension); |
---|
[3803] | 38 | void setTextures(const char* top, const char* bottom, const char* left, const char* right, const char* front, const char* back); |
---|
[3420] | 39 | |
---|
[3807] | 40 | virtual void draw(); |
---|
| 41 | |
---|
[3801] | 42 | private: |
---|
| 43 | void rebuild(); |
---|
| 44 | |
---|
[4136] | 45 | Model* skyModel; //!< A Model for the Sky. This must not be the same as the Model from WorldEntity, because it is not alocated through the ResourceManager. |
---|
[3807] | 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. |
---|
[3507] | 48 | |
---|
[3411] | 49 | }; |
---|
| 50 | |
---|
[3796] | 51 | #endif /* _SKYBOX_H */ |
---|
[3411] | 52 | |
---|
| 53 | |
---|
[3484] | 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.