package com.codename1.vr

Virtual reality and 360 media built entirely on the portable com.codename1.gpu pipeline and com.codename1.sensors motion sensors - no platform SDK dependency, so everything here runs wherever Display#isGpuSupported() is true, including the simulator.

VRView renders an application VRRenderer in side-by-side stereo with head tracking; Media360View displays equirectangular panorama photos with drag or gyroscope look-around. The building blocks are public too: OrientationFilter (deterministic gyro/accel/magnetometer fusion), HeadTracker (sensor wiring plus thread-safe snapshots) and VRCameraRig (per-eye camera math).

Threading: VRRenderer and TextureSource callbacks run on the platform render thread; everything else is EDT-friendly component API.

Types

class HeadTrackerTracks the device orientation for VR by feeding the motion sensors (gyroscope, accelerometer and magnetometer through com.codename1.sensors.MotionSensorManager) into an OrientationFilter.
class Media360ViewA 360 degree panorama viewer: renders an equirectangular image onto the inside of a sphere with drag-to-look navigation and optional gyroscope look.
class OrientationFilterDeterministic complementary sensor-fusion filter that turns raw gyroscope, accelerometer and magnetometer readings into a device orientation quaternion.
interface TextureSourceSupplies and updates the texture rendered by a Media360View, enabling dynamic content such as procedural animations - and, once a platform path from media frames to GPU textures exists, 360 video.
class VRCameraRigComputes per-eye cameras for stereo rendering: a head position and orientation plus a VRSettings interpupillary distance yield a com.codename1.gpu.Camera per VREye.
enum VREyeIdentifies which eye a VRRenderer frame is being rendered for.
interface VRRendererApplication supplied callback that draws the scene for a VRView.
class VRSettingsConfiguration for a VRView.
class VRViewComponent that renders an application scene in virtual reality: stereo side-by-side per-eye views with sensor-fusion head tracking, built entirely on the portable com.codename1.gpu pipeline so it works on every platform where Display#isGpuSupported() is true - including the simulator.