Skip to content

Commit d6638e0

Browse files
committed
delete useless fields and variables
1 parent feffbdb commit d6638e0

File tree

20 files changed

+27
-84
lines changed

20 files changed

+27
-84
lines changed

jme3-android/src/main/java/com/jme3/input/android/AndroidJoystickJoyInput14.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
public class AndroidJoystickJoyInput14 {
6464
private static final Logger logger = Logger.getLogger(AndroidJoystickJoyInput14.class.getName());
6565

66-
private boolean loaded = false;
6766
private AndroidJoyInput joyInput;
6867
private Map<Integer, AndroidJoystick> joystickIndex = new HashMap<>();
6968

@@ -173,8 +172,6 @@ public List<Joystick> loadJoysticks(int joyId, InputManager inputManager) {
173172
}
174173
}
175174

176-
177-
loaded = true;
178175
return joysticks;
179176
}
180177

jme3-android/src/main/java/com/jme3/input/android/AndroidTouchInput.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ public class AndroidTouchInput implements TouchInput {
6969
private boolean mouseEventsInvertX = false;
7070
private boolean mouseEventsInvertY = false;
7171
private boolean keyboardEventsEnabled = false;
72-
private boolean dontSendHistory = false;
7372

7473
protected int numPointers = 0;
7574
final private HashMap<Integer, Vector2f> lastPositions = new HashMap<>();
@@ -162,7 +161,7 @@ public boolean onTouch(MotionEvent event) {
162161
boolean bWasHandled = false;
163162
TouchEvent touch = null;
164163
// System.out.println("native : " + event.getAction());
165-
int action = getAction(event);
164+
getAction(event);
166165
int pointerIndex = getPointerIndex(event);
167166
int pointerId = getPointerId(event);
168167
Vector2f lastPos = lastPositions.get(pointerId);
@@ -469,7 +468,7 @@ public boolean isSimulateKeyboard() {
469468

470469
@Override
471470
public void setOmitHistoricEvents(boolean dontSendHistory) {
472-
this.dontSendHistory = dontSendHistory;
471+
// not implemented
473472
}
474473

475474
}

jme3-bullet/src/common/java/com/jme3/bullet/animation/DacLinks.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2019 jMonkeyEngine
2+
* Copyright (c) 2018-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -91,10 +91,6 @@ public class DacLinks
9191
* local copy of {@link com.jme3.math.Transform#IDENTITY}
9292
*/
9393
final private static Transform transformIdentity = new Transform();
94-
/**
95-
* local copy of {@link com.jme3.math.Vector3f#ZERO}
96-
*/
97-
final private static Vector3f translateIdentity = new Vector3f(0f, 0f, 0f);
9894
// *************************************************************************
9995
// fields
10096

jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanel.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public class AwtPanel extends Canvas implements SceneProcessor {
8080
private int newHeight = 1;
8181
private AtomicBoolean reshapeNeeded = new AtomicBoolean(false);
8282
private final Object lock = new Object();
83-
private AppProfiler prof;
8483

8584
public AwtPanel(PaintMode paintMode) {
8685
this(paintMode, false);
@@ -338,6 +337,6 @@ public void cleanup() {
338337

339338
@Override
340339
public void setProfiler(AppProfiler profiler) {
341-
this.prof = profiler;
340+
// not implemented
342341
}
343342
}

jme3-effects/src/main/java/com/jme3/water/ReflectionProcessor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,6 @@ public class ReflectionProcessor implements SceneProcessor {
5151
private Camera reflectionCam;
5252
private FrameBuffer reflectionBuffer;
5353
private Plane reflectionClipPlane;
54-
private AppProfiler prof;
5554

5655
/**
5756
* Creates a ReflectionProcessor
@@ -111,7 +110,6 @@ public void cleanup() {
111110

112111
@Override
113112
public void setProfiler(AppProfiler profiler) {
114-
this.prof = profiler;
115113
}
116114

117115
/**

jme3-ios/src/main/java/com/jme3/input/ios/IosInputHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class IosInputHandler implements TouchInput {
2222
private boolean mouseEventsInvertX = false;
2323
private boolean mouseEventsInvertY = false;
2424
private boolean keyboardEventsEnabled = false;
25-
private boolean dontSendHistory = false;
2625

2726
// Internal
2827
private boolean initialized = false;
@@ -114,7 +113,7 @@ public boolean isSimulateKeyboard() {
114113

115114
@Override
116115
public void setOmitHistoricEvents(boolean dontSendHistory) {
117-
this.dontSendHistory = dontSendHistory;
116+
// not implemented
118117
}
119118

120119
// ----------------

jme3-jogg/src/main/java/com/jme3/audio/plugins/CachedOggStream.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public class CachedOggStream implements PhysicalOggStream {
5353

5454
private boolean closed = false;
5555
private boolean eos = false;
56-
private boolean bos = false;
5756
private InputStream sourceStream;
5857
private HashMap<Integer, LogicalOggStream> logicalStreams
5958
= new HashMap<>();
@@ -130,9 +129,7 @@ private int readOggNextPage() throws IOException {
130129
return -1;
131130

132131
OggPage op = OggPage.create(sourceStream);
133-
if (!op.isBos()){
134-
bos = true;
135-
}
132+
op.isBos();
136133
if (op.isEos()){
137134
eos = true;
138135
lastPage = op;

jme3-lwjgl/src/main/java/com/jme3/input/lwjgl/LwjglMouseInput.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ public class LwjglMouseInput implements MouseInput {
5555
private LwjglAbstractDisplay context;
5656

5757
private RawInputListener listener;
58-
59-
private boolean supportHardwareCursor = false;
6058
private boolean cursorVisible = true;
6159

6260
/**
@@ -79,7 +77,7 @@ public void initialize() {
7977
try {
8078
Mouse.create();
8179
logger.fine("Mouse created.");
82-
supportHardwareCursor = (Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0;
80+
Cursor.getCapabilities();
8381

8482
// Recall state that was set before initialization
8583
Mouse.setGrabbed(!cursorVisible);

jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -130,7 +130,6 @@ private static ByteBuffer transformCursorImage(final IntBuffer imageData, final
130130
private int mouseX;
131131
private int mouseY;
132132
private int mouseWheel;
133-
private int currentWidth;
134133
private int currentHeight;
135134

136135
private boolean cursorVisible;
@@ -209,7 +208,7 @@ private void initCallbacks() {
209208

210209
glfwGetWindowSize(window, width, height);
211210

212-
currentWidth = width.get();
211+
width.get();
213212
currentHeight = height.get();
214213
}
215214

@@ -239,7 +238,6 @@ public void invoke(final long window, final int button, final int action, final
239238
@Override
240239
public void invoke(final long window, final int width, final int height) {
241240
currentHeight = height;
242-
currentWidth = width;
243241
}
244242
});
245243
}

jme3-networking/src/main/java/com/jme3/network/kernel/udp/UdpConnector.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -53,12 +53,6 @@ public class UdpConnector implements Connector
5353
private byte[] buffer = new byte[65535];
5454
private AtomicBoolean connected = new AtomicBoolean(false);
5555

56-
/**
57-
* In order to provide proper available() checking, we
58-
* potentially queue one datagram.
59-
*/
60-
private DatagramPacket pending;
61-
6256
/**
6357
* Creates a new UDP connection that send datagrams to the
6458
* specified address and port.

jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public abstract class Serializer {
6464
private static final List<SerializerRegistration> registrations = new ArrayList<SerializerRegistration>();
6565

6666
private static final Serializer fieldSerializer = new FieldSerializer();
67-
private static final Serializer serializableSerializer = new SerializableSerializer();
6867
private static final Serializer arraySerializer = new ArraySerializer();
6968

7069
private static short nextAvailableId = -2; // historically the first ID was always -2

jme3-niftygui/src/main/java/com/jme3/niftygui/NiftyJmeDisplay.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2018 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -70,7 +70,6 @@ public class NiftyJmeDisplay implements SceneProcessor {
7070
protected ResourceLocationJme resourceLocation;
7171

7272
protected int w, h;
73-
private AppProfiler prof;
7473

7574
protected class ResourceLocationJme implements ResourceLocation {
7675

@@ -372,7 +371,7 @@ public void cleanup() {
372371

373372
@Override
374373
public void setProfiler(AppProfiler profiler) {
375-
this.prof = profiler;
374+
// not implemented
376375
}
377376

378377
}

jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/material/FbxTexture.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2015 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -53,15 +53,9 @@ private static enum AlphaSource {
5353
FromTextureIntensity;
5454
}
5555

56-
private String type;
5756
private FbxImage media;
58-
59-
// TODO: not currently used.
60-
private AlphaSource alphaSource = AlphaSource.FromTextureAlpha;
6157
private String uvSet;
6258
private int wrapModeU = 0, wrapModeV = 0;
63-
private final Vector2f uvTranslation = new Vector2f(0, 0);
64-
private final Vector2f uvScaling = new Vector2f(1, 1);
6559

6660
public FbxTexture(AssetManager assetManager, String sceneFolderName) {
6761
super(assetManager, sceneFolderName);
@@ -105,7 +99,7 @@ public void fromElement(FbxElement element) {
10599
if (getSubclassName().equals("")) {
106100
for (FbxElement e : element.children) {
107101
if (e.id.equals("Type")) {
108-
type = (String) e.properties.get(0);
102+
e.properties.get(0);
109103
}
110104
/*else if (e.id.equals("FileName")) {
111105
filename = (String) e.properties.get(0);

jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/mesh/FbxMesh.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public final class FbxMesh extends FbxNodeAttribute<IntMap<Mesh>> {
6060
private static final Logger logger = Logger.getLogger(FbxMesh.class.getName());
6161

6262
private FbxPolygon[] polygons;
63-
private int[] edges;
6463
private FbxLayerElement[] layerElements;
6564
private Vector3f[] positions;
6665
private FbxLayer[] layers;
@@ -167,7 +166,6 @@ private void setPositions(double[] positions) {
167166
}
168167

169168
private void setEdges(int[] edges) {
170-
this.edges = edges;
171169
// TODO: ...
172170
}
173171

jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GlbLoader.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -42,17 +42,15 @@
4242
*/
4343
public class GlbLoader extends GltfLoader {
4444

45-
private static final int GLTF_MAGIC = 0x46546C67;
4645
private static final int JSON_TYPE = 0x4E4F534A;
47-
private static final int BIN_TYPE = 0x004E4942;
4846
private ArrayList<byte[]> data = new ArrayList<>();
4947

5048
@Override
5149
public Object load(AssetInfo assetInfo) throws IOException {
5250
data.clear();
5351
LittleEndien stream = new LittleEndien(new DataInputStream(assetInfo.openStream()));
54-
int magic = stream.readInt();
55-
int version = stream.readInt();
52+
/* magic */ stream.readInt();
53+
/* version */ stream.readInt();
5654
int length = stream.readInt();
5755

5856
byte[] json = null;

jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -93,10 +93,6 @@ public class GltfLoader implements AssetLoader {
9393
private static Map<String, MaterialAdapter> defaultMaterialAdapters = new HashMap<>();
9494
private CustomContentManager customContentManager = new CustomContentManager();
9595
private boolean useNormalsFlag = false;
96-
private Quaternion tmpQuat = new Quaternion();
97-
private Transform tmpTransforms = new Transform();
98-
private Transform tmpTransforms2 = new Transform();
99-
private Matrix4f tmpMat = new Matrix4f();
10096

10197
Map<SkinData, List<Spatial>> skinnedSpatials = new HashMap<>();
10298
IntMap<SkinBuffers> skinBuffers = new IntMap<>();
@@ -128,7 +124,7 @@ protected Object loadFromStream(AssetInfo assetInfo, InputStream stream) throws
128124
docRoot = new JsonParser().parse(new JsonReader(new InputStreamReader(stream))).getAsJsonObject();
129125

130126
JsonObject asset = docRoot.getAsJsonObject().get("asset").getAsJsonObject();
131-
String generator = getAsString(asset, "generator");
127+
getAsString(asset, "generator");
132128
String version = getAsString(asset, "version");
133129
String minVersion = getAsString(asset, "minVersion");
134130
if (!isSupported(version, minVersion)) {

jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/grid/AssetTileLoader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,6 @@ public class AssetTileLoader implements TerrainGridTileLoader {
5252
private AssetManager manager;
5353
private String assetPath;
5454
private String name;
55-
private int size;
5655
private int patchSize;
5756
private int quadSize;
5857

jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/grid/ImageTileLoader.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -55,9 +55,6 @@ public class ImageTileLoader implements TerrainGridTileLoader{
5555
private final Namer namer;
5656
private int patchSize;
5757
private int quadSize;
58-
private float heightScale = 1;
59-
//private int imageType = BufferedImage.TYPE_USHORT_GRAY; // 16 bit grayscale
60-
//private ImageHeightmap customImageHeightmap;
6158

6259
public ImageTileLoader(final String textureBase, final String textureExt, AssetManager assetManager) {
6360
this(assetManager, new Namer() {
@@ -78,7 +75,7 @@ public ImageTileLoader(AssetManager assetManager, Namer namer) {
7875
* Affects the vertical scale of the terrain when loaded.
7976
*/
8077
public void setHeightScale(float heightScale) {
81-
this.heightScale = heightScale;
78+
// not implemented
8279
}
8380

8481

0 commit comments

Comments
 (0)