Show / Hide Table of Contents

Class DoubleBasedFOVBase

Base class which is convenient for defining FOV algorithms which produce an array of doubles as output, and thus they derive their BooleanResultView values from the double values (anything greater than 0 is true).

Inheritance
object
FOVBase
DoubleBasedFOVBase
RecursiveShadowcastingFOV
Implements
IFOV
IReadOnlyFOV
Inherited Members
FOVBase.AsReadOnly()
FOVBase.OnCalculate(int, int, double, Distance)
FOVBase.OnCalculate(int, int, double, Distance, double, double)
FOVBase.OnReset()
FOVBase.Calculate(int, int, double)
FOVBase.CalculateAppend(int, int, double)
FOVBase.Calculate(Point, double)
FOVBase.CalculateAppend(Point, double)
FOVBase.Calculate(int, int, double, Distance)
FOVBase.CalculateAppend(int, int, double, Distance)
FOVBase.Calculate(Point, double, Distance)
FOVBase.CalculateAppend(Point, double, Distance)
FOVBase.Calculate(int, int, double, Distance, double, double)
FOVBase.CalculateAppend(int, int, double, Distance, double, double)
FOVBase.Calculate(Point, double, Distance, double, double)
FOVBase.CalculateAppend(Point, double, Distance, double, double)
FOVBase.Reset()
FOVBase.ToString(char, char)
FOVBase.ToString(int)
FOVBase.ToString()
FOVBase.TransparencyView
FOVBase.CalculationsPerformed
FOVBase.CurrentFOV
FOVBase.NewlySeen
FOVBase.NewlyUnseen
FOVBase.Recalculated
FOVBase.VisibilityReset
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.FOV
Assembly: GoRogue.dll
Syntax
public abstract class DoubleBasedFOVBase : FOVBase, IFOV, IReadOnlyFOV
Remarks

This class inherits from FOVBase, and all the caveats mentioned in its remarks section should apply. If you instead want to define an FOV algorithm as returning boolean values, and deriving doubles from that, you can use BooleanBasedFOVBase instead. If neither of those use cases fits your situation, feel free to use FOVBase or IFOV directly.

Although it can vary by implementation, if all other things are equal, classes that use this implementation as opposed to BooleanBasedFOVBase generally tend to take up more memory, however they will generally be able to retrieve values from DoubleResultView more quickly. Retrieving values from BooleanResultView can be slightly slower than from DoubleResultView, since the boolean values are derived from the double values.

Constructors

View Source

DoubleBasedFOVBase(IGridView<bool>, ISettableGridView<double>)

Constructor.

Declaration
protected DoubleBasedFOVBase(IGridView<bool> transparencyView, ISettableGridView<double> resultView)
Parameters
Type Name Description
IGridView<bool> transparencyView

The values used to calculate field of view. Values of true are considered non-blocking (transparent) to line of sight, while false values are considered to be blocking.

ISettableGridView<double> resultView

The view in which FOV calculations are stored.

Fields

View Source

ResultView

View in which the results of LOS calculations are stored. The values in this view are used to derive the public result views.

Declaration
protected ISettableGridView<double> ResultView
Field Value
Type Description
ISettableGridView<double>
Remarks

The requirements for these values are identical to DoubleResultView. DoubleResultView simply exposes these values directly; BooleanResultView considers any location where ResultView > 0 to be true.

Properties

View Source

BooleanResultView

A view of the calculation results in boolean form, where true indicates a location is in field of view, and false indicates it is not.

Declaration
public override IGridView<bool> BooleanResultView { get; }
Property Value
Type Description
IGridView<bool>
Overrides
FOVBase.BooleanResultView
View Source

DoubleResultView

A view of the calculation results in double form, where a value greater than 0.0 indicates that the value is inside of FOV, and a value of 1.0 indicates the center point. All other values vary between 0.0 and 1.0, decreasing as positions get farther away from the center point.

Declaration
public override IGridView<double> DoubleResultView { get; }
Property Value
Type Description
IGridView<double>
Overrides
FOVBase.DoubleResultView

Implements

IFOV
IReadOnlyFOV

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX