Hello.

I've got a scene where I've got a coule different cameras (a 3D scene, then a 2D "text" camera that overlays on the 3D scene). I'd like to add some 3D objects to my "ortho2D" camera view, but no matter where I put them, they don't seem to show up.

My stuff looks like this in the 2D camera view:

osg::Node* logo = osgDB::readNodeFile("logo.osg");
osg::Group* rootNode = new osg::Group;
osg::MatrixTransform* positioner = new osg::MatrixTransform;
positioner->setMatrix(
        osg::Matrix::translate(50.0f,850.0f,0.0f) *
        osg::Matrix::scale(1.0f,1.0f,1.0f) *
        osg::Matrix::rotate(osg::inDegrees(90.0f),0.0f,0.0f,0.0f));
positioner->addChild(logo);  // my 3D object
rootNode->addChild(positioner);
osg::CameraNode* camera = new osg::CameraNode;
camera->setProjectionMatrix(osg::Matrix::ortho2D(0,1280,0,1024));
camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
camera->setViewMatrix(osg::Matrix::identity());
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
camera->setRenderOrder(osg::CameraNode::POST_RENDER);
camera->addChild(rootNode);

Am I doing something wrong that I can't see my 3D object no matter where I place it (in the transform operator in the positioner object) or what scale I make it?

Is there something that I can do to dump out the xform data or screen position of my object?

- Steve

--
EMAIL: (h) [EMAIL PROTECTED]  WEB: http://badcheese.com/~steve

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

Reply via email to