format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
+31
-15
@@ -2,12 +2,13 @@
|
||||
#define VOXELS_CHUNKS_HPP_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "voxel.hpp"
|
||||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "../typedefs.hpp"
|
||||
#include "voxel.hpp"
|
||||
|
||||
class VoxelRenderer;
|
||||
|
||||
@@ -26,8 +27,12 @@ class Chunks {
|
||||
const ContentIndices* const indices;
|
||||
|
||||
void eraseSegments(const Block* def, blockstate state, int x, int y, int z);
|
||||
void repairSegments(const Block* def, blockstate state, int x, int y, int z);
|
||||
void setRotationExtended(Block* def, blockstate state, glm::ivec3 origin, uint8_t rotation);
|
||||
void repairSegments(
|
||||
const Block* def, blockstate state, int x, int y, int z
|
||||
);
|
||||
void setRotationExtended(
|
||||
Block* def, blockstate state, glm::ivec3 origin, uint8_t rotation
|
||||
);
|
||||
public:
|
||||
std::vector<std::shared_ptr<Chunk>> chunks;
|
||||
std::vector<std::shared_ptr<Chunk>> chunksSecond;
|
||||
@@ -38,8 +43,14 @@ public:
|
||||
int32_t ox, oz;
|
||||
WorldFiles* worldFiles;
|
||||
|
||||
Chunks(uint32_t w, uint32_t d, int32_t ox, int32_t oz,
|
||||
WorldFiles* worldFiles, Level* level);
|
||||
Chunks(
|
||||
uint32_t w,
|
||||
uint32_t d,
|
||||
int32_t ox,
|
||||
int32_t oz,
|
||||
WorldFiles* worldFiles,
|
||||
Level* level
|
||||
);
|
||||
~Chunks() = default;
|
||||
|
||||
bool putChunk(const std::shared_ptr<Chunk>& chunk);
|
||||
@@ -68,16 +79,21 @@ public:
|
||||
/// @param state the block state
|
||||
/// @param coord position of the zone start
|
||||
/// @param ignore ignored block id (will be counted as replaceable)
|
||||
bool checkReplaceability(const Block* def, blockstate state, glm::ivec3 coord, blockid_t ignore=0);
|
||||
bool checkReplaceability(
|
||||
const Block* def,
|
||||
blockstate state,
|
||||
glm::ivec3 coord,
|
||||
blockid_t ignore = 0
|
||||
);
|
||||
|
||||
void setRotation(int32_t x, int32_t y, int32_t z, uint8_t rotation);
|
||||
|
||||
voxel* rayCast(
|
||||
glm::vec3 start,
|
||||
glm::vec3 dir,
|
||||
float maxLength,
|
||||
glm::vec3& end,
|
||||
glm::ivec3& norm,
|
||||
glm::vec3 start,
|
||||
glm::vec3 dir,
|
||||
float maxLength,
|
||||
glm::vec3& end,
|
||||
glm::ivec3& norm,
|
||||
glm::ivec3& iend
|
||||
);
|
||||
|
||||
@@ -100,4 +116,4 @@ public:
|
||||
void saveAll();
|
||||
};
|
||||
|
||||
#endif // VOXELS_CHUNKS_HPP_
|
||||
#endif // VOXELS_CHUNKS_HPP_
|
||||
|
||||
Reference in New Issue
Block a user