Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CScene.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (show annotations) (download) (as text)
Sun Sep 9 04:21:31 2012 UTC (11 years, 8 months ago) by okadu
File MIME type: text/x-chdr
File size: 3281 byte(s)
[okadu] Version 2.14a バグ修正いろいろ

1 #ifndef CSCENE_H_INCLUDED
2 #define CSCENE_H_INCLUDED
3
4 #include "CCamera.h"
5 #include "CStruct.h"
6
7 class CListElement;
8 class CRailConnector;
9 class CRailWay;
10 class CPier;
11 class CLine;
12 class CPole;
13 class CPoleLink;
14 class CStation;
15 class CPierPlugin;
16 class CLinePlugin;
17 class CPolePlugin;
18 class CSurfacePlugin;
19 class CEnvPlugin;
20
21 /*
22 * シーン
23 */
24 class CScene: public CStruct{
25 friend class CSceneEditMode;
26 private:
27 int m_Serial; // シリアルナンバー
28 string m_Name; // シーン名
29 VEC3 m_ArrowPos; // 編集座標
30 CListElement *m_ListElement; // リスト要素
31 CCamera m_Camera; // カメラ
32 CRailConnector *m_RailConnector; // コネクタ
33 CRailWay *m_RailWay; // レール
34 CPier *m_Pier; // 橋脚
35 CLine *m_Line; // 架線
36 CPole *m_Pole; // 架線柱
37 CStation *m_Station; // 駅舎
38 CStruct *m_Struct; // 施設
39 CSurfacePlugin *m_SurfacePlugin; // 地形プラグイン
40 CEnvPlugin *m_EnvPlugin; // 環境プラグイン
41 bool m_IsDumpReady; // ダンプ完了
42 CScene *m_Next; // 次
43 public:
44 CScene();
45 CScene(CSurfacePlugin *, CEnvPlugin *, char *);
46 ~CScene();
47 char *GetName(){ return (char *)m_Name.c_str(); }
48 char *GetNumberedName();
49 void SetName(char *name){ m_Name = name; }
50 VEC3 *GetArrowPos(){ return &m_ArrowPos; }
51 int GetSerial(){ return m_Serial; }
52 void SetSerial(int s){ m_Serial = s; }
53 void SetListElement(CListElement *le){ m_ListElement = le; }
54 CListElement *GetListElement(){ return m_ListElement; }
55 CCamera *GetCamera(){ return &m_Camera; }
56 CSurfacePlugin *GetSurface(){ return m_SurfacePlugin; }
57 CEnvPlugin *GetEnv(){ return m_EnvPlugin; }
58 void SetEnv(CEnvPlugin *epi){ m_EnvPlugin = epi; }
59 void SetSeason();
60 void Enter(bool);
61 void SetGlobalAxis();
62 void ResetRailWayRoot();
63 void ResetRailConnectorRoot();
64 void Delete();
65 void DeleteGroup(CTrainGroup *);
66 void DeletePierLink(CPier *);
67 void DeletePoleLink(CPole *);
68 bool DeleteRailWay();
69 bool SetRailBlock(char *);
70 bool SetSpeedLimit(int);
71 bool DeleteRailConnector();
72 bool DeletePier(CPier *);
73 bool DeleteLine(CLine *);
74 bool DeletePole(CPole *);
75 bool DeleteStation(CStation *);
76 bool DeleteStruct(CStruct *);
77 void ScanInputRailWay(int, VEC3, VEC3, bool);
78 void ScanInputRailConnector(int, VEC3, VEC3);
79 void ScanInputPier(int, VEC3, VEC3);
80 void ScanInputLine(int, VEC3, VEC3);
81 void ScanInputPole(int, VEC3, VEC3);
82 void ScanInputStation(int, VEC3, VEC3, bool init = false);
83 void ScanInputStruct(int, VEC3, VEC3, bool init = false);
84 CLine *FindLine(CPoleLink *, CPoleLink *);
85 void BuildLine(CPierPlugin *, CLinePlugin *, CPolePlugin *);
86 bool PickScene(VEC3, VEC3, VEC3 *, VEC3 *tri = NULL, int inv = 1);
87 bool ClipAlt(VEC3 *, VEC3 *, VEC3 *, int);
88 void Dump();
89 void SetDumpReady(bool r){ m_IsDumpReady = r; }
90 void RenderScene();
91 void RenderAfter();
92 void SimulateScene();
93 CScene *GetScene(){ return this; }
94 void RestoreAddress();
95 char *Read(char *, CScene ***);
96 void Save(FILE *);
97 CMODELINST_CASTFUNC(CScene);
98 };
99
100 // 外部グローバル
101 extern CScene *g_Scene;
102 extern map<void *, void *> g_AddressMap;
103
104 // 関数宣言
105 void *ReplaceAdr(void *);
106
107 /*
108 * カレントシーンの地形を取得
109 */
110 inline CSurfacePlugin *Surface(){ return g_Scene->GetSurface(); }
111
112 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26