| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // This file contains the logic for converting the scene graph to a | 33 // This file contains the logic for converting the scene graph to a |
| 34 // JSON-encoded file that is stored in a zip archive. | 34 // JSON-encoded file that is stored in a zip archive. |
| 35 #include "converter/cross/converter.h" | 35 #include "converter/cross/converter.h" |
| 36 | 36 |
| 37 #include "base/file_path.h" | 37 #include "base/file_path.h" |
| 38 #include "base/file_util.h" | 38 #include "base/file_util.h" |
| 39 #include "base/scoped_ptr.h" | 39 #include "base/scoped_ptr.h" |
| 40 #include "core/cross/class_manager.h" | 40 #include "core/cross/class_manager.h" |
| 41 #include "core/cross/client.h" | 41 #include "core/cross/client.h" |
| 42 #include "core/cross/client_info.h" |
| 42 #include "core/cross/effect.h" | 43 #include "core/cross/effect.h" |
| 43 #include "core/cross/error.h" | 44 #include "core/cross/error.h" |
| 44 #include "core/cross/features.h" | 45 #include "core/cross/features.h" |
| 45 #include "core/cross/object_manager.h" | 46 #include "core/cross/object_manager.h" |
| 46 #include "core/cross/pack.h" | 47 #include "core/cross/pack.h" |
| 47 #include "core/cross/renderer.h" | 48 #include "core/cross/renderer.h" |
| 48 #include "core/cross/service_locator.h" | 49 #include "core/cross/service_locator.h" |
| 49 #include "core/cross/transform.h" | 50 #include "core/cross/transform.h" |
| 50 #include "core/cross/tree_traversal.h" | 51 #include "core/cross/tree_traversal.h" |
| 51 #include "core/cross/types.h" | 52 #include "core/cross/types.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 82 namespace converter { | 83 namespace converter { |
| 83 // Loads the Collada input file and writes it to the zipped JSON output file. | 84 // Loads the Collada input file and writes it to the zipped JSON output file. |
| 84 bool Convert(const FilePath& in_filename, | 85 bool Convert(const FilePath& in_filename, |
| 85 const FilePath& out_filename, | 86 const FilePath& out_filename, |
| 86 const Options& options, | 87 const Options& options, |
| 87 String *error_messages) { | 88 String *error_messages) { |
| 88 // Create a service locator and renderer. | 89 // Create a service locator and renderer. |
| 89 ServiceLocator service_locator; | 90 ServiceLocator service_locator; |
| 90 EvaluationCounter evaluation_counter(&service_locator); | 91 EvaluationCounter evaluation_counter(&service_locator); |
| 91 ClassManager class_manager(&service_locator); | 92 ClassManager class_manager(&service_locator); |
| 93 ClientInfoManager client_info_manager(&service_locator); |
| 92 ObjectManager object_manager(&service_locator); | 94 ObjectManager object_manager(&service_locator); |
| 93 Profiler profiler(&service_locator); | 95 Profiler profiler(&service_locator); |
| 94 ErrorStatus error_status(&service_locator); | 96 ErrorStatus error_status(&service_locator); |
| 95 Features features(&service_locator); | 97 Features features(&service_locator); |
| 96 | 98 |
| 97 Collada::Init(&service_locator); | 99 Collada::Init(&service_locator); |
| 98 features.Init("MaxCapabilities"); | 100 features.Init("MaxCapabilities"); |
| 99 | 101 |
| 100 // Collect error messages. | 102 // Collect error messages. |
| 101 ErrorCollector error_collector(&service_locator); | 103 ErrorCollector error_collector(&service_locator); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 << FilePathToUTF8(in_filename).c_str() << "'"; | 379 << FilePathToUTF8(in_filename).c_str() << "'"; |
| 378 } | 380 } |
| 379 } | 381 } |
| 380 if (error_messages) { | 382 if (error_messages) { |
| 381 *error_messages = error_collector.errors(); | 383 *error_messages = error_collector.errors(); |
| 382 } | 384 } |
| 383 return true; | 385 return true; |
| 384 } | 386 } |
| 385 } // end namespace converter | 387 } // end namespace converter |
| 386 } // end namespace o3d | 388 } // end namespace o3d |
| OLD | NEW |