Vuo
2.1.2
renderer
VuoRendererInputAttachment.cc
Go to the documentation of this file.
1
10
#include "
VuoRendererInputAttachment.hh
"
11
#include "
VuoCompilerMakeListNodeClass.hh
"
12
#include "
VuoCable.hh
"
13
#include "
VuoNodeClass.hh
"
14
#include "
VuoPort.hh
"
15
19
VuoRendererInputAttachment::VuoRendererInputAttachment
(
VuoNode
*baseNode,
VuoRendererSignaler
*signaler)
20
:
VuoRendererNode
(baseNode, signaler)
21
{
22
setZValue(
attachmentZValue
);
23
24
setAlwaysDisplayPortNames
(
true
);
25
}
26
30
VuoPort
*
VuoRendererInputAttachment::getUnderlyingHostPort
()
31
{
32
return
getUnderlyingHostPortForNode
(this->
getBase
());
33
}
34
38
VuoNode
*
VuoRendererInputAttachment::getUnderlyingHostNode
()
39
{
40
return
getUnderlyingHostNodeForNode
(this->
getBase
());
41
}
42
46
VuoPort
*
VuoRendererInputAttachment::getRenderedHostPort
()
47
{
48
return
getUnderlyingHostPort
();
49
}
50
54
VuoNode
*
VuoRendererInputAttachment::getRenderedHostNode
()
55
{
56
return
getUnderlyingHostNode
();
57
}
58
62
VuoPort
*
VuoRendererInputAttachment::getUnderlyingHostPortForNode
(
VuoNode
*node)
63
{
64
if
(!node)
65
return
NULL;
66
67
VuoPort
*listOutPort = node->
getOutputPorts
()[
VuoNodeClass::unreservedOutputPortStartIndex
];
68
vector<VuoCable *> outCables = listOutPort->
getConnectedCables
(
true
);
69
if
(outCables.size() < 1)
70
return
NULL;
71
72
VuoCable
*outCable = *outCables.begin();
73
return
outCable->
getToPort
();
74
}
75
79
VuoNode
*
VuoRendererInputAttachment::getUnderlyingHostNodeForNode
(
VuoNode
*node)
80
{
81
if
(!node)
82
return
NULL;
83
84
VuoPort
*listOutPort = node->
getOutputPorts
()[
VuoNodeClass::unreservedOutputPortStartIndex
];
85
vector<VuoCable *> outCables = listOutPort->
getConnectedCables
(
true
);
86
if
(outCables.size() < 1)
87
return
NULL;
88
89
VuoCable
*outCable = *outCables.begin();
90
return
outCable->
getToNode
();
91
}
92
96
set<VuoNode *>
VuoRendererInputAttachment::getCoattachments
(
void
)
97
{
98
set<VuoNode *> coattachments;
99
return
coattachments;
100
}
101
105
VuoNode
*
VuoRendererInputAttachment::getListNodeConnectedToInputPort
(
VuoPort
*port)
106
{
107
if
(!port)
108
return
NULL;
109
110
vector<VuoCable *> inCables = port->
getConnectedCables
(
false
);
111
foreach
(
VuoCable
*cable, inCables)
112
{
113
VuoNode
*fromNode = cable->
getFromNode
();
114
if
(
VuoCompilerMakeListNodeClass::isMakeListNodeClassName
(fromNode->
getNodeClass
()->
getClassName
()))
115
return
fromNode;
116
}
117
118
return
NULL;
119
}
Generated on Tue Jul 14 2020 23:19:40 for Vuo by
1.8.18