Hi Robert,

I'm computing the NDC coordinates of Particles in a derived ParticleSystem.  
I'm doing it in the drawImplementation which "feels" wrong, but can live with 
it.  I was interested in moving this computation to the update phase, but I'm 
starting to think this isn't the best plan.  This was just a quick 
investigation to figure out if it could be moved.

Thanks
Brad

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Robert Osfield
Sent: Monday, February 14, 2011 11:34 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Drawable::UpdateCallback, Modelview and projection 
matrices

Hi Brad

On Mon, Feb 14, 2011 at 7:10 PM, Brad Colbert <[email protected]> wrote:
> Is there a way to get the current ModelView and Projection matrices in the 
> update() call?

There isn't necessarily any one modelview and projection matrix as the
OSG can have multiple cameras rendering the scene at one time.

Is the viewer's master Camera that you want a handle to? If so just
get the viewer's camera and get it's projection and view matrixes and
then get the model matrices using the
osg::computeLocalToWorldMatrix(NodePath) wher the NodePath is supplied
by the NodeVisitor::getNodePath().

Robert,
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to