aboutsummaryrefslogtreecommitdiff
path: root/src/util/numeric.h
AgeCommit message (Collapse)Author
2023-02-08Generalize mesh chunking, and make it configurable. (#13179)lhofhansl
* Generalize mesh chunking. Set 3x3x3 chunks. * Make mesh chunk size configurable... Default to 1 (off). * Extract all mesh grid maths into a dedicated class --------- Co-authored-by: x2048 <codeforsmile@gmail.com>
2022-07-13Animated particlespawners and more (#11545)Lexi Hale
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
2021-02-26Keep mapblocks in memory if they're in range (#10714)hecks
Some other minor parts of clientmap.cpp have been cleaned up along the way
2020-04-11Formspecs: Add state-selection to style elements (#9378)Hugues Ross
2019-02-07Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)Paul Ouellette
Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues. Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
2018-09-16Light curve: Simplify and improve code, fix darkened daytime sky (#7693)Vitaliy
2018-08-02Smoothed yaw rotation for objects (#6825)SmallJoker
2018-01-12Revert "Add an active object step time budget #6721"Lars Hofhansl
This reverts commit 9c669016d1578a5c62f932c6ccb7a2b4b1e21f0a. See #6907
2017-12-26Fix rounding error in g/set_node caused by truncation to floatrubenwardy
2017-12-06Add an active object step time budget #6721Lars Hofhansl
This can be set via the active_object_interval option.
2017-11-15Allow zoom to actually show more data.Lars Hofhansl
This allows the client to retrieve blocks at a greater distance from the server, thus allowing for a real zoom.
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-08-20Change BS constant from implicit double to float (#6286)Jens Rottmann
the BS constant implicitly promotes all position calculations it is used in to double even though positions (= v3f) are only meant to be floats. There are many, many similar occurrences everywhere, but I'm not willing to hunt down all; I only fixed the little part I'm already familiar with.
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-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-06-19C++11 cleanup on constructors (#6000)Vincent Glize
* C++11 cleanup on constructors dir script
2017-06-06Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot
* Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
2017-05-06Fix myfloor(0.0)ShadowNinja
2017-05-06Clean up numeric.h and split FacePositionCache from itShadowNinja
I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
2017-03-11Minimap: Optimisenumber Zero
2016-10-06use unordered containers where possible (patch 4 on X)Loic Blot
Also remove some unused parameters/functions
2016-02-11v2d & aabbox3d<f32> & sky cleanupsnerzhul
* Sky: rename Box => m_box and inline getBoundingBox * Uniformize aabbox3d<f32> to aabb3f
2015-11-02Rename and move basicmacros.h to util/basic_macros.hest31
2015-10-27Move basic, non-numeric macros from util/numeric.h to basicmacros.hkwolekr
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-08-02src/util/numeric.{cpp,h}: Fix FacePositionCache data raceBřetislav Štec
2015-05-01Fix several MSVC issues numeric.hSmallJoker
-> Round negative numbers correctly CMakeLists.txt -> Link Json with the static run-time library
2015-04-01Clean scaling pre-filter for formspec/HUD.Aaron Suen
2015-03-31Fix set_bitskwolekr
2015-03-31GenElementManager: Pass opaque handles to Lua and rename to ObjDefManagerkwolekr
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-22Add support for the PCG32 PRNG algo (and associated script APIs)kwolekr
2015-02-23Fix wrapDegrees family of functionsCraig Robbins
wrapDegrees() (renamed to modulo360f) wrapDegrees_0_360 wrapDegrees_180 Minor errors were present in previous versions; see issue #2328
2015-02-16Performance Improvement: Use a cache which caches result for getFacePositions.Loic Blot
This greatly reduce the number of std::list generated by caching the result, which is always constant for each radius selected. In the callgrind map, you will see original: * 3.3M calls to std::list for 9700 calls to getFacePositions In the modified version, you will see: * 3.3K calls to std::list for 6900 call to getFacePositions Callgrind map is here: #2321 it's a huge performance improvement to l_find_node_near
2015-01-18Water fixesgregorycu
Change must_reflow to a deque Add overload for MapBlock::raiseModified that takes a const char*. This is a speed improvement. Comment out unused variable Optimisations to block offset calculations
2014-11-19Remove unused rangelim function (the macro still exists)Kahrl
2014-11-08Implement WieldMeshSceneNode which improves wield mesh renderingKahrl
- Don't create and cache an extruded mesh for every (non-node) item. Instead use a single one per image resolution. - For cubic nodes reuse a single wield mesh too - Improve lighting of the wielded item - Increase far value of wield mesh scene camera, fixes #1770 - Also includes some minor refactorings of Camera and GenericCAO.
2014-10-29Refactor decoration-related codekwolekr
Split up ModApiMapgen::l_register_decoration() Define and make use of CONTAINS() and ARRLEN() macros
2013-11-04Accept hexadecimal and string values for seedskwolekr
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-07-27Weather supportproller
2013-06-22Decoration: Add Schematic decoration typekwolekr
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-17Optimize headersPerttu Ahola
2012-06-17Initially split utility.h to multiple files in util/Perttu Ahola