Quote: "Then you don't need a volume, you only need to calculate the center and test each vertex is within 1.5 of it along the 3 axis."
Good idea, that's definitely more efficient but there seems to be a problem with it somewhere else. I'll upload a sample program ASAP.
EDIT: Nevermind, turns out my objects had an extra vertex because of the way they were made... for those of you interested here's the code I'm using:
function check_complete()
`Get the centre of all objects
for o=1 to 7
cx#=cx#+object position x(o)
cy#=cy#+object position y(o)
cz#=cz#+object position z(o)
next
cx#=cx#/7
cy#=cy#/7
cz#=cz#/7
maxd#=0
ok=1
for o=1 to 7
edited=0
`check vertexdata
limbcount=GET LIMB COUNT(o)
`loop through limbs
for x = 0 to limbcount
LOCK VERTEXDATA FOR LIMB o,x
vmax=get vertexdata vertex count()
`loop through vertices
if vmax>0
for v=1 to vmax-1
GetVertexPosition(1, o, x, v)
x#=x vector3(1)
y#=y vector3(1)
z#=z vector3(1)
`Check current vertex is within tolerance (1.6 in this case)
if x#<>0 and y#<>0 and z#<>0
if abs(cx#-x#)>1.6 then ok=0
if abs(cy#-y#)>1.6 then ok=0
if abs(cz#-z#)>1.6 then ok=0
endif
next v
endif
UNLOCK VERTEXDATA
next x
next o
endfunction ok
function GetVertexPosition(Vector as integer, CObject as integer, Limb as integer, Vertex as integer)
` Ensure that the target vector is a vector and the right size
null = delete vector3(Vector)
null = make vector3(Vector)
` Take the vertex position
lock vertexdata for limb CObject, Limb
set vector3 Vector, get vertexdata position x(Vertex), get vertexdata position y(Vertex), get vertexdata position z(Vertex)
unlock vertexdata
` Rotate by the limb direction (not its rotation - direction!)
` Magic number * 0.0174532925194 is used to convert degrees to radians
rotate x matrix4 100, limb direction x(CObject, Limb) * 0.0174532925194
transform coords vector3 Vector, Vector, 100
rotate y matrix4 100, limb direction y(CObject, Limb) * 0.0174532925194
transform coords vector3 Vector, Vector, 100
rotate z matrix4 100, limb direction z(CObject, Limb) * 0.0174532925194
transform coords vector3 Vector, Vector, 100
` Offset by limb position (not its offset - position!)
set vector3 Vector, limb position x(CObject, Limb) + x vector3(Vector), limb position y(CObject, Limb) + y vector3(Vector), limb position z(CObject, Limb) + z vector3(Vector)
endfunction
If objects 1-7 are within a cube 3.2 x 3.2 x 3.2 based aroung their centre it will return a 1 otherwise a zero. I guess this could be adapted for other similar uses...