Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Graphics class that represents the mapping between the internal buffer and the particle declaration. More...
Public Member Functions | |
ParticleMapper (void *buffer, const ParticleDeclaration *declaration) | |
Constructs a ParticleMapper object with a raw buffer and a particle declaration. More... | |
template<typename T > | |
SparsePtr< T > | GetComponentPtr (ParticleComponent component) |
Gets a pointer to iterate through same components. More... | |
template<typename T > | |
SparsePtr< const T > | GetComponentPtr (ParticleComponent component) const |
Gets a pointer to iterate through same components. More... | |
void * | GetPointer () |
Gets a raw pointer to the particle buffer. More... | |
Graphics class that represents the mapping between the internal buffer and the particle declaration.
Nz::ParticleMapper::ParticleMapper | ( | void * | buffer, |
const ParticleDeclaration * | declaration | ||
) |
Constructs a ParticleMapper object with a raw buffer and a particle declaration.
buffer | Raw buffer to store particles data |
declaration | Declaration of the particle |
SparsePtr< T > Nz::ParticleMapper::GetComponentPtr | ( | ParticleComponent | component | ) |
Gets a pointer to iterate through same components.
component | Component to get in the declaration |
TODO: Check the ratio between the type of the attribute and the template type ?
SparsePtr< const T > Nz::ParticleMapper::GetComponentPtr | ( | ParticleComponent | component | ) | const |
Gets a pointer to iterate through same components.
component | Component to get in the declaration |
TODO: Check the ratio between the type of the attribute and the template type ?
|
inline |
Gets a raw pointer to the particle buffer.
This can be useful when working directly with a struct