aboutsummaryrefslogtreecommitdiff
path: root/src/noise.h
Commit message (Expand)AuthorAge
* Remove a few unused functions reported by callcatcher (#11658)SmallJoker2021-10-12
* Fix broken `BiomeGen` abstraction (#11107)sfan52021-03-23
* NetBSD build fix proposal. (#10308)David CARLIER2020-08-25
* Code modernization: src/n*, src/o* (#6280)Loïc Blot2017-08-19
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
* Change internal type for seeds to s32kwolekr2016-06-04
* Noise: Make buffer size parameters unsignedkwolekr2015-05-15
* Replace PRNG assertions with PrngExceptionkwolekr2015-04-27
* Add support for the PCG32 PRNG algo (and associated script APIs)kwolekr2015-03-22
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* PseudoRandom: Expose constant PSEUDORANDOM_MAXkwolekr2014-12-28
* Clean up Noise macroskwolekr2014-12-11
* Noise: Automatically transform noise maps if neededkwolekr2014-12-10
* Noise: Create a deep copy of NoiseParamskwolekr2014-12-10
* Optimize noise implementationskwolekr2014-12-08
* Add flags and lacunarity as new noise parameterskwolekr2014-12-07
* Use setting groups for NoiseParamskwolekr2014-12-02
* Fix NoisePerlin3DEased return valuekwolekr2014-11-14
* Add option 'eased' to NoiseParamsSmallJoker2014-11-13
* Add eased 3d point-value noise functionskwolekr2014-11-12
* Add mgv5. New noise code, uses biome API. Eased 3d noise for terrain, caves, ...paramat2014-11-08
* Change license of noise implementation to Simplified BSDkwolekr2014-10-27
* Add support for eased 3d noisekwolekr2014-10-27
* Add minetest.set_noiseparam_defaults() Lua APIkwolekr2014-02-15
* Huge overhaul of the entire MapgenParams systemkwolekr2014-02-03
* Remove no virtual dtor warnings, make MapgenParams contain actual NoiseParamskwolekr2013-05-19
* Add Mapgen V7, reorganize biomeskwolekr2013-04-07
* initial mapgen indev version with farscale feature and huge cavesproller2013-03-16
* Re-add dungeons in new dungeongen.cppkwolekr2013-03-10
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Fix MapgenV6::getGroundLevelAtPoint()kwolekr2013-01-21
* Finish and clean up mapgen configurationkwolekr2013-01-21
* Cleaned & enhanced noise object managementkwolekr2013-01-21
* Add initial Lua biomedef support, fixed biome selectionkwolekr2013-01-21
* The new mapgen, noise functions, et al.kwolekr2013-01-21
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* updated noise stuffPerttu Ahola2011-06-26
* mapgen stuffPerttu Ahola2011-06-25
* New map generator added (and SQLite, messed up the commits at that time...) (...Perttu Ahola2011-06-25
* tested out and commented out some new stuff for the terrain generator, to be ...Perttu Ahola2011-04-26
* A third try on terrain generation. No trees yet.Perttu Ahola2011-02-28
* 3d noise stuffPerttu Ahola2011-02-26
* mapgen tweakingPerttu Ahola2011-02-06
* added noise.*Perttu Ahola2011-02-05
"hl num">0, 0); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == -1); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx-2, by+1.5, bz, bx-1, by+2.5, bz-1); v3f v(1, 0, 0); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == -1); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx-2, by-1.5, bz, bx-1.5, by+0.5, bz+1); v3f v(0.5, 0.1, 0); f32 dtime = 3.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 0); UASSERT(fabs(dtime - 3.000) < 0.001); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx-2, by-1.5, bz, bx-1.5, by+0.5, bz+1); v3f v(0.5, 0.1, 0); f32 dtime = 3.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 0); UASSERT(fabs(dtime - 3.000) < 0.001); } // X+ { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx+2, by, bz, bx+3, by+1, bz+1); v3f v(-1, 0, 0); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 0); UASSERT(fabs(dtime - 1.000) < 0.001); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx+2, by, bz, bx+3, by+1, bz+1); v3f v(1, 0, 0); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == -1); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx+2, by, bz+1.5, bx+3, by+1, bz+3.5); v3f v(-1, 0, 0); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == -1); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx+2, by-1.5, bz, bx+2.5, by-0.5, bz+1); v3f v(-0.5, 0.2, 0); f32 dtime = 2.5f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 1); // Y, not X! UASSERT(fabs(dtime - 2.500) < 0.001); } { aabb3f s(bx, by, bz, bx+1, by+1, bz+1); aabb3f m(bx+2, by-1.5, bz, bx+2.5, by-0.5, bz+1); v3f v(-0.5, 0.3, 0); f32 dtime = 2.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 0); UASSERT(fabs(dtime - 2.000) < 0.001); } // TODO: Y-, Y+, Z-, Z+ // misc { aabb3f s(bx, by, bz, bx+2, by+2, bz+2); aabb3f m(bx+2.3, by+2.29, bz+2.29, bx+4.2, by+4.2, bz+4.2); v3f v(-1./3, -1./3, -1./3); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 0); UASSERT(fabs(dtime - 0.9) < 0.001); } { aabb3f s(bx, by, bz, bx+2, by+2, bz+2); aabb3f m(bx+2.29, by+2.3, bz+2.29, bx+4.2, by+4.2, bz+4.2); v3f v(-1./3, -1./3, -1./3); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 1); UASSERT(fabs(dtime - 0.9) < 0.001); } { aabb3f s(bx, by, bz, bx+2, by+2, bz+2); aabb3f m(bx+2.29, by+2.29, bz+2.3, bx+4.2, by+4.2, bz+4.2); v3f v(-1./3, -1./3, -1./3); f32 dtime = 1.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 2); UASSERT(fabs(dtime - 0.9) < 0.001); } { aabb3f s(bx, by, bz, bx+2, by+2, bz+2); aabb3f m(bx-4.2, by-4.2, bz-4.2, bx-2.3, by-2.29, bz-2.29); v3f v(1./7, 1./7, 1./7); f32 dtime = 17.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 0); UASSERT(fabs(dtime - 16.1) < 0.001); } { aabb3f s(bx, by, bz, bx+2, by+2, bz+2); aabb3f m(bx-4.2, by-4.2, bz-4.2, bx-2.29, by-2.3, bz-2.29); v3f v(1./7, 1./7, 1./7); f32 dtime = 17.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 1); UASSERT(fabs(dtime - 16.1) < 0.001); } { aabb3f s(bx, by, bz, bx+2, by+2, bz+2); aabb3f m(bx-4.2, by-4.2, bz-4.2, bx-2.29, by-2.29, bz-2.3); v3f v(1./7, 1./7, 1./7); f32 dtime = 17.0f; UASSERT(axisAlignedCollision(s, m, v, &dtime) == 2); UASSERT(fabs(dtime - 16.1) < 0.001); } } }