LensDistortion class
Lens distortion parameters for VR optics. Barrel distortion corrects for the magnification effect of VR lenses.
Constructors
- LensDistortion({double k1 = 0.22, double k2 = 0.24, double chromaticAberration = 0})
-
const
Properties
- chromaticAberration → double
-
Chromatic aberration offset in pixels.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- k1 → double
-
Distortion coefficient K1 (barrel distortion).
final
- k2 → double
-
Distortion coefficient K2 (fine-tuning).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
distort(
double nx, double ny) → Offset - Applies barrel distortion to a normalized coordinate (-1 to 1).
-
distortScreen(
double screenX, double screenY, double width, double height) → Offset - Applies distortion to a screen coordinate within a viewport.
-
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
- cardboard → const LensDistortion
- Google Cardboard v2 defaults.
- none → const LensDistortion
- No distortion (for testing).