General utility classes used for the cloth simulator