Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cTemplateRoll.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_CTemplateRoll_H
7 #define _INC_CTemplateRoll_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "GrayMapData.h"
17 
18 namespace GrayMapData
19 {
20  class cMapBase;
21 
23  {
30  // TemplatePass_Hue, //!< finding proper color in the hue for the terrain texture
32  };
33 
35  {
40  };
41 
42  struct CTemplateGroundParams;
43 
45  {
50 
51  public:
53 
54  private:
55  bool IsFarEnoughSq(float x, float y, float fMinDistSq) const;
56  public:
57  CTemplateRoll();
58  ~CTemplateRoll();
59 
60  bool HasResults() const
61  {
62  return m_aRolledValues.GetSize() ? true : false;
63  }
64 
65  HRESULT RollResults(cMapBase* pMap, cTemplateList& List, CTemplateGroundParams& Params, const cPolygon3f& Poly, const cPoint3f& vOffset, cRandomBase::SEED_t uSeed, cRectI* pRectClip);
66  HRESULT ClearResults();
67 
68  static float GRAYCALL GetElementHeight(cMapBase* pMap, const CTemplateGroundParams& Params, const cPolygon3f& Poly, const cPoint3f& vPos);
69  };
70 };
71 
72 #endif // _INC_CTemplateRoll_H
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYMAPDATA_LINK
Definition: GrayMapData.h:13
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cPolygon3.h:22
Definition: cRectI.h:22
Definition: cTemplateList.h:22
Definition: cTemplateList.h:46
Definition: cTemplateRoll.h:45
cArrayVal< CTemplateRollValue > m_aRolledValues
result set for rolling RollResults( cTemplateList )
Definition: cTemplateRoll.h:52
bool HasResults() const
Definition: cTemplateRoll.h:60
Definition: cMapBase.h:188
ITERATE_t GetSize() const noexcept
Definition: cArray.h:137
Definition: cArray.h:914
UINT SEED_t
default seed size might be 32 or 64 bit depending on k_RAND_MAX.
Definition: cRandom.h:34
Definition: GrayMapData.cpp:12
TemplatePass_TYPE
Definition: cTemplateRoll.h:23
@ TemplatePass_Grade
finding proper grade
Definition: cTemplateRoll.h:28
@ TemplatePass_Region
finding a spot in the region polygon.
Definition: cTemplateRoll.h:27
@ TemplatePass_MinDistance
finding non occupied spot in the region.
Definition: cTemplateRoll.h:29
@ TemplatePass_QTY
Definition: cTemplateRoll.h:31
@ TemplatePass_Height
finding proper height
Definition: cTemplateRoll.h:26
Definition: cTemplateDefBase.h:21
Definition: cTemplateRoll.h:35
UINT m_uSeedDerived
My own derived seed for this instance. derived from the templates master seed.
Definition: cTemplateRoll.h:38
cTemplateEntry m_Entry
copied from cTemplateList
Definition: cTemplateRoll.h:39
cPoint3f m_pt
< An instance in the full template roll.
Definition: cTemplateRoll.h:37