私は C++ で作業しており、Visual Studio を IDE として使用しており、leap Leap Motion SDK を使用しています。
それで、私は現在、円を回転させるプログラムに取り組んでいます。回転を操作する方法は、アプリケーション上でポイントとして表示される 2 本の指を使用して適用されます。
また、このアプリケーションはフレームを使用して、時間の経過とともにイベントを表示します。
2つのフレームと2つのポイントを使用して、2つのフレームでの2つのポイントの動きを使用して回転の変化を計算する方法を知りたいです。
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