Public Types | Public Member Functions | Private Attributes
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>

List of all members.

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

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; TrivialSampler<MyMesh> ts(myVec); SurfaceSampling<MyMesh, TrivialSampler<MyMesh> >::Montecarlo(M, ts, SampleNum);

Definition at line 72 of file point_sampling.h.


Member Typedef Documentation

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

Definition at line 76 of file point_sampling.h.

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

Definition at line 78 of file point_sampling.h.

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

Definition at line 79 of file point_sampling.h.

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

Definition at line 75 of file point_sampling.h.

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

Definition at line 77 of file point_sampling.h.


Constructor & Destructor Documentation

template<class MeshType>
vcg::tri::TrivialSampler< MeshType >::TrivialSampler ( ) [inline]

Definition at line 86 of file point_sampling.h.

template<class MeshType>
vcg::tri::TrivialSampler< MeshType >::TrivialSampler ( std::vector< CoordType > &  Vec) [inline]

Definition at line 92 of file point_sampling.h.

template<class MeshType>
vcg::tri::TrivialSampler< MeshType >::~TrivialSampler ( ) [inline]

Definition at line 99 of file point_sampling.h.


Member Function Documentation

template<class MeshType>
void vcg::tri::TrivialSampler< MeshType >::AddEdge ( const EdgeType e,
ScalarType  u 
) [inline]

Definition at line 113 of file point_sampling.h.

template<class MeshType>
void vcg::tri::TrivialSampler< MeshType >::AddFace ( const FaceType f,
const CoordType p 
) [inline]

Definition at line 118 of file point_sampling.h.

template<class MeshType>
void vcg::tri::TrivialSampler< MeshType >::AddTextureSample ( const FaceType ,
const CoordType ,
const Point2i ,
float   
) [inline]

Definition at line 123 of file point_sampling.h.

template<class MeshType>
void vcg::tri::TrivialSampler< MeshType >::AddVert ( const VertexType p) [inline]

Definition at line 109 of file point_sampling.h.

template<class MeshType>
void vcg::tri::TrivialSampler< MeshType >::reset ( ) [inline]

Definition at line 81 of file point_sampling.h.


Member Data Documentation

template<class MeshType>
std::vector<CoordType>* vcg::tri::TrivialSampler< MeshType >::sampleVec [private]

Definition at line 105 of file point_sampling.h.

template<class MeshType>
bool vcg::tri::TrivialSampler< MeshType >::vectorOwner [private]

Definition at line 106 of file point_sampling.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:43:20