Re: half edge data structure



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/
.



Relevant Pages

  • Re: How to realize the OOP in C?
    ... > struct A { ... > void A_methodA{ ... > void Driver() { ... Below I inserted class Shape for class A and class Triangle for class B. ...
    (comp.object)
  • Re: half edge data structure
    ... The file specifies the details about the 3d ... to represent the triangle. ... typedef struct { ... edge data structure. ...
    (comp.graphics.algorithms)
  • half edge data structure
    ... hello i am trying to implement a hald edge data structure. ... to represent the triangle. ... typedef struct { ...
    (comp.graphics.algorithms)
  • FVF and struct for outline drawing
    ... I need to draw only outlines between vertices of a triangle. ... what would be the struct and what FVF flags. ... Is there any webpage that helps me analyzing such things. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Newbie question: FVF For onlining
    ... I need to draw only outlines between vertices of a triangle. ... what would be the struct and what FVF flags. ... Is there any webpage that helps me analyzing such things. ...
    (microsoft.public.win32.programmer.directx.graphics)