diff --git a/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/components/PersonalMotionPreviewElement.java b/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/components/PersonalMotionPreviewElement.java index d498761..76e8c65 100644 --- a/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/components/PersonalMotionPreviewElement.java +++ b/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/components/PersonalMotionPreviewElement.java @@ -24,6 +24,7 @@ import org.joml.Vector4f; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -49,7 +50,7 @@ public class PersonalMotionPreviewElement extends View { private Matrix4f modelViewMatrix = new Matrix4f(); // The model view matrix for the 3D to 2D transformation. private Matrix4f projectionMatrix = new Matrix4f(); // The projection matrix for the 3D to 2D transformation. private final Vector4f objectPosition = new Vector4f(0, 0, -1, 1); // The location of the object in 3D space. - private List vectors = new ArrayList<>(); + private ConcurrentLinkedQueue vectors = new ConcurrentLinkedQueue<>(); private static final String[] USER_PHRASES = {