Tachyon (current)  Current Main Branch
sphere.h
Go to the documentation of this file.
1 /*
2  * sphere.h - This file contains the defines for spheres etc.
3  *
4  * (C) Copyright 1994-2022 John E. Stone
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * $Id: sphere.h,v 1.15 2022/02/18 17:55:28 johns Exp $
8  *
9  */
10 
11 object * newsphere(void *, vector, flt);
12 
13 #ifdef SPHERE_PRIVATE
14 
15 typedef struct {
16  RT_OBJECT_HEAD
17  vector ctr;
18  flt rad;
19 } sphere;
20 
21 static int sphere_bbox(void * obj, vector * min, vector * max);
22 static void sphere_intersect(const sphere *, ray *);
23 static void sphere_normal(const sphere *, const vector *, const ray *, vector *);
24 
25 #endif /* SPHERE_PRIVATE */
26 
static int sphere_bbox(void *obj, vector *min, vector *max)
Definition: sphere.c:47
static void sphere_normal(const sphere *spr, const vector *pnt, const ray *incident, vector *N)
Definition: sphere.c:113
double flt
generic floating point number, using double
Definition: tachyon.h:47
static void sphere_intersect(const sphere *spr, ray *ry)
Definition: sphere.c:60
object * newsphere(void *, vector, flt)
Definition: sphere.c:33