| 1 | #ifndef GAME_MAP_ENVELOPE_EXTREMA_H |
|---|---|
| 2 | #define GAME_MAP_ENVELOPE_EXTREMA_H |
| 3 | |
| 4 | #include <engine/map.h> |
| 5 | |
| 6 | #include <game/map/render_map.h> |
| 7 | |
| 8 | #include <vector> |
| 9 | |
| 10 | class CEnvelopeExtrema |
| 11 | { |
| 12 | public: |
| 13 | CEnvelopeExtrema(IMap *pMap); |
| 14 | |
| 15 | class CEnvelopeExtremaItem |
| 16 | { |
| 17 | public: |
| 18 | bool m_Available; |
| 19 | bool m_Rotating; |
| 20 | ivec2 m_Minima; |
| 21 | ivec2 m_Maxima; |
| 22 | }; |
| 23 | |
| 24 | const CEnvelopeExtremaItem &GetExtrema(int Env) const; |
| 25 | |
| 26 | private: |
| 27 | void CalculateEnvelope(const CMapItemEnvelope *pEnvelopeItem, int EnvId); |
| 28 | void CalculateExtrema(); |
| 29 | |
| 30 | CEnvelopeExtremaItem m_EnvelopeExtremaItemNone; |
| 31 | CEnvelopeExtremaItem m_EnvelopeExtremaItemInvalid; |
| 32 | |
| 33 | CMapBasedEnvelopePointAccess m_EnvelopePoints; |
| 34 | IMap *m_pMap; |
| 35 | |
| 36 | std::vector<CEnvelopeExtremaItem> m_vEnvelopeExtrema; |
| 37 | }; |
| 38 | |
| 39 | #endif |
| 40 |