Jump to content

Understanding Gdp


Recommended Posts

Guest xionmark

Hi Dave,

Yes you need a "gdp" for all of those operations. A quick glance through the HDK docs I find:

GB_Detail

int deletePoint (const GB_PointGroup &ptGrp, unsigned deleteFast=0)

GB_PointGroup * newPointGroup (const char *name, int internal=0)

As far as building the polys from the existing points, I guess that could get a little tricky because of the fact you have to keep track of which vertices are associated with each point. Shouldn't be too hard I guess, just a little attention to how things may get reordered when deleting the points.

Hope to see you at SIGGRAPH.

Take care,

Mark

Link to comment
Share on other sites

Thanks. I'll poke around in there some more. All the information seems to be so spread out, I'm having trouble keeping track of where I read something. I've been grepping the /include directory a lot lately. I have the doxygen pages which help keep things a bit more organized, but there's a sorry lack of comments in the header files. No offense to the authors intended, but my mileage is varying. :blink:

Link to comment
Share on other sites

Thanks for the encouragement.

I'm trying to write my own version of a SOP that will find a convex hull of the given geometry. Probably not the easiest place to start, but it would be very helpful for what we're doing. And that gives me motivation (and funding) to learn what the HDK thing is all about.

I've figured out how to delete polygons and keep the points, and how to create new polys, but not with the old points. The new polys add new points (in the same place as the old ones). I suppose that I could consolidate points after adding the polys. But it would be nice to just say "connect points 1 34 67 and 2 into a poly and run with it".

Dave

Link to comment
Share on other sites

Did you know edward posted a bit of code for doing that on this forum. If you want it I have it. It's not source code but a compiled exe, he used the technique of having it as a standalone C program which you can just call with a unix sop. I've wrapped it up into an otl if you would like it let me know. I can't remember where he posted it exactly but I expect a quick search will reveal it.

Link to comment
Share on other sites

Did you know edward posted a bit of code for doing that on this forum. If you want it I have it. It's not source code but a compiled exe, he used the technique of having it as a standalone C program which you can just call with a unix sop. I've wrapped it up into an otl if you would like it let me know. I can't remember where he posted it exactly but I expect a quick search will reveal it.

19673[/snapback]

Yeah, send it to me. I'll search too.

Dave

Link to comment
Share on other sites

The code for qhull is at www.qhull.org

but you probably already knew that.

I'm trying to do the same thing in HDK, rather than use the UNIX SOP. Partly because I want to learn how and partly because it would be cooler in our work flow to have "proprietary" software in the pipline.

Link to comment
Share on other sites

I think I must be thinking of something else, it can't be qhull, damn. I remember checking it out now, it's not quite what I'm after. I'm looking for either code to do 3d paving and/or quadrangulation.

This is it CQMesh, ever seen code for that anywhere?

Actually, its ok I've found it, how weird Google came up with it straight away this time.

http://www.seas.upenn.edu/%7Emarcelos/cqmesh.html

Edited by sibarrick
Link to comment
Share on other sites

I'm trying to do the same thing in HDK, rather than use the UNIX SOP. Partly because I want to learn how and partly because it would be cooler in our work flow to have "proprietary" software in the pipline.

19706[/snapback]

You missed the thread I posted about chull. The only reason why I used the GPD is because I don't have MSVC at home and thus have been compiling using MinGW. GPD is the public domain version of the $GEO library. So basically, it's a cinch to integrate chull into a SOP if you want to.

The problem with qhull is that the code is really, really ugly.

Also, mentioned in the other thread was that I was going to write my own convex hull code as a side hobby. However, I've been distracted for quite awhile now and never got past the 1D case. :)

Link to comment
Share on other sites

You missed the thread I posted about chull. The only reason why I used the GPD is because I don't have MSVC at home and thus have been compiling using MinGW. GPD is the public domain version of the $GEO library. So basically, it's a cinch to integrate chull into a SOP if you want to.

The problem with qhull is that the code is really, really ugly.

Also, mentioned in the other thread was that I was going to write my own convex hull code as a side hobby. However, I've been distracted for quite awhile now and never got past the 1D case. :)

19708[/snapback]

Is there a way to go back and read the thread on chull?

I'm using Linux, and I'm not sure what GPD is. I thought you meant gdp at first glance and then I saw MSVC (which is Microsoft Visual C, right?).

Anyway, I'm not sure what the 1D case for a convex hull would be. Do you mean 2D?

Thanks for your insights,

Dave

Link to comment
Share on other sites

Sorry, yeah MSVC is Microsoft Visual C++ ...

If all the points are coplanar, then you get the 2D case where the convex hull is a single polygon. So by extension (whether I'm actually correct or not), I think of the 1D case as the situation when all the points are collinear. So the convex hull is a line (with 2 points).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...