GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
sequential_quantization_attribute_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_ATTRIBUTES_SEQUENTIAL_QUANTIZATION_ATTRIBUTE_ENCODER_H_
16#define DRACO_COMPRESSION_ATTRIBUTES_SEQUENTIAL_QUANTIZATION_ATTRIBUTE_ENCODER_H_
17
20
21namespace draco {
22
23class MeshEncoder;
24
25// Attribute encoder that quantizes floating point attribute values. The
26// quantized values can be optionally compressed using an entropy coding.
29 public:
31 uint8_t GetUniqueId() const override {
33 }
34 bool Init(PointCloudEncoder *encoder, int attribute_id) override;
35
36 bool IsLossyEncoder() const override { return true; }
37
38 bool EncodeDataNeededByPortableTransform(EncoderBuffer *out_buffer) override;
39
40 protected:
41 // Put quantized values in portable attribute for sequential encoding.
42 bool PrepareValues(const std::vector<PointIndex> &point_ids,
43 int num_points) override;
44
45 private:
46 // Used for the quantization.
47 AttributeQuantizationTransform attribute_quantization_transform_;
48};
49
50} // namespace draco
51
52#endif // DRACO_COMPRESSION_ATTRIBUTES_SEQUENTIAL_QUANTIZATION_ATTRIBUTE_ENCODER_H_
Definition attribute_quantization_transform.h:27
Definition encoder_buffer.h:29
Definition mesh_encoder.h:27
Definition point_cloud_encoder.h:29
PointCloudEncoder * encoder() const
Definition sequential_attribute_encoder.h:83
int attribute_id() const
Definition sequential_attribute_encoder.h:82
SequentialIntegerAttributeEncoder()
Definition sequential_integer_attribute_encoder.cc:24
SequentialQuantizationAttributeEncoder()
Definition sequential_quantization_attribute_encoder.cc:22
bool PrepareValues(const std::vector< PointIndex > &point_ids, int num_points) override
Definition sequential_quantization_attribute_encoder.cc:73
bool IsLossyEncoder() const override
Definition sequential_quantization_attribute_encoder.h:36
bool Init(PointCloudEncoder *encoder, int attribute_id) override
Definition sequential_quantization_attribute_encoder.cc:24
bool EncodeDataNeededByPortableTransform(EncoderBuffer *out_buffer) override
Definition sequential_quantization_attribute_encoder.cc:69
uint8_t GetUniqueId() const override
Definition sequential_quantization_attribute_encoder.h:31
Definition attribute_octahedron_transform.cc:21
@ SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION
Definition compression_shared.h:75