Hi,
Solution Found...
(*texCoords)[j].set((float)k/heightMap->t(),
(float)i/heightMap->s());
(*vertices)[j].set( c1*(r+(*heightMap->data(i, k))/10), k,
s1*(r+(*heightMap->data(i, k))/10));
(*texCoords)[j+1].set((float)k/heightMap->t(),
(float)(i+1)/heightMap->s());
(*vertices)[j+1].set( c2*(r+(*heightMap->data(i+1, k))/10), k,
s2*(r+(*heightMap->data(i+1, k))/10));
(*texCoords)[j+2].set((float)(k+1)/heightMap->t(),
(float)i/heightMap->s());
(*vertices)[j+2].set( c1*(r+(*heightMap->data(i, k+1))/10),
k+1, s1*(r+(*heightMap->data(i, k+1))/10));
(*texCoords)[j+3].set((float)(k+1)/heightMap->t(),
(float)(i+1)/heightMap->s());
(*vertices)[j+3].set( c2*(r+(*heightMap->data(i+1, k+1))/10),
k+1, s2*(r+(*heightMap->data(i+1, k+1))/10));
...
Thank you!
Cheers,
Umid
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48422#48422
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org