21#include "Topology/PointSet.h"
34 template<
typename TDataType>
40 typedef typename TDataType::Real
Real;
41 typedef typename TDataType::Coord
Coord;
49 std::shared_ptr<DistanceField3D<TDataType>>
loadSdf();
52 DEF_VAR(
Coord, Box_b, 0.1f,
"Upper boundary of the sampling area");
61 std::shared_ptr<DistanceField3D<TDataType>>
getSDF() {
61 std::shared_ptr<DistanceField3D<TDataType>>
getSDF() {
…}
97 std::shared_ptr<DistanceField3D<TDataType>>
inputSDF;
GPU supported signed distance field.
#define IMPLEMENT_TCLASS(name, T1)
bool collisionJudge(Coord point)
Real lerp(Real a, Real b, Real alpha)
std::shared_ptr< DistanceField3D< TDataType > > getSDF()
std::shared_ptr< DistanceField3D< TDataType > > loadSdf()
int indexTransform(int i, int j, int k)
DEF_VAR(Coord, Box_a, 0.0f, "Lower boudary of the sampling area")
DEF_VAR(Coord, Box_b, 0.1f, "Upper boundary of the sampling area")
DECLARE_TCLASS(PoissonDiskSampling, TDataType)
bool collisionJudge2D(Coord point)
CArray3D< Real > host_dist
Coord getOnePointInsideSDF()
DEF_VAR(FilePath, SdfFileName, "", "")
int pointNumberRecommend()
Real getDistanceFromSDF(const Coord &p, Coord &normal)
std::shared_ptr< DistanceField3D< TDataType > > inputSDF
std::vector< Coord > points
std::vector< int > m_grid
unsigned int attempted_Times
void resetStates() override
GridIndex searchGrid(Coord point)
unsigned int desired_points
This is an implementation of AdditiveCCD based on peridyno.
Array< T, DeviceType::GPU > DArray
Array3D< T, DeviceType::CPU > CArray3D