Show / Hide Table of Contents

Class RadiusLocationContext

A context representing information necessary to get all the positions in a radius via functions like PositionsInRadius(RadiusLocationContext). Storing a context and re-using it may be more performance-savvy in cases where you're getting the positions in a radius of the same size many times, even if the location center point or shape of the radius is changing.

Inheritance
object
RadiusLocationContext
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public class RadiusLocationContext

Constructors

View Source

RadiusLocationContext(Point, int)

Constructor.

Declaration
public RadiusLocationContext(Point center, int radius)
Parameters
Type Name Description
Point center

The starting center-point of the radius.

int radius

The starting length of the radius.

View Source

RadiusLocationContext(Point, int, Rectangle)

Constructor.

Declaration
public RadiusLocationContext(Point center, int radius, Rectangle bounds)
Parameters
Type Name Description
Point center

The starting center-point of the radius.

int radius

The starting length of the radius.

Rectangle bounds

The bounds to restrict the radius to. Any positions inside the radius but outside the bounds will be ignored and considered outside the radius.

View Source

RadiusLocationContext(int, int, int)

Constructor.

Declaration
public RadiusLocationContext(int centerX, int centerY, int radius)
Parameters
Type Name Description
int centerX

X-value of the starting center-point of the radius.

int centerY

Y-value of the starting center-point of the radius.

int radius

The starting length of the radius.

View Source

RadiusLocationContext(int, int, int, Rectangle)

Constructor.

Declaration
public RadiusLocationContext(int centerX, int centerY, int radius, Rectangle bounds)
Parameters
Type Name Description
int centerX

X-value of the starting center-point of the radius.

int centerY

Y-value of the starting center-point of the radius.

int radius

The starting length of the radius.

Rectangle bounds

The bounds to restrict the radius to. Any positions inside the radius but outside the bounds will be ignored and considered outside the radius.

Fields

View Source

Bounds

Represents the bounds that restrict the valid positions that are considered inside the radius. Any positions inside the radius but outside the bounds will be ignored and considered outside the radius.Set to Empty to indicate no bounds.

Declaration
public Rectangle Bounds
Field Value
Type Description
Rectangle

Properties

View Source

Center

The center-point of the radius represented.

Declaration
public Point Center { get; set; }
Property Value
Type Description
Point
View Source

Radius

The length of the radius represented.

Declaration
public int Radius { get; set; }
Property Value
Type Description
int

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?, EventHandler<ValueChangedEventArgs<TProperty>>?)
  • View Source
In this article
Back to top Generated by DocFX