From: Namal D. <nam...@ho...> - 2004-02-17 15:23:19
|
Dear All, I want to move 3 objects seperatle(Sphere or better if i can get a sample on moving images) I have post three methods which i implement the required objects. 1. Could you please tell me how do i move three sepratly. Please send me if you have a sample source. Thanks PlS reply ASAP ...your feed back greatly appriciated ... *************************************************************************** private void renderSphereRed(float x, float y, float z) {//Create // sphere gl.glPushMatrix(); gl.glTranslatef(x,y,z); long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj , GLU_OUTSIDE); glu.gluQuadricNormals(qobj, GLU_SMOOTH); gl.glColor3f(1.0f,0.0f,0.0f);//Red glu.gluQuadricTexture(qobj, false); glu.gluSphere(qobj,0.4f, 10, 10); glu.gluDeleteQuadric(qobj); gl.glPopMatrix(); } private void renderSphereYellow(float x, float y, float z){//Create sphere gl.glPushMatrix(); gl.glTranslatef(x,y,z); long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj , GLU_OUTSIDE); glu.gluQuadricNormals(qobj, GLU_SMOOTH); gl.glColor3f(1.0f, 1.0f, 0.0f);//Yellow glu.gluQuadricTexture(qobj, false); glu.gluSphere(qobj, 0.4f, 16, 16); glu.gluDeleteQuadric(qobj); gl.glPopMatrix(); } private void renderSphereBlue(float x, float y, float z) {//Create //sphere gl.glPushMatrix(); gl.glTranslatef(x,y,z); long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj , GLU_OUTSIDE); glu.gluQuadricNormals(qobj, GLU_SMOOTH); gl.glColor3f(0.0f, 0.0f, 1.0f);//Blue glu.gluQuadricTexture(qobj,true); glu.gluSphere(qobj, 0.4f,20,20 ); glu.gluDeleteQuadric(qobj); gl.glPopMatrix(); } *************************************************************************** _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |