OROCHI
 
Loading...
Searching...
No Matches
GxResModelGmlMeta.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_UTILITY_NAMESPACE_BEGIN()
13//===========================================================================
15//===========================================================================
17{
18 //-----------------------------------------------------------
20 //-----------------------------------------------------------
22public:
23 // RTTI 宣言
25 // GxClassBaseReference 継承クラス用禁止宣言
27
30 {
31 //-----------------------------------------------------------
33 //-----------------------------------------------------------
35 public:
37 enum class KIND
38 {
39 INVALID = -1,
40 GROUND = 0,
41 WALL,
42 ROOF,
43 MAX,
44 };
45#if GX_DEVELOP
47 GX_ENUM_TABLE_MAX(KIND)
48#endif //GX_DEVELOP
49
50 // RTTI 宣言
51 GX_RTTI_CLASS(GxMultiSurface, GxClassBase)
52
53
54 //-----------------------------------------------------------
56 //-----------------------------------------------------------
58
59
60 GxMultiSurface(void) : _kind(KIND::INVALID) {}
61
63 //-----------------------------------------------------------
65 //-----------------------------------------------------------
67
69
71 };
72
75 {
76 //-----------------------------------------------------------
78 //-----------------------------------------------------------
80 public:
82 enum class KIND
83 {
84 INVALID = -1,
85 BUILDING = 0,
86 ROAD,
87 CROSS_ROAD,
88 MAX,
89 };
90#if GX_DEVELOP
92 GX_ENUM_TABLE_MAX(KIND)
93#endif //GX_DEVELOP
94
95 // RTTI 宣言
96 GX_RTTI_CLASS(GxCityObject, GxClassBase)
97
98
99 //-----------------------------------------------------------
101 //-----------------------------------------------------------
103
104
105 GxCityObject(void) : _kind(KIND::INVALID) {}
107 ~GxCityObject(void);
108
110 //-----------------------------------------------------------
112 //-----------------------------------------------------------
114
116 GX_FORCE_INLINE GxMultiSurface* addMultiSurface(void) { auto* pSurface = GX_NEW GxMultiSurface; _multiSurfaces.addBottom(pSurface); return pSurface; }
118 GX_FORCE_INLINE GxMultiSurface* getMultiSurface(u32 index) { return static_cast<GxMultiSurface*>(_multiSurfaces[index]); }
119
121 //-----------------------------------------------------------
123 //-----------------------------------------------------------
125
129
131 };
132
134 //-----------------------------------------------------------
136 //-----------------------------------------------------------
138
140 GxResModelGmlMeta(void);
141
143 //-----------------------------------------------------------
145 //-----------------------------------------------------------
147
149 void cleanup(void) override;
150protected:
152 b32 load(GxStream& in, u32 dataSize);
153#if GX_DEVELOP
155 b32 save(GxStream& out);
156#endif // GX_DEVELOP
157
159 //-----------------------------------------------------------
161 //-----------------------------------------------------------
163public:
165 GX_FORCE_INLINE const GxVector2d& getGeoCoordinates(void) const { return _geoCoordinates; }
167 GX_FORCE_INLINE void setGeoCoordinates(const GxVector2d& coordinates) { _geoCoordinates = coordinates; }
169 GX_FORCE_INLINE GxCityObject* addCityObject(void) { auto* pMesh = GX_NEW GxCityObject; _cityObjects.addBottom(pMesh); return pMesh; }
171 GX_FORCE_INLINE GxCityObject* getCityObject(u32 index) { return static_cast<GxCityObject*>(_cityObjects[index]); }
172
174 //-----------------------------------------------------------
176 //-----------------------------------------------------------
178protected:
181
183};
184
185#if GX_DEVELOP
186//===========================================================================
188//===========================================================================
189class GxResModelGmlMetaXml : public GxResModelGmlMeta
190{
191 //-----------------------------------------------------------
193 //-----------------------------------------------------------
195public:
196 // RTTI宣言
197 GX_RTTI_RESOURCE(GxResModelGmlMetaXml, GxResModelGmlMeta);
198 // GxClassBaseReference 継承クラス用禁止宣言
199 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResModelGmlMetaXml);
200
202 //-----------------------------------------------------------
204 //-----------------------------------------------------------
206
208 GxResModelGmlMetaXml(void);
209
211 //-----------------------------------------------------------
213 //-----------------------------------------------------------
215
217 b32 finalized(void);
218
219protected:
221 b32 load(GxStream& in, u32 dataSize);
223 b32 save(GxStream& out);
224
226};
227#endif // GX_DEVELOP
228
229GX_UTILITY_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
@ MAX
定義数
@ INVALID
無効なビュー
#define GX_RTTI_RESOURCE(__THIS__, __BASE__)
リソースクラス型情報宣言
Definition GxRttiResource.h:102
配列クラス
Definition GxArrayClassBase.h:18
オブジェクト基底クラス
Definition GxBase.h:88
リソース基底クラス
Definition GxResBase.h:23
オブジェクト情報
Definition GxResModelGmlMeta.h:75
KIND
種別
Definition GxResModelGmlMeta.h:83
GxString _name
名前
Definition GxResModelGmlMeta.h:127
GxArrayClassBase _multiSurfaces
面情報リスト
Definition GxResModelGmlMeta.h:126
GX_FORCE_INLINE GxMultiSurface * getMultiSurface(u32 index)
面情報を取得
Definition GxResModelGmlMeta.h:118
GX_FORCE_INLINE GxMultiSurface * addMultiSurface(void)
面情報を作成
Definition GxResModelGmlMeta.h:116
KIND _kind
種別
Definition GxResModelGmlMeta.h:128
面情報
Definition GxResModelGmlMeta.h:30
KIND _kind
種別
Definition GxResModelGmlMeta.h:68
KIND
種別
Definition GxResModelGmlMeta.h:38
モデルGMLメタデータリソース
Definition GxResModelGmlMeta.h:17
GX_FORCE_INLINE GxCityObject * getCityObject(u32 index)
オブジェクト情報を取得
Definition GxResModelGmlMeta.h:171
GX_FORCE_INLINE void setGeoCoordinates(const GxVector2d &coordinates)
緯度経度を設定
Definition GxResModelGmlMeta.h:167
GxVector2d _geoCoordinates
緯度経度
Definition GxResModelGmlMeta.h:179
GxArrayClassBase _cityObjects
オブジェクトリスト
Definition GxResModelGmlMeta.h:180
GX_FORCE_INLINE const GxVector2d & getGeoCoordinates(void) const
緯度経度を取得
Definition GxResModelGmlMeta.h:165
b32 load(GxStream &in, u32 dataSize)
リソースロード
Definition GxResModelGmlMeta.cpp:89
GX_FORCE_INLINE GxCityObject * addCityObject(void)
オブジェクト情報を作成
Definition GxResModelGmlMeta.h:169
ストリーム基礎クラス
Definition GxStream.h:20
文字列型クラス
Definition GxString.h:18
2次元ベクトル(倍精度)
Definition GxVectord.h:25
32bitブーリアン
Definition GxDefine.h:173