RTABMapLib.java
Go to the documentation of this file.
1 
2 package com.introlab.rtabmap;
3 import android.os.IBinder;
4 import android.view.KeyEvent;
5 import android.util.Log;
6 
7 
8 // Wrapper for native library
9 
10 public class RTABMapLib
11 {
12 
13  static {
14  // This project depends on tango_client_api, so we need to make sure we load
15  // the correct library first.
18  Log.e(RTABMapActivity.class.getSimpleName(), "ERROR! Unable to load libtango_client_api.so!");
19  }
20  System.loadLibrary("NativeRTABMap");
21  }
22 
23  // Initialize the Tango Service, this function starts the communication
24  // between the application and Tango Service.
25  // The activity object is used for checking if the API version is outdated.
26  public static native void onCreate(RTABMapActivity activity);
27 
28  public static native void setScreenRotation(int displayRotation, int cameraRotation);
29 
30  public static native int openDatabase(String databasePath, boolean databaseInMemory, boolean optimize);
31  public static native int openDatabase2(String databaseSource, String databasePath, boolean databaseInMemory, boolean optimize);
32 
33  /*
34  * Called when the Tango service is connected.
35  *
36  * @param binder The native binder object.
37  */
38  public static native boolean onTangoServiceConnected(IBinder binder);
39 
40  // Release all non OpenGl resources that are allocated from the program.
41  public static native void onPause();
42 
43  // Allocate OpenGL resources for rendering.
44  public static native void initGlContent();
45 
46  // Setup the view port width and height.
47  public static native void setupGraphic(int width, int height);
48 
49  // Main render loop.
50  public static native int render();
51 
52  // Set the render camera's viewing angle:
53  // first person, third person, or top down.
54  public static native void setCamera(int cameraIndex);
55 
56  // Pass touch events to the native layer.
57  public static native void onTouchEvent(int touchCount, int event0,
58  float x0, float y0, float x1, float y1);
59 
60 
61  public static native void setPausedMapping(boolean paused);
62  public static native void setOnlineBlending(boolean enabled);
63  public static native void setMapCloudShown(boolean shown);
64  public static native void setOdomCloudShown(boolean shown);
65  public static native void setMeshRendering(boolean enabled, boolean withTexture);
66  public static native void setLocalizationMode(boolean enabled);
67  public static native void setTrajectoryMode(boolean enabled);
68  public static native void setGraphOptimization(boolean enabled);
69  public static native void setNodesFiltering(boolean enabled);
70  public static native void setGraphVisible(boolean visible);
71  public static native void setGridVisible(boolean visible);
72  public static native void setRawScanSaved(boolean enabled);
73  public static native void setFullResolution(boolean enabled);
74  public static native void setSmoothing(boolean enabled);
75  public static native void setCameraColor(boolean enabled);
76  public static native void setAppendMode(boolean enabled);
77  public static native void setDataRecorderMode(boolean enabled);
78  public static native void setMaxCloudDepth(float value);
79  public static native void setMinCloudDepth(float value);
80  public static native void setPointSize(float value);
81  public static native void setFOV(float value);
82  public static native void setOrthoCropFactor(float value);
83  public static native void setGridRotation(float value);
84  public static native void setLighting(boolean enabled);
85  public static native void setBackfaceCulling(boolean enabled);
86  public static native void setWireframe(boolean enabled);
87  public static native void setCloudDensityLevel(int value);
88  public static native void setMeshAngleTolerance(float value);
89  public static native void setMeshTriangleSize(int value);
90  public static native void setClusterRatio(float value);
91  public static native void setMaxGainRadius(float value);
92  public static native void setRenderingTextureDecimation(int value);
93  public static native void setBackgroundColor(float gray);
94  public static native int setMappingParameter(String key, String value);
95  public static native void setGPS(
96  double stamp,
97  double longitude,
98  double latitude,
99  double altitude,
100  double accuracy,
101  double bearing);
102 
103  public static native void resetMapping();
104  public static native void save(String outputDatabasePath);
105  public static native void cancelProcessing();
106  public static native boolean exportMesh(
107  float cloudVoxelSize,
108  boolean regenerateCloud,
109  boolean meshing,
110  int textureSize,
111  int textureCount,
112  int normalK,
113  boolean optimized,
114  float optimizedVoxelSize,
115  int optimizedDepth,
116  int optimizedMaxPolygons,
117  float optimizedColorRadius,
118  boolean optimizedCleanWhitePolygons,
119  int optimizedMinClusterSize,
120  float optimizedMaxTextureDistance,
121  int optimizedMinTextureClusterSize,
122  boolean blockRendering);
123  public static native boolean writeExportedMesh(String directory, String name);
124  public static native boolean postExportation(boolean visualize);
125  public static native int postProcessing(int approach);
126 
127  public static native String getStatus();
128  public static native int getTotalNodes();
129  public static native int getTotalWords();
130  public static native int getTotalPoints();
131  public static native float getUpdateTime();
132  public static native int getLoopClosureId();
133 
134 }
static native int getTotalPoints()
static native void setupGraphic(int width, int height)
static native void setLighting(boolean enabled)
static native void setMinCloudDepth(float value)
static native void setOrthoCropFactor(float value)
static native void setMeshAngleTolerance(float value)
static native void setMeshRendering(boolean enabled, boolean withTexture)
static native void setTrajectoryMode(boolean enabled)
static native int setMappingParameter(String key, String value)
static native void setScreenRotation(int displayRotation, int cameraRotation)
static native void setBackgroundColor(float gray)
static native String getStatus()
static native boolean exportMesh(float cloudVoxelSize, boolean regenerateCloud, boolean meshing, int textureSize, int textureCount, int normalK, boolean optimized, float optimizedVoxelSize, int optimizedDepth, int optimizedMaxPolygons, float optimizedColorRadius, boolean optimizedCleanWhitePolygons, int optimizedMinClusterSize, float optimizedMaxTextureDistance, int optimizedMinTextureClusterSize, boolean blockRendering)
static native void setClusterRatio(float value)
static native void setMapCloudShown(boolean shown)
static native void setAppendMode(boolean enabled)
static native void setOdomCloudShown(boolean shown)
static native void setNodesFiltering(boolean enabled)
static native void setGridRotation(float value)
static native float getUpdateTime()
static native int openDatabase(String databasePath, boolean databaseInMemory, boolean optimize)
static native void setMaxCloudDepth(float value)
static native void setMeshTriangleSize(int value)
static native void setBackfaceCulling(boolean enabled)
static native void setCameraColor(boolean enabled)
static native void onPause()
static native void setRawScanSaved(boolean enabled)
static native void setLocalizationMode(boolean enabled)
static native int openDatabase2(String databaseSource, String databasePath, boolean databaseInMemory, boolean optimize)
static native void setGPS(double stamp, double longitude, double latitude, double altitude, double accuracy, double bearing)
static native void setCloudDensityLevel(int value)
static native int getTotalWords()
static native void cancelProcessing()
static native int getLoopClosureId()
static native void setPointSize(float value)
static native void setRenderingTextureDecimation(int value)
static native void resetMapping()
static native void setCamera(int cameraIndex)
static native void setPausedMapping(boolean paused)
static native void setGridVisible(boolean visible)
static native boolean writeExportedMesh(String directory, String name)
static native boolean onTangoServiceConnected(IBinder binder)
static native void save(String outputDatabasePath)
static native void onTouchEvent(int touchCount, int event0, float x0, float y0, float x1, float y1)
static native void setFullResolution(boolean enabled)
static native void setDataRecorderMode(boolean enabled)
static native boolean postExportation(boolean visualize)
static native int render()
static native void setMaxGainRadius(float value)
static native void setFOV(float value)
static native void setGraphOptimization(boolean enabled)
static native int postProcessing(int approach)
static native void setOnlineBlending(boolean enabled)
static native void onCreate(RTABMapActivity activity)
static native void setWireframe(boolean enabled)
static native void initGlContent()
static native void setSmoothing(boolean enabled)
static native void setGraphVisible(boolean visible)
static native int getTotalNodes()


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:41:32