From 46ae360e15d214487d39a209be1f7181f5b5ab0b Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Fri, 18 Mar 2016 00:55:21 +0900 Subject: [PATCH] Update test.cc --- test.cc | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/test.cc b/test.cc index 7d6056d..38fc751 100644 --- a/test.cc +++ b/test.cc @@ -107,7 +107,7 @@ std::string Indent(int indent) { return s; } -void DumpNode(const Node &node, int indent) { +void DumpNode(const tinygltf::Node &node, int indent) { std::cout << Indent(indent) << "name : " << node.name << std::endl; std::cout << Indent(indent) << "camera : " << node.camera << std::endl; if (!node.rotation.empty()) { @@ -137,7 +137,7 @@ void DumpNode(const Node &node, int indent) { << "children : " << PrintStringArray(node.children) << std::endl; } -void DumpPrimitive(const Primitive &primitive, int indent) { +void DumpPrimitive(const tinygltf::Primitive &primitive, int indent) { std::cout << Indent(indent) << "material : " << primitive.material << std::endl; std::cout << Indent(indent) << "mode : " << PrintMode(primitive.mode) @@ -155,7 +155,7 @@ void DumpPrimitive(const Primitive &primitive, int indent) { } } -void Dump(const Scene &scene) { +void Dump(const tinygltf::Scene &scene) { std::cout << "=== Dump glTF ===" << std::endl; std::cout << "asset.generator : " << scene.asset.generator << std::endl; @@ -189,8 +189,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.meshes.begin()); - std::map::const_iterator itEnd(scene.meshes.end()); + std::map::const_iterator it(scene.meshes.begin()); + std::map::const_iterator itEnd(scene.meshes.end()); std::cout << "meshes(item=" << scene.meshes.size() << ")" << std::endl; for (; it != itEnd; it++) { std::cout << Indent(1) << "name : " << it->second.name << std::endl; @@ -205,8 +205,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.accessors.begin()); - std::map::const_iterator itEnd( + std::map::const_iterator it(scene.accessors.begin()); + std::map::const_iterator itEnd( scene.accessors.end()); std::cout << "accessos(items=" << scene.accessors.size() << ")" << std::endl; @@ -245,9 +245,9 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it( + std::map::const_iterator it( scene.bufferViews.begin()); - std::map::const_iterator itEnd( + std::map::const_iterator itEnd( scene.bufferViews.end()); std::cout << "bufferViews(items=" << scene.bufferViews.size() << ")" << std::endl; @@ -263,8 +263,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.buffers.begin()); - std::map::const_iterator itEnd(scene.buffers.end()); + std::map::const_iterator it(scene.buffers.begin()); + std::map::const_iterator itEnd(scene.buffers.end()); std::cout << "buffers(items=" << scene.buffers.size() << ")" << std::endl; for (; it != itEnd; it++) { std::cout << Indent(1) << "name : " << it->first << std::endl; @@ -274,8 +274,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.materials.begin()); - std::map::const_iterator itEnd( + std::map::const_iterator it(scene.materials.begin()); + std::map::const_iterator itEnd( scene.materials.end()); std::cout << "materials(items=" << scene.materials.size() << ")" << std::endl; @@ -286,8 +286,8 @@ void Dump(const Scene &scene) { std::cout << Indent(1) << "values(items=" << it->second.values.size() << std::endl; - ParameterMap::const_iterator p(it->second.values.begin()); - ParameterMap::const_iterator pEnd(it->second.values.end()); + tinygltf::ParameterMap::const_iterator p(it->second.values.begin()); + tinygltf::ParameterMap::const_iterator pEnd(it->second.values.end()); for (; p != pEnd; p++) { if (!p->second.numberArray.empty()) { std::cout << Indent(3) << p->first @@ -302,8 +302,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.nodes.begin()); - std::map::const_iterator itEnd(scene.nodes.end()); + std::map::const_iterator it(scene.nodes.begin()); + std::map::const_iterator itEnd(scene.nodes.end()); std::cout << "nodes(items=" << scene.nodes.size() << ")" << std::endl; for (; it != itEnd; it++) { std::cout << Indent(1) << "name : " << it->first << std::endl; @@ -313,8 +313,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.images.begin()); - std::map::const_iterator itEnd(scene.images.end()); + std::map::const_iterator it(scene.images.begin()); + std::map::const_iterator itEnd(scene.images.end()); std::cout << "images(items=" << scene.images.size() << ")" << std::endl; for (; it != itEnd; it++) { std::cout << Indent(1) << "name : " << it->first << std::endl; @@ -329,8 +329,8 @@ void Dump(const Scene &scene) { } { - std::map::const_iterator it(scene.textures.begin()); - std::map::const_iterator itEnd(scene.textures.end()); + std::map::const_iterator it(scene.textures.begin()); + std::map::const_iterator itEnd(scene.textures.end()); std::cout << "textures(items=" << scene.textures.size() << ")" << std::endl; for (; it != itEnd; it++) { std::cout << Indent(1) << "name : " << it->first << std::endl; @@ -356,8 +356,8 @@ int main(int argc, char **argv) { exit(1); } - Scene scene; - TinyGLTFLoader loader; + tinygltf::Scene scene; + tinygltf::TinyGLTFLoader loader; std::string err; bool ret = loader.LoadFromFile(scene, err, argv[1]);