Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ModelManager.h

Go to the documentation of this file.
00001 /* ModelManager - Interface for loading and releasing textures. */ 00002 #ifndef MODEL_MANAGER_H 00003 #define MODEL_MANAGER_H 00004 00005 #include "RageModelGeometry.h" 00006 00007 #include <map> 00008 00009 struct ModelManagerPrefs 00010 { 00011 bool m_bDelayedUnload; 00012 00013 ModelManagerPrefs() 00014 { 00015 m_bDelayedUnload = false; 00016 } 00017 ModelManagerPrefs( bool bDelayedUnload ) 00018 { 00019 m_bDelayedUnload = bDelayedUnload; 00020 } 00021 00022 bool operator!=( const ModelManagerPrefs& rhs ) 00023 { 00024 return 00025 m_bDelayedUnload != rhs.m_bDelayedUnload; 00026 } 00027 }; 00028 00029 class ModelManager 00030 { 00031 public: 00032 ModelManager(); 00033 ~ModelManager(); 00034 00035 RageModelGeometry* LoadMilkshapeAscii( const CString& sFile, bool bNeedNormals ); 00036 void UnloadModel( RageModelGeometry *m ); 00037 // void ReloadAll(); 00038 00039 bool SetPrefs( const ModelManagerPrefs& prefs ); // returns true if needs display to be reset 00040 const ModelManagerPrefs& GetPrefs() { return m_Prefs; } 00041 00042 protected: 00043 00044 std::map<CString, RageModelGeometry*> m_mapFileToModel; 00045 00046 ModelManagerPrefs m_Prefs; 00047 }; 00048 00049 extern ModelManager* MODELMAN; // global and accessable from anywhere in our program 00050 00051 #endif 00052 00053 /* 00054 * (c) 2003-2004 Chris Danford 00055 * All rights reserved. 00056 * 00057 * Permission is hereby granted, free of charge, to any person obtaining a 00058 * copy of this software and associated documentation files (the 00059 * "Software"), to deal in the Software without restriction, including 00060 * without limitation the rights to use, copy, modify, merge, publish, 00061 * distribute, and/or sell copies of the Software, and to permit persons to 00062 * whom the Software is furnished to do so, provided that the above 00063 * copyright notice(s) and this permission notice appear in all copies of 00064 * the Software and that both the above copyright notice(s) and this 00065 * permission notice appear in supporting documentation. 00066 * 00067 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00068 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00069 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00070 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00071 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00072 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00073 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00074 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00075 * PERFORMANCE OF THIS SOFTWARE. 00076 */

Generated on Thu Jan 27 20:57:24 2005 for StepMania by doxygen 1.3.7