Hi i have been working on a 3d format but have got stuck on a section i want the code to store the order which the triangle is make but do not know how, can anyone please help me, here is my code so far...
Function save3d(Name$,Obj$)
file=WriteFile(Name$+".3d")
surf=GetSurface(Obj$,0)
For v=1 To CountVertices(surf)
VX#=VertexX(surf,v) : VY#=VertexY(surf,v)
VZ#=VertexZ(surf,v) : VU#=VertexU(surf,v)
VV#=VertexV(surf,v)
WriteLine(file," "+VX#+" "+VY#+" "+VZ#+" "+VU#+" "+VV#)
Next
For tv=1 To CountTriangles(surf)
V0=TriangleVertex(surf,tv,0)
V1=TriangleVertex(surf,tv,1)
V2=TriangleVertex(surf,tv,2)
WriteLine(file," "+v0+" "+v1+" "+v2)
Next
End Function
Function save3d(Name$,Obj$)
file=WriteFile(Name$+".3d")
surf=GetSurface(Obj$,0)
For v=1 To CountVertices(surf)
VX#=VertexX(surf,v) : VY#=VertexY(surf,v)
VZ#=VertexZ(surf,v) : VU#=VertexU(surf,v)
VV#=VertexV(surf,v)
WriteLine(file," "+VX#+" "+VY#+" "+VZ#+" "+VU#+" "+VV#)
Next
For tv=1 To CountTriangles(surf)
V0=TriangleVertex(surf,tv,0)
V1=TriangleVertex(surf,tv,1)
V2=TriangleVertex(surf,tv,2)
WriteLine(file," "+v0+" "+v1+" "+v2)
Next
End Function