Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/shadows/src/importer/array.h @ 3728

Last change on this file since 3728 was 3196, checked in by bensch, 20 years ago

orxonox/trunk: moved importer into the Trunk, now no merging is needed anymore.

File size: 1.3 KB
Line 
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
8#ifndef _ARRAY_H
9#define _ARRAY_H
10
11extern int verbose; //!< will be obsolete soon
12
13#include "../stdincl.h"
14#include <fstream>
15
16
17//! Array Class that handles dynamic-float arrays.
18class Array
19{
20 public:
21  Array ();
22  ~Array();
23
24  void initializeArray ();
25  void finalizeArray (void);
26  void addEntry (GLfloat entry);
27  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
28 
29  GLfloat* getArray ();
30  int getCount();
31  void debug(void);
32 private:
33  //! One entry of the Array
34  struct Entry
35  {
36    GLfloat value;  //!< The value of this Entry.
37    Entry* next;    //!< Pointer to the Next entry.
38  };
39
40  GLfloat* array;      //!< The array that will be produced when finalizing the Array.
41  int entryCount;      //!< The count of Entries in this Array.
42  bool finalized;      //!< If this variable is set to true, the Array can not be changed anymore. true if finalized, false else (initially).
43  Entry* firstEntry;   //!< Pointer to the first Entry of this Array
44  Entry* currentEntry; //!< Pointer to the current Entry of this Array. The one Entry we are working with.
45 
46 
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.