GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
mesh_edgebreaker_encoder.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_EDGEBREAKER_ENCODER_H_
16#define DRACO_COMPRESSION_MESH_MESH_EDGEBREAKER_ENCODER_H_
17
18#include <unordered_map>
19
24
25namespace draco {
26
27// Class implements the edge breaker geometry compression method as described
28// in "3D Compression Made Simple: Edgebreaker on a Corner-Table" by Rossignac
29// at al.'01. http://www.cc.gatech.edu/~jarek/papers/CornerTableSMI.pdf
31 public:
33
34 const CornerTable *GetCornerTable() const override {
35 return impl_->GetCornerTable();
36 }
37
39 int att_id) const override {
40 return impl_->GetAttributeCornerTable(att_id);
41 }
42
44 int att_id) const override {
45 return impl_->GetAttributeEncodingData(att_id);
46 }
47
48 uint8_t GetEncodingMethod() const override {
50 }
51
52 protected:
53 bool InitializeEncoder() override;
54 Status EncodeConnectivity() override;
55 bool GenerateAttributesEncoder(int32_t att_id) override;
56 bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) override;
57 void ComputeNumberOfEncodedPoints() override;
58 void ComputeNumberOfEncodedFaces() override;
59
60 private:
61 // The actual implementation of the edge breaker method. The implementations
62 // are in general specializations of a template class
63 // MeshEdgebreakerEncoderImpl where the template arguments control encoding
64 // of the connectivity data. The actual implementation is selected in this
65 // class based on the provided encoding options. Because this choice is done
66 // in run-time, the actual implementation has to be hidden behind the
67 // abstract interface MeshEdgebreakerEncoderImplInterface.
68 std::unique_ptr<MeshEdgebreakerEncoderImplInterface> impl_;
69};
70
71} // namespace draco
72
73#endif // DRACO_COMPRESSION_MESH_MESH_EDGEBREAKER_ENCODER_H_
Definition corner_table.h:53
Definition mesh_attribute_corner_table.h:30
void ComputeNumberOfEncodedFaces() override
Definition mesh_edgebreaker_encoder.cc:184
const CornerTable * GetCornerTable() const override
Definition mesh_edgebreaker_encoder.h:34
const MeshAttributeIndicesEncodingData * GetAttributeEncodingData(int att_id) const override
Definition mesh_edgebreaker_encoder.h:43
void ComputeNumberOfEncodedPoints() override
Definition mesh_edgebreaker_encoder.cc:91
uint8_t GetEncodingMethod() const override
Definition mesh_edgebreaker_encoder.h:48
bool EncodeAttributesEncoderIdentifier(int32_t att_encoder_id) override
Definition mesh_edgebreaker_encoder.cc:79
const MeshAttributeCornerTable * GetAttributeCornerTable(int att_id) const override
Definition mesh_edgebreaker_encoder.h:38
MeshEdgebreakerEncoder()
Definition mesh_edgebreaker_encoder.cc:25
Status EncodeConnectivity() override
Definition mesh_edgebreaker_encoder.cc:87
bool GenerateAttributesEncoder(int32_t att_id) override
Definition mesh_edgebreaker_encoder.cc:72
bool InitializeEncoder() override
Definition mesh_edgebreaker_encoder.cc:27
MeshEncoder()
Definition mesh_encoder.cc:21
Definition status.h:25
Definition attribute_octahedron_transform.cc:21
@ MESH_EDGEBREAKER_ENCODING
Definition compression_shared.h:57
Definition mesh_attribute_indices_encoding_data.h:27