Komodo Engine
C PROJECT_LOGO=
Komodo.Lib.Math.Vector3 Struct Reference
Inheritance diagram for Komodo.Lib.Math.Vector3:

Public Member Functions

 Vector3 (MonoGameVector3 vector)
 
 Vector3 (Vector3 vector)
 
 Vector3 (float x=0f, float y=0f, float z=0f)
 
override bool Equals (object obj)
 
bool Equals (Vector3 other)
 
override int GetHashCode ()
 
float Length ()
 

Static Public Member Functions

static Vector3 Max (Vector3 left, Vector3 right)
 
static Vector3 Min (Vector3 left, Vector3 right)
 
static Vector3 operator+ (Vector3 vector)
 
static Vector3 operator- (Vector3 vector)
 
static Vector3 Add (Vector3 left, Vector3 right)
 
static Vector3 operator+ (Vector3 left, Vector3 right)
 
static Vector3 Divide (Vector3 vector, float scale)
 
static Vector3 operator/ (Vector3 left, float scale)
 
static bool operator== (Vector3 left, Vector3 right)
 
static bool operator!= (Vector3 left, Vector3 right)
 
static Vector3 Multiply (Vector3 left, float scale)
 
static Vector3 operator* (Vector3 left, float scale)
 
static Vector3 Multiply (Vector3 left, Vector3 right)
 
static Vector3 operator* (Vector3 left, Vector3 right)
 
static Vector3 Subtract (Vector3 left, Vector3 right)
 
static Vector3 operator- (Vector3 left, Vector3 right)
 
static Vector3 Clamp (Vector3 value, Vector3 min, Vector3 max)
 
static Vector3 Normalize (Vector3 vectorToNormalize)
 
static Vector3 Transform (Vector3 vector, Matrix transform)
 
static Vector3 Transform (Vector3 vector, Quaternion transform)
 
static Vector3 Cross (Vector3 a, Vector3 b)
 
static float Dot (Vector3 a, Vector3 b)
 
static float Distance (Vector3 a, Vector3 b)
 
static float DistanceSquared (Vector3 a, Vector3 b)
 
static Vector3 Reflect (Vector3 vectorToReflect, Vector3 normal)
 Returns the reflection of a vector over a given normal. More...
 

Static Public Attributes

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

Properties

MonoGameVector3 MonoGameVector [get]
 
float X [get]
 
float Y [get]
 
float Z [get]
 
Vector2 XY [get]
 
Vector2 XZ [get]
 
Vector2 YX [get]
 
Vector2 YZ [get]
 
Vector2 ZX [get]
 
Vector2 ZY [get]
 
Vector3 XYZ [get]
 
Vector3 XZY [get]
 
Vector3 YXZ [get]
 
Vector3 YZX [get]
 
Vector3 ZXY [get]
 
Vector3 ZYX [get]
 

Member Function Documentation

◆ Reflect()

static Vector3 Komodo.Lib.Math.Vector3.Reflect ( Vector3  vectorToReflect,
Vector3  normal 
)
static

Returns the reflection of a vector over a given normal.

Parameters
vectorToReflectVector to reflect over the normal.
normalNormal to reflect the vector over.
Returns
Reflected vector over the the normal.