Thanks for your replying.

I'm now using the release version 1.2, and I'm using it with the QT
windowing system. 

Now , the only way I can get something about camera is through the sceneview
object in my QOSGWidget.  How can I get  the eye position and near far clip
plane?

Because I want to pass them to my GLSL fragment shader, or is there any way
to get those variables directly in the GLSL shaders? I've searched the GLSL
orange book, but all over the book, it assumes the eye position to be
(0,0,0). 

 

If version 1.3 will clarify this camera thing, that'll really be great, and
I'll definitely dig into that, but for now, I can't wait a month for that.

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: 2006?11?29? 11:43
To: 'osg users'
Subject: RE: [osg-users] Camera

 

Hi -- Welcome to the OSG community.

 

OSG is currently in a state of flux. If you'll be using the latest/current
CVS, I'd recommend you take a look at the examples named osgSimpleViewer*
for the current approved method managing cameras with OSG.

 

Producer had been OSG's camera library for quite some time. However, it is
currently being replaced by osgViewer in the current CVS. All development
moving forward should use osgViewer rather than Producer/osgProducer.

 

The current CVS should be in a release form in about a month or so,
tentatively called "OSG v1.3".

 

Hope this helps,

 

Paul Martz

Skew Matrix Software LLC

http://www.skew-matrix.com <http://www.skew-matrix.com/> 

303 859 9466

 

 


  _____  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of xiaoshuxing
Sent: Tuesday, November 28, 2006 7:52 PM
To: [email protected]
Subject: [osg-users] Camera

Hi, everyone:

I'm a beginner of OSG, and a problem about "Camera" puzzled me a lot,
there're a lot of classes about camera which makes confused.

Those are Producer::Camera & Producer::CameraGroup(which I think is a group
of cameras), osgProducer::OsgCameraGroup,osg::CameraNode

And then I read the article "Of Cameras And Scenes" of Don Burns from: 

 <http://donburns.net/OSG/Articles/CamerasAndScenes/CamerasAndScenes.html>
http://donburns.net/OSG/Articles/CamerasAndScenes/CamerasAndScenes.html

don said camera should be independent with SceneGraph, which make sense to
me. And there's also what puzzles me, what's the relation between
osg::CameraNode and Producer::Camera, and what's the relation between
osgProducer::OsgCameraGroup and Producer::CameraGroup.

For example, if I want to get the eye position, which way should I use?

SceneView->getCamera()->getViewMatrixAsLookAt()

Or from the Producer::camera::getViewMatrix()

If it's the later way, how can I get the Producer::camera object from my
SceneView object?

If I want to get the near far clip plane, should I use
"SceneView->getCamera()->getProjectionMatrixAsPerspective()"?

If so, then camera seems to be a node of the scenegraph.

If not, how can I get the eye position and near far clip plane?

 

I really need help to get me out of this bitter puzzled situation.

Thanks in advance.

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to