Hi
I generated with glevalcoord1f a Bezier-Curve!
Is it possible to save the generated Coordinates in an external array?
Is there a function that does it?
Havent found anything in the RedBook!
Want to use them for camera!!!
Thanx in advance!
Is it an option to simply implement it yourself?
What it basically does is this:
(http://www.2dcurves.com/polynomial/h03polyf.gif)
;D and for people like me, what does that equation mean?
@energy i dont think its posible with ogl to retrieve transformed coords. you have to manually transform any coords you wish to keep track of. having said that ive never used glevalcoord1f what exactly does it do?
Quoteive never used glevalcoord1f what exactly does it do?
The Function
glEvalCoord1f evaluates a polynomial previously specified by
glMap1f and sets its' value as vertex-, texture-, normal- or color-value.
Polynomials are just smooth functions with some ups & downs.
Quotewhat does that equation mean?
That "Sum"-Sign is nothing more than a loop:
for (int i=0;i<n;i++)
y+= a[i] * pow(x, i);where
"a" are the polynomial's coefficients from
glMap1f() and "x" the parameter you passed to
EvalCoord1f().
In practice you won't use the "pow" but just do another multiply.
Quotei dont think its posible with ogl to retrieve transformed coords
I think you won't get a vertex-position since it's not an actual state (maybe i'm wrong here) but you can tell EvalCoord to generate a texture coordinate and read that back using
glGetf(GL_CURRENT_TEXTURE_COORDS, &values).
very usefull info hellfire thanks very much k+!
@Hellfire thanx for the answer.
Thought that OPENGL can do the work for me!
so i did i handy...
a cool Tut about this is:
http://www.gamedev.net/reference/articles/article1808.asp
cheers
energy