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 of normal vectors.
  By default, the array will be (N, 3) with one entry per unique vertex in the mesh.
  If indexed is 'faces', then the array will contain three normal vectors per face
  (and some vertexes may be repeated).
docstr_tok: ["Return","an","array","of","normal","vectors",".","By","default",",","the","array","will","be","(","N",",","3",")","with","one","entry","per","unique","vertex","in","the","mesh",".","If","indexed","is","'faces","'",",","then","the","array","will","contain","three","normal","vectors","per","face","(","and","some","vertexes","may","be","repeated",")","."]
code: def vertexNormals(self, indexed=None):
      """
      Return an array of normal vectors.
      By default, the array will be (N, 3) with one entry per unique vertex in the mesh.
      If indexed is 'faces', then the array will contain three normal vectors per face
      (and some vertexes may be repeated).
      """
      if self._vertexNormals is None:
          faceNorms = self.faceNormals()
          vertFaces = self.vertexFaces()
          self._vertexNormals = np.empty(
              self._vertexes.shape, dtype=np.float32
          )
          for vindex in range(self._vertexes.shape[0]):
              faces = vertFaces[vindex]
              if len(faces) == 0:
                  self._vertexNormals[vindex] = (0, 0, 0)
                  continue
              norms = faceNorms[faces]  ## get all face normals
              norm = norms.sum(axis=0)  ## sum normals
              norm /= (norm**2).sum() ** 0.5  ## and re-normalize
              self._vertexNormals[vindex] = norm
  
      if indexed is None:
          return self._vertexNormals
      elif indexed == "faces":
          return self._vertexNormals[self.faces()]
      else:
          raise Exception(
              "Invalid indexing mode. Accepts: None, 'faces'"
          )
  
imports: import numpy
  from ..Qt import QtGui
label_desc: Use image node_id 13 for calling the MeshData obj's underlying member method code with example usage: obj.vertexNormals(indexed) and returns: self, self