MCPcopy Create free account
hub / github.com/VCVRack/Rack / getInputPos

Method getInputPos

src/app/CableWidget.cpp:224–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222
223
224math::Vec CableWidget::getInputPos() {
225 if (inputPort) {
226 return inputPort->getRelativeOffset(inputPort->box.zeroPos().getCenter(), APP->scene->rack);
227 }
228 else if (hoveredInputPort) {
229 return hoveredInputPort->getRelativeOffset(hoveredInputPort->box.zeroPos().getCenter(), APP->scene->rack);
230 }
231 else {
232 return APP->scene->rack->getMousePos();
233 }
234}
235
236
237math::Vec CableWidget::getOutputPos() {

Callers

nothing calls this directly

Calls 4

getCenterMethod · 0.80
zeroPosMethod · 0.80
getRelativeOffsetMethod · 0.45
getMousePosMethod · 0.45

Tested by

no test coverage detected