started node graph design
This commit is contained in:
+7
-1
@@ -2,7 +2,13 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
NodeGraph::NodeGraph()
|
||||
NodeGraph::NodeGraph() :
|
||||
output_node_(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Effect *NodeGraph::OutputNode()
|
||||
{
|
||||
return output_node_.get();
|
||||
}
|
||||
|
||||
+40
-1
@@ -8,7 +8,46 @@ class NodeGraph
|
||||
public:
|
||||
NodeGraph();
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Add a node to this graph
|
||||
*
|
||||
* The graph takes ownership of the node.
|
||||
*
|
||||
* @param node
|
||||
*/
|
||||
void AddNode(EffectPtr node);
|
||||
|
||||
/**
|
||||
* @brief Process the graph
|
||||
*
|
||||
* Using the output node set by SetOutputNode(), this function will work backwards and perform every action in the
|
||||
* node hierarchy necessary to eventually process the output node. After this function returns, the output node should
|
||||
* contain valid values ready for accessing.
|
||||
*
|
||||
* Each node will cache its output for optimized playback and rendering. This will happen transparently and under most
|
||||
* circumstances, this function will be able to return immediately.
|
||||
*/
|
||||
void Process();
|
||||
|
||||
/**
|
||||
* @brief Set the output node for this node graph
|
||||
*
|
||||
* This node will be presented as the final node that all other nodes converge on. This node can be used to retrieve
|
||||
* the result of the graph.
|
||||
*
|
||||
* @param node
|
||||
*
|
||||
* The node to set as the output node. The graph takes ownership of the node and the user cannot delete it.
|
||||
*/
|
||||
void SetOutputNode(EffectPtr node);
|
||||
|
||||
/**
|
||||
* @brief Returns the currently set output node
|
||||
*/
|
||||
Effect* OutputNode();
|
||||
|
||||
private:
|
||||
EffectPtr output_node_;
|
||||
};
|
||||
|
||||
#endif // NODEGRAPH_H
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "rendering/framebufferobject.h"
|
||||
#include "marker.h"
|
||||
#include "track.h"
|
||||
#include "nodes/nodegraph.h"
|
||||
|
||||
struct ClipSpeed {
|
||||
ClipSpeed();
|
||||
@@ -180,6 +181,8 @@ private:
|
||||
Cacher cacher;
|
||||
long cacher_frame;
|
||||
|
||||
NodeGraph pipeline_;
|
||||
|
||||
QVector<Marker> markers;
|
||||
QColor color_;
|
||||
bool open_;
|
||||
|
||||
Reference in New Issue
Block a user