Stephen Gold 5 년 전
부모
커밋
92b161f38e
1개의 변경된 파일14개의 추가작업 그리고 4개의 파일을 삭제
  1. 14 4
      jme3-core/src/main/java/com/jme3/scene/shape/Line.java

+ 14 - 4
jme3-core/src/main/java/com/jme3/scene/shape/Line.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2019 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -51,8 +51,11 @@ public class Line extends Mesh {
 
     private Vector3f start;
     private Vector3f end;
-    
-    public Line() {
+
+    /**
+     * No-argument constructor needed by SavableClassUtil.
+     */
+    public Line() { // TODO protected
     }
 
     public Line(Vector3f start, Vector3f end) {
@@ -79,9 +82,16 @@ public class Line extends Mesh {
     }
 
     /**
-     * Update the start and end points of the line.
+     * Alter the start and end.
+     *
+     * @param start the desired mesh location of the start (not null,
+     * unaffected)
+     * @param end the desired mesh location of the end (not null, unaffected)
      */
     public void updatePoints(Vector3f start, Vector3f end) {
+        this.start.set(start);
+        this.end.set(end);
+
         VertexBuffer posBuf = getBuffer(Type.Position);
         
         FloatBuffer fb = (FloatBuffer) posBuf.getData();