Interface HumanFaceFactory


public interface HumanFaceFactory
This interface provides services that instantiates a human face.
  • Method Details

    • create

      static HumanFace create(File file, boolean loadLandmarks) throws IOException
      Reads a 3D human face from the given OBJ file.
      Parameters:
      file - OBJ file
      loadLandmarks - If true, then the constructor aims to load landmarks as well
      Throws:
      IOException - on I/O failure
    • create

      static HumanFace create(File file) throws IOException
      Reads a 3D human face from the given OBJ file.
      Parameters:
      file - OBJ file
      Throws:
      IOException - on I/O failure
    • create

      Recover human face from serialized dump file. As the dump file can contain additional objects, e.g., camera, it is supposed that the given input stream is set to a human face object.
      Parameters:
      in - A dump file as object input stream
      Returns:
      The instance of the human face
      Throws:
      IOException - If reading fails
      ClassNotFoundException - If there is no human face in the stream
    • create

      static HumanFace create(MeshModel model, String id)
      Creates a human face from existing mesh model. The mesh model is stored directly (not copied).
      Parameters:
      model - Mesh model
      id - Canonical path to the OBJ file
      Throws:
      IllegalArgumentException - if the model is null