Interface MeshFactory


public interface MeshFactory
This interface provides services that instantiates objects related to meshes.
  • Method Details

    • createEmptyMeshModel

      static MeshModel createEmptyMeshModel()
      Returns an empty mesh model
      Returns:
      an empty mesh model
    • cloneMeshModel

      static MeshModel cloneMeshModel(MeshModel meshModel)
      Returns model's deep copy by cloning all model's facets.
      Parameters:
      meshModel - Original mesh model
      Returns:
      A copy of the mesh model
    • createPointCloudFacet

      static MeshFacet createPointCloudFacet(Collection<MeshPoint> meshPoints)
      Returns a facet consisting of mesh points only, without mesh topology (edges).
      Parameters:
      meshPoints - Points of the mesh (point cloud). Must not be null
      Returns:
      a facet consisting of mesh points only, without mesh topology (edges)
    • createEmptyMeshFacet

      static MeshFacet createEmptyMeshFacet()
      Returns an empty facet that is to be filled by vertices and topology later on.
      Returns:
      an empty facet
    • cloneMeshFacet

      static MeshFacet cloneMeshFacet(MeshFacet facet)
      Returns facet's clone. Both vertices and topology connections (edges) are duplicated.
      Parameters:
      facet - Mesh facet to be duplicated. Must not be null
      Returns:
      Facet's clone
    • createMeshPoint

      static MeshPoint createMeshPoint(javax.vecmath.Point3d position, javax.vecmath.Vector3d normal, javax.vecmath.Vector3d texCoord, Curvature curvature)
      Returns new mesh point.
      Parameters:
      position - 3D location
      normal - Normal vector. Can be null
      texCoord - Texture coordinates. Can be null
      curvature - Curvature of the mesh point. Can be null
    • createMeshPoint

      static MeshPoint createMeshPoint(javax.vecmath.Point3d position)
      Returns new mesh point. Normal vector and texture coordinates are set to null
      Parameters:
      position - 3D location
    • createAverageMeshPoint

      static MeshPoint createAverageMeshPoint(Collection<MeshPoint> meshPoints)
      Creates an average mesh point from given points.
      • The normal vector is determined by averaging the normal vectors of all points.
      • The minimal principal curvature is taken from the point with maximal value.
      • The maximal principal curvature is taken from the point with minimal value.
      • The Gaussian curvature are taken from the point for which the absolute value of its Gaussian curvature is the largest.
      • The mean curvature is computed by averaging mean curvatures of points.
      Parameters:
      meshPoints - Mesh points. Must not be null or empty
    • registerClassesInKryo

      static void registerClassesInKryo(com.esotericsoftware.kryo.Kryo kryo)
      Registers relevant mesh-related classes in the Kryo object so that their instances can be serialized quickly using the Kryo serialization library. The Kryo serialization is used by auto-swapping algorithms of the FIDENTIS.
      Parameters:
      kryo - A Kryo serialization instance. Must not be null