blob: 65b742950f3379630fd3748d51429b73d17bf952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "StarLightSource.hpp"
#include "StarDataStreamExtra.hpp"
namespace Star {
void LightSource::translate(Vec2F const& pos) {
position += pos;
}
DataStream& operator<<(DataStream& ds, LightSource const& lightSource) {
ds.write(lightSource.position);
ds.write(lightSource.color);
ds.write(lightSource.pointLight);
ds.write(lightSource.pointBeam);
ds.write(lightSource.beamAngle);
ds.write(lightSource.beamAmbience);
return ds;
}
DataStream& operator>>(DataStream& ds, LightSource& lightSource) {
ds.read(lightSource.position);
ds.read(lightSource.color);
ds.read(lightSource.pointLight);
ds.read(lightSource.pointBeam);
ds.read(lightSource.beamAngle);
ds.read(lightSource.beamAmbience);
return ds;
}
}
|