Table of Contents

Struct GridPoint3

Namespace
Gamelogic.Grids2
Assembly
Assembly-CSharp.dll

A discrete 3D vector, used to index into 3D grids.

public readonly struct GridPoint3 : IEquatable<GridPoint3>
Implements
Inherited Members

Constructors

GridPoint3(int, int, int)

Constructs a new instance of GridPoint3 with the given coordinates.

Fields

One

The grid point with all coordinates equal to 1.

Zero

The zero grid point, also called the origin. All coordinates are 0.

Properties

X

The X coordinate of this point.

Y

The Y coordinate of this point.

Z

The Z coordinate of this point.

Methods

Add(GridPoint3)

Adds an other grid point to this grid point and returns the result.

CrossProduct(GridPoint3)

Calculates the cross product of this vector with another.

Div(GridPoint3)

Gives a new point that represents the first point divided by the second point component-wise.The division is integer division.

Div(int)
Dot(GridPoint3)

Calculates the dot product between this grid point and another.

Equals(GridPoint3)
Equals(object)
FloorDiv(GridPoint3)

Gives a new point that represents the first point divided by the second point component-wise.The division is integer division.

FloorDiv(int)

Divides each coordinate with r, using integer floor division.

FloorMod(GridPoint3)

Gives a new point that represents the reminder when the first point is divided by the second point component-wise. The division is integer floor division.

GetColor(ColorFunction)

Gets the color index for this point for the given color function.

GetColor(ColorFunction3)
GetColor(int, int, int)

Gets the color index for this point for the given coloring parameters.

GetColor(int, int, int, int, int, int)

Gets the color index for this point for the given color function.

GetForwardVectorRays(IEnumerable<GridPoint3>)

Gets the maps that represent the forward vector rays through this point in the given list of directions.

GetHashCode()
GetReverseVectorRays(IEnumerable<GridPoint3>)

Gets the maps that represent the reverse vector lines through this point in the given list of directions.

GetVectorLine(GridPoint3)

Gets the map that represents a line through this point in the given direction.

GetVectorLines(IEnumerable<GridPoint3>)

Gets the maps that represent the vector lines through this point in the given list of directions.

GetVectorNeighbors(IEnumerable<GridPoint3>)

Gets the vector neighbors of this point in the given direction.

HadamardMul(GridPoint3, GridPoint3)
Max(GridPoint3, GridPoint3)

Calculates a new grid point with coordinates the maximum of the respective coordinates of two grid points.

Min(GridPoint3, GridPoint3)

Calculates a new grid point with coordinates the minimum of the respective coordinates of two grid points.

Mod(GridPoint3)

Gives a new point that represents the reminder when the first point is divided by the second point component-wise.The division is integer division.

Mul(GridPoint3)

Gives a new point that represents the first point multiplied by the second point component-wise.

Mul(int)

Multiplies each coordinate with the specified integer.

Negate()

Returns the point with each coordinate negated.

Subtract(GridPoint3)

Subtracts the other point from this point, and returns the result.

TO2DXZ()

Convert this point to GridPoint2, keeping the x and z coordinates.

To2DXY()

Convert this point to GridPoint2, keeping the x and y coordinates.

ToString()
ToVector3()

Converts a grid point to a Vector3 with the same coordinates (as floats).

TruncDiv(GridPoint3)

Gives a new point that represents the first point divided by the second point component-wise.The division is integer division.

TruncDiv(int)

Divides each coordinate with r, using integer trunc division.

TruncMod(GridPoint3)

Gives a new point that represents the reminder when the first point is divided by the second point component-wise. The division is integer trunc division.

__GetColor_Reference(int, int, int, int, int, int)

Gets the color index for this point for the given color function.

Operators

operator +(GridPoint3, GridPoint3)

Adds two points by adding their corresponding coordinates.

operator /(GridPoint3, GridPoint3)

Divides corresponding coordinates using integer division.

operator /(GridPoint3, int)

Divides each coordinate by the integer using integer division.

operator ==(GridPoint3, GridPoint3)

Compares two points for equality.

implicit operator Vector3(GridPoint3)

Converts a grid point to a Vector3 with the same coordinates (as floats).

operator !=(GridPoint3, GridPoint3)

Checks whether two points are not equal.

operator %(GridPoint3, GridPoint3)

Divides corresponding coordinates using integer division and return the remainders as a new grid point.

operator *(GridPoint3, GridPoint3)

Multiplies corresponding coordinates.

operator *(GridPoint3, int)

Multiplies corresponding coordinates.

operator *(int, GridPoint3)

Multiplies each coordinate with the integer.

operator -(GridPoint3, GridPoint3)

Subtracts one point from another by subtracting corresponding coordinates.

operator -(GridPoint3)

Negates the given vector.

operator +(GridPoint3)

This operations does not affect the point.

See Also