Re: [osg-users] [Re: to draw landscapes beginning from a matrix]

2008-03-05 Thread aurora restivo
Hi! why getGeometry doesn't it work? during the execution it launches an exception. my code is: osgTerrain::GeometryTechnique* geometryTechnique = new osgTerrain::GeometryTechnique(); terrainNode-setTerrainTechnique(geometryTechnique); osg::Vec3d center=

Re: [osg-users] [Re: to draw landscapes beginning from a matrix]

2008-03-03 Thread aurora restivo
Hi! if I use a ShapeDrawable I get a figure with an only color, because draw - setColor (...) it doesn't allow me to color every altitude osg::Geode* geode= new osg::Geode(); osg::ShapeDrawable* draw= new osg::ShapeDrawable(hF); double highColor=1.0; double lowColor=0.2;

Re: [osg-users] [Re: to draw landscapes beginning from a matrix]

2008-03-03 Thread Robert Osfield
On Mon, Mar 3, 2008 at 10:45 AM, aurora restivo [EMAIL PROTECTED] wrote: how can I color every altitude with different color? Just allocate the number of levels you want in the TransferFunction1D and then assign the colours, and the high range. Since you've already got two layers working, I

Re: [osg-users] [Re: to draw landscapes beginning from a matrix]

2008-03-03 Thread Vincent Bourdier
I've never used a terrainnode so I can't help you on that, but on the ShapeDrawable something look strange on your code : you do a drawable-setcolor on each loop (so 410*296 times) and a the end you add it to the geode so I imagine that only the last loop is used, and it look normal to obtain