Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/skybox.h @ 6413

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

orxonox/trunk: merged the network branche back to the trunk, so we do not get away from each other to fast

File size: 1.6 KB
RevLine 
[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]16class Material;
[3419]17
[3807]18//! A Class to handle a SkyBox
[3796]19class 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 */
[6341]37  void setTexture(const char* name) { if (textureName) delete[] textureName; textureName = new char[strlen(name)+1]; strcpy(textureName, 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
[6341]43  virtual int       writeBytes(const byte* data, int length, int sender);
44  virtual int       readBytes(byte* data, int maxLength, int * reciever);
45  virtual void      writeDebug() const;
46  virtual void      readDebug() const;
47
[3801]48 private:
49  void rebuild();
50
[6307]51  Material*       material[6];     //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
[4597]52  float           size;            //!< Size of the SkyBox. This should match the frustum maximum range.
[6341]53  char*           textureName;     //!< Name of the Texture
[4597]54
[3411]55};
56
[3796]57#endif  /* _SKYBOX_H */
[3411]58
59
[3484]60
Note: See TracBrowser for help on using the repository browser.