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_MESH_ARRAY_H
18 #define R2_MESH_ARRAY_H
21 #include "nel/3d/u_instance.h"
30 // An array of identical meshs instances.
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(); }
49 void setActive(bool active
);
50 bool getActive() const { return _Active
; }
52 std::string _ShapeName
;
53 std::vector
<NL3D::UInstance
> _MeshInstances
;