Tachyon (current)  Current Main Branch
box.h
Go to the documentation of this file.
1 /*
2  * box.h - This file contains the defines for boxes etc.
3  *
4  * (C) Copyright 1994-2022 John E. Stone
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * $Id: box.h,v 1.10 2022/02/18 17:55:28 johns Exp $
8  *
9  */
10 
14 typedef struct {
15  RT_OBJECT_HEAD
16  vector min;
17  vector max;
18 } box;
19 
20 
21 box * newbox(void * tex, vector min, vector max);
22 void box_intersect(const box *, ray *);
23 void box_normal(const box *, const vector *, const ray *, vector *);
RT_OBJECT_HEAD vector min
minimum vertex coordinate
Definition: box.h:16
void box_normal(const box *, const vector *, const ray *, vector *)
Definition: box.c:103
vector max
maximum vertex coordinate
Definition: box.h:17
box * newbox(void *tex, vector min, vector max)
Definition: box.c:40
void box_intersect(const box *, ray *)
Definition: box.c:53
axis-aligned box definition
Definition: box.h:14