Class AvgMeshVisitorRC
java.lang.Object
cz.fidentis.analyst.engines.avgmesh.impl.AvgMeshVisitorRC
- All Implemented Interfaces:
KdTreeVisitor
,MeshVisitor
,OctreeVisitor
,AvgMeshVisitor
- Direct Known Subclasses:
AvgMeshVisitorRCGPU
Visitor capable to create an average face by deforming main face template so
that its vertices are in the "average position" with respect to the visited
faces. The average position is computed as the average position of
intersections of visited faces. Intersection are computed using ray casting
It is supposed that the inspected faces are already registered (superimposed with the template ).
-
Constructor Summary
ConstructorsConstructorDescriptionAvgMeshVisitorRC
(MeshFacet templateFacet) Constructor.AvgMeshVisitorRC
(MeshModel templateModel) Constructor.AvgMeshVisitorRC
(Collection<MeshFacet> templateFacets) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the averaged mesh modelprotected int
boolean
Returnstrue
if the implementation is thread-safe and then a single visitor instance can be applied to multiple k-d trees simultaneously.protected void
setAvgMeshModel
(MeshModel avgMeshModel) protected void
setNumInspectedFacets
(int numInspectedFacets) protected double
singleRayIntersection
(Octree octree, Ray ray) Computes ray intersection and returns its distance, either positive or negative.void
visitOctree
(Octree octree) The main inspection method to be implemented by specific visitors.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.engines.avgmesh.AvgMeshVisitor
visitKdTree, visitMeshFacet
Methods inherited from interface cz.fidentis.analyst.data.mesh.MeshVisitor
dispose
-
Constructor Details
-
AvgMeshVisitorRC
Constructor.- Parameters:
templateFacet
- Mesh facet which is transformed to the averaged mesh. The original mesh remains unchanged. New mesh is allocated instead.- Throws:
IllegalArgumentException
- if some parameter is wrong
-
AvgMeshVisitorRC
Constructor.- Parameters:
templateFacets
- Mesh facets that are transformed to the averaged mesh The original mesh remains unchanged. New mesh is allocated instead.- Throws:
IllegalArgumentException
- if some parameter is wrong
-
AvgMeshVisitorRC
Constructor.- Parameters:
templateModel
- Mesh model which is transformed to the averaged mesh The original mesh remains unchanged. New mesh is allocated instead.- Throws:
IllegalArgumentException
- if some parameter is wrong
-
-
Method Details
-
isThreadSafe
public boolean isThreadSafe()Description copied from interface:KdTreeVisitor
Returnstrue
if the implementation is thread-safe and then a single visitor instance can be applied to multiple k-d trees simultaneously.Thread-safe implementation means that any read or write from/to the visitor's state is protected by
synchronized
.- Specified by:
isThreadSafe
in interfaceAvgMeshVisitor
- Specified by:
isThreadSafe
in interfaceKdTreeVisitor
- Specified by:
isThreadSafe
in interfaceMeshVisitor
- Specified by:
isThreadSafe
in interfaceOctreeVisitor
- Returns:
true
if the implementation is thread-safe.
-
visitOctree
Description copied from interface:OctreeVisitor
The main inspection method to be implemented by specific visitors.- Specified by:
visitOctree
in interfaceAvgMeshVisitor
- Specified by:
visitOctree
in interfaceOctreeVisitor
- Parameters:
octree
- octree to be visited
-
getAveragedMeshModel
Description copied from interface:AvgMeshVisitor
Returns the averaged mesh model- Specified by:
getAveragedMeshModel
in interfaceAvgMeshVisitor
- Returns:
- averaged mesh model
-
getNumInspectedFacets
protected int getNumInspectedFacets() -
getTransformations
-
setAvgMeshModel
-
setNumInspectedFacets
protected void setNumInspectedFacets(int numInspectedFacets) -
singleRayIntersection
Computes ray intersection and returns its distance, either positive or negative. ReturnsNaN
if no intersection was found.- Parameters:
octree
- Octreeray
- Ray- Returns:
- distance to the intersection point.
-