# Building an Edge List

No replies to this topic

### #1Richard

New Member

• Members
• 1 posts

Posted 22 October 2010 - 03:58 PM

Hi!

I found this algorithm to create a list of edges:
http://www.terathon....code/edges.html

But I'm having some doubts of how to use it,
Vertices:

Quote

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):

Quote

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

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users