Structure that stores vertices, faces and edges

Hi…

could you explain to me how to implement and use a structure that stores vertices, faces and edges please?

Many thanks…

Nicolas

I’m just a beginner, but why not use vertex arrays or interleaved arrays? Their in the RedBook.

It may not be convenient enough unfortunately… that is what I started to do but you need to be able to identify each edge individually…

I’ve seen a few postings now from you and I’m quite interested in exactly what you’re trying to do. If you could give me an idea as to what it is, I may be able to help you out.

Cool…

Here’s what I’m trying to do…

I want to implement a non-photorealistic renderer… I’d like to draw lines that communicate shapes at best, that is to say silhouettes, surface discontinuities (sharp edges and folds) and surface boundaries… I know all the theory about it but I need to implement it in programming now…

My algorithms are the following:

Silhouettes:

Detect and draw the edges that are shared between one front-facing polygon and one back-facing polygon by comparing the normals of the adjacent faces of these edges…

sharp edges:

Detect and draw the edges that are shared between two faces which form an angle superior to a threshold by comparing the normals of the adjacent faces of these edges…

AND I NEED SOME HELP…

the main thing for me is to create a structure that stores some information on the edges and their adjacent faces… because I know how to do the rest (compare normals) but I don’t know how to use a structure that can help me to code my algorithms…

MANY THANKS

Nico

Hi Nico,
as someone else pointed out you’ll need to store your geometry in a data structure optimized for “edge” searches.
One of such structure is the winged edge data structure.
Among the hits of a rapid search on altavista reported this page: http://www.cs.mtu.edu/~shene/COURSES/cs390/NOTES/model/winged-e.html
which seems a good introduction

Further surfing revealed this interesting page: http://persweb.direct.ca/byheart/Ashdown.html
where you can find an archive containing a C++ class implementing the winged edge data structure (ftp://ftp.ledalite.com/pub/winged.zip).

Hope this helps

Alex “Flappy” Falappa

Thanks Flappy…

I already went to the first page you gave me (this is really interresting by the way)…

I also already got winged.zip from another Web site… but the funny thing is when I try to compile… it crashes… I really don’t know why…

Any help?

Many thanks

sorry, but I have to do this, because I see it SO often, and it drives me insane; you can’t possibly imagine how i dispair at the rate english is languishing:

> I’m just a beginner, but why not use vertex arrays or interleaved arrays?
> Their in the RedBook

THEIR is not the right word to use! ARGH! you want’ “THEY’RE”, which is phonetically the same, but has an entirely different meaning!! They’re == contraction for THEY ARE. Their == possessive from of them. “This is their redbook” means the redbook is OWNED or possessed by THEM!! ARGH! ARGH! it’s english! it’s grade 5! it’s nonsensical! ARGH! it drives me insane, it REALLY does. same argument with “you’re” and “your”. phonetically the same, but DIFFERENT MEANING.

I apologise for ranting, but I see this ALLLLLLLLLLL THE TIME and it’s such a trivial nonsensical error.

I realise english might not be your native language, and i duly apologise, but I see this ALL THE TIME even in Australia (and America and England) where English IS the official language. ARGH!!!

(sorry
John

John… thank you for your watchfulness… I am French and I also tend to notice some BIG spelling or grammar mistakes in my language…