O'Reilly logo

Cardboard VR Projects for Android by Matt Schoen, Jonathan Linowes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A basic geometric visualization

For our first visualization, we'll create a basic equalizer wave graphic. It'll be a rectangular block consisting of a series of cubes that are scaled according to the audio waveform data. We'll use the built-in Cube component already in the RenderBox library and its basic vertex color lighting material.

In the visualizations/ folder, create a new Java class named GeometricVisualization and begin as follows:

public class GeometricVisualization extends Visualization {
    static final String TAG = "GeometricVisualization";
    public GeometricVisualization(VisualizerBox visualizerBox) {
        super(visualizerBox);
    }
}

At the top of the class, declare a Transform array of cube transforms and the corresponding array for RenderObjects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required