| 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 19 matching lines...) Expand all Loading... |
| 30 */ | 30 */ |
| 31 | 31 |
| 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 "converter/cross/renderer_stub.h" |
| 40 #include "core/cross/class_manager.h" | 41 #include "core/cross/class_manager.h" |
| 41 #include "core/cross/client.h" | 42 #include "core/cross/client.h" |
| 42 #include "core/cross/client_info.h" | 43 #include "core/cross/client_info.h" |
| 43 #include "core/cross/effect.h" | 44 #include "core/cross/effect.h" |
| 44 #include "core/cross/error.h" | 45 #include "core/cross/error.h" |
| 45 #include "core/cross/features.h" | 46 #include "core/cross/features.h" |
| 46 #include "core/cross/object_manager.h" | 47 #include "core/cross/object_manager.h" |
| 47 #include "core/cross/pack.h" | 48 #include "core/cross/pack.h" |
| 48 #include "core/cross/renderer.h" | 49 #include "core/cross/renderer.h" |
| 49 #include "core/cross/service_locator.h" | 50 #include "core/cross/service_locator.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ErrorStatus error_status(&service_locator); | 273 ErrorStatus error_status(&service_locator); |
| 273 Features features(&service_locator); | 274 Features features(&service_locator); |
| 274 | 275 |
| 275 Collada::Init(&service_locator); | 276 Collada::Init(&service_locator); |
| 276 features.Init("MaxCapabilities"); | 277 features.Init("MaxCapabilities"); |
| 277 | 278 |
| 278 // Collect error messages. | 279 // Collect error messages. |
| 279 ErrorCollector error_collector(&service_locator); | 280 ErrorCollector error_collector(&service_locator); |
| 280 | 281 |
| 281 scoped_ptr<Renderer> renderer( | 282 scoped_ptr<Renderer> renderer( |
| 282 Renderer::CreateDefaultRenderer(&service_locator)); | 283 RendererStub::CreateDefault(&service_locator)); |
| 283 renderer->InitCommon(); | 284 renderer->InitCommon(); |
| 284 | 285 |
| 285 Pack::Ref pack(object_manager.CreatePack()); | 286 Pack::Ref pack(object_manager.CreatePack()); |
| 286 Transform* root = pack->Create<Transform>(); | 287 Transform* root = pack->Create<Transform>(); |
| 287 root->set_name(String(Serializer::ROOT_PREFIX) + String("root")); | 288 root->set_name(String(Serializer::ROOT_PREFIX) + String("root")); |
| 288 | 289 |
| 289 // Setup a ParamFloat to be the source to all animations in this file. | 290 // Setup a ParamFloat to be the source to all animations in this file. |
| 290 ParamObject* param_object = pack->Create<ParamObject>(); | 291 ParamObject* param_object = pack->Create<ParamObject>(); |
| 291 // This is some arbitrary name | 292 // This is some arbitrary name |
| 292 param_object->set_name(O3D_STRING_CONSTANT("animSourceOwner")); | 293 param_object->set_name(O3D_STRING_CONSTANT("animSourceOwner")); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 << FilePathToUTF8(in_filename).c_str() << "'"; | 568 << FilePathToUTF8(in_filename).c_str() << "'"; |
| 568 } | 569 } |
| 569 } | 570 } |
| 570 if (error_messages) { | 571 if (error_messages) { |
| 571 *error_messages = error_collector.errors(); | 572 *error_messages = error_collector.errors(); |
| 572 } | 573 } |
| 573 return true; | 574 return true; |
| 574 } | 575 } |
| 575 } // end namespace converter | 576 } // end namespace converter |
| 576 } // end namespace o3d | 577 } // end namespace o3d |
| OLD | NEW |