# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::ObjMaterial Class Reference

Represents a Wavefront OBJ material as loaded from an MTL file. See also ObjLoader. More...

`#include <vlOBJ.hpp>`

Inheritance diagram for vl::ObjMaterial:

List of all members.

## Public Member Functions

virtual const char * | className ()
| Returns the name of the class.
| ObjMaterial ()
const fvec3 & | ka () const
| Ka - ambient color.
const fvec3 & | kd () const
| Kd - diffuse color.
const fvec3 & | ks () const
| Ks - specular color.
float | tr () const
| Tr/d - transparency.
float | ns () const
| Ns - specular exponent.
int | illum () const
| illum - illumination model
float | ni () const
| Ni - optical density / index of refraction.
const ObjTexture & | map_Kd () const
| map_Kd - ambient diffuse
const ObjTexture & | map_Ka () const
| map_Ka - ambient color map
const ObjTexture & | map_Ks () const
| map_Ks - specular color map
const ObjTexture & | map_Ns () const
| map_Ns - specular exponent map
const ObjTexture & | map_d () const
| map_d - transparency map
const ObjTexture & | map_Decal () const
| decal - decal map
const ObjTexture & | map_Disp () const
| disp - displace map
const ObjTexture & | map_Bump () const
| bump - bump map
void | setKa (const fvec3 &ka)
| Ka - ambient color.
void | setKd (const fvec3 &kd)
| Kd - diffuse color.
void | setKs (const fvec3 &ks)
| Ks - specular color.
void | setTr (float tr)
| Tr/d - transparency.
void | setNs (float ns)
| Ns - specular exponent.
void | setIllum (int illum)
| illum - illumination model
void | setNi (float ni)
| Ni - optical density / index of refraction.
void | setMap_Kd (const ObjTexture &map_kd)
| map_Kd - ambient diffuse
void | setMap_Ka (const ObjTexture &map_ka)
| map_Ka - ambient color map
void | setMap_Ks (const ObjTexture &map_ks)
| map_Ks - specular color map
void | setMap_Ns (const ObjTexture &map_ns)
| map_Ns - specular exponent map
void | setMap_d (const ObjTexture &map_d)
| map_d - transparency map
void | setMap_Decal (const ObjTexture &map_decal)
| decal - decal map
void | setMap_Disp (const ObjTexture &map_disp)
| disp - displace map
void | setMap_Bump (const ObjTexture &map_bump)
| bump - bump map

## Protected Attributes

fvec3 | mKa
| Ka - ambient color.
fvec3 | mKd
| Kd - diffuse color.
fvec3 | mKs
| Ks - specular color.
float | mTr
| Tr/d - transparency.
float | mNs
| Ns - specular exponent.
int | mIllum
| illum - illumination model
float | mNi
| Ni - optical density / index of refraction.
ObjTexture | mMap_Kd
| map_Kd - ambient diffuse
ObjTexture | mMap_Ka
| map_Ka - ambient color map
ObjTexture | mMap_Ks
| map_Ks - specular color map
ObjTexture | mMap_Ns
| map_Ns - specular exponent map
ObjTexture | mMap_d
| map_d - transparency map
ObjTexture | mMap_Decal
| decal - decal map
ObjTexture | mMap_Disp
| disp - displace map
ObjTexture | mMap_Bump
| bump - bump map

## Detailed Description

Represents a Wavefront OBJ material as loaded from an MTL file. See also ObjLoader.

## Constructor & Destructor Documentation

vl::ObjMaterial::ObjMaterial | ( |  | ) | `[inline]`

## Member Function Documentation

virtual const char* vl::ObjMaterial::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::Object.

const fvec3& vl::ObjMaterial::ka | ( |  | ) | const`[inline]`

Ka - ambient color.

const fvec3& vl::ObjMaterial::kd | ( |  | ) | const`[inline]`

Kd - diffuse color.

const fvec3& vl::ObjMaterial::ks | ( |  | ) | const`[inline]`

Ks - specular color.

float vl::ObjMaterial::tr | ( |  | ) | const`[inline]`

Tr/d - transparency.

float vl::ObjMaterial::ns | ( |  | ) | const`[inline]`

Ns - specular exponent.

int vl::ObjMaterial::illum | ( |  | ) | const`[inline]`

illum - illumination model

float vl::ObjMaterial::ni | ( |  | ) | const`[inline]`

Ni - optical density / index of refraction.

