Show bonus/malus timer text if available
[ryzomcore.git] / nel / src / 3d / mrm_mesh.cpp
blob03cdebeee9fa4cdae713986cf2a697fc7c768681
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
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 #include "std3d.h"
19 #include "nel/3d/mrm_mesh.h"
20 #include <algorithm>
22 using namespace std;
24 #ifdef DEBUG_NEW
25 #define new DEBUG_NEW
26 #endif
28 namespace NL3D
32 // ***************************************************************************
33 uint CMRMMeshFinal::CWedge::NumAttributesToCompare= 0;
34 bool CMRMMeshFinal::CWedge::CompareSkinning= false;
37 // ***************************************************************************
38 CMRMMesh::CMRMMesh()
40 NumAttributes= 0;
45 // ***************************************************************************
46 sint CMRMMeshFinal::findInsertWedge(const CWedge &w)
48 sint ret;
49 TWedgeMap::iterator it;
50 it= _WedgeMap.find(w);
52 // if not found, must add it.
53 if(it==_WedgeMap.end())
55 ret= (sint)Wedges.size();
56 // insert into the map, with good id.
57 _WedgeMap.insert(make_pair(w, ret));
58 // add it to the array.
59 Wedges.push_back(w);
61 else
63 ret= it->second;
66 return ret;
69 // ***************************************************************************
70 CMRMMeshFinal::CWedge::CWedge()
72 Vertex = NLMISC::CVector::Null;
73 NSkinMatUsed = 0;
74 for (uint k = 0; k < NL3D_MRM_MAX_ATTRIB; ++k)
76 Attributes[k].set(0, 0, 0, 0);
80 } // NL3D