XRay3D/include/material.h
2020-04-17 18:11:57 +02:00

46 lines
814 B
C++

#pragma once
#ifndef MATERIAL
#define MATERIAL
#include "texture.h"
class Xr_Material
{
public:
Xr_Material();
Xr_Material(bool, bool, float, float, float, Xr_Texture*);
~Xr_Material();
void enableShadow();
void disableShadow();
void enableShaderless();
void disableShaderless();
void setAmbient(float);
void setDiffuse(float);
void setSpecular(float);
void attachTexture(Xr_Texture*);
void detachTexture();
float getAmbient() const;
float getDiffuse() const;
float getSpecular() const;
Xr_Texture* const getTexture() const;
/* à ajouter -> support multi-texturage */
private:
bool M_shadow;
bool M_shaderless;
float M_ambient;
float M_diffuse;
float M_specular;
Xr_Texture *M_texture;
/* à ajouter -> support multi-texturage */
};
#endif