refactoring camera and polygon classes