Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/levelLoader/src/world_entities/skybox.h @ 4240

Last change on this file since 4240 was 4240, checked in by bensch, 19 years ago

orxonox/branches/levelLoader: SkyBox loadable in the new Style

File size: 1.4 KB
Line 
1/*!
2    \file skybox.h
3    \brief 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.
7*/
8
9#ifndef _SKYBOX_H
10#define _SKYBOX_H
11
12/* INCLUDES */
13#include "world_entity.h"
14
15/* FORWARD DEFINITION */
16class Material;
17class Vector;
18
19//! A Class to handle a SkyBox
20class SkyBox : public WorldEntity
21{
22 public:
23  SkyBox(char* fileName = NULL);
24  SkyBox(TiXmlElement* root);
25
26  virtual ~SkyBox();
27
28  void preInit(void);
29  void postInit(void);
30
31
32  void setSize(float size);
33  /** \brief assumes jpg as input-format */
34  void setTexture(const char* name) { setTexture (name, "jpg");};
35  void setTexture(const char* name, const char* extension);
36  void setTextures(const char* top, const char* bottom, const char* left, const char* right, const char* front, const char* back);
37
38  virtual void draw();
39
40 private:
41  void rebuild();
42
43  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.
44  Material **material;    //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
45  float size;             //!< Size of the SkyBox. This should match the frustum maximum range.
46   
47};
48
49#endif  /* _SKYBOX_H */
50
51
52
Note: See TracBrowser for help on using the repository browser.