Merge branch 'main' of https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user