class_docstr: Class for storing and operating on 3D mesh data. May contain:
  
    - list of vertex locations
    - list of edges
    - list of triangles
    - colors per vertex, edge, or tri
    - normals per vertex or tri
  
  This class handles conversion between the standard [list of vertexes, list of faces]
  format (suitable for use with glDrawElements) and 'indexed' [list of vertexes] format
  (suitable for use with glDrawArrays). It will automatically compute face normal
  vectors as well as averaged vertex normal vectors. 
  
  The class attempts to be as efficient as possible in caching conversion results and
  avoiding unnecessary conversions.
class_docstr_tok: ["Class","for","storing","and","operating","on","3D","mesh","data",".","May","contain",":","-","list","of","vertex","locations","-","list","of","edges","-","list","of","triangles","-","colors","per","vertex",",","edge",",","or","tri","-","normals","per","vertex","or","tri","This","class","handles","conversion","between","the","standard","[","list","of","vertexes",",","list","of","faces","]","format","(","suitable","for","use","with","glDrawElements",")","and","'indexed","'","[","list","of","vertexes","]","format","(","suitable","for","use","with","glDrawArrays",")",".","It","will","automatically","compute","face","normal","vectors","as","well","as","averaged","vertex","normal","vectors",".","The","class","attempts","to","be","as","efficient","as","possible","in","caching","conversion","results","and","avoiding","unnecessary","conversions","."]
docstr: Return an array (Nf, 3) of normal vectors for each face.
  If indexed='faces', then instead return an indexed array
  (Nf, 3, 3)  (this is just the same array with each vector
  copied three times).
docstr_tok: ["Return","an","array","(","Nf",",","3",")","of","normal","vectors","for","each","face",".","If","indexed='faces","'",",","then","instead","return","an","indexed","array","(","Nf",",","3",",","3",")","(","this","is","just","the","same","array","with","each","vector","copied","three","times",")","."]
code: def faceNormals(self, indexed=None):
      """
      Return an array (Nf, 3) of normal vectors for each face.
      If indexed='faces', then instead return an indexed array
      (Nf, 3, 3)  (this is just the same array with each vector
      copied three times).
      """
      if self._faceNormals is None:
          v = self.vertexes(indexed="faces")
          self._faceNormals = np.cross(
              v[:, 1] - v[:, 0], v[:, 2] - v[:, 0]
          )
  
      if indexed is None:
          return self._faceNormals
      elif indexed == "faces":
          if self._faceNormalsIndexedByFaces is None:
              norms = np.empty(
                  (self._faceNormals.shape[0], 3, 3), dtype=np.float32
              )
              norms[:] = self._faceNormals[:, np.newaxis, :]
              self._faceNormalsIndexedByFaces = norms
          return self._faceNormalsIndexedByFaces
      else:
          raise Exception(
              "Invalid indexing mode. Accepts: None, 'faces'"
          )
  
imports: import numpy
  from ..Qt import QtGui
label_desc: Use image node_id 12 for calling the MeshData obj's underlying member method code with example usage: obj.faceNormals(indexed) and returns: self, self