Thanks

On Sun, Feb 12, 2012 at 9:00 PM, Kim Bale <kcb...@googlemail.com> wrote:

> Width x length x (Height of surface - height of seabed)
>
here width = window_width
length = window_length
height of seabed = how much it has raised(current height + 1.0)
height of surface ?


how to calculate the height of surface?

>
> K.
>
>
>
>
> On 12 February 2012 15:17, Mohammed Rashad <mohammedrasha...@gmail.com>wrote:
>
>>
>>
>> On Sun, Feb 12, 2012 at 8:42 PM, Kim Bale <kcb...@googlemail.com> wrote:
>>
>>> It depends how accurate you want your calculation to be.
>>>
>>> An approximation would be to simply take the volume of the cuboid that
>>> forms between the seabed and the ocean surface.
>>>
>> how to get the cuboid that forms between seabed and oceansurface. Any
>> pseudo code or something
>>
>>>
>>> If you want a more accurate volume calculation then you'd have to take
>>> into account the shape of the waves and the seabed.
>>> I *think* one of the properties of the FFT ocean surface is that the
>>> average height will always be zero so you can treat it like a flat plane in
>>> your volume calculation. You might want to check that though it's been a
>>> while since I've looked at it in detail. If that's the case you only need
>>> to take into account the shape of the sea bed in your calculation. It is
>>> possible, but you'll have to work out the maths for that.
>>>
>>> Regards,
>>>
>>> Kim.
>>>
>>>
>>> On 12 February 2012 14:15, Mohammed Rashad 
>>> <mohammedrasha...@gmail.com>wrote:
>>>
>>>> thanks Kim.
>>>>
>>>> OK. after translate will it update window automatically
>>>> what I want is partly done with osgOcean
>>>>
>>>> after increasing height I need to find the area that is under water. Is
>>>> it possible is a big question but I have only one question
>>>> Is it possile? and how
>>>>
>>>>
>>>> On Sun, Feb 12, 2012 at 7:42 PM, Kim Bale <kcb...@googlemail.com>wrote:
>>>>
>>>>> Hi Rashad,
>>>>>
>>>>> All setOceanSurfaceHeight does is set the matrix of the transform that
>>>>> parents the ocean surface so that it translates the surface up or down.
>>>>>
>>>>> Take a look here:
>>>>>
>>>>>
>>>>> http://code.google.com/p/osgocean/source/browse/trunk/include/osgOcean/OceanScene#224
>>>>>
>>>>> It also dirties the scene asking for a rebuild on the next update
>>>>> traversal.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Kim.
>>>>>
>>>>> On 12 February 2012 14:01, Mohammed Rashad <mohammedrasha...@gmail.com
>>>>> > wrote:
>>>>>
>>>>>>
>>>>>> if (ea.getKey() == '+')
>>>>>>             {
>>>>>>
>>>>>> _oceanScene->setOceanSurfaceHeight(_oceanScene->getOceanSurfaceHeight() +
>>>>>> 1.0);
>>>>>>                 osg::notify(osg::NOTICE) << "Ocean surface is now at
>>>>>> z = " << _oceanScene->getOceanSurfaceHeight() << std::endl;
>>>>>>                 return true;
>>>>>>             }
>>>>>>             if (ea.getKey() == '-')
>>>>>>             {
>>>>>>
>>>>>> _oceanScene->setOceanSurfaceHeight(_oceanScene->getOceanSurfaceHeight() -
>>>>>> 1.0);
>>>>>>                 osg::notify(osg::NOTICE) << "Ocean surface is now at
>>>>>> z = " << _oceanScene->getOceanSurfaceHeight() << std::endl;
>>>>>>                 return true;
>>>>>>             }
>>>>>>       }
>>>>>> If I press "+" water level is increased and for "-"  water level is
>>>>>> decreased
>>>>>> the above code I had written is just setting ocean surface height.
>>>>>> now I need to know which function is called after setting height
>>>>>> using
>>>>>> _oceanScene->setOceanSurfaceHeight(_oceanScene->getOceanSurfaceHeight() +
>>>>>> 1.0);
>>>>>> what the osgOCean does to render the ocean with increased or
>>>>>> decreased water level
>>>>>>
>>>>>> i tried gdb but cant trace what is happening..
>>>>>> I think some event is triggered after setting OceanSurfaceHeight but
>>>>>> dont know where or how
>>>>>>
>>>>>> I hope the developers of osgOcean are viewing this mail and they will
>>>>>> answer my question.
>>>>>>
>>>>>> Any pointers are greatly appreciated.
>>>>>>
>>>>>> Thanks in advance
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>>    Rashad
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>>    Rashad
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>
>>
>> --
>> Regards,
>>    Rashad
>>
>>
>> _______________________________________________
>> 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
>
>


-- 
Regards,
   Rashad
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to