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

The Transform class

A 3D virtual reality scene will be constructed from various objects, each with a position, rotation, and scale in 3D dimensional space defined by a Transform.

It will also be naturally useful to permit transforms to be grouped hierarchically. This grouping also creates a distinction between local space and world space, where children only keep track of the difference between their translation, rotation, and scale (TRS) and that of their parent (local space). The actual data that we are storing is the local position (we'll use the words position and translation interchangeably), rotation, and scale. Global position, rotation, and scale are computed by combining the local TRS all the way up the chain of parents.

First, let's define ...

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