shadework.h

Go to the documentation of this file.
00001 /*                          S H A D E W O R K . H
00002  * BRL-CAD
00003  *
00004  * Copyright (c) 1993-2006 United States Government as represented by
00005  * the U.S. Army Research Laboratory.
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public License
00009  * as published by the Free Software Foundation; either version 2.1 of
00010  * the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this file; see the file named COPYING for more
00019  * information.
00020  */
00021 /** @addtogroup rt */
00022 /*@{*/
00023 /** @file shadework.h
00024  *
00025  *  @par Source
00026  *      SECAD/VLD Computing Consortium, Bldg 394
00027  *@n    The U. S. Army Ballistic Research Laboratory
00028  *@n    Aberdeen Proving Ground, Maryland  21005
00029  *
00030  *  $Header: /cvsroot/brlcad/brlcad/include/shadework.h,v 14.8 2006/09/18 05:24:07 lbutler Exp $
00031  */
00032 #ifndef SHADEWORK_H
00033 #define SHADEWORK_H
00034 
00035 /* for light_specific */
00036 /* # include "light.h" */
00037 
00038 #define SW_NLIGHTS      16              /* Max # of light sources */
00039 
00040 /*
00041  *                      S H A D E W O R K
00042  */
00043 struct shadework {
00044 /* XXX At least the first three of these need to be spectral curves */
00045         fastf_t         sw_transmit;    /**< @brief  0.0 -> 1.0 */
00046         fastf_t         sw_reflect;     /**< @brief  0.0 -> 1.0 */
00047         fastf_t         sw_extinction;  /**< @brief  extinction coeff, mm^-1 */
00048         fastf_t         sw_refrac_index;
00049         fastf_t         sw_temperature;
00050 #if RT_MULTISPECTRAL
00051         struct bn_tabdata *msw_color;
00052         struct bn_tabdata *msw_basecolor;
00053 #else
00054         fastf_t         sw_color[3];    /**< @brief  shaded color */
00055         fastf_t         sw_basecolor[3]; /**< @brief  base color */
00056 #endif
00057         struct hit      sw_hit;         /**< @brief  ray hit (dist,point,normal) */
00058         struct uvcoord  sw_uv;
00059 #if RT_MULTISPECTRAL
00060         struct bn_tabdata *msw_intensity[SW_NLIGHTS];
00061 #else
00062         fastf_t         sw_intensity[3*SW_NLIGHTS]; /**< @brief  light intensities */
00063 #endif
00064         fastf_t         sw_tolight[3*SW_NLIGHTS];   /**< @brief  light directions */
00065         struct light_specific   *sw_visible[SW_NLIGHTS]; /**< @brief  visibility flags/ptrs */
00066         fastf_t         sw_lightfract[SW_NLIGHTS];/**< @brief  % light visible */
00067         int             sw_xmitonly;    /**< @brief  flag: need sw_transmit only */
00068                                         /**< @brief  sw_xmitonly=1, compute transmission only */
00069                                         /**< @brief  sw_xmitonly=2, want parameters only, not even transmission */
00070         int             sw_inputs;      /**< @brief  fields from mf_inputs actually filled */
00071         int             sw_frame;       /**< @brief  # of current frame */
00072         fastf_t         sw_frametime;   /**< @brief  frame time delta off 1st frame */
00073         fastf_t         sw_pixeltime;   /**< @brief  pixel time delta off 1st pixel of 1st frame */
00074         struct seg      *sw_segs;       /**< @brief  segs which made partition */
00075 /*
00076  * The following is experimental.  DO NOT USE
00077  */
00078 #define SW_SET_TRANSMIT         0x01
00079 #define SW_SET_REFLECT          0x02
00080 #define SW_SET_REFRAC_INDEX     0x04
00081 #define SW_SET_EXTINCTION       0x10
00082 #define SW_SET_AMBIENT          0x20
00083 #define SW_SET_EMISSION         0x40
00084         int             sw_phong_set_vector;
00085         fastf_t         sw_phong_transmit;
00086         fastf_t         sw_phong_reflect;
00087         fastf_t         sw_phong_ri;
00088         fastf_t         sw_phong_extinction;
00089         fastf_t         sw_phong_ambient;
00090         fastf_t         sw_phong_emission;
00091 /*
00092  * End of experimental
00093  */
00094 };
00095 
00096 BU_EXTERN(void          pr_shadework, (const char *str, const struct shadework *swp));
00097 #endif
00098 /*@}*/
00099 /*
00100  * Local Variables:
00101  * mode: C
00102  * tab-width: 8
00103  * c-basic-offset: 4
00104  * indent-tabs-mode: t
00105  * End:
00106  * ex: shiftwidth=4 tabstop=8
00107  */
00108 

Generated on Mon Sep 18 01:24:42 2006 for BRL-CAD by  doxygen 1.4.6