View Single Post
Old 15th June 2005, 05:08 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,564
Default

Code:
Prototype ACObject *object_of_vertex(Vertex *pt);
will give the object that owns the vertex.

Vertices are stored in a linked list but do actually have an index property but it it not maintained. This means that you must call one function before you can then read them back. AFAIK this is internal at the moment but should work if you add the prototypes to the plugin header.

This is used to speed things up internally sometimes. e.g. file exporters.
call this:

Code:
Prototype int ac_object_vertexlist_set_indexes(ACObject *ob)
Then immediately after, you can call this to find what position in the list a vertex lies.

Code:
Prototype int ac_vertex_get_index(Vertex *v)
Note that any changes to the vertex list WILL affect these indexes and you will need to call the set indexes function again.

Andy
Andy is offline   Reply With Quote