Hi Aurora,

I think what you are looking for is the osgTerrain::ValidDataOperator
that you can attach to your elevation layer via
Layer::setValidDataOperator(operator);

In include/osgTerrain/ValidDataOperator you'll find the NoDataValue
subclass which is probably what you want to use in your case.

Robert.

On Feb 19, 2008 12:33 PM, aurora restivo <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> the image jpg in enclosure, is the result of the terrain that I have
> drawn beginning from the matrix of the altitudes.
> I would want to know if a way exists for not visualizing the quotas
> equal to 0.
>
> the source code is found in the file morfologia.txt
>
> Thanks in advance.
> Aurora Restivo
>
>
>
>
> Jean-Christophe Lombardo ha scritto:
> > Hi,
> >
> > You should have look to the osgshape example source code
> > (http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osgshape/osgshape.cpp)
> >
> > jcl
> >
> >
> >
> >
> >
> >
> > ************************************************************************************
> > This footnote confirms that this email message has been scanned by
> > PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
> > viruses.
> > ************************************************************************************
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
>
>
>
>
>
> int** m= g->leggiFile("morf0.txt");
>
>
> osg::HeightField* hF = new osg::HeightField();
>         hF->allocate(296,410);
>
>         for(int i=0; i< 410; i++)
>         {
>                 for(int j=0; j<296 ;j++)
>                 {
>                         if(m[i][j]!=0)
>                                 hF->setHeight(j,i, m[i][j]);
>                         else
>                                 hF->setHeight(j,i, m[i][j]);
>                 }
>         }
>
>         hF->setXInterval(41.0);
>         hF->setYInterval(29.6);
>
>         osg::Quat* quat=  new osg::Quat(0,0,180,45);
>         hF->setRotation(*quat);
>
>
>         osgTerrain::Terrain* terrainNode= new osgTerrain::Terrain();
>         osgTerrain::HeightFieldLayer* hFLayer= new 
> osgTerrain::HeightFieldLayer();
>
>         hFLayer->setHeightField(hF);
>         terrainNode->setElevationLayer(hFLayer);
>
>
>
>         osg::Geode* geode= new osg::Geode();
>         osg::ShapeDrawable* draw= new osg::ShapeDrawable(hF);
>         geode->addDrawable(draw);
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to