Visualization Library 2.0.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::ObjMaterial Class Reference

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

#include <ioOBJ.hpp>

+ Inheritance diagram for vl::ObjMaterial:

Public Member Functions

 ObjMaterial ()
 
const fvec3ka () const
 Ka - ambient color. More...
 
const fvec3kd () const
 Kd - diffuse color. More...
 
const fvec3ks () const
 Ks - specular color. More...
 
const fvec3ke () const
 Ke - emissive color. More...
 
float tr () const
 Tr/d - transparency. More...
 
float ns () const
 Ns - specular exponent. More...
 
int illum () const
 illum - illumination model More...
 
float ni () const
 Ni - optical density / index of refraction. More...
 
const ObjTexturemap_Kd () const
 map_Kd - ambient diffuse More...
 
const ObjTexturemap_Ka () const
 map_Ka - ambient color map More...
 
const ObjTexturemap_Ks () const
 map_Ks - specular color map More...
 
const ObjTexturemap_Ns () const
 map_Ns - specular exponent map More...
 
const ObjTexturemap_d () const
 map_d - transparency map More...
 
const ObjTexturemap_Decal () const
 decal - decal map More...
 
const ObjTexturemap_Disp () const
 disp - displace map More...
 
const ObjTexturemap_Bump () const
 bump - bump map More...
 
void setKa (const fvec3 &ka)
 Ka - ambient color. More...
 
void setKd (const fvec3 &kd)
 Kd - diffuse color. More...
 
void setKs (const fvec3 &ks)
 Ks - specular color. More...
 
void setKe (const fvec3 &ke)
 Ke - emissive color. More...
 
void setTr (float tr)
 Tr/d - transparency. More...
 
void setNs (float ns)
 Ns - specular exponent. More...
 
void setIllum (int illum)
 illum - illumination model More...
 
void setNi (float ni)
 Ni - optical density / index of refraction. More...
 
void setMap_Kd (const ObjTexture &map_kd)
 map_Kd - ambient diffuse More...
 
void setMap_Ka (const ObjTexture &map_ka)
 map_Ka - ambient color map More...
 
void setMap_Ks (const ObjTexture &map_ks)
 map_Ks - specular color map More...
 
void setMap_Ns (const ObjTexture &map_ns)
 map_Ns - specular exponent map More...
 
void setMap_d (const ObjTexture &map_d)
 map_d - transparency map More...
 
void setMap_Decal (const ObjTexture &map_decal)
 decal - decal map More...
 
void setMap_Disp (const ObjTexture &map_disp)
 disp - displace map More...
 
void setMap_Bump (const ObjTexture &map_bump)
 bump - bump map More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

fvec3 mKa
 Ka - ambient color. More...
 
fvec3 mKd
 Kd - diffuse color. More...
 
fvec3 mKs
 Ks - specular color. More...
 
fvec3 mKe
 Ke - emissive color. More...
 
float mTr
 Tr/d - transparency. More...
 
float mNs
 Ns - specular exponent. More...
 
int mIllum
 illum - illumination model More...
 
float mNi
 Ni - optical density / index of refraction. More...
 
ObjTexture mMap_Kd
 map_Kd - ambient diffuse More...
 
ObjTexture mMap_Ka
 map_Ka - ambient color map More...
 
ObjTexture mMap_Ks
 map_Ks - specular color map More...
 
ObjTexture mMap_Ns
 map_Ns - specular exponent map More...
 
ObjTexture mMap_d
 map_d - transparency map More...
 
ObjTexture mMap_Decal
 decal - decal map More...
 
ObjTexture mMap_Disp
 disp - displace map More...
 
ObjTexture mMap_Bump
 bump - bump map More...
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

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

Definition at line 187 of file ioOBJ.hpp.

Constructor & Destructor Documentation

◆ ObjMaterial()

vl::ObjMaterial::ObjMaterial ( )
inline

Definition at line 192 of file ioOBJ.hpp.

Member Function Documentation

◆ illum()

int vl::ObjMaterial::illum ( ) const
inline

illum - illumination model

Definition at line 207 of file ioOBJ.hpp.

