Skip to content

shapeworks::MeshWrapper

Public Types

Name
using ParticleDomain::PointType PointType
using ParticleDomain::GradNType GradNType
using vnl_vector_fixed< float, 3 > NormalType
using vnl_vector_fixed< double, 3 > VectorType

Public Functions

Name
MeshWrapper(vtkSmartPointer< vtkPolyData > mesh, bool geodesics_enabled =false, size_t geodesics_cache_multiplier_size =0)
~MeshWrapper() =default
double ComputeDistance(const PointType & pointa, int idxa, const PointType & pointb, int idxb, VectorType * out_grad =nullptr) const
bool IsWithinDistance(const PointType & pointa, int idxa, const PointType & pointb, int idxb, double test_dist, double & dist) const
PointType GeodesicWalk(PointType p, int idx, VectorType vector) const
VectorType ProjectVectorToSurfaceTangent(const PointType & pointa, int idx, VectorType & vector) const
NormalType SampleNormalAtPoint(PointType p, int idx =-1) const
GradNType SampleGradNAtPoint(PointType p, int idx) const
PointType SnapToMesh(PointType pointa, int idx) const
PointType GetPointOnMesh() const
const PointType & GetMeshLowerBound() const
const PointType & GetMeshUpperBound() const
virtual void InvalidateParticle(int idx)
vtkSmartPointer< vtkPolyData > GetPolydata() const
bool IsGeodesicsEnabled() const

Public Types Documentation

using PointType

using shapeworks::MeshWrapper::PointType =  ParticleDomain::PointType;

using GradNType

using shapeworks::MeshWrapper::GradNType =  ParticleDomain::GradNType;

using NormalType

using shapeworks::MeshWrapper::NormalType =  vnl_vector_fixed<float, 3>;

using VectorType

using shapeworks::MeshWrapper::VectorType =  vnl_vector_fixed<double, 3>;

Public Functions Documentation

function MeshWrapper

explicit MeshWrapper(
    vtkSmartPointer< vtkPolyData > mesh,
    bool geodesics_enabled =false,
    size_t geodesics_cache_multiplier_size =0
)

function ~MeshWrapper

~MeshWrapper() =default

function ComputeDistance

double ComputeDistance(
    const PointType & pointa,
    int idxa,
    const PointType & pointb,
    int idxb,
    VectorType * out_grad =nullptr
) const

function IsWithinDistance

bool IsWithinDistance(
    const PointType & pointa,
    int idxa,
    const PointType & pointb,
    int idxb,
    double test_dist,
    double & dist
) const

function GeodesicWalk

PointType GeodesicWalk(
    PointType p,
    int idx,
    VectorType vector
) const

function ProjectVectorToSurfaceTangent

VectorType ProjectVectorToSurfaceTangent(
    const PointType & pointa,
    int idx,
    VectorType & vector
) const

function SampleNormalAtPoint

NormalType SampleNormalAtPoint(
    PointType p,
    int idx =-1
) const

function SampleGradNAtPoint

GradNType SampleGradNAtPoint(
    PointType p,
    int idx
) const

function SnapToMesh

PointType SnapToMesh(
    PointType pointa,
    int idx
) const

function GetPointOnMesh

PointType GetPointOnMesh() const

function GetMeshLowerBound

inline const PointType & GetMeshLowerBound() const

function GetMeshUpperBound

inline const PointType & GetMeshUpperBound() const

function InvalidateParticle

virtual void InvalidateParticle(
    int idx
)

function GetPolydata

inline vtkSmartPointer< vtkPolyData > GetPolydata() const

function IsGeodesicsEnabled

inline bool IsGeodesicsEnabled() const

Updated on 2024-03-17 at 12:58:44 -0600