App::Material Class Reference

Material class. More...

#include <Material.h>

Public Types

enum  MaterialType {
  BRASS , BRONZE , COPPER , GOLD ,
  PEWTER , PLASTER , PLASTIC , SILVER ,
  STEEL , STONE , SHINY_PLASTIC , SATIN ,
  METALIZED , NEON_GNC , CHROME , ALUMINIUM ,
  OBSIDIAN , NEON_PHC , JADE , RUBY ,
  EMERALD , DEFAULT , USER_DEFINED
}
 

Public Member Functions

Constructors
 Material ()
 Sets the USER_DEFINED material type. More...
 
 Material (const char *MatName)
 Defines the colors and shininess for the material MatName. More...
 
 Material (const MaterialType MatType)
 Does basically the same as the constructor above unless that it accepts a MaterialType as argument. More...
 
 ~Material ()
 
void set (const char *MatName)
 Set a material by name There are some standard materials defined which are: More...
 
void setType (const MaterialType MatType)
 This method is provided for convenience which does basically the same as the method above unless that it accepts a MaterialType as argument. More...
 
MaterialType getType () const
 Returns the currently set material type. More...
 

Properties

Color ambientColor
 Defines the ambient color. More...
 
Color diffuseColor
 Defines the diffuse color. More...
 
Color specularColor
 Defines the specular color. More...
 
Color emissiveColor
 Defines the emissive color. More...
 
float shininess
 
float transparency
 
bool operator== (const Material &m) const
 
bool operator!= (const Material &m) const
 

Detailed Description

Material class.

Member Enumeration Documentation

◆ MaterialType

Enumerator
BRASS 
BRONZE 
COPPER 
GOLD 
PEWTER 
PLASTER 
PLASTIC 
SILVER 
STEEL 
STONE 
SHINY_PLASTIC 
SATIN 
METALIZED 
NEON_GNC 
CHROME 
ALUMINIUM 
OBSIDIAN 
NEON_PHC 
JADE 
RUBY 
EMERALD 
DEFAULT 
USER_DEFINED 

Constructor & Destructor Documentation

◆ Material() [1/3]

App::Material::Material ( )

Sets the USER_DEFINED material type.

The user must set the colors afterwards.

◆ Material() [2/3]

App::Material::Material ( const char *  MatName)

Defines the colors and shininess for the material MatName.

If MatName isn't defined then USER_DEFINED is set and the user must define the colors itself.

◆ Material() [3/3]

App::Material::Material ( const MaterialType  MatType)

Does basically the same as the constructor above unless that it accepts a MaterialType as argument.

◆ ~Material()

App::Material::~Material ( )

Member Function Documentation

◆ getType()

MaterialType App::Material::getType ( ) const

◆ operator!=()

bool App::Material::operator!= ( const Material m) const

◆ operator==()

bool App::Material::operator== ( const Material m) const

◆ set()

void App::Material::set ( const char *  MatName)

Set a material by name There are some standard materials defined which are:

  • Brass
  • Bronze
  • Copper
  • Gold
  • Pewter
  • Plaster
  • Plastic
  • Silver
  • Steel
  • Stone
  • Shiny plastic
  • Satin
  • Metalized
  • Neon GNC
  • Chrome
  • Aluminium
  • Obsidian
  • Neon PHC
  • Jade
  • Ruby
  • Emerald Furthermore there two additional modes Default which defines a kind of grey metallic and user defined that does nothing. The Color and the other properties of the material are defined in the range [0-1]. If MatName is an unknown material name then the type USER_DEFINED is set and the material doesn't get changed.

Referenced by draftguitools.gui_trackers.editTracker::move().

◆ setType()

void App::Material::setType ( const MaterialType  MatType)

This method is provided for convenience which does basically the same as the method above unless that it accepts a MaterialType as argument.

Member Data Documentation

◆ ambientColor

◆ diffuseColor

◆ emissiveColor

◆ shininess

◆ specularColor

◆ transparency


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