0
我正在使用C++,我使用visual studio作爲IDE,並且我正在使用Leap Motion SDK如何找到有兩個幀,每個有兩個點的德爾塔θ?
所以,我目前正在研究一個旋轉圓的程序。 用於操縱旋轉的方法通過使用兩個手指來應用,該手指在應用程序上顯示爲 個點。
此應用程序還使用幀來顯示隨着時間的事件。
我想知道如何使用兩個框架和兩個點來計算在兩個框架上使用 兩點移動的旋轉變化。
const Frame frame = controller->frame(); //current frame
const Frame previous = controller->frame(1); //previous frame
const FingerList fingers = frame.fingers(); //fingers inside that frame
POINT aFingerPoint = fingers[0].position() //point of a finger from a finger array
POINT anotherFingerPoint = fingers[1].position() //point of a finger from a finger array
const FingerList prevFingers = previous.fingers(); //fingers inside that frame
POINT aPrevFingerPoint = fingers[0].position() //point of a finger from a finger array
POINT anotherPrevFingerPoint = fingers[1].position() //point of a finger from a finger array
// coordinate example
float x = aFingerPoint.x;
float y = aFingerPoint.y;
float deltaRotation = [THIS PART I DONT KNOW]; //I got the translation already, just need rotation
circle.manipulation(deltaRotation); //Rotates the circle in degrees
謝謝!我的問題是我正在應用一個切線而非反正切的方法......大聲笑謝謝 – CodeDoctorJL