Graphics/Particlegroup: Add GetBuffer method
This commit is contained in:
parent
3193aef29a
commit
5d441583f2
|
|
@ -44,6 +44,8 @@ namespace Nz
|
||||||
void* GenerateParticle();
|
void* GenerateParticle();
|
||||||
void* GenerateParticles(unsigned int count);
|
void* GenerateParticles(unsigned int count);
|
||||||
|
|
||||||
|
inline void* GetBuffer();
|
||||||
|
inline const void* GetBuffer() const;
|
||||||
const ParticleDeclarationConstRef& GetDeclaration() const;
|
const ParticleDeclarationConstRef& GetDeclaration() const;
|
||||||
std::size_t GetMaxParticleCount() const;
|
std::size_t GetMaxParticleCount() const;
|
||||||
std::size_t GetParticleCount() const;
|
std::size_t GetParticleCount() const;
|
||||||
|
|
@ -94,4 +96,6 @@ namespace Nz
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <Nazara/Graphics/ParticleGroup.inl>
|
||||||
|
|
||||||
#endif // NAZARA_PARTICLEGROUP_HPP
|
#endif // NAZARA_PARTICLEGROUP_HPP
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
// Copyright (C) 2016 Jérôme Leclercq
|
||||||
|
// This file is part of the "Nazara Engine - Graphics module"
|
||||||
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
|
#include <Nazara/Graphics/ParticleGroup.hpp>
|
||||||
|
#include <Nazara/Core/Error.hpp>
|
||||||
|
#include <Nazara/Graphics/Debug.hpp>
|
||||||
|
|
||||||
|
namespace Nz
|
||||||
|
{
|
||||||
|
/*!
|
||||||
|
* \brief Gets a raw pointer to the particle buffer
|
||||||
|
*
|
||||||
|
* This can be useful when working directly with a struct, or needing to iterate over all particles.
|
||||||
|
*
|
||||||
|
* \return Pointer to the buffer
|
||||||
|
*
|
||||||
|
* \see GetParticleCount
|
||||||
|
*/
|
||||||
|
inline void* ParticleGroup::GetBuffer()
|
||||||
|
{
|
||||||
|
return m_buffer.data();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Gets a raw pointer to the particle buffer
|
||||||
|
*
|
||||||
|
* This can be useful when working directly with a struct, or needing to iterate over all particles.
|
||||||
|
*
|
||||||
|
* \return Pointer to the buffer
|
||||||
|
*
|
||||||
|
* \see GetParticleCount
|
||||||
|
*/
|
||||||
|
inline const void* ParticleGroup::GetBuffer() const
|
||||||
|
{
|
||||||
|
return m_buffer.data();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <Nazara/Graphics/DebugOff.hpp>
|
||||||
Loading…
Reference in New Issue