/* hitlist.h  (Steve Hill)  1.3  3/30/90$ */

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


/* hit_info_t
 *
 * Info on vector hit of surface
 */

typedef struct hit_info_s
{
	solid_t		*solid;		/* Solid atom that is hit	*/
	point_t		*point;		/* Point which is hit		*/
	real_t		t;		/* Parameter of line eqn.	*/
}
hit_info_t;

#define HitInfoNull	((hit_info_t *) NULL)


typedef struct hit_list_s
{
	hit_info_t		*elem;
	struct hit_list_s	*ptr;
}
hit_list_t;


#define HitListNull	((hit_list_t *) NULL)
#define HitListCons(E, L) 	((hit_list_t *) ListCons((address_t) E, \
							 (list_t *)  L))


#define HitListFree(L) 	(ListFree((list_t *) L, HitInfoFree))

hit_info_t	*HitInfo PROTO((solid_t *, point_t *, real_t)),
		*HitInfoCopy PROTO((hit_info_t *));

void		HitInfoPrint PROTO((FILE *, hit_info_t *)),
		HitInfoFree PROTO((hit_info_t *));

hit_list_t	*HitListInsert PROTO((hit_info_t *, hit_list_t *)),
		*HitListMerge PROTO((hit_list_t *, hit_list_t *));

void		HitListPrint PROTO((FILE *, hit_list_t *));
