Commit 5a58238ab3b2782593656b0c5e4b4546aa87883f

Authored by David Mayerich
1 parent 85777f53

fixed linux compatibility issues

stim/visualization/obj.h
@@ -614,7 +614,7 @@ public: @@ -614,7 +614,7 @@ public:
614 614
615 if (M.size()) { //if materials are used 615 if (M.size()) { //if materials are used
616 616
617 - outfile.open(mtl_filename); //open the material file 617 + outfile.open(mtl_filename.c_str()); //open the material file
618 for (size_t i = 0; i < M.size(); i++) { //for each material 618 for (size_t i = 0; i < M.size(); i++) { //for each material
619 outfile << M[i].str() << std::endl; //output the material name and properties 619 outfile << M[i].str() << std::endl; //output the material name and properties
620 } 620 }
stim/visualization/obj/obj_material.h
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 #define OBJ_MATERIAL_H 2 #define OBJ_MATERIAL_H
3 3
4 #include <sstream> 4 #include <sstream>
  5 +#include <cstring>
5 6
6 namespace stim { 7 namespace stim {
7 8
@@ -25,9 +26,9 @@ struct obj_material { @@ -25,9 +26,9 @@ struct obj_material {
25 std::string tex_decal; //stencil decal 26 std::string tex_decal; //stencil decal
26 27
27 obj_material() { //constructor 28 obj_material() { //constructor
28 - memset(ka, 0, sizeof(T) * 3);  
29 - memset(kd, 0, sizeof(T) * 3);  
30 - memset(ks, 0, sizeof(T) * 3); 29 + std::memset(ka, 0, sizeof(T) * 3);
  30 + std::memset(kd, 0, sizeof(T) * 3);
  31 + std::memset(ks, 0, sizeof(T) * 3);
31 ns = 10; 32 ns = 10;
32 illum = 2; 33 illum = 2;
33 34