Petr,

OSG is very different from vega (I switched to osg from vega years ago).
Your general experience using vega will be helpful, but the details of how
to implement specific functionality will not be very helpful. There are a
number of tutorials available, and the examples are invaluable.

For your intersection question, you'll need to use osg's
osgUtil::IntersectionVisitor (look at the osgintersection example).

Brian

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose. •
[email protected] wrote: -----

To: [email protected]
From: "petr" <[email protected]>
Sent by: [email protected]
Date: 02/16/2009 09:27AM
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

Reply via email to