Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CPierPlugin.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Sun Aug 15 01:53:13 2010 UTC (13 years, 9 months ago) by okadu
File MIME type: text/x-chdr
File size: 2461 byte(s)


1 #ifndef CPIERPLUGIN_H_INCLUDED
2 #define CPIERPLUGIN_H_INCLUDED
3
4 #include "CProfilePlugin.h"
5
6 /*
7 * 橋脚プラグイン
8 */
9 class CPierPlugin: public CProfilePlugin{
10 friend class CPier;
11 friend class CLineBuildCurve;
12 private:
13 int m_TrackNum; // 軌道数
14 float m_TrackInterval; // 軌道間隔
15 float m_Interval; // 間隔
16 float m_Offset; // オフセット
17 float m_BuildMinAlt; // 建設最小高度
18 float m_TaperX, m_TaperY; // XY テーパ
19 float m_TaperZ; // Z テーパ (等間隔配置用)
20 float m_PierPos; // 架線柱間積算距離
21 bool m_Direction; // 延長方向 (false: down, true: up)
22 VEC3 m_JointToHeadLocal; // ジョイント部・ヘッド配置ローカル座標
23 VEC3 m_HeadToPierLocal; // ヘッド部・橋脚配置ローカル座標
24 VEC3 m_BaseToPierLocal; // 基礎部・橋脚配置ローカル座標
25 CMesh *m_JointMesh; // ジョイント部メッシュ
26 CMesh *m_HeadMesh; // ヘッド部メッシュ
27 CMesh *m_BaseMesh; // 基礎部メッシュ
28 string m_JointFile; // ジョイント部ファイル名
29 string m_HeadFile; // ヘッド部ファイル名
30 string m_BaseFile; // 基礎部ファイル名
31 float m_JointScale; // ジョイント部スケール
32 float m_HeadScale; // ヘッド部スケール
33 float m_BaseScale; // 基礎部スケール
34 CObject m_JointObject; // ジョイント部オブジェクト
35 CObject m_HeadObject; // ヘッド部オブジェクト
36 CObject m_BaseObject; // 基礎部オブジェクト
37 public:
38 static void RenderPreview();
39 CPierPlugin(char *id): CProfilePlugin(id){}
40 char *DirName(){ return "Pier"; }
41 char *TextName2(){ return "Pier2.txt"; }
42 bool IsMultiTrack(){ return m_TrackNum>1; }
43 int ConfirmMultiTrack(int tn, float ti){
44 return tn!=m_TrackNum ? 1 : (tn>1 && ti!=m_TrackInterval ? 2 : 0);
45 }
46 bool UseTaper(){ return true; }
47 float GetTaperZ(){ return m_Direction ? -m_TaperZ : m_TaperZ; }
48 bool Load();
49 void SetPreview();
50 void Preview(VEC3, float);
51 float GetPierPos(){ return m_PierPos; }
52 void AddPierPos(float);
53 void ResetPierPos(){ m_PierPos = m_Offset; }
54 void SetPierPos(float pp){ m_PierPos = pp; }
55 CPLUGIN_CASTFUNC(CPierPlugin);
56 };
57
58 /*
59 * 橋脚プラグインリスト
60 */
61 class CPierPluginList: public CProfilePluginList{
62 private:
63 public:
64 char *DirName(){ return "Pier"; }
65 char *TextName2(){ return "Pier2.txt"; }
66 char *Default(){ return "Default_SinglePC"; }
67 CPlugin *NewEntry(char *id){ return new CPierPlugin(id); }
68 CPLUGINLIST_CASTFUNC(CPierPlugin);
69 };
70
71 // 外部グローバル
72 extern CPierPlugin *g_Pier;
73 extern CPierPluginList *g_PierPluginList;
74
75 #endif

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