From: Braden M. <br...@en...> - 2003-12-30 14:50:17
|
On Mon, 2003-12-29 at 16:05, Ricky Hussmann wrote: > I need to network three browser clients together. The > first client will be facing "forward", the second > "left", and the third "right." All browsers will be > located at the same position. The viewer facing > forward I will refer to as the Master. The master > needs to send viewpoint information to the other two > clients so that they can adjust their viewpoint so > their views are left and right with respect to the > master's view. Unfortunately, OpenVRML isn't really set up to support a "1 scene : n viewers" configuration. As it's currently implemented, openvrml::browser expects to be used with no more than one openvrml::viewer at a time. > I've looked through the documentation, and it appears > that I can use the set_viewpoint method of the > openvrml::glviewer class to set the viewpoint. > However, I can't find how to obtain the viewpoint > information from the master. So, basically I need the > master to send out its viewpoint information (position > and orientation, whatever), adjust it, and set that > adjusted information as the viewpoints for the other > two clients. I do not want to deal directly with > OpenGL's matrix for fear of running into > synchronization problems. I'm sure OpenVRML provides > the features to read, transform, and set the > viewpoint, I'm just not sure how. The "master" is the actual scene graph, which is accessible via browser. Specifically, browser::active_viewpoint gives you the currently "active" viewpoint_node. (The "active" bindable node is the one at the top of the bound node stack.) The problem you'll run into is that the rendering process calls viewer::set_viewpoint in order to put the user view in the right spot. If you're interested in modifying OpenVRML to support multiple viewers, that's a worthy pursuit. It will require devising a strategy to generalize the notion of a "view" apart from the "user view" (as defined by the VRML97 spec). Currently the latter is all that's supported. -- Braden McDaniel e-mail: <br...@en...> <http://endoframe.com> Jabber: <br...@ja...> |