aboutsummaryrefslogtreecommitdiff
path: root/src/voxelalgorithms.h
AgeCommit message (Collapse)Author
2021-04-05Reserve vectors before pushing and other code quality changes (#11161)sfan5
2018-02-04Remove unused light updating codeDániel Juhász
Also remove the unit test that tests the removed algorithms.
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-07-07Expose getPointedThing to LuaDániel Juhász
This commit introduces Raycast, a Lua user object, which can be used to perform a raycast on the map. The ray is continuable, so one can also get hidden nodes (for example to see trough glass).
2017-06-21Cpp11 initializers: last src root changeset (#6022)Loïc Blot
* Cpp11 initializers: last src root changeset Finish to migrate all src root folder files to C++11 constructor initializers
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-04-20Light update for map blocksDániel Juhász
This is not really different from the light update of a voxel manipulator. This update does not assume that the lighting was correct before, therefore it is useful for correction. Also expose this function to the Lua API for light correction, and allow voxel manipulators not to update the light.
2017-03-11Light calculation: New bulk node lighting codeDániel Juhász
This commit introduces a new bulk node lighting algorithm to minimize lighting bugs during l-system tree generation, schematic placement and non-mapgen-object lua voxelmanip light calculation. If the block above the changed area is not loaded, it gets loaded to avoid lighting bugs. Light is updated as soon as write_to_map is called on a voxel manipulator, therefore update_map does nothing.
2017-02-13Lighting: Update lighting at block loadingDániel Juhász
This commit updates mapblocks' light if necessary when they are loaded. This removes ghost lighting.
2017-01-04Improve getPointedThing() (#4346)Dániel Juhász
* Improved getPointedThing() The new algorithm checks every node exactly once. Now the point and normal vector of the collision is also returned in the PointedThing (currently they are not used outside of the function). Now the CNodeDefManager keeps the union of all possible nodeboxes, so the raycast won't miss any nodes. Also if there are only small nodeboxes, getPointedThing() is exceptionally fast. Also adds unit test for VoxelLineIterator. * Cleanup, code move This commit moves getPointedThing() and Client::getSelectedActiveObject() to ClientEnvironment. The map nodes now can decide which neighbors they are connecting to (MapNode::getNeighbors()).
2016-10-27Use node lighting for liquid spreadingDániel Juhász
This commit modifies the liquid transforming procedure to light and unlight nodes instead of whole map blocks.
2016-10-27Improved lightingDániel Juhász
This commit rewrites the procedure that is responsible for light updating. this commit -provides iterative solutions for unlighting and light spreading -introduces a new priority queue-like container for the iteration -creates per-node MapBlock caching to reduce retrieving MapBlocks from the map -calculates with map block positions and in-block relative node coordinates -skips light updating if it is not necessary since the node's new light will be the same as its old light was
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-03-27voxalgo::clearLightAndCollectSourcesPerttu Ahola
2012-03-27Implement propagateSunlight for VoxelManipulatorPerttu Ahola