Class Vector3
A pure .NET implemenation of Unity's Vector3.
See Unity's docs for more details.
Inheritance
System.Object
Vector3
Assembly: Sylves.dll
Syntax
public sealed class Vector3 : ValueType
Constructors
Vector3(Single, Single, Single)
Declaration
public Vector3(float x, float y, float z)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
System.Single |
z |
|
Properties
back
Declaration
public static Vector3 back { get; }
Property Value
down
Declaration
public static Vector3 down { get; }
Property Value
forward
Declaration
public static Vector3 forward { get; }
Property Value
Item[Int32]
Declaration
public float this[int index] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
Type |
Description |
System.Single |
|
left
Declaration
public static Vector3 left { get; }
Property Value
magnitude
Declaration
public float magnitude { get; }
Property Value
Type |
Description |
System.Single |
|
negativeInfinity
Declaration
public static Vector3 negativeInfinity { get; }
Property Value
normalized
Declaration
public Vector3 normalized { get; }
Property Value
one
Declaration
public static Vector3 one { get; }
Property Value
positiveInfinity
Declaration
public static Vector3 positiveInfinity { get; }
Property Value
right
Declaration
public static Vector3 right { get; }
Property Value
sqrMagnitude
Declaration
public float sqrMagnitude { get; }
Property Value
Type |
Description |
System.Single |
|
up
Declaration
public static Vector3 up { get; }
Property Value
x
Declaration
public float x { get; set; }
Property Value
Type |
Description |
System.Single |
|
y
Declaration
public float y { get; set; }
Property Value
Type |
Description |
System.Single |
|
z
Declaration
public float z { get; set; }
Property Value
Type |
Description |
System.Single |
|
zero
Declaration
public static Vector3 zero { get; }
Property Value
Methods
Angle(Vector3, Vector3)
Declaration
public static float Angle(Vector3 from, Vector3 to)
Parameters
Returns
Type |
Description |
System.Single |
|
ClampMagnitude(Vector3, Single)
Declaration
public static Vector3 ClampMagnitude(Vector3 vector, float maxLength)
Parameters
Type |
Name |
Description |
Vector3 |
vector |
|
System.Single |
maxLength |
|
Returns
Cross(Vector3, Vector3)
Declaration
public static Vector3 Cross(Vector3 lhs, Vector3 rhs)
Parameters
Returns
Distance(Vector3, Vector3)
Declaration
public static float Distance(Vector3 a, Vector3 b)
Parameters
Returns
Type |
Description |
System.Single |
|
Dot(Vector3, Vector3)
Declaration
public static float Dot(Vector3 a, Vector3 b)
Parameters
Returns
Type |
Description |
System.Single |
|
Equals(Vector3)
Declaration
public bool Equals(Vector3 other)
Parameters
Type |
Name |
Description |
Vector3 |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Lerp(Vector3, Vector3, Single)
Declaration
public static Vector3 Lerp(Vector3 a, Vector3 b, float t)
Parameters
Returns
LerpUnclamped(Vector3, Vector3, Single)
Declaration
public static Vector3 LerpUnclamped(Vector3 a, Vector3 b, float t)
Parameters
Returns
Magnitude(Vector3)
Declaration
public static float Magnitude(Vector3 a)
Parameters
Returns
Type |
Description |
System.Single |
|
Max(Vector3, Vector3)
Declaration
public static Vector3 Max(Vector3 lhs, Vector3 rhs)
Parameters
Returns
Min(Vector3, Vector3)
Declaration
public static Vector3 Min(Vector3 lhs, Vector3 rhs)
Parameters
Returns
MoveTowards(Vector3, Vector3, Single)
Declaration
public static Vector3 MoveTowards(Vector3 current, Vector3 target, float maxDistanceDelta)
Parameters
Type |
Name |
Description |
Vector3 |
current |
|
Vector3 |
target |
|
System.Single |
maxDistanceDelta |
|
Returns
Normalize()
Declaration
Normalize(Vector3)
Declaration
public static Vector3 Normalize(Vector3 a)
Parameters
Returns
OrthoNormalize(ref Vector3, ref Vector3)
Declaration
public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent)
Parameters
OrthoNormalize(ref Vector3, ref Vector3, ref Vector3)
Declaration
public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent, ref Vector3 binormal)
Parameters
Project(Vector3, Vector3)
Declaration
public static Vector3 Project(Vector3 a, Vector3 b)
Parameters
Returns
ProjectOnPlane(Vector3, Vector3)
Declaration
public static Vector3 ProjectOnPlane(Vector3 vector, Vector3 planeNormal)
Parameters
Returns
Reflect(Vector3, Vector3)
Declaration
public static Vector3 Reflect(Vector3 inDirection, Vector3 inNormal)
Parameters
Returns
Scale(Vector3)
Declaration
public void Scale(Vector3 scale)
Parameters
Type |
Name |
Description |
Vector3 |
scale |
|
Scale(Vector3, Vector3)
Declaration
public static Vector3 Scale(Vector3 a, Vector3 b)
Parameters
Returns
Set(Single, Single, Single)
Declaration
public void Set(float newX, float newY, float newZ)
Parameters
Type |
Name |
Description |
System.Single |
newX |
|
System.Single |
newY |
|
System.Single |
newZ |
|
SignedAngle(Vector3, Vector3, Vector3)
Declaration
public static float SignedAngle(Vector3 from, Vector3 to, Vector3 axis)
Parameters
Returns
Type |
Description |
System.Single |
|
Slerp(Vector3, Vector3, Single)
Declaration
public static Vector3 Slerp(Vector3 a, Vector3 b, float t)
Parameters
Returns
SlerpUnclamped(Vector3, Vector3, Single)
Declaration
public static Vector3 SlerpUnclamped(Vector3 a, Vector3 b, float t)
Parameters
Returns
SqrMagnitude()
Declaration
public float SqrMagnitude()
Returns
Type |
Description |
System.Single |
|
SqrMagnitude(Vector3)
Declaration
public static float SqrMagnitude(Vector3 a)
Parameters
Returns
Type |
Description |
System.Single |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
ToString(String)
Declaration
public string ToString(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Type |
Description |
System.String |
|
Operators
Addition(Vector3, Vector3)
Declaration
public static Vector3 operator +(Vector3 a, Vector3 b)
Parameters
Returns
Division(Vector3, Single)
Declaration
public static Vector3 operator /(Vector3 a, float b)
Parameters
Type |
Name |
Description |
Vector3 |
a |
|
System.Single |
b |
|
Returns
Equality(Vector3, Vector3)
Declaration
public static bool operator ==(Vector3 lhs, Vector3 rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(Vector3, Vector3)
Declaration
public static bool operator !=(Vector3 lhs, Vector3 rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Multiply(Vector3, Vector3)
Declaration
public static Vector3 operator *(Vector3 a, Vector3 b)
Parameters
Returns
Multiply(Vector3, Single)
Declaration
public static Vector3 operator *(Vector3 a, float b)
Parameters
Type |
Name |
Description |
Vector3 |
a |
|
System.Single |
b |
|
Returns
Multiply(Single, Vector3)
Declaration
public static Vector3 operator *(float a, Vector3 b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
Vector3 |
b |
|
Returns
Subtraction(Vector3, Vector3)
Declaration
public static Vector3 operator -(Vector3 a, Vector3 b)
Parameters
Returns
UnaryNegation(Vector3)
Declaration
public static Vector3 operator -(Vector3 a)
Parameters
Returns