Files
NazaraEngine/include/Nazara/Graphics/ParticleFunctionController.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/ParticleFunctionController.hpp>
#include <memory>
#include <Nazara/Graphics/Debug.hpp>
namespace Nz
{
inline ParticleFunctionController::ParticleFunctionController(Controller controller) :
m_controller(std::move(controller))
{
}
/*!
* \brief Gets the controller function
*
* \return Controller function responsible for particle update
*/
inline const ParticleFunctionController::Controller& ParticleFunctionController::GetController() const
{
return m_controller;
}
/*!
* \brief Sets the controller function
*
* \remark The controller function must be valid
*/
inline void ParticleFunctionController::SetController(Controller controller)
{
m_controller = std::move(controller);
}
template<typename... Args>
ParticleFunctionControllerRef ParticleFunctionController::New(Args&&... args)
{
std::unique_ptr<ParticleFunctionController> object(new ParticleFunctionController(std::forward<Args>(args)...));
object->SetPersistent(false);
return object.release();
}
}
#include <Nazara/Graphics/DebugOff.hpp>