Show / Hide Table of Contents

Class RippleSenseSource

A sense source which performs its spreading calculations by using a "ripple" algorithm.

Inheritance
object
SenseSourceBase
RippleSenseSource
Implements
ISenseSource
Inherited Members
SenseSourceBase.Size
SenseSourceBase.Center
SenseSourceBase.ResultViewBacking
SenseSourceBase.AngleInternal
SenseSourceBase.CalculateLight()
SenseSourceBase.SetResistanceMap(IGridView<double>)
SenseSourceBase.ToString()
SenseSourceBase.ResultView
SenseSourceBase.Decay
SenseSourceBase.Position
SenseSourceBase.Radius
SenseSourceBase.DistanceCalc
SenseSourceBase.Enabled
SenseSourceBase.IsAngleRestricted
SenseSourceBase.Intensity
SenseSourceBase.Angle
SenseSourceBase.Span
SenseSourceBase.ResistanceView
SenseSourceBase.RadiusChanged
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.SenseMapping.Sources
Assembly: GoRogue.dll
Syntax
public class RippleSenseSource : SenseSourceBase, ISenseSource
Remarks

Values spread out from the center, decreasing with distance and in accordance with the resistance for each cell they encounter.

There are several variations of the algorithm provided, which produce slightly different spreading tendencies. See the RippleType value documentation for details.

Constructors

View Source

RippleSenseSource(Point, double, Distance, RippleType, double)

Creates a source which spreads outwards in all directions.

Declaration
public RippleSenseSource(Point position, double radius, Distance distanceCalc, RippleType rippleType = RippleType.Regular, double intensity = 1)
Parameters
Type Name Description
Point position

The position on a map that the source is located at.

double radius

The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed.

Distance distanceCalc

The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, such as Radius).

RippleType rippleType

The variation of the ripple algorithm to use. See the RippleType value documentation for descriptions of each.

double intensity

The starting intensity value of the source. Defaults to 1.0.

View Source

RippleSenseSource(Point, double, Distance, double, double, RippleType, double)

Constructor. Creates a source which spreads only in a cone defined by the given angle and span.

Declaration
public RippleSenseSource(Point position, double radius, Distance distanceCalc, double angle, double span, RippleType rippleType = RippleType.Regular, double intensity = 1)
Parameters
Type Name Description
Point position

The position on a map that the source is located at.

double radius

The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed.

Distance distanceCalc

The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, such as Radius).

double angle

The angle in degrees that specifies the outermost center point of the cone formed by the source's values. 0 degrees points right.

double span

The angle, in degrees, that specifies the full arc contained in the cone formed by the source's values -- angle / 2 degrees are included on either side of the cone's center line.

RippleType rippleType

The variation of the ripple algorithm to use. See the RippleType value documentation for descriptions of each.

double intensity

The starting intensity value of the source. Defaults to 1.0.

View Source

RippleSenseSource(int, int, double, Distance, RippleType, double)

Creates a source which spreads outwards in all directions.

Declaration
public RippleSenseSource(int positionX, int positionY, double radius, Distance distanceCalc, RippleType rippleType = RippleType.Regular, double intensity = 1)
Parameters
Type Name Description
int positionX

The X-value of the position on a map that the source is located at.

int positionY

The Y-value of the position on a map that the source is located at.

double radius

The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed.

Distance distanceCalc

The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, such as Radius).

RippleType rippleType

The variation of the ripple algorithm to use. See the RippleType value documentation for descriptions of each.

double intensity

The starting intensity value of the source. Defaults to 1.0.

View Source

RippleSenseSource(int, int, double, Distance, double, double, RippleType, double)

Constructor. Creates a source which spreads only in a cone defined by the given angle and span.

Declaration
public RippleSenseSource(int positionX, int positionY, double radius, Distance distanceCalc, double angle, double span, RippleType rippleType = RippleType.Regular, double intensity = 1)
Parameters
Type Name Description
int positionX

The x-value for the position on a map that the source is located at.

int positionY

The y-value for the position on a map that the source is located at.

double radius

The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed.

Distance distanceCalc

The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, such as Radius).

double angle

The angle in degrees that specifies the outermost center point of the cone formed by the source's values. 0 degrees points right.

double span

The angle, in degrees, that specifies the full arc contained in the cone formed by the source's values -- angle / 2 degrees are included on either side of the cone's center line.

RippleType rippleType

The variation of the ripple algorithm to use. See the RippleType value documentation for descriptions of each.

double intensity

The starting intensity value of the source. Defaults to 1.0.

Properties

View Source

RippleType

The variation of the ripple algorithm being used. See the RippleType value documentation for descriptions of each.

Declaration
public RippleType RippleType { get; set; }
Property Value
Type Description
RippleType

Methods

View Source

OnCalculate()

Performs the actual spreading calculation.

Declaration
public override void OnCalculate()
Overrides
SenseSourceBase.OnCalculate()
View Source

Reset()

Resets calculation state so a new set of calculations can begin.

Declaration
protected override void Reset()
Overrides
SenseSourceBase.Reset()

Implements

ISenseSource

Extension Methods

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