Aether3D Game Engine
Material.hpp
1 #ifndef MATERIAL_H
2 #define MATERIAL_H
3 
4 #ifndef ERRORS_H
5 # include "Errors.hpp"
6 #endif
7 
8 #ifndef INCLUDE_STRING_H
9 # include <string>
10 # define INCLUDE_STRING_H
11 #endif
12 
13 struct Matrix44;
14 class Texture;
15 struct Vec3;
16 struct Vec4;
17 
19 class Material
20 {
21  public:
22  virtual ~Material() {}
23 
41  virtual void LoadFromFile( const char* path ) = 0;
42 
44  virtual const char* Name() const = 0;
45 
47  virtual bool Opaque() const = 0;
48 
56  virtual void SetOpaque( bool opaque ) = 0;
57 
70  virtual Error::Enum SetShaders( const std::string& vertexShaderPath,
71  const std::string& fragmentShaderPath,
72  const std::string& geometryShaderPath,
73  const std::string& defines ) = 0;
80  virtual void SetFloat( const std::string& name, float value ) = 0;
81 
88  virtual void SetMatrix( const std::string& name, const Matrix44& matrix ) = 0;
89 
91  virtual void SetName( const char* name ) = 0;
92 
100  virtual void SetTexture( const std::string& name, const Texture* texture ) = 0;
101 
108  virtual void SetVector( const std::string& name, const Vec3& value ) = 0;
109 
116  virtual void SetVector( const std::string& name, const Vec4& value ) = 0;
117 };
118 #endif
virtual void SetName(const char *name)=0
virtual void LoadFromFile(const char *path)=0
4-component vector.
Definition: Vec3.hpp:380
virtual const char * Name() const =0
virtual void SetVector(const std::string &name, const Vec3 &value)=0
virtual void SetOpaque(bool opaque)=0
Stores material properties for Mesh. Their names/values are directly mapped into shader uniforms...
Definition: Material.hpp:19
3-component vector.
Definition: Vec3.hpp:22
2D or Cube Map texture.
Definition: Texture.hpp:7
virtual bool Opaque() const =0
Row-major 4x4 Matrix.
Definition: Matrix.hpp:20
virtual void SetFloat(const std::string &name, float value)=0
virtual void SetTexture(const std::string &name, const Texture *texture)=0
virtual Error::Enum SetShaders(const std::string &vertexShaderPath, const std::string &fragmentShaderPath, const std::string &geometryShaderPath, const std::string &defines)=0
virtual void SetMatrix(const std::string &name, const Matrix44 &matrix)=0