1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2011 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
33 FastTriangleIterator::getIndex(Int32 which) const
35 return Inherited::getIndex(_triPntIndex[which]);
39 FastTriangleIterator::getIndex(void) const
45 FastTriangleIterator::getPropertyIndex(UInt16 att, Int32 which) const
47 return Inherited::getPropertyIndex(att, _triPntIndex[which]);
50 template <class ReturnT>
52 FastTriangleIterator::getPropertyValue(UInt16 att, Int32 which) const
54 Int32 ind = getPropertyIndex(att, which);
56 return _props[att]->getValue<ReturnT>(ind);
59 inline FastTriangleIterator
60 FastTriangleIterator::operator++(int)
62 FastTriangleIterator returnValue(*this);
70 FastTriangleIterator::operator<(const FastTriangleIterator &lhs) const
72 return (*static_cast<const Inherited *>(this) < lhs) ||
73 ( (*static_cast<const Inherited *>(this) == lhs) &&
74 _triIndex < lhs._triIndex);
78 FastTriangleIterator::operator==(const FastTriangleIterator &lhs) const
80 if(isAtEnd() && lhs.isAtEnd())
83 if(isAtEnd() || lhs.isAtEnd())
86 return (*static_cast<const Inherited *>(this) == lhs ) &&
87 (_triIndex == lhs._triIndex);
91 FastTriangleIterator::operator!=(const FastTriangleIterator &lhs) const
93 return !(*this == lhs);