CUGL 3.0
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cugl::scene3::MaterialInfo Class Reference

#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< TextureInfomap_Ka
 
std::shared_ptr< TextureInfomap_Kd
 
std::shared_ptr< TextureInfomap_Ks
 
std::shared_ptr< TextureInfomap_Kn
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MaterialInfo()

cugl::scene3::MaterialInfo::MaterialInfo ( )
inline

Creates a default MaterialInfo.

By default, materials support diffuse only shading (no ambient or specular).

Member Data Documentation

◆ illum

GLuint cugl::scene3::MaterialInfo::illum

The illumination setting

◆ Ka

Color4f cugl::scene3::MaterialInfo::Ka

The color of the ambient reflectivity

◆ Kd

Color4f cugl::scene3::MaterialInfo::Kd

The color of the diffuse reflectivity

◆ Ks

Color4f cugl::scene3::MaterialInfo::Ks

The color of the specular reflectivity

◆ map_Ka

std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Ka

The texture map for the ambient colors

◆ map_Kd

std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Kd

The texture map for the diffuse colors

◆ map_Kn

std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Kn

The texture map for the per pixel normals

◆ map_Ks

std::shared_ptr<TextureInfo> cugl::scene3::MaterialInfo::map_Ks

The texture map for the specular colors

◆ name

std::string cugl::scene3::MaterialInfo::name

The material name

◆ Ns

float cugl::scene3::MaterialInfo::Ns

The specular exponent (shininess)


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