03-09-2005, 07:57 AM
Yea! In fact that's how the Quake 2 MD2 structs work. Basically you would do this.
You can do that for any struct you have. That's a LOT easier than having id's to arrays if I'm reading your post correctly. Read the above posts too.
Code:
Type Vertex
x As Single
y As Single
z As Single
End Type
Type Tri
verts(2) As Vertex
End Type
Type Obj
numoftris As Integer
tris As Tri Ptr
End Type
Dim tobj As Obj
tobj.numoftris = 100
tobj.tris = Callocate(tobj.numoftris * Len(Tri))\
tobj.tris[10].verts(0).x = 194.415 'Access array using brackets []
You can do that for any struct you have. That's a LOT easier than having id's to arrays if I'm reading your post correctly. Read the above posts too.