$darkmode
A basic sampler class that show the required interface used by the SurfaceSampling class. More...
#include <vcg/complex/algorithms/point_sampling.h>
A basic sampler class that show the required interface used by the SurfaceSampling class.
Most of the methods of sampling classes call the AddFace method of this class with the face containing the sample and its barycentric coord. Beside being an example of how to write a sampler it provides a simple way to use the various sampling classes. For example if you just want to get a vector with positions over the surface You have just to write
vector<Point3f> myVec; SurfaceSampling<MyMesh, TrivialSampler<MyMesh> >::Montecarlo(M, TrivialSampler<MyMesh>(myVec), SampleNum);