|
VOX
A little voxel engine
|
#include <CreateMeshData.hpp>

Public Types | |
| enum | { POS = 2 , NEUT = 1 , NEG = 0 } |
| enum class | Dimensions { X = 0 , Y = 1 , Z = 2 } |
Public Member Functions | |
| CreateMeshData (const glm::ivec3 &pos, const glm::ivec3 &size, ChunkMap &chunk_map) | |
| Create a Mesh Data object. More... | |
| CreateMeshData (const CreateMeshData &)=delete | |
| CreateMeshData & | operator= (const CreateMeshData &)=delete |
| CreateMeshData (CreateMeshData &&other) | |
| CreateMeshData & | operator= (CreateMeshData &&other) |
| ~CreateMeshData () | |
| void | unlock () |
| BlockInfo::Type | getBlock (const int x, const int y, const int z) |
| BlockInfo::Type | getBlock (const glm::ivec3 &pos) |
| uint8_t | getLight (const int x, const int y, const int z) |
| uint8_t | getLight (const glm::ivec3 &pos) |
| void | create () |
| void | createFace (const int dim_1, const int dim_2, const glm::ivec3 &start, const glm::ivec3 &max_iter, const std::array< int, 6 > &indices_order, const std::array< int, 6 > &indices_order_fliped, const glm::ivec3 &abs_normal, const int normal_signe, const int face) |
| void | createFaceWater (const int dim_1, const int dim_2, const glm::ivec3 &start, const glm::ivec3 &max_iter, const std::array< int, 6 > &indices_order, const std::array< int, 6 > &indices_order_fliped, const glm::ivec3 &abs_normal, const int normal_signe, const int face) |
| std::array< uint8_t, 4 > | getAmbientOcclusion (const glm::ivec3 &pos, const int dim_1, const int dim_2) |
| int | getAmbientOcclusion (BlockInfo::Type side_1, BlockInfo::Type side_2, BlockInfo::Type corner) |
| std::array< uint8_t, 4 > | getLight (const glm::ivec3 &pos, const int dim_1, const int dim_2) |
| uint8_t | getLight (uint8_t pos, uint8_t side_1, uint8_t side_2, uint8_t corner) |
| std::shared_ptr< Chunk > | getCenterChunk () |
Public Attributes | |
| std::vector< std::vector< std::vector< std::shared_ptr< Chunk > > > > | chunks |
| std::vector< BlockVertex > | vertices |
| std::vector< uint32_t > | indices |
| std::vector< BlockVertex > | water_vertices |
| std::vector< uint32_t > | water_indices |
|
strong |
| CreateMeshData::CreateMeshData | ( | const glm::ivec3 & | pos, |
| const glm::ivec3 & | size, | ||
| ChunkMap & | chunk_map | ||
| ) |
Create a Mesh Data object.
| pos | the position of the chunk in the chunk map |
| size | the number of chunks to create the mesh data |
| chunk_map | the chunk map |
|
delete |
| CreateMeshData::CreateMeshData | ( | CreateMeshData && | other | ) |
| CreateMeshData::~CreateMeshData | ( | ) |
| void CreateMeshData::create | ( | ) |
| void CreateMeshData::createFace | ( | const int | dim_1, |
| const int | dim_2, | ||
| const glm::ivec3 & | start, | ||
| const glm::ivec3 & | max_iter, | ||
| const std::array< int, 6 > & | indices_order, | ||
| const std::array< int, 6 > & | indices_order_fliped, | ||
| const glm::ivec3 & | abs_normal, | ||
| const int | normal_signe, | ||
| const int | face | ||
| ) |
| void CreateMeshData::createFaceWater | ( | const int | dim_1, |
| const int | dim_2, | ||
| const glm::ivec3 & | start, | ||
| const glm::ivec3 & | max_iter, | ||
| const std::array< int, 6 > & | indices_order, | ||
| const std::array< int, 6 > & | indices_order_fliped, | ||
| const glm::ivec3 & | abs_normal, | ||
| const int | normal_signe, | ||
| const int | face | ||
| ) |
| int CreateMeshData::getAmbientOcclusion | ( | BlockInfo::Type | side_1, |
| BlockInfo::Type | side_2, | ||
| BlockInfo::Type | corner | ||
| ) |
| std::array< uint8_t, 4 > CreateMeshData::getAmbientOcclusion | ( | const glm::ivec3 & | pos, |
| const int | dim_1, | ||
| const int | dim_2 | ||
| ) |
| BlockInfo::Type CreateMeshData::getBlock | ( | const glm::ivec3 & | pos | ) |
| BlockInfo::Type CreateMeshData::getBlock | ( | const int | x, |
| const int | y, | ||
| const int | z | ||
| ) |
|
inline |
| uint8_t CreateMeshData::getLight | ( | const glm::ivec3 & | pos | ) |
| std::array< uint8_t, 4 > CreateMeshData::getLight | ( | const glm::ivec3 & | pos, |
| const int | dim_1, | ||
| const int | dim_2 | ||
| ) |
| uint8_t CreateMeshData::getLight | ( | const int | x, |
| const int | y, | ||
| const int | z | ||
| ) |
| uint8_t CreateMeshData::getLight | ( | uint8_t | pos, |
| uint8_t | side_1, | ||
| uint8_t | side_2, | ||
| uint8_t | corner | ||
| ) |
|
delete |
| CreateMeshData & CreateMeshData::operator= | ( | CreateMeshData && | other | ) |
| void CreateMeshData::unlock | ( | ) |
| std::vector<std::vector<std::vector<std::shared_ptr<Chunk> > > > CreateMeshData::chunks |
| std::vector<uint32_t> CreateMeshData::indices |
| std::vector<BlockVertex> CreateMeshData::vertices |
| std::vector<uint32_t> CreateMeshData::water_indices |
| std::vector<BlockVertex> CreateMeshData::water_vertices |