Read vertex

Blitz3D Forums/Blitz3D Programming/Read vertex

DareDevil(Posted 2006) [#1]
what's read vertex transformed?


Matty(Posted 2006) [#2]
Can you elaborate a little further please? Which commands are you asking about?


DareDevil(Posted 2006) [#3]
i have read the vertex this modes

For n=1 To CountSurfaces(model)
;DebugLog "Testing surface "+n
surf = GetSurface(model,n)
dwNumFaces = CountTriangles(surf)-1
dwNumVertex = CountVertices(surf)-1
;DebugLog "Limb "+EntityName(model)+", surface "+n+" contains "+dwNumVertex+" vertices."
For v=0 To dwNumFaces
;===>
vert0 = TriangleVertex(surf,v,0) : vert1 = TriangleVertex(surf,v,1) : vert2 = TriangleVertex(surf,v,2)
;===>
sh_v1\x = VertexX(surf,vert0) + sh_PEntity\x : sh_v1\y = VertexY(surf,vert0) + sh_PEntity\y : sh_v1\z = VertexZ(surf,vert0) + sh_PEntity\z
;===>
sh_v2\x = VertexX(surf,vert1) + sh_PEntity\x : sh_v2\y = VertexY(surf,vert1) + sh_PEntity\y : sh_v2\z = VertexZ(surf,vert1) + sh_PEntity\z
;===>
sh_v3\x = VertexX(surf,vert2) + sh_PEntity\x : sh_v3\y = VertexY(surf,vert2) + sh_PEntity\y : sh_v3\z = VertexZ(surf,vert2) + sh_PEntity\z


...........


Stevie G(Posted 2006) [#4]
I think this is what you want ... the tform takes into consideration rotation / position and scale.

tformpoint vertexx( surf, vert0), vertexy( surf, vert0) , vertexz( surf, vert0 ), model, 0
sh_v1\x = tformedx()
sh_v1\y = tformedy()
sh_v1\z = tformedz()

etc...




DareDevil(Posted 2006) [#5]
thanks for all