2024-05-29 16:11:54 +02:00

View File

@@ -103,12 +103,12 @@ public class PersonalMotionPreviewElement extends View {
this.axisVectors = new Vector2f[] {
projectVertex(new Vector3f(-1.0f, 0, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(1.0f, 0, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(0, -1.0f, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(0, 1.0f, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(0, 0, -1.0f), getWidth(), getHeight()),
projectVertex(new Vector3f(0, 0, 1.0f), getWidth(), getHeight())
projectVertex(new Vector3f(-100.0f, 0, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(100.0f, 0, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(0, -100.0f, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(0, 100.0f, 0), getWidth(), getHeight()),
projectVertex(new Vector3f(0, 0, -100.0f), getWidth(), getHeight()),
projectVertex(new Vector3f(0, 0, 100.0f), getWidth(), getHeight())
};
}
@@ -143,6 +143,9 @@ public class PersonalMotionPreviewElement extends View {
Log.i("MotionProcessor", "Processed data: " + progress + " (" + preprocessed + ")");
Vector2f parsed = projectVertex(processed, this.getWidth(), this.getHeight());
this.vectors.add(parsed);
// Remove the first element if the array is too big
if (this.vectors.size() > 100)
this.vectors.poll();
});
saySomethingNice();
}