GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
structural_metadata.h
Go to the documentation of this file.
1// Copyright 2022 The Draco Authors.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15#ifndef DRACO_METADATA_STRUCTURAL_METADATA_H_
16#define DRACO_METADATA_STRUCTURAL_METADATA_H_
17
19
20#ifdef DRACO_TRANSCODER_SUPPORTED
21
22#include <memory>
23#include <string>
24#include <vector>
25
27
28namespace draco {
29
30// Holds data associated with EXT_structural_metadata glTF extension.
31class StructuralMetadata {
32 public:
33 StructuralMetadata();
34
35 // Methods for comparing two structural metadata objects.
36 bool operator==(const StructuralMetadata &other) const;
37 bool operator!=(const StructuralMetadata &other) const {
38 return !(*this == other);
39 }
40
41 // Copies |src| structural metadata into this object.
42 void Copy(const StructuralMetadata &src);
43
44 // Property table schema.
45 void SetPropertyTableSchema(const PropertyTable::Schema &schema);
46 const PropertyTable::Schema &GetPropertyTableSchema() const;
47
48 // Property tables.
49 int AddPropertyTable(std::unique_ptr<PropertyTable> property_table);
50 int NumPropertyTables() const;
51 const PropertyTable &GetPropertyTable(int index) const;
52 PropertyTable &GetPropertyTable(int index);
53 void RemovePropertyTable(int index);
54
55 private:
56 // Property table schema and property tables.
57 PropertyTable::Schema property_table_schema_;
58 std::vector<std::unique_ptr<PropertyTable>> property_tables_;
59};
60
61} // namespace draco
62
63#endif // DRACO_TRANSCODER_SUPPORTED
64#endif // DRACO_METADATA_STRUCTURAL_METADATA_H_
tag src
Definition meshpage.php:1786
Definition attribute_octahedron_transform.cc:21
bool operator==(const short_alloc< T, N, A1 > &x, const short_alloc< U, M, A2 > &y) noexcept
Definition short_alloc.hpp:145
bool operator!=(const short_alloc< T, N, A1 > &x, const short_alloc< U, M, A2 > &y) noexcept
Definition short_alloc.hpp:153