Class RippleSenseSource
A sense source which performs its spreading calculations by using a "ripple" algorithm.
Implements
Inherited Members
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 SourceRippleSenseSource(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. |
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 --
|
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. |
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. |
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 --
|
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 SourceRippleType
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 SourceOnCalculate()
Performs the actual spreading calculation.
Declaration
public override void OnCalculate()
Overrides
View SourceReset()
Resets calculation state so a new set of calculations can begin.
Declaration
protected override void Reset()