Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Environment.Fog.FogSkirt Class Reference

Sky-layer Skirt that surroudns the atmosphere with a low-layer of fog Assumes Z-up More...

Inheritance diagram for essentials.Environment.Fog.FogSkirt:
pluginbase.Objects.World.Environment.Sky.SkyLayerBase pluginbase.Objects.World.Environment.ISkyLayer pluginbase.Objects.World.Environment.IEnvironmentSimulatable

Public Member Functions

 FogSkirt (IFog fog, float lowZ=0.05f, float highZ=0.3f)
 
override Rgba DirectionalColor (float x, float y, float z)
 Get the color at a direction More...
 
- Public Member Functions inherited from pluginbase.Objects.World.Environment.Sky.SkyLayerBase
virtual void Simulate (double time, double x, double y, double z)
 Simulate the environment with the time, and an x/y/z More...
 

Properties

override SkyLayerRenderMode RenderMode [get]
 
override int Layer [get]
 
- Properties inherited from pluginbase.Objects.World.Environment.Sky.SkyLayerBase
virtual SkyLayerRenderMode RenderMode [get]
 Gets the render mode. More...
 
virtual int Layer [get]
 Gets the layer the sky is drawn on More...
 
virtual Vector3 Direction [get]
 Gets the up-direction for the layer. This can be used to rotate a sky-sphere or position a shader value More...
 
virtual string Resource [get]
 Gets the resource. Either a texture, or shader. Only shaders support multiple resources More...
 
virtual Rgba Color [get]
 Overlay color More...
 
virtual float TextureScale [get]
 Gets the texture scale for render types that support it More...
 
virtual float CameraAdjustmentRatio [get]
 The amount the camera position adjusts the direction of the layer More...
 
virtual bool ReceivesLight [get]
 Gets a value indicating whether this pluginbase.Objects.World.Environment.Sky.SkyLayerBase receives light. More...
 
virtual bool CastsShadow [get]
 Gets a value indicating whether this instance can project on world. More...
 
virtual Rgba LightFilter [get]
 Gets a value to multiply incoming light by to simulate a layer filtering out sunlight More...
 
- Properties inherited from pluginbase.Objects.World.Environment.ISkyLayer
SkyLayerRenderMode RenderMode [get]
 Gets the render mode. More...
 
int Layer [get]
 Gets the layer the sky is drawn on More...
 
Vector3 Direction [get]
 Gets the up-direction for the layer. This can be used to rotate a sky-sphere or position a shader value More...
 
string Resource [get]
 Gets the resource. Either a texture, or shader. Only shaders support multiple resources More...
 
Rgba Color [get]
 Overlay color More...
 
float TextureScale [get]
 Gets the texture scale for render types that support it More...
 
float CameraAdjustmentRatio [get]
 The amount the camera position adjusts the direction of the layer More...
 
bool ReceivesLight [get]
 Gets a value indicating whether this pluginbase.Objects.World.Environment.ISkyLayer receives light. More...
 
bool CastsShadow [get]
 Gets a value indicating whether this instance can project on world. More...
 
Rgba LightFilter [get]
 Gets a value to multiply incoming light by to simulate a layer filtering out sunlight More...
 

Additional Inherited Members

- Protected Member Functions inherited from pluginbase.Objects.World.Environment.Sky.SkyLayerBase
 SkyLayerBase ()
 Initializes a new instance of the pluginbase.Objects.World.Environment.Sky.SkyLayerBase class. More...
 

Detailed Description

Sky-layer Skirt that surroudns the atmosphere with a low-layer of fog Assumes Z-up

Constructor & Destructor Documentation

essentials.Environment.Fog.FogSkirt.FogSkirt ( IFog  fog,
float  lowZ = 0.05f,
float  highZ = 0.3f 
)
20  {
21  _fog = fog;
22  _lowZ = lowZ;
23  _highZ = highZ;
24  }

Member Function Documentation

override Rgba essentials.Environment.Fog.FogSkirt.DirectionalColor ( float  x,
float  y,
float  z 
)
virtual

Get the color at a direction

Returns
The color.
Parameters
xX.
yY.
zZ.

Reimplemented from pluginbase.Objects.World.Environment.Sky.SkyLayerBase.

43  {
44 
45  var fogCol = _fog.Color;
46  fogCol.Clamp();
47  return new Rgba(
48  fogCol.R,
49  fogCol.G,
50  fogCol.B,
51  MExt.NormalizeClamp(z, _highZ, _lowZ)
52  );
53  }
Rgba Color
Gets the color of the fog
Definition: IFog.cs:28
Class the represents a floating-point color of red, green, blue, and alpha
Definition: Rgba.cs:11
Math extensions
Definition: MathExtensions.cs:7
void Clamp(float min, float max)
Clamp each component of Rgba to between min and max
Definition: Rgba.cs:266
static float NormalizeClamp(float v, float min, float max)
Normalize the value, and clamp between 0 and 1
Definition: MathExtensions.cs:395

Property Documentation

override int essentials.Environment.Fog.FogSkirt.Layer
get
override SkyLayerRenderMode essentials.Environment.Fog.FogSkirt.RenderMode
get

The documentation for this class was generated from the following file: