Re: half edge data structure
- From: Morris Dovey <mrdovey@xxxxxxxx>
- Date: Mon, 24 Mar 2008 09:29:10 -0500
broli wrote:
[edited only to vertically compress]
struct HE_edge
{ HE_vert* vert; // vertex at the end of the half-edge
HE_edge* pair; // oppositely oriented adjacent half-edge
HE_face* face; // face the half-edge borders
HE_edge* next; // next half-edge around the face
};
struct HE_vert
{ float x;
float y;
float z;
HE_edge* edge; // one of the half-edges emantating from the vertex
};
struct HE_face
{ HE_edge* edge; // one of the half-edges bordering the face
};
From previous post:
typedef struct Triangle 3Dstruct /* Data structure for the
Triangle */
{ int v0, v1, v2; /* 3 indices to the vertex list */
} Triangle;
Now my main question : How do I fit all this data into the structures
above ?? Do I need to loop through each vertex in the vertex list and
each triangle in triangle list ??
It appears to me that it should be sufficient to work your way
through the triangles and use the vertex indices to get at the
vertex coordinates.
HTH
--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/
.
- Follow-Ups:
- Re: half edge data structure
- From: broli
- Re: half edge data structure
- References:
- half edge data structure
- From: broli
- half edge data structure
- Prev by Date: Re: polymorphic structs with "methods"
- Next by Date: Re: Suggestion for theme treatment was: Re: The problems in comp.lang.c
- Previous by thread: half edge data structure
- Next by thread: Re: half edge data structure
- Index(es):
Relevant Pages
|