Allow setting verts_normals on Meshes

Summary: Add ability to set the vertex normals when creating a Meshes, so that the pluggable loaders can return them from a file.

Reviewed By: nikhilaravi

Differential Revision: D27765258

fbshipit-source-id: b5ddaa00de3707f636f94d9f74d1da12ecce0608
This commit is contained in:
Jeremy Reizenstein
2021-05-04 05:35:24 -07:00
committed by Facebook GitHub Bot
parent 502f15aca7
commit 2bbca5f2a7
3 changed files with 68 additions and 5 deletions

View File

@@ -223,7 +223,7 @@ class TestMeshNormalConsistency(unittest.TestCase):
Test Mesh Normal Consistency for a mesh known to have no
intersecting faces.
"""
verts = torch.rand(1, 6, 2)
verts = torch.rand(1, 6, 3)
faces = torch.arange(6).reshape(1, 2, 3)
meshes = Meshes(verts=verts, faces=faces)
out = mesh_normal_consistency(meshes)