AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aire::Material Class Reference

Class to identify a material for Blinn-Phong rendering. More...

#include <material.h>

Inheritance diagram for Aire::Material:
Inheritance graph
[legend]
Collaboration diagram for Aire::Material:
Collaboration graph
[legend]

Public Member Functions

 Material (MatHandle &)
 
bool hasTexture ()
 
void setColor (glm::vec3 &col, ColorType colType)
 
glm::vec3 * getColor (ColorType colType)
 
void setTexture (TexturePtr &, TextureType texType)
 
TexturePtr getTexture (TextureType texType)
 
void setShininess (float val)
 
floatgetShininess ()
 
uint32_t getSize ()
 
MatHandle getHandle ()
 
- Public Member Functions inherited from Aire::Resource
 Resource ()
 Default constructor.
 
virtual ~Resource ()
 Default destructor.
 
bool isLoadToGpu ()
 
ResourceState getState ()
 
void setState (ResourceState state)
 

Additional Inherited Members

- Protected Attributes inherited from Aire::Resource
ResourceState resourceState
 

Detailed Description

Class to identify a material for Blinn-Phong rendering.

Member Function Documentation

◆ getColor()

glm::vec3 * Aire::Material::getColor ( ColorType colType)

Get material colour

Parameters
colTypeThe colour type to query
Returns
The corresponding colour on the material

◆ getHandle()

MatHandle Aire::Material::getHandle ( )
Returns
A handle to the material

◆ getSize()

uint32_t Aire::Material::getSize ( )
virtual
Returns
The size of the material in memory (in Bytes)

Implements Aire::Resource.

◆ getTexture()

Aire::TexturePtr Aire::Material::getTexture ( TextureType texType)

Get a texture attached to the material

Parameters
texTypeThe type of texture of query (diffuse, specular, etc.)
Returns
Pointer to the queried texture object

◆ hasTexture()

bool Aire::Material::hasTexture ( )
Returns
True if this is a textured material

◆ setColor()

void Aire::Material::setColor ( glm::vec3 & col,
ColorType colType )

Set colour of the material

Parameters
colColour to set
colTypeThe type of colour on the material to be set

◆ setShininess()

void Aire::Material::setShininess ( float val)

Set shininess value

Parameters
valThe shininess value to set

◆ setTexture()

void Aire::Material::setTexture ( TexturePtr & texHandle,
TextureType texType )

Set texture on the material

Parameters
texHandleThe texture object to be attached to the material
texTypeThe type of texture to attach (diffuse, specular, etc.)

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