Table of Contents

Struct Vec3

Namespace
TaleWorlds.Library
Assembly
TaleWorlds.Library.dll
public struct Vec3
Inherited Members
Extension Methods

Constructors

Vec3(Vector3)

public Vec3(Vector3 vector3)

Parameters

vector3 Vector3

Vec3(float, float, float, float)

public Vec3(float x = 0, float y = 0, float z = 0, float w = -1)

Parameters

x float
y float
z float
w float

Vec3(Vec2, float, float)

public Vec3(Vec2 xy, float z = 0, float w = -1)

Parameters

xy Vec2
z float
w float

Vec3(Vec3, float)

public Vec3(Vec3 c, float w = -1)

Parameters

c Vec3
w float

Fields

Forward

public static readonly Vec3 Forward

Field Value

Vec3

Invalid

public static readonly Vec3 Invalid

Field Value

Vec3

One

public static readonly Vec3 One

Field Value

Vec3

Side

public static readonly Vec3 Side

Field Value

Vec3

Up

public static readonly Vec3 Up

Field Value

Vec3

Zero

public static readonly Vec3 Zero

Field Value

Vec3

w

public float w

Field Value

float

x

public float x

Field Value

float

y

public float y

Field Value

float

z

public float z

Field Value

float

Properties

AsVec2

public Vec2 AsVec2 { get; set; }

Property Value

Vec2

IsNonZero

public bool IsNonZero { get; }

Property Value

bool

IsUnit

public bool IsUnit { get; }

Property Value

bool

IsValid

public bool IsValid { get; }

Property Value

bool

IsValidXYZW

public bool IsValidXYZW { get; }

Property Value

bool

this[int]

public float this[int i] { get; set; }

Parameters

i int

Property Value

float

Length

public float Length { get; }

Property Value

float

LengthSquared

public float LengthSquared { get; }

Property Value

float

RotationX

public float RotationX { get; }

Property Value

float

RotationZ

public float RotationZ { get; }

Property Value

float

ToARGB

public uint ToARGB { get; }

Property Value

uint

X

public float X { get; }

Property Value

float

Y

public float Y { get; }

Property Value

float

Z

public float Z { get; }

Property Value

float

Methods

Abs(Vec3)

public static Vec3 Abs(Vec3 vec)

Parameters

vec Vec3

Returns

Vec3

AngleBetweenTwoVectors(Vec3, Vec3)

public static float AngleBetweenTwoVectors(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

float

ClampedCopy(float, float)

public Vec3 ClampedCopy(float min, float max)

Parameters

min float
max float

Returns

Vec3

ClampedCopy(float, float, out bool)

public Vec3 ClampedCopy(float min, float max, out bool valueClamped)

Parameters

min float
max float
valueClamped bool

Returns

Vec3

CrossProduct(Vec3, Vec3)

public static Vec3 CrossProduct(Vec3 va, Vec3 vb)

Parameters

va Vec3
vb Vec3

Returns

Vec3

Distance(Vec3)

public float Distance(Vec3 v)

Parameters

v Vec3

Returns

float

DistanceSquared(Vec3)

public float DistanceSquared(Vec3 v)

Parameters

v Vec3

Returns

float

DotProduct(Vec3, Vec3)

public static float DotProduct(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

float

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Lerp(Vec3, Vec3, float)

public static Vec3 Lerp(Vec3 v1, Vec3 v2, float alpha)

Parameters

v1 Vec3
v2 Vec3
alpha float

Returns

Vec3

NearlyEquals(Vec3, float)

public bool NearlyEquals(Vec3 v, float epsilon = 1E-05)

Parameters

v Vec3
epsilon float

Returns

bool

Normalize()

public float Normalize()

Returns

float

NormalizeWithoutChangingZ()

public void NormalizeWithoutChangingZ()

NormalizedCopy()

public Vec3 NormalizedCopy()

Returns

Vec3

Parse(string)

public static Vec3 Parse(string input)

Parameters

input string

Returns

Vec3

ProjectOnUnitVector(Vec3)

public Vec3 ProjectOnUnitVector(Vec3 ov)

Parameters

ov Vec3

Returns

Vec3

Reflect(Vec3)

public Vec3 Reflect(Vec3 normal)

Parameters

normal Vec3

Returns

Vec3

RotateAboutAnArbitraryVector(Vec3, float)

public Vec3 RotateAboutAnArbitraryVector(Vec3 vec, float a)

Parameters

vec Vec3
a float

Returns

Vec3

RotateAboutX(float)

public void RotateAboutX(float a)

Parameters

a float

RotateAboutY(float)

public void RotateAboutY(float a)

Parameters

a float

RotateAboutZ(float)

public void RotateAboutZ(float a)

Parameters

a float

Slerp(Vec3, Vec3, float)

public static Vec3 Slerp(Vec3 start, Vec3 end, float percent)

Parameters

start Vec3
end Vec3
percent float

Returns

Vec3

ToString()

public override string ToString()

Returns

string

Vec3Max(Vec3, Vec3)

public static Vec3 Vec3Max(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

Vec3

Vec3Min(Vec3, Vec3)

public static Vec3 Vec3Min(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

Vec3

Operators

operator +(Vec3, Vec3)

public static Vec3 operator +(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

Vec3

operator /(Vec3, float)

public static Vec3 operator /(Vec3 v, float f)

Parameters

v Vec3
f float

Returns

Vec3

operator ==(Vec3, Vec3)

public static bool operator ==(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

bool

explicit operator Vector3(Vec3)

public static explicit operator Vector3(Vec3 vec3)

Parameters

vec3 Vec3

Returns

Vector3

operator !=(Vec3, Vec3)

public static bool operator !=(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

bool

operator *(float, Vec3)

public static Vec3 operator *(float f, Vec3 v)

Parameters

f float
v Vec3

Returns

Vec3

operator *(Vec3, float)

public static Vec3 operator *(Vec3 v, float f)

Parameters

v Vec3
f float

Returns

Vec3

operator *(Vec3, MatrixFrame)

public static Vec3 operator *(Vec3 v, MatrixFrame frame)

Parameters

v Vec3
frame MatrixFrame

Returns

Vec3

operator -(Vec3, Vec3)

public static Vec3 operator -(Vec3 v1, Vec3 v2)

Parameters

v1 Vec3
v2 Vec3

Returns

Vec3

operator -(Vec3)

public static Vec3 operator -(Vec3 v)

Parameters

v Vec3

Returns

Vec3

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).