/*
 * rtcommon.h - This file contains common defines typedefs used by various
 *   parts of the raytracer and it interfaces
 *
 * $Id: rtcommon.h,v 1.4 2001/02/26 18:33:41 johns Exp $
 *
 */ 

#include "util.h"    /* rt_timer_xxx() and rt_rand() */
#include "hash.h"    /* rt_hash_xxx() */

/* 
 * Build the ray tracer and its interfaces using either doubles or floats
 * based on compile time defition of USESINGLEFLT
 */
#ifdef USESINGLEFLT
typedef float flt;   /* generic floating point number, using float  */
typedef flt apiflt;  /* generic floating point number, using float  */
#else
typedef double flt;  /* generic floating point number, using double */
typedef flt apiflt;  /* generic floating point number, using double */
#endif


/*
 * Parameter values for rt_boundmode()
 */
#define RT_BOUNDING_DISABLED 0  /* spatial subdivision/bounding disabled */
#define RT_BOUNDING_ENABLED  1  /* spatial subdivision/bounding enabled  */


/*
 * Shader Modes for rt_shadermode()
 *
 * These are sorted from lowest quality (and fastest execution)
 * to highest quality (and slowest execution)
 */
#define RT_SHADER_AUTO    0  /* Automatically determine shader needed */
#define RT_SHADER_LOWEST  1  /* lowest quality shading available      */
#define RT_SHADER_LOW     2  /* low quality shading                   */
#define RT_SHADER_MEDIUM  3  /* Medium quality shading                */
#define RT_SHADER_HIGH    4  /* High quality shading                  */
#define RT_SHADER_FULL    5  /* Highest quality shading available     */



/*
 * Shader capability flags - sorted by relative execution cost.
 *
 * Used to automatically setup the fastest shader that supports
 * all of the capabilities used in a given scene.
 * Ideally, we use the shader that just has the features we need,
 * and nothing more, but its impractical to have that many seperate
 * shaders, each optimized for an exact set of features, but we
 * do the best we can with a reasonable amount of code.
 */
#define RT_SHADE_LIGHTING               1  /* need lighting                */
#define RT_SHADE_PHONG                  2  /* need phong shading           */
#define RT_SHADE_TEXTURE_MAPS           4  /* need texture mapping         */
#define RT_SHADE_MIPMAP                 8  /* need mip-maps                */
#define RT_SHADE_REFLECTION            16  /* need reflections             */
#define RT_SHADE_REFRACTION            32  /* need refraction              */
#define RT_SHADE_SHADOWS               64  /* need shadows                 */
#define RT_SHADE_VOLUMETRIC           128  /* need volume rendering        */
#define RT_SHADE_ANTIALIASING         256  /* need antialiasing            */
#define RT_SHADE_DEPTH_OF_FIELD       512  /* need depth of field          */
#define RT_SHADE_SOFT_SHADOW         1024  /* need soft-shadows/penumbra   */
#define RT_SHADE_VOLUMETRIC_SHADOW   2048  /* need volumetric shadows      */



/* 
 * Texture mapping types
 */
#define RT_TEXTURE_CONSTANT             0
#define RT_TEXTURE_3D_CHECKER           1
#define RT_TEXTURE_GRIT                 2
#define RT_TEXTURE_MARBLE               3
#define RT_TEXTURE_WOOD                 4
#define RT_TEXTURE_GRADIENT             5
#define RT_TEXTURE_CYLINDRICAL_CHECKER  6
#define RT_TEXTURE_CYLINDRICAL_IMAGE    7
#define RT_TEXTURE_SPHERICAL_IMAGE      8
#define RT_TEXTURE_PLANAR_IMAGE         9


/*
 * Phong types
 */
#define RT_PHONG_PLASTIC                0
#define RT_PHONG_METAL                  1


/*
 * Supported output file formats list.
 */
#define RT_FORMAT_TARGA                 0
#define RT_FORMAT_PPM                   1
#define RT_FORMAT_SGIRGB                2
#define RT_FORMAT_JPEG                  3
#define RT_FORMAT_WINBMP                4
#define RT_FORMAT_PNG                   5



