FineKernelToolKit 4.2.13
読み取り中…
検索中…
一致する文字列を見つけられません
AppWindow_CLI.h
[詳解]
1#pragma once
2
3#include <FK/AppWindow.h>
4#include "GuideObject_CLI.h"
5#include "SpriteModel_CLI.h"
6#include "Performer_CLI.h"
7#include "Plane_CLI.h"
8#using <System.dll>
9
10namespace FK_CLI
11{
12 using namespace System::Collections::Generic;
13
14 // キーボード上のキーを表す列挙型
15 public enum class fk_Key {
16 SHIFT_R,
17 SHIFT_L,
18 CTRL_R,
19 CTRL_L,
20 ALT_R,
21 ALT_L,
22 ENTER,
23 BACKSPACE,
24 DELETEKEY,
25 CAPS_LOCK,
26 TAB,
27 PAGE_UP,
28 PAGE_DOWN,
29 HOME,
30 END,
31 INSERT,
32 LEFT,
33 RIGHT,
34 UP,
35 DOWN,
36 F1,
37 F2,
38 F3,
39 F4,
40 F5,
41 F6,
42 F7,
43 F8,
44 F9,
45 F10,
46 F11,
47 F12,
48 SPACE
49 };
50
52 public enum class fk_MouseButton {
53 M1,
54 M2,
55 M3
56 };
57
59 public enum class fk_Switch {
60 RELEASE,
61 UP,
62 DOWN,
63 PRESS
64 };
65
66 //using fk_SwitchStatus = fk_Switch;
67
69
80 public ref class fk_AppWindow : public fk_IBindableDrawer {
81 internal:
82 ::FK::fk_AppWindow *pWin;
83 fk_Scene^ scene;
84
85 delegate void ShaderCallback(void);
86 ShaderCallback^ preInit;
87 ShaderCallback^ postInit;
88 ShaderCallback^ preDraw;
89 ShaderCallback^ postDraw;
90 ShaderCallback^ preDrawLeft;
91 ShaderCallback^ postDrawLeft;
92 ShaderCallback^ preDrawRight;
93 ShaderCallback^ postDrawRight;
94
95 Dictionary<fk_Key, int>^ _keyMap;
96 Dictionary<fk_Switch, int>^ _switchMap;
97
98 ::FK::fk_AppWindow * GetP(void);
99 ::FK::fk_Key GetSK(fk_Key);
100 ::FK::fk_Switch GetSS(fk_Switch);
101
102 void MakeKeyMap(void);
103 void MakeSwitchMap(void);
104
105 public:
108
111
114
116
121 property String^ WindowName {
122 void set(String^);
123 }
124
126
134 property fk_Dimension^ Size {
135 void set(fk_Dimension^);
136 }
137
139
148 property fk_Rect^ InnerSize {
149 void set(fk_Rect^);
150 }
151
153
164 property fk_Color^ BGColor {
165 void set(fk_Color^);
166 }
167
169
177 property int FPS {
178 void set(int);
179 }
180
182
190 property double GuideScale {
191 void set(double);
192 }
193
195
203 property int GuideNum {
204 void set(int);
205 }
206
208
217 property fk_Vector^ CameraPos {
218 void set(fk_Vector^);
219 fk_Vector^ get();
220 }
221
223
231 property fk_Vector^ CameraFocus {
232 void set(fk_Vector^);
233 }
234
236
248 property fk_Model^ CameraModel {
249 void set(fk_Model^);
250 fk_Model^ get(void);
251 }
252
254
257 property fk_Vector^ DefaultLightVec {
258 void set(fk_Vector^);
259 fk_Vector^ get(void);
260 }
261
263
266 property fk_Material^ DefaultLightMaterial {
267 void set(fk_Material^);
268 fk_Material^ get(void);
269 }
270
272
287 property fk_Scene^ Scene {
288 void set(fk_Scene^);
289 fk_Scene^ get();
290 }
291
293
304 property fk_Vector^ MousePosition {
305 fk_Vector^ get();
306 }
307
309
316 property bool TrackBallMode {
317 void set(bool);
318 }
319
322
324
352 property fk_ShadowMode ShadowMode {
353 void set(fk_ShadowMode);
354 fk_ShadowMode get();
355 }
356
358
363 property fk_Vector^ ShadowVec {
364 void set(fk_Vector^);
365 fk_Vector^ get();
366 }
367
369
387 property int ShadowResolution {
388 void set(int);
389 int get(void);
390 }
391
393
402 property double ShadowAreaSize {
403 void set(double);
404 double get(void);
405 }
406
408
417 property double ShadowDistance {
418 void set(double);
419 double get(void);
420 }
421
423
431 property double ShadowVisibility {
432 void set(double);
433 double get(void);
434 }
435
437
449 property double ShadowBias {
450 void set(double);
451 double get(void);
452 }
453
455
459
490 property fk_FogMode FogMode {
491 void set(fk_FogMode);
492 fk_FogMode get();
493 }
494
496
501 property double FogDensity {
502 void set(double);
503 double get(void);
504 }
505
507
513 property double FogLinearStart {
514 void set(double);
515 double get(void);
516 }
517
519
525 property double FogLinearEnd {
526 void set(double);
527 double get(void);
528 }
529
531
536 property fk_Color^ FogColor {
537 void set(fk_Color^);
538 fk_Color^ get();
539 }
540
542
545
547
554
556
559
561
583 void SetScene(fk_Scene^ scene, bool defCameraAndLight);
584
586
592 void SetSceneDefault(void);
593
595
598 void SetLightDefault(void);
599
601
618 void Entry(fk_Model^ model);
619
621
632 void Entry(fk_Model^ model, fk_GuideObject^ guide);
633
635
642 void Entry(fk_SpriteModel^ model);
643
645
653 void Entry(fk_Performer^ chara);
654
656
664 void Remove(fk_Model^ model);
665
667
677 void Remove(fk_Model^ model, fk_GuideObject^ guide);
678
680
689 void Remove(fk_SpriteModel^ model);
690
692
701 void Remove(fk_Performer^ chara);
702
704
712 void ClearModel(bool defCameraAndLight);
713
715
721 void ClearModel(void);
723
726
728
733 void Open(void);
734
736
746 void Close(void);
747
749
764 bool Update(bool forceFlg);
765
767
775 bool Update(void);
777
780
782
797 void ShowGuide(fk_Guide mode);
798
800
808 void ShowGuide(void);
809
811
817 void HideGuide(void);
819
822
824
856 bool GetKeyStatus(wchar_t key, fk_Switch status, bool insideFlag);
857
859
888 bool GetKeyStatus(wchar_t key, fk_Switch status);
889
891
916 bool GetKeyStatus(wchar_t key);
917
919
952 bool GetSpecialKeyStatus(fk_Key keyCode, fk_Switch status, bool insideFlag);
953
955
979 bool GetKeyStatus(fk_Key keyCode, fk_Switch status, bool insideFlag);
980
982
1012 bool GetSpecialKeyStatus(fk_Key keyCode, fk_Switch status);
1013
1015
1034 bool GetKeyStatus(fk_Key keyCode, fk_Switch status);
1035
1037
1064
1066
1081 bool GetKeyStatus(fk_Key keyCode);
1082
1084
1087
1089
1114 bool GetMouseStatus(fk_MouseButton buttonCode, fk_Switch status, bool insideFlag);
1115
1117
1139 bool GetMouseStatus(fk_MouseButton buttonCode, fk_Switch status);
1140
1142
1161
1163
1175 void SetCursorState(bool visible, bool center);
1176
1178
1188 void ProcMouseView(fk_Model^ camera, double x, double y, bool lockSW);
1190
1193
1195
1213 Tuple<bool, fk_Vector^>^ GetProjectPosition(double x, double y, fk_Plane^ plane);
1214
1215#if !defined(FK_DOXYGEN_USER_PROCESS)
1216 bool GetProjectPosition(double x, double y, fk_Plane^ plane, fk_Vector^ pos);
1217#endif
1218
1220
1234 Tuple<bool, fk_Vector^>^ GetProjectPosition(double x, double y, double dist);
1235
1236#if !defined(FK_DOXYGEN_USER_PROCESS)
1237 bool GetProjectPosition(double x, double y, double dist, fk_Vector^ pos);
1238#endif
1239
1241
1260 Tuple<bool, fk_Vector^>^ GetWindowPosition(fk_Vector^ pos);
1261
1262#if !defined(FK_DOXYGEN_USER_PROCESS)
1263 bool GetWindowPosition(fk_Vector^ pos_3D, fk_Vector^ pos_2D);
1264#endif
1266
1269
1271
1279 bool SnapImage(String^ fileName);
1280
1282
1294 bool SnapImage(String^ fileName, fk_ImageType format);
1295
1297
1306 bool SnapImage(fk_Image^ image);
1307
1309
1312
1314
1327 static void PutString(String^ str);
1328
1330
1343 static void ClearBrowser(void);
1344
1346#if !defined(FK_DOXYGEN_USER_PROCESS)
1347 event fk_DrawCallback^ PreInit;
1348 event fk_DrawCallback^ PostInit;
1349 virtual event fk_DrawCallback^ PreDraw;
1350 virtual event fk_DrawCallback^ PostDraw;
1351 event fk_DrawCallback^ PreDrawLeft;
1352 event fk_DrawCallback^ PostDrawLeft;
1353 event fk_DrawCallback^ PreDrawRight;
1354 event fk_DrawCallback^ PostDrawRight;
1355
1356 virtual void OnPreInit()
1357 {
1358 PreInit();
1359 };
1360
1361 virtual void OnPostInit()
1362 {
1363 PostInit();
1364 };
1365
1366 virtual void OnPreDraw()
1367 {
1368 PreDraw();
1369 };
1370
1371 virtual void OnPostDraw()
1372 {
1373 PostDraw();
1374 };
1375
1376 virtual void OnPreDrawLeft()
1377 {
1378 PreDrawLeft();
1379 };
1380
1381 virtual void OnPostDrawLeft()
1382 {
1383 PostDrawLeft();
1384 };
1385
1386 virtual void OnPreDrawRight()
1387 {
1388 PreDrawRight();
1389 };
1390
1391 virtual void OnPostDrawRight()
1392 {
1393 PostDrawRight();
1394 };
1395
1396#endif
1397 };
1398}
1399
1400/****************************************************************************
1401 *
1402 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
1403 *
1404 * Redistribution and use in source and binary forms,
1405 * with or without modification, are permitted provided that the
1406 * following conditions are met:
1407 *
1408 * - Redistributions of source code must retain the above
1409 * copyright notice, this list of conditions and the
1410 * following disclaimer.
1411 *
1412 * - Redistributions in binary form must reproduce the above
1413 * copyright notice, this list of conditions and the
1414 * following disclaimer in the documentation and/or
1415 * other materials provided with the distribution.
1416 *
1417 * - Neither the name of the copyright holders nor the names
1418 * of its contributors may be used to endorse or promote
1419 * products derived from this software without specific
1420 * prior written permission.
1421 *
1422 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1423 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1424 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
1425 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
1426 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
1427 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1428 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1429 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1430 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1431 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
1432 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1433 * POSSIBILITY OF SUCH DAMAGE.
1434 *
1435 ****************************************************************************/
1436/****************************************************************************
1437 *
1438 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
1439 *
1440 * 本ソフトウェアおよびソースコードのライセンスは、基本的に
1441 * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
1442 *
1443 * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
1444 * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
1445 *
1446 * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
1447 * および下記免責条項を含めること。
1448 *
1449 * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
1450 * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
1451 * 含めること。
1452 *
1453 * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
1454 * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
1455 * コントリビューターの名前を使用してはならない。
1456 *
1457 * 本ソフトウェアは、著作権者およびコントリビューターによって「現
1458 * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
1459 * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
1460 * に限定されない、いかなる保証もないものとします。著作権者もコン
1461 * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
1462 * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
1463 * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
1464 * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
1465 * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
1466 * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
1467 * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
1468 * ついて、一切責任を負わないものとします。
1469 *
1470 ****************************************************************************/
アプリケーションウィンドウクラス
Definition AppWindow_CLI.h:80
double ShadowAreaSize
シャドウマップ領域設定プロパティ
Definition AppWindow_CLI.h:402
bool GetKeyStatus(wchar_t key)
通常キー状態取得メソッド3
static void ClearBrowser(void)
メッセージ出力用ブラウザ初期化メソッド
bool GetKeyStatus(fk_Key keyCode)
特殊キー状態取得メソッド別名3
String^ WindowName
ウィンドウタイトルプロパティ
Definition AppWindow_CLI.h:121
bool GetKeyStatus(wchar_t key, fk_Switch status, bool insideFlag)
通常キー状態取得メソッド1
fk_ShadowMode ShadowMode
影表示設定プロパティ
Definition AppWindow_CLI.h:352
~fk_AppWindow()
デストラクタ
void SetCursorState(bool visible, bool center)
マウスカーソル表示制御メソッド
fk_Dimension^ Size
ウィンドウサイズプロパティ
Definition AppWindow_CLI.h:134
fk_Rect^ InnerSize
描画領域サイズ設定プロパティ
Definition AppWindow_CLI.h:148
fk_Vector^ CameraPos
カメラ位置設定・取得プロパティ
Definition AppWindow_CLI.h:217
double FogLinearEnd
線形式係数完全距離プロパティ
Definition AppWindow_CLI.h:525
fk_FogMode FogMode
Definition AppWindow_CLI.h:490
double GuideScale
グリッド幅設定プロパティ
Definition AppWindow_CLI.h:190
void ProcMouseView(fk_Model^ camera, double x, double y, bool lockSW)
FPS視点的カメラ制御メソッド
fk_Color^ BGColor
背景色設定プロパティ
Definition AppWindow_CLI.h:164
void Remove(fk_Model^ model)
通常モデル表示解除メソッド
int FPS
FPS設定プロパティ
Definition AppWindow_CLI.h:177
bool GetMouseStatus(fk_MouseButton buttonCode, fk_Switch status)
マウスボタン状態取得メソッド2
fk_Material^ DefaultLightMaterial
デフォルト光源マテリアルプロパティ
Definition AppWindow_CLI.h:266
void Close(void)
ウィンドウ破棄メソッド
void ClearModel(bool defCameraAndLight)
全モデル登録解除メソッド1
fk_Scene^ Scene
シーン設定プロパティ
Definition AppWindow_CLI.h:287
void Remove(fk_Model^ model, fk_GuideObject^ guide)
座標軸付きモデル表示解除メソッド
void Open(void)
ウィンドウ生成メソッド
Tuple< bool, fk_Vector^> ^ GetWindowPosition(fk_Vector^ pos)
空間座標から投影座標への射影点算出メソッド
void SetLightDefault(void)
光源初期化メソッド
void Entry(fk_SpriteModel^ model)
スプライトモデル登録メソッド
double FogLinearStart
線形式係数開始距離プロパティ
Definition AppWindow_CLI.h:513
void SetSceneDefault(void)
シーン設定初期化メソッド
void HideGuide(void)
グリッド・軸消去メソッド
double ShadowVisibility
影濃度設定プロパティ
Definition AppWindow_CLI.h:431
void ShowGuide(fk_Guide mode)
グリッド・軸設定メソッド1
void SetScene(fk_Scene^ scene, bool defCameraAndLight)
シーン設定メソッド
bool TrackBallMode
トラックボールモード制御プロパティ
Definition AppWindow_CLI.h:316
bool GetSpecialKeyStatus(fk_Key keyCode)
特殊キー状態取得メソッド3
fk_Color^ FogColor
霧色プロパティ
Definition AppWindow_CLI.h:536
double FogDensity
指数式係数プロパティ
Definition AppWindow_CLI.h:501
bool GetSpecialKeyStatus(fk_Key keyCode, fk_Switch status, bool insideFlag)
特殊キー状態取得メソッド1
bool GetMouseStatus(fk_MouseButton buttonCode, fk_Switch status, bool insideFlag)
マウスボタン状態取得メソッド1
int GuideNum
グリッド数設定プロパティ
Definition AppWindow_CLI.h:203
void SetCameraDefault(void)
カメラ初期化メソッド
bool GetKeyStatus(wchar_t key, fk_Switch status)
通常キー状態取得メソッド2
void ShowGuide(void)
グリッド・軸設定メソッド2
bool GetMouseStatus(fk_MouseButton buttonCode)
マウスボタン状態取得メソッド3
void ClearModel(void)
全モデル登録解除メソッド2
int ShadowResolution
シャドウマップ解像度プロパティ
Definition AppWindow_CLI.h:387
Tuple< bool, fk_Vector^> ^ GetProjectPosition(double x, double y, fk_Plane^ plane)
投影平面から任意平面への射影点算出メソッド
bool SnapImage(String^ fileName)
描画画像ファイル出力メソッド
bool Update(bool forceFlg)
シーン描画メソッド1
fk_Vector^ ShadowVec
影光線方向設定プロパティ
Definition AppWindow_CLI.h:363
void Entry(fk_Model^ model)
通常モデル表示登録メソッド
void Entry(fk_Model^ model, fk_GuideObject^ guide)
座標軸付きモデル表示登録メソッド
bool GetKeyStatus(fk_Key keyCode, fk_Switch status)
特殊キー状態取得メソッド別名2
Tuple< bool, fk_Vector^> ^ GetProjectPosition(double x, double y, double dist)
投影平面から任意距離での射影点算出メソッド
double ShadowBias
影バイアス値設定メソッド
Definition AppWindow_CLI.h:449
bool GetKeyStatus(fk_Key keyCode, fk_Switch status, bool insideFlag)
特殊キー状態取得メソッド別名1
fk_Vector^ CameraFocus
カメラ注視点設定プロパティ
Definition AppWindow_CLI.h:231
fk_Vector^ MousePosition
マウスポインタ位置取得プロパティ
Definition AppWindow_CLI.h:304
fk_AppWindow()
コンストラクタ
static void PutString(String^ str)
文字列出力メソッド
fk_Model^ CameraModel
カメラモデル設定プロパティ
Definition AppWindow_CLI.h:248
double ShadowDistance
シャドウマップ領域奥行き幅設定プロパティ
Definition AppWindow_CLI.h:417
bool GetSpecialKeyStatus(fk_Key keyCode, fk_Switch status)
特殊キー状態取得メソッド2
bool Update(void)
シーン描画メソッド2
bool SnapImage(String^ fileName, fk_ImageType format)
形式指定付描画画像ファイル出力メソッド
void Entry(fk_Performer^ chara)
fk_Performer モデル登録メソッド
fk_Vector^ DefaultLightVec
デフォルト光源方向プロパティ
Definition AppWindow_CLI.h:257
bool SnapImage(fk_Image^ image)
描画画像データ出力メソッド
void Remove(fk_Performer^ chara)
fk_Performer モデル表示解除メソッド
void Remove(fk_SpriteModel^ model)
スプライトモデル表示解除メソッド
画像サイズを表すクラス
Definition Image_CLI.h:24
座標系可視化支援クラス
Definition GuideObject_CLI.h:33
画像を生成、管理するクラス
Definition Image_CLI.h:251
モデルを生成、管理するクラス
Definition Model_CLI.h:140
FK Performer キャラクターランタイムクラス
Definition Performer_CLI.h:38
幾何平面を管理するクラス
Definition Plane_CLI.h:34
シーンを制御するクラス
Definition Scene_CLI.h:46
2D スプライトモデルクラス
Definition SpriteModel_CLI.h:33
3次元ベクトルを管理するクラス
Definition Vector_CLI.h:35
Definition AppWindow_CLI.h:11
fk_Guide
fk_GuideObject での座標軸と座標平面を表す列挙型
Definition GuideObject_CLI.h:11
fk_FogMode
霧効果の減衰関数を表す列挙型
Definition Fog_CLI.h:9
fk_ImageType
画像フォーマットを表す列挙型
Definition Image_CLI.h:12
fk_MouseButton
マウスボタンを表す列挙型
Definition AppWindow_CLI.h:52
@ M2
マウス中クリック、あるいはホイールクリック(第2ボタン)
@ M3
マウス右クリック(第3ボタン)
@ M1
マウス左クリック(第1ボタン)
fk_Switch
ボタン系デバイス状態を表す列挙型
Definition AppWindow_CLI.h:59
@ RELEASE
離しっぱなしの状態
@ PRESS
押しっぱなしの状態
@ DOWN
押した瞬間
@ UP
離した瞬間
fk_ShadowMode
Definition Scene_CLI.h:9
fk_Key
Definition AppWindow_CLI.h:15
@ DELETEKEY
デリート(削除)キー
@ F6
F6 ファンクションキー
@ RIGHT
右矢印キー
@ CTRL_R
右コントロールキー
@ ENTER
エンター(改行、リターン)キー
@ F5
F5 ファンクションキー
@ F7
F7 ファンクションキー
@ F8
F8 ファンクションキー
@ F3
F3 ファンクションキー
@ ALT_R
右オルトキー
@ SHIFT_R
右シフトキー
@ INSERT
インサートキー
@ SHIFT_L
左シフトキー
@ F11
F11 ファンクションキー
@ SPACE
スペースキー
@ LEFT
左矢印キー
@ BACKSPACE
バックスペース(後退)キー
@ HOME
ホームキー
@ F9
F9 ファンクションキー
@ ALT_L
左オルトキー
@ END
エンドキー
@ F10
F10 ファンクションキー
@ DOWN
下矢印キー
@ F1
F1 ファンクションキー
@ CAPS_LOCK
キャップスロックキー
@ PAGE_UP
ページアップキー
@ F4
F4 ファンクションキー
@ F12
F12 ファンクションキー
@ PAGE_DOWN
ページダウンキー
@ CTRL_L
左コントロールキー
@ TAB
タブキー
@ UP
上矢印キー
@ F2
F2 ファンクションキー