From 3418dd0859106791d5534c53b901c2be4ea6b4c4 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 15 Dec 2017 09:24:22 +0000 Subject: better paths --- gui/src/chainImage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gui/src/chainImage.cpp') diff --git a/gui/src/chainImage.cpp b/gui/src/chainImage.cpp index 5a24c7b..7192fdc 100644 --- a/gui/src/chainImage.cpp +++ b/gui/src/chainImage.cpp @@ -130,6 +130,11 @@ void chainImage::updateRotationTimeline(){ } +ofPoint chainImage::getPathPoint(){ + //printf("get point at transition: %f \n",transition); + return path.getPointAtLength(transition); +} + int chainImage::updateOutput(float decayRatio){ //where there is rotation of the link, the path needs to be rotated @@ -150,7 +155,7 @@ int chainImage::updateOutput(float decayRatio){ ofPoint previous=getLinkPos()+(rotated_destination*getLinkScale()*(1.0f-BEZIER_IN)); path.bezierTo( - getLinkPos().x*(1.0f+BEZIER_OUT),getLinkPos().y*(1.0f+BEZIER_OUT), + getLinkPos().x*(1.0f+(BEZIER_OUT*linkScale)),getLinkPos().y*(1.0f+(BEZIER_OUT*linkScale)), previous.x,previous.y, destination.x,destination.y); -- cgit v1.2.3