Interface HumanFace

All Superinterfaces:
HumanFaceEventBus, Serializable
All Known Implementing Classes:
HumanFaceImpl

public interface HumanFace extends HumanFaceEventBus, Serializable
A single human face consisting of a mesh, feature points, space partitioning structures, and other data structures.
  • Method Details

    • getMeshModel

      MeshModel getMeshModel()
      Returns the triangular mesh model of the human face.
      Returns:
      the triangular mesh model of the human face
    • setMeshModel

      void setMeshModel(MeshModel meshModel)
      Sets the mesh model.
      Parameters:
      meshModel - new mesh model, must not be null
      Throws:
      IllegalArgumentException - if new model is missing
    • setSymmetryPlane

      void setSymmetryPlane(Plane plane)
      Sets the symmetry plane. If the input argument is null, then removes the plane.
      Parameters:
      plane - The new symmetry plane
    • getSymmetryPlane

      Plane getSymmetryPlane()
      Returns:
      The face's symmetry plane
    • hasSymmetryPlane

      boolean hasSymmetryPlane()
      Returns true if the face has the symmetry plane computed.
      Returns:
      true if the face has the symmetry plane computed.
    • loadFeaturePoints

      void loadFeaturePoints(String path, String fileName) throws IOException
      Reads feature points from a file on the given path.
      Parameters:
      path - Directory where the file is located
      fileName - Name of the file
      Throws:
      IOException - on I/O failure
    • getAllLandmarks

      List<Landmark> getAllLandmarks()
      Returns all feature points or empty list.
      Returns:
      The face's feature points.
    • getStandardFeaturePoints

      List<Landmark> getStandardFeaturePoints()
      Returns:
      list of standard feature points
    • getCustomLandmarks

      List<Landmark> getCustomLandmarks()
      Returns:
      list of custom feature points
    • addCustomLandmark

      void addCustomLandmark(Landmark landmark)
      Adds custom landmark to face
    • removeCustomLandmark

      boolean removeCustomLandmark(Landmark landmark)
      Removes custom landmark from face
      Parameters:
      landmark - Landmark to remove
      Returns:
      true if the landmark was removed, false otherwise
    • hasLandmarks

      boolean hasLandmarks()
      Checks if HumanFace has feature points
      Returns:
      true if yes and false if not
    • getId

      String getId()
      Returns unique ID of the face.
      Returns:
      unique ID of the face.
    • getPath

      String getPath()
      Returns canonical path to the face file
      Returns:
      canonical path to the face file
    • getShortName

      String getShortName()
      Returns short name of the face without its path in the name. May not be unique.
      Returns:
      short name of the face without its path in the name
    • getDirectory

      String getDirectory()
      Returns canonical path to the folder in which the face file is located, i.e., getPath() with getShortName() suffix removed.
      Returns:
      Returns canonical path to the folder in which the face file is located
    • getOctree

      Octree getOctree()
      Returns already computed octree of the triangular mesh or null.
      Returns:
      Already computed octree of the triangular mesh or null
    • hasOctree

      boolean hasOctree()
      Checks if HumanFace has octree calculated
      Returns:
      true if yes and false if not
    • setOctree

      void setOctree(Octree octree)
      Sets teh octree
      Parameters:
      octree - New octree. Can be null
    • getKdTree

      KdTree getKdTree()
      Returns already computed k-d tree of the triangular mesh or null.
      Returns:
      Already computed k-d tree of the triangular mesh or null
    • setKdTree

      void setKdTree(KdTree kdTree)
      Sets teh octree
      Parameters:
      kdTree - New k-d tree. Can be null
    • hasKdTree

      boolean hasKdTree()
      Checks if HumanFace has KdTree calculated
      Returns:
      true if yes and false if not
    • getSurfaceMask

      SurfaceMask getSurfaceMask()
      Returns Interactive mask. The mask can be empty;
      Returns:
      the interactive mask
    • getState

      HumanFaceState getState()
      Returns a deep copy of current state.
      Returns:
      a deep copy of current state.
    • setState

      void setState(HumanFaceState state)
      Falls back to given state. No event is triggered - it up to the caller.
      Parameters:
      state - Old state. Must not be null
    • getGlyphs

      List<Glyph> getGlyphs()
      Gets the glyphs of the face or empty list
      Returns:
      list of glyphs or empty list
    • setGlyphs

      void setGlyphs(List<Glyph> glyphs)
      Sets the glyphs.
      Parameters:
      glyphs - Glyphs. Can be null
    • hasGlyphs

      boolean hasGlyphs()
      Checks if the human face has assigned glyphs
      Returns:
      true, if the glyphs exist
    • getBoundingBox

      Box getBoundingBox()
      Returns bounding box or null
      Returns:
      bounding box or null
    • setBoundingBox

      void setBoundingBox(Box boundingBox)
      Set a bounding box.
      Parameters:
      boundingBox - Bounding box or null
    • hasBoundingBox

      boolean hasBoundingBox()
      Checks if the human face has assigned a bounding box
      Returns:
      true, if the bounding box exists
    • setSurfaceMask

      void setSurfaceMask(SurfaceMask surfaceMask)
      Set a surface mask.
      Parameters:
      surfaceMask - surfaceMask or null