1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-26 12:08:52 -05:00

Merge pull request #70 from hrosiak/layers

Layers CC
This commit is contained in:
Andrej Prochazka 2019-10-22 19:52:06 +02:00 committed by GitHub
commit 1e4fefee8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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},