GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
mesh_decoder.h
Go to the documentation of this file.
1// Copyright 2016 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_COMPRESSION_MESH_MESH_DECODER_H_
16#define DRACO_COMPRESSION_MESH_MESH_DECODER_H_
17
20#include "draco/mesh/mesh.h"
22
23namespace draco {
24
25// Class that reconstructs a 3D mesh from input data that was encoded by
26// MeshEncoder.
28 public:
30
32 return TRIANGULAR_MESH;
33 }
34
35 // The main entry point for mesh decoding.
37 Mesh *out_mesh);
38
39 // Returns the base connectivity of the decoded mesh (or nullptr if it is not
40 // initialized).
41 virtual const CornerTable *GetCornerTable() const { return nullptr; }
42
43 // Returns the attribute connectivity data or nullptr if it does not exist.
45 int /* att_id */) const {
46 return nullptr;
47 }
48
49 // Returns the decoding data for a given attribute or nullptr when the data
50 // does not exist.
52 int /* att_id */) const {
53 return nullptr;
54 }
55
56 Mesh *mesh() const { return mesh_; }
57
58 protected:
59 bool DecodeGeometryData() override;
60 virtual bool DecodeConnectivity() = 0;
61
62 private:
63 Mesh *mesh_;
64};
65
66} // namespace draco
67
68#endif // DRACO_COMPRESSION_MESH_MESH_DECODER_H_
Definition corner_table.h:53
Definition decoder_buffer.h:30
Definition mesh_attribute_corner_table.h:30
MeshDecoder()
Definition mesh_decoder.cc:21
virtual const MeshAttributeIndicesEncodingData * GetAttributeEncodingData(int) const
Definition mesh_decoder.h:51
virtual const CornerTable * GetCornerTable() const
Definition mesh_decoder.h:41
EncodedGeometryType GetGeometryType() const override
Definition mesh_decoder.h:31
bool DecodeGeometryData() override
Definition mesh_decoder.cc:29
virtual const MeshAttributeCornerTable * GetAttributeCornerTable(int) const
Definition mesh_decoder.h:44
Status Decode(const DecoderOptions &options, DecoderBuffer *in_buffer, Mesh *out_mesh)
Definition mesh_decoder.cc:23
virtual bool DecodeConnectivity()=0
Mesh * mesh() const
Definition mesh_decoder.h:56
Definition mesh.h:52
PointCloudDecoder()
Definition point_cloud_decoder.cc:23
Definition status.h:25
< h2 > I want smooth transition from jpg png webp to the engine</h2 > There s few options
Definition meshpage.php:1181
Definition attribute_octahedron_transform.cc:21
EncodedGeometryType
Definition compression_shared.h:41
@ TRIANGULAR_MESH
Definition compression_shared.h:44
DracoOptions< GeometryAttribute::Type > DecoderOptions
Definition decoder_options.h:30
Definition mesh_attribute_indices_encoding_data.h:27