As a man of about 30 I was 'summoned' to be examined by a doctor at my local hospital as my wife and I were having trouble conceiving. My wife had already been checked elsewhere.
I went happily and willingly as I knew whatever they would do would be to help us so there was no point getting agitated.
In the examination room was a student doctor and I was asked if it was OK for her to stay.
During the checks I stood in front of a seated doctor (male) while he had a thorough feel of my genitals. I seem to remember the female being stood behind me which seemed odd. She could not learn much from there.
I was dressed smartly on top, in shirt and tie but naked from the waist down which felt strange.
Rather than be embarrassed by all this I found it quite funny.
After this I had a prostate check and I ejaculated some pre-cum quite forcefully. The female student saw watched this which did not bother me and at no point did I have an erection but if I did I would not have cared. I was a big boy and it was all done for my benefit and it was all done in a safe environment.
I think that you should be willing to abandon any shame when at a doctors. They are doing what they do for you.