FineKernelToolKit  3.1.0
Renderer_CLI.h
[詳解]
1 // Renderer_CLI.h
2 
3 #pragma once
4 
5 #include <FK/Engine.H>
6 #include <msclr/marshal_cppstd.h>
7 #include "Scene_CLI.h"
8 #include "Plane_CLI.h"
9 #include "PickData_CLI.h"
10 
11 namespace FK_CLI
12 {
13  public ref class fk_Renderer {
14  private:
15  HWND hWnd;
16  HDC hDC;
17  HGLRC hRC;
18 
19  ::fk_GraphicsEngine *pEngine;
20 
21  public:
25 
26  bool Initialize(System::IntPtr pWnd, int w, int h);
27  void Shutdown(void);
28 
29  void Resize(int w, int h);
30  void SetScene(fk_Scene^ scene);
31  void Draw(void);
32 
33  bool GetProjectPosition(double argX, double argY, fk_Plane^ argPlane, fk_Vector^ argPos);
34  bool GetProjectPosition(double argX, double argY, double argDist, fk_Vector^ argPos);
35  bool GetWindowPosition(fk_Vector^ argPos_3D, fk_Vector^ argPos_2D);
36 
37  cli::array<fk_PickData^>^ GetPickData(int argX, int argY, int argPixel);
38 
39  event fk_DrawCallback^ PreInit;
40  event fk_DrawCallback^ PostInit;
41  event fk_DrawCallback^ PreDraw;
42  event fk_DrawCallback^ PostDraw;
43  };
44 }
45 
46 /****************************************************************************
47  *
48  * Copyright (c) 1999-2016, Fine Kernel Project, All rights reserved.
49  *
50  * Redistribution and use in source and binary forms,
51  * with or without modification, are permitted provided that the
52  * following conditions are met:
53  *
54  * - Redistributions of source code must retain the above
55  * copyright notice, this list of conditions and the
56  * following disclaimer.
57  *
58  * - Redistributions in binary form must reproduce the above
59  * copyright notice, this list of conditions and the
60  * following disclaimer in the documentation and/or
61  * other materials provided with the distribution.
62  *
63  * - Neither the name of the copyright holders nor the names
64  * of its contributors may be used to endorse or promote
65  * products derived from this software without specific
66  * prior written permission.
67  *
68  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
69  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
70  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
71  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
72  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
73  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
74  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
75  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
76  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
77  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
78  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
79  * POSSIBILITY OF SUCH DAMAGE.
80  *
81  ****************************************************************************/
82 /****************************************************************************
83  *
84  * Copyright (c) 1999-2016, Fine Kernel Project, All rights reserved.
85  *
86  * 本ソフトウェアおよびソースコードのライセンスは、基本的に
87  * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
88  *
89  * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
90  * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
91  *
92  * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
93  * および下記免責条項を含めること。
94  *
95  * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
96  * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
97  * 含めること。
98  *
99  * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
100  * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
101  * コントリビューターの名前を使用してはならない。
102  *
103  * 本ソフトウェアは、著作権者およびコントリビューターによって「現
104  * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
105  * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
106  * に限定されない、いかなる保証もないものとします。著作権者もコン
107  * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
108  * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
109  * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
110  * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
111  * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
112  * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
113  * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
114  * ついて、一切責任を負わないものとします。
115  *
116  ****************************************************************************/
bool GetProjectPosition(double argX, double argY, fk_Plane^ argPlane, fk_Vector^ argPos)
bool Initialize(System::IntPtr pWnd, int w, int h)
fk_Renderer::~fk_Renderer()
fk_DrawCallback^ PostDraw
Definition: Renderer_CLI.h:42
Definition: Renderer_CLI.h:13
fk_DrawCallback^ PostInit
Definition: Renderer_CLI.h:40
void SetScene(fk_Scene^ scene)
void Resize(int w, int h)
シーンを制御するクラス
Definition: Scene_CLI.h:40
cli::array< fk_PickData^ >^ GetPickData(int argX, int argY, int argPixel)
fk_Renderer::fk_Renderer(void)
3次元ベクトルを管理するクラス
Definition: Vector_CLI.h:37
fk_DrawCallback^ PreInit
Definition: Renderer_CLI.h:39
bool GetWindowPosition(fk_Vector^ argPos_3D, fk_Vector^ argPos_2D)
fk_DrawCallback^ PreDraw
Definition: Renderer_CLI.h:41
幾何平面を管理するクラス
Definition: Plane_CLI.h:31
Definition: AppWindow_CLI.h:11