Graphics/ParticleMapper: Add GetPointer method

This commit is contained in:
Lynix 2016-11-23 14:07:01 +01:00
parent 5d441583f2
commit 24e0163a8a
2 changed files with 13 additions and 0 deletions

View File

@ -22,6 +22,7 @@ namespace Nz
template<typename T> SparsePtr<T> GetComponentPtr(ParticleComponent component);
template<typename T> SparsePtr<const T> GetComponentPtr(ParticleComponent component) const;
inline void* GetPointer();
private:
const ParticleDeclaration* m_declaration;

View File

@ -68,6 +68,18 @@ namespace Nz
return SparsePtr<const T>();
}
}
/*!
* \brief Gets a raw pointer to the particle buffer
*
* This can be useful when working directly with a struct
*
* \return Pointer to the buffer
*/
inline void* ParticleMapper::GetPointer()
{
return m_ptr;
}
}
#include <Nazara/Graphics/DebugOff.hpp>