From 92b161f38eb9992d5dfe5a8928c157ae57c67028 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Sat, 2 Nov 2019 10:52:17 -0700 Subject: [PATCH] fix issue #1202 --- .../main/java/com/jme3/scene/shape/Line.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/Line.java b/jme3-core/src/main/java/com/jme3/scene/shape/Line.java index e2ac6d85c..93e667d7c 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/Line.java +++ b/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();