fix warnings, cleanups

This commit is contained in:
Hannes Janetzek
2013-09-17 22:43:53 +02:00
parent 1421a1f6b6
commit e5761ef601
10 changed files with 51 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
* Copyright 2011 See libgdx AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -15,7 +15,6 @@
package org.oscim.layers.tile.vector;
import org.oscim.core.MapPosition;
import org.oscim.event.MotionEvent;
import org.oscim.layers.Layer;
import org.oscim.map.Map;
import org.oscim.renderer.ExtrusionRenderer;

View File

@@ -16,10 +16,6 @@ package org.oscim.utils;
import org.oscim.core.Point;
/**
* @author Hannes Janetzek
*/
public final class GeometryUtils {
/**
* Calculates the center of the minimum bounding rectangle for the given

View File

@@ -21,7 +21,6 @@ import java.nio.FloatBuffer;
import org.oscim.backend.GL20;
import org.oscim.backend.GLAdapter;
public class Matrix4 {
private static final GL20 GL = GLAdapter.get();
@@ -29,46 +28,6 @@ public class Matrix4 {
private final static String TAG = Matrix4.class.getName();
private final static boolean dbg = false;
private native static long alloc();
private native static void delete(long self);
private native static void set(long self, float[] m);
private native static void copy(long self, long other);
private native static void identity(long self);
private native static void get(long self, float[] m);
private native static void mul(long self, long lhs_ptr);
private native static void smul(long self, long rhs_ptr, long lhs_ptr);
private native static void smulrhs(long self, long rhs_ptr);
private native static void smullhs(long self, long lhs_ptr);
private native static void strans(long self, long rhs_ptr);
private native static void prj(long self, float[] vec3);
private native static void setRotation(long self, float a, float x, float y, float z);
private native static void setScale(long self, float x, float y, float z);
private native static void setTranslation(long self, float x, float y, float z);
private native static void setTransScale(long self, float tx, float ty, float scale);
//private native static void setAsUniform(long self, int handle);
private native static void setValueAt(long self, int pos, float value);
private native static void addDepthOffset(long self, int delta);
private native static ByteBuffer getBuffer(long self);
private final long pointer;
private final FloatBuffer buffer;
@@ -247,6 +206,9 @@ public class Matrix4 {
identity(pointer);
}
/**
* Free native object
* */
@Override
public void finalize() {
if (pointer != 0)
@@ -452,4 +414,43 @@ public class Matrix4 {
return true;
}
private native static long alloc();
private native static void delete(long self);
private native static void set(long self, float[] m);
private native static void copy(long self, long other);
private native static void identity(long self);
private native static void get(long self, float[] m);
private native static void mul(long self, long lhs_ptr);
private native static void smul(long self, long rhs_ptr, long lhs_ptr);
private native static void smulrhs(long self, long rhs_ptr);
private native static void smullhs(long self, long lhs_ptr);
private native static void strans(long self, long rhs_ptr);
private native static void prj(long self, float[] vec3);
private native static void setRotation(long self, float a, float x, float y, float z);
private native static void setScale(long self, float x, float y, float z);
private native static void setTranslation(long self, float x, float y, float z);
private native static void setTransScale(long self, float tx, float ty, float scale);
//private native static void setAsUniform(long self, int handle);
private native static void setValueAt(long self, int pos, float value);
private native static void addDepthOffset(long self, int delta);
private native static ByteBuffer getBuffer(long self);
}

View File

@@ -22,7 +22,6 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
/**
* Allows asnynchronous execution of {@link AsyncTask} instances on a separate thread.
* Needs to be disposed via a call to {@link #dispose()} when no longer used, in which
@@ -82,7 +81,6 @@ public class AsyncExecutor {
* then destroys any resources like threads. Can not be used
* after this method is called.
*/
//@Override
public void dispose () {
executor.shutdown();
try {