In my OpenGL study (I think this is the OpenGL red book), I came across an example of an articulating robot model consisting of a “shoulder”, “lower arm”, “arm” and five or more “fingers”. Each of the sections should be able to move independently, but be restrained by the “joints” (the upper and lower “shoulders” are always connected by “elbow”).
In immediate mode (glBegin / glEnd) they use one cube grid called a “member” and use scaled copies of this single grid for each part of the arm, arm, etc. The “movements” were made by clicking the rotations on the stack of the transformation matrix for each of the following joints: shoulder, elbow, wrist, joint — you get an image.
Now this solves the problem, but since it uses the old, outdated immediate mode, I still do not understand the solution to this problem in the modern OpenGL context. My question is: how to approach this problem using modern OpenGL? In particular, should each individual “member” keep track of its own current transformation matrix, since the matrix stacks are no longer kosher?
seveland
source share