A basic sampler class that show the required interface used by the SurfaceSampling class. More...
#include <vcg/complex/algorithms/point_sampling.h>
Public Types | |
typedef MeshType::CoordType | CoordType |
typedef MeshType::EdgeType | EdgeType |
typedef MeshType::FaceType | FaceType |
typedef MeshType::ScalarType | ScalarType |
typedef MeshType::VertexType | VertexType |
Public Member Functions | |
void | AddEdge (const EdgeType &e, ScalarType u) |
void | AddFace (const FaceType &f, const CoordType &p) |
void | AddTextureSample (const FaceType &, const CoordType &, const Point2i &, float) |
void | AddVert (const VertexType &p) |
void | reset () |
TrivialSampler () | |
TrivialSampler (std::vector< CoordType > &Vec) | |
~TrivialSampler () | |
Private Attributes | |
std::vector< CoordType > * | sampleVec |
bool | vectorOwner |
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; TrivialSampler<MyMesh> ts(myVec); SurfaceSampling<MyMesh, TrivialSampler<MyMesh> >::Montecarlo(M, ts, SampleNum);
Definition at line 72 of file point_sampling.h.
typedef MeshType::CoordType vcg::tri::TrivialSampler< MeshType >::CoordType |
Definition at line 76 of file point_sampling.h.
typedef MeshType::EdgeType vcg::tri::TrivialSampler< MeshType >::EdgeType |
Definition at line 78 of file point_sampling.h.
typedef MeshType::FaceType vcg::tri::TrivialSampler< MeshType >::FaceType |
Definition at line 79 of file point_sampling.h.
typedef MeshType::ScalarType vcg::tri::TrivialSampler< MeshType >::ScalarType |
Definition at line 75 of file point_sampling.h.
typedef MeshType::VertexType vcg::tri::TrivialSampler< MeshType >::VertexType |
Definition at line 77 of file point_sampling.h.
vcg::tri::TrivialSampler< MeshType >::TrivialSampler | ( | ) | [inline] |
Definition at line 86 of file point_sampling.h.
vcg::tri::TrivialSampler< MeshType >::TrivialSampler | ( | std::vector< CoordType > & | Vec | ) | [inline] |
Definition at line 92 of file point_sampling.h.
vcg::tri::TrivialSampler< MeshType >::~TrivialSampler | ( | ) | [inline] |
Definition at line 99 of file point_sampling.h.
void vcg::tri::TrivialSampler< MeshType >::AddEdge | ( | const EdgeType & | e, |
ScalarType | u | ||
) | [inline] |
Definition at line 113 of file point_sampling.h.
void vcg::tri::TrivialSampler< MeshType >::AddFace | ( | const FaceType & | f, |
const CoordType & | p | ||
) | [inline] |
Definition at line 118 of file point_sampling.h.
void vcg::tri::TrivialSampler< MeshType >::AddTextureSample | ( | const FaceType & | , |
const CoordType & | , | ||
const Point2i & | , | ||
float | |||
) | [inline] |
Definition at line 123 of file point_sampling.h.
void vcg::tri::TrivialSampler< MeshType >::AddVert | ( | const VertexType & | p | ) | [inline] |
Definition at line 109 of file point_sampling.h.
void vcg::tri::TrivialSampler< MeshType >::reset | ( | ) | [inline] |
Definition at line 81 of file point_sampling.h.
std::vector<CoordType>* vcg::tri::TrivialSampler< MeshType >::sampleVec [private] |
Definition at line 105 of file point_sampling.h.
bool vcg::tri::TrivialSampler< MeshType >::vectorOwner [private] |
Definition at line 106 of file point_sampling.h.