53 void setSpotlight(
float spotCutOff=45.f,
float exponent=0.f );
62 void setAttenuation(
float constant=1.f,
float linear=0.f,
float quadratic=0.f );
126 std::shared_ptr<Data> data;
129 virtual void onPositionChanged();
130 virtual void onOrientationChanged();
134std::vector<std::weak_ptr<ofLight::Data> > &
ofLightsData();
Definition ofGLBaseTypes.h:95
The base renderer interface.
Definition ofGraphicsBaseTypes.h:279
ofColor represents a color in openFrameworks.
Definition ofColor.h:20
int isEnabled
Definition ofLight.h:107
float width
Definition ofLight.h:113
ofFloatColor ambientColor
Definition ofLight.h:96
glm::vec3 right
Definition ofLight.h:116
~Data()
Definition ofLight.cpp:84
glm::vec3 direction
Definition ofLight.h:111
ofFloatColor diffuseColor
Definition ofLight.h:97
Data()
Definition ofLight.cpp:71
ofFloatColor specularColor
Definition ofLight.h:98
std::weak_ptr< ofBaseGLRenderer > rendererP
weak link back to renderer for which this light was created/setup
Definition ofLight.h:118
glm::vec3 up
Definition ofLight.h:115
float height
Definition ofLight.h:114
ofLightType lightType
Definition ofLight.h:104
float attenuation_quadratic
Definition ofLight.h:102
float exponent
Definition ofLight.h:109
float spotCutOff
Definition ofLight.h:108
int glIndex
Definition ofLight.h:106
float attenuation_linear
Definition ofLight.h:101
glm::vec4 position
Definition ofLight.h:110
float attenuation_constant
Definition ofLight.h:100
bool getIsPointLight() const
Definition ofLight.cpp:254
float getAttenuationQuadratic() const
Definition ofLight.cpp:280
bool getIsDirectional() const
Definition ofLight.cpp:188
void enable()
Definition ofLight.cpp:149
ofFloatColor getAmbientColor() const
Definition ofLight.cpp:332
void setup()
Definition ofLight.cpp:108
int getType() const
Definition ofLight.cpp:302
ofFloatColor getDiffuseColor() const
Definition ofLight.cpp:337
bool getIsAreaLight() const
Definition ofLight.cpp:297
ofShadow & getShadow()
Definition ofLight.h:89
void disable()
Definition ofLight.cpp:160
void setDiffuseColor(const ofFloatColor &c)
Definition ofLight.cpp:315
ofLight()
Definition ofLight.cpp:96
void setSpecularColor(const ofFloatColor &c)
Definition ofLight.cpp:324
ofShadow shadow
Definition ofLight.h:122
void setAttenuation(float constant=1.f, float linear=0.f, float quadratic=0.f)
Definition ofLight.cpp:259
bool endShadowDepthPass()
Definition ofLight.cpp:439
ofFloatColor getSpecularColor() const
Definition ofLight.cpp:342
void setSpotlight(float spotCutOff=45.f, float exponent=0.f)
Definition ofLight.cpp:193
void setSpotConcentration(float exponent)
Definition ofLight.cpp:227
int getLightID() const
Definition ofLight.cpp:168
void setAreaLight(float width, float height)
Definition ofLight.cpp:284
float getSpotConcentration() const
Definition ofLight.cpp:235
void setDirectional()
Definition ofLight.cpp:178
void setSpotlightCutOff(float spotCutOff)
Definition ofLight.cpp:211
bool getIsSpotlight() const
Definition ofLight.cpp:206
float getAttenuationLinear() const
Definition ofLight.cpp:275
float getSpotlightCutOff() const
Definition ofLight.cpp:219
bool shouldRenderShadowDepthPass()
Definition ofLight.cpp:409
void setPointLight()
Definition ofLight.cpp:243
float getAttenuationConstant() const
Definition ofLight.cpp:270
bool getIsEnabled() const
Definition ofLight.cpp:173
void setAmbientColor(const ofFloatColor &c)
Definition ofLight.cpp:307
int getNumShadowDepthPasses()
Definition ofLight.cpp:417
bool beginShadowDepthPass()
Definition ofLight.cpp:425
A generic 3d object in space with transformation (position, rotation, scale).
Definition ofNode.h:14
virtual void customDraw()
If you extend ofNode and wish to change the way it draws, extend this.
Definition ofNode.cpp:651
unsigned int height
Definition ofAppEGLWindow.cpp:125
unsigned int width
Definition ofAppEGLWindow.cpp:124
void ofDisableSeparateSpecularLight()
Definition ofLight.cpp:41
ofColor_< unsigned short > ofShortColor
A typedef representing a 16-bit (unsigned short) RGBA color.
Definition ofLight.h:19
const ofFloatColor & ofGetGlobalAmbientColor()
Definition ofLight.cpp:61
std::vector< std::weak_ptr< ofLight::Data > > & ofLightsData()
Definition ofLight.cpp:66
void ofDisableLighting()
Definition ofLight.cpp:31
void ofEnableLighting()
Definition ofLight.cpp:26
void ofEnableSeparateSpecularLight()
Definition ofLight.cpp:36
void ofSetSmoothLighting(bool b)
Definition ofLight.cpp:51
ofLightType
Definition ofLight.h:23
@ OF_LIGHT_AREA
Definition ofLight.h:27
@ OF_LIGHT_POINT
Definition ofLight.h:24
@ OF_LIGHT_SPOT
Definition ofLight.h:26
@ OF_LIGHT_DIRECTIONAL
Definition ofLight.h:25
void ofSetGlobalAmbientColor(const ofFloatColor &c)
Definition ofLight.cpp:56
ofColor_< float > ofFloatColor
A typedef representing a floating (float) point RGBA color.
Definition ofLight.h:18
ofColor_< unsigned char > ofColor
A typedef representing an 8-bit (unsigned char) RGBA color.
Definition ofLight.h:17
bool ofGetLightingEnabled()
Definition ofLight.cpp:46