MorphoGraphX  2.0-1-227
Classes | Public Member Functions | List of all members
mgx::Materials Class Reference

A utility class for materials. More...

#include <Materials.hpp>

+ Inheritance diagram for mgx::Materials:

Classes

struct  Material
 The material data structure. More...
 

Public Member Functions

 Materials (std::string filename)
 
void reread ()
 
void useMaterial (unsigned int index)
 
const MaterialgetMaterial (unsigned int index)
 
void blend (unsigned int ind1, unsigned int ind2, float t)
 

Detailed Description

A utility class for materials.

This class provides an interface for VLAB material files and their use for OpenGL. The material files can contain up to 255 materials. The class allows access to these by an index. If a material index is called that is not in the file, a default material is provided that uses the default values for OpenGL 1.2.

Definition at line 28 of file Materials.hpp.

Constructor & Destructor Documentation

◆ Materials()

mgx::Materials::Materials ( std::string  filename)

Member Function Documentation

◆ blend()

void mgx::Materials::blend ( unsigned int  ind1,
unsigned int  ind2,
float  t 
)

◆ getMaterial()

const Material& mgx::Materials::getMaterial ( unsigned int  index)

◆ reread()

void mgx::Materials::reread ( )

◆ useMaterial()

void mgx::Materials::useMaterial ( unsigned int  index)

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