Hi
I have a problem that can't solve:
how to display model form vrml file in opengl at defined
vievpoint( position and orienation like here:
http://www.graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#Viewpoint
)
i am doing this:
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
glu.gluLookAt( vp.position.x, vp.position.y, vp.position.z,
0,0,0,
vp.orientation.x,vp.orientation.y,vp.orientation.z);
the results are quite similat 0 but it is not that( i am nou using
angle!!)
vp - viewpoint node
I also tried:
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
gl.glTranslatef(vp.position.x, vp.position.y, vp.position.z);
float angle=vp.orientation.w*180/(float)Math.PI;
gl.glRotatef(angle,vp.orientation.x,vp.orientation.y,vp.orientation.z);
but also didn't work
i'd be very grateful at any help
--
wito


|