added Scene::loadTexture(), filename->image map
git-svn-id: svn://anubis/fart/trunk@384 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
7472d6c53c
commit
b4717b7cbc
3 files changed
+57
No files matched your search
@@ -2,6 +2,8 @@
|
||||
#ifndef MATERIAL_H
|
||||
#define MATERIAL_H MATERIAL_H
|
||||
|
||||
#include <FreeImage.h>
|
||||
|
||||
#include "Color.h"
|
||||
|
||||
class Material
|
||||
@@ -16,6 +18,7 @@ class Material
|
||||
m_reflectance = 0.0;
|
||||
m_transparency = 0.0;
|
||||
m_refraction = 1.0;
|
||||
m_texture = NULL;
|
||||
}
|
||||
|
||||
void setAmbientColor(const Color & ambient)
|
||||
@@ -52,6 +55,9 @@ class Material
|
||||
void setTransparency(double t) { m_transparency = t; }
|
||||
double getTransparency() const { return m_transparency; }
|
||||
|
||||
void setTexture(FIBITMAP * fib) { m_texture = fib; }
|
||||
FIBITMAP * getTexture() const { return m_texture; }
|
||||
|
||||
protected:
|
||||
Color m_ambient_color;
|
||||
Color m_diffuse_color;
|
||||
@@ -60,6 +66,7 @@ class Material
|
||||
double m_reflectance;
|
||||
double m_refraction;
|
||||
double m_transparency;
|
||||
FIBITMAP * m_texture;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user