added sanity check to csv

refactoring for wifi models
adjusted obj/mtl parsing
This commit is contained in:
k-a-z-u
2018-06-26 11:58:36 +02:00
parent 657e72b4c5
commit ae3b95cb0e
6 changed files with 38 additions and 24 deletions

View File

@@ -205,7 +205,7 @@ namespace Ray3D {
for (const Obstacle3D& obs : elements) {
for (const Triangle3& tria : obs.triangles) {
(void) tria;
res << "3 " << vidx++ << " " << vidx++ << " " << vidx++ << "\n";
res << "3 " << (vidx++) << " " << (vidx++) << " " << (vidx++) << "\n";
}
}

View File

@@ -110,6 +110,9 @@ private:
} else if ("map_Ka" == token) {
const std::string texFile = tokens[1];
cur->textureFile = texFile;
} else if ("map_Kd" == token) {
const std::string texFile = tokens[1];
cur->textureFile = texFile;
} else if ("Kd" == token) {
cur->diffuse.x = std::stof(tokens[1]);
cur->diffuse.y = std::stof(tokens[2]);

View File

@@ -129,6 +129,7 @@ private:
if ("vn" == token) {parseNormal(tokens);}
if ("f" == token) {parseFace(tokens);}
if ("g" == token) {newObject(tokens[1]);}
if ("o" == token) {newObject(tokens[1]);}
}