Starting off of the following data:
Projection Geographic (Lat/Lon).
Spheroid: WGS84.
Datum: WGS84.
This it is the code that I am using:
int main()
{
osg::Group* root = NULL;
osg::Node* tankNode = NULL;
osg::Node* terrainNode = NULL;
osg::PositionAttitudeTransform* tankXform;
osg::Vec3 tankPosit;
osg::Geode* HUDGeode = new osg::Geode();
osg::Projection* HUDProjectionMatrix = new
osg::Projection;
osgProducer::Viewer viewer;
root = new osg::Group();
tankNode = osgDB::readNodeFile("model2.osg");
terrainNode = osgDB::readNodeFile("DEM.osg");
root->addChild(terrainNode); //(carga el .osg)
tankXform = new osg::PositionAttitudeTransform();
root->addChild(tankXform); //(carga el modelo .flt)
tankPosit.set(0,0,175);
tankXform->setPosition(tankPosit);
viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
viewer.setSceneData( root );
viewer.realize();
while( !viewer.done() )
{
viewer.sync();
viewer.update();
viewer.frame();
}
}
My question is: Why dont I represent the3D model on
the terrain? If I know that the level of the terrain
is 175 m. Moreover, If the data are UTM, it represents
it correctly.
Somebody can say to me like doing it.
Thanks,
Neus
Neus Aparicio Ferrando
____________________________________________________________________________________
Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
http://advision.webevents.yahoo.com/reto/entretenimiento.html
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/