| 1 |
#pragma once |
| 2 |
|
| 3 |
#include <memory> |
| 4 |
#include "inode.h" |
| 5 |
#include "math/AABB.h" |
| 6 |
|
| 7 |
/** |
| 8 |
* Speaker entity node interface, allowing to |
| 9 |
* get the bounds without the speaker radius part. |
| 10 |
*/ |
| 11 |
class ISpeakerNode |
| 12 |
{ |
| 13 |
public: |
| 14 |
virtual ~ISpeakerNode() {} |
| 15 |
|
| 16 |
/** |
| 17 |
* Get the AABB of the speaker box, without sound radius representation. |
| 18 |
* (Use worldAABB() to get the full bounds.) |
| 19 |
*/ |
| 20 |
virtual AABB getSpeakerAABB() const = 0; |
| 21 |
}; |
| 22 |
|
| 23 |
inline std::shared_ptr<ISpeakerNode> Node_getSpeakerNode(const scene::INodePtr& node) |
| 24 |
{ |
| 25 |
return std::dynamic_pointer_cast<ISpeakerNode>(node); |
| 26 |
} |