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 \*---------------------------------------------------------------------------*/
30 #ifndef _OSGOFPALETTES_H_
31 #define _OSGOFPALETTES_H_
33 #include "OSGFileIODef.h"
34 #include "OSGMemoryObject.h"
35 #include "OSGRefCountPtr.h"
36 #include "OSGOFAncillaryRecords.h"
42 //---------------------------------------------------------------------------
44 //---------------------------------------------------------------------------
46 /*! \ingroup GrpFileIOOpenFlight
50 class OSG_FILEIO_DLLMAPPING OFColorPalette
: public MemoryObject
54 typedef MemoryObject Inherited
;
56 /*---------------------------------------------------------------------*/
58 OFColorPaletteRecordRCPtr _pColorPalette
;
60 /*---------------------------------------------------------------------*/
62 virtual ~OFColorPalette(void);
68 /*---------------------------------------------------------------------*/
70 void addRecord(OFColorPaletteRecord
*pColorPal
);
71 const OFColorPaletteRecord
*getRecord(void );
73 /*---------------------------------------------------------------------*/
75 void dump(UInt32 uiIndent
) const;
78 /*! \ingroup GrpFileIOOpenFlight
80 typedef RefCountPtr
<OFColorPalette
,
81 MemObjRefCountPolicy
> OFColorPaletteRCPtr
;
83 //---------------------------------------------------------------------------
85 //---------------------------------------------------------------------------
87 /*! \ingroup GrpFileIOOpenFlight
91 class OSG_FILEIO_DLLMAPPING OFVertexPalette
: public MemoryObject
95 typedef MemoryObject Inherited
;
97 /*---------------------------------------------------------------------*/
99 OFVertexPaletteRecordRCPtr _pVertexPalette
;
101 /*---------------------------------------------------------------------*/
103 virtual ~OFVertexPalette(void);
107 OFVertexPalette(void);
109 /*---------------------------------------------------------------------*/
111 void addRecord(OFVertexPaletteRecord
*pVertexPal
);
112 const OFVertexPaletteRecord
*getRecord(void );
114 /*---------------------------------------------------------------------*/
116 void dump(UInt32 uiIndent
) const;
119 /*! \ingroup GrpFileIOOpenFlight
121 typedef RefCountPtr
<OFVertexPalette
,
122 MemObjRefCountPolicy
> OFVertexPaletteRCPtr
;
124 //---------------------------------------------------------------------------
126 //---------------------------------------------------------------------------
128 /*! \ingroup GrpFileIOOpenFlight
132 class OSG_FILEIO_DLLMAPPING OFTexturePalette
: public MemoryObject
136 typedef MemoryObject Inherited
;
138 /*---------------------------------------------------------------------*/
140 typedef std::map
<Int32
,
141 OFTexturePaletteRecordRCPtr
> TextureStore
;
142 typedef TextureStore::iterator TextureStoreIt
;
143 typedef TextureStore::const_iterator TextureStoreConstIt
;
146 /*---------------------------------------------------------------------*/
148 TextureStore _mTextures
;
150 /*---------------------------------------------------------------------*/
152 virtual ~OFTexturePalette(void);
156 OFTexturePalette(void);
158 /*---------------------------------------------------------------------*/
160 void addRecord(OFTexturePaletteRecord
*pTex
);
161 const OFTexturePaletteRecord
*getRecord(Int32 uiId
);
163 /*---------------------------------------------------------------------*/
165 void dump(UInt32 uiIndent
) const;
168 /*! \ingroup GrpFileIOOpenFlight
170 typedef RefCountPtr
<OFTexturePalette
,
171 MemObjRefCountPolicy
> OFTexturePaletteRCPtr
;
173 //---------------------------------------------------------------------------
175 //---------------------------------------------------------------------------
177 /*! \ingroup GrpFileIOOpenFlight
181 class OSG_FILEIO_DLLMAPPING OFMaterialPalette
: public MemoryObject
184 typedef MemoryObject Inherited
;
186 /*---------------------------------------------------------------------*/
188 typedef std::map
<Int32
,
189 OFMaterialPaletteRecordRCPtr
> MaterialStore
;
190 typedef MaterialStore::iterator MaterialStoreIt
;
191 typedef MaterialStore::const_iterator MaterialStoreConstIt
;
193 /*---------------------------------------------------------------------*/
195 MaterialStore _mMaterials
;
197 /*---------------------------------------------------------------------*/
199 virtual ~OFMaterialPalette(void);
203 typedef RefCountPtr
<OFMaterialPalette
,
204 MemObjRefCountPolicy
> ObjRCPtr
;
205 typedef TransitPtr
<OFMaterialPalette
> ObjTransitPtr
;
207 OFMaterialPalette(void);
209 /*---------------------------------------------------------------------*/
211 void addRecord(OFMaterialPaletteRecord
*pMat
);
212 const OFMaterialPaletteRecord
*getRecord(Int32 uiId
);
214 /*---------------------------------------------------------------------*/
216 void dump(UInt32 uiIndent
) const;
219 /*! \ingroup GrpFileIOOpenFlight
221 typedef OFMaterialPalette::ObjRCPtr OFMaterialPaletteRCPtr
;
222 /*! \ingroup GrpFileIOOpenFlight
224 typedef OFMaterialPalette::ObjTransitPtr OFMaterialPaletteTransitPtr
;
228 #endif /* _OSGOFPALETTES_H_ */