Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Systems.BlockTransfer.AbstractBlockTransfer Class Referenceabstract

Class that acts as base class for block transfer algorithms More...

Inheritance diagram for essentials.Systems.BlockTransfer.AbstractBlockTransfer:
essentials.Systems.BlockTransfer.ITransferSystem essentials.Systems.BlockTransfer.IReadonlyTransferSystem essentials.Systems.BlockTransfer.GenericTransferSystem essentials.Systems.BlockTransfer.PressureTransferSystem

Public Member Functions

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

 AbstractBlockTransfer (float createThreshold, float removalThreshold, float maxPressure, float speed)
 
bool CanTransferTo (Vector3i pt)
 
abstract float GetTransferCoefficient (Vector3i pt)
 Determines whether this instance can transfer to the specified block. More...
 

Properties

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]
 

Detailed Description

Class that acts as base class for block transfer algorithms

Constructor & Destructor Documentation

essentials.Systems.BlockTransfer.AbstractBlockTransfer.AbstractBlockTransfer ( float  createThreshold,
float  removalThreshold,
float  maxPressure,
float  speed 
)
protected
91  {
92  this._createThreshold = createThreshold;
93  this._removalThreshold = removalThreshold;
94  this._maxPressure = maxPressure;
95  this._speed = speed;
96  }

Member Function Documentation

void essentials.Systems.BlockTransfer.AbstractBlockTransfer.AddPressure ( Vector3i  pt,
float  amt 
)

Add pressure to a given point

Parameters
ptPoint.
amtAmt.

Attribute: pt

+= amt;

104  {
105  this [pt] += amt;
106  _queue.Enqueue (pt);
107  }
bool essentials.Systems.BlockTransfer.AbstractBlockTransfer.CanTransferTo ( Vector3i  pt)
protected
209  {
210  return GetTransferCoefficient(pt) >= TRANSFER_MIN;
211  }
abstract float GetTransferCoefficient(Vector3i pt)
Determines whether this instance can transfer to the specified block.
abstract float essentials.Systems.BlockTransfer.AbstractBlockTransfer.GetTransferCoefficient ( Vector3i  pt)
protectedpure virtual

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

Implemented in essentials.Systems.BlockTransfer.PressureTransferSystem, and essentials.Systems.BlockTransfer.GenericTransferSystem.

Property Documentation

float essentials.Systems.BlockTransfer.AbstractBlockTransfer.AveragePressure
get

Gets the average of all member's pressure

The average pressure.

int essentials.Systems.BlockTransfer.AbstractBlockTransfer.BlockCount
get

Gets the number of blocks within the system

The block count.

float essentials.Systems.BlockTransfer.AbstractBlockTransfer.MaxPressure
get

Gets the max pressure value throughout the system

The max pressure.

IEnumerable<Vector3i> essentials.Systems.BlockTransfer.AbstractBlockTransfer.Members
get

Return all coordinates of points within our domain

The members.

float essentials.Systems.BlockTransfer.AbstractBlockTransfer.MinPressure
get

Gets the minimum pressure value throughout the system

The minimum pressure.

float this[] essentials.Systems.BlockTransfer.AbstractBlockTransfer.Neighbors
get

Gets or sets the pressure value at a given point

Parameters
ptPoint.
int essentials.Systems.BlockTransfer.AbstractBlockTransfer.QueueCount
get

Gets the number of blocks that need to be simulated on for this iteration

The queue count.

bool essentials.Systems.BlockTransfer.AbstractBlockTransfer.Sealed
get

A system is sealed if the pressure is uniform throughout the system, with minimal variation

true if this instance is sealed; otherwise, false.


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