Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Vector3 Class Reference

Vector class (holds three items) More...

Public Member Functions

 Vector3 (double X, double Y, double Z)
 Constructor More...
 
override bool Equals (object obj)
 Determines if the items are equal More...
 
override int GetHashCode ()
 Gets the hash code More...
 
virtual void Normalize ()
 Normalizes the vector More...
 
override string ToString ()
 To string function More...
 

Static Public Member Functions

static double Angle (Vector3 V1, Vector3 V2)
 Determines the angle between the vectors More...
 
static double Distance (Vector3 V1, Vector3 V2)
 The distance between two vectors More...
 
static double DotProduct (Vector3 V1, Vector3 V2)
 Does a dot product More...
 
static Vector3 Interpolate (Vector3 V1, Vector3 V2, double Control)
 Interpolates between the vectors More...
 
static Vector3 operator- (Vector3 V1, Vector3 V2)
 Subtraction More...
 
static Vector3 operator- (Vector3 V1)
 Negation More...
 
static bool operator!= (Vector3 V1, Vector3 V2)
 Not equals More...
 
static Vector3 operator* (Vector3 V1, double D)
 Multiplication More...
 
static Vector3 operator* (double D, Vector3 V1)
 Multiplication More...
 
static Vector3 operator* (Vector3 V1, Vector3 V2)
 Does a cross product More...
 
static Vector3 operator/ (Vector3 V1, double D)
 Division More...
 
static Vector3 operator+ (Vector3 V1, Vector3 V2)
 Addition More...
 
static bool operator< (Vector3 V1, Vector3 V2)
 Less than More...
 
static bool operator<= (Vector3 V1, Vector3 V2)
 Less than or equal More...
 
static bool operator== (Vector3 V1, Vector3 V2)
 Equals More...
 
static bool operator> (Vector3 V1, Vector3 V2)
 Greater than More...
 
static bool operator>= (Vector3 V1, Vector3 V2)
 Greater than or equal More...
 

Properties

virtual double[] Array [get, set]
 Used for converting this to an array and back More...
 
virtual double Magnitude [get]
 Returns the magnitude of the vector More...
 
virtual double X [get, set]
 X value More...
 
virtual double Y [get, set]
 Y Value More...
 
virtual double Z [get, set]
 Z value More...
 

Detailed Description

Vector class (holds three items)

Definition at line 32 of file Vector3.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.Vector3.Vector3 ( double  X,
double  Y,
double  Z 
)

Constructor

Parameters
XX direction
YY direction
ZZ direction

Definition at line 40 of file Vector3.cs.

Member Function Documentation

static double Utilities.DataTypes.Vector3.Angle ( Vector3  V1,
Vector3  V2 
)
static

Determines the angle between the vectors

Parameters
V1Vector 1
V2Vector 2
Returns
Angle between the vectors

Definition at line 97 of file Vector3.cs.

static double Utilities.DataTypes.Vector3.Distance ( Vector3  V1,
Vector3  V2 
)
static

The distance between two vectors

Parameters
V1Vector 1
V2Vector 2
Returns
Distance between the vectors

Definition at line 112 of file Vector3.cs.

static double Utilities.DataTypes.Vector3.DotProduct ( Vector3  V1,
Vector3  V2 
)
static

Does a dot product

Parameters
V1Vector 1
V2Vector 2
Returns
a dot product

Definition at line 125 of file Vector3.cs.

override bool Utilities.DataTypes.Vector3.Equals ( object  obj)

Determines if the items are equal

Parameters
objObject to compare
Returns
true if they are, false otherwise

Definition at line 323 of file Vector3.cs.

override int Utilities.DataTypes.Vector3.GetHashCode ( )

Gets the hash code

Returns
The hash code

Definition at line 333 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.Interpolate ( Vector3  V1,
Vector3  V2,
double  Control 
)
static

Interpolates between the vectors

Parameters
V1Vector 1
V2Vector 2
ControlPercent to move between 1 and 2
Returns
The interpolated vector

Definition at line 139 of file Vector3.cs.

virtual void Utilities.DataTypes.Vector3.Normalize ( )
virtual

Normalizes the vector

Definition at line 341 of file Vector3.cs.

static bool Utilities.DataTypes.Vector3.operator!= ( Vector3  V1,
Vector3  V2 
)
static

Not equals

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 180 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator* ( Vector3  V1,
double  D 
)
static

Multiplication

Parameters
V1Item 1
DItem 2
Returns
The resulting vector

Definition at line 193 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator* ( double  D,
Vector3  V1 
)
static

Multiplication

Parameters
V1Item 1
DItem 2
Returns
The resulting vector

Definition at line 205 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator* ( Vector3  V1,
Vector3  V2 
)
static

Does a cross product

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 217 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator+ ( Vector3  V1,
Vector3  V2 
)
static

Addition

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 246 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator- ( Vector3  V1,
Vector3  V2 
)
static

Subtraction

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 156 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator- ( Vector3  V1)
static

Negation

Parameters
V1Item 1
Returns
The resulting vector

Definition at line 168 of file Vector3.cs.

static Vector3 Utilities.DataTypes.Vector3.operator/ ( Vector3  V1,
double  D 
)
static

Division

Parameters
V1Item 1
DItem 2
Returns
The resulting vector

Definition at line 234 of file Vector3.cs.

static bool Utilities.DataTypes.Vector3.operator< ( Vector3  V1,
Vector3  V2 
)
static

Less than

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 259 of file Vector3.cs.

static bool Utilities.DataTypes.Vector3.operator<= ( Vector3  V1,
Vector3  V2 
)
static

Less than or equal

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 272 of file Vector3.cs.

static bool Utilities.DataTypes.Vector3.operator== ( Vector3  V1,
Vector3  V2 
)
static

Equals

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 285 of file Vector3.cs.

static bool Utilities.DataTypes.Vector3.operator> ( Vector3  V1,
Vector3  V2 
)
static

Greater than

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 298 of file Vector3.cs.

static bool Utilities.DataTypes.Vector3.operator>= ( Vector3  V1,
Vector3  V2 
)
static

Greater than or equal

Parameters
V1Item 1
V2Item 2
Returns
The resulting vector

Definition at line 311 of file Vector3.cs.

override string Utilities.DataTypes.Vector3.ToString ( )

To string function

Returns
String representation of the vector

Definition at line 357 of file Vector3.cs.

Property Documentation

virtual double [] Utilities.DataTypes.Vector3.Array
getset

Used for converting this to an array and back

Definition at line 51 of file Vector3.cs.

virtual double Utilities.DataTypes.Vector3.Magnitude
get

Returns the magnitude of the vector

Definition at line 69 of file Vector3.cs.

virtual double Utilities.DataTypes.Vector3.X
getset

X value

Definition at line 77 of file Vector3.cs.

virtual double Utilities.DataTypes.Vector3.Y
getset

Y Value

Definition at line 83 of file Vector3.cs.

virtual double Utilities.DataTypes.Vector3.Z
getset

Z value

Definition at line 89 of file Vector3.cs.


The documentation for this class was generated from the following file: