Planeshift

pawsgenericview.h

Go to the documentation of this file.
00001 /*
00002  * Author: Andrew Craig
00003  *
00004  * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org)
00005  *
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation (version 2 of the License)
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017  *
00018  */
00019 #ifndef PAWS_GENERIC_VIEW_HEADER
00020 #define PAWS_GENERIC_VIEW_HEADER
00021 
00022 #include <iengine/camera.h>
00023 #include <csutil/deprecated_warn_off.h>
00024 #include <iengine/engine.h>
00025 #include <csutil/deprecated_warn_on.h>
00026 #include <iengine/light.h>
00027 #include <iengine/material.h>
00028 #include <iengine/mesh.h>
00029 #include <iengine/movable.h>
00030 #include <iengine/sector.h>
00031 
00032 #include <imesh/object.h>
00033 #include <imesh/sprite3d.h>
00034 
00035 #include <cstool/csview.h>
00036 #include <csutil/leakguard.h>
00037 
00038 #include "pawswidget.h"
00039 
00040 struct iCollection;
00041 
00049 class pawsGenericView : public pawsWidget
00050 {
00051 public:
00052     pawsGenericView();
00053     ~pawsGenericView();
00054     pawsGenericView(const pawsGenericView &origin);
00057     bool Setup(iDocumentNode* node);
00058 
00066     bool LoadMap(const char* map, const char* sector = 0);
00067 
00068     void Draw();
00069 
00070     iView* GetView()
00071     {
00072         return view;
00073     }
00074 
00075     const char* GetMapName() const
00076     {
00077         return mapName;
00078     }
00079 
00080 private:
00081     bool CreateArea();
00082 
00083     csRef<iSector> stage;
00084     csRef<iView>   view;
00085     csRef<iEngine> engine;
00086     csRef<iCollection> col;
00087 
00088     csVector3 objectPos;
00089     static int idName;
00090 
00091     csString mapName;
00092     bool loadedMap;
00093 };
00094 CREATE_PAWS_FACTORY(pawsGenericView);
00095 
00096 
00099 #endif