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 ...

Get Cardboard VR Projects for Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.