--- ray/src/common/cone.h 2003/06/26 00:58:09 2.5 +++ ray/src/common/cone.h 2005/09/23 19:04:52 2.8 @@ -1,4 +1,4 @@ -/* RCSid $Id: cone.h,v 2.5 2003/06/26 00:58:09 schorsch Exp $ */ +/* RCSid $Id: cone.h,v 2.8 2005/09/23 19:04:52 greg Exp $ */ /* * cone.h - header file for cones (cones, cylinders, rings, cups, tubes). * @@ -15,20 +15,18 @@ extern "C" { #endif -#include "copyright.h" - typedef struct cone { - RREAL *ca; /* cone arguments (o->oargs.farg) */ - char p0, p1; /* indices for endpoints */ - char r0, r1; /* indices for radii */ FVECT ad; /* axis direction vector */ RREAL al; /* axis length */ RREAL sl; /* side length */ + RREAL *ca; /* cone arguments (o->oargs.farg) */ RREAL (*tm)[4]; /* pointer to transformation matrix */ + char p0, p1; /* indices for endpoints */ + char r0, r1; /* indices for radii */ } CONE; -#define CO_R0(co) ((co)->ca[(co)->r0]) -#define CO_R1(co) ((co)->ca[(co)->r1]) +#define CO_R0(co) ((co)->ca[(int)((co)->r0)]) +#define CO_R1(co) ((co)->ca[(int)((co)->r1)]) #define CO_P0(co) ((co)->ca+(co)->p0) #define CO_P1(co) ((co)->ca+(co)->p1)