mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +08:00
has_verts_normals for Meshes
Summary: Add ability to ask a Meshes if it already has normals. If it does, then requesting normals will not trigger a calculation. MeshesFormatInterpreters will therefore be able to decide whether to save normals. Reviewed By: theschnitz, nikhilaravi Differential Revision: D27765261 fbshipit-source-id: 7c87dbf999d5616d20f5eb2c01039ee5ff65a830
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2bbca5f2a7
commit
66b97a0c28
@@ -732,6 +732,12 @@ class Meshes(object):
|
||||
)
|
||||
return self._verts_padded_to_packed_idx
|
||||
|
||||
def has_verts_normals(self) -> bool:
|
||||
"""
|
||||
Check whether vertex normals are already present.
|
||||
"""
|
||||
return self._verts_normals_packed is not None
|
||||
|
||||
def verts_normals_packed(self):
|
||||
"""
|
||||
Get the packed representation of the vertex normals.
|
||||
|
||||
Reference in New Issue
Block a user