tfg.geometry.representation.mesh.normals.face_normals
Computes face normals for meshes.
tfg.geometry.representation.mesh.normals.face_normals(
faces: type_alias.TensorLike,
clockwise: bool = True,
normalize: bool = True,
name: str = 'normals_face_normals'
) -> type_alias.TensorLike
This function supports planar convex polygon faces. Note that for
non-triangular faces, this function uses the first 3 vertices of each
face to calculate the face normal.
Note |
In the following, A1 to An are optional batch dimensions.
|
Args |
faces
|
A tensor of shape [A1, ..., An, M, 3] , which stores vertices
positions of each face, where M is the number of vertices of each face.
The rank of this tensor should be at least 2.
|
clockwise
|
Winding order to determine front-facing faces. The order of
vertices should be either clockwise or counterclockwise.
|
normalize
|
A bool defining whether output normals are normalized.
|
name
|
A name for this op. Defaults to "normals_face_normals".
|
Returns |
A tensor of shape [A1, ..., An, 3] containing the face normals.
|
Raises |
ValueError
|
If the shape of vertices , faces is not supported.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[null,null,["Last updated 2022-10-28 UTC."],[],[]]