extract the vertex projection code

and put it in a separate function.
constants -> enums.
double -> EON_Double