Skip to content

Commit eee2335

Browse files
committed
Update per comments.
1 parent d5b3fa1 commit eee2335

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/draco/io/ply_decoder.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,9 @@ Status PlyDecoder::DecodeTexCoordData(const PlyElement *face_element) {
179179

180180
// Triangulate polygon assuming the polygon is convex.
181181
const int64_t num_triangles = uv_list_size / 2 - 2;
182-
pushTexcoordPair(uv_list_offset, 0);
182+
183183
for (int64_t ti = 0; ti < num_triangles; ++ti) {
184+
pushTexcoordPair(uv_list_offset, 0);
184185
for (int64_t c = 1; c < 3; ++c) {
185186
pushTexcoordPair(uv_list_offset, ti + c);
186187
}
@@ -193,7 +194,6 @@ Status PlyDecoder::DecodeTexCoordData(const PlyElement *face_element) {
193194
}
194195
// I don't think it works to have this as the only point-mapped attribute
195196
// while the rest of the attributes are identity-mapped.
196-
out_mesh_->set_num_points(num_corners);
197197
out_mesh_->AddAttributeWithConnectivity(std::move(attr), corner_map);
198198
return OkStatus();
199199
}

src/draco/io/ply_decoder_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ TEST_F(PlyDecoderTest, TestPlyTexCoords) {
8888
ASSERT_EQ(att->size(), 4); // 4 unique texture coordinate values.
8989
float vertex_0_tex_coord[2];
9090
att->GetValue(AttributeValueIndex(0), vertex_0_tex_coord);
91-
ASSERT_EQ(vertex_0_tex_coord[0], 0);
91+
ASSERT_EQ(vertex_0_tex_coord[0], 1);
9292
ASSERT_EQ(vertex_0_tex_coord[1], 1);
9393
}
9494

0 commit comments

Comments
 (0)