Light has a shared_ptr type, and an overridable Contribution()
This commit is contained in:
parent
acdfb0fb60
commit
3c3e707922
1 changed files with 5 additions and 1 deletions
|
@ -6,6 +6,8 @@
|
||||||
#ifndef __LIGHT_H__
|
#ifndef __LIGHT_H__
|
||||||
#define __LIGHT_H__
|
#define __LIGHT_H__
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "basics/basics.hh"
|
#include "basics/basics.hh"
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +15,8 @@ namespace charles {
|
||||||
|
|
||||||
struct Light
|
struct Light
|
||||||
{
|
{
|
||||||
|
typedef std::shared_ptr<Light> Ptr;
|
||||||
|
|
||||||
Light(const basics::Color& color,
|
Light(const basics::Color& color,
|
||||||
const Double& intensity = 1.0);
|
const Double& intensity = 1.0);
|
||||||
|
|
||||||
|
@ -23,7 +27,7 @@ struct Light
|
||||||
Double GetIntensity() const;
|
Double GetIntensity() const;
|
||||||
void SetIntensity(const Double& intensity);
|
void SetIntensity(const Double& intensity);
|
||||||
|
|
||||||
basics::Color&& Contribution() const;
|
virtual basics::Color&& Contribution() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Double ClampIntensity(const Double& intensity);
|
Double ClampIntensity(const Double& intensity);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue