Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Systems.BlockTransfer.GenericTransferSystem Class Reference
Inheritance diagram for essentials.Systems.BlockTransfer.GenericTransferSystem:
essentials.Systems.BlockTransfer.AbstractBlockTransfer essentials.Systems.BlockTransfer.ITransferSystem essentials.Systems.BlockTransfer.IReadonlyTransferSystem

Public Member Functions

 GenericTransferSystem (Func< Vector3i, bool > predicate)
 
- Public Member Functions inherited from essentials.Systems.BlockTransfer.AbstractBlockTransfer
void AddPressure (Vector3i pt, float amt)
 Add pressure to a given point More...
 
- Public Member Functions inherited from essentials.Systems.BlockTransfer.IReadonlyTransferSystem
bool Has (Vector3i pt)
 

Protected Member Functions

override float GetTransferCoefficient (Vector3i pt)
 Determines whether this instance can transfer to the specified block. More...
 
- Protected Member Functions inherited from essentials.Systems.BlockTransfer.AbstractBlockTransfer
 AbstractBlockTransfer (float createThreshold, float removalThreshold, float maxPressure, float speed)
 
bool CanTransferTo (Vector3i pt)
 

Additional Inherited Members

- Properties inherited from essentials.Systems.BlockTransfer.AbstractBlockTransfer
IEnumerable< Vector3iMembers [get]
 Return all coordinates of points within our domain More...
 
int BlockCount [get]
 Gets the number of blocks within the system More...
 
int QueueCount [get]
 Gets the number of blocks that need to be simulated on for this iteration More...
 
float AveragePressure [get]
 Gets the average of all member's pressure More...
 
float MaxPressure [get]
 Gets the max pressure value throughout the system More...
 
float MinPressure [get]
 Gets the minimum pressure value throughout the system More...
 
bool Sealed [get]
 A system is sealed if the pressure is uniform throughout the system, with minimal variation More...
 
float this[] Neighbors [get]
 Gets or sets the pressure value at a given point More...
 
- Properties inherited from essentials.Systems.BlockTransfer.IReadonlyTransferSystem
int BlockCount [get]
 
float AveragePressure [get]
 
float MaxPressure [get]
 
float MinPressure [get]
 
bool Sealed [get]
 

Constructor & Destructor Documentation

essentials.Systems.BlockTransfer.GenericTransferSystem.GenericTransferSystem ( Func< Vector3i, bool >  predicate)
11  :base(0.07f, 0.035f, 2f, 1f)
12  {
13  _predicate = predicate;
14  }

Member Function Documentation

override float essentials.Systems.BlockTransfer.GenericTransferSystem.GetTransferCoefficient ( Vector3i  pt)
protectedvirtual

Determines whether this instance can transfer to the specified block.

Returns
A number, between 0 and 1, that represents how conductive the block can be. 0 means non-conductive
Parameters
ptThe point

Implements essentials.Systems.BlockTransfer.AbstractBlockTransfer.

19  {
20  return _predicate(pt) ? 1f : 0f;
21  }

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