Package cz.fidentis.analyst.data.mesh
Interface MeshFactory
public interface MeshFactory
This interface provides services that instantiates objects related to meshes.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic MeshFacetcloneMeshFacet(MeshFacet facet) Returns facet's clone.static MeshModelcloneMeshModel(MeshModel meshModel) Returns model's deep copy by cloning all model's facets.static MeshPointcreateAverageMeshPoint(Collection<MeshPoint> meshPoints) Creates an average mesh point from given points.static MeshFacetReturns an empty facet that is to be filled by vertices and topology later on.static MeshModelReturns an empty mesh modelstatic MeshPointcreateMeshPoint(javax.vecmath.Point3d position) Returns new mesh point.static MeshPointcreateMeshPoint(javax.vecmath.Point3d position, javax.vecmath.Vector3d normal, javax.vecmath.Vector3d texCoord, Curvature curvature) Returns new mesh point.static MeshFacetcreatePointCloudFacet(Collection<MeshPoint> meshPoints) Returns a facet consisting of mesh points only, without mesh topology (edges).static voidregisterClassesInKryo(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.
-
Method Details
-
createEmptyMeshModel
Returns an empty mesh model- Returns:
- an empty mesh model
-
cloneMeshModel
Returns model's deep copy by cloning all model's facets.- Parameters:
meshModel- Original mesh model- Returns:
- A copy of the mesh model
-
createPointCloudFacet
Returns a facet consisting of mesh points only, without mesh topology (edges).- Parameters:
meshPoints- Points of the mesh (point cloud). Must not benull- Returns:
- a facet consisting of mesh points only, without mesh topology (edges)
-
createEmptyMeshFacet
Returns an empty facet that is to be filled by vertices and topology later on.- Returns:
- an empty facet
-
cloneMeshFacet
Returns facet's clone. Both vertices and topology connections (edges) are duplicated.- Parameters:
facet- Mesh facet to be duplicated. Must not benull- 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 locationnormal- Normal vector. Can benulltexCoord- Texture coordinates. Can benullcurvature- Curvature of the mesh point. Can benull- Returns:
- new mesh point
-
createMeshPoint
Returns new mesh point. Normal vector and texture coordinates are set tonull- Parameters:
position- 3D location- Returns:
- new mesh point
-
createAverageMeshPoint
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 benullor empty- Returns:
- new mesh point
-
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 benull
-