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
18
#include "
draco/compression/attributes/mesh_attribute_indices_encoding_data.h
"
19
#include "
draco/compression/point_cloud/point_cloud_decoder.h
"
20
#include "
draco/mesh/mesh.h
"
21
#include "
draco/mesh/mesh_attribute_corner_table.h
"
22
23
namespace
draco
{
24
25
// Class that reconstructs a 3D mesh from input data that was encoded by
26
// MeshEncoder.
27
class
MeshDecoder
:
public
PointCloudDecoder
{
28
public
:
29
MeshDecoder
();
30
31
EncodedGeometryType
GetGeometryType
()
const override
{
32
return
TRIANGULAR_MESH
;
33
}
34
35
// The main entry point for mesh decoding.
36
Status
Decode
(
const
DecoderOptions
&
options
,
DecoderBuffer
*in_buffer,
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.
44
virtual
const
MeshAttributeCornerTable
*
GetAttributeCornerTable
(
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.
51
virtual
const
MeshAttributeIndicesEncodingData
*
GetAttributeEncodingData
(
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_
draco::CornerTable
Definition
corner_table.h:53
draco::DecoderBuffer
Definition
decoder_buffer.h:30
draco::MeshAttributeCornerTable
Definition
mesh_attribute_corner_table.h:30
draco::MeshDecoder::MeshDecoder
MeshDecoder()
Definition
mesh_decoder.cc:21
draco::MeshDecoder::GetAttributeEncodingData
virtual const MeshAttributeIndicesEncodingData * GetAttributeEncodingData(int) const
Definition
mesh_decoder.h:51
draco::MeshDecoder::GetCornerTable
virtual const CornerTable * GetCornerTable() const
Definition
mesh_decoder.h:41
draco::MeshDecoder::GetGeometryType
EncodedGeometryType GetGeometryType() const override
Definition
mesh_decoder.h:31
draco::MeshDecoder::DecodeGeometryData
bool DecodeGeometryData() override
Definition
mesh_decoder.cc:29
draco::MeshDecoder::GetAttributeCornerTable
virtual const MeshAttributeCornerTable * GetAttributeCornerTable(int) const
Definition
mesh_decoder.h:44
draco::MeshDecoder::Decode
Status Decode(const DecoderOptions &options, DecoderBuffer *in_buffer, Mesh *out_mesh)
Definition
mesh_decoder.cc:23
draco::MeshDecoder::DecodeConnectivity
virtual bool DecodeConnectivity()=0
draco::MeshDecoder::mesh
Mesh * mesh() const
Definition
mesh_decoder.h:56
draco::Mesh
Definition
mesh.h:52
draco::PointCloudDecoder::PointCloudDecoder
PointCloudDecoder()
Definition
point_cloud_decoder.cc:23
draco::Status
Definition
status.h:25
mesh.h
mesh_attribute_corner_table.h
mesh_attribute_indices_encoding_data.h
options
< h2 > I want smooth transition from jpg png webp to the engine</h2 > There s few options
Definition
meshpage.php:1181
draco
Definition
attribute_octahedron_transform.cc:21
draco::EncodedGeometryType
EncodedGeometryType
Definition
compression_shared.h:41
draco::TRIANGULAR_MESH
@ TRIANGULAR_MESH
Definition
compression_shared.h:44
draco::DecoderOptions
DracoOptions< GeometryAttribute::Type > DecoderOptions
Definition
decoder_options.h:30
point_cloud_decoder.h
draco::MeshAttributeIndicesEncodingData
Definition
mesh_attribute_indices_encoding_data.h:27
draco
compression
mesh
mesh_decoder.h
Generated by
1.15.0