Re: [osg-users] Height of the terrain on a given lang/long

2013-04-22 Thread Zeki Yugnak
Hi Shayne, S2LR wrote: > A couple of questions so that I have a clear understanding... > > 1) Why would you want to have the lower LODs available for doing collision > tests? You always want the highest LOD for doing intersection tests with the > terrain. I am trying to compute two functi

Re: [osg-users] Height of the terrain on a given lang/long

2013-04-20 Thread Zeki Yugnak
Hi Shayne, Thank you for additional information. I am developing non-viewer base application. I am just reading terrain file and then I am doing two computation. These are checking collision detection and intersection to learn terrain elevation. I have problem on collision testing on terrain fo

Re: [osg-users] Height of the terrain on a given lang/long

2013-04-19 Thread Zeki Yugnak
Hi Shayne, Now, my code runs faster. But I have another problem :(. I am calling terrain elevation computation in my simulation loop and Osg loop will not used in my application. I understand that Osg does not read whole terrain tiles/pages when I call osgDB::readNodeFile, And the the results i

Re: [osg-users] Height of the terrain on a given lang/long

2013-04-18 Thread Zeki Yugnak
Thanks for your help, It is working but performance is too bad. Terrain elevation completed in 20 ms. I will use this calculation five or six times in every simulation loop. Do you have any suggestions? Regards. -- Read this topic online here: http://forum.openscenegraph.org/v

Re: [osg-users] Height of the terrain on a given lang/long

2013-04-18 Thread Zeki Yugnak
Thank you for your answers. Yes, I am using geocentric database. My input values are only latitude and longitude. I don't have altitude information. So result of the computeHeightAboveTerrain function conversion is not enough for computeHeightAboveTerrain. I need to find terrain elevation only

[osg-users] Height of the terrain on a given lang/long

2013-04-18 Thread Zeki Yugnak
Hi everyone, I am trying to calculate height value of the terrain on a given latitude and longitude. I am using a ive formatted terrain model that was converted using osgDem from Dted level-1 data. I searched a solution on whole osg forum and web but i could not find good one. Also I looked Hei

Re: [osg-users] Local coordinates

2013-02-07 Thread Zeki Yugnak
Hi Robert, I found the problem yesterday. You are right, the problem is regarding to floating point usage. I am computing camera position using center of the object's BoundingSphere. When I start debug whole code, I figure out that the BoundingSphere type is floating point and "OSG_USE_FLOAT_

Re: [osg-users] Local coordinates

2013-02-06 Thread Zeki Yugnak
Hi Shayne, Thanks for your help. Your's transformation code block is the same as mine's. I really do not know why object's translation is not smooth. Also I could not use second code block because of terrain-object correlation problem. But I hope that I will translate object smoothly using l

Re: [osg-users] Local coordinates

2013-02-06 Thread Zeki Yugnak
Hi Glenn , I have been already doing what you're saying. Here is the transformation code block; Code: osg::Vec3 rotation(currentRotation.Heading, currentRotation.Pitch, currentRotation.Roll); osg::Matrix hprRotationMat; Util::HprToMatrix(hprRotationMat, rotation); //Ellipsoid model of the roo

Re: [osg-users] Geocentric terrain and camera positioning

2013-02-06 Thread Zeki Yugnak
:) I think you misunderstood me. I have been searching all forum. The terrain (is not whole earth) database was created correctly using osgdem with Terrain and geocentric parameters. Also camera position is computed correctly and I can easily track may object using orbit manipulator. But, If I

Re: [osg-users] Geocentric terrain and camera positioning

2013-02-06 Thread Zeki Yugnak
Hi Robert, thanks for your help. > It's very hard to know what you mean and thus what to recommend. > > What do you mean the "transformation is not smooth because of height > value of coordinates?" > > Could it be that you have float precision problems? The OSG by > default uses double for all

Re: [osg-users] Geocentric terrain and camera positioning

2013-02-06 Thread Zeki Yugnak
Thank you Robert. My earlier messages sent at different times in the last weeks and I solved most of them at time period. Also, moderator has just approved all my messages :). In the current situation, I am facing coordinate system problem. I am using geocentric terrain and geocentric coordinat

Re: [osg-users] delta3d like terrain displaying

2013-02-06 Thread Zeki Yugnak
Hi everyone, I am working on simple flight simulator on flat terrain. I successfully build my terrain using osgdem and I can display using osgviewer. My problem is how to show terrain correctly as Delta3d did. Delta3d can zoom on terrain when I change camera position and also it can handle w

Re: [osg-users] Local coordinates

2013-02-06 Thread Zeki Yugnak
Hi everyone, I just started using Openscenegraph. I have some questions regarding coordinate systems. I am trying to develop simple debriefing application. I am using geographic (lat, long and alt ) coordinates and rotations information that were recorded on vehicle to transform objects in 3D s

Re: [osg-users] Geocentric terrain and camera positioning

2013-02-06 Thread Zeki Yugnak
Hi everyone, I just begun to develop similar flight simulation record player with openscenegraph. I have some questions regarding to terrain, object and camera positioning. I build flat terrain with osgdem from dted and geotiff texture data as "*.ive" file. I checked result with simple demo ap