IndexDic Struct Reference
[Geometry Functions]

List of all members.

Public Types

typedef std::vector< Int32 > Int32Vec

Public Member Functions

Int32 entry (Int32Vec &indexVec)
const Int32Vecentry (Int32 index)
UInt32 entryCount (void) const

Private Types

typedef std::map< Int32Vec, Int32 > IndexMap

Private Attributes

IndexMap _indexMap
std::vector< const Int32Vec * > _indexVec


Detailed Description

Multi/Single index dictionary

Definition at line 1732 of file OSGGeoFunctions.cpp.


Member Typedef Documentation

typedef std::vector<Int32> IndexDic::Int32Vec

Definition at line 1734 of file OSGGeoFunctions.cpp.

typedef std::map<Int32Vec, Int32> IndexDic::IndexMap [private]

Definition at line 1744 of file OSGGeoFunctions.cpp.


Member Function Documentation

Int32 IndexDic::entry ( Int32Vec indexVec  )  [inline]

Definition at line 1750 of file OSGGeoFunctions.cpp.

References _indexMap, _indexVec, and FFATAL.

Referenced by osg::calcVertexTangents(), osg::createOptimizedPrimitives(), and osg::createSingleIndex().

01751 {
01752     IndexMap::iterator iI = _indexMap.find(indexVec);
01753     if(iI == _indexMap.end())
01754     {
01755         std::pair < IndexMap::iterator, bool > mapRes =
01756             _indexMap.insert(IndexMap::value_type(indexVec, _indexVec.size()));
01757         if(mapRes.second)
01758         {
01759             iI = mapRes.first;
01760             _indexVec.push_back(&(iI->first));
01761         }
01762         else
01763         {
01764             FFATAL(("IndexDic::entry() map insert error\n"));
01765         }
01766     }
01767 
01768     return iI->second;
01769 }

const IndexDic::Int32Vec & IndexDic::entry ( Int32  index  )  [inline]

Definition at line 1771 of file OSGGeoFunctions.cpp.

References _indexVec.

01772 {
01773     return *(_indexVec[index]);
01774 }

UInt32 IndexDic::entryCount ( void   )  const [inline]

Definition at line 1776 of file OSGGeoFunctions.cpp.

References _indexVec.

Referenced by osg::createOptimizedPrimitives(), and osg::createSingleIndex().

01777 {
01778     return _indexVec.size();
01779 }


Member Data Documentation

Definition at line 1745 of file OSGGeoFunctions.cpp.

Referenced by entry().

std::vector< const Int32Vec * > IndexDic::_indexVec [private]

Definition at line 1747 of file OSGGeoFunctions.cpp.

Referenced by entry(), and entryCount().


The documentation for this struct was generated from the following file:

Generated on Mon Mar 17 12:02:59 2008 for OpenSG by  doxygen 1.5.5