// // env_map.h // // Environmental mapping for sky // // Copyright (C) J. Belson 2003.5.3 // #ifndef _ENV_MAP_H_ #define _ENV_MAP_H_ #include "fcolour.h" #include "types.h" #include "vector3d.h" class env_map { private: // Six maps, one for each side of the cube uint32* maps[6]; int size; // Pick the appropriate map for given view vector int pick_map(const vector3d& v) const; // Return colour from map fcolour read_map(int x, int y, int map_num) const; // Clear map void clear_map(int map_num); public: env_map(int env_map_size); ~env_map(); // Relationship between maps and view direction enum { FORWARD, RIGHT, UP, LEFT, DOWN, BACK }; // Return specified map uint32* get_map(int map_num) const; // Return the colour in specified direction fcolour get_colour(const vector3d& view) const; }; #endif // _ENV_MAP_H