OSG provides intersections testing See osgUtil::IntersectionVisitor, this is quite different though from what Vega/Vega Prime provides
Note you will have to do more work/coding with OSG when using Isectors than you would with Vega/VegaPrime You will have to us the osgUtil::IntersectionVisitor create equivalents to like Vegas HAT, LOS, Z, Tripod, ZPR, BUMP isectors. etc. and then manage them, what updating them means etc.. Also note the OSG only has one Node Mask to be used for Draw, Cull, APP, Isectors etc, no separate ones as in Vega OSG is very powerful and provides a lot, but in many cases not as much as Vega/Vega Prime in some case provides much that Vega did not, but more at the lower level , generally you need to know more of the nuts and bolts do with OSG than you did with Vega The best way I can describe the differences is if Performer/Vega, Vega added an abstraction to make it easier to use Performer And extend it a little/lot in places, you lose that abstraction when moving to OSG , and if you know/knew performer then it's easier to think of OSG - Performer ____________________________________________________________________________ __ Gordon Tomlinson [email protected] IM: [email protected] www.vis-sim.com www.gordontomlinson.com ____________________________________________________________________________ __ -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of petr Sent: Monday, February 16, 2009 9:28 AM To: [email protected] Subject: [osg-users] How to create detection, crossing from Vega(Multigen) to OSG. Hi All, I'm a new osg user and these days I'm trying to use it. Now i have tried some tutorials and read some docs, and i have one questions. because we have used for visualization Vega (by Multigen, now Presagis), ve can add to scene some Isectors whitch checked collisions with another objects, or hold the cars on the road. Can i do this in OSG (i didn't found Isectors theme on this website), and how to do it? Here is the part how to create Isector (create, position, masks, callback) in Vega: #define VGIS_TERR1 0x00000001 //terrain face, for callback #define VGIS_SOBJ1 0x00000100 //static face, for callback vgIsector *isector; vgPosition *pos; //(x,y,z,h,p,r) pos=vgNewPos(); vgPosVec(pos, 0.0f,0.0f,0.0f,0.0f,0.0f,0.0f); //isect example isector=vgNewIsect(); //new Isect vgPos(isector, pos); //pos vgIsectTarget(isector, vgGetScene(0)); //target detect (scene) vgIsectClass(isector, VGIS_TERR8); //mask vgAddPlyrIsect(mv_player, isector); //isetc to player vgAddFunc(isector, VGIS_HIT, <callback>, <param>); //callback vgUpdate(isector); //update vgDelPos(pos); //del tmp pos And some screenshot from runtime loop, the green line is detecting, red no. Z-isectors hold the cars on the road. 3rd image - left isector is greeen because ho has crashed with white cube (static object). [Image: http://www.jkzsim.cz./petr/isectors/BUS-isectory1.jpg ] [Image: http://www.jkzsim.cz./petr/isectors/BUS-isectory2.jpg ] [Image: http://www.jkzsim.cz./petr/isectors/BUS-isectory-kolize.jpg ] Please let me know, Thanks a lot. Petr BTW: tuto2.zip - contains tuto5 and tuto5.zip contains tuto 2 ------------------ Read this topic online here: http://osgforum.tevs.eu/viewtopic.php?p=6849#6849 _______________________________________________ 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

