Jump to content
  • Advertisement

Nathan Drake

Member
  • Content count

    45
  • Joined

  • Last visited

Community Reputation

810 Good

About Nathan Drake

  • Rank
    Member

Personal Information

  • Interests
    Education
    Programming
    QA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. What is the ape to man? A laughing-stock or a painful embarrassment. And just the same shall man be to the overman.The overman is the meaning of the earth. - "Thus Spoke Zarathustra" by F.Nietzsche
  2. "Love sometimes wants to do us a great favor: hold us upside down and shake all the nonsense out." - Hafez
  3. I have written a code for drawing a bezier curve in OpenGL 2. for example this is my bezier curve that i have drawn:       i can setup my bezier by glMap1f() using my controlPoints and number of controlPoints (which is uOrder) void MyBezierLine::setup(const GLfloat* controlPoints, GLint uOrder) { controlpoints = controlPoints; uorder = uOrder; //setup the bezier glMap1f(GL_MAP1_VERTEX_3, //to be generated data 0.0f, //lower u range 1.0f, //higher u range 3, //u control point stride in array uorder, //order of u or number of u control point controlpoints); //the control points array //enabling bezier evaluator glEnable(GL_MAP1_VERTEX_3); } and i can simply draw them by glMapGrid1f() and glEvalMesh1(). void MyBezierLine::draw(GLenum draw_mode, //GL_LINE or GL_POINT GLint ures) { //setting the 1D grid map containing ures points //map to u range 0.0 - 1.0 glMapGrid1f(ures, 0.0f, 1.0f); //evaluate the bezier surface glEvalMesh1(draw_mode, 0, ures); } what i want to do is try to move an object along this bezier curve which has drawn by purple color. based on what i have searched over internet, it looks like i have to write the function and  calculate the bezier curve by myself to get the position of each point on the line. despite of that, i have to evaluate the rotation of the object based on the position of each point.   do you have any proper way or idea about how can i do this ?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!