Roboid Control for C#
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
LinearAlgebra.Vector3 Struct Reference

Detailed Description

3-dimensional vectors

This uses the right-handed coordinate system.

Inherits IEquatable< Vector3 >.

Public Member Functions

 Vector3 (float x, float y, float z)
 Create a new 3-dimensional vector.
 
bool Equals (Vector3 v)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Static Public Member Functions

static Vector3 operator+ (Vector3 v1, Vector3 v2)
 
static Vector3 operator- (Vector3 v1, Vector3 v2)
 
static Vector3 operator- (Vector3 v1)
 
static Vector3 operator* (Vector3 v1, float d)
 
static Vector3 operator* (float d, Vector3 v1)
 
static Vector3 operator/ (Vector3 v1, float d)
 
static bool operator== (Vector3 v1, Vector3 v2)
 
static bool operator!= (Vector3 v1, Vector3 v2)
 
static float Distance (Vector3 v1, Vector3 v2)
 
static float Dot (Vector3 v1, Vector3 v2)
 
static Vector3 Lerp (Vector3 v1, Vector3 v2, float f)
 

Public Attributes

float x
 The right axis of the vector.
 
float y
 The upward axis of the vector.
 
float z
 The forward axis of the vector.
 

Static Public Attributes

static readonly Vector3 zero = new Vector3(0, 0, 0)
 A vector with zero for all axis.
 
static readonly Vector3 one = new Vector3(1, 1, 1)
 A vector with one for all axis.
 
static readonly Vector3 left = new Vector3(-1, 0, 0)
 A vector3 with values (-1, 0, 0)
 
static readonly Vector3 right = new Vector3(1, 0, 0)
 A vector with values (1, 0, 0)
 
static readonly Vector3 down = new Vector3(0, -1, 0)
 A vector with values (0, -1, 0)
 
static readonly Vector3 up = new Vector3(0, 1, 0)
 A vector with values (0, 1, 0)
 
static readonly Vector3 back = new Vector3(0, -1, 0)
 A vector with values (0, 0, -1)
 
static readonly Vector3 forward = new Vector3(0, 1, 0)
 A vector with values (0, 0, 1)
 

Properties

float magnitude [get]
 
Vector3 normalized [get]
 

Constructor & Destructor Documentation

◆ Vector3()

LinearAlgebra.Vector3.Vector3 ( float  x,
float  y,
float  z 
)

Create a new 3-dimensional vector.

Parameters
xx axis value
yy axis value
zz axis value