OSG3DSSceneFileType.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _OSG3DSSCENEFILETYPE_H_
00040 #define _OSG3DSSCENEFILETYPE_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044
00045 #include "OSGFileIODef.h"
00046 #include "OSGAction.h"
00047 #include "OSGBaseTypes.h"
00048 #include "OSGGeoPositionsFields.h"
00049 #include "OSGGeometry.h"
00050 #include "OSGNode.h"
00051 #include "OSGSceneFileType.h"
00052 #include "OSGMaterial.h"
00053
00054 #include "OSG3DSLoader.h"
00055
00056 OSG_BEGIN_NAMESPACE
00057
00062 class OSG_FILEIO_DLLMAPPING A3DSSceneFileType : public SceneFileType
00063 {
00064 public:
00065
00066 static A3DSSceneFileType &the(void);
00067
00068 virtual ~A3DSSceneFileType(void);
00069
00070 virtual const Char8 *getName(void) const;
00071
00072 virtual NodeTransitPtr read( std::istream &is,
00073 const Char8 *fileNameOrExtension,
00074 Resolver resolver = NULL ) const;
00075
00076 protected:
00077
00078 static const Char8 *_suffixA[];
00079 static A3DSSceneFileType _the;
00080
00081 A3DSSceneFileType(const Char8 *suffixArray[],
00082 UInt16 suffixByteCount,
00083 bool override,
00084 UInt32 overridePriority,
00085 UInt32 flags);
00086
00087 A3DSSceneFileType(const A3DSSceneFileType &obj);
00088
00089 private:
00090
00091 NodeTransitPtr createMesh (L3DS &scene, LMesh &mesh) const;
00092 MaterialTransitPtr createMaterial(L3DS &scene, UInt32 id ) const;
00093
00094 mutable std::map<UInt32, MaterialUnrecPtr> _materials;
00095 typedef std::map<UInt32, MaterialUnrecPtr>::iterator materialIt;
00096 };
00097
00098 typedef A3DSSceneFileType* A3DSSceneFileTypeP;
00099
00100 OSG_END_NAMESPACE
00101
00102 #endif // _OSG3DSSCENEFILETYPE_H_