A world-space direction field obtained by Gaussian-filtering a winding-number signed distance field and differentiating the filtered scalar field.
More...
#include <lagrange/volume/SmoothedMeshGradientField.h>
|
|
using | Grid = openvdb::Vec3SGrid |
| |
|
using | Accessor = Grid::ConstAccessor |
| |
|
| template<typename Scalar, typename Index> |
| | SmoothedMeshGradientField (const SurfaceMesh< Scalar, Index > &mesh, double voxel_size, double epsilon, double query_reach) |
| | Construct a smoothed gradient field for a triangle surface mesh.
|
| |
|
Grid::ConstPtr | grid () const |
| | Return a read-only shared handle to the underlying OpenVDB grid.
|
| |
|
Accessor | accessor () const |
| | Return a read-only accessor to the underlying OpenVDB grid.
|
| |
| bool | sample_direction (const Eigen::Vector3d &position, Eigen::Vector3d &direction_out, Accessor *accessor=nullptr) const |
| | Sample and normalize the gradient at a world-space point.
|
| |
A world-space direction field obtained by Gaussian-filtering a winding-number signed distance field and differentiating the filtered scalar field.
◆ SmoothedMeshGradientField()
template<typename
Scalar, typename Index>
Construct a smoothed gradient field for a triangle surface mesh.
- Parameters
-
| [in] | mesh | Input mesh. Its winding-number sign defines the SDF interior. |
| [in] | voxel_size | Grid voxel size in world units; must be positive. |
| [in] | epsilon | Gaussian smoothing scale in world units; must be positive. |
| [in] | query_reach | Maximum expected query distance from the surface in world units. |
- Template Parameters
-
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
◆ sample_direction()
| bool sample_direction |
( |
const Eigen::Vector3d & | position, |
|
|
Eigen::Vector3d & | direction_out, |
|
|
Accessor * | accessor = nullptr ) const |
Sample and normalize the gradient at a world-space point.
- Parameters
-
| [in] | position | Query position. |
| [out] | direction_out | Outward unit direction when sampling succeeds. |
| [in] | accessor | Optional grid accessor to cache repeated queries (one per thread). |
- Returns
- True for a finite, non-degenerate in-band gradient; false when the caller should use an analytic fallback.
The documentation for this class was generated from the following files: