1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
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/>.
19 #include "nel/3d/vegetable_instance_group.h"
29 // ***************************************************************************
30 CVegetableInstanceGroup::CVegetableInstanceGroup()
34 _HasZSortPassInstances
= false;
35 _TriangleQuadrantOrderNumTriangles
= 0;
42 // ***************************************************************************
43 CVegetableInstanceGroup::~CVegetableInstanceGroup()
49 // ***************************************************************************
50 void CVegetableInstanceGroup::linkBeforeUL(CVegetableInstanceGroup
*igNext
)
54 // first, unlink others from me. NB: works even if _ULPrec==_ULNext==this.
55 _ULNext
->_ULPrec
= _ULPrec
;
56 _ULPrec
->_ULNext
= _ULNext
;
59 _ULPrec
= igNext
->_ULPrec
;
61 _ULNext
->_ULPrec
= this;
62 _ULPrec
->_ULNext
= this;
65 // ***************************************************************************
66 void CVegetableInstanceGroup::unlinkUL()
68 // unlink others from me. NB: works even if _ULPrec==_ULNext==this.
69 _ULNext
->_ULPrec
= _ULPrec
;
70 _ULPrec
->_ULNext
= _ULNext
;
77 // ***************************************************************************
78 CVegetableInstanceGroupReserve::CVegetableInstanceGroupReserve()
83 // ***************************************************************************
84 bool CVegetableInstanceGroup::isEmpty() const
86 for(uint i
=0; i
<NL3D_VEGETABLE_NRDRPASS
; i
++)
88 const CVegetableRdrPass
&vegetRdrPass
= _RdrPass
[i
];
89 // If some triangles to render, the ig is not empty
90 if(vegetRdrPass
.NTriangles
!= 0)
94 // for all pass, no triangles to render => the ig is empty.