|
@@ -34,6 +34,7 @@ package com.jme3.scene.debug;
|
|
|
import com.jme3.math.Quaternion;
|
|
|
import com.jme3.math.Vector3f;
|
|
|
import com.jme3.scene.Mesh;
|
|
|
+import com.jme3.scene.VertexBuffer;
|
|
|
import com.jme3.scene.VertexBuffer.Type;
|
|
|
import java.nio.FloatBuffer;
|
|
|
|
|
@@ -118,7 +119,8 @@ public class Arrow extends Mesh {
|
|
|
tempQuat.lookAt(extent, Vector3f.UNIT_Y);
|
|
|
tempQuat.normalizeLocal();
|
|
|
|
|
|
- FloatBuffer buffer = getFloatBuffer(Type.Position);
|
|
|
+ VertexBuffer pvb = getBuffer(Type.Position);
|
|
|
+ FloatBuffer buffer = (FloatBuffer)pvb.getData();
|
|
|
buffer.rewind();
|
|
|
for (int i = 0; i < positions.length; i += 3) {
|
|
|
Vector3f vec = tempVec.set(positions[i],
|
|
@@ -131,6 +133,8 @@ public class Arrow extends Mesh {
|
|
|
buffer.put(vec.y);
|
|
|
buffer.put(vec.z);
|
|
|
}
|
|
|
+
|
|
|
+ pvb.updateData(buffer);
|
|
|
|
|
|
updateBound();
|
|
|
updateCounts();
|