Hi Guys,
Have a bit a canudrum. I have lines made up of a vector called 'start' and 'end'
These lines are in an array which form a rectangle, which is then rotated about the center of the screen thus...
void showLine(){
glLoadIdentity();
glTranslatef(SCREEN_WIDTH/2,SCREEN_WIDTH/2,0.0f);
glRotatef(rot,0.0f,0.0f,1.0f);
glTranslatef(-SCREEN_WIDTH/2,-SCREEN_WIDTH/2,0.0f);
glBegin(GL_LINES);
glColor3f(1.0f,0.5f,0.3f);
glVertex2f(start.x,start.y);
glVertex2f(end.x,end.y);
glEnd();
}//this is only one line segment
I have a collision function (line segment vs circle) all figured out, but as I loop through the simulation, i am not sure how to update my two line vectors, start.x, start.y, end.x, end.y with GL's rotation algorithm. I need to find some kind of relationship.
If you know how to solve this problem please let me know.
Thanks,
Mike