From 79e8ef4f89e7d90f9744dcb1f29db27ccf27ce03 Mon Sep 17 00:00:00 2001 From: Julien Gouesse Date: Sat, 13 Aug 2016 22:16:50 +0200 Subject: Initializes the fields of the data stores in their respective constructors --- .../com/ardor3d/extension/model/md2/Md2DataStore.java | 8 +++++--- .../com/ardor3d/extension/model/md3/Md3DataStore.java | 8 +++++--- .../com/ardor3d/extension/model/obj/ObjDataStore.java | 18 +++++++++++++----- .../com/ardor3d/extension/model/stl/StlDataStore.java | 10 ++++++++-- 4 files changed, 31 insertions(+), 13 deletions(-) (limited to 'ardor3d-extras/src') 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 . */ @@ -21,13 +21,15 @@ public class Md2DataStore { private final Mesh _mainMesh; private final KeyframeController _controller; - private final List _frameNames = new ArrayList<>(); + private final List _frameNames; - private final List _skinNames = new ArrayList<>(); + private final List _skinNames; public Md2DataStore(final Mesh mainMesh, final KeyframeController 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 . */ @@ -19,13 +19,15 @@ public class Md3DataStore { private final Node _mainNode; - private final List _frameNames = new ArrayList<>(); + private final List _frameNames; - private final List _skinNames = new ArrayList<>(); + private final List _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 . */ @@ -16,10 +16,18 @@ import java.util.List; import com.ardor3d.math.Vector3; public class ObjDataStore { - private final List _vertices = new ArrayList<>(); - private final List _normals = new ArrayList<>(); - private final List _generatedNormals = new ArrayList<>(); - private final List _uvs = new ArrayList<>(); + private final List _vertices; + private final List _normals; + private final List _generatedNormals; + private final List _uvs; + + public ObjDataStore() { + super(); + _vertices = new ArrayList<>(); + _normals = new ArrayList<>(); + _generatedNormals = new ArrayList<>(); + _uvs = new ArrayList<>(); + } public List 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 _vertices = new ArrayList<>(); - private final List _normals = new ArrayList<>(); + private final List _vertices; + private final List _normals; + + public StlDataStore() { + super(); + _vertices = new ArrayList<>(); + _normals = new ArrayList<>(); + } public List getVertices() { return _vertices; -- cgit v1.2.3