Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

S5cockpit.h

Go to the documentation of this file.
00001 // ///////////////////  ***********************  \\\\\\\\\\\\\\\\\\\\ \\
00002 //
00003 //  This file is part of the Sector 5, 3D graphic game.
00004 //  Copyright (C) 2000-2002 by PC John. All rights reserved.
00005 //
00006 //  This game is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU Lesser General Public License
00008 //  version 2.1 as published by the Free Software Foundation. See the
00009 //  file LICENSE.LGPL at the root directory of the distribution for
00010 //  more details.
00011 //
00012 //  If you want to use Sector 5 code for applications not compatible 
00013 //  with the LGPL license, please contact PC John at pcjohn@email.cz.
00014 //
00015 // \\\\\\\\\\\\\\\\\\\  ***********************  //////////////////// //
00016 
00017 
00018 #ifndef S5_COCKPIT_H_INCLUDED_
00019 #define S5_COCKPIT_H_INCLUDED_
00020 
00021 
00022 #include <Inventor/nodes/SoSeparator.h>
00023 #include <Inventor/nodes/SoText2.h>
00024 
00025 
00026 class S5cockpit
00027 {
00028 public:
00029 
00030   static SoSeparator* init();
00031   static void done();
00032 
00033   static void fpsReset();
00034   static void fpsTick();
00035 
00036   static const char* getFPSstring(int line = 0)  { return root ? fpsString->string.getValues(line)->getString() : NULL; }
00037   static void setFPSstring(const char *s)  { assert(root); fpsString->string.setValue(s); }
00038 
00039 private:
00040 
00041   static SoSeparator *root;
00042   static SoText2 *fpsString;
00043 
00044   static void callback(void *userData, SoAction *action);
00045   static void rearrange();
00046         
00047 };
00048 
00049 
00050 #endif /* S5_COCKPIT_H_INCLUDED_ */

Generated on Sun Feb 17 21:42:33 2002 for Sector 5 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001