PDA

View Full Version : getting a list of edges.


LiveWire
9th December 2004, 10:54 PM
how do i get a List of ACEdges from a single surface?
List *edgelist_get_by_surface(List *someList, Surface *theSurface);
(im not on my comp with ac3d so i cant look up the exact spelling of the command.)
im not sure how to use it, cause theres two List*.
List *MyEdgeList = edgelist_get_by_surface(NULL, MySurface); //???
doesnt work...
List *MyEdgeList = NULL;
edgelist_get_by_surface(MyEdgeList, MySurface); //???
doesnt work either.

Andy
10th December 2004, 03:51 AM
That function operates on an edgelist and returns all edges that reference a given surface.

You can create a list of edges from an object with:

Prototype List *ac_object_get_edges(ACObject *ob)
or use:
Prototype List *ac_selection_get_edges(Boolean wholesurfaces)

Note that AC3D objects don't maintain edge structures - these functions create temporary edge structures for use in some of AC3D's other functions. Free an edgelist with:

Prototype void ac_edgelist_free(List **e)

Andy

LiveWire
10th December 2004, 07:10 PM
yes i know of those commands.
what i want is a command to create temporary edge's of a single surface.

also:
Prototype List *ac_edgelist_get_by_surface(List *e, Surface *s);
how exactly do you use this command?

Thaellin
10th December 2004, 09:12 PM
Use the edge list generated by the functions Andy mentioned as the parameter to the function you originally wanted to call.

-- Jeff

LiveWire
10th December 2004, 09:33 PM
ahhhh thanx.