1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: SmSceneCtrl.h 4 5 Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain proprietary 8 information of Nintendo and/or its licensed developers and are protected by 9 national and international copyright laws. They may not be disclosed to third 10 parties or copied or duplicated in any form, in whole or in part, without the 11 prior written consent of Nintendo. 12 13 The content herein is highly confidential and should be handled accordingly. 14 15 $Revision: $ 16 *---------------------------------------------------------------------------*/ 17 18 #ifndef SM_SCENE_CTRL_H_ 19 #define SM_SCENE_CTRL_H_ 20 21 22 #include <nw/gfx.h> 23 #include "../include/SmBase.h" 24 25 //------------------------------------------------------------------------------ 26 // シーン機能をまとめるたクラスです。 27 class SmSceneCtrl : public SmBase 28 { 29 public: 30 //---------------------------------------- 31 // コンストラクタ 32 SmSceneCtrl( nw::gfx::RenderContext* renderContext ); 33 34 //---------------------------------------- 35 // デストラクタ 36 ~SmSceneCtrl(); 37 38 //---------------------------------------- 39 // シーンを初期化します。 40 void InitializeScene(nw::gfx::SceneNode* sceneRoot); 41 42 //---------------------------------------- 43 void TraverseScene(nw::gfx::SceneNode* sceneRoot); 44 45 //---------------------------------------- 46 void SetSceneEnvironmentSetting( nw::gfx::SceneEnvironmentSetting* sceneEnvironmentSetting ); 47 48 //---------------------------------------- 49 // シーンを更新します。 50 void UpdateScene(); 51 52 //---------------------------------------- 53 // カメラの視界に基づいてシーンを更新し、描画キューを構築します。 54 void SubmitView( nw::gfx::Camera* currentCamera ); 55 #if 0 56 //---------------------------------------- 57 // 描画環境をセットする 58 void SetEnvironment( s32 cameraIndex ); 59 #endif 60 //---------------------------------------- 61 // 描画を行います。 62 void Render(); 63 64 //---------------------------------------- 65 // シーンコンテキストを取得します。 GetSceneContext()66 nw::gfx::SceneContext* GetSceneContext() { return m_SceneContext; } 67 68 //---------------------------------------- 69 // ログを出力します。 70 void OutputLog(); 71 72 private: 73 nw::gfx::SceneContext* m_SceneContext; 74 nw::gfx::SceneTraverser* m_SceneTraverser; 75 nw::gfx::SceneUpdater* m_SceneUpdater; 76 nw::gfx::SceneInitializer* m_SceneInitializer; 77 78 nw::gfx::RenderContext* m_RenderContext; 79 nw::gfx::RenderKeyFactory* m_PriorMaterialRenderKeyFactory; 80 nw::gfx::RenderKeyFactory* m_PriorDepthRenderKeyFactory; 81 nw::gfx::RenderQueue* m_RenderQueue; 82 nw::gfx::MeshRenderer* m_MeshRenderer; 83 }; 84 85 86 #endif // SM_SCENE_CTRL_H_ 87