Building an Edge List

D0a8766b9878b26bde971480e1345d35
0
Richard 101 Oct 22, 2010 at 15:58

Hi!

I found this algorithm to create a list of edges:

http://www.terathon.com/code/edges.html

But I’m having some doubts of how to use it,
I have access to my net and got the following data:
Vertices:

Vertice 0: -77.5857 4.81243 -7.5613
Vertice 1: 68.5184 4.81243 20.5482
Vertice 2: -77.5857 4.81243 20.5482
Vertice 3: 68.5184 4.81243 20.5482

//…

Vertice 4647: -49.3102 8.39155 -7.6623
Vertice 4648: -49.3102 5.49066 6.80519
Vertice 4649: -49.3102 8.39155 6.80519

and Triangles(IndexBuffer):

Triangle 0: 0 3 2
Triangle 1: 3 0 1
Triangle 2: 4 7 5
Triangle 3: 7 4 6
Triangle 4: 8 9 10

//…

Triangle 1545: 3412 3411 3404
Triangle 1546: 3405 3406 3407
Triangle 1547: 3406 3405 3408
Triangle 1548: 3409 3410 3413
Triangle 1549: 3410 3409 3414

The parameters of the function are:

long BuildEdges(long vertexCount, long triangleCount,
                const Triangle *triangleArray, Edge *edgeArray)

It will return edgeArray for me? I must pass all triangles (const Triangle * triangleArray) using the loop for?

Thanks

0 Replies

Please log in or register to post a reply.

No replies have been made yet.