const ObjTexture& vl::ObjMaterial::map_Kd | ( |  | ) | const`[inline]`

map_Kd - ambient diffuse

const ObjTexture& vl::ObjMaterial::map_Ka | ( |  | ) | const`[inline]`

map_Ka - ambient color map

const ObjTexture& vl::ObjMaterial::map_Ks | ( |  | ) | const`[inline]`

map_Ks - specular color map

const ObjTexture& vl::ObjMaterial::map_Ns | ( |  | ) | const`[inline]`

map_Ns - specular exponent map

const ObjTexture& vl::ObjMaterial::map_d | ( |  | ) | const`[inline]`

map_d - transparency map

const ObjTexture& vl::ObjMaterial::map_Decal | ( |  | ) | const`[inline]`

decal - decal map

const ObjTexture& vl::ObjMaterial::map_Disp | ( |  | ) | const`[inline]`

disp - displace map

const ObjTexture& vl::ObjMaterial::map_Bump | ( |  | ) | const`[inline]`

bump - bump map

void vl::ObjMaterial::setKa | ( | const fvec3 & | ka | ) | `[inline]`

Ka - ambient color.

void vl::ObjMaterial::setKd | ( | const fvec3 & | kd | ) | `[inline]`

Kd - diffuse color.

void vl::ObjMaterial::setKs | ( | const fvec3 & | ks | ) | `[inline]`

Ks - specular color.

void vl::ObjMaterial::setTr | ( | float | tr | ) | `[inline]`

Tr/d - transparency.

void vl::ObjMaterial::setNs | ( | float | ns | ) | `[inline]`

Ns - specular exponent.

void vl::ObjMaterial::setIllum | ( | int | illum | ) | `[inline]`

illum - illumination model

void vl::ObjMaterial::setNi | ( | float | ni | ) | `[inline]`

Ni - optical density / index of refraction.

void vl::ObjMaterial::setMap_Kd | ( | const ObjTexture & | map_kd | ) | `[inline]`

map_Kd - ambient diffuse

void vl::ObjMaterial::setMap_Ka | ( | const ObjTexture & | map_ka | ) | `[inline]`

map_Ka - ambient color map

void vl::ObjMaterial::setMap_Ks | ( | const ObjTexture & | map_ks | ) | `[inline]`

map_Ks - specular color map

void vl::ObjMaterial::setMap_Ns | ( | const ObjTexture & | map_ns | ) | `[inline]`

map_Ns - specular exponent map

void vl::ObjMaterial::setMap_d | ( | const ObjTexture & | map_d | ) | `[inline]`

map_d - transparency map

void vl::ObjMaterial::setMap_Decal | ( | const ObjTexture & | map_decal | ) | `[inline]`

decal - decal map

void vl::ObjMaterial::setMap_Disp | ( | const ObjTexture & | map_disp | ) | `[inline]`

disp - displace map

void vl::ObjMaterial::setMap_Bump | ( | const ObjTexture & | map_bump | ) | `[inline]`

bump - bump map

## Member Data Documentation

fvec3 vl::ObjMaterial::mKa`[protected]`

Ka - ambient color.

fvec3 vl::ObjMaterial::mKd`[protected]`

Kd - diffuse color.

fvec3 vl::ObjMaterial::mKs`[protected]`

Ks - specular color.

float vl::ObjMaterial::mTr`[protected]`

Tr/d - transparency.

float vl::ObjMaterial::mNs`[protected]`

Ns - specular exponent.

int vl::ObjMaterial::mIllum`[protected]`

illum - illumination model

float vl::ObjMaterial::mNi`[protected]`

Ni - optical density / index of refraction.

ObjTexture vl::ObjMaterial::mMap_Kd`[protected]`

map_Kd - ambient diffuse

ObjTexture vl::ObjMaterial::mMap_Ka`[protected]`

map_Ka - ambient color map

ObjTexture vl::ObjMaterial::mMap_Ks`[protected]`

map_Ks - specular color map

ObjTexture vl::ObjMaterial::mMap_Ns`[protected]`

map_Ns - specular exponent map

ObjTexture vl::ObjMaterial::mMap_d`[protected]`

map_d - transparency map

ObjTexture vl::ObjMaterial::mMap_Decal`[protected]`

decal - decal map

ObjTexture vl::ObjMaterial::mMap_Disp`[protected]`

disp - displace map

ObjTexture vl::ObjMaterial::mMap_Bump`[protected]`

bump - bump map

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/vlOBJ.hpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:46 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.