|
From: S. K. B. <bo...@pa...> - 2002-04-11 08:15:43
|
> -----Original Message----- > From: S. K. Bose [mailto:bo...@pa...] > Sent: Thursday, April 11, 2002 12:14 PM > To: -oli-; ope...@li... > Subject: RE: [openvrml-develop] getting coordinates from ViewPoint- and > Sound-Nodes > > > > > > -----Original Message----- > > From: ope...@li... > > [mailto:ope...@li...]On Behalf Of -oli- > > Sent: Wednesday, April 10, 2002 8:46 PM > > To: ope...@li... > > Subject: [openvrml-develop] getting coordinates from ViewPoint- and > > Sound-Nodes > > > (1) How can I get the coordinates of the actual ViewPoint, i.e. > including > > the user navigation transformations, in the VRML-world > coordinate system > > (_not_ the OpenGL coordinate system)? > > I have found some code concerning this in VrmlScene.render(). But > > how can I > > get the position out of the modelview-matrices used here? After a > > MV.getTransform(pos,...) the values in pos don't change even if I > > turn the > > scene around the viewer (or the viewer around the scene, which > > probably is > > more correctly). I also need some information (e.g. > view-up-vector) about > > the ViewPoint's orientation. > > You go through the code "NodeBillboard::billboard_to_matrix(...)" or > "NodeLOD::render(..)". Here you will find how to get viewer > position w.r.t. > local coordinate system. For your case don't inverse it. > If I am right, probably you can use local coordinate system to implement sound node instead of going for world coordinate. Thanks, Bose |