Updated PersonalMotionPreviewElement
This commit is contained in:
@@ -102,12 +102,12 @@ public class PersonalMotionPreviewElement extends View {
|
|||||||
|
|
||||||
this.axisVectors = new Vector2f[] {
|
this.axisVectors = new Vector2f[] {
|
||||||
|
|
||||||
projectVertex(new Vector3f(-1.0f, 0, 0), getWidth(), getHeight()),
|
projectVertex(new Vector3f(-100.0f, 0, 0), getWidth(), getHeight()),
|
||||||
projectVertex(new Vector3f(1.0f, 0, 0), getWidth(), getHeight()),
|
projectVertex(new Vector3f(100.0f, 0, 0), getWidth(), getHeight()),
|
||||||
projectVertex(new Vector3f(0, -1.0f, 0), getWidth(), getHeight()),
|
projectVertex(new Vector3f(0, -100.0f, 0), getWidth(), getHeight()),
|
||||||
projectVertex(new Vector3f(0, 1.0f, 0), getWidth(), getHeight()),
|
projectVertex(new Vector3f(0, 100.0f, 0), getWidth(), getHeight()),
|
||||||
projectVertex(new Vector3f(0, 0, -1.0f), getWidth(), getHeight()),
|
projectVertex(new Vector3f(0, 0, -100.0f), getWidth(), getHeight()),
|
||||||
projectVertex(new Vector3f(0, 0, 1.0f), getWidth(), getHeight())
|
projectVertex(new Vector3f(0, 0, 100.0f), getWidth(), getHeight())
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -142,6 +142,9 @@ public class PersonalMotionPreviewElement extends View {
|
|||||||
Log.i("MotionProcessor", "Processed data: " + progress + " (" + preprocessed + ")");
|
Log.i("MotionProcessor", "Processed data: " + progress + " (" + preprocessed + ")");
|
||||||
Vector2f parsed = projectVertex(processed, this.getWidth(), this.getHeight());
|
Vector2f parsed = projectVertex(processed, this.getWidth(), this.getHeight());
|
||||||
this.vectors.add(parsed);
|
this.vectors.add(parsed);
|
||||||
|
// Remove the first element if the array is too big
|
||||||
|
if (this.vectors.size() > 100)
|
||||||
|
this.vectors.poll();
|
||||||
});
|
});
|
||||||
saySomethingNice();
|
saySomethingNice();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user