Show / Hide Table of Contents

Struct FOVCalculateParameters

Represents a set of parameters that were passed to a call to Calculate.

Implements
IEquatable<FOVCalculateParameters>
IMatchable<FOVCalculateParameters>
Inherited Members
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: GoRogue.FOV
Assembly: GoRogue.dll
Syntax
public readonly struct FOVCalculateParameters : IEquatable<FOVCalculateParameters>, IMatchable<FOVCalculateParameters>

Constructors

View Source

FOVCalculateParameters(Point, double, Distance, double, double)

Constructor.

Declaration
public FOVCalculateParameters(Point origin, double radius, Distance distanceCalc, double angle = 0, double span = 360)
Parameters
Type Name Description
Point origin

Position of the FOV origin point.

double radius

The maximum radius -- eg. the maximum distance of the field of view if completely unobstructed.

Distance distanceCalc

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

double angle

The angle in degrees that specifies the outermost center point of the field of view cone. 0 degrees points up, and increases move the cone clockwise (like a compass).

double span

The angle, in degrees, that specifies the full arc contained in the field of view cone -- span> / 2 degrees are included on either side of the span line.

Fields

View Source

Angle

The angle in degrees that specifies the outermost center point of the field of view cone. 0 degrees points upward, and increases move clockwise (like a compass)

Declaration
[DataMember]
public readonly double Angle
Field Value
Type Description
double
View Source

DistanceCalc

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

Declaration
[DataMember]
public readonly Distance DistanceCalc
Field Value
Type Description
Distance
View Source

Origin

Position of the FOV origin point.

Declaration
[DataMember]
public readonly Point Origin
Field Value
Type Description
Point
View Source

Radius

The maximum radius -- eg. the maximum distance of the field of view if completely unobstructed.

Declaration
[DataMember]
public readonly double Radius
Field Value
Type Description
double
View Source

Span

The angle, in degrees, that specifies the full arc contained in the field of view cone -- Span / 2 degrees are included on either side of the span line.

Declaration
[DataMember]
public readonly double Span
Field Value
Type Description
double

Methods

View Source

Deconstruct(out Point, out double, out Distance, out double, out double)

Supports C# Deconstruction syntax.

Declaration
public void Deconstruct(out Point origin, out double radius, out Distance distanceCalc, out double angle, out double span)
Parameters
Type Name Description
Point origin
double radius
Distance distanceCalc
double angle
double span
View Source

Equals(FOVCalculateParameters)

True if the given objects have the same parameter values; false otherwise.

Declaration
public bool Equals(FOVCalculateParameters other)
Parameters
Type Name Description
FOVCalculateParameters other
Returns
Type Description
bool
View Source

Equals(object?)

True if the given object is a FOVCalculateParameters and has the same parameter values; false otherwise.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
View Source

FromTuple((Point origin, double radius, Distance distanceCalc, double angle, double span))

Converts the tuple to an equivalent FOVCalculateParameters object.

Declaration
public static FOVCalculateParameters FromTuple((Point origin, double radius, Distance distanceCalc, double angle, double span) tuple)
Parameters
Type Name Description
(Point origin, double radius, Distance distanceCalc, double angle, double span) tuple
Returns
Type Description
FOVCalculateParameters
View Source

GetHashCode()

Returns a hash code based on all of the object's fields.

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
View Source

Matches(FOVCalculateParameters)

True if the given object has the same parameter values; false otherwise.

Declaration
public bool Matches(FOVCalculateParameters other)
Parameters
Type Name Description
FOVCalculateParameters other
Returns
Type Description
bool
View Source

ToTuple()

Converts this FOVCalculateParameters object to an equivalent tuple.

Declaration
public (Point origin, double radius, Distance distanceCalc, double angle, double span) ToTuple()
Returns
Type Description
(Point origin, double radius, Distance distanceCalc, double angle, double span)

Operators

View Source

operator ==(FOVCalculateParameters, FOVCalculateParameters)

True if the given objects have the same parameter values; false otherwise.

Declaration
public static bool operator ==(FOVCalculateParameters left, FOVCalculateParameters right)
Parameters
Type Name Description
FOVCalculateParameters left
FOVCalculateParameters right
Returns
Type Description
bool
View Source

implicit operator (Point origin, double radius, Distance distanceCalc, double angle, double span)(FOVCalculateParameters)

Implicitly converts an FOVCalculateParameters object to an equivalent tuple.

Declaration
public static implicit operator (Point origin, double radius, Distance distanceCalc, double angle, double span)(FOVCalculateParameters pair)
Parameters
Type Name Description
FOVCalculateParameters pair
Returns
Type Description
(Point origin, double radius, Distance distanceCalc, double angle, double span)
View Source

implicit operator FOVCalculateParameters((Point origin, double radius, Distance distanceCalc, double angle, double span))

Implicitly converts a tuple to its equivalent FOVCalculateParameters.

Declaration
public static implicit operator FOVCalculateParameters((Point origin, double radius, Distance distanceCalc, double angle, double span) tuple)
Parameters
Type Name Description
(Point origin, double radius, Distance distanceCalc, double angle, double span) tuple
Returns
Type Description
FOVCalculateParameters
View Source

operator !=(FOVCalculateParameters, FOVCalculateParameters)

True if the given objects have different parameter values; false otherwise.

Declaration
public static bool operator !=(FOVCalculateParameters left, FOVCalculateParameters right)
Parameters
Type Name Description
FOVCalculateParameters left
FOVCalculateParameters right
Returns
Type Description
bool

Implements

IEquatable<T>
IMatchable<T>

Extension Methods

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