class methods
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
begin()
void ofBaseMaterial::begin()
Documentation from code comments
begin using this material's properties
end()
void ofBaseMaterial::end()
Documentation from code comments
end using this material's properties
getAmbientColor()
ofFloatColor ofBaseMaterial::getAmbientColor()
Documentation from code comments
\return the ambient reflectance
getDiffuseColor()
ofFloatColor ofBaseMaterial::getDiffuseColor()
Documentation from code comments
\return the diffuse reflectance
getEmissiveColor()
ofFloatColor ofBaseMaterial::getEmissiveColor()
Documentation from code comments
\return the emitted light intensity
getShader(...)
const ofShader & ofBaseMaterial::getShader(int textureTarget, bool geometryHasColor, ofGLProgrammableRenderer &renderer)
Documentation from code comments
create and return a shader used to implement the materials effect for a given renderer
Parameters:
textureTarget an implementation-specific value to specify the type of shader to use
renderer programmable renderer instance to create the material shader for
getShininess()
float ofBaseMaterial::getShininess()
Documentation from code comments
\return the specular exponent
getSpecularColor()
ofFloatColor ofBaseMaterial::getSpecularColor()
Documentation from code comments
\return the specular reflectance
updateLights(...)
void ofBaseMaterial::updateLights(const ofShader &shader, ofGLProgrammableRenderer &renderer)
Documentation from code comments
update the given renderer's lights to the material shader
Parameters:
shader the material shader, created by getShader()
renderer programmable renderer instance that uses the material shader
updateMaterial(...)
void ofBaseMaterial::updateMaterial(const ofShader &shader, ofGLProgrammableRenderer &renderer)
Documentation from code comments
update the material properties to the material shader
Parameters:
shader the material shader, created by getShader()
renderer programmable renderer instance that uses the material shader
uploadMatrices(...)
void ofBaseMaterial::uploadMatrices(const ofShader &shader, ofGLProgrammableRenderer &renderer)
Documentation from code comments
upload the given renderer's normal matrix to the material shader
Parameters:
shader the material shader, created by getShader()
renderer programmable renderer instance that uses the material shader
Last updated 星期六, 17 八月 2024 20:47:02 UTC - 99bfb4fd7929e233b87b05758efc36f91505592e
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