Differential D9642 Diff 31357 extern/draco/draco/src/draco/compression/point_cloud/algorithms/float_points_tree_encoder.h
Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/draco/src/draco/compression/point_cloud/algorithms/float_points_tree_encoder.h
- This file was moved from extern/draco/dracoenc/src/draco/compression/point_cloud/algorithms/float_points_tree_encoder.h.
| Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | bool FloatPointsTreeEncoder::EncodePointCloud(InputIteratorT points_begin, | ||||
| // Encode header. | // Encode header. | ||||
| buffer()->Encode(version_); | buffer()->Encode(version_); | ||||
| buffer()->Encode(static_cast<int8_t>(method_)); | buffer()->Encode(static_cast<int8_t>(method_)); | ||||
| buffer()->Encode(qinfo_.quantization_bits); | buffer()->Encode(qinfo_.quantization_bits); | ||||
| buffer()->Encode(qinfo_.range); | buffer()->Encode(qinfo_.range); | ||||
| buffer()->Encode(num_points_); | buffer()->Encode(num_points_); | ||||
| if (method_ == KDTREE) | if (method_ == KDTREE) { | ||||
| buffer()->Encode(compression_level_); | buffer()->Encode(compression_level_); | ||||
| } | |||||
| if (num_points_ == 0) | if (num_points_ == 0) { | ||||
| return true; | return true; | ||||
| } | |||||
| if (method_ == KDTREE) { | if (method_ == KDTREE) { | ||||
| return EncodePointCloudKdTreeInternal(&qpoints); | return EncodePointCloudKdTreeInternal(&qpoints); | ||||
| } else { // Unsupported method. | } else { // Unsupported method. | ||||
| fprintf(stderr, "Method not supported. \n"); | fprintf(stderr, "Method not supported. \n"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| } // namespace draco | } // namespace draco | ||||
| #endif // DRACO_COMPRESSION_POINT_CLOUD_ALGORITHMS_FLOAT_POINTS_TREE_ENCODER_H_ | #endif // DRACO_COMPRESSION_POINT_CLOUD_ALGORITHMS_FLOAT_POINTS_TREE_ENCODER_H_ | ||||