|
From: Per W. <pw...@ia...> - 2004-07-01 11:10:00
|
Ah, I missed the info about no holes and request for smoothing.
Do you just want to hide the facettes of the flat triangles, or were you
interested in either replacing the triangles with fewer primitives, or
with primitives of higher orders - such as nurbs or bezier patches?
Anyway, a linked list is not a very good way of storing a triangle
geometry without holes in it. It is very, very expensive to locate
triangles sharing vertices or edges. You might look around for winged edge
structures, i.e. where you store edges and for each triangle keep
track of it's tree edges, and for each edge keep a pointer to
the two triangles sharing the edge. Then it is trivial to walk from
triangle to triangle when evaluating bumpines etc. Also, you will then
only need to store coordinate and normal information once for each
vertice, instead of the list which store everything six times on
average. My storing a vertex only once, it is also simpler to perform
"easing" of the geometry by filtering the vertices to reduce
high-frequency noise from a sampling process.
/Per W
On Thu, 1 Jul 2004 mi...@al... wrote:
> Hi Per,
> I am 'that' Michele that makes some strange questions, unsubscribed for
> a while...
> happy to meet again your attention.
>
> The polygons are triangles stored in a structure like this:
>
>
>
> struct element{
> float vertex[3][3];
> float normal[3][3];
> element *newElement;
> }
>
> in a 'record'.
>
> element *one,*start=NULL;
>
> //If a new triangle comes
> one=new element;
>
> one->vertex[0][0]=...
> ...
> one->element=start;
> start=one;
>
> There aren't holes in the geometry (for now), but I would like to smooth it.
> thanks.
>
>
>
>
> Da: pw...@ia...
> Data: Jul 1, 2004 11:43:20 AM
> A: mi...@al...
> Cc: dev...@li...
> Ogg: Re: [Dev-C++] polygon soup
>
> Might you give us a bit more information about the polygons - are they a
> ordered in a two-dimensional matrix? May they overlap in z order? Are
> there holes in the geometry?
>
>
>
>
|