diff options
Diffstat (limited to 'src/voxelalgorithms.h')
-rw-r--r-- | src/voxelalgorithms.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/voxelalgorithms.h b/src/voxelalgorithms.h index 13153157d..1452f30f4 100644 --- a/src/voxelalgorithms.h +++ b/src/voxelalgorithms.h @@ -43,8 +43,10 @@ namespace voxalgo * \param modified_blocks output, contains all map blocks that * the function modified */ -void update_lighting_nodes(Map *map, std::vector<std::pair<v3s16, MapNode>> &oldnodes, - std::map<v3s16, MapBlock *> &modified_blocks); +void update_lighting_nodes( + Map *map, + std::vector<std::pair<v3s16, MapNode> > &oldnodes, + std::map<v3s16, MapBlock*> &modified_blocks); /*! * Updates borders of the given mapblock. @@ -55,8 +57,8 @@ void update_lighting_nodes(Map *map, std::vector<std::pair<v3s16, MapNode>> &old * \param modified_blocks output, contains all map blocks that * the function modified */ -void update_block_border_lighting( - Map *map, MapBlock *block, std::map<v3s16, MapBlock *> &modified_blocks); +void update_block_border_lighting(Map *map, MapBlock *block, + std::map<v3s16, MapBlock*> &modified_blocks); /*! * Copies back nodes from a voxel manipulator @@ -67,7 +69,7 @@ void update_block_border_lighting( * the function modified */ void blit_back_with_light(ServerMap *map, MMVManip *vm, - std::map<v3s16, MapBlock *> *modified_blocks); + std::map<v3s16, MapBlock*> *modified_blocks); /*! * Corrects the light in a map block. @@ -76,7 +78,7 @@ void blit_back_with_light(ServerMap *map, MMVManip *vm, * \param block the block to update */ void repair_block_light(ServerMap *map, MapBlock *block, - std::map<v3s16, MapBlock *> *modified_blocks); + std::map<v3s16, MapBlock*> *modified_blocks); /*! * This class iterates trough voxels that intersect with @@ -96,17 +98,17 @@ public: * which multiplying the line's vector gives a vector that ends * on the intersection of two nodes. */ - v3f m_next_intersection_multi{10000.0f, 10000.0f, 10000.0f}; + v3f m_next_intersection_multi { 10000.0f, 10000.0f, 10000.0f }; /*! * Each component stores the smallest positive number, by which * m_next_intersection_multi's components can be increased. */ - v3f m_intersection_multi_inc{10000.0f, 10000.0f, 10000.0f}; + v3f m_intersection_multi_inc { 10000.0f, 10000.0f, 10000.0f }; /*! * Direction of the line. Each component can be -1 or 1 (if a * component of the line's vector is 0, then there will be 1). */ - v3s16 m_step_directions{1, 1, 1}; + v3s16 m_step_directions { 1, 1, 1 }; //! Position of the current node. v3s16 m_current_node_pos; //! Index of the current node @@ -124,7 +126,7 @@ public: * line in voxel coordinates. start_position+line_vector * is the end of the line */ - VoxelLineIterator(const v3f &start_position, const v3f &line_vector); + VoxelLineIterator(const v3f &start_position,const v3f &line_vector); /*! * Steps to the next voxel. @@ -138,7 +140,10 @@ public: /*! * Returns true if the next voxel intersects the given line. */ - inline bool hasNext() const { return m_current_index < m_last_index; } + inline bool hasNext() const + { + return m_current_index < m_last_index; + } /*! * Returns how many times next() must be called until |