Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2853 in orxonox.OLD for orxonox/trunk/src/array.cc


Ignore:
Timestamp:
Nov 14, 2004, 6:41:02 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/src: merged importer to trunk again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/array.cc

    r2835 r2853  
    1616#include "array.h"
    1717
     18/**
     19   \brief creates a new Array
     20*/
    1821Array::Array ()
    1922{
    20   createArray ();
     23  initializeArray ();
    2124}
    2225
    23 void Array::createArray ()
     26/**
     27   \brief deletes an Array.
     28   It does this by first deleting all the array-entries, and then delete the array[] itself
     29*/
     30Array::~Array()
     31{
     32  if (verbose >= 2)
     33    printf("deleting array\n");
     34  Entry* walker = firstEntry;
     35  Entry* last;
     36  while (walker != NULL)
     37    {
     38      last = walker;
     39      walker = walker->next;
     40      delete last;
     41    }
     42  if (finalized)
     43    delete [] array;
     44}
     45
     46/**
     47   \brief initializes an Array
     48   the Function does this by setting up a fistEntry, and setting the entryCount.
     49*/
     50void Array::initializeArray ()
    2451{
    2552  if (verbose >= 2)
     
    3360}
    3461
     62/**
     63   \brief finalizes an array.
     64   This Function creates the array, and makes it ready to be sent to the application.
     65*/
    3566void Array::finalizeArray (void)
    3667{
     
    4980}
    5081
    51 
     82/**
     83   \brief adds a new Entry to the Array
     84   \param entry Entry to add.
     85*/
    5286void Array::addEntry (GLfloat entry)
    5387{
     
    68102}
    69103
     104/**
     105   \brief Adds 3 entries at once (convenience)
     106*/
    70107void Array::addEntry (GLfloat entry0, GLfloat entry1, GLfloat entry2)
    71108{
     
    75112}
    76113 
    77 
     114/**
     115   \brief Gives back the array !! MUST be executed AFTER finalize.
     116   \returns The created array.
     117*/
    78118GLfloat* Array::getArray ()
    79119{
     
    81121}
    82122
     123/**
     124   \returns The Count of entries in the Array
     125*/
    83126int Array::getCount()
    84127{
     
    86129}
    87130
    88 
    89 
     131/**
     132   \brief Simple debug info about the Array
     133*/
    90134void Array::debug ()
    91135{
Note: See TracChangeset for help on using the changeset viewer.