From 2b047e1ac31c211a1b9b6a00d6cec045d84fda3a Mon Sep 17 00:00:00 2001 From: Ondrej Stava Date: Mon, 6 Feb 2023 20:52:00 -0800 Subject: [PATCH] Fixed broken test. --- .../point_cloud_sequential_encoding_test.cc | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc b/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc index e3ed7a4..32be120 100644 --- a/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc +++ b/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc @@ -12,12 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. // -#include "draco/attributes/point_attribute.h" #include "draco/compression/point_cloud/point_cloud_sequential_decoder.h" #include "draco/compression/point_cloud/point_cloud_sequential_encoder.h" #include "draco/core/draco_test_base.h" #include "draco/core/draco_test_utils.h" -#include "draco/core/draco_types.h" #include "draco/io/obj_decoder.h" namespace draco { @@ -86,46 +84,6 @@ TEST_F(PointCloudSequentialEncodingTest, EncodingPointCloudWithMetadata) { ASSERT_NE(requested_att_metadata, nullptr); ASSERT_EQ(requested_att_metadata->att_unique_id(), pc->attribute(pos_att_id)->unique_id()); - - std::unique_ptr polyline(new PointCloud()); - polyline->set_num_points(total_num_vertices); - std::unique_ptr pos(new PointAttribute()); - pos->Init(GeometryAttribute::POSITION, 3, DT_FLOAT32, false, - total_num_vertices); - pos->SetIdentityMapping(); // Each point has a separate value. - - std::unique_ptr polyline_indices(new PointAttribute()); - polyline_indices->Init(GeometryAttribute::GENERIC, 1, DT_INT32, false, - num_polylines); - // Multiple points can share the same value. - polyline_indices->SetExplicitMapping(total_num_vertices); - - AttributeValueIndex pos_avi(0); - for (int poly_i = 0; poly_i < num_polylines; ++poly_i) { - polyline_indices->SetAttributeValue(AttributeValueIndex(poly_i), &poly_i); - for (int poly_vi = 0; poly_vi < num_poly_vertices(poly_i); ++poly_vi) { - Vector3f vert_pos = GetPolyVertex(poly_i, poly_vi); - pos->SetAttributeValue(pos_avi, &vert_pos[0]); - - // Maps the added point to the polyline index. Note that in this case - // PointIndex corresponds to the position attribute index. - polyline_indices->SetPointMapEntry(PointIndex(pos_avi.value()), - AttributeValueIndex(poly_i)); - - pos_avi++; - } - } - const int pos_att_id = polyline->AddAttribute(std::move(pos)); - polyline->AddAttribute(std::move(polyline_indices)); - - // Encode the point cloud. - ExpertEncoder encoder(*pc); - // Or POINT - encoder.SetEncodingMethod(POINT_CLOUD_SEQUENTIAL_ENCODING); - encoder.SetSpeedOptions(3, 3); - encoder.SetAttributeQuantization(pos_att_id, quantization_bits); - EncoderBuffer buffer; - encoder.EncodeToBuffer(&buffer); } // TODO(ostava): Test the reusability of a single instance of the encoder and