Putting it together – VuforiaTM with JME
In this section we will show you how to integrate VuforiaTM with JME. We will use a natural feature-tracking target for this purpose. So open the VuforiaJME project in your Eclipse to start. As you can already observe, there are two main changes compared to our previous projects:
The camera preview class is gone
There is a new directory in the project root named
jni
The first change is due to the way VuforiaTM manages the camera. VuforiaTM uses its own camera handle and camera preview integrated in the library. Therefore, we'll need to query the video image through the VuforiaTM library to display it on our scene graph (using the same principle as seen in Chapter 2, Viewing the World).
The jni
folder contains C++ source code, which is required for VuforiaTM. To integrate VuforiaTM with JME, we need to interoperate Vuforia's low-level part (C++) with the high-level part (Java). It means we will need to compile C++ and Java code and transfer data between...