PickingLibrary new supports QuadArrays

hi

recently I modified the PickingLibrary to enable it to pick on QuadArrays. Now each Geometry type is supported except for TriangleFanArray. And I have no idea, where one could find such a thing.

So check out your CVS and enjoy the new possibility.

For triangle fans, it might be inefficient, but couldn’t you just check each triangle seperatly?

Alex

That’s what I do for QuadArray and TriangleStripArray. But to be honest, I don’t know, what a TriangleFanArray is. I can only guess that you can create a disc or something like that from triangles that all have one point in common. But I’ve never met such a geometry. So I have no example of its implementation.

You should think about about picking the OpenGL redbook. Its the defacto reference on OpenGL, and gives loks of nifty insight into 3d constructs.

Otherwise, you can just take a look at : http://www.falloutsoftware.com/tutorials/gl/gl3.htm . Its got a pretty good example of a triangle fan.

Basicly, imagine you have 6 points in your coordinates (A,B,C,D,E,F), then you need to check for triangle ABC, ACD, ADE, AEF.

Alex