Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / client / src / outpost.h
blob2380b969f1bf2e5df185b0434995eb9ff57f15e3
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef NL_OUTPOST_H
18 #define NL_OUTPOST_H
20 #include "nel/misc/types_nl.h"
21 #include "nel/misc/vector.h"
22 #include "nel/misc/quat.h"
23 #include "nel/misc/smart_ptr.h"
24 #include "client_sheets/continent_sheet.h"
25 #include "game_share/misc_const.h"
28 class CVillage;
31 // ***************************************************************************
32 /**
33 * Class to manage an outpost on client:
34 * - collisions
35 * - display in 3D through a CVillage* (nb: used only to display ruins now)
36 * Yoyo: ugly: wait for static object and collision stuff
38 class COutpost
40 public:
42 COutpost();
43 COutpost(const COutpost &other);
44 COutpost &operator=(const COutpost &) {nlstop;/*forbidden*/return *this;}
45 ~COutpost();
47 /// Build the outpost
48 bool setupOutpost(const CContinentParameters::CZC &zone, sint32 outpostId, CVillage *village);
50 // Get the outpost Id. -1 if not setuped
51 sint32 getOutpostId () const {return _OutpostId;}
53 // Set the building properties
54 void setBuildingPosition (uint building, const NLMISC::CQuat &rot, const NLMISC::CVector &position);
56 // Register Collisions
57 void initOutpost ();
59 // Remove Collisions
60 void removeOutpost ();
62 private:
63 // Outpost building
64 class CBuilding
66 public:
67 CBuilding() {Position= NLMISC::CVector::Null; Rotation= NLMISC::CQuat::Identity;}
68 NLMISC::CQuat Rotation;
69 NLMISC::CVector Position;
71 CBuilding _Buildings[RZ_MAX_BUILDING_PER_OUTPOST];
72 std::vector<NLPACS::UMovePrimitive *> _AddedPrims;
74 // Outpost number
75 sint _OutpostId;
77 // We may want to display the village as ruins
78 NLMISC::CRefPtr<CVillage> _Village;
82 #endif // NL_OUTPOST_H
84 /* End of outpost.h */