MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_noise

Method get_noise

plugins/3dveins.cpp:1506–1520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1504}
1505
1506NoiseFunction::Ptr VeinGenerator::get_noise(t_veinkey vein)
1507{
1508 auto &seed = materials[vein.first];
1509 auto &func = seed.funcs[vein.second];
1510
1511 if (!func)
1512 {
1513 MersenneRNG rng;
1514 rng.init(seed.seeds[vein.second], 10);
1515
1516 func = NoiseFunction::Ptr(makeVeinDistribution(vein, rng));
1517 }
1518
1519 return func;
1520}
1521
1522static bool vein_cmp(const VeinExtent::Ptr &a, const VeinExtent::Ptr &b)
1523{

Callers

nothing calls this directly

Calls 2

makeVeinDistributionFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected