Until yesterday I'd never used GET INDEXDATA() before... pretty cool.
This code seems to work on most basic objects, but I haven't gotten it to work on any animated models... any insights, upgrades or other tidbits are appreciated!
Just uncomment whichever object line you want to try (or load your own)
(I haven't added any code to weld a final object together.. and no, I don't indent my sample codes..LoL)
make object plain 1,1,1
`make object cylinder 1,1
`make object cube 1,1
`make object sphere 1,1
`make object cone 1,1
`make object box 1,1,1,1
make mesh from object 1,1:delete object 1:make object 1,1,0
convert object fvf 1,338:lock vertexdata for limb 1,0:iCount=get vertexdata index count()-1
for i=0 to iCount step 3
x1#=get vertexdata position x(get indexdata(i)):y1#=get vertexdata position y(get indexdata(i)):z1#=get vertexdata position z(get indexdata(i))
x2#=get vertexdata position x(get indexdata(i+1)):y2#=get vertexdata position y(get indexdata(i+1)):z2#=get vertexdata position z(get indexdata(i+1))
x3#=get vertexdata position x(get indexdata(i+2)):y3#=get vertexdata position y(get indexdata(i+2)):z3#=get vertexdata position z(get indexdata(i+2))
ThisObj=find free object(1,100000):make object triangle ThisObj,x1#,y1#,z1#,x2#,y2#,z2#,x3#,y3#,z3#:set object cull ThisObj,0:set object wireframe ThisObj,1
next
hide object 1:sync on:sync rate 60
do
control camera using arrowkeys 0,.1,3
sync
loop