1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-22 18:28:51 -05:00

Layers CC

This commit is contained in:
hrocho 2019-10-22 19:50:34 +02:00
parent f6a3cb3993
commit 345495af29
3 changed files with 41 additions and 63 deletions

View File

@ -62,16 +62,6 @@ void Material::calculate(){
}
}
Layers& Layers::operator=(const Layers& other){
materials.clear();
for(auto&e : other.get_materials()){
materials.push_back(e);
}
return *this;
}
void Layers::add(Material m){
materials.push_back(m);
}

View File

@ -251,8 +251,7 @@ namespace catima{
private:
std::vector<Material> materials;
public:
Layers(){};
Layers& operator=(const Layers& other);
Layers() = default;
/**
* @return reference to the std::vector of stored Materials

View File

@ -7,17 +7,6 @@ using namespace std;
#include "catima/catima.h"
#include "catima/material_database.h"
bool rcompare(double a, double b,double eps){
if(fabs((a-b)/fabs(b))<eps){
return true;
}
else{
std::cout<<"\033[1;31m"<<a<<" == "<<b<<"\033[0m"<<std::endl;
return false;
}
}
TEST_CASE("atima material basic tests"){
catima::Material water({
{1,1,2},