CryEngine.Vector3

Inherits IEquatable< Vector3 >.

Public Member Functions

Vector3 (float xCoord, float yCoord, float zCoord)
Vector3 (Vector2 v)
Vector3 (Vector4 v)
override int GetHashCode ()
override bool Equals (object obj)
bool Equals (Vector3 other)
override string ToString ()
float Dot (Vector3 v)
Returns the dot product of this Vector3 and Vector3 v. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites). More...
Vector3 Cross (Vector3 v)
Cross this vector with the specified vector. More...
bool IsZero (float epsilon=0)
bool IsNearlyZero ()

Static Public Member Functions

static implicit operator Vec3 (Vector3 managedVector)
static implicit operator Vector3 (Vec3 nativeVector)
static operator Vector3 (Vector2 vector)
static operator Vector3 (Vector4 vector)
static Vector3 operator* (Vector3 v, float scale)
static Vector3 operator* (float scale, Vector3 v)
static Vector3 operator/ (Vector3 v, float scale)
static Vector3 operator+ (Vector3 v0, Vector3 v1)
static Vector3 operator- (Vector3 v0, Vector3 v1)
static Vector3 operator- (Vector3 v)
static Vector3 operator! (Vector3 v)
static bool operator== (Vector3 left, Vector3 right)
static bool operator!= (Vector3 left, Vector3 right)
static float Dot (Vector3 a, Vector3 b)
Returns the dot product of Vector3 a and b. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites). More...
static Vector3 Cross (Vector3 a, Vector3 b)
Cross the specified a and b vectors. More...
static Vector3 Lerp (Vector3 p, Vector3 q, float t)
static Vector3 LerpUnclamped (Vector3 p, Vector3 q, float t)
static Vector3 Slerp (Vector3 p, Vector3 q, float t)
static Vector3 SlerpUnclamped (Vector3 p, Vector3 q, float t)
static float Angle (Vector3 a, Vector3 b)
Returns the angle in radians between Vector3 a and b in radians. If the magnitude of a or b is 0, it will return 0. More...
static float FlatAngle (Vector3 a, Vector3 b)
Returns the angle in radians between Vector3 a and b, but disregards the Z-axis. If the magnitude of a or b is 0, it will return 0. More...

Static Public Attributes

static readonly Vector3 Zero = new Vector3(0, 0, 0)
static readonly Vector3 One = new Vector3(1, 1, 1)
static readonly Vector3 Up = new Vector3(0, 0, 1)
static readonly Vector3 Down = new Vector3(0, 0, -1)
static readonly Vector3 Forward = new Vector3(0, 1, 0)
static readonly Vector3 Back = new Vector3(0, -1, 0)
static readonly Vector3 Left = new Vector3(-1, 0, 0)
static readonly Vector3 Right = new Vector3(1, 0, 0)

Properties

float x [get, set]
float y [get, set]
float z [get, set]
float X [get, set]
float Y [get, set]
float Z [get, set]
float Length [get, set]
float Magnitude [get]
float LengthSquared [get]
float Length2D [get]
float Magnitude2D [get]
float Length2DSquared [get]
Vector3 Normalized [get]
float Volume [get]
Vector3 Absolute [get]
Vector3 Flipped [get]
Vector3 Orthogonal [get]
Returns a vector that is orthogonal to this one More...
float this[int index] [get, set]
Gets individual axes by index More...

Constructor & Destructor Documentation

◆ Vector3() [1/3]

CryEngine.Vector3.Vector3 ( float xCoord,
float yCoord,
float zCoord
)
inline

◆ Vector3() [2/3]

CryEngine.Vector3.Vector3 ( Vector2 v)
inline

◆ Vector3() [3/3]

CryEngine.Vector3.Vector3 ( Vector4 v)
inline

Member Function Documentation

◆ Angle()

static float CryEngine.Vector3.Angle ( Vector3 a,
Vector3 b
)
inline
static

Returns the angle in radians between Vector3 a and b in radians. If the magnitude of a or b is 0, it will return 0.

Returns
The angle in radians.
Parameters
aThe first Vector3.
bThe second Vector3.

◆ Cross() [1/2]

Vector3 CryEngine.Vector3.Cross ( Vector3 v)
inline

Cross this vector with the specified vector.

Returns
The cross.
Parameters
vThe other vector.

◆ Cross() [2/2]

static Vector3 CryEngine.Vector3.Cross ( Vector3 a,
Vector3 b
)
inline
static

Cross the specified a and b vectors.

Returns
The cross.
Parameters
aVector a.
bVector b.

◆ Dot() [1/2]

float CryEngine.Vector3.Dot ( Vector3 v)
inline

Returns the dot product of this Vector3 and Vector3 v. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites).

Returns
The dot product.
Parameters
vOther direction vector.

◆ Dot() [2/2]

static float CryEngine.Vector3.Dot ( Vector3 a,
Vector3 b
)
inline
static

Returns the dot product of Vector3 a and b. If the vectors are normalized the value will always be between 1 (vectors are the same) and -1 (vectors are opposites).

Returns
The dot product.
Parameters
aDirection vector a.
bDirection vector b.

◆ Equals() [1/2]

override bool CryEngine.Vector3.Equals ( object obj)
inline

◆ Equals() [2/2]

bool CryEngine.Vector3.Equals ( Vector3 other)
inline

◆ FlatAngle()

