card::card(card const &reference) { //card *newCard = new card(); setColor(reference.ccolor); setNumber(reference.cnumber); setShading(reference.cshading); setShape(reference.cshape); };
Globals::Globals(std::string dmode, std::string shading, float* background, std::string face, std::string order, bool dsided, bool local, bool enabled, float* ambient) { this->dmode = setDmode(dmode); this->shading = setShading(shading); this->face = setFace(face); this->order = setOrder(order); this->dsided = dsided; this->local = local; this->enabled = enabled; for (int i=0 ; i<4 ; i++) { this->background[i] = background[i]; this->ambient[i] = ambient[i]; } }
void Material::setRefraction(float refraction) { this->refraction = refraction; setShading(Material::CoockTorrance); }
void Material::setRoughness(float roughness) { this->roughness = roughness; setShading(Material::CoockTorrance); }
void Material::setSpecular(const glm::vec4 &specular) { this->specular = specular; setShading(Material::Phong); }
void Material::setDiffuse(const glm::vec4 &diffuse) { this->diffuse = diffuse; setShading(Material::Phong); }
void Material::setAmbient(const glm::vec4 &ambient) { this->ambient = ambient; setShading(Material::Phong); }