OffAxisProjection.fromAngles constructor

OffAxisProjection.fromAngles({
  1. required double left,
  2. required double right,
  3. required double down,
  4. required double up,
  5. double near = 0.1,
  6. double far = 1000.0,
})

From half-angles in radians measured from the view axis, left and down negative, the way OpenXR's XrFovf states them.

Implementation

factory OffAxisProjection.fromAngles({
  required double left,
  required double right,
  required double down,
  required double up,
  double near = 0.1,
  double far = 1000.0,
}) => OffAxisProjection(
  tanLeft: tan(left),
  tanRight: tan(right),
  tanDown: tan(down),
  tanUp: tan(up),
  near: near,
  far: far,
);