00001 /* 00002 * $Id: light.h 409 2008-10-20 19:01:03Z kybav1 $ 00003 * 00004 * Description : One line description of file. 00005 * Author : Vaclav Kyba <mail/Jabber: vaseo1@gmail.com> <ICQ: 98576293> 00006 * 00007 * Purpose : 00008 * Long description of what the file is for. 00009 */ 00010 00011 00012 #ifndef __LIGHT__H__ 00013 #define __LIGHT__H__ 00014 00015 #include "common.h" 00016 00017 00018 namespace VRUT 00019 { 00021 struct Light 00022 { 00024 enum LIGHT_TYPE 00025 { 00026 OMNI, 00027 DIRECTIONAL, 00028 SPOTLIGHT, 00029 UNKNOWN 00030 } type; 00032 VECTOR3 position; 00034 VECTOR3 direction; 00036 float angle; 00038 float exponent; 00040 VECTOR4 diffuse; 00041 00043 Light() 00044 { 00045 type = UNKNOWN; 00046 } 00047 00049 wxString ToString() const 00050 { 00051 return wxString::Format(wxT("Light type: %i\nPosition: %s\nDirection: %s\nAngle (spot): %f\nExponent (spot): %f\nDiffuse: %s\n"), 00052 type, position.ToString().c_str(), direction.ToString().c_str(), angle, exponent, diffuse.ToString().c_str()); 00053 } 00055 Light * Clone() const 00056 { 00057 return new Light(*this); 00058 } 00059 }; 00060 }; 00061 00062 #endif