Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / client / src / r2 / mesh_array.h
blobb794dd621c2b0a521e4a477df614a14239838b35
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_MESH_ARRAY_H
18 #define R2_MESH_ARRAY_H
21 #include "nel/3d/u_instance.h"
24 class CEntityCL;
27 namespace R2
30 // An array of identical meshs instances.
31 class CMeshArray
33 public:
34 CMeshArray();
35 ~CMeshArray();
36 // set the shape to be used. This reset the array
37 void setShapeName(const std::string &shapeName);
38 const std::string &getShapeName() const{ return _ShapeName; }
39 void resize(uint newSize);
40 uint getSize() const { return (uint)_MeshInstances.size(); }
41 NL3D::UInstance &getInstance(uint index);
42 const NL3D::UInstance &getInstance(uint index) const;
43 NL3D::UInstance operator[](uint index) { return getInstance(index); }
44 const NL3D::UInstance operator[](uint index) const { return getInstance(index); }
45 void clear() { resize(0); }
46 void setEmissive(NLMISC::CRGBA color);
47 bool empty() const { return _MeshInstances.empty(); }
48 // show / hide
49 void setActive(bool active);
50 bool getActive() const { return _Active; }
51 private:
52 std::string _ShapeName;
53 std::vector<NL3D::UInstance> _MeshInstances;
54 bool _Active;
57 } // R2
59 #endif