Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3184 was 3184, checked in by bensch, 21 years ago

orxonox/trunk: osX-compatibility

File size: 837 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
[3184]13#include "stdincl.h"
[2823]14#include <fstream>
[2842]15
16
17//! Array Class that handles dynamic-float arrays.
[2754]18class Array
19{
20 public:
21  Array ();
[2847]22  ~Array();
[2754]23
[2842]24  void initializeArray ();
[2754]25  void finalizeArray (void);
26  void addEntry (GLfloat entry);
27  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
28 
29  GLfloat* getArray ();
[2760]30  int getCount();
[2758]31  void debug(void);
[2754]32 private:
[2807]33  struct Entry
34  {
35    GLfloat value;
36    Entry* next;
37  };
38
[2754]39  GLfloat* array;
[2807]40  int entryCount;
[2809]41  bool finalized;
[2807]42  Entry* firstEntry;
43  Entry* currentEntry;
44 
45 
[2754]46};
[2776]47
48#endif
Note: See TracBrowser for help on using the repository browser.