OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/android/vr_shell/gltf_asset.h" |
| 6 |
| 7 #include <unordered_map> |
| 8 |
| 9 #include "base/logging.h" |
| 10 |
| 11 namespace vr_shell { |
| 12 |
| 13 namespace gltf { |
| 14 |
| 15 const std::unordered_map<std::string, Type> kTypeMap = { |
| 16 {"SCALAR", SCALAR}, {"VEC2", VEC2}, {"VEC3", VEC3}, {"VEC4", VEC4}, |
| 17 {"MAT2", MAT2}, {"MAT3", MAT3}, {"MAT4", MAT4}, |
| 18 }; |
| 19 |
| 20 Type GetType(const std::string& type) { |
| 21 auto it = kTypeMap.find(type); |
| 22 CHECK(it != kTypeMap.end()); |
| 23 return it->second; |
| 24 } |
| 25 |
| 26 Mesh::Primitive::Primitive() : indices(nullptr), mode(4) {} |
| 27 |
| 28 Mesh::Primitive::~Primitive() = default; |
| 29 |
| 30 Mesh::Mesh() {} |
| 31 |
| 32 Mesh::~Mesh() = default; |
| 33 |
| 34 Node::Node() {} |
| 35 |
| 36 Node::~Node() = default; |
| 37 |
| 38 Scene::Scene() {} |
| 39 |
| 40 Scene::~Scene() = default; |
| 41 |
| 42 Asset::Asset() : scene_(nullptr) {} |
| 43 |
| 44 Asset::~Asset() = default; |
| 45 |
| 46 } // namespace gltf |
| 47 |
| 48 } // namespace vr_shell |
OLD | NEW |