#include <local_retriever.h>
Nevrax France
Definition at line 190 of file local_retriever.h.
Public Member Functions | |
CIterator (const CLocalRetriever *retriever, uint chain) | |
Constructor. | |
bool | end () const |
Test end. | |
CVector | get3d () const |
CVector2s | operator * () const |
CIterator & | operator++ () |
Protected Attributes | |
uint16 | _Chain |
Chain Id. | |
sint16 | _IndexInOChain |
The current vertex in ochain. | |
sint16 | _MaxIndexInOChain |
Max index in ochain. | |
bool | _OChainForward |
Is ochain forward? | |
uint16 | _OChainIndex |
The current ochain in chain. | |
const CLocalRetriever * | _Retriever |
The referent retriever. | |
Private Member Functions | |
void | setupIndex () |
Setup index in ochain. | |
Friends | |
class | CLocalRetriever |
|
Constructor.
Definition at line 215 of file local_retriever.h. References _Chain, _OChainIndex, _Retriever, setupIndex(), and uint.
00216 { 00217 _Retriever = retriever; 00218 _Chain = chain; 00219 _OChainIndex = 0; 00220 setupIndex(); 00221 } |
|
Test end.
Definition at line 265 of file local_retriever.h. References _Chain, _OChainIndex, _Retriever, NLPACS::CLocalRetriever::getChain(), and NLPACS::CChain::getSubChains(). Referenced by get3d(), and operator *().
00266 { 00267 return (_OChainIndex >= _Retriever->getChain(_Chain).getSubChains().size()); 00268 } |
|
Definition at line 257 of file local_retriever.h. References _Chain, _IndexInOChain, _OChainIndex, _Retriever, end(), NLPACS::CLocalRetriever::getChain(), NLPACS::CLocalRetriever::getFullOrderedChain(), and NLPACS::CChain::getSubChain().
00258 { 00259 if (end()) 00260 return CVector::Null; 00261 return _Retriever->getFullOrderedChain(_Retriever->getChain(_Chain).getSubChain(_OChainIndex))[_IndexInOChain]; 00262 } |
|
Definition at line 250 of file local_retriever.h. References _Chain, _IndexInOChain, _OChainIndex, _Retriever, end(), NLPACS::CLocalRetriever::getChain(), NLPACS::CLocalRetriever::getOrderedChain(), and NLPACS::CChain::getSubChain().
00251 { 00252 if (end()) 00253 return CVector2s(); 00254 return _Retriever->getOrderedChain(_Retriever->getChain(_Chain).getSubChain(_OChainIndex))[_IndexInOChain]; 00255 } |
|
Definition at line 223 of file local_retriever.h. References _Chain, _IndexInOChain, _MaxIndexInOChain, _OChainForward, _OChainIndex, _Retriever, NLPACS::CLocalRetriever::getChain(), NLPACS::CChain::getSubChains(), setupIndex(), and sint.
00224 { 00225 const CChain &chain = _Retriever->getChain(_Chain); 00226 if (_OChainIndex >= chain.getSubChains().size()) 00227 return *this; 00228 00229 if (_OChainForward) 00230 { 00231 ++_IndexInOChain; 00232 if (((sint)_OChainIndex < (sint)chain.getSubChains().size()-1 && _IndexInOChain == _MaxIndexInOChain) || _IndexInOChain > _MaxIndexInOChain) 00233 { 00234 ++_OChainIndex; 00235 setupIndex(); 00236 } 00237 } 00238 else 00239 { 00240 --_IndexInOChain; 00241 if (((sint)_OChainIndex < (sint)chain.getSubChains().size()-1 && _IndexInOChain == 0) || _IndexInOChain < 0) 00242 { 00243 ++_OChainIndex; 00244 setupIndex(); 00245 } 00246 } 00247 return *this; 00248 } |
|
Setup index in ochain.
Definition at line 272 of file local_retriever.h. References _Chain, _IndexInOChain, _MaxIndexInOChain, _OChainForward, _OChainIndex, _Retriever, NLPACS::CLocalRetriever::getChain(), NLPACS::CLocalRetriever::getOrderedChain(), NLPACS::CChain::getSubChain(), NLPACS::CChain::getSubChains(), NLPACS::COrderedChain::getVertices(), and NLPACS::COrderedChain::isForward(). Referenced by CIterator(), and operator++().
00273 { 00274 const CChain &chain = _Retriever->getChain(_Chain); 00275 if (_OChainIndex >= chain.getSubChains().size()) 00276 return; 00277 const COrderedChain &ochain = _Retriever->getOrderedChain(chain.getSubChain(_OChainIndex)); 00278 _OChainForward = ochain.isForward(); 00279 _MaxIndexInOChain = ochain.getVertices().size()-1; 00280 _IndexInOChain = (_OChainForward ? 0 : _MaxIndexInOChain); 00281 } |
|
Definition at line 192 of file local_retriever.h. |
|
Chain Id.
Definition at line 199 of file local_retriever.h. Referenced by CIterator(), end(), get3d(), operator *(), operator++(), and setupIndex(). |
|
The current vertex in ochain.
Definition at line 205 of file local_retriever.h. Referenced by get3d(), operator *(), operator++(), and setupIndex(). |
|
Max index in ochain.
Definition at line 208 of file local_retriever.h. Referenced by operator++(), and setupIndex(). |
|
Is ochain forward?
Definition at line 211 of file local_retriever.h. Referenced by operator++(), and setupIndex(). |
|
The current ochain in chain.
Definition at line 202 of file local_retriever.h. Referenced by CIterator(), end(), get3d(), operator *(), operator++(), and setupIndex(). |
|
The referent retriever.
Definition at line 196 of file local_retriever.h. Referenced by CIterator(), end(), get3d(), operator *(), operator++(), and setupIndex(). |