Empeld
Empeld plugin documentation.
essentials.Environment.Atmosphere.SimpleAtmosphere Class Reference
Inheritance diagram for essentials.Environment.Atmosphere.SimpleAtmosphere:
pluginbase.Objects.World.Environment.Atmosphere.AtmosphereBase pluginbase.Objects.World.Environment.IAtmosphere pluginbase.Objects.World.Environment.IEnvironmentSimulatable

Public Member Functions

 SimpleAtmosphere ()
 
override void Simulate (double time, double x, double y, double z)
 Simulate the environment with the time, and an x/y/z More...
 
override OpenTK.Vector3 GetWind (double x, double y, double z)
 Get wind at a specific time and world position More...
 
- Public Member Functions inherited from pluginbase.Objects.World.Environment.Atmosphere.AtmosphereBase
 AtmosphereBase ()
 

Constructor & Destructor Documentation

◆ SimpleAtmosphere()

essentials.Environment.Atmosphere.SimpleAtmosphere.SimpleAtmosphere ( )
15  {
16  }

Member Function Documentation

◆ GetWind()

override OpenTK.Vector3 essentials.Environment.Atmosphere.SimpleAtmosphere.GetWind ( double  x,
double  y,
double  z 
)
virtual

Get wind at a specific time and world position

Returns
The wind.
Parameters
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.

Reimplemented from pluginbase.Objects.World.Environment.Atmosphere.AtmosphereBase.

26  {
27  return _windDirection * _windPower;
28  }

◆ Simulate()

override void essentials.Environment.Atmosphere.SimpleAtmosphere.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.Atmosphere.AtmosphereBase.

19  {
20  var dir = (Vector3)Rotation2d.FromDegrees(0.0, time).Vector;
21  _windDirection = new Vector3(dir.X, dir.Y, (float)Math.Sin(time));
22  _windPower = 0.5f + (float)Math.Sin(time / 100.0);
23  }
static Rotation2d FromDegrees(double x, double z)
Definition: Rotation2d.cs:22
Rotation XZ; In radians
Definition: Rotation2d.cs:10
Vector3d Vector
Definition: Rotation2d.cs:93

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