Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
voxelneighbourhelper.h
1 #pragma once
2 
3 #include <vector>
4 #include <glm/glm.hpp>
5 
6 
7 class Voxel;
8 class VoxelCluster;
9 
11 {
12 public:
13  VoxelNeighbourHelper(VoxelCluster *voxelCluster, bool includeDiagonals = true);
14 
15  const std::vector<Voxel*>& neighbours(const glm::ivec3& pos);
16  const std::vector<Voxel*>& neighbours(Voxel* voxel);
17 
18 protected:
19  VoxelCluster *m_voxelCluster;
20  std::vector<Voxel*> m_neighbours;
21  bool m_includeDiagonals;
22 
23  void considerNeighbour(const glm::ivec3& pos, const glm::ivec3& offset);
24 };
Definition: voxelcluster.h:21
Definition: voxel.h:15
Definition: voxelneighbourhelper.h:10