From: Braden M. <br...@en...> - 2003-09-07 04:51:53
|
Quoting mike c <mr...@ho...>: > >Off the top of my head, you probably want to focus on moving the user > >view rather than trying to transform the model. Transforming the model > >would ordinarily be done by modifying the scene graph, and I get the > >impression you don't want to do that. > All I want is to able to arbitrary tell the model where to appear on the > screen (whether by shifting the model or shifting the viewer). Okay; then definitely do the latter. > >I think what you ought to be doing is getting the active viewpoint node, > >and then setting its user view transformation. I'm not sure the version > >you're using has all the machinery for this, but you can find examples > >of how to do this in src/libopenvrml-gl/openvrml/gl/viewer.cpp in CVS. > >Just do a search for "active_viewpoint". > Using 0.13 compiled under VisualStudio VC++7. > I've just had a brief browse in CVS and this may solve my problems. The > "active_viewpoint" stuff is new since 0.13? Now that I look at the 0.13 docs, yes. > If it is new, how would you do it v0.13? Er... I really don't know. I kinda recall refactoring some of this state out of the viewer (and into the viewpoint_node). So I imagine the bits of state you need to twiddle are in ViewerOpenGL in 0.13. But I'm afraid I can't be more specific than that. > (grabbing CVS now to have a trial) As for the code in CVS... The basic idea is to get the active viewpoint from the browser, and then set its user view transform however you like. Note that the user view transformation is relative to the position and orientation of the Viewpoint node, and any transformation applied to the Viewpoint node in the transformation hierarchy. -- Braden McDaniel e-mail: <br...@en...> <http://endoframe.com> Jabber: <br...@ja...> |