Vector3i Struct Reference

Integer version of Vector3. More...

List of all members.

Public Member Functions

 Vector3i (int x, int y, int z)
 Vector3i constructor.
 Vector3i (Vector2i xy, int z)
 Vector3i constructor.
Vector3 Vector3 ()
 Return this as a Vector3 (cast to float).
Vector3i Max (Vector3i value)
 Element wise max.
Vector3i Min (Vector3i value)
 Element wise min.
Vector3i Clamp (Vector3i min, Vector3i max)
 Element wise clamp.
Vector3i ClampIndex (Vector3i n)
 Element wise index clamp.
Vector3i WrapIndex (Vector3i n)
 Element wise index wrap.
int Product ()
 Return the product of elements, X * Y * Z.
bool Equals (Vector3i v)
 Equality test.
override bool Equals (Object o)
 Equality test.
override string ToString ()
 Return the string representation of this vector.
override int GetHashCode ()
 Gets the hash code for this vector.

Static Public Member Functions

static Vector3i operator+ (Vector3i a, Vector3i value)
 Element wise addition.
static Vector3i operator- (Vector3i a, Vector3i value)
 Element wise subtraction.
static Vector3i operator* (Vector3i a, Vector3i value)
 Element wise multiplication.
static Vector3i operator/ (Vector3i a, Vector3i value)
 Element wise division.
static bool operator== (Vector3i a, Vector3i value)
 Return true if all elements are equal.
static bool operator!= (Vector3i a, Vector3i value)
 Return true if at least one element is non equal.

Public Attributes

int X
 X.
int Y
 Y.
int Z
 Z.

Properties

Vector2i Xx [get]
Vector2i Xy [get]
Vector2i Xz [get]
Vector2i Yx [get]
Vector2i Yy [get]
Vector2i Yz [get]
Vector2i Zx [get]
Vector2i Zy [get]
Vector2i Zz [get]
Vector3i Xxx [get]
Vector3i Xxy [get]
Vector3i Xxz [get]
Vector3i Xyx [get]
Vector3i Xyy [get]
Vector3i Xyz [get]
Vector3i Xzx [get]
Vector3i Xzy [get]
Vector3i Xzz [get]
Vector3i Yxx [get]
Vector3i Yxy [get]
Vector3i Yxz [get]
Vector3i Yyx [get]
Vector3i Yyy [get]
Vector3i Yyz [get]
Vector3i Yzx [get]
Vector3i Yzy [get]
Vector3i Yzz [get]
Vector3i Zxx [get]
Vector3i Zxy [get]
Vector3i Zxz [get]
Vector3i Zyx [get]
Vector3i Zyy [get]
Vector3i Zyz [get]
Vector3i Zzx [get]
Vector3i Zzy [get]
Vector3i Zzz [get]

Detailed Description

Integer version of Vector3.


Member Function Documentation

Vector3i ClampIndex ( Vector3i  n)

Element wise index clamp.

X is clamped to [0,n.X-1] Y is clamped to [0,n.Y-1] Z is clamped to [0,n.Z-1]

Parameters:
nThe 3d size "this" components must be clamped against. The components of n are assumed to be positive (values of n.X, n.Y or n.Z negative or zero will result in undefined behaviour).
Vector3i WrapIndex ( Vector3i  n)

Element wise index wrap.

X wraps around [0,n.X-1] Y wraps around [0,n.Y-1] Z wraps around [0,n.Z-1] This's (X,Y,Z) is assumed to be a 3d index in a 3d table of size (n.X,n.Y.n.Z). If X, Y or Z are not in the valid array range, they are wrapped around [0,n.X-1], [0,n.Y-1], [0,n.Z-1] respectively (-1 becomes n-1, n becomes 0, n+1 becomes 1 etc), else their value is unchanged.

Parameters:
nThe 2d size "this" components must be wrapped around. The components of n are assumed to be positive (values of n.X, n.Y or n.Z negative or zero will result in undefined behaviour).

Member Data Documentation

int X

X.

int Y

Y.

int Z

Z.


Property Documentation

Vector2i Xx [get]
Vector3i Xxx [get]
Vector3i Xxy [get]
Vector3i Xxz [get]
Vector2i Xy [get]
Vector3i Xyx [get]
Vector3i Xyy [get]
Vector3i Xyz [get]
Vector2i Xz [get]
Vector3i Xzx [get]
Vector3i Xzy [get]
Vector3i Xzz [get]
Vector2i Yx [get]
Vector3i Yxx [get]
Vector3i Yxy [get]
Vector3i Yxz [get]
Vector2i Yy [get]
Vector3i Yyx [get]
Vector3i Yyy [get]
Vector3i Yyz [get]
Vector2i Yz [get]
Vector3i Yzx [get]
Vector3i Yzy [get]
Vector3i Yzz [get]
Vector2i Zx [get]
Vector3i Zxx [get]
Vector3i Zxy [get]
Vector3i Zxz [get]
Vector2i Zy [get]
Vector3i Zyx [get]
Vector3i Zyy [get]
Vector3i Zyz [get]
Vector2i Zz [get]
Vector3i Zzx [get]
Vector3i Zzy [get]
Vector3i Zzz [get]