www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe General Support > Using SkylineGlobe API
  New Posts New Posts RSS Feed: Atmospheric effects (ProjectParam)
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Atmospheric effects (ProjectParam)

 Post Reply Post Reply
Author
Message
anshika View Drop Down
Visitor
Visitor


Joined: December 31 2009
Online Status: Offline
Posts: 7
Post Options Post Options   Quote anshika Quote  Post ReplyReply Direct Link To This Post Topic: Atmospheric effects (ProjectParam)
    Posted: March 30 2010 at 8:07am
I want to change Project Parameters like 'FogColor' , 'DisplaySun' , 'DisplayMoon' etc.
I am using the following commands in SGAPI :
 
1. ITerraExplorer51.set_ProjectParam("DisplaySun",true);
 
2. ITerraExplorer51.ProjectParam("DisplaySun")=true;
 
3. teCoClass = new TerraExplorerClass();
terraExplorer = teCoClass as ITerraExplorer51;
terraExplorer.set_ProjectParam("DisplaySun", true);
 
After implementing the above codes i am unable to get any result.
Similarly using "FogColor"  option i am unable to change the Fog color.
 
Please explain how it works??
and will "DisplaySun" show a virtual sun or not? just like a virtual moon which is visible in TerraExplorer Pro. 
and how can we change the location of this virtual moon/sun wrt any location on globe??
 
 
 
Back to Top
Eylon View Drop Down
Skyline Admin Group
Skyline Admin Group
Avatar

Joined: May 05 2003
Location: Israel
Online Status: Offline
Posts: 216
Post Options Post Options   Quote Eylon Quote  Post ReplyReply Direct Link To This Post Posted: April 01 2010 at 8:44am
Hi,
The following SGAPI code turns the sun off  and set's the fog color to green:
 

<html>
    <head>
        <title>Project param test</title>
        <script src="http://www.skylineglobe.com/SGAPI/v2.0/sgapi.js"></script>
        <script language="jscript">
       
        var globe = null;
       
        function Init()
        {
             globe = new SGWorld();
  ITE51 = globe.innerTEObj.Interface("ITerraExplorer51");
  ITE51.ProjectParam("DisplaySun")= false;//Turn sun display off
  ITE51.ProjectParam("FogColor")= 65280;//Set fog color to decimal value of green (0xFF00)
        }
       
        </script>
    </head>
    <body onload="Init();">
    </body>
</html>
 
The sun is positioned in the sky based on the current TerraExplorer Time.
You can see more information in the programmer's guide chapters for IDateTime5 interface. Changing the time, will change the sun to the correct position in the sky based on the paramters.
 
Hope this helps...
Eylon
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.250 seconds.