GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
mesh_sequential_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// The encoder compresses all attribute values using an order preserving
16// attribute encoder (that can still support quantization, prediction schemes,
17// and other features).
18// The mesh connectivity data can be encoded using two modes that are controlled
19// using a global encoder options flag called "compress_connectivity"
20// 1. When "compress_connectivity" == true:
21// All point ids are first delta coded and then compressed using an entropy
22// coding.
23// 2. When "compress_connectivity" == false:
24// All point ids are encoded directly using either 8, 16, or 32 bits per
25// value based on the maximum point id value.
26
27#ifndef DRACO_COMPRESSION_MESH_MESH_SEQUENTIAL_ENCODER_H_
28#define DRACO_COMPRESSION_MESH_MESH_SEQUENTIAL_ENCODER_H_
29
31
32namespace draco {
33
34// Class that encodes mesh data using a simple binary representation of mesh's
35// connectivity and geometry.
37 public:
39 uint8_t GetEncodingMethod() const override {
41 }
42
43 protected:
44 Status EncodeConnectivity() override;
45 bool GenerateAttributesEncoder(int32_t att_id) override;
46 void ComputeNumberOfEncodedPoints() override;
47 void ComputeNumberOfEncodedFaces() override;
48
49 private:
50 // Returns false on error.
51 bool CompressAndEncodeIndices();
52};
53
54} // namespace draco
55
56#endif // DRACO_COMPRESSION_MESH_MESH_SEQUENTIAL_ENCODER_H_
MeshEncoder()
Definition mesh_encoder.cc:21
void ComputeNumberOfEncodedFaces() override
Definition mesh_sequential_encoder.cc:126
uint8_t GetEncodingMethod() const override
Definition mesh_sequential_encoder.h:39
void ComputeNumberOfEncodedPoints() override
Definition mesh_sequential_encoder.cc:122
bool GenerateAttributesEncoder(int32_t att_id) override
Definition mesh_sequential_encoder.cc:82
Status EncodeConnectivity() override
Definition mesh_sequential_encoder.cc:30
MeshSequentialEncoder()
Definition mesh_sequential_encoder.cc:28
Definition status.h:25
Definition attribute_octahedron_transform.cc:21
@ MESH_SEQUENTIAL_ENCODING
Definition compression_shared.h:56