Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/world_entities/skybox.h @ 6292

Last change on this file since 6292 was 6273, checked in by rennerc, 18 years ago

converter: added functions for strings
network_protocol: length and id are now int
network_game_manager: fixed some more bugs :D
skybox: is loaded on client corectly now :)

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 */
[6273]37  void setTexture(const char* name) { strncpy(textureName, name, 1024); 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
[6273]43  virtual void      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
[6273]51  Material**      material;          //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
52  float           size;              //!< Size of the SkyBox. This should match the frustum maximum range.
53  char            textureName[1024]; //!< 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.