Added spawnCrystalItem
[ryzomcore.git] / ryzom / client / src / r2 / displayer_visual_road.h
blobd31cf9dbac833908fdf6304b8724878b6aee46dc
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 R2_VISUAL_DISPLAYER_ROAD_H
18 #define R2_VISUAL_DISPLAYER_ROAD_H
20 #include "displayer_visual.h"
22 #include "mesh_array.h"
25 class CEntityCL;
28 namespace R2
31 /** class to display a primitive (zone or roads)
32 * Used by both CDisplayerVisualRoad && CToolDrawRoad
36 class CPrimRender2
38 public:
39 CPrimRender2();
40 void setVertexShapeName(const std::string &name);
41 void setEdgeShapeName(const std::string &name);
42 // set zway points for the road. This also update the content of the scene
43 void setPoints(const std::vector<NLMISC::CVector> &wp, bool lastIsValid, bool closed);
44 void setVertexScale(float scale) { _VertexScale = scale; }
46 const CMeshArray &getVertices() const { return _VertexMeshs; }
47 const CMeshArray &getEdges() const { return _EdgeMeshs; }
48 void setEmissive(NLMISC::CRGBA color);
49 private:
50 float _VertexScale;
51 CMeshArray _VertexMeshs;
52 CMeshArray _EdgeMeshs;
57 class CDisplayerVisualRoad : public CDisplayerVisual
59 public:
60 NLMISC_DECLARE_CLASS(R2::CDisplayerVisualRoad);
61 // dtor
62 ~CDisplayerVisualRoad();
63 virtual void onCreate();
64 // from ISelectableObject
65 virtual bool isSelectable() const { return false; }
66 private:
67 CRoad _Road;
68 private:
69 void rebuild();
73 } // R2
75 #endif