|
From: Andres R. <lo...@ho...> - 2004-07-01 10:42:07
|
Hi!
>
> 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;
This is the case of what I call 'One Way Linked List'.
For example:
http://www.faqs.org/docs/thinkjava/chap14.htm
this is a Java, but you might get the idea
http://www.fortunecity.com/skyscraper/false/780/linklist.html
C++ linked list tutorial
http://richardbowles.tripod.com/cpp/linklist/linklist.htm
and another one
> There aren't holes in the geometry (for now), but I would like to smooth it.
Geometry itself does not affect that linked list, because every
element is one entity (independent of others).
Rendering it depends on the engine you use.
HTH, A.
|