Files
NazaraEngine/include/Nazara/Graphics/ParticleFunctionGenerator.inl
Lynix 262f4c2a87 Graphics/Particles: Add wrappers on functions controller/generator/renderer
Former-commit-id: 8a0eab88a918f901e918a81cc8a81906167eccb8 [formerly 1fea24282314656473187fd5320f36eb6d06c004] [formerly ec24ee686b68f7e684853d49772105bc5a92b5a0 [formerly e9d6783dd6dff1de2468bd0fd979b28037b1cb44]]
Former-commit-id: fc6ad0e1dbf563f3b3b485fe9c7f93b35c0712bc [formerly 9cfcb29a154a3461183695df3daccbb8965eaee9]
Former-commit-id: b91d72a005fdb104711fb8892b14a5f98fc29ab3
2016-08-14 17:54:37 +02:00

47 lines
1.2 KiB
C++

// 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/ParticleFunctionGenerator.hpp>
#include <memory>
#include <Nazara/Graphics/Debug.hpp>
namespace Nz
{
inline ParticleFunctionGenerator::ParticleFunctionGenerator(Generator generator) :
m_generator(std::move(generator))
{
}
/*!
* \brief Gets the generator function
*
* \return Generator function responsible for particle creation
*/
inline const ParticleFunctionGenerator::Generator& ParticleFunctionGenerator::GetGenerator() const
{
return m_generator;
}
/*!
* \brief Sets the generator function
*
* \remark The generator function must be valid
*/
inline void ParticleFunctionGenerator::SetGenerator(Generator generator)
{
m_generator = std::move(generator);
}
template<typename... Args>
ParticleFunctionGeneratorRef ParticleFunctionGenerator::New(Args&&... args)
{
std::unique_ptr<ParticleFunctionGenerator> object(new ParticleFunctionGenerator(std::forward<Args>(args)...));
object->SetPersistent(false);
return object.release();
}
}
#include <Nazara/Graphics/DebugOff.hpp>