15#ifndef DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_TEX_COORDS_PORTABLE_ENCODER_H_
16#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_MESH_PREDICTION_SCHEME_TEX_COORDS_PORTABLE_ENCODER_H_
30template <
typename DataTypeT,
class TransformT,
class MeshDataT>
45 int num_components,
const PointIndex *entry_to_point_id_map)
override;
54 if (!predictor_.IsInitialized()) {
78 predictor_.SetPositionAttribute(*att);
87template <
typename DataTypeT,
class TransformT,
class MeshDataT>
88bool MeshPredictionSchemeTexCoordsPortableEncoder<DataTypeT, TransformT,
90 ComputeCorrectionValues(
const DataTypeT *in_data,
CorrType *out_corr,
91 int size,
int num_components,
98 static_cast<int>(this->
mesh_data().data_to_corner_map()->
size() - 1);
101 if (!predictor_.template ComputePredictedValue<true>(corner_id, in_data,
106 const int dst_offset = p * num_components;
107 this->
transform().ComputeCorrection(in_data + dst_offset,
108 predictor_.predicted_value(),
109 out_corr + dst_offset);
114template <
typename DataTypeT,
class TransformT,
class MeshDataT>
119 const int32_t num_orientations = predictor_.num_orientations();
120 buffer->
Encode(num_orientations);
121 bool last_orientation =
true;
124 for (
int i = 0; i < num_orientations; ++i) {
125 const bool orientation = predictor_.orientation(i);
126 encoder.
EncodeBit(orientation == last_orientation);
127 last_orientation = orientation;
Definition encoder_buffer.h:29
bool Encode(const T &data)
Definition encoder_buffer.h:60
uint8_t num_components() const
Definition geometry_attribute.h:263
Type attribute_type() const
Definition geometry_attribute.h:256
Type
Definition geometry_attribute.h:46
@ POSITION
Definition geometry_attribute.h:52
MeshPredictionSchemeEncoder(const PointAttribute *attribute, const TransformT &transform, const MeshDataT &mesh_data)
Definition mesh_prediction_scheme_encoder.h:31
const MeshData & mesh_data() const
Definition mesh_prediction_scheme_encoder.h:38
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:32
MeshPredictionSchemeTexCoordsPortableEncoder(const PointAttribute *attribute, const TransformT &transform, const MeshDataT &mesh_data)
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:36
typename MeshPredictionSchemeEncoder< DataTypeT, TransformT, MeshDataT >::CorrType CorrType
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:34
bool SetParentAttribute(const PointAttribute *att) override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:71
bool IsInitialized() const override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:53
int GetNumParentAttributes() const override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:63
bool ComputeCorrectionValues(const DataTypeT *in_data, CorrType *out_corr, int size, int num_components, const PointIndex *entry_to_point_id_map) override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:90
bool EncodePredictionData(EncoderBuffer *buffer) override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:116
GeometryAttribute::Type GetParentAttributeType(int i) const override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:65
PredictionSchemeMethod GetPredictionMethod() const override
Definition mesh_prediction_scheme_tex_coords_portable_encoder.h:49
Definition mesh_prediction_scheme_tex_coords_portable_predictor.h:33
void SetEntryToPointIdMap(const PointIndex *map)
Definition mesh_prediction_scheme_tex_coords_portable_predictor.h:44
Definition point_attribute.h:33
const PointAttribute * attribute() const
Definition prediction_scheme_encoder.h:79
const Transform & transform() const
Definition prediction_scheme_encoder.h:80
Definition rans_bit_encoder.h:28
void EndEncoding(EncoderBuffer *target_buffer)
Definition rans_bit_encoder.cc:75
void EncodeBit(bool bit)
Definition rans_bit_encoder.cc:31
void StartEncoding()
Definition rans_bit_encoder.cc:29
#define DRACO_DCHECK_EQ(a, b)
Definition macros.h:81
n< br > font size
Definition meshpage.php:3536
Definition attribute_octahedron_transform.cc:21
CornerIndex CornerIndex
Definition mesh_edgebreaker_encoder_impl.cc:35
PredictionSchemeMethod
Definition compression_shared.h:80
@ MESH_PREDICTION_TEX_COORDS_PORTABLE
Definition compression_shared.h:90
Definition GameApi_pl.cc:29382