# zephyr87

Members

5

100 Neutral

• Rank
Newbie
1. ## Rotate 3D Box Kinect

Solved! Thanks:) I would like to do something more elaborate. But I'm not practical to OpenGL. Can I count on yours help? [quote name='zephyr87' timestamp='1296655752' post='4768494'] Hi! I'm writing a code for to rotate a 3D Cube using Kinect. I have already solved the problem of drawing to cube in a window and the recognition of the hand, but I can not rotate my cube. I also have a point with three coordinates X, Y, Z (Z fixed to 0) that move along a circle. Should I use this reference for to rotate. Everything must be done when it is drawn my cube and then executed in loop. Here is my code void DrawCube(const XnPoint3D& ptCenter, const XnPoint3D& ptMaxs, double r, double g, double { glColor4f(r,g,b,1.0f); //Scelta del colore #ifdef USE_GLUT glBegin(GL_QUADS); glColor3f(1.0f, 0.0f, 0.0f); // FRONT glVertex3f(-0.5f, -0.5f, 0.5f); glVertex3f( 0.5f, -0.5f, 0.5f); glVertex3f( 0.5f, 0.5f, 0.5f); glVertex3f(-0.5f, 0.5f, 0.5f); // BACK glVertex3f(-0.5f, -0.5f, -0.5f); glVertex3f(-0.5f, 0.5f, -0.5f); glVertex3f( 0.5f, 0.5f, -0.5f); glVertex3f( 0.5f, -0.5f, -0.5f); glColor3f(0.0f, 1.0f, 0.0f); // LEFT glVertex3f(-0.5f, -0.5f, 0.5f); glVertex3f(-0.5f, 0.5f, 0.5f); glVertex3f(-0.5f, 0.5f, -0.5f); glVertex3f(-0.5f, -0.5f, -0.5f); // RIGHT glVertex3f( 0.5f, -0.5f, -0.5f); glVertex3f( 0.5f, 0.5f, -0.5f); glVertex3f( 0.5f, 0.5f, 0.5f); glVertex3f( 0.5f, -0.5f, 0.5f); glColor3f(0.0f, 0.0f, 1.0f); // TOP glVertex3f(-0.5f, 0.5f, 0.5f); glVertex3f( 0.5f, 0.5f, 0.5f); glVertex3f( 0.5f, 0.5f, -0.5f); glVertex3f(-0.5f, 0.5f, -0.5f); // BOTTOM glVertex3f(-0.5f, -0.5f, 0.5f); glVertex3f(-0.5f, -0.5f, -0.5f); glVertex3f( 0.5f, -0.5f, -0.5f); glVertex3f( 0.5f, -0.5f, 0.5f); //Ruoto glRotatef(ptMaxs.X, 1.0f, 0.0f, 0.0f); glRotatef(ptMaxs.Y, 0.0f, 1.0f, 0.0f); glEnd(); #else .... Thanks for the help. [/quote]
2. ## Rotate 3D Box Kinect

Hi! I'm writing a code for to rotate a 3D Cube using Kinect. I have already solved the problem of drawing to cube in a window and the recognition of the hand, but I can not rotate my cube. I also have a point with three coordinates X, Y, Z (Z fixed to 0) that move along a circle. Should I use this reference for to rotate. Everything must be done when it is drawn my cube and then executed in loop. Here is my code void DrawCube(const XnPoint3D& ptCenter, const XnPoint3D& ptMaxs, double r, double g, double { glColor4f(r,g,b,1.0f); //Scelta del colore #ifdef USE_GLUT glBegin(GL_QUADS); glColor3f(1.0f, 0.0f, 0.0f); // FRONT glVertex3f(-0.5f, -0.5f, 0.5f); glVertex3f( 0.5f, -0.5f, 0.5f); glVertex3f( 0.5f, 0.5f, 0.5f); glVertex3f(-0.5f, 0.5f, 0.5f); // BACK glVertex3f(-0.5f, -0.5f, -0.5f); glVertex3f(-0.5f, 0.5f, -0.5f); glVertex3f( 0.5f, 0.5f, -0.5f); glVertex3f( 0.5f, -0.5f, -0.5f); glColor3f(0.0f, 1.0f, 0.0f); // LEFT glVertex3f(-0.5f, -0.5f, 0.5f); glVertex3f(-0.5f, 0.5f, 0.5f); glVertex3f(-0.5f, 0.5f, -0.5f); glVertex3f(-0.5f, -0.5f, -0.5f); // RIGHT glVertex3f( 0.5f, -0.5f, -0.5f); glVertex3f( 0.5f, 0.5f, -0.5f); glVertex3f( 0.5f, 0.5f, 0.5f); glVertex3f( 0.5f, -0.5f, 0.5f); glColor3f(0.0f, 0.0f, 1.0f); // TOP glVertex3f(-0.5f, 0.5f, 0.5f); glVertex3f( 0.5f, 0.5f, 0.5f); glVertex3f( 0.5f, 0.5f, -0.5f); glVertex3f(-0.5f, 0.5f, -0.5f); // BOTTOM glVertex3f(-0.5f, -0.5f, 0.5f); glVertex3f(-0.5f, -0.5f, -0.5f); glVertex3f( 0.5f, -0.5f, -0.5f); glVertex3f( 0.5f, -0.5f, 0.5f); //Ruoto glRotatef(ptMaxs.X, 1.0f, 0.0f, 0.0f); glRotatef(ptMaxs.Y, 0.0f, 1.0f, 0.0f); glEnd(); #else .... Thanks for the help.
3. ## Rotate 3D Box Kinect

Solved! Thanks:)
4. ## Help Crowd Simulation

Thank you very much. I start to study, I hope i have no problems. Thanks.
5. ## Help Crowd Simulation

Hello everyone! My name is Francesco, I am a new user. Forgive my bad English. I wanted to ask where can I find the material on Collison detection and crowd simulation. I have to do a job that uses OpenGL and 3D Horde but not very practical. I have the source files of the crowd simulation, but there are collisions between objects and bipeds. I have to avoid collisions. Help me please?