Overseer.World.Weather Object

The Weather object controls the visual effects of weather on the 3D environment of the traveler. There are seven preset weather types and one custom weather type that can be modified as needed.

Properties (Methods)

(current, fogColor, mirrorTile, rainDensity, snowDensity, windDirection, windSpeed, snowSize)

 

long current

   

This will contain the current weather. Changes to this property are immediately observed in the 3D environment. Legal values are:

     

O3D_WEATHER_FAIR
O3D_WEATHER_LIGHTRAIN
O3D_WEATHER_LIGHTSNOW
O3D_WEATHER_HEAVYRAIN
O3D_WEATHER_HEAVYSNOW
O3D_WEATHER_LIGHTFOG
O3D_WEATHER_HEAVYFOG
O3D_WEATHER_CUSTOM

= 0
= 1
= 2
= 3
= 4
= 5
= 6
= 7

long fogColor

   

Changing this property will only affect custom weather. Store an RGB value in this property to set the color of the fog.

 

bool mirrorTile

   

Defines how the cloud texture is tiled. The default value is false. True tile bitmaps, created to be seamlessly tiled, do not need this set to true. They will automatically produce a natural looking cloudy sky.

 

double rainDensity

   

Changing this property will only affect custom weather. Store a value from 0 to 1.0 to control how hard it is raining.

 

double snowDensity

   

Changing this property will only affect custom weather. Store a value from 0 to 1.0 to control how hard it is snowing.

 

double windDirection

   

This will contain the direction the wind is blowing and is measured in degrees around the z axis.

 

double windSpeed

   

This will contain the current speed of the wind. Visually, this will control how steeply angled the rain/snow will be as it falls, how quickly the clouds scud across the sky, etc.

 

double snowSize

   

Size of snowflake. Useful to create very dense or very rare snow effects.

Methods (Properties)

(GetFogRange, SetCloudsTexture, SetFogRange, SetFogRGB, SetGroundTexture, SetNightSkyTexture, RestoreDefaults )

 

Vector GetFogRange()

   

 Returns a Vector object containing current range value for fog. The x value will contain the minimum fog distance, y contains the midpoint distance, and z will be the maximum distance.

 

void SetCloudsTexture(String fileName)

   

Sets the image used for the cloud texture. String fileName must contain the full filename of the texture to be loaded. For relative loading of a texture file, add Overseer.mapPath to the filename to produce the full path for loading the texture. Set mirrorTile to true if this is not a seamlessly tiled image.

 

void SetFogRange(double min, double max)

   

Sets the minimum and maximum distance for fog.

 

void SetFogRGB(short R, short G, short B)

   

 This method may be used to set the fogColor property.

 

void SetGroundTexture(String fileName)

   

Sets the image used for the ground texture. String fileName must contain the full filename of the texture to be loaded. For relative loading of a texture file, add Overseer.mapPath to the filename to produce the full path for loading the texture.

 

void SetNightSkyTexture(String fileName)

   

Sets the image used for the night sky texture. String fileName must contain the full filename of the texture to be loaded. For relative loading of a texture file, add Overseer.mapPath to the filename to produce the full path for loading the texture.

 

RestoreDefaults()

   

Restore defaults images and settings for all weathers.



Copyright© 2001 Thought Guild Inc.