Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

FrameRateTracker.h

Go to the documentation of this file.
00001 /*
00002  * FrameRateTracker.h
00003  *
00004  * Part of Fly! Legacy project
00005  *
00006  * Copyright 2005 Chris Wallace
00007  *
00008  * Fly! Legacy is free software; you can redistribute it and/or modify
00009  *   it under the terms of the GNU General Public License as published by
00010  *   the Free Software Foundation; either version 2 of the License, or
00011  *   (at your option) any later version.
00012  *
00013  * Fly! Legacy is distributed in the hope that it will be useful,
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *   GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  *   along with Fly! Legacy; if not, write to the Free Software
00020  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00029 #ifndef FRAMERATETRACKER_H
00030 #define FRAMERATETRACKER_H
00031 
00032 class CFrameRateTracker {
00033 public:
00034   // Constructors/Destructor
00035   CFrameRateTracker (unsigned int maxSamples);
00036   ~CFrameRateTracker (void);
00037 
00038   // CFrameRateTracker methods
00039   void          SetMaxSamples (unsigned int maxSamples);
00040   unsigned int  GetMaxSamples (void);
00041   unsigned int  GetActualSamples (void);
00042   float         GetSample (unsigned int i);
00043   void          GetSamples (float *samples);
00044   void          AddSample (float);
00045   void          ClearSamples (void);
00046 
00047 protected:
00048   unsigned int  maxSamples;
00049   unsigned int  actualSamples;
00050   unsigned int  nextSample;
00051   float         *samples;
00052 };
00053 
00054 #endif
SourceForge.net Logo Documentation generated by doxygen