LOCAL face[]
X_LOADOBJ "wumbo.ddd", 0
X_MAKE3D 1,500,45
X_CAMERA 10,2,-1, 0,2,0
X_DRAWOBJ 0, 2
count = X_NUMFACES(0)
FOR i=0 TO count-1
X_GETFACE 0, 2, i, face[]
// face[node 0..2][x,y,z,tx,ty,col]
X_LINE face[0][0], face[0][1], face[0][2], face[1][0], face[1][1], face[1][2], 4, RGB(0,0,255)
X_LINE face[2][0], face[2][1], face[2][2], face[1][0], face[1][1], face[1][2], 4, RGB(0,0,255)
X_LINE face[0][0], face[0][1], face[0][2], face[2][0], face[2][1], face[2][2], 4, RGB(0,0,255)
X_DOT face[0][0], face[0][1], face[0][2], 8, RGB(0,255,0)
X_DOT face[1][0], face[1][1], face[1][2], 8, RGB(0,255,0)
X_DOT face[2][0], face[2][1], face[2][2], 8, RGB(0,255,0)
NEXT
SHOWSCREEN
MOUSEWAIT
This line ...
FOR i=0 TO count-1
needs to be changed to...
FOR i=0 TO count-1 STEP 3
Run it, you can see the difference... could be revealing a bug, as there not strictly dealing with faces...?
Perfeclty right. Thanks a lot for pointing it out.
No problem, Gernot, X_GETFACE is a great little function for sniffing around a model.