mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 11:52:50 +08:00
Scale leaves verts normals unchanged
Summary: There is no need to recalculate normals when scaling a mesh by a constant. We omit doing this for vertex normals. This will make things less confusing when we allow user-specified vertex normals. Face normals also don't need recalculating, but they are calculated at the same time as face areas which do, so it is easiest not to change their behavior here. That is convenient because we are not immediately planning to allow user-specified face normals. Reviewed By: nikhilaravi Differential Revision: D27793476 fbshipit-source-id: 827f1be4bc78bf0391ce3959cce48c4f3ee326fe
This commit is contained in:
parent
e9f4e0d086
commit
17633808d8
@ -1336,15 +1336,13 @@ class Meshes(object):
|
||||
if len(verts) > 0:
|
||||
self._verts_padded[i, : verts.shape[0], :] = verts
|
||||
|
||||
# update face areas and normals and vertex normals
|
||||
# update face areas and normals
|
||||
# only if the original attributes are computed
|
||||
if any(
|
||||
v is not None
|
||||
for v in [self._faces_areas_packed, self._faces_normals_packed]
|
||||
):
|
||||
self._compute_face_areas_normals(refresh=True)
|
||||
if self._verts_normals_packed is not None:
|
||||
self._compute_vertex_normals(refresh=True)
|
||||
return self
|
||||
|
||||
def scale_verts(self, scale):
|
||||
|
Loading…
x
Reference in New Issue
Block a user