2021-09-13 12:10:06 -04:00
|
|
|
#ifndef BLOCKARRAY3D_H__
|
|
|
|
#define BLOCKARRAY3D_H__
|
|
|
|
|
|
|
|
#include "define.h"
|
|
|
|
|
|
|
|
class BlockArray3d {
|
|
|
|
public:
|
2021-09-17 10:03:32 -04:00
|
|
|
BlockArray3d(int x, int y, int z);
|
2021-09-13 12:10:06 -04:00
|
|
|
BlockArray3d(BlockArray3d& ba);
|
2021-09-17 10:03:32 -04:00
|
|
|
virtual ~BlockArray3d();
|
2021-09-13 12:10:06 -04:00
|
|
|
|
|
|
|
void Set(int x, int y, int z, BlockType type);
|
|
|
|
BlockType Get(int x, int y, int z) const;
|
|
|
|
void Reset(BlockType type);
|
|
|
|
|
|
|
|
private:
|
2021-09-17 10:03:32 -04:00
|
|
|
BlockType* m_blocks;
|
|
|
|
int m_x;
|
|
|
|
int m_y;
|
|
|
|
int m_z;
|
|
|
|
|
|
|
|
int GetPosition(int x, int y, int z) const;
|
2021-09-13 12:10:06 -04:00
|
|
|
};
|
|
|
|
#endif
|