Archived

This topic is now archived and is closed to further replies.

apastukh

coordinates of points of surfaces

Recommended Posts

apastukh,

I''m going to move this thread to the OpenGL forum, since its specifically an OpenGL question and not a math/physics question.

But I believe I have an answer for you. You never have the opportunity to receive those coordinates directly. The functions glEvalcoord() and glEvalmesh*() internally evaluate and send the coordinates to the graphics card implicitly, as if you had directly called glColor*() or glTexCoord*() or glVertex*(). So you could do something like:


glBegin(GL_QUAD_STRIP);
glEvalMesh2();
glEvalMesh2();
glEnd();


In this case, you never need to call glVertex*(). But you also never actually receive the coordinate values directly...

There may be a way to get OpenGL to emit the coordinates in a callback. But there probably is no guaranteed way, since glEvalMesh*() or glEvalCoord*() may be executed in GPU hardware.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
Though it''s pretty simple. All those evaluators use general formula of summing all the points on curve and using time from 0.0 to 1.0. If you can wait, I''m implementing bezier patch using that general formula and my n degree bezier curve, so you''d be able to get any point on patch using t1 and t2. Or, you can do it yourself, go to my webpage, grap Bezier Curve module, and get the function GenDegree that calculates a point on curve using given time ''t''.
(Web page link below)
Cheers.

" Do we need us? "


Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites