If i have a cube and a sphere an i want the cube to be the parent object and the sphere the child object how can i do it?Can someone gives me a sample code and explain i a few words what is the difference between a parent and a child object?
I have the above question.I want to draw a sphere an bahind the sphere a cube.The problem
is that i want when i rotate my draw 90...the sphere to ba half inside the cube.I don't want
to see two seperate schemes but one.The part of the sphere which will be inside the cube
i don't want to be visible.Can you give me the part of the code which gives me solution to this?
Imagine that i want to make a very very simple head.The cube will be the head an i want the spheres to
be the two eyes.when i see the face from the one side i want to see a sphere and behind the sphere the cube but when i rotate my scheme i want the face to looks like here
(i want to make a penguin)to see the penguin go to http://graphics.di.uoa.gr/Courses/exercise2002.html
and watch the head for example
please modify the code below
glMatrixMode( GL_MODELVIEW );
glTranslatef( 0.0, 0.0,-100.0 );
glTranslatef( -3.0, 17.0, 0.0);
glTranslatef( -3.8, 21.5, 0.0 );