Debian Codegraph @

include/ilightnode.h

raw
1 #pragma once
2
3 #include <memory>
4 #include "inode.h"
5 #include "math/AABB.h"
6
7 /**
8 * LightNodes derive from this class.
9 * It's mainly used to determine the selectable part
10 * of the light, which is usually the small "diamond" in
11 * the center.
12 */
13 class ILightNode
14 {
15 public:
16 virtual ~ILightNode() {}
17
18 /// Return the RendererLight instance for this light node
19 virtual const RendererLight& getRendererLight() const = 0;
20
21 /// Get the AABB of the Light "Diamond" representation.
22 virtual AABB getSelectAABB() const = 0;
23 };
24 typedef std::shared_ptr<ILightNode> ILightNodePtr;
25
26 inline ILightNodePtr Node_getLightNode(const scene::INodePtr& node)
27 {
28 return std::dynamic_pointer_cast<ILightNode>(node);
29 }