Struct FOVCalculateParameters
Represents a set of parameters that were passed to a call to Calculate.
Assembly: GoRogue.dll
Syntax
public readonly struct FOVCalculateParameters : IEquatable<FOVCalculateParameters>, IMatchable<FOVCalculateParameters>
Constructors
View Source
FOVCalculateParameters(Point, double, Distance, double, double)
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
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
View Source
Origin
Position of the FOV origin point.
Declaration
[DataMember]
public readonly Point Origin
Field Value
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
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
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
View Source
Equals(FOVCalculateParameters)
True if the given objects have the same parameter values; false otherwise.
Declaration
public bool Equals(FOVCalculateParameters other)
Parameters
Returns
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
Overrides
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
Returns
View Source
GetHashCode()
Returns a hash code based on all of the object's fields.
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
Matches(FOVCalculateParameters)
True if the given object has the same parameter values; false otherwise.
Declaration
public bool Matches(FOVCalculateParameters other)
Parameters
Returns
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
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
Returns
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
Returns
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
Returns
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
Returns
Implements
Extension Methods