Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/importer/array.h @ 2963

Last change on this file since 2963 was 2847, checked in by bensch, 20 years ago

orxonox/trunk/importer: implemented destructors of Class Array and Class Material… working

File size: 855 bytes
RevLine 
[2842]1/*!
2  \file array.h
3  \brief Contains the Array Class that handles float arrays.
4  this class creates a Array of a semi-Dynamic length.
5  beware, that after finalizing the array may not be resized again.
6*/
7
[2776]8#ifndef _ARRAY_H
9#define _ARRAY_H
10
[2842]11extern int verbose; //!< will be obsolete soon
[2804]12
[2773]13#include <GL/gl.h>
14#include <GL/glu.h>
[2823]15#include <fstream>
[2842]16
17
18//! Array Class that handles dynamic-float arrays.
[2754]19class Array
20{
21 public:
22  Array ();
[2847]23  ~Array();
[2754]24
[2842]25  void initializeArray ();
[2754]26  void finalizeArray (void);
27  void addEntry (GLfloat entry);
28  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
29 
30  GLfloat* getArray ();
[2760]31  int getCount();
[2758]32  void debug(void);
[2754]33 private:
[2807]34  struct Entry
35  {
36    GLfloat value;
37    Entry* next;
38  };
39
[2754]40  GLfloat* array;
[2807]41  int entryCount;
[2809]42  bool finalized;
[2807]43  Entry* firstEntry;
44  Entry* currentEntry;
45 
46 
[2754]47};
[2776]48
49#endif
Note: See TracBrowser for help on using the repository browser.