added faux edge sampling management
This commit is contained in:
parent
2edaa2853f
commit
a35120d9d9
|
@ -313,12 +313,12 @@ static void AllEdge(MetroMesh & m, VertexSampler &ps)
|
||||||
// Each edge is subdivided in a number of pieces proprtional to its lenght
|
// Each edge is subdivided in a number of pieces proprtional to its lenght
|
||||||
// Sample are choosen without touching the vertices.
|
// Sample are choosen without touching the vertices.
|
||||||
|
|
||||||
static void EdgeUniform(MetroMesh & m, VertexSampler &ps,int sampleNum)
|
static void EdgeUniform(MetroMesh & m, VertexSampler &ps,int sampleNum, bool sampleFauxEdge=true)
|
||||||
{
|
{
|
||||||
typedef typename UpdateTopology<MetroMesh>::PEdge SimpleEdge;
|
typedef typename UpdateTopology<MetroMesh>::PEdge SimpleEdge;
|
||||||
std::vector< SimpleEdge > Edges;
|
std::vector< SimpleEdge > Edges;
|
||||||
UpdateTopology<MetroMesh>::FillUniqueEdgeVector(m,Edges);
|
UpdateTopology<MetroMesh>::FillUniqueEdgeVector(m,Edges,sampleFauxEdge);
|
||||||
// First loop compute total edge lenght;
|
// First loop compute total edge lenght;
|
||||||
float edgeSum=0;
|
float edgeSum=0;
|
||||||
typename std::vector< SimpleEdge >::iterator ei;
|
typename std::vector< SimpleEdge >::iterator ei;
|
||||||
for(ei=Edges.begin(); ei!=Edges.end(); ++ei)
|
for(ei=Edges.begin(); ei!=Edges.end(); ++ei)
|
||||||
|
|
Loading…
Reference in New Issue