#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/quest/SignedDistance.hpp>
|
| SignedDistance (const mint::Mesh *surfaceMesh, bool isWatertight, int maxObjects, int maxLevels, bool computeSign=true) |
| Creates a SignedDistance instance for queries on the given mesh. More...
|
|
| ~SignedDistance () |
| Destructor. More...
|
|
double | computeDistance (double x, double y, double z=0.0) |
| Computes the distance of the given point to the input surface mesh. More...
|
|
double | computeDistance (const PointType &queryPnt) const |
| Computes the distance of the given point to the surface mesh. More...
|
|
double | computeDistance (const PointType &queryPnt, std::vector< int > &bvh_buckets, std::vector< axom::IndexType > &triangles, std::vector< axom::IndexType > &my_triangles, PointType &closest_pt) const |
| Computes the distance of the given point to the surface mesh. More...
|
|
const BVHTreeType * | getBVHTree () const |
| Returns a const reference to the underlying bucket tree. More...
|
|
◆ PointType
◆ VectorType
◆ TriangleType
◆ BoxType
◆ BVHTreeType
◆ SignedDistance()
◆ ~SignedDistance()
◆ computeDistance() [1/3]
Computes the distance of the given point to the input surface mesh.
- Parameters
-
[in] | x | x-coordinate of the query point |
[in] | y | y-coordinate of the query point |
[in] | z | z-coordinate of the query point |
- Note
- When the input is not a closed surface mesh, the assumption is that the surface mesh divides the computational mesh domain into two regions. Hence, the surface mesh has to span the entire domain of interest, e.g., the computational mesh at which the signed distance field is evaluated, along some plane.
- Warning
- The sign of the distance from a given query point is determined by a pseudo-normal which is computed at the closest point on the surface mesh. For a non-watertight mesh, the sign of the distance is not defined everywhere. Specifically, the sign is ambiguous for all points for which a normal projection onto the surface does not exist.
- Returns
- minDist minimum signed distance of the query point to the surface.
References axom::primal::Point< double, NDIMS >::make_point().
Referenced by axom::quest::SignedDistance< NDIMS >::computeDistance().
◆ computeDistance() [2/3]
Computes the distance of the given point to the surface mesh.
- Parameters
-
[in] | queryPnt | user-supplied point. |
- Note
- When the input is not a closed surface mesh, the assumption is that the surface mesh divides the computational mesh domain into two regions. Hence, the surface mesh has to span the entire domain of interest, e.g., the computational mesh at which the signed distance field is evaluated, along some plane.
- Warning
- The sign of the distance from a given query point is determined by a pseudo-normal which is computed at the closest point on the surface mesh. For a non-watertight mesh, the sign of the distance is not defined everywhere. Specifically, the sign is ambiguous for all points for which a normal projection onto the surface does not exist.
- Returns
- minDist the signed minimum distance to the surface mesh.
References axom::primal::BoundingBox< T, NDIMS >::addPoint(), AXOM_DEBUG_PARAM, axom::primal::closest_point(), axom::quest::SignedDistance< NDIMS >::computeDistance(), axom::primal::BoundingBox< T, NDIMS >::contains(), axom::primal::Point< T, NDIMS >::data(), axom::primal::Vector< T, NDIMS >::dot(), axom::spin::BVHTree< T, NDIMS >::find(), axom::spin::BVHTree< T, NDIMS >::getBucketNumObjects(), axom::spin::BVHTree< T, NDIMS >::getBucketObjectArray(), axom::mint::getCellInfo(), axom::mint::Mesh::getCellNodeIDs(), axom::mint::Mesh::getCellType(), axom::mint::Mesh::getNode(), axom::spin::BVHTree< T, NDIMS >::getObjectBox(), axom::spin::BVHTree< T, NDIMS >::getObjectData(), axom::primal::BoundingBox< double, NDIMS >::getPoints(), axom::utilities::isNearlyEqual(), axom::utilities::max(), axom::utilities::min(), axom::mint::CellInfo::num_nodes, axom::primal::Triangle< T, NDIMS >::NUM_TRI_VERTS, axom::mint::QUAD, axom::mint::SEGMENT, SLIC_ASSERT, axom::primal::squared_distance(), and axom::mint::TRIANGLE.
◆ computeDistance() [3/3]
Computes the distance of the given point to the surface mesh.
- Note
- This is an overloaded method that also returns the BVH buckets and corresponding triangles used to calculate the signed distance.
- Parameters
-
[in] | queryPnt | user-supplied point. |
[out] | bvh_buckets | the buckets of the BVH used to satisfy the query. |
[out] | triangles | the triangles of the BVH used to satisfy the query. |
[out] | my_triangles | the triangle used to compute the pseudo-normal. |
- Note
- The variables 'triangles'/'my_triangles' are relevant in debug mode.
-
When the input is not a closed surface mesh, the assumption is that the surface mesh divides the computational mesh domain into two regions. Hence, the surface mesh has to span the entire domain of interest, e.g., the computational mesh at which the signed distance field is evaluated, along some plane.
- Warning
- The sign of the distance from a given query point is determined by a pseudo-normal which is computed at the closest point on the surface mesh. For a non-watertight mesh, the sign of the distance is not defined everywhere. Specifically, the sign is ambiguous for all points for which a normal projection onto the surface does not exist.
- Returns
- minDist the minimum signed distance to the surface mesh.
◆ getBVHTree()
Returns a const reference to the underlying bucket tree.
- Returns
- ptr pointer to the underlying bucket tree
- Postcondition
- ptr != nullptr
References DISABLE_COPY_AND_ASSIGNMENT.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/quest/SignedDistance.hpp