It's crap like this that makes people outraged professors are basically untouchable once they reach tenure--real tenure unlike K-12 post-probationary status.
There is no justification for the prof's assignment. It is downright perverse on his part, and he should lose his job over it.
It is NEVER okay to even suggest students "bare all," even as an option, in a class. This is the very essence of a hostile environment, of sexual harassment.
And this is a PUBLIC university, so there are clearly all kinds of regulations and rules about boundaries between professors and students.
I couldn't believe this idiot of a prof even thought of doing such a thing.