TDME2 1.9.121
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Material Class Referencefinal

Represents a material. More...

#include <tdme/engine/model/Material.h>

Collaboration diagram for Material:
Collaboration graph

Public Member Functions

 Material (const string &id)
 Public constructor. More...
 
 ~Material ()
 Destructor. More...
 
const string & getId () const
 
const SpecularMaterialPropertiesgetSpecularMaterialProperties () const
 
SpecularMaterialPropertiesgetSpecularMaterialProperties ()
 
const PBRMaterialPropertiesgetPBRMaterialProperties () const
 
PBRMaterialPropertiesgetPBRMaterialProperties ()
 
void setSpecularMaterialProperties (SpecularMaterialProperties *specularMaterialProperties)
 Set specular material properties. More...
 
void setPBRMaterialProperties (PBRMaterialProperties *pbrMaterialProperties)
 Set PBR material properties. More...
 
bool isDoubleSided () const
 
void setDoubleSided (bool doubleSided)
 Set double sided. More...
 
const Matrix2D3x3getTextureMatrix () const
 
void setTextureMatrix (const Matrix2D3x3 &textureMatrix)
 Set texture matrix. More...
 

Static Public Member Functions

static MaterialgetDefaultMaterial ()
 

Private Attributes

string id
 
SpecularMaterialPropertiesspecularMaterialProperties { nullptr }
 
PBRMaterialPropertiespbrMaterialProperties { nullptr }
 
bool doubleSided { false }
 
Matrix2D3x3 textureMatrix
 

Static Private Attributes

static STATIC_DLL_IMPEXT string defaultMaterialId = "tdme.default_material"
 
static STATIC_DLL_IMPEXT MaterialdefaultMaterial = new Material(Material::defaultMaterialId)
 

Detailed Description

Represents a material.

Author
andreas.drewke
Version
$Id$

Definition at line 20 of file Material.h.

Constructor & Destructor Documentation

◆ Material()

Material ( const string &  id)

Public constructor.

Parameters
idid

Definition at line 15 of file Material.cpp.

◆ ~Material()

~Material ( )

Destructor.

Definition at line 36 of file Material.cpp.

Member Function Documentation

◆ getDefaultMaterial()

static Material * getDefaultMaterial ( )
inlinestatic
Returns
default material

Definition at line 31 of file Material.h.

◆ getId()

const string & getId ( ) const
inline
Returns
material id

Definition at line 57 of file Material.h.

◆ getPBRMaterialProperties() [1/2]

PBRMaterialProperties * getPBRMaterialProperties ( )
inline
Returns
PBR material properties

Definition at line 85 of file Material.h.

◆ getPBRMaterialProperties() [2/2]

const PBRMaterialProperties * getPBRMaterialProperties ( ) const
inline
Returns
PBR material properties

Definition at line 78 of file Material.h.

◆ getSpecularMaterialProperties() [1/2]

SpecularMaterialProperties * getSpecularMaterialProperties ( )
inline
Returns
specular material properties

Definition at line 71 of file Material.h.

◆ getSpecularMaterialProperties() [2/2]

const SpecularMaterialProperties * getSpecularMaterialProperties ( ) const
inline
Returns
specular material properties

Definition at line 64 of file Material.h.

◆ getTextureMatrix()

const Matrix2D3x3 & getTextureMatrix ( ) const
inline
Returns
texture matrix

Definition at line 119 of file Material.h.

◆ isDoubleSided()

bool isDoubleSided ( ) const
inline
Returns
is double sided

Definition at line 104 of file Material.h.

◆ setDoubleSided()

void setDoubleSided ( bool  doubleSided)
inline

Set double sided.

Parameters
texturematrix

Definition at line 112 of file Material.h.

◆ setPBRMaterialProperties()

void setPBRMaterialProperties ( PBRMaterialProperties pbrMaterialProperties)

Set PBR material properties.

Parameters
pbrMaterialPropertiesPBR material properties

Definition at line 29 of file Material.cpp.

◆ setSpecularMaterialProperties()

void setSpecularMaterialProperties ( SpecularMaterialProperties specularMaterialProperties)

Set specular material properties.

Parameters
specularMaterialPropertiesspecular material properties

Definition at line 22 of file Material.cpp.

◆ setTextureMatrix()

void setTextureMatrix ( const Matrix2D3x3 textureMatrix)
inline

Set texture matrix.

Parameters
textureMatrixtexture matrix

Definition at line 127 of file Material.h.

Member Data Documentation

◆ defaultMaterial

Material * defaultMaterial = new Material(Material::defaultMaterialId)
staticprivate

Definition at line 24 of file Material.h.

◆ defaultMaterialId

string defaultMaterialId = "tdme.default_material"
staticprivate

Definition at line 23 of file Material.h.

◆ doubleSided

bool doubleSided { false }
private

Definition at line 39 of file Material.h.

◆ id

string id
private

Definition at line 36 of file Material.h.

◆ pbrMaterialProperties

PBRMaterialProperties* pbrMaterialProperties { nullptr }
private

Definition at line 38 of file Material.h.

◆ specularMaterialProperties

SpecularMaterialProperties* specularMaterialProperties { nullptr }
private

Definition at line 37 of file Material.h.

◆ textureMatrix

Matrix2D3x3 textureMatrix
private

Definition at line 40 of file Material.h.


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