◆ ka()

const fvec3& vl::ObjMaterial::ka ( ) const
inline

Ka - ambient color.

Definition at line 195 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ kd()

const fvec3& vl::ObjMaterial::kd ( ) const
inline

Kd - diffuse color.

Definition at line 197 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ ke()

const fvec3& vl::ObjMaterial::ke ( ) const
inline

Ke - emissive color.

Definition at line 201 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ ks()

const fvec3& vl::ObjMaterial::ks ( ) const
inline

Ks - specular color.

Definition at line 199 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ map_Bump()

const ObjTexture& vl::ObjMaterial::map_Bump ( ) const
inline

bump - bump map

Definition at line 225 of file ioOBJ.hpp.

◆ map_d()

const ObjTexture& vl::ObjMaterial::map_d ( ) const
inline

map_d - transparency map

Definition at line 219 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ map_Decal()

const ObjTexture& vl::ObjMaterial::map_Decal ( ) const
inline

decal - decal map

Definition at line 221 of file ioOBJ.hpp.

◆ map_Disp()

const ObjTexture& vl::ObjMaterial::map_Disp ( ) const
inline

disp - displace map

Definition at line 223 of file ioOBJ.hpp.

◆ map_Ka()

const ObjTexture& vl::ObjMaterial::map_Ka ( ) const
inline

map_Ka - ambient color map

Definition at line 213 of file ioOBJ.hpp.

◆ map_Kd()

const ObjTexture& vl::ObjMaterial::map_Kd ( ) const
inline

map_Kd - ambient diffuse

Definition at line 211 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ map_Ks()

const ObjTexture& vl::ObjMaterial::map_Ks ( ) const
inline

map_Ks - specular color map

Definition at line 215 of file ioOBJ.hpp.

◆ map_Ns()

const ObjTexture& vl::ObjMaterial::map_Ns ( ) const
inline

map_Ns - specular exponent map

Definition at line 217 of file ioOBJ.hpp.

◆ ni()

float vl::ObjMaterial::ni ( ) const
inline

Ni - optical density / index of refraction.

Definition at line 209 of file ioOBJ.hpp.

◆ ns()

float vl::ObjMaterial::ns ( ) const
inline

Ns - specular exponent.

Definition at line 205 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

◆ setIllum()

void vl::ObjMaterial::setIllum ( int  illum)
inline

illum - illumination model

Definition at line 240 of file ioOBJ.hpp.

◆ setKa()

void vl::ObjMaterial::setKa ( const fvec3 ka)
inline

Ka - ambient color.

Definition at line 228 of file ioOBJ.hpp.

◆ setKd()

void vl::ObjMaterial::setKd ( const fvec3 kd)
inline

Kd - diffuse color.

Definition at line 230 of file ioOBJ.hpp.

◆ setKe()

void vl::ObjMaterial::setKe ( const fvec3 ke)
inline

Ke - emissive color.

Definition at line 234 of file ioOBJ.hpp.

◆ setKs()

void vl::ObjMaterial::setKs ( const fvec3 ks)
inline

Ks - specular color.

Definition at line 232 of file ioOBJ.hpp.

◆ setMap_Bump()

void vl::ObjMaterial::setMap_Bump ( const ObjTexture map_bump)
inline

bump - bump map

Definition at line 258 of file ioOBJ.hpp.

◆ setMap_d()

void vl::ObjMaterial::setMap_d ( const ObjTexture map_d)
inline

map_d - transparency map

Definition at line 252 of file ioOBJ.hpp.

◆ setMap_Decal()

void vl::ObjMaterial::setMap_Decal ( const ObjTexture map_decal)
inline

decal - decal map

Definition at line 254 of file ioOBJ.hpp.

◆ setMap_Disp()

void vl::ObjMaterial::setMap_Disp ( const ObjTexture map_disp)
inline

disp - displace map

Definition at line 256 of file ioOBJ.hpp.

◆ setMap_Ka()

void vl::ObjMaterial::setMap_Ka ( const ObjTexture map_ka)
inline

map_Ka - ambient color map

