C# Class Vector3D, UnityUtils

Show file Open project: mortennobel/UnityUtils Class Usage Examples

Public Properties

Property Type Description
x double
y double
z double

Private Properties

Property Type Description
Clamp double
Clamp01 double

Public Methods

Method Description
ClampMagnitude ( Vector3D, vector, double maxLength ) : Vector3D,
Cross ( Vector3D, lhs, Vector3D, rhs ) : Vector3D,
Distance ( Vector3D, a, Vector3D, b ) : double
Dot ( Vector3D, lhs, Vector3D, rhs ) : double
Equals ( object other ) : bool
GetHashCode ( ) : int
Lerp ( Vector3D, from, Vector3D, to, double t ) : Vector3D,
Magnitude ( Vector3D, a ) : double
Max ( Vector3D, lhs, Vector3D, rhs ) : Vector3D,
Min ( Vector3D, lhs, Vector3D, rhs ) : Vector3D,
MoveTowards ( Vector3D, current, Vector3D, target, double maxDistanceDelta ) : Vector3D,
Normalize ( Vector3D, value ) : Vector3D,
Normalize ( ) : void
Project ( Vector3D, vector, Vector3D, onNormal ) : Vector3D,
ProjectOnPlane ( Vector3D, vector, Vector3D, planeNormal ) : Vector3D,
Reflect ( Vector3D, inDirection, Vector3D, inNormal ) : Vector3D,
Scale ( Vector3D, a, Vector3D, b ) : Vector3D,
Scale ( Vector3D, scale ) : void
Set ( double new_x, double new_y, double new_z ) : void
SqrMagnitude ( Vector3D, a ) : double
ToString ( ) : string
ToString ( string format ) : string
ToVector3 ( ) : Vector3
Vector3D ( Vector3 v ) : System
Vector3D ( double x, double y ) : System
Vector3D ( double x, double y, double z ) : System
operator ( ) : Vector3D,
operator ( ) : bool
this ( int index ) : double

Private Methods

Method Description
Clamp ( double value, double min, double max ) : double
Clamp01 ( double value ) : double

Method Details

ClampMagnitude() public static method

public static ClampMagnitude ( Vector3D, vector, double maxLength ) : Vector3D,
vector Vector3D,
maxLength double
return Vector3D,

Cross() public static method

public static Cross ( Vector3D, lhs, Vector3D, rhs ) : Vector3D,
lhs Vector3D,
rhs Vector3D,
return Vector3D,

Distance() public static method

public static Distance ( Vector3D, a, Vector3D, b ) : double
a Vector3D,
b Vector3D,
return double

Dot() public static method

public static Dot ( Vector3D, lhs, Vector3D, rhs ) : double
lhs Vector3D,
rhs Vector3D,
return double

Equals() public method

public Equals ( object other ) : bool
other object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Lerp() public static method

public static Lerp ( Vector3D, from, Vector3D, to, double t ) : Vector3D,
from Vector3D,
to Vector3D,
t double
return Vector3D,

Magnitude() public static method

public static Magnitude ( Vector3D, a ) : double
a Vector3D,
return double

Max() public static method

public static Max ( Vector3D, lhs, Vector3D, rhs ) : Vector3D,
lhs Vector3D,
rhs Vector3D,
return Vector3D,

Min() public static method

public static Min ( Vector3D, lhs, Vector3D, rhs ) : Vector3D,
lhs Vector3D,
rhs Vector3D,
return Vector3D,

MoveTowards() public static method

public static MoveTowards ( Vector3D, current, Vector3D, target, double maxDistanceDelta ) : Vector3D,
current Vector3D,
target Vector3D,
maxDistanceDelta double
return Vector3D,

Normalize() public static method

public static Normalize ( Vector3D, value ) : Vector3D,
value Vector3D,
return Vector3D,

Normalize() public method

public Normalize ( ) : void
return void

Project() public static method

public static Project ( Vector3D, vector, Vector3D, onNormal ) : Vector3D,
vector Vector3D,
onNormal Vector3D,
return Vector3D,

ProjectOnPlane() public static method

public static ProjectOnPlane ( Vector3D, vector, Vector3D, planeNormal ) : Vector3D,
vector Vector3D,
planeNormal Vector3D,
return Vector3D,

Reflect() public static method

public static Reflect ( Vector3D, inDirection, Vector3D, inNormal ) : Vector3D,
inDirection Vector3D,
inNormal Vector3D,
return Vector3D,

Scale() public static method

public static Scale ( Vector3D, a, Vector3D, b ) : Vector3D,
a Vector3D,
b Vector3D,
return Vector3D,

Scale() public method

public Scale ( Vector3D, scale ) : void
scale Vector3D,
return void

Set() public method

public Set ( double new_x, double new_y, double new_z ) : void
new_x double
new_y double
new_z double
return void

SqrMagnitude() public static method

public static SqrMagnitude ( Vector3D, a ) : double
a Vector3D,
return double

ToString() public method

public ToString ( ) : string
return string

ToString() public method

public ToString ( string format ) : string
format string
return string

ToVector3() public method

public ToVector3 ( ) : Vector3
return Vector3

Vector3D() public method

public Vector3D ( Vector3 v ) : System
v Vector3
return System

Vector3D() public method

public Vector3D ( double x, double y ) : System
x double
y double
return System

Vector3D() public method

public Vector3D ( double x, double y, double z ) : System
x double
y double
z double
return System

operator() public static method

public static operator ( ) : Vector3D,
return Vector3D,

operator() public static method

public static operator ( ) : bool
return bool

this() public method

public this ( int index ) : double
index int
return double

Property Details

x public property

public double x
return double

y public property

public double y
return double

z public property

public double z
return double