Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4746 in orxonox.OLD for orxonox/trunk/src/lib/graphics


Ignore:
Timestamp:
Jul 1, 2005, 12:48:48 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: changed (void) → ()

Location:
orxonox/trunk/src/lib/graphics
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r4739 r4746  
    119119   \brief Sets the GL-attributes
    120120*/
    121 int GraphicsEngine::setGLattribs(void)
     121int GraphicsEngine::setGLattribs()
    122122{
    123123  // Set video mode
     
    208208   this is a GL-Projection-mode, that is orthogonal, for placing the font in fron of everything else
    209209*/
    210 void GraphicsEngine::enter2DMode(void)
     210void GraphicsEngine::enter2DMode()
    211211{
    212212  GraphicsEngine::storeMatrices();
     
    242242
    243243/**
    244    \brief leaves the 2DMode again also \see Font::enter2DMode(void)
    245 */
    246 void GraphicsEngine::leave2DMode(void)
     244   \brief leaves the 2DMode again also \see Font::enter2DMode()
     245*/
     246void GraphicsEngine::leave2DMode()
    247247{
    248248  glMatrixMode(GL_MODELVIEW);
     
    258258   \brief stores the GL_matrices
    259259*/
    260 void GraphicsEngine::storeMatrices(void)
     260void GraphicsEngine::storeMatrices()
    261261{
    262262  glGetDoublev(GL_PROJECTION_MATRIX, GraphicsEngine::projMat);
     
    277277   \brief outputs all the Fullscreen modes.
    278278*/
    279 void GraphicsEngine::listModes(void)
     279void GraphicsEngine::listModes()
    280280{
    281281  /* Get available fullscreen/hardware modes */
  • orxonox/trunk/src/lib/graphics/graphics_engine.h

    r4681 r4746  
    2727    virtual ~GraphicsEngine();
    2828    /** \returns a Pointer to the only object of this Class */
    29     inline static GraphicsEngine* getInstance(void) { if (!singletonRef) singletonRef = new GraphicsEngine();  return singletonRef; };
     29    inline static GraphicsEngine* getInstance() { if (!singletonRef) singletonRef = new GraphicsEngine();  return singletonRef; };
    3030
    3131    int initVideo();
    3232
    3333    void setWindowName(const char* windowName, const char* icon);
    34     int setGLattribs(void);
     34    int setGLattribs();
    3535    int setResolution(int width, int height, int bpp);
    3636    void setFullscreen(bool fullscreen = false);
     
    3838
    3939    /** \returns the x resolution */
    40     inline int getResolutionX(void) const { return this->resolutionX; };
     40    inline int getResolutionX() const { return this->resolutionX; };
    4141    /** \returns the y resolution */
    42     inline int getResolutionY(void) const { return this->resolutionY; };
     42    inline int getResolutionY() const { return this->resolutionY; };
    4343    /** \returns the Bits Per Pixel */
    44     inline int getbbp(void) const { return this->bitsPerPixel; };
     44    inline int getbbp() const { return this->bitsPerPixel; };
    4545
    4646    int resolutionChanged(SDL_ResizeEvent* resizeInfo);
    4747
    48     static void enter2DMode(void);
    49     static void leave2DMode(void);
     48    static void enter2DMode();
     49    static void leave2DMode();
    5050
    51     static void storeMatrices(void);
     51    static void storeMatrices();
    5252    static GLdouble modMat[16];
    5353    static GLdouble projMat[16];
     
    5757    void displayFPS(bool display);
    5858
    59     void listModes(void);
     59    void listModes();
    6060
    6161    /** \brief swaps the GL_BUFFERS */
    62     static void swapBuffers(void) { SDL_GL_SwapBuffers(); };
     62    static void swapBuffers() { SDL_GL_SwapBuffers(); };
    6363
    6464  public:
  • orxonox/trunk/src/lib/graphics/importer/array.h

    r4580 r4746  
    3232    ~Array();
    3333
    34     void finalizeArray (void);
     34    void finalizeArray ();
    3535    void addEntry (T entry);
    3636    void addEntry(T entry0, T entry1, T entry2);
     
    3939    inline const T* getArray () const { return this->array; };
    4040    /**   \returns The Count of entries in the Array*/
    41     inline unsigned int getCount(void)const { return this->entryCount; };
    42     void debug(void) const ;
     41    inline unsigned int getCount()const { return this->entryCount; };
     42    void debug() const ;
    4343
    4444  private:
     
    9797*/
    9898template<class T>
    99 void Array<T>::finalizeArray (void)
     99void Array<T>::finalizeArray ()
    100100{
    101101  PRINTF(4)("Finalizing array. Length: %i\n", entryCount);
     
    157157*/
    158158template<class T>
    159 void Array<T>::debug (void) const
     159void Array<T>::debug () const
    160160{
    161161  PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
  • orxonox/trunk/src/lib/graphics/importer/material.cc

    r4584 r4746  
    6464   \brief sets the material with which the following Faces will be painted
    6565*/
    66 bool Material::select (void)
     66bool Material::select ()
    6767{
    6868  // setting diffuse color
  • orxonox/trunk/src/lib/graphics/importer/material.h

    r4584 r4746  
    2828  ~Material ();
    2929
    30   bool select (void);
     30  bool select ();
    3131
    3232  void setIllum (int illum);
  • orxonox/trunk/src/lib/graphics/importer/model.cc

    r4677 r4746  
    113113   actually does the same as the delete Operator, but does not delete the predecessing group
    114114*/
    115 void ModelGroup::cleanup(void)
     115void ModelGroup::cleanup()
    116116{
    117117  PRINTF(5)("Cleaning up group\n");
     
    164164   Looks if any from model allocated space is still in use, and if so deleted it.
    165165*/
    166 Model::~Model(void)
     166Model::~Model()
    167167{
    168168  PRINTF(4)("Deleting Model ");
     
    198198   \brief Finalizes an Object. This can be done outside of the Class.
    199199*/
    200 void Model::finalize(void)
     200void Model::finalize()
    201201{
    202202  // this creates the display List.
     
    218218   It does this by just calling the Lists that must have been created earlier.
    219219*/
    220 void Model::draw (void) const
     220void Model::draw () const
    221221{
    222222  PRINTF(4)("drawing the 3D-Models\n");
     
    292292   \brief deletes all the arrays
    293293*/
    294 bool Model::deleteArrays(void)
     294bool Model::deleteArrays()
    295295{
    296296  if (this->vertices)
     
    310310   This funcion is needed, to delete all the Lists, and arrays that are no more needed because they are already imported into openGL. This will be applied at the end of the importing Process.
    311311*/
    312 bool Model::cleanup(void)
     312bool Model::cleanup()
    313313{
    314314  PRINTF(4)("cleaning up the 3D-Model to save Memory.\n");
     
    702702   \brief reads and includes the Faces/Materials into the openGL state Machine
    703703*/
    704 bool Model::importToDisplayList(void)
     704bool Model::importToDisplayList()
    705705{
    706706  // finalize the Arrays
     
    794794   \brief reads and includes the Faces/Materials into the openGL state Machine
    795795*/
    796 bool Model::importToVertexArray(void)
     796bool Model::importToVertexArray()
    797797{
    798798  // finalize the Arrays
     
    857857   This will inject a Cube, because this is the most basic model.
    858858*/
    859 void Model::cubeModel(void)
     859void Model::cubeModel()
    860860{
    861861  this->addVertex (-0.5, -0.5, 0.5);
  • orxonox/trunk/src/lib/graphics/importer/model.h

    r4678 r4746  
    9999 public:
    100100  Model(const char* modelName = NULL, MODEL_TYPE type = MODEL_DISPLAY_LIST);
    101   virtual ~Model(void);
     101  virtual ~Model();
    102102
    103   void draw(void) const;
     103  void draw() const;
    104104  void draw(int groupNumber) const;
    105105  void draw(char* groupName) const;
    106106
    107107  /** \returns Count of the Models (Groups) in this File */
    108   inline int getGroupCount(void) const { return this->groupCount; };
     108  inline int getGroupCount() const { return this->groupCount; };
    109109
    110110  /** \returns a Pointer to the Vertex-Array, if it was deleted it returns NULL */
    111   inline const GLfloat* getVertexArray(void) const { return this->vertices->getArray(); };
     111  inline const GLfloat* getVertexArray() const { return this->vertices->getArray(); };
    112112  /** \returns the VertexCount of this Model */
    113   inline unsigned int getVertexCount(void) const { return this->vertexCount; };
     113  inline unsigned int getVertexCount() const { return this->vertexCount; };
    114114
    115115  /** \returns a Pointer to the Normals-Array, if it was deleted it returns NULL */
    116   inline const GLfloat* getNormalsArray(void) const { return this->normals->getArray(); };
     116  inline const GLfloat* getNormalsArray() const { return this->normals->getArray(); };
    117117  /** \returns the NormalsCount of this Model */
    118   inline unsigned int getNormalsCount(void) const { return this->normalCount; };
     118  inline unsigned int getNormalsCount() const { return this->normalCount; };
    119119
    120120  /** \returns a Pointer to the TexCoord-Array, if it was deleted it returns NULL */
    121   inline const GLfloat* getTexCoordArray(void) const { return this->vTexture->getArray(); };
     121  inline const GLfloat* getTexCoordArray() const { return this->vTexture->getArray(); };
    122122  /** \returns the TexCoord-Count of this Model */
    123   inline unsigned int getTexCoordCount(void) const { return this->texCoordCount; };
     123  inline unsigned int getTexCoordCount() const { return this->texCoordCount; };
    124124
    125125  /** \returns the Count of Faces of this Model */
     
    141141  bool setMaterial(const char* mtlString);
    142142  bool setMaterial(Material* mtl);
    143   void finalize(void);
     143  void finalize();
    144144
    145145
    146146 protected:
    147   void cubeModel(void);
     147  void cubeModel();
    148148
    149149  Material* findMaterialByName(const char* materialName);
     
    154154
    155155 private:
    156   bool buildVertexNormals(void);
     156  bool buildVertexNormals();
    157157
    158   bool importToDisplayList(void);
     158  bool importToDisplayList();
    159159  bool addGLElement(ModelFaceElement* elem);
    160160
    161   bool importToVertexArray(void);
     161  bool importToVertexArray();
    162162
    163   bool deleteArrays(void);
    164   bool cleanup(void);
     163  bool deleteArrays();
     164  bool cleanup();
    165165
    166166 private:
  • orxonox/trunk/src/lib/graphics/importer/texture.cc

    r4662 r4746  
    4343   Frees Data, and deletes the textures from GL
    4444*/
    45 Texture::~Texture(void)
     45Texture::~Texture()
    4646{
    4747  if (this->texture)
  • orxonox/trunk/src/lib/graphics/importer/texture.h

    r4466 r4746  
    2525  //  Texture(TEXTURE_TYPE type, int resolution);
    2626
    27   ~Texture(void);
     27  ~Texture();
    2828
    2929  /** \returns The textureID of this texture.  */
    30   inline GLuint getTexture(void) {return this->texture;}
     30  inline GLuint getTexture() {return this->texture;}
    3131  GLuint loadTexToGL (SDL_Surface* surface);
    3232  /** \returns true if texture has alpha, false otherwise */
    33   inline bool hasAlpha(void) const {return bAlpha;}
     33  inline bool hasAlpha() const {return bAlpha;}
    3434
    3535  bool loadImage(const char* imageName);
  • orxonox/trunk/src/lib/graphics/light.cc

    r4739 r4746  
    7373   \brief destroys a Light
    7474*/
    75 Light::~Light(void)
     75Light::~Light()
    7676{
    7777  glDisable(lightsV[this->lightNumber]);
     
    181181   \brief draws this Light. Being a World-entity the possibility to do this lies at hand.
    182182*/
    183 void Light::draw(void) const
     183void Light::draw() const
    184184{
    185185  float pos[4] = {this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z, 1.0};
     
    192192   \brief Prints out some nice formated debug information about the Light
    193193*/
    194 void Light::debug(void) const
     194void Light::debug() const
    195195{
    196196  PRINT(0)(":: %d ::  -- reference %p\n", this->lightNumber, this);
     
    348348   \brief outputs debug information about the Class and its lights
    349349*/
    350 void LightManager::debug(void) const
     350void LightManager::debug() const
    351351{
    352352  PRINT(0)("=================================\n");
  • orxonox/trunk/src/lib/graphics/light.h

    r4738 r4746  
    2727 public:
    2828  Light(const TiXmlElement* root = NULL);
    29   virtual ~Light(void);
     29  virtual ~Light();
    3030
    3131  void loadParams(const TiXmlElement* root);
     
    3939
    4040  /** \returns the lightNumber*/
    41   int getLightNumber(void) const {return this->lightNumber;}
     41  int getLightNumber() const {return this->lightNumber;}
    4242
    4343  virtual void draw() const;
    4444
    45   void debug(void) const;
     45  void debug() const;
    4646
    4747  // attributes
     
    8484
    8585   for some nice output just use:
    86    \li void debug(void) const; (either on LightManager for a resume or on any Light for single information.)
     86   \li void debug() const; (either on LightManager for a resume or on any Light for single information.)
    8787*/
    8888class LightManager : public BaseObject
     
    9191
    9292 public:
    93   virtual ~LightManager(void);
     93  virtual ~LightManager();
    9494  /** \returns a Pointer to the only object of this Class */
    95   inline static LightManager* getInstance(void) { if (!singletonRef) singletonRef = new LightManager();  return singletonRef; };
     95  inline static LightManager* getInstance() { if (!singletonRef) singletonRef = new LightManager();  return singletonRef; };
    9696
    9797  void loadParams(const TiXmlElement* root);
     
    105105  void draw() const;
    106106
    107   void debug(void) const;
     107  void debug() const;
    108108
    109109 private:
    110   LightManager(void);
     110  LightManager();
    111111
    112112  int  registerLight(Light* light);
  • orxonox/trunk/src/lib/graphics/text_engine.cc

    r4709 r4746  
    7171   This also ereases the text from the textList of the TextEngine
    7272*/
    73 Text::~Text(void)
     73Text::~Text()
    7474{
    7575  TextEngine::getInstance()->deleteText(this);
     
    167167   this is only for TEXT_STATIC-mode
    168168*/
    169 void Text::createTexture(void)
     169void Text::createTexture()
    170170{
    171171  SDL_Surface* tmpSurf;
     
    187187   \brief draws the Font
    188188*/
    189 void Text::draw(void) const
     189void Text::draw() const
    190190{
    191191  // setting the Position of this Text.
     
    271271   \brief prints out some nice debug information about this text
    272272*/
    273 void Text::debug(void) const
     273void Text::debug() const
    274274{
    275275  PRINT(0)("=== TEXT: %s ===\n", this->text);
     
    415415   \brief destructs a font
    416416*/
    417 Font::~Font(void)
     417Font::~Font()
    418418{
    419419  // deleting the List of all Texts
     
    509509   \returns the maximum height of the Font, if the font was initialized, 0 otherwise
    510510*/
    511 int Font::getMaxHeight(void)
     511int Font::getMaxHeight()
    512512{
    513513  if (likely (this->font != NULL))
     
    522522   the ascent is the pixels of the font above the baseline
    523523*/
    524 int Font::getMaxAscent(void)
     524int Font::getMaxAscent()
    525525{
    526526  if (likely(this->font != NULL))
     
    535535   the descent is the pixels of the font below the baseline
    536536*/
    537 int Font::getMaxDescent(void)
     537int Font::getMaxDescent()
    538538{
    539539  if (likely(this->font != NULL))
     
    568568}
    569569
    570 GLuint Font::createFastTexture(void)
     570GLuint Font::createFastTexture()
    571571{
    572572  /* interesting GLYPHS:
     
    730730   openGL-version < 1.2 compatibility ( and because it is realy easy like this :))
    731731*/
    732 int Font::findOptimalFastTextureSize(void)
     732int Font::findOptimalFastTextureSize()
    733733{
    734734  int i;
     
    775775   \brief a simple function to get some interesting information about this class
    776776*/
    777 void Font::debug(void)
     777void Font::debug()
    778778{
    779779  // print the loaded font's style
     
    832832   \brief function to enable TTF_Fonts
    833833*/
    834 void TextEngine::enableFonts(void)
     834void TextEngine::enableFonts()
    835835{
    836836  if (!TTF_WasInit())
     
    848848   \brief function to disable TTF_fonts
    849849*/
    850 void TextEngine::disableFonts(void)
     850void TextEngine::disableFonts()
    851851{
    852852  if (TTF_WasInit())
     
    900900   \brief deletes all the Text, and tries to delete all allocated fonts
    901901*/
    902 void TextEngine::flush(void)
     902void TextEngine::flush()
    903903{
    904904  tIterator<Text>* textIterator = textList->getIterator();
     
    915915   \brief draws all the Texts that have been initialized
    916916*/
    917 void TextEngine::draw(void) const
     917void TextEngine::draw() const
    918918{
    919919  // entering 3D-mode
     
    937937   \todo there should also be something outputted about Font
    938938*/
    939 void TextEngine::debug(void) const
     939void TextEngine::debug() const
    940940{
    941941  PRINT(0)("+-------------------------------+\n");
     
    960960   \returns true if match, false otherwise
    961961*/
    962 bool TextEngine::checkVersion(void)
     962bool TextEngine::checkVersion()
    963963{
    964964  SDL_version compile_version;
  • orxonox/trunk/src/lib/graphics/text_engine.h

    r4662 r4746  
    108108  friend class TextEngine;
    109109 public:
    110   ~Text(void);
     110  ~Text();
    111111
    112112  void setBindNode(PNode* bindNode);
     
    124124  void createTexture();
    125125
    126   void draw(void) const;
    127 
    128   void debug(void) const;
     126  void draw() const;
     127
     128  void debug() const;
    129129
    130130 private:
     
    175175
    176176  /** \returns a Pointer to the Array of Glyphs */
    177   inline Glyph** getGlyphArray(void) const {return glyphArray;}
     177  inline Glyph** getGlyphArray() const {return glyphArray;}
    178178  /** \returns the texture to the fast-texture */
    179   inline GLuint getFastTextureID(void) const {return fastTextureID;}
    180 
    181  private:
    182   int getMaxHeight(void);
    183   int getMaxAscent(void);
    184   int getMaxDescent(void);
     179  inline GLuint getFastTextureID() const {return fastTextureID;}
     180
     181 private:
     182  int getMaxHeight();
     183  int getMaxAscent();
     184  int getMaxDescent();
    185185  Glyph* getGlyphMetrics(Uint16 character);
    186186
     
    188188
    189189  void initGlyphs(Uint16 from, Uint16 count);
    190   int findOptimalFastTextureSize(void);
    191 
    192   void debug(void);
     190  int findOptimalFastTextureSize();
     191
     192  void debug();
    193193
    194194 private:
     
    216216{
    217217 public:
    218   virtual ~TextEngine(void);
     218  virtual ~TextEngine();
    219219  /** \returns a Pointer to the only object of this Class */
    220   inline static TextEngine* getInstance(void) { if (!singletonRef) singletonRef = new TextEngine();  return singletonRef; };
     220  inline static TextEngine* getInstance() { if (!singletonRef) singletonRef = new TextEngine();  return singletonRef; };
    221221
    222222  Text* createText(const char* fontFile,
     
    228228
    229229  void deleteText(Text* text);
    230   void flush(void);
    231 
    232   void draw(void) const;
    233 
    234   void debug(void) const;
    235 
    236  private:
    237   TextEngine(void);
     230  void flush();
     231
     232  void draw() const;
     233
     234  void debug() const;
     235
     236 private:
     237  TextEngine();
    238238  static TextEngine* singletonRef;
    239239
    240240  // general
    241   static void enableFonts(void);
    242   static void disableFonts(void);
    243   static bool checkVersion(void);
     241  static void enableFonts();
     242  static void disableFonts();
     243  static bool checkVersion();
    244244
    245245 private:
Note: See TracChangeset for help on using the changeset viewer.