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

Reply via email to