1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-23 02:38:51 -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){ void Layers::add(Material m){
materials.push_back(m); materials.push_back(m);
} }

View File

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

View File

@ -7,17 +7,6 @@ using namespace std;
#include "catima/catima.h" #include "catima/catima.h"
#include "catima/material_database.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"){ TEST_CASE("atima material basic tests"){
catima::Material water({ catima::Material water({
{1,1,2}, {1,1,2},