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.
-
ClassDescriptionTracks the device orientation for VR by feeding the motion sensors (gyroscope, accelerometer and magnetometer through
com.codename1.sensors.MotionSensorManager) into anOrientationFilter.A 360 degree panorama viewer: renders an equirectangular image onto the inside of a sphere with drag-to-look navigation and optional gyroscope look.Deterministic complementary sensor-fusion filter that turns raw gyroscope, accelerometer and magnetometer readings into a device orientation quaternion.Supplies and updates the texture rendered by aMedia360View, enabling dynamic content such as procedural animations - and, once a platform path from media frames to GPU textures exists, 360 video.Computes per-eye cameras for stereo rendering: a head position and orientation plus aVRSettingsinterpupillary distance yield acom.codename1.gpu.CameraperVREye.Identifies which eye aVRRendererframe is being rendered for.Application supplied callback that draws the scene for aVRView.Configuration for aVRView.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 portablecom.codename1.gpupipeline so it works on every platform whereDisplay#isGpuSupported()is true - including the simulator.