aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-extras/src
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2016-08-13 22:16:50 +0200
committerJulien Gouesse <[email protected]>2016-08-13 22:16:50 +0200
commit79e8ef4f89e7d90f9744dcb1f29db27ccf27ce03 (patch)
treeb9a697c43fac6db2e0bc32e87279483b99e8e9a8 /ardor3d-extras/src
parente2b0b0d5bd451029b7e1afb61b106e726308cd47 (diff)
Initializes the fields of the data stores in their respective constructors
Diffstat (limited to 'ardor3d-extras/src')
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java8
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java8
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java18
-rw-r--r--ardor3d-extras/src/main/java/com/ardor3d/extension/model/stl/StlDataStore.java10
4 files changed, 31 insertions, 13 deletions
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java
index 10df395..1830aa6 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md2/Md2DataStore.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -21,13 +21,15 @@ public class Md2DataStore {
private final Mesh _mainMesh;
private final KeyframeController<Mesh> _controller;
- private final List<String> _frameNames = new ArrayList<>();
+ private final List<String> _frameNames;
- private final List<String> _skinNames = new ArrayList<>();
+ private final List<String> _skinNames;
public Md2DataStore(final Mesh mainMesh, final KeyframeController<Mesh> controller) {
_mainMesh = mainMesh;
_controller = controller;
+ _frameNames = new ArrayList<>();
+ _skinNames = new ArrayList<>();
}
public Mesh getScene() {
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java
index 927d2b8..5e5a954 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/md3/Md3DataStore.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -19,13 +19,15 @@ public class Md3DataStore {
private final Node _mainNode;
- private final List<String> _frameNames = new ArrayList<>();
+ private final List<String> _frameNames;
- private final List<String> _skinNames = new ArrayList<>();
+ private final List<String> _skinNames;
public Md3DataStore(final Node mainNode) {
super();
_mainNode = mainNode;
+ _frameNames = new ArrayList<>();
+ _skinNames = new ArrayList<>();
}
public Node getScene() {
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java
index ba01281..cc52553 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/obj/ObjDataStore.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -16,10 +16,18 @@ import java.util.List;
import com.ardor3d.math.Vector3;
public class ObjDataStore {
- private final List<Vector3> _vertices = new ArrayList<>();
- private final List<Vector3> _normals = new ArrayList<>();
- private final List<Vector3> _generatedNormals = new ArrayList<>();
- private final List<Vector3> _uvs = new ArrayList<>();
+ private final List<Vector3> _vertices;
+ private final List<Vector3> _normals;
+ private final List<Vector3> _generatedNormals;
+ private final List<Vector3> _uvs;
+
+ public ObjDataStore() {
+ super();
+ _vertices = new ArrayList<>();
+ _normals = new ArrayList<>();
+ _generatedNormals = new ArrayList<>();
+ _uvs = new ArrayList<>();
+ }
public List<Vector3> getVertices() {
return _vertices;
diff --git a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/stl/StlDataStore.java b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/stl/StlDataStore.java
index 30009ae..52d6d0d 100644
--- a/ardor3d-extras/src/main/java/com/ardor3d/extension/model/stl/StlDataStore.java
+++ b/ardor3d-extras/src/main/java/com/ardor3d/extension/model/stl/StlDataStore.java
@@ -16,8 +16,14 @@ import java.util.List;
import com.ardor3d.math.Vector3;
public class StlDataStore {
- private final List<Vector3> _vertices = new ArrayList<>();
- private final List<Vector3> _normals = new ArrayList<>();
+ private final List<Vector3> _vertices;
+ private final List<Vector3> _normals;
+
+ public StlDataStore() {
+ super();
+ _vertices = new ArrayList<>();
+ _normals = new ArrayList<>();
+ }
public List<Vector3> getVertices() {
return _vertices;