Planeshift
pawsgenericview.h
Go to the documentation of this file.
1 /*
2  * Author: Andrew Craig
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef PAWS_GENERIC_VIEW_HEADER
20 #define PAWS_GENERIC_VIEW_HEADER
21 
22 #include <iengine/camera.h>
23 #include <csutil/deprecated_warn_off.h>
24 #include <iengine/engine.h>
25 #include <csutil/deprecated_warn_on.h>
26 #include <iengine/light.h>
27 #include <iengine/material.h>
28 #include <iengine/mesh.h>
29 #include <iengine/movable.h>
30 #include <iengine/sector.h>
31 
32 #include <imesh/object.h>
33 #include <imesh/sprite3d.h>
34 
35 #include <cstool/csview.h>
36 #include <csutil/leakguard.h>
37 
38 #include "pawswidget.h"
39 
40 struct iCollection;
41 
50 {
51 public:
54  pawsGenericView(const pawsGenericView &origin);
57  bool Setup(iDocumentNode* node);
58 
66  bool LoadMap(const char* map, const char* sector = 0);
67 
68  void Draw();
69 
70  iView* GetView()
71  {
72  return view;
73  }
74 
75  const char* GetMapName() const
76  {
77  return mapName;
78  }
79 
80 private:
81  bool CreateArea();
82 
83  csRef<iSector> stage;
84  csRef<iView> view;
85  csRef<iEngine> engine;
86  csRef<iCollection> col;
87 
88  csVector3 objectPos;
89  static int idName;
90 
91  csString mapName;
92  bool loadedMap;
93 };
95 
96 
99 #endif
This widget is used to view a mesh in it&#39;s own seperate world.
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
const char * GetMapName() const
CREATE_PAWS_FACTORY(pawsGenericView)
void Draw()
Draws the widget and all of it&#39;s children.
bool Setup(iDocumentNode *node)
Creates the room ( world ) for the mesh to be placed.
bool LoadMap(const char *map, const char *sector=0)
Loads a map to use as the backdrop.