vcg::tri::SurfaceSampling< MetroMesh, VertexSampler > Class Template Reference

#include <point_sampling.h>

List of all members.

Classes

struct  PoissonDiskParam
class  RRParam

Public Types

typedef GridStaticPtr
< FaceType, ScalarType
TriMeshGrid

Static Public Member Functions

static void AllEdge (MetroMesh &m, VertexSampler &ps)
static void AllFace (MetroMesh &m, VertexSampler &ps)
static void AllVertex (MetroMesh &m, VertexSampler &ps)
static bool checkPoissonDisk (MetroMesh &vmesh, SampleSHT &sht, const Point3< ScalarType > &p, ScalarType radius)
static ScalarType ComputePoissonDiskRadius (MetroMesh &origMesh, int sampleNum)
static int ComputePoissonSampleNum (MetroMesh &origMesh, ScalarType diskRadius)
static void ComputePoissonSampleRadii (MetroMesh &sampleMesh, ScalarType diskRadius, ScalarType radiusVariance, bool invert)
static void EdgeUniform (MetroMesh &m, VertexSampler &ps, int sampleNum, bool sampleFauxEdge=true)
static void FaceSimilar (MetroMesh &m, VertexSampler &ps, int sampleNum, bool dualFlag, bool randomFlag)
static void FaceSubdivision (MetroMesh &m, VertexSampler &ps, int sampleNum, bool randSample)
 Compute a sampling of the surface where the points are regularly scattered over the face surface using a recursive longest-edge subdivision rule.
static void FaceSubdivisionOld (MetroMesh &m, VertexSampler &ps, int sampleNum, bool randSample)
 Compute a sampling of the surface where the points are regularly scattered over the face surface using a recursive longest-edge subdivision rule.
static void FaceUniform (MetroMesh &m, VertexSampler &ps, int sampleNum)
static void FillAndShuffleFacePointerVector (MetroMesh &m, std::vector< FacePointer > &faceVec)
static void FillAndShuffleVertexPointerVector (MetroMesh &m, std::vector< VertexPointer > &vertVec)
static VertexPointer getPrecomputedMontecarloSample (Point3i &cell, MontecarloSHT &samplepool)
static void Montecarlo (MetroMesh &m, VertexSampler &ps, int sampleNum)
static void PoissonDisk (MetroMesh &origMesh, VertexSampler &ps, MetroMesh &montecarloMesh, ScalarType diskRadius, const struct PoissonDiskParam pp=PoissonDiskParam())
static void PoissonDiskPruning (MetroMesh &origMesh, VertexSampler &ps, MetroMesh &montecarloMesh, ScalarType diskRadius, const struct PoissonDiskParam pp=PoissonDiskParam())
static CoordType RandomBaricentric ()
static CoordType RandomBox (vcg::Box3< ScalarType > box)
static double RandomDouble01 ()
static double RandomDouble01closed ()
static unsigned int RandomInt (unsigned int i)
static void RegularRecursiveOffset (MetroMesh &m, std::vector< Point3f > &pvec, ScalarType offset, float minDiag)
static math::MarsenneTwisterRNGSamplingRandomGenerator ()
static void SingleFaceRaster (typename MetroMesh::FaceType &f, VertexSampler &ps, const Point2< typename MetroMesh::ScalarType > &v0, const Point2< typename MetroMesh::ScalarType > &v1, const Point2< typename MetroMesh::ScalarType > &v2, bool correctSafePointsBaryCoords=true)
static int SingleFaceSimilar (FacePointer fp, VertexSampler &ps, int n_samples_per_edge)
static int SingleFaceSimilarDual (FacePointer fp, VertexSampler &ps, int n_samples_per_edge, bool randomFlag)
static int SingleFaceSubdivision (int sampleNum, const CoordType &v0, const CoordType &v1, const CoordType &v2, VertexSampler &ps, FacePointer fp, bool randSample)
static int SingleFaceSubdivisionOld (int sampleNum, const CoordType &v0, const CoordType &v1, const CoordType &v2, VertexSampler &ps, FacePointer fp, bool randSample)
static void StratifiedMontecarlo (MetroMesh &m, VertexSampler &ps, int sampleNum)
static void SubdivideAndSample (MetroMesh &m, std::vector< Point3f > &pvec, const Box3< ScalarType > bb, RRParam &rrp, float curDiag)
static void Texture (MetroMesh &m, VertexSampler &ps, int textureWidth, int textureHeight, bool correctSafePointsBaryCoords=true)
static void VertexAreaUniform (MetroMesh &m, VertexSampler &ps, int sampleNum)
static void VertexUniform (MetroMesh &m, VertexSampler &ps, int sampleNum)
 Sample the vertices in a uniform way. Each vertex has the same probabiltiy of being chosen.
static void VertexWeighted (MetroMesh &m, VertexSampler &ps, int sampleNum)
static ScalarType WeightedArea (FaceType f)
static void WeightedMontecarlo (MetroMesh &m, VertexSampler &ps, int sampleNum)

Private Types

