Capt Fathom's suggestion is good for a specific aircraft type (assuming one has the documents).
For a GENERIC ESTIMATION, this GENERIC document on the problem provides some dimensionless diagrams that may help figure a GENERIC geometry. Just choose and apply reasonable dimensions to the diagrams (eye distance from panel or other obstruction horizontally; pitch angle of aircraft on 3° glideslope (usually about 2-3° nose-up); actual height and slope of glareshield; and so on.
Of note, many modern aircraft (as you likely know) have
eye reference indicators above the glareshield, to ensure correct seating (height above and distance from, the cockpit panel) for a correct eye position. And recent aircraft, originally designed in the glass-cockpit era, now have less-tall instrument panels to give pilots better downward vision (no doubt accounted for in the eye reference indicator's construction).
Also of note, it mentions just how a pilot
could end up 5cm low even if their eye position was correct at the beginning of the flight - slouching from muscle fatigue after a long flight.
https://skybrary.aero/sites/default/...shelf/4247.pdf