Picking points

Started by
2 comments, last by Kwak 18 years, 1 month ago
Hi guys, I want to be able to select the vertices on my objects. I am making a modeller and want to be able to deform my objects. I have whole brick selection working. So can I render points at each vertice and select them or would I have to draw a sphere at each vertice? Thanks for any help given!
Reject the basic asumption of civialisation especially the importance of material possessions
Advertisement
This is what you could do:
You can toggle between
-select objects
-select faces
-select points

Select faces is the easiest. It's a simple ray-triangle collision detection.

select objects is the same, but all the other triangles of the same object are selected with it. (probably like your brick selection)

Select points is also a ray-triangle collision detection. The point of the triangle which is closest to the collision point is selected.

I did just the same in my modeller [Kwak Creator 93b.zip]

[Edited by - Kwak on March 12, 2006 8:37:42 AM]
Hi,

yeah I've got object selection working, i'll want to add face and vextice selection. Did u use OpenGL selection. If I render a point can I push a name onto the selection stack for selecting that point?

Your modeller seems really good, can you use NURBS? Just asking cos I'm going to try to make my objects from NURBS
Reject the basic asumption of civialisation especially the importance of material possessions
I just know the basics of OpenGL. (Thats somthing like the first 20 tutorials of NEHE, hehe)

No Idea what OpenGL selection is

Selection stack? (my knowledge is VERY basic)
I wrote ray-triangle collision detection myself.
It tests every triangle in memory and returns the point of collision.
Maybe this could be done much faster (yep, the poor knowledge again).
Should work fine for 40000 triangles.
(Haven't tested this yet, my graphics card is so old, it has even difficulties with drawing stipple lines)

I was goïng to do something "similar" to NURBS:
make a "jerky" line of some segments
=> round the corners => becomes a fluent line
to create surfaces, the line can be rotated/translated
(example: if you rotate 1 linesegment you get a circle or a disk)

Is future music. haven't worked on it for nearly 6 months.
As soon as I have some time, and more importantly, motivation, I'll work on it again.

This topic is closed to new replies.

Advertisement