typedef MetroMesh::CoordType CoordType
typedef MetroMesh::FaceContainer FaceContainer
typedef MetroMesh::FaceIterator FaceIterator
typedef MetroMesh::FacePointer FacePointer
typedef MetroMesh::FaceType FaceType
typedef vcg::SpatialHashTable
< FaceType, ScalarType
MeshSHT
typedef vcg::SpatialHashTable
< FaceType, ScalarType >
::CellIterator 
MeshSHTIterator
typedef vcg::SpatialHashTable
< VertexType, ScalarType
MontecarloSHT
typedef vcg::SpatialHashTable
< VertexType, ScalarType >
::CellIterator 
MontecarloSHTIterator
typedef vcg::SpatialHashTable
< VertexType, ScalarType
SampleSHT
typedef vcg::SpatialHashTable
< VertexType, ScalarType >
::CellIterator 
SampleSHTIterator
typedef MetroMesh::ScalarType ScalarType
typedef MetroMesh::VertexIterator VertexIterator
typedef MetroMesh::VertexPointer VertexPointer
typedef MetroMesh::VertexType VertexType

Detailed Description

template<class MetroMesh, class VertexSampler>
class vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >

Definition at line 112 of file point_sampling.h.


Member Typedef Documentation

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::CoordType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::CoordType [private]

Definition at line 114 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::FaceContainer vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceContainer [private]

Definition at line 122 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::FaceIterator vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceIterator [private]

Definition at line 120 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::FacePointer vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FacePointer [private]

Definition at line 119 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::FaceType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceType [private]

Definition at line 121 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef vcg::SpatialHashTable<FaceType, ScalarType> vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::MeshSHT [private]

Definition at line 124 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef vcg::SpatialHashTable<FaceType, ScalarType>::CellIterator vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::MeshSHTIterator [private]

Definition at line 125 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef vcg::SpatialHashTable<VertexType, ScalarType> vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::MontecarloSHT [private]

Definition at line 126 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef vcg::SpatialHashTable<VertexType, ScalarType>::CellIterator vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::MontecarloSHTIterator [private]

Definition at line 127 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef vcg::SpatialHashTable<VertexType, ScalarType> vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SampleSHT [private]

Definition at line 128 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef vcg::SpatialHashTable<VertexType, ScalarType>::CellIterator vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SampleSHTIterator [private]

Definition at line 129 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::ScalarType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::ScalarType [private]

Definition at line 115 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef GridStaticPtr<FaceType, ScalarType > vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::TriMeshGrid

Definition at line 1234 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::VertexIterator vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::VertexIterator [private]

Definition at line 118 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::VertexPointer vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::VertexPointer [private]

Definition at line 117 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
typedef MetroMesh::VertexType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::VertexType [private]

Definition at line 116 of file point_sampling.h.


Member Function Documentation

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::AllEdge ( MetroMesh &  m,
VertexSampler &  ps 
) [inline, static]

Definition at line 299 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::AllFace ( MetroMesh &  m,
VertexSampler &  ps 
) [inline, static]

Definition at line 288 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::AllVertex ( MetroMesh &  m,
VertexSampler &  ps 
) [inline, static]

Definition at line 157 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static bool vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::checkPoissonDisk ( MetroMesh &  vmesh,
SampleSHT sht,
const Point3< ScalarType > &  p,
ScalarType  radius 
) [inline, static]

Definition at line 932 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static ScalarType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::ComputePoissonDiskRadius ( MetroMesh &  origMesh,
int  sampleNum 
) [inline, static]

Definition at line 970 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static int vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::ComputePoissonSampleNum ( MetroMesh &  origMesh,
ScalarType  diskRadius 
) [inline, static]

Definition at line 985 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::ComputePoissonSampleRadii ( MetroMesh &  sampleMesh,
ScalarType  diskRadius,
ScalarType  radiusVariance,
bool  invert 
) [inline, static]

Definition at line 992 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::EdgeUniform ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum,
bool  sampleFauxEdge = true 
) [inline, static]

Definition at line 320 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceSimilar ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum,
bool  dualFlag,
bool  randomFlag 
) [inline, static]

Definition at line 736 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceSubdivision ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum,
bool  randSample 
) [inline, static]

Compute a sampling of the surface where the points are regularly scattered over the face surface using a recursive longest-edge subdivision rule.

Definition at line 524 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceSubdivisionOld ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum,
bool  randSample 
) [inline, static]

Compute a sampling of the surface where the points are regularly scattered over the face surface using a recursive longest-edge subdivision rule.

Definition at line 625 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FaceUniform ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Definition at line 274 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FillAndShuffleFacePointerVector ( MetroMesh &  m,
std::vector< FacePointer > &  faceVec 
) [inline, static]

Definition at line 235 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::FillAndShuffleVertexPointerVector ( MetroMesh &  m,
std::vector< VertexPointer > &  vertVec 
) [inline, static]

