Documentation for module: Graphics
Former-commit-id: 5fba876346aec7b35bc618002b669ff194e58544
This commit is contained in:
@@ -7,10 +7,20 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \brief Gets a pointer to iterate through same components
|
||||
* \return SparsePtr pointing to same components
|
||||
*
|
||||
* \param component Component to get in the declaration
|
||||
*
|
||||
* \remark The same components are not continguous but separated by sizeof(ParticleSize)
|
||||
* \remark Produces a NazaraError if component is disabled
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
SparsePtr<T> ParticleMapper::GetComponentPtr(ParticleComponent component)
|
||||
{
|
||||
// Ensuite le composant qui nous intéresse
|
||||
// Then the component that are interesting
|
||||
bool enabled;
|
||||
ComponentType type;
|
||||
unsigned int offset;
|
||||
@@ -18,7 +28,7 @@ namespace Nz
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
///TODO: Vérifier le rapport entre le type de l'attribut et le type template ?
|
||||
///TODO: Check the ratio between the type of the attribute and the template type ?
|
||||
return SparsePtr<T>(m_ptr + offset, m_declaration->GetStride());
|
||||
}
|
||||
else
|
||||
@@ -28,10 +38,20 @@ namespace Nz
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Gets a pointer to iterate through same components
|
||||
* \return SparsePtr pointing to same components
|
||||
*
|
||||
* \param component Component to get in the declaration
|
||||
*
|
||||
* \remark The same components are not continguous but separated by sizeof(ParticleSize)
|
||||
* \remark Produces a NazaraError if component is disabled
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
SparsePtr<const T> ParticleMapper::GetComponentPtr(ParticleComponent component) const
|
||||
{
|
||||
// Ensuite le composant qui nous intéresse
|
||||
// Then the component that are interesting
|
||||
bool enabled;
|
||||
ComponentType type;
|
||||
unsigned int offset;
|
||||
@@ -39,7 +59,7 @@ namespace Nz
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
///TODO: Vérifier le rapport entre le type de l'attribut et le type template ?
|
||||
///TODO: Check the ratio between the type of the attribute and the template type ?
|
||||
return SparsePtr<const T>(m_ptr + offset, m_declaration->GetStride());
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user