Main   Class List   Namespace List   Wiki

Precipitation Class Reference
[Special EffectsAtmosphere]

Defines a precipitation based storm (IE: rain, snow, etc.). More...

Inheritance diagram for Precipitation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void modifyStorm (float percentage=1.0f, float length=5.0f)
 Adjusts the droplet count and overall length of the Precipitation effect.
void setPercentage (float percentage=1.0f)
 Sets how many drops are present at once.
void setTurbulence (float max=1.0f, float speed=5.0f, float seconds=5.0)
 This is used to smoothly change the turbulence.

Public Attributes

Rendering

bool animateSplashes
 Check to enable splash animation on collision.
int dropAnimateMS
 If greater than zero, will animate the drops from the frames in the texture.
float dropSize
 Size of each drop of precipitation. This will scale the texture.
float fadeDist
 The distance at which fading of the drops begins.
float fadeDistEnd
 The distance at which fading of the particles ends.
ColorF glowIntensity
 Set to 0 to disable the glow or or use it to control the intensity of each channel.
bool reflect
 This enables the precipitation to be rendered during reflection passes. This is expensive.
bool rotateWithCamVel
 Enables drops to rotate to face camera.
int splashMS
 Life of splashes in milliseconds.
float splashSize
 Size of each splash animation for when a drop collides.
bool useLighting
 Check to enable shading of the drops and splashes by the sun color.
bool useTrueBillboards
 Check to make drops true (non axis-aligned) billboards.
Precipitation

float boxHeight
 Height of precipitation box.
float boxWidth
 Width of precipitation box.
int numDrops
 Number of drops allowed to exists in the precipitation box at any one time.
Collision

bool doCollision
 Allow collision with world objects.
bool hitPlayers
 Allow collision on player objects.
bool hitVehicles
 Allow collision on vehicles.
Movement

bool followCam
 Enables system to follow the camera or stay where it is placed.
float maxMass
 Maximum mass of a drop.
float maxSpeed
 Maximum speed that a drop will fall.
float minMass
 Minimum mass of a drop.
float minSpeed
 Minimum speed that a drop will fall.
bool useWind
 Check to have the Sky property windSpeed affect precipitation.
Turbulence

float maxTurbulence
 Radius at which precipitation drops spiral when turbulence is enabled.
float turbulenceSpeed
 Speed at which precipitation drops spiral when turbulence is enabled.
bool useTurbulence
 Check to enable turbulence. This causes precipitation drops to spiral while falling.

Static Public Attributes

static bool isRenderable
 Disables rendering of all instances of this type.
static bool isSelectable
 Disables selection of all instances of this type.

Detailed Description

Defines a precipitation based storm (IE: rain, snow, etc.).

Example:
// The following is added to a level file (.mis) by the World Editor
new Precipitation(TheRain) {
   dropSize = "0.5";
   splashSize = "0.5";
   splashMS = "250";
   animateSplashes = "1";
   dropAnimateMS = "0";
   fadeDist = "0";
   fadeDistEnd = "0";
   useTrueBillboards = "0";
   useLighting = "0";
   glowIntensity = "0 0 0 0";
   reflect = "0";
   rotateWithCamVel = "1";
   doCollision = "1";
   hitPlayers = "0";
   hitVehicles = "0";
   followCam = "1";
   useWind = "0";
   minSpeed = "1.5";
   maxSpeed = "2";
   minMass = "0.75";
   maxMass = "0.85";
   useTurbulence = "0";
   maxTurbulence = "0.1";
   turbulenceSpeed = "0.2";
   numDrops = "1024";
   boxWidth = "200";
   boxHeight = "100";
   dataBlock = "HeavyRain";
};

Member Function Documentation

void Precipitation::modifyStorm ( float  percentage = 1.0f,
float  length = 5.0f 
)

Adjusts the droplet count and overall length of the Precipitation effect.

Example:
// The percentage, from 0.0f to 1.0f, of the drops to display at once.
%percentage = 0.5;

// The length of time for the Precipitation effect to last. Will be multiplied by 1000 to get the milliseconds.
%length = 5.0;

// Set the percentage and time by calling the method.
%Precipitation.modifyStorm(%percentage , %length);
void Precipitation::setPercentage ( float  percentage = 1.0f  ) 

Sets how many drops are present at once.

Example:
// The percentage, from 0.0f to 1.0f, of the drops to display at once.
%percentage = 0.5f;

// Set the percentage by calling the method.
%Precipitation.setPercentage(%percentage);
void Precipitation::setTurbulence ( float  max = 1.0f,
float  speed = 5.0f,
float  seconds = 5.0 
)

This is used to smoothly change the turbulence.

over a desired time period. Setting ms to zero will cause the change to be instantaneous. Setting max zero will disable turbulence.

Example:
//Set the turbulence value. Set to 0 to disable turbulence.
%turbulence = 0.5;

// The speed of the turbulance effect.
%speed = 5.0;

// The length of time for the turbulence to last. Will be multiplied by 1000 to get the milliseconds.
%seconds = 5.0;

// Set the percentage and time by calling the method.
%Precipitation.setTurbulence(%turbulence , %speed , %seconds);

Member Data Documentation

Check to enable splash animation on collision.

Height of precipitation box.

Width of precipitation box.

Allow collision with world objects.

If greater than zero, will animate the drops from the frames in the texture.

Size of each drop of precipitation. This will scale the texture.

The distance at which fading of the drops begins.

The distance at which fading of the particles ends.

Enables system to follow the camera or stay where it is placed.

Set to 0 to disable the glow or or use it to control the intensity of each channel.

Allow collision on player objects.

Allow collision on vehicles.

Disables rendering of all instances of this type.

Reimplemented from GameBase.

Disables selection of all instances of this type.

Reimplemented from GameBase.

Maximum mass of a drop.

Maximum speed that a drop will fall.

Radius at which precipitation drops spiral when turbulence is enabled.

Minimum mass of a drop.

Minimum speed that a drop will fall.

Number of drops allowed to exists in the precipitation box at any one time.

This enables the precipitation to be rendered during reflection passes. This is expensive.

Enables drops to rotate to face camera.

Life of splashes in milliseconds.

Size of each splash animation for when a drop collides.

Speed at which precipitation drops spiral when turbulence is enabled.

Check to enable shading of the drops and splashes by the sun color.

Check to make drops true (non axis-aligned) billboards.

Check to enable turbulence. This causes precipitation drops to spiral while falling.

Check to have the Sky property windSpeed affect precipitation.



Copyright © GarageGames, LLC. All Rights Reserved.