Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Rendering > how to dispaly ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 138 of 184
Post > Topic >>

how to dispaly model at specific vievpoint

by "wito" <zwito@[EMAIL PROTECTED] > Jan 24, 2006 at 04:17 PM

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
 




 6 Posts in Topic:
how to dispaly model at specific vievpoint
"wito" <zwit  2006-01-24 16:17:45 
Re: how to dispaly model at specific vievpoint
psvalins@[EMAIL PROTECTED  2006-01-25 01:59:18 
Re: how to dispaly model at specific vievpoint
"wito" <zwit  2006-01-25 11:38:14 
Re: how to dispaly model at specific vievpoint
psvalins@[EMAIL PROTECTED  2006-01-25 02:49:19 
Re: how to dispaly model at specific vievpoint
"wito" <zwit  2006-01-25 12:52:53 
Re: how to dispaly model at specific vievpoint
psvalins@[EMAIL PROTECTED  2006-01-25 05:55:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 6:45:40 CST 2008.