From f2aebcd880e12653684024010f610a08ec326323 Mon Sep 17 00:00:00 2001 From: Jonathan Bosson Date: Wed, 12 Apr 2017 16:54:13 -0600 Subject: [PATCH] one step closer, need to figure out gradient of func and how to send cam/node/aspectratio with void* fdata --- modules/touch/ext/levmarq.cpp | 4 +-- modules/touch/src/TouchInteraction.cpp | 44 ++++++++++++++++++-------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/modules/touch/ext/levmarq.cpp b/modules/touch/ext/levmarq.cpp index 349ffe99a4..7b0ff125ad 100644 --- a/modules/touch/ext/levmarq.cpp +++ b/modules/touch/ext/levmarq.cpp @@ -163,9 +163,9 @@ int levmarq(int npar, double *par, int ny, double *y, double *dysq, double error_func(double *par, int ny, double *y, double *dysq, double (*func)(double *, int, void *), void *fdata) { int x; - double res,e=0; + double res, e = 0; - for (x=0; x& list, std::vector& lastProcessed) { - trace(list); - if (/*_currentRadius > 0.3 &&*/ _selected.size() == list.size()) { // good value to make any planet sufficiently large for direct-touch, needs better definition - _directTouchMode = true; - } - else { - _directTouchMode = false; - } - - if (_directTouchMode) { + if (_directTouchMode) { // should just be a function call /* 1, define s(xi,q): newXi = T(tx,ty,tz)Q(rx,ry,rz)xi, s(xi,q) = modelToScreenSpace(newXi) 2, calculate minimum error E = sum( ||s(xi,q)-pi||^2 ) (and define q in the process) @@ -99,8 +91,27 @@ void TouchInteraction::update(const std::vector& list, std::vector

& list, std::vector

& list, std::vector

0.3 && _selected.size() == list.size()) { // good value to make any planet sufficiently large for direct-touch, needs better definition + _directTouchMode = true; + } + else { + _directTouchMode = false; + } } void TouchInteraction::trace(const std::vector& list) {