class methods
- ofMaterial()
- ~ofMaterial()
- begin()
- end()
- getAmbientColor()
- getDiffuseColor()
- getEmissiveColor()
- getSettings()
- getShininess()
- getSpecularColor()
- setAmbientColor()
- setColors()
- setCustomUniform1f()
- setCustomUniform1i()
- setCustomUniform2f()
- setCustomUniform2i()
- setCustomUniform3f()
- setCustomUniform3i()
- setCustomUniform4f()
- setCustomUniform4i()
- setCustomUniformMatrix3f()
- setCustomUniformMatrix4f()
- setCustomUniformTexture()
- setDiffuseColor()
- setEmissiveColor()
- setShininess()
- setSpecularColor()
- setup()
Extends
This class extends others, you can call their methods on an instance of ofMaterial too:
Documentation from code comments
material parameter properties that can be applied to vertices in the OpenGL lighting model used in determining both the intensity and color of reflected light based on the lighting model in use and if the vertices are on a front or back sided face
setAmbientColor(...)
void ofMaterial::setAmbientColor(ofFloatColor oAmbient)
Documentation from code comments
set the ambient reflectance
Parameters:
oAmbient the ambient reflectance
setColors(...)
void ofMaterial::setColors(ofFloatColor oDiffuse, ofFloatColor oAmbient, ofFloatColor oSpecular, ofFloatColor emissive)
Documentation from code comments
set all material colors: reflectance type & light intensity
Parameters:
oDiffuse the diffuse reflectance
oAmbient the ambient reflectance
oSpecular the specular reflectance
oEmmissive the emitted light intensity
setCustomUniform2i(...)
void ofMaterial::setCustomUniform2i(const string &name, glm::tvec2< int, glm::precision::defaultp > value=defaultp)
setCustomUniform3i(...)
void ofMaterial::setCustomUniform3i(const string &name, glm::tvec3< int, glm::precision::defaultp > value=defaultp)
setCustomUniform4i(...)
void ofMaterial::setCustomUniform4i(const string &name, glm::tvec4< int, glm::precision::defaultp > value=defaultp)
setCustomUniformMatrix3f(...)
void ofMaterial::setCustomUniformMatrix3f(const string &name, glm::mat3 value)
setCustomUniformMatrix4f(...)
void ofMaterial::setCustomUniformMatrix4f(const string &name, glm::mat4 value)
setCustomUniformTexture(...)
void ofMaterial::setCustomUniformTexture(const string &name, const ofTexture &value, int textureLocation)
setCustomUniformTexture(...)
void ofMaterial::setCustomUniformTexture(const string &name, int textureTarget, GLint textureID, int textureLocation)
setDiffuseColor(...)
void ofMaterial::setDiffuseColor(ofFloatColor oDiffuse)
Documentation from code comments
set the diffuse reflectance
Parameters:
oDiffuse the diffuse reflectance
setEmissiveColor(...)
void ofMaterial::setEmissiveColor(ofFloatColor oEmmisive)
Documentation from code comments
set the emitted light intensity
Parameters:
oEmmissive the emitted light intensity
setShininess(...)
void ofMaterial::setShininess(float nShininess)
Documentation from code comments
set the specular exponent
setSpecularColor(...)
void ofMaterial::setSpecularColor(ofFloatColor oSpecular)
Documentation from code comments
set the specular reflectance
Parameters:
oSpecular the specular reflectance
setup(...)
void ofMaterial::setup(const ofMaterialSettings &settings)
Documentation from code comments
setup using settings struct
Parameters:
settings color & other properties struct
Last updated Tuesday, 19 November 2024 17:25:18 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue