| 186 | |
| 187 | }; |
| 188 | struct matLightDef |
| 189 | { |
| 190 | bool isTransparent; |
| 191 | rgbf transparency; |
| 192 | bool isEmiting; |
| 193 | bool flicker; |
| 194 | rgbf emitColor; |
| 195 | int radius; |
| 196 | matLightDef():isTransparent(false),transparency(0,0,0),isEmiting(false),emitColor(0,0,0),radius(0){} |
| 197 | matLightDef(rgbf transparency,rgbf emit,int rad):isTransparent(true),transparency(transparency), |
| 198 | isEmiting(true),emitColor(emit),radius(rad){} |
| 199 | matLightDef(rgbf emit,int rad):isTransparent(false),transparency(0,0,0),isEmiting(true),emitColor(emit),radius(rad){} |
| 200 | matLightDef(rgbf transparency):isTransparent(true),transparency(transparency),isEmiting(false){} |
| 201 | lightSource makeSource(float size=1) const |
| 202 | { |
| 203 | if(size>0.999 && size<1.001) |
| 204 | return lightSource(emitColor,radius); |
| 205 | else |
| 206 | return lightSource(emitColor*size,radius*size);//todo check if this is sane |
| 207 | } |
| 208 | }; |
| 209 | struct buildingLightDef |
| 210 | { |
| 211 | matLightDef light; |