static float CryEngine.Vector3.FlatAngle ( Vector3 a,
Vector3 b
)
inline
static

Returns the angle in radians between Vector3 a and b, but disregards the Z-axis. If the magnitude of a or b is 0, it will return 0.

Returns
The angle.
Parameters
aThe first Vector3.
bThe second Vector3.

◆ GetHashCode()

override int CryEngine.Vector3.GetHashCode ( )
inline

◆ IsNearlyZero()

bool CryEngine.Vector3.IsNearlyZero ( )
inline

◆ IsZero()

bool CryEngine.Vector3.IsZero ( float epsilon = 0)
inline

◆ Lerp()

static Vector3 CryEngine.Vector3.Lerp ( Vector3 p,
Vector3 q,
float t
)
inline
static

◆ LerpUnclamped()

static Vector3 CryEngine.Vector3.LerpUnclamped ( Vector3 p,
Vector3 q,
float t
)
inline
static

◆ operator Vec3()

static implicit CryEngine.Vector3.operator Vec3 ( Vector3 managedVector)
inline
static

◆ operator Vector3() [1/3]

static implicit CryEngine.Vector3.operator Vector3 ( Vec3 nativeVector)
inline
static

◆ operator Vector3() [2/3]

static CryEngine.Vector3.operator Vector3 ( Vector2 vector)
inline
explicit
static

◆ operator Vector3() [3/3]

static CryEngine.Vector3.operator Vector3 ( Vector4 vector)
inline
explicit
static

◆ operator!()

static Vector3 CryEngine.Vector3.operator! ( Vector3 v)
inline
static

◆ operator!=()

static bool CryEngine.Vector3.operator!= ( Vector3 left,
Vector3 right
)
inline
static

◆ operator*() [1/2]

static Vector3 CryEngine.Vector3.operator* ( Vector3 v,
float scale
)
inline
static

◆ operator*() [2/2]

static Vector3 CryEngine.Vector3.operator* ( float scale,
Vector3 v
)
inline
static

◆ operator+()

static Vector3 CryEngine.Vector3.operator+ ( Vector3 v0,
Vector3 v1
)
inline
static

◆ operator-() [1/2]

static Vector3 CryEngine.Vector3.operator- ( Vector3 v0,
Vector3 v1
)
inline
static

◆ operator-() [2/2]

static Vector3 CryEngine.Vector3.operator- ( Vector3 v)
inline
static

◆ operator/()

static Vector3 CryEngine.Vector3.operator/ ( Vector3 v,
float scale
)
inline
static

◆ operator==()

static bool CryEngine.Vector3.operator== ( Vector3 left,
Vector3 right
)
inline
static

◆ Slerp()

static Vector3 CryEngine.Vector3.Slerp ( Vector3 p,
Vector3 q,
float t
)
inline
static

◆ SlerpUnclamped()

static Vector3 CryEngine.Vector3.SlerpUnclamped ( Vector3 p,
Vector3 q,
float t
)
inline
static

◆ ToString()

override string CryEngine.Vector3.ToString ( )
inline

Member Data Documentation

◆ Back

readonly Vector3 CryEngine.Vector3.Back = new Vector3(0, -1, 0)
static

◆ Down

readonly Vector3 CryEngine.Vector3.Down = new Vector3(0, 0, -1)
static

◆ Forward

readonly Vector3 CryEngine.Vector3.Forward = new Vector3(0, 1, 0)
static

◆ Left

readonly Vector3 CryEngine.Vector3.Left = new Vector3(-1, 0, 0)
static

◆ One

readonly Vector3 CryEngine.Vector3.One = new Vector3(1, 1, 1)
static
readonly Vector3 CryEngine.Vector3.Right = new Vector3(1, 0, 0)
static

◆ Up

readonly Vector3 CryEngine.Vector3.Up = new Vector3(0, 0, 1)
static

◆ Zero

readonly Vector3 CryEngine.Vector3.Zero = new Vector3(0, 0, 0)
static

Property Documentation

◆ Absolute

Vector3 CryEngine.Vector3.Absolute
get

◆ Flipped

Vector3 CryEngine.Vector3.Flipped
get

◆ Length

float CryEngine.Vector3.Length
get
set

◆ Length2D

float CryEngine.Vector3.Length2D
get

◆ Length2DSquared

float CryEngine.Vector3.Length2DSquared
get

◆ LengthSquared

float CryEngine.Vector3.LengthSquared
get

◆ Magnitude

float CryEngine.Vector3.Magnitude
get

◆ Magnitude2D

float CryEngine.Vector3.Magnitude2D
get

◆ Normalized

Vector3 CryEngine.Vector3.Normalized
get

◆ Orthogonal

Vector3 CryEngine.Vector3.Orthogonal
get

Returns a vector that is orthogonal to this one

◆ this[int index]

float CryEngine.Vector3.this[int index]
get
set

Gets individual axes by index

Parameters
indexIndex, 0 - 2 where 0 is X and 2 is Z
Returns
The axis value

◆ Volume

float CryEngine.Vector3.Volume
get

◆ x

float CryEngine.Vector3.x
get
set

◆ X

float CryEngine.Vector3.X
get
set

◆ y

float CryEngine.Vector3.y
get
set

◆ Y

float CryEngine.Vector3.Y
get
set

◆ z

float CryEngine.Vector3.z
get
set

◆ Z

float CryEngine.Vector3.Z
get
set