igor::iMaterial Class Reference

#include <iMaterial.h>

Inherits igor::iResource.

Public Member Functions

void setTexture (iTexturePtr texture, uint32 texunit)
 
iTexturePtr getTexture (uint32 texunit) const
 
bool hasTextureUnit (uint32 texunit) const
 
const std::map< uint32, iTexturePtr > & getTextures () const
 
void setTiling (const iaVector2f &tiling)
 
const iaVector2fgetTiling () const
 
bool hasTextures () const
 
void setEmissive (const iaColor3f &e)
 
iaColor3f getEmissive () const
 
void setAmbient (const iaColor3f &a)
 
iaColor3f getAmbient () const
 
void setSpecular (const iaColor3f &s)
 
iaColor3f getSpecular () const
 
void setDiffuse (const iaColor3f &d)
 
iaColor3f getDiffuse () const
 
void setShininess (float32 shininess)
 
float32 getShininess () const
 
void setAlpha (float32 alpha)
 
float32 getAlpha () const
 
void setVelocityOriented (bool enable)
 
bool isVelocityOriented () const
 
void setShaderMaterial (const iShaderMaterialPtr &shaderMaterial)
 
iShaderMaterialPtr getShaderMaterial () const
 
- Public Member Functions inherited from igor::iResource
virtual ~iResource ()=default
 
bool isValid () const
 
bool isProcessed () const
 
bool isQuiet () const
 
const iaStringgetSource () const
 
const iaString getInfo () const
 
const iResourceIDgetID () const
 
const iaStringgetAlias () const
 
iResourceCacheMode getCacheMode () const
 
const iParametersgetParameters () const
 
const iaStringgetType () const
 

Friends

class iMaterialFactory
 

Additional Inherited Members

- Static Public Member Functions inherited from igor::iResource
static bool extractID (const iParameters &parameters, iResourceID &id, bool quiet=false)
 
- Protected Member Functions inherited from igor::iResource
 iResource (const iParameters &parameters)
 

Detailed Description

contains all material information that belong to the surface of an object

Whereas iShaderMaterial contains all the information related to shader and environment ie lights etc.

Member Function Documentation

◆ getAlpha()

float32 igor::iMaterial::getAlpha ( ) const
Returns
alpha value of material

◆ getAmbient()

iaColor3f igor::iMaterial::getAmbient ( ) const
Returns
ambient color

◆ getDiffuse()

iaColor3f igor::iMaterial::getDiffuse ( ) const
Returns
diffuse color

◆ getEmissive()

iaColor3f igor::iMaterial::getEmissive ( ) const
Returns
emissive color

◆ getShaderMaterial()

iShaderMaterialPtr igor::iMaterial::getShaderMaterial ( ) const
Returns
the shader material in use

◆ getShininess()

float32 igor::iMaterial::getShininess ( ) const
Returns
shininess

◆ getSpecular()

iaColor3f igor::iMaterial::getSpecular ( ) const
Returns
specular color

◆ getTexture()

iTexturePtr igor::iMaterial::getTexture ( uint32  texunit) const
Returns
texture for given texture unit
Parameters
texunitthe given texture unit

◆ getTextures()

const std::map< uint32, iTexturePtr > & igor::iMaterial::getTextures ( ) const
Returns
all the textures in the target material

◆ getTiling()

const iaVector2f & igor::iMaterial::getTiling ( ) const
Returns
tiling config

◆ hasTextures()

bool igor::iMaterial::hasTextures ( ) const
Returns
true if mesh has textures and texture coordinates

◆ hasTextureUnit()

bool igor::iMaterial::hasTextureUnit ( uint32  texunit) const
Returns
true if target material has texture for given texture unit
Parameters
texunitthe given texture unit

◆ isVelocityOriented()

bool igor::iMaterial::isVelocityOriented ( ) const
Returns
true if orientation will be along velocity axis

◆ setAlpha()

void igor::iMaterial::setAlpha ( float32  alpha)

sets alpha value of material

◆ setAmbient()

void igor::iMaterial::setAmbient ( const iaColor3f a)

set ambient color

Parameters
aambient color

◆ setDiffuse()

void igor::iMaterial::setDiffuse ( const iaColor3f d)

set diffuse color

Parameters
ddiffuse color

◆ setEmissive()

void igor::iMaterial::setEmissive ( const iaColor3f e)

set emissive color

Parameters
eemissive color

◆ setShaderMaterial()

void igor::iMaterial::setShaderMaterial ( const iShaderMaterialPtr shaderMaterial)

sets shader material

Parameters
shaderMaterialthe shader material

◆ setShininess()

void igor::iMaterial::setShininess ( float32  shininess)

set shininess

Parameters
shininessthe shininess value

◆ setSpecular()

void igor::iMaterial::setSpecular ( const iaColor3f s)

set specular color

Parameters
sspecular color

◆ setTexture()

void igor::iMaterial::setTexture ( iTexturePtr  texture,
uint32  texunit 
)

set a texture for a given texture unit

Parameters
texturethe texture to add
texunitthe texture unit

◆ setTiling()

void igor::iMaterial::setTiling ( const iaVector2f tiling)

sets the tiling configuration that can be use in a shader

Parameters
tilingcolumn and row count of tiles

◆ setVelocityOriented()

void igor::iMaterial::setVelocityOriented ( bool  enable)

sets velocity orientation

Parameters
enableif true orientation will be along velocity axis

Friends And Related Function Documentation

◆ iMaterialFactory

friend class iMaterialFactory
friend

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