C:/irrlicht/IrrLib/IrrLib.h

Go to the documentation of this file.
00001 /*
00002     Irrlicht Library Wrapper
00003     Created by:
00004         Nathan Adams
00005         Denzel Morris
00006     Copyright (C) 2007
00007 
00008     This software is licensed under the GNU/GPL.
00009     This software may not be used for commerical purposes.
00010 */
00011 
00012 #ifndef IRRLIB_H
00013 #define IRRLIB_H
00014 
00015 /* We should include some basic functions */
00016 #include <iostream>
00017 /* include strings */
00018 #include <strings.h>
00019 #include <irrlicht.h>
00020 #include <time.h>
00021 
00022 /* We have to include Irrlichts libs */
00023 
00024 
00025 #include "Irr3D.h"
00026 #include "IrrColor.h"
00027 #include "IrrLibGUI.h"
00028 #include "IrrEventReciever.h"
00029 #include "Irr2D.h"
00030 #include "IrrLibBase.h"
00031 #include "IrrData.h"
00032 
00033 /*struct IrrObj {
00034     int eventid;
00035     int objectid;
00036 };*/
00037 
00038 //Start class
00039 class IrrLib: public IrrLibBase {
00040 
00041     private:
00042     /* Create an Irrlicht device as private because the class should handle
00043         All irrlicht interaction */
00044         //irr::IrrlichtDevice *device;
00045                 //In IrrLibBase
00046     // Tells Irrlicht what driver to use
00047         //video::E_DRIVER_TYPE driverType;
00048 
00049     /*
00050         Get a pointer to the video driver and the SceneManager so that
00051         we do not always have to write device->getVideoDriver() and
00052         device->getSceneManager().
00053         */
00054         /*irr::video::IVideoDriver* driver;
00055         irr::scene::ISceneManager* smgr;*/
00056                 //In IrrLibBase
00057         irr::gui::IGUIEnvironment* env;
00058 
00059     /*
00060     Get a pointer to the 'mesh' aka the level.
00061     Note: This is for Quake3 levels, ie bsp maps.
00062     */
00063         irr::scene::IAnimatedMesh* mesh;
00064         irr::scene::ISceneNode* node;
00065         irr::scene::ISceneNode * tempNode; //use this to store nodeNew's data so we can resize it
00066         irr::scene::ICameraSceneNode * cam;
00067         char key;
00068 
00069 
00070         void IrrLib::Init();
00071                 /*friend class IrrColor;
00072                 friend class Irr2DLib;
00073                 friend class Sphere;*/
00074                 friend class IrrEventReciever;
00075                 irr::u32 tick;
00076                 irr::ITimer* timer;
00077     public:
00078         //IrrSphere Sphere; //This has to be public to be able to access the Sphere class
00079                 /* IrrSphere is now in Irr3D class */
00080                 //Prehaps put this into a IrrLib3D class?
00081                 Irr3D Irr3DLib;
00082                 IrrColor Color; //Color class...not much of a class but lets keep it OO
00083                 Irr2D Irr2DLib; //1/2 variable to be labeled like this due to variables not able to begin with a number
00084                 IrrLibGUI GUI;
00085                 IrrEventReciever IrrEvent;
00086         IrrLib::IrrLib();
00087         //IrrLib::IrrLib(MastEventReceiver & receiver);
00088         IrrLib::IrrLib(irr::video::E_DRIVER_TYPE drivertype, irr::core::dimension2d<irr::s32> & res, irr::u32 bits, bool fullscreen, bool stencilbuffer, bool vsync);
00089         IrrLib::IrrLib(int drivertype, int width, int height, int bits, bool fullscreen, bool stencilbuffer, bool vsync);
00090         IrrLib::~IrrLib(); //Our moms wont clean up after us!
00091         void IrrLib::ReadArchive(irr::core::stringc file);
00092         void IrrLib::LoadQ3Level(irr::core::stringc q3level);
00093         void IrrLib::MapPos(int x, int y, int z); //I think this moves the actual camera?
00094         void IrrLib::MapPos();
00095         void IrrLib::AddFPSCam();
00096         void IrrLib::AddFPSCam(irr::f32 x, irr::f32 y, irr::f32 z);
00097         void IrrLib::VisibleCursor(bool tf);
00098         int IrrLib::GetFPSCount();
00099         bool IrrLib::DeviceIsRunning();
00100         bool IrrLib::IsActiveWindow();
00101         void IrrLib::BeginScene();
00102         void IrrLib::BeginScene(const irr::video::SColor& color);
00103                 //void IrrLib::BeginScene(irr::video::SColor * color);
00104         void IrrLib::BeginScene(bool usebackBuffer, bool usezBuffer, irr::video::SColor color);
00105         //TODO: Add one more for human readable colors and hex colors!
00106         void IrrLib::DrawAll();
00107         void IrrLib::EndScene();
00108         void IrrLib::SetWindowCaption(irr::core::stringw str);
00109         irr::core::stringw IrrLib::GetDriverName();
00110         //TODO: Make function to turn stringw to string and visa versa
00111         void IrrLib::EndIrrlicht(); //Renamed from KillIrrlicht to EndIrrlicht
00112         //TODO: Add logging
00113         void IrrLib::KeyPress(char key);
00114         char IrrLib::KeyPressed();
00115         irr::f32 getX();
00116         irr::f32 getY();
00117         irr::f32 getZ();
00118                 bool CheckGameLoop();
00119                 bool CheckGameLoop(irr::u32 ms);
00120                 void Exit();
00121                 PixelSize GetScreenSize();
00122                 //void EndGameLoop();
00123                 //template <class T> std::string to_string (T t);
00124 
00125 };
00126 
00127 #endif

Generated on Thu Dec 27 18:25:19 2007 for IrrLib by  doxygen 1.5.4