PeriDyno 1.2.1
Loading...
Searching...
No Matches
WtInteraction.h
Go to the documentation of this file.
1#pragma once
2
3#include "WtNode.h"
4#include "WtConnection.h"
5#include "WtNodeFlowScene.h"
6
10
12{
13public:
14 WtInteraction(WtNode& node, WtConnection& connection, WtFlowScene& scene, connectionPointData inPoint, connectionPointData outPoint, std::shared_ptr<Node> inNode, std::shared_ptr<Node> outNode);
15
16 bool canConnect(PortIndex& portIndex, TypeConverter& converter);
17
18 bool tryConnect();
19private:
20
22
23 bool isNodePortAccessible(PortType portType, PortIndex portIndex) const;
24
25 void setInData(PortIndex portIndex);
26
27private:
28
30
32
34
36
38
39 std::shared_ptr<Node> _inNode;
40
41 std::shared_ptr<Node> _outNode;
42};
std::function< SharedNodeData(SharedNodeData)> TypeConverter
int PortIndex
PortType
bool canConnect(PortIndex &portIndex, TypeConverter &converter)
std::shared_ptr< Node > _inNode
connectionPointData _inPoint
WtFlowScene * _scene
bool isNodePortAccessible(PortType portType, PortIndex portIndex) const
connectionPointData _outPoint
std::shared_ptr< Node > _outNode
WtInteraction(WtNode &node, WtConnection &connection, WtFlowScene &scene, connectionPointData inPoint, connectionPointData outPoint, std::shared_ptr< Node > inNode, std::shared_ptr< Node > outNode)
PortType connectionRequiredPort() const
void setInData(PortIndex portIndex)
WtConnection * _connection