00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 #ifndef SEEN_OPTICAL_H
00030 #define SEEN_OPTICAL_H seen
00031 
00032 #include "common.h"
00033 
00034 #include "bu.h"
00035 #include "shadefuncs.h"
00036 #include "shadework.h"
00037 
00038 __BEGIN_DECLS
00039 
00040 #ifndef OPTICAL_EXPORT
00041 #  if defined(_WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL)
00042 #    ifdef OPTICAL_EXPORT_DLL
00043 #      define OPTICAL_EXPORT __declspec(dllexport)
00044 #    else
00045 #      define OPTICAL_EXPORT __declspec(dllimport)
00046 #    endif
00047 #  else
00048 #    define OPTICAL_EXPORT
00049 #  endif
00050 #endif
00051 
00052 
00053 OPTICAL_EXPORT extern void optical_shader_init(struct mfuncs    **headp);
00054 
00055 
00056 
00057 OPTICAL_EXPORT extern int mlib_zero(), mlib_one();
00058 OPTICAL_EXPORT extern void      mlib_void();
00059 
00060 
00061 
00062 OPTICAL_EXPORT extern int
00063 rr_render(register struct application *ap,
00064           struct partition      *pp,
00065           struct shadework      *swp);
00066 
00067 
00068 OPTICAL_EXPORT extern void
00069 shade_inputs(struct application         *ap,
00070              const struct partition     *pp,
00071              struct shadework           *swp,
00072              int                        want);
00073 
00074 
00075 OPTICAL_EXPORT extern void
00076 wray(register struct partition *pp,
00077      register struct application *ap,
00078      FILE *fp,
00079      const vect_t       inormal);
00080 
00081 OPTICAL_EXPORT extern void
00082 wraypts(vect_t  in,
00083         vect_t  inorm,
00084         vect_t  out,
00085         int             id,
00086         struct application *ap,
00087         FILE    *fp);
00088 
00089 OPTICAL_EXPORT extern
00090 void wraypaint(vect_t start,
00091                vect_t norm,
00092                int paint,
00093                struct application *ap,
00094                FILE *fp);
00095 
00096 
00097 OPTICAL_EXPORT extern int
00098 viewshade(struct application *ap,
00099           register const struct partition *pp,
00100           register struct shadework *swp);
00101 
00102 
00103 OPTICAL_EXPORT extern int       rdebug;
00104 
00105 
00106 
00107 
00108 #ifdef NO_DEBUG_CHECKING
00109 #       define  R_DEBUG 0
00110 #else
00111 #       define  R_DEBUG rdebug
00112 #endif
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 #define RDEBUG_HITS     0x00000001      
00133 #define RDEBUG_MATERIAL 0x00000002      
00134 #define RDEBUG_SHOWERR  0x00000004      
00135 #define RDEBUG_RTMEM    0x00000008      
00136 #define RDEBUG_SHADE    0x00000010      
00137 #define RDEBUG_PARSE    0x00000020      
00138 #define RDEBUG_LIGHT    0x00000040      
00139 #define RDEBUG_REFRACT  0x00000080      
00140 
00141 #define RDEBUG_STATS    0x00000200      
00142 #define RDEBUG_RTMEM_END 0x00000400     
00143 
00144 
00145 #define RDEBUG_MISSPLOT 0x20000000      
00146 #define RDEBUG_RAYWRITE 0x40000000      
00147 #define RDEBUG_RAYPLOT  0x80000000      
00148 
00149 
00150 #define RDEBUG_FORMAT   \
00151 "\020\040RAYPLOT\037RAYWRITE\036MISSPLOT\
00152 \013RTMEM_END\
00153 \012STATS\010REFRACT\
00154 \7LIGHT\6PARSE\5SHADE\4RTMEM\3SHOWERR\2MATERIAL\1HITS"
00155 
00156 
00157 
00158 
00159 
00160 
00161 
00162 OPTICAL_EXPORT extern int       rt_verbosity;
00163 
00164 #define VERBOSE_LIBVERSIONS  0x00000001 
00165 #define VERBOSE_MODELTITLE   0x00000002 
00166 #define VERBOSE_TOLERANCE    0x00000004 
00167 #define VERBOSE_STATS        0x00000008 
00168 #define VERBOSE_FRAMENUMBER  0x00000010 
00169 #define VERBOSE_VIEWDETAIL   0x00000020 
00170 #define VERBOSE_LIGHTINFO    0x00000040 
00171 #define VERBOSE_INCREMENTAL  0x00000080 
00172 #define VERBOSE_MULTICPU     0x00000100 
00173 #define VERBOSE_OUTPUTFILE   0x00000200 
00174 
00175 #define VERBOSE_FORMAT \
00176 "\012OUTPUTFILE\011MULTICPU\010INCREMENTAL\7LIGHTINFO\6VIEWDETAIL\
00177 \5FRAMENUMBER\4STATS\3TOLERANCE\2MODELTITLE\1LIBVERSIONS"
00178 
00179 OPTICAL_EXPORT extern double AmbientIntensity;
00180 #ifdef RT_MULTISPECTRAL
00181 OPTICAL_EXPORT extern struct bn_tabdata *background;
00182 #else
00183 OPTICAL_EXPORT extern vect_t background;
00184 #endif
00185 
00186 #if 0
00187 OPTICAL_EXPORT
00188 OPTICAL_EXPORT extern
00189 #endif
00190 
00191 OPTICAL_EXPORT extern struct region env_region; 
00192 
00193 
00194 OPTICAL_EXPORT extern int max_bounces;
00195 OPTICAL_EXPORT extern int max_ireflect;
00196 
00197 
00198 OPTICAL_EXPORT extern const char liboptical_version[];
00199 
00200 struct floatpixel {
00201         double  ff_dist;                
00202         float   ff_hitpt[3];
00203         struct region *ff_regp;
00204         int     ff_frame;               
00205         short   ff_x;                   
00206         short   ff_y;
00207         char    ff_color[3];
00208 };
00209 
00210 __END_DECLS
00211 
00212 #endif 
00213 
00214 
00215 
00216 
00217 
00218 
00219 
00220 
00221 
00222 
00223