3 #include <cgv/math/fvec.h>
4 #include <cgv/media/color.h>
13 enum LightType { LT_DIRECTIONAL, LT_POINT, LT_SPOT };
51 void set_type(LightType t) { type = t; }
54 LightType get_type()
const {
return type; }
56 LightType& ref_type() {
return type; }
59 void set_local_to_eye(
bool l) { local_to_eye_coordinates = l; }
61 bool is_local_to_eye()
const {
return local_to_eye_coordinates; }
63 bool& ref_local_to_eye() {
return local_to_eye_coordinates; }
66 void set_position(
const vec3& loc) { position = loc; }
68 const vec3& get_position()
const {
return position; }
70 vec3& ref_position() {
return position; }
73 void set_emission(
const rgb& c) { emission = c; }
75 const rgb& get_emission()
const {
return emission; }
77 rgb& ref_emission() {
return emission; }
80 void set_ambient_scale(
float c) { ambient_scale = c; }
82 float get_ambient_scale()
const {
return ambient_scale; }
84 float& ref_ambient_scale() {
return ambient_scale; }
87 void set_constant_attenuation(
float c) { constant_attenuation = c; }
89 float get_constant_attenuation()
const {
return constant_attenuation; }
91 float& ref_constant_attenuation() {
return constant_attenuation; }
94 void set_linear_attenuation(
float c) { linear_attenuation = c; }
96 float get_linear_attenuation()
const {
return linear_attenuation; }
98 float& ref_linear_attenuation() {
return linear_attenuation; }
101 void set_quadratic_attenuation(
float c) { quadratic_attenuation = c; }
103 float get_quadratic_attenuation()
const {
return quadratic_attenuation; }
105 float& ref_quadratic_attenuation() {
return quadratic_attenuation; }
108 void set_spot_direction(
const vec3& d) { spot_direction = d; }
110 const vec3& get_spot_direction()
const {
return spot_direction; }
112 vec3& ref_spot_direction() {
return spot_direction; }
115 void set_spot_exponent(
float e) { spot_exponent = e; }
117 float get_spot_exponent()
const {
return spot_exponent; }
119 float& ref_spot_exponent() {
return spot_exponent; }
122 void set_spot_cutoff(
float c) { spot_cutoff = c; }
124 float get_spot_cutoff()
const {
return spot_cutoff; }
126 float& ref_spot_cutoff() {
return spot_cutoff; }
134 #include <cgv/type/info/type_name.h>
141 struct type_name<
cgv::media::illum::light_source>
143 static const char*
get_name() {
return "light_source"; }
150 #include <cgv/config/lib_end.h>
static const char * get_name()
return special name for standard types or type name from RTTI cleaned from keywords for all other typ...
Definition: type_name.h:56
the cgv namespace
Definition: vr_calib.cxx:9