public double pixelSizeAtDistance(double distance){
  if (this.pixelSizeFactor == 0) {
    double fovyDegrees=this.fieldOfView;
    double tanfovy_2=Math.tan(Math.toRadians(fovyDegrees * 0.5));
    this.pixelSizeFactor=2 * tanfovy_2 / this.viewport.height;
  }
  return distance * this.pixelSizeFactor;
}

public double pixelSizeAtDistance ( double distance ) { if ( this . pixelSizeFactor == 0 ) { double fovyDegrees = this . fieldOfView ; double tanfovy_2 = Math . tan ( Math . toRadians ( fovyDegrees * 0.5 ) ) ; this . pixelSizeFactor = 2 * tanfovy_2 / this . viewport . height ; } return distance * this . pixelSizeFactor ; }
returns the height of a pixel at a given distance from the eye point . this method assumes the model of a screen composed of rectangular pixels , where pixel coordinates denote infinitely thin space between pixels . the units of the returned size are in meters per pixel . < p / > the result of this method is undefined if the distance is negative .
