OffAxisProjection.symmetric constructor
OffAxisProjection.symmetric({})
The frustum a PerspectiveProjection of fovRadiansY rendered at
aspectRatio has, for a symmetric view through this class.
Implementation
factory OffAxisProjection.symmetric({
double fovRadiansY = 45 * degrees2Radians,
double aspectRatio = 1.0,
double near = 0.1,
double far = 1000.0,
}) {
final up = tan(fovRadiansY * 0.5);
final right = up * aspectRatio;
return OffAxisProjection(
tanLeft: -right,
tanRight: right,
tanDown: -up,
tanUp: up,
near: near,
far: far,
);
}