1 /*---------------------------------------------------------------------------*\
5 * Copyright 2000-2002 by OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
13 * This library is free software; you can redistribute it and/or modify it *
14 * under the terms of the GNU Library General Public License as published *
15 * by the Free Software Foundation, version 2. *
17 * This library is distributed in the hope that it will be useful, but *
18 * WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20 * Library General Public License for more details. *
22 * You should have received a copy of the GNU Library General Public *
23 * License along with this library; if not, write to the Free Software *
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
39 /*! Return the chunk with the given id. Returns NullFC if no such chunk is in
44 StateChunk * State::getChunk(UInt32 chunkId) const
46 if(chunkId < _mfChunks.size())
47 return _mfChunks[chunkId];
52 /*! Checks if a chunk with the given id is in the current state.
56 bool State::chunkPresent(UInt32 chunkId) const
58 return (chunkId < _mfChunks.size() && _mfChunks[chunkId] != NULL);
61 /*! Checks if a chunk of the same type like the given one is in the current
66 bool State::chunkPresent(StateChunk *chunk) const
68 const StateChunkClass * cls = chunk->getClass();
70 for(UInt16 i = 0; i < cls->getNumSlots(); ++i)
72 if(chunkPresent(cls->getId() + i))
80 void State::setCoreGLChunkLimit(UInt32 uiCoreGLChunkLimit)
82 _uiCoreGLChunkLimit = uiCoreGLChunkLimit;
86 UInt32 State::getCoreGLChunkLimit(void)
88 return _uiCoreGLChunkLimit;
92 void State::setDefaultSortKey(UInt32 uiSortKey)
94 _uiDefaultSortKey = (uiSortKey | DefaultKeyMask);
98 UInt32 State::getSortKey(UInt32 uiKeyGen)
100 if(_uiKeyGen != uiKeyGen && uiKeyGen < SkipRebuild)
102 _uiKeyGen = uiKeyGen;
111 const MFUnrecStateChunkPtr *State::getMFChunks(void) const