Vuo  2.3.2
VuoRendererInputAttachment.cc
Go to the documentation of this file.
1 
12 #include "VuoCable.hh"
13 #include "VuoNodeClass.hh"
14 #include "VuoPort.hh"
15 
20  : VuoRendererNode(baseNode, signaler)
21 {
22  setZValue(attachmentZValue);
23 
25 }
26 
31 {
32  return getUnderlyingHostPortForNode(this->getBase());
33 }
34 
39 {
40  return getUnderlyingHostNodeForNode(this->getBase());
41 }
42 
47 {
48  return getUnderlyingHostPort();
49 }
50 
55 {
56  return getUnderlyingHostNode();
57 }
58 
63 {
64  if (!node)
65  return NULL;
66 
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 
80 {
81  if (!node)
82  return NULL;
83 
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 
97 {
98  set<VuoNode *> coattachments;
99  return coattachments;
100 }
101 
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();
115  return fromNode;
116  }
117 
118  return NULL;
119 }
120 
126 {
127  if (isSelected())
128  return true;
129 
130  VuoNode *hostNode = getRenderedHostNode();
131  return hostNode && hostNode->hasRenderer() && hostNode->getRenderer()->isSelected();
132 }