added sanity check to csv
refactoring for wifi models adjusted obj/mtl parsing
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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]);}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user