Record Class MeshDistanceConfig
java.lang.Object
java.lang.Record
cz.fidentis.analyst.engines.distance.MeshDistanceConfig
- Record Components:
method
- Distance calculation methodkdTree
- K-d tree of the mesh to which distance from other meshes is to be computed. Either this parameter or theoctree
must not benull
, depending on the method used.octree
- Octree of the mesh to which distance from other meshes is to be computed. Either this parameter or thekdTree
must not benull
, depending on the method used.gpuData
- Wrapper with data for GPU computing, can benull
if you do not want to use GPU-based method.relativeDist
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present) i.e., we can get negative distances.crop
- Iftrue
, then only parts of the visited secondary faces that overlay the primary face are taken into account. Parts (vertices) that are out of the surface of the primary face are ignored (their distance is set toNaN
). This feature makes the nearest-neighbor distance computation more symmetric. On the contrary, this parameter is ignored by ray-casting methods.
public record MeshDistanceConfig(MeshDistanceConfig.Method method, KdTree kdTree, Octree octree, MeshDistanceConfig.GPUData gpuData, boolean relativeDist, boolean crop)
extends Record
Mesh-to-mesh distance strategies and their configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Wrapper with data for GPU computing.static enum
Sampling method. -
Constructor Summary
ConstructorsConstructorDescriptionMeshDistanceConfig
(MeshDistanceConfig.Method method, KdTree kdTree, boolean relativeDist, boolean crop) Constructor for the nearest-neighbor distance methods only, when the k-D tree already exists.MeshDistanceConfig
(MeshDistanceConfig.Method method, KdTree kdTree, Octree octree, MeshDistanceConfig.GPUData gpuData, boolean relativeDist, boolean crop) Creates an instance of aMeshDistanceConfig
record class.MeshDistanceConfig
(MeshDistanceConfig.Method method, MeshFacet mainFacet, com.jogamp.opengl.GLContext context, boolean relativeDist, boolean crop) Constructor that creates k-d tree or octree automatically based on required method.MeshDistanceConfig
(MeshDistanceConfig.Method method, MeshModel mainModel, com.jogamp.opengl.GLContext context, boolean relativeDist, boolean crop) Constructor that creates k-d tree or octree automatically based on required method.MeshDistanceConfig
(MeshDistanceConfig.Method method, Octree octree, boolean relativeDist) Constructor for the ray-casting distance methods only, when the octree already exists.MeshDistanceConfig
(MeshDistanceConfig.Method method, Collection<MeshFacet> mainFacets, com.jogamp.opengl.GLContext context, boolean relativeDist, boolean crop) Constructor that creates k-d tree or octree automatically based on required method. -
Method Summary
Modifier and TypeMethodDescriptionboolean
crop()
Returns the value of thecrop
record component.final boolean
Indicates whether some other object is "equal to" this one.Instantiates and returns a point sampling visitor.gpuData()
Returns the value of thegpuData
record component.final int
hashCode()
Returns a hash code value for this object.kdTree()
Returns the value of thekdTree
record component.method()
Returns the value of themethod
record component.octree()
Returns the value of theoctree
record component.boolean
Returns the value of therelativeDist
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MeshDistanceConfig
public MeshDistanceConfig(MeshDistanceConfig.Method method, KdTree kdTree, boolean relativeDist, boolean crop) Constructor for the nearest-neighbor distance methods only, when the k-D tree already exists.- Parameters:
method
- Distance calculation methodkdTree
- K-d tree of the mesh to which distance from other meshes is to be computed. Must not benull
relativeDist
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present) i.e., we can get negative distances.crop
- Iftrue
, then only parts of the visited secondary faces that overlay the primary face are taken into account. Parts (vertices) that are out of the surface of the primary face are ignored (their distance is set toNaN
). This feature makes the nearest-neighbor distance computation more symmetric. On the contrary, this parameter is ignored by ray-casting methods.
-
MeshDistanceConfig
Constructor for the ray-casting distance methods only, when the octree already exists.- Parameters:
method
- Distance calculation methodoctree
- An octree of the mesh to which distance from other meshes is to be computed. Must not benull
relativeDist
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present) i.e., we can get negative distances.
-
MeshDistanceConfig
public MeshDistanceConfig(MeshDistanceConfig.Method method, Collection<MeshFacet> mainFacets, com.jogamp.opengl.GLContext context, boolean relativeDist, boolean crop) Constructor that creates k-d tree or octree automatically based on required method.- Parameters:
method
- Distance calculation methodmainFacets
- Facets to which distance from other facets is to be computed. Must not benull
context
- Active OpenGL context on which makeCurrent() can be called.relativeDist
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present) i.e., we can get negative distances.crop
- Iftrue
, then only parts of the visited secondary faces that overlay the primary face are taken into account. Parts (vertices) that are out of the surface of the primary face are ignored (their distance is set toNaN
). This feature makes the distance computation more symmetric. On the contrary, this parameter is ignored by ray-casting methods.
-
MeshDistanceConfig
public MeshDistanceConfig(MeshDistanceConfig.Method method, MeshFacet mainFacet, com.jogamp.opengl.GLContext context, boolean relativeDist, boolean crop) Constructor that creates k-d tree or octree automatically based on required method.- Parameters:
method
- Distance calculation methodmainFacet
- Facet to which distance from other facets is to be computed. Must not benull
context
- Active OpenGL context on which makeCurrent() can be called.relativeDist
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present) i.e., we can get negative distances.crop
- Iftrue
, then only parts of the visited secondary faces that overlay the primary face are taken into account. Parts (vertices) that are out of the surface of the primary face are ignored (their distance is set toNaN
). This feature makes the distance computation more symmetric. On the contrary, this parameter is ignored by ray-casting methods.
-
MeshDistanceConfig
public MeshDistanceConfig(MeshDistanceConfig.Method method, MeshModel mainModel, com.jogamp.opengl.GLContext context, boolean relativeDist, boolean crop) Constructor that creates k-d tree or octree automatically based on required method.- Parameters:
method
- Distance calculation methodmainModel
- Mesh model to which distance from other facets is to be computed. Must not benull
context
- Active OpenGL context on which makeCurrent() can be called.relativeDist
- If true, then the visitor calculates the relative distances with respect to the normal vectors of source facets (normal vectors have to present) i.e., we can get negative distances.crop
- Iftrue
, then only parts of the visited secondary faces that overlay the primary face are taken into account. Parts (vertices) that are out of the surface of the primary face are ignored (their distance is set toNaN
). This feature makes the distance computation more symmetric. On the contrary, this parameter is ignored by ray-casting methods.
-
MeshDistanceConfig
public MeshDistanceConfig(MeshDistanceConfig.Method method, KdTree kdTree, Octree octree, MeshDistanceConfig.GPUData gpuData, boolean relativeDist, boolean crop) Creates an instance of aMeshDistanceConfig
record class.- Parameters:
method
- the value for themethod
record componentkdTree
- the value for thekdTree
record componentoctree
- the value for theoctree
record componentgpuData
- the value for thegpuData
record componentrelativeDist
- the value for therelativeDist
record componentcrop
- the value for thecrop
record component
-
-
Method Details
-
getVisitor
Instantiates and returns a point sampling visitor.- Returns:
- a point sampling visitor
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
method
Returns the value of themethod
record component.- Returns:
- the value of the
method
record component
-
kdTree
Returns the value of thekdTree
record component.- Returns:
- the value of the
kdTree
record component
-
octree
Returns the value of theoctree
record component.- Returns:
- the value of the
octree
record component
-
gpuData
Returns the value of thegpuData
record component.- Returns:
- the value of the
gpuData
record component
-
relativeDist
public boolean relativeDist()Returns the value of therelativeDist
record component.- Returns:
- the value of the
relativeDist
record component
-
crop
public boolean crop()Returns the value of thecrop
record component.- Returns:
- the value of the
crop
record component
-