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 HeadTracker | Tracks the device orientation for VR by feeding the motion sensors (gyroscope, accelerometer and magnetometer through com.codename1.sensors.MotionSensorManager) into an OrientationFilter. |
class Media360View | A 360 degree panorama viewer: renders an equirectangular image onto the inside of a sphere with drag-to-look navigation and optional gyroscope look. |
class OrientationFilter | Deterministic complementary sensor-fusion filter that turns raw gyroscope, accelerometer and magnetometer readings into a device orientation quaternion. |
interface TextureSource | Supplies 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 VRCameraRig | Computes 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 VREye | Identifies which eye a VRRenderer frame is being rendered for. |
interface VRRenderer | Application supplied callback that draws the scene for a VRView. |
class VRSettings | Configuration for a VRView. |
class VRView | Component 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. |