Empeld
Empeld plugin documentation.
essentials.Environment.Fog.AtmosphereFog Class Reference

Basic atmosphere fog based on orbitals Can be extended to override color, type, etc More...

Inheritance diagram for essentials.Environment.Fog.AtmosphereFog:
pluginbase.Objects.World.Environment.Fog.FogBase pluginbase.Objects.World.Environment.IFog pluginbase.Objects.World.Environment.IEnvironmentSimulatable essentials.Environment.Fog.AtmosphereVolumeFog

Public Member Functions

 AtmosphereFog (IEnumerable< IOrbital > orbitals)
 
override void Simulate (double time, double x, double y, double z)
 Simulate the environment with the time, and an x/y/z More...
 

Properties

virtual Rgba FogColorBase [get]
 
sealed override Rgba Color [get]
 
- Properties inherited from pluginbase.Objects.World.Environment.Fog.FogBase
virtual FogType RenderMode [get]
 
virtual float Density [get]
 
virtual Rgba Color [get]
 
- Properties inherited from pluginbase.Objects.World.Environment.IFog
FogType RenderMode [get]
 Gets the fog render mode More...
 
float Density [get]
 Gets the fog density More...
 
Rgba Color [get]
 Gets the color of the fog More...
 

Detailed Description

Basic atmosphere fog based on orbitals Can be extended to override color, type, etc

Constructor & Destructor Documentation

◆ AtmosphereFog()

essentials.Environment.Fog.AtmosphereFog.AtmosphereFog ( IEnumerable< IOrbital orbitals)
19  {
20  _orbitals = orbitals.Where(x => x.HasEmittance).ToArray();
21  }

Member Function Documentation

◆ Simulate()

override void essentials.Environment.Fog.AtmosphereFog.Simulate ( double  time,
double  x,
double  y,
double  z 
)
virtual

Simulate the environment with the time, and an x/y/z

Parameters
timeTime.
xX.
yY.
zZ.

Reimplemented from pluginbase.Objects.World.Environment.Fog.FogBase.

Reimplemented in essentials.Environment.Fog.AtmosphereVolumeFog.

41  {
42  float lums = Math.Min(1f, _orbitals.Sum(o => Math.Max(0f, o.EmittanceDiffuse.Luminosity * o.Direction.Z*2f)));
43  _color = FogColorBase * lums;
44  }
virtual Rgba FogColorBase
Definition: AtmosphereFog.cs:24

Property Documentation

◆ Color

sealed override Rgba essentials.Environment.Fog.AtmosphereFog.Color
get

◆ FogColorBase

virtual Rgba essentials.Environment.Fog.AtmosphereFog.FogColorBase
getprotected

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