/* world.h  (Steve Hill)  1.2  5/23/90$ */

/* world.h
 *
 * Header file for world.c
 */


typedef struct world_s
{
	/* Camera Parameters */

	point_t		*view_point;		/* Location of camera	*/
	vector_t	*view_vector,		/* Direction of camera	*/
			*vert_vector,		/* Up direction		*/
			*horz_vector;		/* Left-right direction	*/

	/* Projection Parameters */

	real_t		view_plane;		/* Distance of		*/
						/* projection plane	*/
	real_t		view_x,			/* Size of projection	*/
			view_y;			/* plane		*/

	/* Picture Parameters */

	int		pixels_x,		/* Size of image in	*/
			pixels_y;		/* pixels		*/

	/* Lighting */

	colour_t	*ambient,		/* Ambient light	*/
			*sky;			/* Sky colour		*/
	light_list_t	*lights;		/* Light's colour and	*/
						/* locations		*/

	solid_t		*solid;			/* Solid to view	*/

	bool_t		report_progress;	/* Print dots?		*/
	FILE		*file;			/* File to send results	*/
	char		*file_name;

	int		start_x, stop_x,	/* Region of picture to */
			start_y, stop_y;	/* be rendered		*/
}
world_t;

#define WorldNull	((world_t *) NULL)

#define DEFAULT_PIXELS_X	200
#define DEFAULT_PIXELS_Y	320

#define DEFAULT_VIEW_X		REAL_ONE
#define DEFAULT_VIEW_Y		REAL_ONE

extern point_t	default_view_point;
extern vector_t default_view_vector,
		default_vert_vector;

extern real_t	default_view_plane;

extern int	default_pixels_x,
		default_pixels_y;

extern real_t	default_view_x,
		default_view_y;

extern colour_t	default_ambient_light,
		default_sky;

extern FILE	*default_file;

world_t		*World PROTO((void));

void		WorldPplane PROTO((world_t *, real_t, real_t, real_t)),
		WorldResolution PROTO((world_t *, int, int)),
		WorldLocation PROTO((world_t *, point_t *)),
		WorldLook PROTO((world_t *, vector_t *)),
		WorldUp PROTO((world_t *, vector_t *)),
		WorldLight PROTO((world_t *, light_t *)),
		WorldAmbient PROTO((world_t *, colour_t *)),
		WorldSolid PROTO((world_t *, solid_t *)),
		WorldFileName PROTO((world_t *, char *)),
		WorldSky PROTO((world_t *, colour_t *)),
		CameraVectors PROTO((world_t *));
