Vertex / Vertice

Blitz3D Forums/Blitz3D Beginners Area/Vertex / Vertice

ghost(Posted 2005) [#1]
Hi,
is there a difference in BB between a vertex and a vertice ?

If no, why this piece of code isn't working ?

Local i%,j%,nb_vert%,tot_nb_vert%,surf%
Local x#,y#,z#

For i = 1 To CountSurfaces(entitee)

surf = GetSurface(entitee,i)

nb_vert = CountVertices(surf)

DebugLog "surface : " + surf + " nb vert : " + nb_vert

tot_nb_vert = tot_nb_vert + nb_vert

For j = 1 To nb_vert

x = x + VertexX(surf,j)
y = y + VertexY(surf,j)
z = z + VertexZ(surf,j)

Next
Next

I get an "vertex index out of range" error message when nb_vert = 94 and j=94

Any idea ?


ErikT(Posted 2005) [#2]
is there a difference in BB between a vertex and a vertice ?

Nope. Vertex = singular while Vertices = plural.

Any idea ?

No, sorry. Looks fine to me. Then again, I'm mathematically challenged so anything looks fine to me.. :p


ratking(Posted 2005) [#3]
I'd say you have to count from 0 to nb_vert-1.


ghost(Posted 2005) [#4]
Indeed you seem to be right ;o)
Thanks.