Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5746: Start implementing the TextureToolSceneGraph
- Loading branch information
1 parent
7ec6b22
commit 3e263a3
Showing
5 changed files
with
86 additions
and
0 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,47 @@ | ||
#include "TextureToolSceneGraph.h" | ||
|
||
#include "iselection.h" | ||
#include "module/StaticModule.h" | ||
|
||
namespace textool | ||
{ | ||
|
||
const std::string& TextureToolSceneGraph::getName() const | ||
{ | ||
static std::string _name(MODULE_TEXTOOL_SCENEGRAPH); | ||
return _name; | ||
} | ||
|
||
const StringSet& TextureToolSceneGraph::getDependencies() const | ||
{ | ||
static StringSet _dependencies{ MODULE_SELECTIONSYSTEM }; | ||
return _dependencies; | ||
} | ||
|
||
void TextureToolSceneGraph::initialiseModule(const IApplicationContext& ctx) | ||
{ | ||
rMessage() << getName() << "::initialiseModule called." << std::endl; | ||
|
||
_sceneSelectionChanged = GlobalSelectionSystem().signal_selectionChanged().connect( | ||
sigc::mem_fun(this, &TextureToolSceneGraph::onSceneSelectionChanged) | ||
); | ||
} | ||
|
||
void TextureToolSceneGraph::shutdownModule() | ||
{ | ||
_sceneSelectionChanged.disconnect(); | ||
} | ||
|
||
void TextureToolSceneGraph::foreachNode(const std::function<bool(const INode::Ptr&)>& functor) | ||
{ | ||
|
||
} | ||
|
||
void TextureToolSceneGraph::onSceneSelectionChanged(const ISelectable& selectable) | ||
{ | ||
// Mark our own selection as dirty | ||
} | ||
|
||
module::StaticModule<TextureToolSceneGraph> _textureToolSceneGraphModule; | ||
|
||
} |
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,27 @@ | ||
#pragma once | ||
|
||
#include <sigc++/connection.h> | ||
#include "itexturetoolmodel.h" | ||
|
||
namespace textool | ||
{ | ||
|
||
class TextureToolSceneGraph : | ||
public ITextureToolSceneGraph | ||
{ | ||
private: | ||
sigc::connection _sceneSelectionChanged; | ||
|
||
public: | ||
const std::string& getName() const override; | ||
const StringSet& getDependencies() const override; | ||
void initialiseModule(const IApplicationContext& ctx) override; | ||
void shutdownModule() override; | ||
|
||
void foreachNode(const std::function<bool(const INode::Ptr&)>& functor) override; | ||
|
||
private: | ||
void onSceneSelectionChanged(const ISelectable& selectable); | ||
}; | ||
|
||
} |
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