MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / CreateParticles

Method CreateParticles

src/Nazara/Graphics/ParticleGroup.cpp:207–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 */
206
207 void* ParticleGroup::CreateParticles(unsigned int count)
208 {
209 if (count == 0)
210 return nullptr;
211
212 if (m_particleCount + count > m_maxParticleCount)
213 return nullptr;
214
215 std::size_t particlesIndex = m_particleCount;
216 m_particleCount += count;
217
218 return &m_buffer[particlesIndex * m_particleSize];
219 }
220
221 /*!
222 * \brief Generates one particle

Callers 2

EnterMethod · 0.80
EnterMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected