MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / randSphere

Function randSphere

cpp/5_Domain_Specific/smokeParticles/ParticleSystem.cpp:181–190  ·  view source on GitHub ↗

random point in sphere

Source from the content-addressed store, hash-verified

179
180// random point in sphere
181inline vec3f randSphere()
182{
183 vec3f r;
184
185 do {
186 r = svrand();
187 } while (length(r) > 1.0f);
188
189 return r;
190}
191
192// initialize in regular grid
193void ParticleSystem::initGrid(vec3f start,

Callers 1

sphereEmitterMethod · 0.85

Calls 2

svrandFunction · 0.85
lengthFunction · 0.70

Tested by

no test coverage detected