Thread View: comp.graphics.avs
1 messages
1 total messages
Started by James Peters
Tue, 26 Jan 1993 14:47
Re: Large Number of Objects
Author: James Peters
Date: Tue, 26 Jan 1993 14:47
Date: Tue, 26 Jan 1993 14:47
43 lines
2859 bytes
2859 bytes
larry novak posted:
>We are running AVS on a Convex. We have an application in which we want
>to be able to pick any of a large number (80,000) of objects. When we
>try to define a geometry with 80,000 named objects, AVS begins to
>gobble memory and runs out of memory long before it completes the
>definition of the geometry. Using the same geometry without naming the
>objects is no problem. Is this unique to the Convex implementation or
>is it an AVS issue? Is there any workaround?
hello larry,
this is a generic avs problem. the OBJ layer stores objects in a linked
list, and each object has a large memory and access overhead associated
with it, reference /usr/avs/include/obj.h.
think about the performance of a linked list data structure being traversed
on both sides of the geometry pipeline when the list gets on the order of 80k
nodes. also of note is that avs does not keep an end pointer so to add each
new node, object, the entire list has to be traversed to reach the end.
this is why atom (i.e. sphere) picking is non trivial with avs not just
convexavs.
the workaround is to put all of the spheres into single object, minimizing
the object storage overhead, and use the GEOM functions for setting upstream
pick correlations via GEOMedit_selection_mode and GEOMadd_*_{prim,vertex}-
_data. reference chapter 10 Geometries page 328 and chapter 11 Geometry
routines pages 351, 352 and 374.
you then have to write a pick handler which gets the vertex id and correlates
this with a particular sphere. if you want to change color or remove the
sphere, you have to regenerate the object with all the spheres as before,
with the desired changes to the particular picked one. if you want to move
the picked sphere then you need to delete the previous object, regenerate
all the previous spheres minus the picked one, and then create a new object
with just that picked sphere. this can be applied to any type of geometry,
not just spheres.
if you have any more questions free to send some email.
take care,
james, peters@convex.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads