Skip to content
Snippets Groups Projects
Commit bca877d4 authored by Mathias Paulin's avatar Mathias Paulin :speech_balloon:
Browse files

[librender] remove unused files.

parent 37ca3b5b
No related branches found
No related tags found
No related merge requests found
...@@ -6,12 +6,9 @@ ...@@ -6,12 +6,9 @@
#include <nodes/ConnectionStyle> #include <nodes/ConnectionStyle>
#include <nodes/NodeData> #include <nodes/NodeData>
#include <RadiumNBR/NodeBasedRenderer.hpp>
#include <RadiumNBR/NodeGraph/RenderGraph.hpp> #include <RadiumNBR/NodeGraph/RenderGraph.hpp>
#include <RadiumNBR/Gui/RenderGraphEditor/NodeAdapterModel.hpp> #include <RadiumNBR/Gui/RenderGraphEditor/NodeAdapterModel.hpp>
#include <RadiumNBR/Gui/RenderGraphEditor/SourceColorTextureModel.hpp>
#include <RadiumNBR/Gui/RenderGraphEditor/SourceDepthTextureModel.hpp>
#include <RadiumNBR/Gui/RenderGraphEditor/WidgetFactory.hpp> #include <RadiumNBR/Gui/RenderGraphEditor/WidgetFactory.hpp>
#include <RadiumNBR/NodeGraph/PremadeNodes/PremadeNodesIncludes.hpp> #include <RadiumNBR/NodeGraph/PremadeNodes/PremadeNodesIncludes.hpp>
...@@ -202,13 +199,6 @@ std::shared_ptr<DataModelRegistry> initializeNodeRegistry( RenderGraph* renderGr ...@@ -202,13 +199,6 @@ std::shared_ptr<DataModelRegistry> initializeNodeRegistry( RenderGraph* renderGr
ret->registerModel<NodeAdapterModel<EnvMapTextureSource>>( ret->registerModel<NodeAdapterModel<EnvMapTextureSource>>(
NodeCreator<NodeAdapterModel<EnvMapTextureSource>>( renderGraph ), "Sources" ); NodeCreator<NodeAdapterModel<EnvMapTextureSource>>( renderGraph ), "Sources" );
/*
ret->registerModel<SourceColorTextureModel>(
NodeCreator<SourceColorTextureModel>( renderGraph ), "Sources" );
ret->registerModel<SourceDepthTextureModel>(
NodeCreator<SourceDepthTextureModel>( renderGraph ), "Sources" );
*/
ret->registerModel<NodeAdapterModel<ColorTextureNode>>( ret->registerModel<NodeAdapterModel<ColorTextureNode>>(
NodeCreator<NodeAdapterModel<ColorTextureNode>>( renderGraph ), "Sources" ); NodeCreator<NodeAdapterModel<ColorTextureNode>>( renderGraph ), "Sources" );
ret->registerModel<NodeAdapterModel<DepthTextureNode>>( ret->registerModel<NodeAdapterModel<DepthTextureNode>>(
......
#include <RadiumNBR/Gui/RenderGraphEditor/SourceColorTextureModel.hpp>
#include <Engine/Data/Texture.hpp>
#include <RadiumNBR/NodeGraph/Node.hpp>
using QtNodes::NodeData;
using QtNodes::NodeDataModel;
using QtNodes::NodeDataType;
using QtNodes::PortIndex;
using QtNodes::PortType;
SourceColorTextureModel::SourceColorTextureModel( RenderGraph* renderGraph ) :
m_renderGraph( renderGraph ) {
m_node = new ColorTextureNode( "Source node color texture" +
std::to_string( m_renderGraph->getNodesCount() ) );
m_renderGraph->addNode( m_node );
}
unsigned int SourceColorTextureModel::nPorts( PortType portType ) const {
unsigned int result = 1;
switch ( portType )
{
case PortType::In: {
result = 0;
break;
}
case PortType::Out: {
result = 1;
break;
}
default: {
break;
}
}
return result;
}
NodeDataType SourceColorTextureModel::dataType( PortType, PortIndex ) const {
return QtNodes::NodeDataType{ std::to_string( typeid( NodeTypeTexture ).hash_code() ).c_str(),
"outColorTexture" };
}
#pragma once
#include <QtCore/QObject>
#include <RadiumNBR/NodeBasedRendererMacro.hpp>
#include <nodes/NodeDataModel>
#include <RadiumNBR/Gui/RenderGraphEditor/ConnectionStatusData.hpp>
#include <RadiumNBR/NodeGraph/PremadeNodes/Sources/ColorTextureNode.hpp>
#include <RadiumNBR/NodeGraph/RenderGraph.hpp>
#include <iostream>
class NodeBasedRenderer_LIBRARY_API SourceColorTextureModel : public QtNodes::NodeDataModel
{
Q_OBJECT
public:
SourceColorTextureModel( RenderGraph* renderGraph );
~SourceColorTextureModel() {
m_renderGraph->removeNode( m_node );
m_renderGraph->m_recompile = true;
}
public:
QString caption() const override { return SourceColorTextureModel::Name(); }
bool captionVisible() const override { return true; }
static QString Name() { return ColorTextureNode::getTypename().c_str(); }
QString name() const override { return SourceColorTextureModel::Name(); }
QString uuid() const override { return m_node->getUuid().c_str(); }
public:
unsigned int nPorts( QtNodes::PortType portType ) const override;
QtNodes::NodeDataType dataType( QtNodes::PortType portType,
QtNodes::PortIndex portIndex ) const override;
std::shared_ptr<QtNodes::NodeData> outData( QtNodes::PortIndex port ) override {
return std::make_shared<ConnectionStatusData>( m_node,
m_node->getOutputs()[port]->getName() );
}
void setInData( std::shared_ptr<QtNodes::NodeData> data, int ) override {}
QWidget* embeddedWidget() override { return nullptr; }
private:
ColorTextureNode* m_node{ nullptr };
RenderGraph* m_renderGraph{ nullptr };
};
#include "SourceDepthTextureModel.hpp"
#include <Engine/Data/Texture.hpp>
#include <RadiumNBR/NodeGraph/Node.hpp>
using QtNodes::NodeData;
using QtNodes::NodeDataModel;
using QtNodes::NodeDataType;
using QtNodes::PortIndex;
using QtNodes::PortType;
SourceDepthTextureModel::SourceDepthTextureModel( RenderGraph* renderGraph ) :
m_renderGraph( renderGraph ) {
m_node = new DepthTextureNode( "Source node depth texture" +
std::to_string( m_renderGraph->getNodesCount() ) );
m_renderGraph->addNode( m_node );
}
unsigned int SourceDepthTextureModel::nPorts( PortType portType ) const {
unsigned int result = 1;
switch ( portType )
{
case PortType::In: {
result = 0;
break;
}
case PortType::Out: {
result = 1;
break;
}
default: {
break;
}
}
return result;
}
NodeDataType SourceDepthTextureModel::dataType( PortType, PortIndex ) const {
return QtNodes::NodeDataType{ std::to_string( typeid( NodeTypeTexture ).hash_code() ).c_str(),
"outDepthTexture" };
}
#pragma once
#include <QtCore/QObject>
#include <RadiumNBR/NodeBasedRendererMacro.hpp>
#include <nodes/NodeDataModel>
#include "ConnectionStatusData.hpp"
#include <RadiumNBR/NodeGraph/PremadeNodes/Sources/DepthTextureNode.hpp>
#include <RadiumNBR/NodeGraph/RenderGraph.hpp>
#include <iostream>
class NodeBasedRenderer_LIBRARY_API SourceDepthTextureModel : public QtNodes::NodeDataModel
{
Q_OBJECT
public:
SourceDepthTextureModel( RenderGraph* renderGraph );
~SourceDepthTextureModel() {
m_renderGraph->removeNode( m_node );
m_renderGraph->m_recompile = true;
}
public:
QString caption() const override { return SourceDepthTextureModel::Name(); }
bool captionVisible() const override { return true; }
static QString Name() { return DepthTextureNode::getTypename().c_str(); }
QString name() const override { return SourceDepthTextureModel::Name(); }
QString uuid() const override { return m_node->getUuid().c_str(); }
public:
unsigned int nPorts( QtNodes::PortType portType ) const override;
QtNodes::NodeDataType dataType( QtNodes::PortType portType,
QtNodes::PortIndex portIndex ) const override;
std::shared_ptr<QtNodes::NodeData> outData( QtNodes::PortIndex port ) override {
return std::make_shared<ConnectionStatusData>( m_node,
m_node->getOutputs()[port]->getName() );
}
void setInData( std::shared_ptr<QtNodes::NodeData> data, int ) override {}
QWidget* embeddedWidget() override { return nullptr; }
private:
DepthTextureNode* m_node{ nullptr };
RenderGraph* m_renderGraph{ nullptr };
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment