RTABMapLib.java
Go to the documentation of this file.
00001 
00002 package com.introlab.rtabmap;
00003 import android.os.IBinder;
00004 import android.view.KeyEvent;
00005 import android.util.Log;
00006 
00007 
00008 // Wrapper for native library
00009 
00010 public class RTABMapLib
00011 {
00012 
00013         static {
00014         // This project depends on tango_client_api, so we need to make sure we load
00015         // the correct library first.
00016         if (TangoInitializationHelper.loadTangoSharedLibrary() ==
00017                 TangoInitializationHelper.ARCH_ERROR) {
00018             Log.e(RTABMapActivity.class.getSimpleName(), "ERROR! Unable to load libtango_client_api.so!");
00019         }
00020         System.loadLibrary("NativeRTABMap");
00021     }
00022 
00023  // Initialize the Tango Service, this function starts the communication
00024     // between the application and Tango Service.
00025     // The activity object is used for checking if the API version is outdated.
00026     public static native void onCreate(RTABMapActivity activity);
00027     
00028     public static native void setScreenRotation(int displayRotation, int cameraRotation);
00029     
00030     public static native int openDatabase(String databasePath, boolean databaseInMemory, boolean optimize);
00031     public static native int openDatabase2(String databaseSource, String databasePath, boolean databaseInMemory, boolean optimize);
00032     
00033     /*
00034      * Called when the Tango service is connected.
00035      *
00036      * @param binder The native binder object.
00037      */
00038     public static native boolean onTangoServiceConnected(IBinder binder);
00039 
00040     // Release all non OpenGl resources that are allocated from the program.
00041     public static native void onPause();
00042 
00043     // Allocate OpenGL resources for rendering.
00044     public static native void initGlContent();
00045 
00046     // Setup the view port width and height.
00047     public static native void setupGraphic(int width, int height);
00048 
00049     // Main render loop.
00050     public static native int render();
00051 
00052     // Set the render camera's viewing angle:
00053     //   first person, third person, or top down.
00054     public static native void setCamera(int cameraIndex);
00055     
00056     // Pass touch events to the native layer.
00057     public static native void onTouchEvent(int touchCount, int event0,
00058                                            float x0, float y0, float x1, float y1);
00059     
00060 
00061     public static native void setPausedMapping(boolean paused);
00062     public static native void setOnlineBlending(boolean enabled);
00063     public static native void setMapCloudShown(boolean shown);
00064     public static native void setOdomCloudShown(boolean shown);
00065     public static native void setMeshRendering(boolean enabled, boolean withTexture);
00066     public static native void setLocalizationMode(boolean enabled);
00067     public static native void setTrajectoryMode(boolean enabled);
00068     public static native void setGraphOptimization(boolean enabled);
00069     public static native void setNodesFiltering(boolean enabled);
00070     public static native void setGraphVisible(boolean visible);
00071     public static native void setGridVisible(boolean visible);
00072     public static native void setRawScanSaved(boolean enabled);
00073     public static native void setFullResolution(boolean enabled);
00074     public static native void setSmoothing(boolean enabled);
00075     public static native void setCameraColor(boolean enabled);
00076     public static native void setAppendMode(boolean enabled);
00077     public static native void setDataRecorderMode(boolean enabled);
00078     public static native void setMaxCloudDepth(float value);
00079     public static native void setMinCloudDepth(float value);
00080     public static native void setPointSize(float value);
00081     public static native void setFOV(float value);
00082     public static native void setOrthoCropFactor(float value);
00083     public static native void setGridRotation(float value);
00084     public static native void setLighting(boolean enabled);
00085     public static native void setBackfaceCulling(boolean enabled);
00086     public static native void setWireframe(boolean enabled);
00087     public static native void setCloudDensityLevel(int value);
00088     public static native void setMeshAngleTolerance(float value);
00089     public static native void setMeshTriangleSize(int value);
00090     public static native void setClusterRatio(float value);
00091     public static native void setMaxGainRadius(float value);
00092     public static native void setRenderingTextureDecimation(int value);
00093     public static native void setBackgroundColor(float gray);
00094     public static native int setMappingParameter(String key, String value);
00095     public static native void setGPS(
00096                         double stamp,
00097                         double longitude, 
00098                         double latitude, 
00099                         double altitude,  
00100                         double accuracy,
00101                         double bearing);
00102 
00103     public static native void resetMapping();
00104     public static native void save(String outputDatabasePath);
00105     public static native void cancelProcessing();
00106     public static native boolean exportMesh(
00107                 float cloudVoxelSize,
00108                 boolean regenerateCloud,
00109                 boolean meshing,
00110                 int textureSize,
00111                 int textureCount,
00112                 int normalK,
00113                 boolean optimized,
00114                 float optimizedVoxelSize,
00115                 int optimizedDepth,
00116                 int optimizedMaxPolygons,
00117                 float optimizedColorRadius,
00118                 boolean optimizedCleanWhitePolygons,
00119                 int optimizedMinClusterSize,
00120                 float optimizedMaxTextureDistance,
00121                 int optimizedMinTextureClusterSize,
00122                 boolean blockRendering);
00123     public static native boolean writeExportedMesh(String directory, String name);
00124     public static native boolean postExportation(boolean visualize);
00125     public static native int postProcessing(int approach);
00126     
00127     public static native String getStatus();
00128     public static native int getTotalNodes();
00129     public static native int getTotalWords();
00130     public static native int getTotalPoints();
00131     public static native float getUpdateTime();
00132     public static native int getLoopClosureId();
00133     
00134 }


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:22