cgv
cgv::media::illum::light_source Class Reference

>simple class to hold the properties of a light source More...

#include <light_source.hh>

Public Types

typedef color< float, RGB > rgb
 >used color type
 
typedef cgv::math::fvec< float, 3 > vec3
 >type of vector used for directions
 

Public Member Functions

 light_source (LightType _t=LT_DIRECTIONAL)
 init with default values
 
void set_type (LightType t)
 

Protected Attributes

LightType type
 >type of light source
 
bool local_to_eye_coordinates
 >whether location is relative to eye coordinate system, i.e. model view is identity
 
vec3 position
 > direction to light source for directional light sources and location of light source for point or spot light sources
 
rgb emission
 > radiance for directional light sources and intensity for point light sources
 
float ambient_scale
 > scale to use on emission to retrieve ambient illumination caused by light source
 
float constant_attenuation
 >constant attenuation coefficients used for positional light sources only
 
float linear_attenuation
 >linear attenuation coefficients used for positional light sources only
 
float quadratic_attenuation
 >quadratic attenuation coefficients used for positional light sources only
 
vec3 spot_direction
 >direction of spot light
 
float spot_exponent
 >spot exponent
 
float spot_cutoff
 >spot cutoff in degrees
 

Detailed Description

>simple class to hold the properties of a light source

Member Function Documentation

◆ set_type()

void cgv::media::illum::light_source::set_type ( LightType  t)
inline

name getter and setters for members


The documentation for this class was generated from the following files: