well i took distance out to make sure it wasnt that - dont need it anyway
code went to this;
sync on
sync rate 30
autocam off
set display mode 1024,768,32
load object "Save x.x",1
convert object fvf 1,338
make mesh from object 1,1
convert mesh to vertexdata 1
lock vertexdata for mesh 1
v=get vertexdata vertex count()
for z=1 to v
olr#=r#
px#=abs(get vertexdata position x(z))
if px#>r# then r#=px#
py#=abs(get vertexdata position y(z))
if py#>r# then r#=py#
pz#=abs(get vertexdata position z(z))
if pz#>r# then r#=pz#
if r#<>olr#
npx#=get vertexdata position x(z)
npy#=get vertexdata position y(z)
npz#=get vertexdata position z(z)
endif
next z
unlock vertexdata
delete mesh 1
make object sphere 2,1
set object diffuse 2,rgb(255,0,0)
position object 2,npx#,npy#,npz#
make object cube 3,r#*2
ghost object on 3
do
mmx=mousemovey()
mmy=mousemovex()
position camera 0,0,0
rotate camera camera angle x()+mmx,camera angle y()+mmy,0
move camera -50
set cursor 0,0
print "vertexdata range " ; r#
print "vertcount from data " ; v
sync
loop
still got same results of differences between running same code/exe using comparison
so just went memblock root with almost the same code;
sync on
sync rate 30
autocam off
set display mode 1024,768,32
load object "Save x.x",1
sync
stat=statistic(1)*3
convert object fvf 1,338
make mesh from object 1,1
make memblock from mesh 1,1
fvf as dword
fvf=memblock dword(1,0)
siz as dword
siz=memblock dword(1,4)
coun as dword
coun=memblock dword(1,8)
for t=1 to coun
olr#=r#
x#=abs(memblock float(1,12+(t*siz)-siz))
if x#>r# then r#=x#
y#=abs(memblock float(1,12+(t*siz)-siz+4))
if y#>r# then r#=y#
z#=abs(memblock float(1,12+(t*siz)-siz+8))
if z#>r# then r#=z#
if r#<>olr#
npx#=memblock float(1,12+(t*siz)-siz)
npy#=memblock float(1,12+(t*siz)-siz+4)
npz#=memblock float(1,12+(t*siz)-siz+8)
endif
next t
make object sphere 2,1
set object diffuse 2,rgb(255,0,0)
position object 2,npx#,npy#,npz#
make object cube 3,r#*2
ghost object on 3
do
mmx=mousemovey()
mmy=mousemovex()
position camera 0,0,0
rotate camera camera angle x()+mmx,camera angle y()+mmy,0
move camera -50
set cursor 0,0
print "vertexdata range " ; r#
print "vertcount from data " ; stat
print "fvf code " ; fvf
print "vertex size " ; siz ; "bytes"
print "number of vertices " ; coun
sync
loop
memblock method works perfect everytime(so far 100 tests)
@pincho, thankyou, have tested various rates and display options vsync - no differences to results
EDIT:
I am just read floating point stuff and not making much sense of it - Significant digits × baseexponent
now those are the types of values I see in mesh data of media, now Im second guessing but is it possible that internally that calculation can produce different results at different times? or do i have this completely wrong?