goat3dgfx

diff src/light.h @ 30:07c08d970cb4

added a rudimentary light class
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Mar 2014 03:56:47 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/light.h	Sun Mar 02 03:56:47 2014 +0200
     1.3 @@ -0,0 +1,30 @@
     1.4 +#ifndef GOATGFX_LIGHT_H_
     1.5 +#define GOATGFX_LIGHT_H_
     1.6 +
     1.7 +#include "xform_node.h"
     1.8 +
     1.9 +namespace goatgfx {
    1.10 +
    1.11 +class Light : public XFormNode {
    1.12 +private:
    1.13 +	Vector3 color;
    1.14 +	Vector3 attenuation;
    1.15 +
    1.16 +	bool cast_shadows;
    1.17 +
    1.18 +public:
    1.19 +	Light();
    1.20 +
    1.21 +	void set_color(const Vector3 &color);
    1.22 +	const Vector3 &get_color() const;
    1.23 +
    1.24 +	void set_attenuation(const Vector3 &att);
    1.25 +	const Vector3 &get_attenuation() const;
    1.26 +
    1.27 +	void set_shadow_caster(bool s);
    1.28 +	bool is_shadow_caster() const;
    1.29 +};
    1.30 +
    1.31 +}	// namespace goatgfx
    1.32 +
    1.33 +#endif	// GOATGFX_LIGHT_H_