Definition at line 246 of file ioOBJ.hpp.

◆ setMap_Kd()

void vl::ObjMaterial::setMap_Kd ( const ObjTexture map_kd)
inline

map_Kd - ambient diffuse

Definition at line 244 of file ioOBJ.hpp.

◆ setMap_Ks()

void vl::ObjMaterial::setMap_Ks ( const ObjTexture map_ks)
inline

map_Ks - specular color map

Definition at line 248 of file ioOBJ.hpp.

◆ setMap_Ns()

void vl::ObjMaterial::setMap_Ns ( const ObjTexture map_ns)
inline

map_Ns - specular exponent map

Definition at line 250 of file ioOBJ.hpp.

◆ setNi()

void vl::ObjMaterial::setNi ( float  ni)
inline

Ni - optical density / index of refraction.

Definition at line 242 of file ioOBJ.hpp.

◆ setNs()

void vl::ObjMaterial::setNs ( float  ns)
inline

Ns - specular exponent.

Definition at line 238 of file ioOBJ.hpp.

◆ setTr()

void vl::ObjMaterial::setTr ( float  tr)
inline

Tr/d - transparency.

Definition at line 236 of file ioOBJ.hpp.

◆ tr()

float vl::ObjMaterial::tr ( ) const
inline

Tr/d - transparency.

Definition at line 203 of file ioOBJ.hpp.

Referenced by vl::ObjLoader::loadOBJ().

Member Data Documentation

◆ mIllum

int vl::ObjMaterial::mIllum
protected

illum - illumination model

Definition at line 274 of file ioOBJ.hpp.

◆ mKa

fvec3 vl::ObjMaterial::mKa
protected

Ka - ambient color.

Definition at line 262 of file ioOBJ.hpp.

◆ mKd

fvec3 vl::ObjMaterial::mKd
protected

Kd - diffuse color.

Definition at line 264 of file ioOBJ.hpp.

◆ mKe

fvec3 vl::ObjMaterial::mKe
protected

Ke - emissive color.

Definition at line 268 of file ioOBJ.hpp.

◆ mKs

fvec3 vl::ObjMaterial::mKs
protected

Ks - specular color.

Definition at line 266 of file ioOBJ.hpp.

◆ mMap_Bump

ObjTexture vl::ObjMaterial::mMap_Bump
protected

bump - bump map

Definition at line 292 of file ioOBJ.hpp.

◆ mMap_d

ObjTexture vl::ObjMaterial::mMap_d
protected

map_d - transparency map

Definition at line 286 of file ioOBJ.hpp.

◆ mMap_Decal

ObjTexture vl::ObjMaterial::mMap_Decal
protected

decal - decal map

Definition at line 288 of file ioOBJ.hpp.

◆ mMap_Disp

ObjTexture vl::ObjMaterial::mMap_Disp
protected

disp - displace map

Definition at line 290 of file ioOBJ.hpp.

◆ mMap_Ka

ObjTexture vl::ObjMaterial::mMap_Ka
protected

map_Ka - ambient color map

Definition at line 280 of file ioOBJ.hpp.

◆ mMap_Kd

ObjTexture vl::ObjMaterial::mMap_Kd
protected

map_Kd - ambient diffuse

Definition at line 278 of file ioOBJ.hpp.

◆ mMap_Ks

ObjTexture vl::ObjMaterial::mMap_Ks
protected

map_Ks - specular color map

Definition at line 282 of file ioOBJ.hpp.

◆ mMap_Ns

ObjTexture vl::ObjMaterial::mMap_Ns
protected

map_Ns - specular exponent map

Definition at line 284 of file ioOBJ.hpp.

◆ mNi

float vl::ObjMaterial::mNi
protected

Ni - optical density / index of refraction.

Definition at line 276 of file ioOBJ.hpp.

◆ mNs

float vl::ObjMaterial::mNs
protected

Ns - specular exponent.

Definition at line 272 of file ioOBJ.hpp.

◆ mTr

float vl::ObjMaterial::mTr
protected

Tr/d - transparency.

Definition at line 270 of file ioOBJ.hpp.


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