Fixed: Build failures on clang

The actual errors were in the files surface.h, materials.h, and the
.cpp files in the commit.

Also fixed doxygen comments at header ending #endif (should be a normal
comment).