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 MeshFacet
cloneMeshFacet
(MeshFacet facet) Returns facet's clone.static MeshModel
cloneMeshModel
(MeshModel meshModel) Returns model's deep copy by cloning all model's facets.static MeshPoint
createAverageMeshPoint
(Collection<MeshPoint> meshPoints) Creates an average mesh point from given points.static MeshFacet
Returns an empty facet that is to be filled by vertices and topology later on.static MeshModel
Returns an empty mesh modelstatic MeshPoint
createMeshPoint
(javax.vecmath.Point3d position) Returns new mesh point.static MeshPoint
createMeshPoint
(javax.vecmath.Point3d position, javax.vecmath.Vector3d normal, javax.vecmath.Vector3d texCoord, Curvature curvature) Returns new mesh point.static MeshFacet
createPointCloudFacet
(Collection<MeshPoint> meshPoints) Returns a facet consisting of mesh points only, without mesh topology (edges).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.
-
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 benull
texCoord
- Texture coordinates. Can benull
curvature
- Curvature of the mesh point. Can benull
-
createMeshPoint
Returns new mesh point. Normal vector and texture coordinates are set tonull
- Parameters:
position
- 3D location
-
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 benull
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 benull
-