Definition at line 246 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static VertexPointer vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::getPrecomputedMontecarloSample ( Point3i cell,
MontecarloSHT samplepool 
) [inline, static]

Definition at line 923 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::Montecarlo ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Definition at line 393 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::PoissonDisk ( MetroMesh &  origMesh,
VertexSampler &  ps,
MetroMesh &  montecarloMesh,
ScalarType  diskRadius,
const struct PoissonDiskParam  pp = PoissonDiskParam() 
) [inline, static]

Compute a Poisson-disk sampling of the surface. The radius of the disk is computed according to the estimated sampling density.

This algorithm is an adaptation of the algorithm of White et al. :

"Poisson Disk Point Set by Hierarchical Dart Throwing" K. B. White, D. Cline, P. K. Egbert, IEEE Symposium on Interactive Ray Tracing, 2007, 10-12 Sept. 2007, pp. 129-132.

Definition at line 1090 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::PoissonDiskPruning ( MetroMesh &  origMesh,
VertexSampler &  ps,
MetroMesh &  montecarloMesh,
ScalarType  diskRadius,
const struct PoissonDiskParam  pp = PoissonDiskParam() 
) [inline, static]

Definition at line 1007 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static CoordType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::RandomBaricentric (  )  [inline, static]

Definition at line 354 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static CoordType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::RandomBox ( vcg::Box3< ScalarType box  )  [inline, static]

Definition at line 912 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static double vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::RandomDouble01 (  )  [inline, static]

Definition at line 146 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static double vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::RandomDouble01closed (  )  [inline, static]

Definition at line 152 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static unsigned int vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::RandomInt ( unsigned int  i  )  [inline, static]

Definition at line 140 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::RegularRecursiveOffset ( MetroMesh &  m,
std::vector< Point3f > &  pvec,
ScalarType  offset,
float  minDiag 
) [inline, static]

Definition at line 1245 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static math::MarsenneTwisterRNG& vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SamplingRandomGenerator (  )  [inline, static]

Definition at line 133 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SingleFaceRaster ( typename MetroMesh::FaceType &  f,
VertexSampler &  ps,
const Point2< typename MetroMesh::ScalarType > &  v0,
const Point2< typename MetroMesh::ScalarType > &  v1,
const Point2< typename MetroMesh::ScalarType > &  v2,
bool  correctSafePointsBaryCoords = true 
) [inline, static]

Definition at line 777 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static int vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SingleFaceSimilar ( FacePointer  fp,
VertexSampler &  ps,
int  n_samples_per_edge 
) [inline, static]

Definition at line 657 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static int vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SingleFaceSimilarDual ( FacePointer  fp,
VertexSampler &  ps,
int  n_samples_per_edge,
bool  randomFlag 
) [inline, static]

Definition at line 674 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static int vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SingleFaceSubdivision ( int  sampleNum,
const CoordType v0,
const CoordType v1,
const CoordType v2,
VertexSampler &  ps,
FacePointer  fp,
bool  randSample 
) [inline, static]

Definition at line 464 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static int vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SingleFaceSubdivisionOld ( int  sampleNum,
const CoordType v0,
const CoordType v1,
const CoordType v2,
VertexSampler &  ps,
FacePointer  fp,
bool  randSample 
) [inline, static]

Definition at line 555 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::StratifiedMontecarlo ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Definition at line 370 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::SubdivideAndSample ( MetroMesh &  m,
std::vector< Point3f > &  pvec,
const Box3< ScalarType bb,
RRParam rrp,
float  curDiag 
) [inline, static]

Definition at line 1262 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::Texture ( MetroMesh &  m,
VertexSampler &  ps,
int  textureWidth,
int  textureHeight,
bool  correctSafePointsBaryCoords = true 
) [inline, static]

Definition at line 1219 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::VertexAreaUniform ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Sample the vertices in a uniform way. Each vertex has a probability of being chosen that is proportional to the area it represent.

Definition at line 215 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::VertexUniform ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Sample the vertices in a uniform way. Each vertex has the same probabiltiy of being chosen.

Definition at line 259 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::VertexWeighted ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Sample the vertices in a weighted way. Each vertex has a probability of being chosen that is proportional to its quality. It assumes that you are asking a number of vertices smaller than nv; Algorithm: 1) normalize quality so that sum q == 1; 2) shuffle vertices. 3) for each vertices choose it if rand > thr;

Definition at line 177 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static ScalarType vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::WeightedArea ( FaceType  f  )  [inline, static]

Definition at line 422 of file point_sampling.h.

template<class MetroMesh, class VertexSampler>
static void vcg::tri::SurfaceSampling< MetroMesh, VertexSampler >::WeightedMontecarlo ( MetroMesh &  m,
VertexSampler &  ps,
int  sampleNum 
) [inline, static]

Compute a sampling of the surface that is weighted by the quality the area of each face is multiplied by the average of the quality of the vertices. So the a face with a zero quality on all its vertices is never sampled and a face with average quality 2 get twice the samples of a face with the same area but with an average quality of 1;

Definition at line 431 of file point_sampling.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:23:34 2013