1

I would like to emulate the behaviour of transformed Android views in a different context (CSS 3d transforms, iOS CALayers, and OpenGL), so that given particular viewport dimensions and the same rotations/translations/scaling, elements will be projected into the same screen-space coordinates across all platforms.

The android documentation doesn't shed much light on the fov (or the exact projection matrix) used. Naturally I can invest some time fiddling around and get a good-enough approximation, but does anyone know offhand what this may be, assuming it is fixed across all devices, or if it in fact differs from device to device?

Update

I've been digging deeper into the source for android.graphics.Camera, which implements the underlying logic for this behaviour using a thin layer over a Skia 3D View (Sk3DView), so now my question applies over here, too. That is- how can I build a 4x4 projection matrix to emulate a Sk3DView?

Community
  • 1
  • 1
mseddon
  • 1,815
  • 17
  • 28

0 Answers0