Re: [osg-users] Convert from screen space to world space and back to screen space.
Thanks for the response Steal. So, if I'm reading that post correctly, I can multiply my vector of (x, y, 0) by ModelInverse*ViewInverse*WindowMatrix, apply my 3D rotations, and then multiply the resulting vector by Model*View*Window to get back to screen-space. I'll give it a try! Zach Steal wrote: > Ou, that is a rather easy question. First of all, you'll like the lhs and rhs > operations you can do with matrices, like mat * mat and vec * mat, I think > work. > > http://forum.openscenegraph.org/viewtopic.php?t=2292 > > Maybe this has something useful in it. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71278#71278 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Geode getDisplaySize functionality?
Hello, I am wondering if there is any way to get the display size of a geode on screen. Specifically, I would like to get the display size of a Cylinder, our sun, on the screen so that I can make some calculations. I'm using the number of samples visible given by an Occlusion Query Node to see how much of the sun is visible. The max number of samples changes depending on the size of the sun, so I would like to be able to find that number at any given time. For example, the max when zoomed out is 1, while the max when zoomed in is much more. Any help is much appreciated. Thanks in advance! Zach -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56417#56417 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Occlusion Query Node Error
I found a way to move our pre draw callback to an initial draw callback and our post draw callback to our final draw callback. I'm not getting the error anymore, however I'm still not getting any flare from sun. I believe there is something else I still need to set up for the occlusion query to work. Any additional advice on this is appreciated. Thanks, Zach NavyBas wrote: Thanks for the help Paul. When I look at OQN, in its draw implementation it will create the RetrieveQueryCallbacks (RQC) and ClearQueryCallbacks (CQC) if no post draw callbacks exist already. However, we already have custom pre and post draw callbacks. Therefore, the required RQC and CQC don't get called. I'm not sure how to inheret RQC's functionallity into our own custom callbacks. RQC doesn't appear to be part of a namespace or accessible from a header file. Is there a way to inheret from RQC in our custom callbacks so that the dynamic cast in the draw implementation of OQN will work. Once again, thanks in advance. I'm going to continue attemptin gto inheret in the mean time. Zach Paul Martz wrote: OcclusionQueryNode (OQN) has changed significantly since I contributed to this effort, so I can only provide general advice. OQN issues occlusion queries to OpenGL, and to avoid stalling the pipe, waits until the Camera's post-draw callback to retrieve the query results. Then it uses those results to determine what is visible in the next frame. RetrieveQueriesCallback is the post-draw callback that is used to retrieve the queries. For some reason, your Camera doesn't have such a callback attached. I'd suggest searching the OSG source to see where RetrieveQueriesCallback is attached to the Camera. I believe OQN was originally written to perform this task automatically. It is also possible that you have attached some other Camera post-draw callback. If so, you would need to take steps to ensure that both callbacks are being executed. On Wed, Aug 7, 2013 at 4:07 PM, Zach Basanese () wrote: Hello and thank you for any help in advance, I am working with some code that a coworker had created, but is unavailable at the moment. It deals with Occlusion Query Nodes. When we were still in OSG version 2.8, my coworker had grabbed a lot of the methods from the 3.0 version's OcclusionQueryNode.cpp and put them in our code so that we could use them for our sun. However, now that we have transitioned to 3.0, the code that was brought in isn't being used anymore, defaulting to OSG's code. The issue is, whenever our sun is on screen, we are getting the following error now: osgOQ: QG: Invalid RQCB. This apparenlty happens becaues of this area of code: Code: RetrieveQueriesCallback* rqcb = dynamic_cast RetrieveQueriesCallback* ( cam-getPostDrawCallback() ); if (!rqcb) { OSG_FATAL osgOQ: QG: Invalid RQCB. std::endl; return; } I think it might be that we aren't setting up the nodes correctly, but I haven't been able to find any examples or documentation related to this error or how to properly set up occlusion query nodes in OSG. Any help is appreciated, please let me know if you have any questions regarding my question. Zach[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55804#55804 (http://forum.openscenegraph.org/viewtopic.php?p=55804#55804) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Paul Martz Skew Matrix Software LLC -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55814#55814 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Occlusion Query Node Error
Thanks for the help Paul. When I look at OQN, in its draw implementation it will create the RetrieveQueryCallbacks (RQC) and ClearQueryCallbacks (CQC) if no post draw callbacks exist already. However, we already have custom pre and post draw callbacks. Therefore, the required RQC and CQC don't get called. I'm not sure how to inheret RQC's functionallity into our own custom callbacks. RQC doesn't appear to be part of a namespace or accessible from a header file. Is there a way to inheret from RQC in our custom callbacks so that the dynamic cast in the draw implementation of OQN will work. Once again, thanks in advance. I'm going to continue attemptin gto inheret in the mean time. Zach Paul Martz wrote: OcclusionQueryNode (OQN) has changed significantly since I contributed to this effort, so I can only provide general advice. OQN issues occlusion queries to OpenGL, and to avoid stalling the pipe, waits until the Camera's post-draw callback to retrieve the query results. Then it uses those results to determine what is visible in the next frame. RetrieveQueriesCallback is the post-draw callback that is used to retrieve the queries. For some reason, your Camera doesn't have such a callback attached. I'd suggest searching the OSG source to see where RetrieveQueriesCallback is attached to the Camera. I believe OQN was originally written to perform this task automatically. It is also possible that you have attached some other Camera post-draw callback. If so, you would need to take steps to ensure that both callbacks are being executed. On Wed, Aug 7, 2013 at 4:07 PM, Zach Basanese () wrote: Hello and thank you for any help in advance, I am working with some code that a coworker had created, but is unavailable at the moment. It deals with Occlusion Query Nodes. When we were still in OSG version 2.8, my coworker had grabbed a lot of the methods from the 3.0 version's OcclusionQueryNode.cpp and put them in our code so that we could use them for our sun. However, now that we have transitioned to 3.0, the code that was brought in isn't being used anymore, defaulting to OSG's code. The issue is, whenever our sun is on screen, we are getting the following error now: osgOQ: QG: Invalid RQCB. This apparenlty happens becaues of this area of code: Code: RetrieveQueriesCallback* rqcb = dynamic_cast RetrieveQueriesCallback* ( cam-getPostDrawCallback() ); if (!rqcb) { OSG_FATAL osgOQ: QG: Invalid RQCB. std::endl; return; } I think it might be that we aren't setting up the nodes correctly, but I haven't been able to find any examples or documentation related to this error or how to properly set up occlusion query nodes in OSG. Any help is appreciated, please let me know if you have any questions regarding my question. Zach[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55804#55804 (http://forum.openscenegraph.org/viewtopic.php?p=55804#55804) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Paul Martz Skew Matrix Software LLC -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55812#55812 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Occlusion Query Node Error
Hello and thank you for any help in advance, I am working with some code that a coworker had created, but is unavailable at the moment. It deals with Occlusion Query Nodes. When we were still in OSG version 2.8, my coworker had grabbed a lot of the methods from the 3.0 version's OcclusionQueryNode.cpp and put them in our code so that we could use them for our sun. However, now that we have transitioned to 3.0, the code that was brought in isn't being used anymore, defaulting to OSG's code. The issue is, whenever our sun is on screen, we are getting the following error now: osgOQ: QG: Invalid RQCB. This apparenlty happens becaues of this area of code: Code: RetrieveQueriesCallback* rqcb = dynamic_cast RetrieveQueriesCallback* ( cam-getPostDrawCallback() ); if (!rqcb) { OSG_FATAL osgOQ: QG: Invalid RQCB. std::endl; return; } I think it might be that we aren't setting up the nodes correctly, but I haven't been able to find any examples or documentation related to this error or how to properly set up occlusion query nodes in OSG. Any help is appreciated, please let me know if you have any questions regarding my question. Zach[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55804#55804 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgDB::ReadWriter General Options Strings
Hi, I can't seem to find this anywhere: What are the osgDB::ReadWriter general Options strings? I think I could potentially use them, but the only one I know of is keepExternalReferences. To set these options strings, the osgDB::ReadWriter::Options::setOptionString(string) method is used. Thank you! Cheers, Zach -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49215#49215 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Reference Manual Doxyfile
robertosfield wrote: OpenSceneGraph/doc/Doxyfiles contains all the scripts/configuration files. We have CMake process this source files to generate the final doxygen configuration files for use, see the Doxygen section of the OpenSceneGraph/CMakeLists.txt for details. I downloaded the latest OSG zip file (we are using an older version), and copied over the same settings from the all_Doxyfile, changing items where appropriate. I also did it with the core_Doxyfile. However, I just got what I had been getting before. Mainly: Dot graphs are horizontal in mine, making the screen scrollable in both x and y directions, vs the vertical format that only needs y scrolling; The way the classes and methods are presented; etc. Is there a source Doxyfile that is used for the current OSG Reference Manual that I could look at? I've tried locating it, but to no avail. Thanks again in advance, Zach B. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47434#47434 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG Reference Manual Doxyfile
Hello, This isn't so much an OSG question as it is a Doxygen question. The OSG reference manual is created using Doxygen, and I am also using Doxygen to create a reference manual of my own on a different project. However, the basic configuration file isn't as neat as the one OSG apparently uses. Does anyone know where I can find the most current Doxygen config file that the OSG reference manual uses? Thank you in advance, Zach -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47290#47290 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org