MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::Cuda::PointsToMeshProjector Class Reference

Computes the closest point on mesh to each of given points on GPU. It caches data that necessary for computing. More...

#include <MRCuda/MRCudaPointsToMeshProjector.h>

Inheritance diagram for MR::Cuda::PointsToMeshProjector:

Public Member Functions

 PointsToMeshProjector ()
void updateMeshData (const Mesh *mesh) override
 update all data related to the referencing mesh
void findProjections (std::vector< MR::MeshProjectionResult > &res, const VertCoords &points, const AffineXf3f *objXf, const AffineXf3f *refObjXf, float upDistLimitSq, float loDistLimitSq) override
 Computes the closest point on mesh to each of given points.
size_t projectionsHeapBytes (size_t numProjections) const override
 Returns amount of additional memory needed to compute projections.
Public Member Functions inherited from MR::IPointsToMeshProjector
 IPointsToMeshProjector ()=default
 explicitly define ctors to avoid warning C5267: definition of implicit copy constructor is deprecated because it has a user-provided destructor
 IPointsToMeshProjector (const IPointsToMeshProjector &)=default
 IPointsToMeshProjector (IPointsToMeshProjector &&) noexcept=default
virtual ~IPointsToMeshProjector ()=default
virtual void findProjections (std::vector< MeshProjectionResult > &result, const VertCoords &points, const AffineXf3f *worldXf=nullptr, const AffineXf3f *worldRefXf=nullptr, float upDistLimitSq=FLT_MAX, float loDistLimitSq=0.0f)=0

Detailed Description

Computes the closest point on mesh to each of given points on GPU. It caches data that necessary for computing.

Constructor & Destructor Documentation

◆ PointsToMeshProjector()

MR::Cuda::PointsToMeshProjector::PointsToMeshProjector ( )

Member Function Documentation

◆ findProjections()

void MR::Cuda::PointsToMeshProjector::findProjections ( std::vector< MR::MeshProjectionResult > & res,
const VertCoords & points,
const AffineXf3f * objXf,
const AffineXf3f * refObjXf,
float upDistLimitSq,
float loDistLimitSq )
override

Computes the closest point on mesh to each of given points.

Parameters
resvector pf projections
pointsvector of points to project
objXftransform applied to points
refObjXftransform applied to referencing mesh; returned proj.point are in the space of the referencing mesh before this transform
upDistLimitSqmaximal squared distance from point to mesh
loDistLimitSqminimal squared distance from point to mesh

◆ projectionsHeapBytes()

size_t MR::Cuda::PointsToMeshProjector::projectionsHeapBytes ( size_t numProjections) const
overridevirtual

Returns amount of additional memory needed to compute projections.

Implements MR::IPointsToMeshProjector.

◆ updateMeshData()

void MR::Cuda::PointsToMeshProjector::updateMeshData ( const Mesh * mesh)
overridevirtual

update all data related to the referencing mesh

Implements MR::IPointsToMeshProjector.


The documentation for this class was generated from the following file: