| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "inode.h" |
| 4 |
#include <memory> |
| 5 |
|
| 6 |
namespace particles |
| 7 |
{ |
| 8 |
|
| 9 |
class IRenderableParticle; |
| 10 |
typedef std::shared_ptr<IRenderableParticle> IRenderableParticlePtr; |
| 11 |
|
| 12 |
/// Interface for a Node containing a particle system |
| 13 |
class IParticleNode: public virtual scene::INode |
| 14 |
{ |
| 15 |
public: |
| 16 |
// Get the reference to the render particle this node is containing |
| 17 |
virtual IRenderableParticlePtr getParticle() const = 0; |
| 18 |
}; |
| 19 |
typedef std::shared_ptr<IParticleNode> IParticleNodePtr; |
| 20 |
|
| 21 |
/// Test if a node is a particle node |
| 22 |
inline bool isParticleNode(const scene::INodePtr& node) |
| 23 |
{ |
| 24 |
return (dynamic_cast<IParticleNode*>(node.get()) != NULL); |
| 25 |
} |
| 26 |
|
| 27 |
} // namespace |