VCG Library
List of all members
vcg::tri::TrivialSampler< MeshType > Class Template Reference

A basic sampler class that show the required interface used by the SurfaceSampling class. More...

#include <vcg/complex/algorithms/point_sampling.h>

Detailed Description

template<class MeshType>
class vcg::tri::TrivialSampler< MeshType >

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);

Definition at line 70 of file point_sampling.h.


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