My Project
ChunkMaxHeight.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
7  {
8  public:
9  int16_t m_nSolidHeight;
10  int16_t m_nMaxHeight;
11 
12  public:
13  ChunkMaxHeight(int16_t nSolidHeight=0, int16_t nMaxHeight=0);
14 
15  // y pos of the highest block
16  int16_t GetMaxHeight();
17 
18  /* y pos of the first block whose opacity is bigger than 1 (first non-transparent block).
19  */
20  int16_t GetMaxSolidHeight();
21 
22  void SetHeight(int16_t nHeight, bool bIsTransparent = false);
23 
27  void AddBlockHeight(int16_t nHeight, bool bIsTransparent = false);
28 
30  void ClearHeight();
31  };
32 }
different physics engine has different winding order.
Definition: EventBinding.h:32
void ClearHeight()
clear all height 0
Definition: ChunkMaxHeight.cpp:63
void AddBlockHeight(int16_t nHeight, bool bIsTransparent=false)
only call this function at load time, since it can not erase height.
Definition: ChunkMaxHeight.cpp:30
chunk column's height map data
Definition: ChunkMaxHeight.h:6