Re: A couple of simple pointer questions (targets, arrays of pointers)
- From: Brooks Moses <bmoses-nospam@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 05 Apr 2006 15:01:31 -0700
2.) Is there any way to make an array of pointers to triangles (to
handle the adjacent triangles), rather than an array of wrapper objects
that contain pointers to triangles?
No, you need the wrapper object to make the array of pointers. However,
you could, instead of using pointers for making connections, also use
integers, which would just be the location of the triangle in a
preallocated array of triangles.
Yeah, the more I think about this, the more that seems like the right way to go -- the deciding factor was that I'm storing all the data in an array indexed by the triangle number, so I pretty much either need to have the integers anyway, or need to completely rethink the storage model.
Thanks for the suggestions about declaring the triangles as pointers in the mesh object and then allocating them, though; I'm sure I'll use that sometime.
The "bmoses-nospam" address is valid; no unmunging needed.
- Prev by Date: Re: SAVE of COMMON variables
- Next by Date: Complex roots of a non polynomial function
- Previous by thread: Re: A couple of simple pointer questions (targets, arrays of pointers)
- Next by thread: Complex roots of a non polynomial function