NL3D::CTessFacePriorityList::CRollingTable Class Reference


Detailed Description

A single rolling table <=> HTable.

Definition at line 199 of file tess_face_priority_list.h.

Public Member Functions

void clearRollTable ()
 CRollingTable ()
CTessFacePListNodegetRollTableEntry (uint entry)
void init (uint numEntries)
void insertInRollTable (uint entry, CTessFace *value)
void shiftEntries (uint entryShift, CTessFacePListNode &pulledElements)
 append elements shifted and shift

void shiftRollTable (uint shiftEntry)
 ~CRollingTable ()

Data Fields

NLMISC::CVector QuadrantDirection
float Remainder

Private Member Functions

void clearRollTableEntry (uint entry)

Private Attributes

std::vector< CTessFacePListNode_Entries
uint _EntryStart
uint _MaskEntries
uint _NEntries


Constructor & Destructor Documentation

NL3D::CTessFacePriorityList::CRollingTable::CRollingTable  ) 
 

Definition at line 395 of file tess_face_priority_list.cpp.

References _EntryStart, _MaskEntries, _NEntries, and Remainder.

00396 {
00397         _EntryStart= 0;
00398         _NEntries= 0;
00399         _MaskEntries= 0;
00400         Remainder= 0;
00401 }

NL3D::CTessFacePriorityList::CRollingTable::~CRollingTable  ) 
 

Definition at line 404 of file tess_face_priority_list.cpp.

References clearRollTable().

00405 {
00406         clearRollTable();
00407 }


Member Function Documentation

void NL3D::CTessFacePriorityList::CRollingTable::clearRollTable  ) 
 

Definition at line 465 of file tess_face_priority_list.cpp.

References _EntryStart, _NEntries, clearRollTableEntry(), Remainder, and uint.

Referenced by ~CRollingTable().

00466 {
00467         for(uint i=0; i<_NEntries; i++)
00468         {
00469                 clearRollTableEntry(i);
00470         }
00471         _EntryStart= 0;
00472         // For convenience only (not really usefull).
00473         Remainder= 0;
00474 }

void NL3D::CTessFacePriorityList::CRollingTable::clearRollTableEntry uint  entry  )  [private]
 

Definition at line 438 of file tess_face_priority_list.cpp.

References _Entries, _EntryStart, _MaskEntries, NL3D::CTessFacePListNode::nextInPList(), uint, and NL3D::CTessFacePListNode::unlinkInPList().

Referenced by clearRollTable(), and shiftRollTable().

00439 {
00440         CTessFacePListNode      &root= _Entries[ (entry + _EntryStart) & _MaskEntries ];
00441 
00442         // clear all the list.
00443         while( root.nextInPList() != &root )
00444         {
00445                 // unlink from list
00446                 CTessFacePListNode      *node= root.nextInPList();
00447                 node->unlinkInPList();
00448         }
00449 }

CTessFacePListNode & NL3D::CTessFacePriorityList::CRollingTable::getRollTableEntry uint  entry  ) 
 

Definition at line 431 of file tess_face_priority_list.cpp.

References _Entries, _EntryStart, _MaskEntries, and uint.

Referenced by NL3D::CTessFacePriorityList::shift(), and shiftEntries().

00432 {
00433         CTessFacePListNode      &root= _Entries[ (entry + _EntryStart) & _MaskEntries ];
00434         return root;
00435 }

void NL3D::CTessFacePriorityList::CRollingTable::init uint  numEntries  ) 
 

Definition at line 411 of file tess_face_priority_list.cpp.

References _Entries, _EntryStart, _MaskEntries, _NEntries, Remainder, and uint.

00412 {
00413         _EntryStart= 0;
00414         _NEntries= numEntries;
00415         _MaskEntries= _NEntries-1;
00416         Remainder= 0;
00417         _Entries.resize(numEntries);
00418 }

void NL3D::CTessFacePriorityList::CRollingTable::insertInRollTable uint  entry,
CTessFace value
 

Definition at line 422 of file tess_face_priority_list.cpp.

References _Entries, _EntryStart, _MaskEntries, uint, and value.

Referenced by NL3D::CTessFacePriorityList::insert().

00423 {
00424         CTessFacePListNode      &root= _Entries[ (entry + _EntryStart) & _MaskEntries ];
00425 
00426         // Insert into list.
00427         value->linkInPList(root);
00428 }

void NL3D::CTessFacePriorityList::CRollingTable::shiftEntries uint  entryShift,
CTessFacePListNode pulledElements
 

append elements shifted and shift

Definition at line 477 of file tess_face_priority_list.cpp.

References NL3D::CTessFacePListNode::appendPList(), getRollTableEntry(), shiftRollTable(), and uint.

Referenced by NL3D::CTessFacePriorityList::shift().

00478 {
00479         if(entryShift>0)
00480         {
00481                 // before shifting the roll Table, fill pulledElements.
00482                 for(uint i=0; i<entryShift; i++)
00483                 {
00484                         // For all elements of the ith entry, pull them and isnert in result list.
00485                         pulledElements.appendPList(getRollTableEntry(i));
00486                 }
00487 
00488                 // shift the roll Table. lists are already empty.
00489                 shiftRollTable(entryShift);
00490         }
00491 }

void NL3D::CTessFacePriorityList::CRollingTable::shiftRollTable uint  shiftEntry  ) 
 

Definition at line 452 of file tess_face_priority_list.cpp.

References _EntryStart, _MaskEntries, clearRollTableEntry(), and uint.

Referenced by shiftEntries().

00453 {
00454         // delete all elements shifted.
00455         for(uint i=0; i<shiftEntry; i++)
00456         {
00457                 clearRollTableEntry(i);
00458         }
00459         // shift to right the ptr of entries.
00460         _EntryStart+= shiftEntry;
00461         _EntryStart= _EntryStart & _MaskEntries;
00462 }


Field Documentation

std::vector<CTessFacePListNode> NL3D::CTessFacePriorityList::CRollingTable::_Entries [private]
 

Definition at line 232 of file tess_face_priority_list.h.

Referenced by clearRollTableEntry(), getRollTableEntry(), init(), and insertInRollTable().

uint NL3D::CTessFacePriorityList::CRollingTable::_EntryStart [private]
 

Definition at line 233 of file tess_face_priority_list.h.

Referenced by clearRollTable(), clearRollTableEntry(), CRollingTable(), getRollTableEntry(), init(), insertInRollTable(), and shiftRollTable().

uint NL3D::CTessFacePriorityList::CRollingTable::_MaskEntries [private]
 

Definition at line 235 of file tess_face_priority_list.h.

Referenced by clearRollTableEntry(), CRollingTable(), getRollTableEntry(), init(), insertInRollTable(), and shiftRollTable().

uint NL3D::CTessFacePriorityList::CRollingTable::_NEntries [private]
 

Definition at line 234 of file tess_face_priority_list.h.

Referenced by clearRollTable(), CRollingTable(), and init().

NLMISC::CVector NL3D::CTessFacePriorityList::CRollingTable::QuadrantDirection
 

Definition at line 203 of file tess_face_priority_list.h.

Referenced by NL3D::CTessFacePriorityList::shift().

float NL3D::CTessFacePriorityList::CRollingTable::Remainder
 

Definition at line 206 of file tess_face_priority_list.h.

Referenced by clearRollTable(), CRollingTable(), init(), NL3D::CTessFacePriorityList::insert(), and NL3D::CTessFacePriorityList::shift().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 07:48:54 2004 for NeL by doxygen 1.3.6