C# Class Harvest, tf_client

Inheritance: MonoBehaviour, IPointerClickHandler
Datei anzeigen Open project: wids-eria/tf_client Class Usage Examples

Public Properties

Property Type Description
basalArea float
cutType CutType
diameterLimit int
diameterLimitCutDirection DiameterLimitCutDirection
ids int[]
qRatio float

Public Methods

Method Description
ComputeCenterPoint ( ) : IEnumerator

Computes the center point based on the bounds of the tile positions.

ComputeTreesToBeCut ( int frequencyDistribution, float qRatioCurve, int &treesToCut, int &treesToKeep ) : void

Computes the trees to be cut.

ComputeTreesToBeCut ( int frequencyDistribution, int diameterLimit, DiameterLimitCutDirection direction, int &treesToCut, int &treesToKeep ) : void

Computes the trees to be cut.

DoIt ( ) : IEnumerator

Execute the harvest

GetDoItWWW ( ) : Request

Gets a WWW object do perform the harvest, configured for the associated api point on the server.

GetPartialSelectionCurve ( float qRatio, float basalArea ) : float[]

Gets the partial selection curve.

This method replicates the math in partial_selection_curve in tree_harvesting.rb.

Harvest ( int ids, int duration ) : UnityEngine

Initializes a new instance of the Harvest struct for a clearcut.

Harvest ( int ids, int duration, float qRatio, float targetBasalArea ) : UnityEngine

Initializes a new instance of the Harvest struct for a q ratio cut.

Harvest ( int ids, int duration, int diameterLimit, DiameterLimitCutDirection cutDirection ) : UnityEngine

Initializes a new instance of the Harvest struct for a diameter limit cut.

ToString ( ) : string

Returns a System.String that represents the current Harvest.

Method Details

ComputeCenterPoint() public method

Computes the center point based on the bounds of the tile positions.
public ComputeCenterPoint ( ) : IEnumerator
return IEnumerator

ComputeTreesToBeCut() public static method

Computes the trees to be cut.
public static ComputeTreesToBeCut ( int frequencyDistribution, float qRatioCurve, int &treesToCut, int &treesToKeep ) : void
frequencyDistribution int /// Frequency distribution. ///
qRatioCurve float
treesToCut int /// Trees to cut. ///
treesToKeep int /// Trees to keep. ///
return void

ComputeTreesToBeCut() public static method

Computes the trees to be cut.
public static ComputeTreesToBeCut ( int frequencyDistribution, int diameterLimit, DiameterLimitCutDirection direction, int &treesToCut, int &treesToKeep ) : void
frequencyDistribution int /// Frequency distribution. ///
diameterLimit int /// Diameter limit. ///
direction DiameterLimitCutDirection /// Direction of the diameter limit cut. ///
treesToCut int /// Trees to cut. ///
treesToKeep int /// Trees to keep. ///
return void

DoIt() public method

Execute the harvest
public DoIt ( ) : IEnumerator
return IEnumerator

GetDoItWWW() public method

Gets a WWW object do perform the harvest, configured for the associated api point on the server.
public GetDoItWWW ( ) : Request
return HTTP.Request

GetPartialSelectionCurve() public static method

Gets the partial selection curve.
This method replicates the math in partial_selection_curve in tree_harvesting.rb.
public static GetPartialSelectionCurve ( float qRatio, float basalArea ) : float[]
qRatio float /// Q ratio. ///
basalArea float /// Basal area. ///
return float[]

Harvest() public method

Initializes a new instance of the Harvest struct for a clearcut.
public Harvest ( int ids, int duration ) : UnityEngine
ids int /// Identifiers. ///
duration int /// Duration. ///
return UnityEngine

Harvest() public method

Initializes a new instance of the Harvest struct for a q ratio cut.
public Harvest ( int ids, int duration, float qRatio, float targetBasalArea ) : UnityEngine
ids int /// Identifiers. ///
duration int /// Duration. ///
qRatio float /// Q ratio. ///
targetBasalArea float /// Target basal area. ///
return UnityEngine

Harvest() public method

Initializes a new instance of the Harvest struct for a diameter limit cut.
public Harvest ( int ids, int duration, int diameterLimit, DiameterLimitCutDirection cutDirection ) : UnityEngine
ids int /// Identifiers. ///
duration int /// Duration. ///
diameterLimit int /// Diameter limit. ///
cutDirection DiameterLimitCutDirection /// Cut direction. ///
return UnityEngine

ToString() public method

Returns a System.String that represents the current Harvest.
public ToString ( ) : string
return string

Property Details

basalArea public_oe property

The basal area, if applicable.
public float basalArea
return float

cutType public_oe property

The type of the cut.
public CutType cutType
return CutType

diameterLimit public_oe property

The diameter limit, if applicable.
public int diameterLimit
return int

diameterLimitCutDirection public_oe property

The diameter limit cut direction, if applicable.
public DiameterLimitCutDirection diameterLimitCutDirection
return DiameterLimitCutDirection

ids public_oe property

The identifiers of the tiles included in the harvest.
public int[] ids
return int[]

qRatio public_oe property

The q ratio, if applicable.
public float qRatio
return float