00001 /* DXFramework Copyright (c) 2006, Jonathan Voigt, University of Michigan. 00002 See http://dxframework.sourceforge.net/ for a list of contributors. 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without modification, 00006 are permitted provided that the following conditions are met: 00007 00008 * Redistributions of source code must retain the above copyright notice, 00009 this list of conditions and the following disclaimer. 00010 00011 * Redistributions in binary form must reproduce the above copyright notice, 00012 this list of conditions and the following disclaimer in the documentation 00013 and/or other materials provided with the distribution. 00014 00015 * Neither the name of the DXFramework project nor the names of its 00016 contributors may be used to endorse or promote products derived from this 00017 software without specific prior written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00022 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 00023 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00024 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00025 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00026 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00027 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00028 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 */ 00030 00031 #pragma once 00032 00033 namespace dxf { 00041 class Model : public StateManager { 00042 public: 00043 static Model* const Instance(); 00044 00045 void Load(); 00046 void Unload(); 00047 00051 void OnFrameMove( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext ); 00052 00055 void RenderPre2D(double fTime, float fElapsedTime); 00058 void Render3D(double fTime, float fElapsedTime); 00061 void Render2D(double fTime, float fElapsedTime); 00062 00063 protected: 00064 Model(); 00065 Model(const Model&); 00066 Model* operator=(const Model&); 00067 }; 00068 00069 void DXFRenderPre2D(double fTime, float fElapsedTime); 00070 void DXFRender3D(double fTime, float fElapsedTime); 00071 void DXFRender2D(double fTime, float fElapsedTime); 00072 } // namespace dxf
1.4.7