Graphics/ParticleMapper: Add GetPointer method
This commit is contained in:
@@ -22,6 +22,7 @@ namespace Nz
|
|||||||
|
|
||||||
template<typename T> SparsePtr<T> GetComponentPtr(ParticleComponent component);
|
template<typename T> SparsePtr<T> GetComponentPtr(ParticleComponent component);
|
||||||
template<typename T> SparsePtr<const T> GetComponentPtr(ParticleComponent component) const;
|
template<typename T> SparsePtr<const T> GetComponentPtr(ParticleComponent component) const;
|
||||||
|
inline void* GetPointer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const ParticleDeclaration* m_declaration;
|
const ParticleDeclaration* m_declaration;
|
||||||
|
|||||||
@@ -68,6 +68,18 @@ namespace Nz
|
|||||||
return SparsePtr<const T>();
|
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>
|
#include <Nazara/Graphics/DebugOff.hpp>
|
||||||
|
|||||||
Reference in New Issue
Block a user