![]() |
CUGL 3.0
Cornell University Game Library
|
#include <CUMaterial.h>
Public Member Functions | |
MaterialInfo () | |
Public Attributes | |
std::string | name |
GLuint | illum |
float | Ns |
Color4f | Ka |
Color4f | Kd |
Color4f | Ks |
std::shared_ptr< TextureInfo > | map_Ka |
std::shared_ptr< TextureInfo > | map_Kd |
std::shared_ptr< TextureInfo > | map_Ks |
std::shared_ptr< TextureInfo > | map_Kn |
This class represents the attributes of a MTL material.
Our Material objects currently include support for illums 0-2 (using standard phong shading). We allow texture maps for ambient, diffuse, and specular color. However, the shininess value is only a scalar; we do not support texture maps for the specular exponent.
We do not support reflection, transparency, or emission. We also do not support dissolve effects or decals. If you need more complicated MTL support, you should use a third party rendering library.
With that said, this class does provide support for simple bump mapping. The bump texture should be an RGB image encoding the normals in tangent space.
|
inline |
Creates a default MaterialInfo.
By default, materials support diffuse only shading (no ambient or specular).
GLuint cugl::scene3::MaterialInfo::illum |
The illumination setting
Color4f cugl::scene3::MaterialInfo::Ka |
The color of the ambient reflectivity
Color4f cugl::scene3::MaterialInfo::Kd |
The color of the diffuse reflectivity
Color4f cugl::scene3::MaterialInfo::Ks |
The color of the specular reflectivity
std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Ka |
The texture map for the ambient colors
std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Kd |
The texture map for the diffuse colors
std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Kn |
The texture map for the per pixel normals
std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Ks |
The texture map for the specular colors
std::string cugl::scene3::MaterialInfo::name |
The material name
float cugl::scene3::MaterialInfo::Ns |
The specular exponent (shininess)