1 #ifndef __GNUC__ 2 #pragma once 3 #endif 4 #ifndef __XR_D3D_LIGHT_H__ 5 #define __XR_D3D_LIGHT_H__ 6 7 #include "xr_vector3.h" 8 #include "xr_color.h" 9 10 namespace xray_re { 11 12 // common definitions (D3D actually) 13 enum { 14 D3D_LIGHT_POINT = 1, 15 D3D_LIGHT_SPOT = 2, 16 D3D_LIGHT_DIRECTIONAL = 3, 17 }; 18 19 enum { 20 LT_DIRECT = 0, 21 LT_POINT = 1, 22 LT_SPOT = 2, 23 LT_OMNIPART = 3, 24 LT_REFLECTED = 4, 25 }; 26 27 class xr_reader; 28 class xr_writer; 29 30 struct d3d_light { 31 void load(xr_reader& r); 32 void save(xr_writer& w) const; 33 34 uint32_t type; 35 fcolor diffuse; 36 fcolor specular; 37 fcolor ambient; 38 fvector3 position; 39 fvector3 direction; 40 float range; 41 float falloff; 42 float attenuation0; 43 float attenuation1; 44 float attenuation2; 45 float theta; 46 float phi; 47 }; 48 49 } // end of namespace xray_re 50 51 #endif 52