1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     gfx_ISceneVisitor.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: 31311 $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef NW_GFX_ISCENEVISITOR_H_
19 #define NW_GFX_ISCENEVISITOR_H_
20 
21 #include <nw/gfx/gfx_GfxObject.h>
22 
23 namespace nw
24 {
25 namespace gfx
26 {
27 
28 class SceneNode;
29 class TransformNode;
30 class UserRenderNode;
31 class Model;
32 class SkeletalModel;
33 class Camera;
34 class Fog;
35 class Light;
36 class FragmentLight;
37 class AmbientLight;
38 class VertexLight;
39 class HemiSphereLight;
40 class ParticleSet;
41 class ParticleEmitter;
42 class ParticleModel;
43 
44 //---------------------------------------------------------------------------
45 //! @brief        シーンツリーを巡回するためのインターフェースです。
46 //---------------------------------------------------------------------------
47 class ISceneVisitor : public GfxObject
48 {
49 private:
50     NW_DISALLOW_COPY_AND_ASSIGN(ISceneVisitor);
51 
52 public:
53     NW_UT_RUNTIME_TYPEINFO;
54 
55     //! @brief        シーンノードへの処理です。
56     //!
57     //! @param[in]    node
58     //!
59     virtual void VisitSceneNode(SceneNode* node) = 0;
60 
61     //! @brief        トランスフォームノードへの処理です。
62     //!
63     //! @param[in]    node
64     //!
65     virtual void VisitTransformNode(TransformNode* node) = 0;
66 
67     //! @brief        ユーザ定義の描画ノードへの処理です。
68     //!
69     //! @param[in]    node
70     //!
71     virtual void VisitUserRenderNode(UserRenderNode* node) = 0;
72 
73     //! @brief        モデルへの処理です。
74     //!
75     //! @param[in]    model
76     //!
77     virtual void VisitModel(Model* model) = 0;
78 
79     //! @brief        スケルタルモデルへの処理です。
80     //!
81     //! @param[in]    model
82     //!
83     virtual void VisitSkeletalModel(SkeletalModel* model) = 0;
84 
85     //! @brief        カメラへの処理です。
86     //!
87     //! @param[in]    camera
88     //!
89     virtual void VisitCamera(Camera* camera) = 0;
90 
91     //! @brief        フォグへの処理です。
92     //!
93     //! @param[in]    fog
94     //!
95     virtual void VisitFog(Fog* fog) = 0;
96 
97     //! @brief        ライトへの処理です。
98     //!
99     //! @param[in]    light
100     //!
101     virtual void VisitLight(Light* light) = 0;
102 
103     //! @brief        フラグメントライトへの処理です。
104     //!
105     //! @param[in]    light
106     //!
107     virtual void VisitFragmentLight(FragmentLight* light) = 0;
108 
109 #if defined(NW_GFX_VERTEX_LIGHT_ENABLED)
110     //! @brief        頂点ライトへの処理です。
111     //!
112     //! @param[in]    light
113     //!
114     virtual void VisitVertexLight(VertexLight* light) = 0;
115 #endif
116     //! @brief        アンビエントライトへの処理です。
117     //!
118     //! @param[in]    light
119     //!
120     virtual void VisitAmbientLight(AmbientLight* light) = 0;
121 
122     //! @brief        半球ライトへの処理です。
123     //!
124     //! @param[in]    light
125     //!
126     virtual void VisitHemiSphereLight(HemiSphereLight* light) = 0;
127 
128     //! @brief        パーティクルセットへの処理です。
129     //!
130     //! @param[in]    particleSet
131     //!
132     virtual void VisitParticleSet(ParticleSet* particleSet) = 0;
133 
134     //! @brief        パーティクルエミッタへの処理です。
135     //!
136     //! @param[in]    particleEmitter
137     //!
138     virtual void VisitParticleEmitter(ParticleEmitter* particleEmitter) = 0;
139 
140     //! @brief        パーティクルモデルへの処理です。
141     //!
142     //! @param[in]    particleModel
143     //!
144     virtual void VisitParticleModel(ParticleModel* particleModel) = 0;
145 
146 protected:
147     //! コンストラクタです。
ISceneVisitor(os::IAllocator * allocator)148     ISceneVisitor(os::IAllocator* allocator) : GfxObject(allocator) {}
149 };
150 
151 } // namespace gfx
152 } // namespace nw
153 
154 #endif // NW_GFX_ISCENEVISITOR_H_
155