OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Origin of computing maximum level in osgdem


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
maya leonard
Guest





PostPosted: Mon Jun 20, 2016 10:11 pm    Post subject:
Origin of computing maximum level in osgdem
Reply with quote

Hello,

Can someone point me to the literature for computing

(1 ) AR = xRange/ yRange in

bool DataSet::computeOptimumTileSystemDimensions(int& C1, int& R1)
Lines 247- 270 DataSet.cpp

and

(2) int k_cols = int( ceil( 1.0 + ::log( destination_xRange / (_C1 * sourceResolutionX * tileSize ) ) / ::log(2.0) ) ); int k_rows = int( ceil( 1.0 + ::log( destination_yRange / (_R1 * sourceResolutionY * tileSize ) ) / ::log(2.0) ) );

bool DataSet::computeOptimumLevel(Source* source, int maxLevel, int& level)
Lines 201 - 210 DataSet.cpp

Thank you

Maya

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12279

PostPosted: Tue Jun 21, 2016 7:28 am    Post subject:
Origin of computing maximum level in osgdem
Reply with quote

Hi Maya,


There isn't any particular "literature" that I used when working out the maths, I just used my own knowledge of maths and derived things myself.  It's not complicated. 

Each successive level you double the resolution in each so you get a formula in the sytle:


   resolution (L) = tileSize * 2 ^ (L)


So to work out the number of levels you require to hit a target resolution you simply take the log of both side and restructure things a little to account for in needing an integer Level.


Robert.



On 20 June 2016 at 23:02, maya leonard < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hello,

Can someone point me to the literature for computing

(1 ) AR = xRange/ yRange in

      bool DataSet::computeOptimumTileSystemDimensions(int& C1, int& R1)
      Lines 247- 270 DataSet.cpp

and

(2) int k_cols = int( ceil( 1.0 + ::log( destination_xRange / (_C1 * sourceResolutionX * tileSize ) ) / ::log(2.0) ) );       int k_rows = int( ceil( 1.0 + ::log( destination_yRange / (_R1 * sourceResolutionY * tileSize ) ) / ::log(2.0) ) );

      bool DataSet::computeOptimumLevel(Source* source, int maxLevel, int& level)
     Lines 201 - 210 DataSet.cpp

Thank you

Maya





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Osgdem created terrains not displayin... D.J. Caldwell General 3 Wed Oct 24, 2018 7:32 pm View latest post
No new posts Virtual Planet Builder: increase reso... moet General 0 Wed Oct 17, 2018 11:34 pm View latest post
No new posts How to set maximum visible distance? Daven Hem General 4 Mon Feb 13, 2017 10:14 pm View latest post
No new posts terrain altimetry not visible after o... argesino VirtualPlanetBuilder [vpb] 0 Fri Oct 02, 2015 2:34 pm View latest post
No new posts error using VPB on DTED level 2... S2LR VirtualPlanetBuilder [vpb] 0 Wed Aug 19, 2015 2:23 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP