Tachyon (current)  Current Main Branch
cylinder.h
Go to the documentation of this file.
1 /*
2  * cylinder.h - This file contains the defines for cylinders etc.
3  *
4  * (C) Copyright 1994-2022 John E. Stone
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * $Id: cylinder.h,v 1.12 2022/02/18 17:55:28 johns Exp $
8  *
9  */
10 
11 object * newcylinder(void *, vector, vector, flt);
12 object * newfcylinder(void *, vector, vector, flt);
13 
14 #ifdef CYLINDER_PRIVATE
15 
19 typedef struct {
20  RT_OBJECT_HEAD
21  vector ctr;
22  vector axis;
23  flt rad;
24 } cylinder;
25 
26 static void cylinder_intersect(const cylinder *, ray *);
27 static void fcylinder_intersect(const cylinder *, ray *);
28 
29 static int cylinder_bbox(void * obj, vector * min, vector * max);
30 static int fcylinder_bbox(void * obj, vector * min, vector * max);
31 
32 static void cylinder_normal(const cylinder *, const vector *, const ray *, vector *);
33 #endif
34 
object * newcylinder(void *, vector, vector, flt)
Definition: cylinder.c:41
static void fcylinder_intersect(const cylinder *cyl, ray *ry)
Definition: cylinder.c:188
static void cylinder_normal(const cylinder *cyl, const vector *pnt, const ray *incident, vector *N)
Definition: cylinder.c:110
double flt
generic floating point number, using double
Definition: tachyon.h:47
static int fcylinder_bbox(void *obj, vector *min, vector *max)
Definition: cylinder.c:159
static void cylinder_intersect(const cylinder *cyl, ray *ry)
Definition: cylinder.c:59
object * newfcylinder(void *, vector, vector, flt)
Definition: cylinder.c:144
static int cylinder_bbox(void *obj, vector *min, vector *max)
Definition: cylinder.c:55