#include <DistanceOctree.h>
|
| DistanceOctree (const shared_ptr< TriangleDistance< MeshType > > &triDist, uint_t maxDepth=20u, uint_t minNumTriangles=25u) |
|
Scalar | sqSignedDistance (const Point &p) const |
|
Scalar | sqSignedDistance (const Point &p, FaceHandle &closestTriangle) const |
|
Scalar | sqSignedDistance (const Point &p, Point &closestPoint) const |
|
Scalar | sqSignedDistance (const Point &p, Point &closestPoint, Normal &normal) const |
|
Scalar | sqDistance (const Point &p) const |
|
Scalar | sqDistance (const Point &p, FaceHandle &closestTriangle) const |
|
Scalar | sqDistance (const Point &p, Point &closestPoint) const |
|
Scalar | sqDistance (const Point &p, Point &closestPoint, Normal &normal) const |
|
Scalar | getRayDistanceToMeshObject (const Point &ray_origin, const Point &normalised_ray_direction) const |
| This function calculates the distance from a point to the closest intersection point of a mesh object along a specified ray (origin and direction).
|
|
uint_t | numTriangles () const |
|
void | numTrianglesToStream (std::ostream &os) |
|
uint_t | height () const |
|
const AABB & | getAABB () const |
|
void | writeVTKOutput (const std::string &filestem) const |
| Write the distance octree to a VTK file.
|
|
◆ AABB
template<typename MeshType >
◆ FaceHandle
template<typename MeshType >
◆ Normal
template<typename MeshType >
◆ Point
template<typename MeshType >
◆ Scalar
template<typename MeshType >
◆ DistanceOctree()
template<typename MeshType >
◆ fromNormal()
template<typename MeshType >
◆ fromPoint()
template<typename MeshType >
◆ fromScalar()
template<typename MeshType >
◆ getAABB()
template<typename MeshType >
◆ getRayDistanceToMeshObject()
template<typename MeshType >
This function calculates the distance from a point to the closest intersection point of a mesh object along a specified ray (origin and direction).
This is done via the Möller-Trumbore Fast Minimum Storage Ray/Triangle Intersection Algorithm. For more information, see: Möller, T., & Trumbore, B. (1997). Fast, Minimum Storage Ray-Triangle Intersection. Journal of Graphics Tools, 2(1), 21–28. https://doi.org/10.1080/10867651.1997.10487468
- Parameters
-
ray_origin | The origin of the ray as a MeshType::Point. |
normalised_ray_direction | The direction of the ray as a MeshType::Point in its normalised state, i.e. if the direction vector is: ray_direction = [1,1,0] normalised_ray_direction = [1/sqrt(2), 1/sqrt(2), 0] |
- Returns
- The distance to the closest intersection point, or
std::numeric_limits<Scalar>::max()
if no intersection occurs.
Usage:
const MeshType::Point ray_origin { ... };
MeshType::Point ray_direction { ... };
auto q = distanceOctree_->getRayDistanceToMeshObject(ray_origin, ray_direction.normalize());
- Warning
- If the ray and a triangle are parallel (within a small epsilon value), or do not intersect, the function returns std::numeric_limits<Scalar>::max().
◆ height()
template<typename MeshType >
◆ numTriangles()
template<typename MeshType >
◆ numTrianglesToStream()
template<typename MeshType >
◆ sqDistance() [1/4]
template<typename MeshType >
◆ sqDistance() [2/4]
template<typename MeshType >
◆ sqDistance() [3/4]
template<typename MeshType >
◆ sqDistance() [4/4]
template<typename MeshType >
◆ sqSignedDistance() [1/4]
template<typename MeshType >
◆ sqSignedDistance() [2/4]
template<typename MeshType >
◆ sqSignedDistance() [3/4]
template<typename MeshType >
◆ sqSignedDistance() [4/4]
template<typename MeshType >
◆ toPoint()
template<typename MeshType >
◆ toScalar()
template<typename MeshType >
◆ writeVTKOutput()
template<typename MeshType >
Write the distance octree to a VTK file.
This method should only be called by the root process:
{
distanceOctree->writeVTKOutput("distanceOctree");
}
#define WALBERLA_ROOT_SECTION()
Definition MPIManager.h:287
- Parameters
-
filestem | name of the VTK file without extension |
◆ rootNode_
template<typename MeshType >
The documentation for this class was generated from the following file:
- /builds/administration/walberla-website/walberla/src/mesh_common/distance_octree/DistanceOctree.h