Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5893: Introduce a new interface which allows a more general kind of …
…renderables to be attached to IRenderEntities. The common RenderableGeometry type now supports attaching itself to a render entity to be considered during lighting mode rendering.
- Loading branch information
1 parent
4e9c0f3
commit 50020cd
Showing
21 changed files
with
286 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include <sigc++/signal.h> | ||
#include "math/AABB.h" | ||
#include "math/Matrix4.h" | ||
|
||
namespace render | ||
{ | ||
|
||
class IRenderableObject | ||
{ | ||
public: | ||
using Ptr = std::shared_ptr<IRenderableObject>; | ||
|
||
virtual ~IRenderableObject() {} | ||
|
||
// Returns true if this object is not empty and should be rendered | ||
virtual bool isVisible() = 0; | ||
|
||
// The model view matrix used to render this object | ||
virtual const Matrix4& getObjectTransform() = 0; | ||
|
||
// The object bounds in local coordinates | ||
virtual const AABB& getObjectBounds() = 0; | ||
|
||
// Emitted when the object bounds have changed, | ||
// because it has been either moved or resized. | ||
virtual sigc::signal<void>& signal_boundsChanged() = 0; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.