DeviceParams class

VR headset device parameters. Different headsets have different lens properties.

Constructors

DeviceParams({required String vendor, required String model, double screenToLensDistance = 0.042, double interLensDistance = 0.064, double trayToLensDistance = 0.035, List<double> distortionCoefficients = const [0.441, 0.156], List<double> fovAngles = const [40, 40, 40, 40]})
const

Properties

distortionCoefficients List<double>
Distortion coefficients for polynomial correction.
final
fovAngles List<double>
Field of view angles in degrees: left, right, bottom, top.
final
hashCode int
The hash code for this object.
no setterinherited
interLensDistance double
Distance between lens centers in meters.
final
ipd double
no setter
model String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenToLensDistance double
Distance from screen to lens center in meters.
final
trayToLensDistance double
Tray-to-lens distance (for phone alignment).
final
vendor String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

cardboardV1 → const DeviceParams
Google Cardboard V1.
cardboardV2 → const DeviceParams
Google Cardboard V2.
gearVr → const DeviceParams
Samsung Gear VR (approximate).
generic → const DeviceParams
Generic mobile VR viewer.
none → const DeviceParams
No distortion (for testing/development).