Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

VRageMath.Vector3I

Morten Aune Lyrstad edited this page Apr 16, 2022 · 53 revisions

IndexNamespace Index

Vector3I Struct

public struct Vector3I: IEquatable<Vector3I>, IComparable<Vector3I>

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

static Vector3I Backward

static EqualityComparer Comparer

static Vector3I Down

static Vector3I Forward

static Vector3I Left

static Vector3I MaxValue

static Vector3I MinValue

static Vector3I One

static Vector3I Right

static Vector3I UnitX

static Vector3I UnitY

static Vector3I UnitZ

static Vector3I Up

static Vector3I Zero

int X

int Y

int Z

Properties

bool IsPowerOfTwo { get; }

int Item { get; set; }

int Size { get; }

How many cubes are in block with this size

long SizeLong { get; }

Constructors

Vector3I(int xyz)

Vector3I(int x, int y, int z)

Vector3I(Vector2I xy, int z)

Vector3I(Vector3 xyz)

Vector3I(Vector3D xyz)

Vector3I(Vector3S xyz)

Vector3I(float x, float y, float z)

Vector3I(Byte&#91] bytes, int index)

Methods

static Vector3I Abs(Vector3I value)

static void Abs(ref Vector3I value, out Vector3I result)

static bool BoxContains(Vector3I boxMin, Vector3I boxMax, Vector3I pt)

static bool BoxContains(ref Vector3I boxMin, ref Vector3I boxMax, ref Vector3I pt)

static bool BoxIntersects(Vector3I minA, Vector3I maxA, Vector3I minB, Vector3I maxB)

static bool BoxIntersects(ref Vector3I minA, ref Vector3I maxA, ref Vector3I minB, ref Vector3I maxB)

static Vector3I Ceiling(Vector3 value)

static Vector3I Ceiling(Vector3D value)

static Vector3I Clamp(Vector3I value1, Vector3I min, Vector3I max)

static void Clamp(ref Vector3I value1, ref Vector3I min, ref Vector3I max, out Vector3I result)

static void Cross(ref Vector3I vector1, ref Vector3I vector2, out Vector3I result)

Calculates the cross product of two vectors.

static int DistanceManhattan(Vector3I first, Vector3I second)

Manhattan distance (cube distance) X + Y + Z of Abs(first - second)

static Vector3I DominantAxisProjection(Vector3I value1)

Returns a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value.

static void DominantAxisProjection(ref Vector3I value1, out Vector3I result)

Calculates a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value. The result is saved into a user-specified variable.

static int Dot(Vector3I vector1, Vector3I vector2)

static int Dot(ref Vector3I vector1, ref Vector3I vector2)

static void Dot(ref Vector3I vector1, ref Vector3I vector2, out int dot)

static IEnumerable<Vector3I> EnumerateRange(Vector3I minInclusive, Vector3I maxExclusive)

Enumerate all values in a integer interval (a cuboid). This method is an allocating version of the Vector3I_RangeIterator. This once can be used in the foreach syntax though so it's more convenient for debug routines.

static Vector3I Floor(Vector3 value)

static Vector3I Floor(Vector3D value)

static void Floor(ref Vector3 v, out Vector3I r)

static void Floor(ref Vector3D v, out Vector3I r)

static CubeFace GetDominantDirection(Vector3I val)

static Vector3I GetDominantDirectionVector(Vector3I val)

static Vector3I Max(Vector3I value1, Vector3I value2)

static void Max(ref Vector3I value1, ref Vector3I value2, out Vector3I result)

static Vector3I Min(Vector3I value1, Vector3I value2)

static void Min(ref Vector3I value1, ref Vector3I value2, out Vector3I result)

static void MinMax(ref Vector3I min, ref Vector3I max)

Separates minimal and maximal values of any two input vectors

static Vector3I Round(Vector3 value)

static Vector3I Round(Vector3D value)

static void Round(ref Vector3 v, out Vector3I r)

static void Round(ref Vector3D v, out Vector3I r)

static Vector3I Shift(Vector3I value)

static Vector3I Sign(Vector3 value)

static Vector3I Sign(Vector3I value)

static void Transform(ref Vector3I position, ref Matrix matrix, out Vector3I result)

Transforms a Vector3I by the given Matrix.

static void Transform(ref Vector3I value, ref Quaternion rotation, out Vector3I result)

static Vector3I Transform(Vector3I value, Quaternion rotation)

static void Transform(ref Vector3I value, ref MatrixI matrix, out Vector3I result)

static Vector3I Transform(Vector3I value, MatrixI transformation)

static Vector3I Transform(Vector3I value, ref MatrixI transformation)

static Vector3I TransformNormal(Vector3I value, ref MatrixI transformation)

static void TransformNormal(ref Vector3I normal, ref Matrix matrix, out Vector3I result)

Transforms a vector normal by a matrix.

static void TransformNormal(ref Vector3I normal, ref MatrixI matrix, out Vector3I result)

static Vector3I Trunc(Vector3 value)

static bool TryParseFromString(string p, out Vector3I vec)

int AbsMax()

Returns the component of the vector, whose absolute value is largest of all the three components.

int AbsMin()

Returns the component of the vector, whose absolute value is smallest of all the three components.

int AxisValue(Axis axis)

int CompareTo(Vector3I other)

int Dot(ref Vector3I v)

bool Equals(Vector3I other)

bool Equals(object obj)

int GetHashCode()

bool IsAxisAligned()

bool IsInside(ref Vector3I inclusiveMin, ref Vector3I exclusiveMax)

bool IsInside(Vector3I inclusiveMin, Vector3I exclusiveMax)

bool IsInsideInclusiveEnd(ref Vector3I min, ref Vector3I max)

bool IsInsideInclusiveEnd(Vector3I min, Vector3I max)

int Length()

int RectangularDistance(Vector3I otherVector)

Calculates rectangular distance. It's how many sectors you have to travel to get to other sector from current sector.

int RectangularLength()

Calculates rectangular distance of this vector, interpreted as a point, from the origin.

void ToBytes(List<byte> result)

string ToString()

int Volume()

Clone this wiki locally