Style nits on Light

This commit is contained in:
Zach Pomerantz 2016-02-11 08:28:17 -08:00
parent 399861087d
commit 84f810bdc0
3 changed files with 5 additions and 9 deletions

View file

@ -12,11 +12,7 @@
using namespace model;
Light::Light() :
_flags(0),
_schemaBuffer(),
_transform(),
_maximumRadius(1.0f) {
Light::Light() {
// only if created from nothing shall we create the Buffer to store the properties
Schema schema;
_schemaBuffer = std::make_shared<gpu::Buffer>(sizeof(Schema), (const gpu::Byte*) &schema);
@ -27,7 +23,7 @@ Light::Light(const Light& light) :
_flags(light._flags),
_schemaBuffer(light._schemaBuffer),
_transform(light._transform),
_maximumRadius(1.0f) {
_maximumRadius(light._maximumRadius) {
}
Light& Light::operator= (const Light& light) {

View file

@ -127,11 +127,11 @@ public:
protected:
Flags _flags;
Flags _flags{ 0 };
UniformBufferView _schemaBuffer;
Transform _transform;
gpu::SphericalHarmonics _ambientSphere;
float _maximumRadius;
float _maximumRadius{ 1.0f };
const Schema& getSchema() const { return _schemaBuffer.get<Schema>(); }
Schema& editSchema() { return _schemaBuffer.edit<Schema>(); }

View file

@ -29,7 +29,7 @@ vec3 getLightColor(Light l) { return l._color.rgb; }
float getLightIntensity(Light l) { return l._color.w; }
float getLightAmbientIntensity(Light l) { return l._direction.w; }
float getLightSpotAngleCos(Light l) {
float getLightSpotAngleCos(Light l) {
return l._spot.x;
}