Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/dave/src/array.h @ 3019

Last change on this file since 3019 was 2860, checked in by dave, 20 years ago

orxonox/branches/dave: das level hat jetzt form angenommen, stand:nach der Convention vom Samstag….

File size: 855 bytes
RevLine 
[2853]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
[2853]11extern int verbose; //!< will be obsolete soon
[2804]12
[2773]13#include <GL/gl.h>
14#include <GL/glu.h>
[2823]15#include <fstream>
[2853]16
17
18//! Array Class that handles dynamic-float arrays.
[2754]19class Array
20{
21 public:
22  Array ();
[2853]23  ~Array();
[2754]24
[2853]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.