aboutsummaryrefslogtreecommitdiff
path: root/src/voxelalgorithms.cpp
AgeCommit message (Collapse)Author
2021-04-05Reserve vectors before pushing and other code quality changes (#11161)sfan5
2019-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2018-03-10Fix typo in lighting code since bcdb3d5SmallJoker
2018-03-09VoxelArea: add_{x,y,z,p} must be staticLoic Blot
Fix some documentations issues Use getNodeNoCheck(v3s16, ...) in some cases instead of getNodeNoCheck(x, y, z, ...)
2018-03-09Variable name fix + structure creation unrolling in lighting codeLoic Blot
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2018-02-04Remove unused light updating codeDániel Juhász
Also remove the unit test that tests the removed algorithms.
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
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-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-04-20Split light update into two partsDániel Juhász
The common part can be reused.
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-11-28Limit light_source in the engine (#4814)juhdanad
Since light_source>15 causes crash, it must be limited.
2016-10-27CleanupDániel Juhász
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
2014-06-23Remove emerge and speedup addArea by using memcopy instead of one by one ↵sapier
assignment
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2013-01-21The new mapgen, noise functions, et al.kwolekr
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