1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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"
31 /** class to display a primitive (zone or roads)
32 * Used by both CDisplayerVisualRoad && CToolDrawRoad
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);
51 CMeshArray _VertexMeshs;
52 CMeshArray _EdgeMeshs;
57 class CDisplayerVisualRoad : public CDisplayerVisual
60 NLMISC_DECLARE_CLASS(R2::CDisplayerVisualRoad);
62 ~CDisplayerVisualRoad();
63 virtual void onCreate();
64 // from ISelectableObject
65 virtual bool isSelectable() const { return false; }