mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Style nits on Light
This commit is contained in:
parent
399861087d
commit
84f810bdc0
3 changed files with 5 additions and 9 deletions
|
@ -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) {
|
||||
|
|
|
@ -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>(); }
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue