Adding 3D tracking and rendering to CameraActivity
We need to make a few changes to CameraActivity
to conform with our changes to ImageDetectionFilter
and with the new interface provided by ARFilter
. We also need to modify the activity's layout so that it includes a GLSurfaceView
. The adapter for this GLSurfaceView
will be ARCubeRenderer
. The ImageDetectionFilter
and the ARCubeRenderer
methods will use CameraProjectionAdapter
to coordinate their projection matrices.
First, let's make the following changes to the member variables of CameraActivity
:
// The filters. private ARFilter[] mImageDetectionFilters; private Filter[] mCurveFilters; private Filter[] mMixerFilters; private Filter[] mConvolutionFilters; // ... // The camera view. private CameraBridgeViewBase mCameraView; // An adapter between the video camera and projection matrix. private CameraProjectionAdapter mCameraProjectionAdapter; // The renderer for 3D augmentations. private ARCubeRenderer mARRenderer...